This HOWTO is for people who have a LG G4C phone (H525N) and don't really like the flash layout that comes with it. Basically this phone has a /system/ partition that is 2.4 GiB in size and a /cache/ partition that is 850.0 MiB in size, which is a waste of space when you deal with custom ROMs. Also you have only 3.6 GiB for user data. What I want to do is to repartition the phone's flash and add around 2 GiB to the user data partition making it a little bit larger ~5,7 GiB. It will be done by taking ~1,5 GiB from the /system partition/ and ~600MiB from the /cache/ partition. All of the steps will be done in the TWRP recovery, so you have to flash it before (here
Kernel Compilation Guide | |
Author: Vineeth Penugonda | |
(1) git clone https://github.com/LG-K10/android_kernel_lge_msm8916.git -b cm-14.1 | |
(2) git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8 | |
(3) sudo gedit ~/.profile. | |
Then, source ~/.profile. | |
(4) (Add below lines at the end) |
Encrypted systems (desktops/laptops) have one major problem when it comes to providing security over protected files. When you sit in front of your machine, you can feel safe because no one can break into the system without your knowledge. Moreover, if they try to do some bad actions, you can detect them and avoid the imminent danger. But what if you leave your laptop alone? Even if you think that you can lock it, turn it off or hibernate it, the machine still isn't secure as you would have thought. The problem lays in the physical access that people can get when you're not around and hence set some traps for you when you're not looking. To avoid the danger that comes
These are only examples, for a few very common actions. You are expected to write your own rules for the rest. The syntax is regular JavaScript, but see the polkit(8)
manpage for the object structure and available API. These examples are for polkit versions 106 and later, with the JS interpreter. They won't work with Debian's polkit v105.
-
If you don't know the action name, run
pkaction
:pkaction | grep cups
-
The possible results are
YES
,AUTH_SELF(_KEEP)
,AUTH_ADMIN(_KEEP)
,NO
. Returning a result is final. Returningnull
will continue checking other rules. -
Put your rules in
/etc/polkit-1/rules.d/*.rules
. (You can check everything in one giant addRule, or you can have a separate file and separate addRule for each program; it doesn't matter.)
FILE SPACING: | |
# double space a file | |
sed G | |
# double space a file which already has blank lines in it. Output file | |
# should contain no more than one blank line between lines of text. | |
sed '/^$/d;G' |
To limit a CPU to a certain C-state, you can pass the processor.max_cstate=X
option in the kernel
line of /boot/grub/grub.conf
.
Here we limit the system to only C-State 1:
kernel /vmlinuz-2.6.18-371.1.2.el5 ... processor.max_cstate=1
On some systems, the kernel can override the BIOS setting, and the parameter intel_idle.max_cstate=0
may be required to ensure sleep states are not entered:
#!/usr/bin/env bash | |
# You can call this script like this: | |
# $ ./brightnessControl.sh up | |
# $ ./brightnessControl.sh down | |
# Script inspired by these wonderful people: | |
# https://github.com/dastorm/volume-notification-dunst/blob/master/volume.sh | |
# https://gist.github.com/sebastiencs/5d7227f388d93374cebdf72e783fbd6a |
#!/bin/sh | |
# this goes into /etc/initramfs-tools/scripts/init-premount/a_enable_wireless | |
PREREQ="" | |
prereqs() | |
{ | |
echo "$PREREQ" | |
} | |
case $1 in | |
prereqs) |
ffmpeg -f lavfi -i anullsrc=r=11025:cl=mono -t <number of seconds> -acodec aac out.m4a |