[DEPRECATED] || [GUIDE] || [XSP] || Create Your Own Boot-LED Sequence || - Xperia SP General

PEOPLE ON ROMS DATED ON OR AFTER JANUARY 2016 PLEASE DO NOT USE THIS. LOOK AT THIS POST FOR MORE INFO
Hey guys.
So, most of us have been using the SP since many months / couple of years by now and majority of us like the beautiful LED bar at the bottom and could probably even be the reason you've bought one.
So this guide here is another guide focused on that aspect of our phone. The LED Illumination bar.
As the title suggest, this guide will definitely help you learn how the Boot LED animation occurs and I will be giving you some tips and hints on how to create your own LED Boot sequence.
Requirements:
1) An Xperia SP rooted, bootloader unlocked, must be running a recent 5.1.1 LP ROM
2) An init.sh replacer template made by @Tomoms using @nosedive 's anykernel template (Which will be found in the attachments to this post)
3) Patience and a working brain and some more patience with a dash of common sense
4) A good editor like notepad ++ (if on windows) or gedit is more than enough for Linux distributions. (Make sure to enable line numbers in your editor. Mostly the option will be in preferences )
Firstly, I shall explain the file we are going to modify. The init.sh file.
(Note that this is my interpretation of the code and is 99% correct, however if at all there are mistakes in what I explain, please do mention so that I can correct it and update this post.)
So where is this init.sh?
This file is inside sbin folder of root directory of our phone. (/sbin/init.sh)
This init.sh is a part of the ramdisk which is in turn a part of our kernel
So to modify this init.sh , we directly need to edit the ramdisk (thus manually pushing edited init.sh into /sbin/ won't work)
Good. Now you know where this file is. So we proceed to the next step.
What is this file anyway?
It is a script file ( *.sh files are script files . Google for more info) that automatically runs at every startup.
Now what you need to do is download the init.sh zip , extract it ( Taken from AdrianDC's repo , attached below as init_sh_original.zip) and open it up with an editor.
Here are some things you need to keep in mind as you start reading it.
The Left LED of our phone is LED3
The Middle LED is LED1 and
The Right LED is LED2
Also
Code:
LED1_R_BRIGHTNESS_FILE
LED2_G_CURRENT_FILE
LED3_B_BRIGHTNESS_FILE
Here the letter in between both the underscores R/G/B stands for Red/Green/Blue colors
BRIGHTNESS_FILE is where we set the maximum brightness value ( value ranges from 0 - 255 so max we generally set is 255)
and CURRENT_FILE is the file where in we set the brightness of the LED at that time.
Now that you know this, let's get to the first important (relative to this guide) lines of the script.
At lines 6-24 ,
Code:
# leds paths
LED1_R_BRIGHTNESS_FILE="/sys/class/leds/LED1_R/brightness"
LED2_R_BRIGHTNESS_FILE="/sys/class/leds/LED2_R/brightness"
LED3_R_BRIGHTNESS_FILE="/sys/class/leds/LED3_R/brightness"
LED1_R_CURRENT_FILE="/sys/class/leds/LED1_R/led_current"
LED2_R_CURRENT_FILE="/sys/class/leds/LED2_R/led_current"
LED3_R_CURRENT_FILE="/sys/class/leds/LED3_R/led_current"
LED1_G_BRIGHTNESS_FILE="/sys/class/leds/LED1_G/brightness"
LED2_G_BRIGHTNESS_FILE="/sys/class/leds/LED2_G/brightness"
LED3_G_BRIGHTNESS_FILE="/sys/class/leds/LED3_G/brightness"
LED1_G_CURRENT_FILE="/sys/class/leds/LED1_G/led_current"
LED2_G_CURRENT_FILE="/sys/class/leds/LED2_G/led_current"
LED3_G_CURRENT_FILE="/sys/class/leds/LED3_G/led_current"
LED1_B_BRIGHTNESS_FILE="/sys/class/leds/LED1_B/brightness"
LED2_B_BRIGHTNESS_FILE="/sys/class/leds/LED2_B/brightness"
LED3_B_BRIGHTNESS_FILE="/sys/class/leds/LED3_B/brightness"
LED1_B_CURRENT_FILE="/sys/class/leds/LED1_B/led_current"
LED2_B_CURRENT_FILE="/sys/class/leds/LED2_B/led_current"
LED3_B_CURRENT_FILE="/sys/class/leds/LED3_B/led_current"
So basically, what these lines of codes say is nothing but the file locations for BRIGHTNESS and CURRENT of each LED with it's respective primary color.
Next on
Lines 55 - 126
Here, if the system detects a normal boot and not recovery, then these lines are executed in the script.
So we don't boot into recovery. But just do a normal reboot.
What happens here is
Firstly, see these lines
Code:
# LEDs activated
echo '255' > $LED1_G_BRIGHTNESS_FILE
echo '255' > $LED2_G_BRIGHTNESS_FILE
echo '255' > $LED3_G_BRIGHTNESS_FILE
echo '255' > $LED1_R_BRIGHTNESS_FILE
echo '255' > $LED2_R_BRIGHTNESS_FILE
echo '255' > $LED3_R_BRIGHTNESS_FILE
These basically set the maximum value of the LED's brightness we are going to use to 255
The command echo is one that gives / print if you may say and here > redirects the echo command onto the path given
Example: echo 'a' > abc.txt would make the file abc.txt have a added in it.
So here echo '255' > $LED1_G_BRIGHTNESS_FILE gives a value of 255 into the brightness file of LED1_G and so on.
So once all the LED's we are going to use are activated, it goes to the next path.
The one we're interested in.
The Animation/Sequence of LED's
See lines 65-125
Code:
# LEDs starting animation
echo '16' > $LED1_G_CURRENT_FILE
echo '16' > $LED2_G_CURRENT_FILE
echo '16' > $LED3_G_CURRENT_FILE
busybox sleep 0.05
echo '32' > $LED1_G_CURRENT_FILE
echo '32' > $LED2_G_CURRENT_FILE
echo '32' > $LED3_G_CURRENT_FILE
busybox sleep 0.05
echo '64' > $LED1_G_CURRENT_FILE
echo '64' > $LED2_G_CURRENT_FILE
echo '64' > $LED3_G_CURRENT_FILE
busybox sleep 0.05
echo '92' > $LED1_G_CURRENT_FILE
echo '92' > $LED2_G_CURRENT_FILE
echo '92' > $LED3_G_CURRENT_FILE
busybox sleep 1
echo '64' > $LED1_G_CURRENT_FILE
echo '64' > $LED2_G_CURRENT_FILE
echo '64' > $LED3_G_CURRENT_FILE
busybox sleep 0.05
echo '32' > $LED1_G_CURRENT_FILE
echo '32' > $LED2_G_CURRENT_FILE
echo '32' > $LED3_G_CURRENT_FILE
busybox sleep 0.05
echo '0' > $LED1_G_BRIGHTNESS_FILE
echo '0' > $LED2_G_BRIGHTNESS_FILE
echo '0' > $LED3_G_BRIGHTNESS_FILE
echo '0' > $LED1_G_CURRENT_FILE
echo '0' > $LED2_G_CURRENT_FILE
echo '0' > $LED3_G_CURRENT_FILE
echo '16' > $LED1_R_CURRENT_FILE
echo '16' > $LED2_R_CURRENT_FILE
echo '16' > $LED3_R_CURRENT_FILE
busybox sleep 0.05
echo '32' > $LED1_R_CURRENT_FILE
echo '32' > $LED2_R_CURRENT_FILE
echo '32' > $LED3_R_CURRENT_FILE
busybox sleep 0.05
echo '64' > $LED1_R_CURRENT_FILE
echo '64' > $LED2_R_CURRENT_FILE
echo '64' > $LED3_R_CURRENT_FILE
busybox sleep 0.05
echo '92' > $LED1_R_CURRENT_FILE
echo '92' > $LED2_R_CURRENT_FILE
echo '92' > $LED3_R_CURRENT_FILE
busybox sleep 1
echo '64' > $LED1_R_CURRENT_FILE
echo '64' > $LED2_R_CURRENT_FILE
echo '64' > $LED3_R_CURRENT_FILE
busybox sleep 0.05
echo '32' > $LED1_R_CURRENT_FILE
echo '32' > $LED2_R_CURRENT_FILE
echo '32' > $LED3_R_CURRENT_FILE
busybox sleep 0.05
echo '0' > $LED1_R_BRIGHTNESS_FILE
echo '0' > $LED2_R_BRIGHTNESS_FILE
echo '0' > $LED3_R_BRIGHTNESS_FILE
echo '0' > $LED1_R_CURRENT_FILE
echo '0' > $LED2_R_CURRENT_FILE
echo '0' > $LED3_R_CURRENT_FILE
Here we specify which LED gets which brightness and we give the delay in between a few brightness settings
Same as before
echo '64' > $LED3_G_CURRENT_FILE does nothing but give a value 64 to the current file of LED3_G
So what this does is give a definite value with which that respective LED glows
The next command here is
Code:
busybox sleep 0.05
Here busybox, is the same as the busybox we all know. And sleep is a command we give to busybox and the value we give after it is the time in seconds
So the above command is nothing but telling it to sleep for 0.05 seconds. This is same as giving a delay of 0.05 seconds.
Now that the required stuff is cleared out, let's see what's going on in there.
Firstly, all the LED's are given a definite brightness in Green , and the brightness is increased upto a value and then slowly, symmetrically decreased back until zero. Then even the brightness file of Green LED's are given zero because they aren't needed anymore.
So this gives a breathing effect into all of the LED's in a green color.
Same goes for the next part except, Green is replaced with Red, even at the end of this the LED's are given 0 to both Brightness and current files.
Okay that's done for this part of the code.
Next from lines 128 to 135 we see a breakage in our code, why is that?
Code:
# android ramdisk
load_image=/sbin/ramdisk.cpio
# boot decision
if [ -s /dev/keycheck ] || [ ! -z "$RECOVERY_BOOT" ]; then
busybox echo 'RECOVERY BOOT' >>boot.txt
# LEDs for recovery
busybox echo '100' > /sys/class/timed_output/vibrator/enable
These lines of code are to check whether we've chosen to boot into system or chosen to boot into recovery.
So incase the keycheck is toggled and the correct button combination is pressed, then it'll execute lines 131-171
Else
It'll go and execute 174 to end. These last two sequences(recovery / boot into android system), you will be able to interpret since I've told the basics above.
Now that you know the required stuff on how init.sh works and how the LED's are programmed into a sequence, the only thing left out is for you to unleash your creativity and change the LED positions, delay, brightness values, give combination of colors to a single LED at the same time to create a new color (other than RGB) and what not.
Hopefully you will be able to make your own custom Boot Sequence now.
It might not be easy and will take multiple tries for it to be quite perfect, but in case you do something wrong, all you need to do is just flash the old kernel and things will be back to normal
You attached a initsh_replacer.zip in the attachments, what am I supposed to do with it?
Simple.
To save the trouble of having to rebuild a kernel on a PC I've asked tomoms to slightly edit his tangerine kernel zip ( Made from nosedive's anykernel template) to suit for just and only replacing init.sh.
So what you've to do once you've made a custom init.sh is to extract that zip, go to the folder tools and delete the init.sh in there and replace that with the one you've made and compress both the META-INF and tools folder back into a zip file and flash it and enjoy your own custom boot sequence
If there are any queries or some part about this guide you didn't understand, please do reply to this thread. Also if you've made any custom boot sequence, please do share it here for everyone else to enjoy
Cheers and have fun

great guide really ....it's real simple ....and we needed this since a long time ....i'm so excited to do my own boot led's
p.s: if u read this thread and u didn't see the attachments because it's not there ...i told @Raienryu and he will add them soon ...so have patience
great work :good:

So after making it could you give me your work as a flashable zip?

flash- said:
great guide really ....it's real simple ....and we needed this since a long time ....i'm so excited to do my own boot led's
p.s: if u read this thread and u didn't see the attachments because it's not there ...i told @Raienryu and he will add them soon ...so have patience
great work :good:
Click to expand...
Click to collapse
Thanks for notifying me. I had created a duplicate thread by mistake and attachments got uploaded to the duplicate instead of here.
Now added them
anisingh62 said:
So after making it could you give me your work as a flashable zip?
Click to expand...
Click to collapse
The initsh_replacer.zip already has a modified boot LED but note that I made it at around 3 AM and isn't so great. But if you'd like to test it out, flash that.
In case you don't like it, extract the init_sh_original.zip , you'll find an init.sh in there.
replace this init.sh with the one in initsh_replacer.zip and flash it to get back original Animation.

@Raienryu Brilliant. Well organised, simple and so informative post, many thanks bro :highfive:
I Just have a question here please, we find that some apps like Gmail, Taptalk, etc.. can control these LEDs and also can change its colors. So, I wonder if we could have these LEDs to work with dialer just like the stock do (LEDs will turn on once a call being answered while the screen is on, and turn off if the screen off or call ended)? does this need mod to the dialer itself and is it hard to be implemented?.

OsGhaly said:
@Raienryu Brilliant. Well organised, simple and so informative post, many thanks bro :highfive:
I Just have a question here please, we find that some apps like Gmail, Taptalk, etc.. can control these LEDs and also can change its colors. So, I wonder if we could have these LEDs to work with dialer just like the stock do (LEDs will turn on once a call being answered while the screen is on, and turn off if the screen off or call ended)? does this need mod to the dialer itself and is it hard to be implemented?.
Click to expand...
Click to collapse
i think it does need some work ...and we were hoping adriandc port that to lp or cm13 if he have time(if he have time he will work on it)

okay my first attempt is going now ....if it was beautiful i'll upload it
edit: okay i made my first one and it was so much funny...i'll keep trying to reach doomkernel level

flash- said:
okay my first attempt is going now ....if it was beautiful i'll upload it
edit: okay i made my first one and it was so much funny...i'll keep trying to reach doomkernel level
Click to expand...
Click to collapse
In case you would want to see how DoomLoRD actually made it in his kernel, I've uploaded in attachments his original script for rainbow animation of his kernel.
The coding is a bit different from what we have now but the basic idea is the same.
Have a look at it
Most probably, he must've used a code/script to automatically generate symmetric gradual increase and decrease of the brightness of those colors. (Even I've done the same for the init.sh file in the replacer zip. Wrote 20 lines or so in C to get around 70 lines =D ) No way he would have sat down and written 6645 Lines

OsGhaly said:
@Raienryu Brilliant. Well organised, simple and so informative post, many thanks bro :highfive:
I Just have a question here please, we find that some apps like Gmail, Taptalk, etc.. can control these LEDs and also can change its colors. So, I wonder if we could have these LEDs to work with dialer just like the stock do (LEDs will turn on once a call being answered while the screen is on, and turn off if the screen off or call ended)? does this need mod to the dialer itself and is it hard to be implemented?.
Click to expand...
Click to collapse
Which file governs in the incall --'pre-call' actually-- LED working in the stock rom?? Has anyone tried finding it and copying it back?

LWWSaint said:
Which file governs in the incall --'pre-call' actually-- LED working in the stock rom?? Has anyone tried finding it and copying it back?
Click to expand...
Click to collapse
I think @Adrian DC could answer you

OsGhaly said:
I think @Adrian DC could answer you
Click to expand...
Click to collapse
Some idiot People are already eating away at his head about CM13 camera i dont wanna burden him, nd thus die..

Small notice guys
Now that CM has removed busybox in the latest builds of CM13, this flashable zip will not work. We don't even have an init.sh anymore. The sources have been changed.
Look at this commit for more info.
So please do not use this on any CM13/based ROMs dated on and after Jan 2016.
Most probably there will be no simple easy way to change boot LEDs like this anykernel template.
But if there is a way I find, I will update the OP.

Related

[Q] Heat development using HyperDroid-CM7-v2.1.0

Hi to everyone,
after lot's of searching and Googling I have decided to start a new thread regarding the overheating of my HD2 and the constant reboots because of that.
I've been using HyperDroid-CM7-v2.1.0 for some time now, and like many others I am impressed by it's stability, speed and looks! So big thanks to all the developers and people who make such luxery in our lives possible!
To keep a long story short:
I've checked facdemol's topic about HD2 overheating, and I was wondering... looking at the HyperDroids kernel, which is tytung_r10, if it is possible to build a r10-like kernel with a big undervolt and max. speed of about 960Mhz for the CPU?
I think it would be a welcome addition to all other kernels for those who are experiencing these HD2 overheating issues. Are there devs out there that would like to dive into this challenge?
Again, thanks for al the people working on this super phone, and I hope to see some reactions on this initiative.
Greetings from Rotterdam, The Netherlands!
why not setting the max cpu frequency yourself?
settings->cyanogen->performance->cpu settings
...also undervolting is possible yourself, using typhoon rom and always undervolt it for better battery life. Should be also possible on hyperdroid...thought i have seen somethin in the OP.
Hi j4n87,
thanks for the reply!
Although I see it is an option to try the Typhoon build, I was only wondering if it is possible to do an undervolt without the technical routine in de HyperDroid-CM7-v2.1.0 build? I am not planning on switching to the Typhoon build because personally I realy like the Hyperdroid build and would like to stick to that one for now...
I am an HD2 enthousiast and manage to install new builds myself, but when it comes to things like undervolting it's a different story I presume?
I am formiliar with setting the CPU settings in CM, I have set i to 860Mhz, but still the overheating problem remains.
Is there a step-by-step guide to do this undervolting? Thanks in advance!
2nd post of hyperdroid at teh buttom:
Custom User set Voltage values via init.d script (thanks to snq-, hastarin, 2000impreza, tyween) Follow the syntax here.
OR use the init.d script 12vddlevels HERE
Click to expand...
Click to collapse
using this voltages from tyween:
Voltage control script Information:
As you can see in my script, I adjusted to the lowest possible value that I found stable for my phone on each frequency. I feel that is the best way, however.. if you want a quick and easy way, you can also do it this way:
incrementing/decrementing all levels by a specified amount* (mV):
echo '-25' > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo '+25' > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
All you would have to do is delete everything in the current script, and just have + or - the value you would like.. it would apply it universally. To see current levels type cat /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels . All of these commands can be done via adb shell, gscript lite, or editing the init.d script I have provided. Make sure that you use a unix compatible text editor: Notepad is NOT a unix compatible text editor, use Notepad++ in windows.
Click to expand...
Click to collapse
#!/system/bin/sh
# set vdd_levels on boot by tyween (XDA Developers)
echo '245000 850' > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo '384000 875' > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo '422400 900' > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo '460800 925' > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo '499200 950' > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo '537600 975' > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo '576000 1000' > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo '614400 1025' > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo '652800 1050' > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo '691200 1075' > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo '729600 1100' > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo '768000 1100' > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo '806400 1125' > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo '844800 1150' > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo '883200 1150' > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo '921600 1175' > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo '960000 1175' > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo '998400 1200' > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo '1036800 1200' > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo '1075200 1225' > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo '1113600 1225' > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo '1152000 1250' > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo '1190400 1275' > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
Click to expand...
Click to collapse
these are the orig. values:
#!/system/bin/sh
# set vdd_levels on boot by tyween (XDA Developers)
echo '245000 1050' > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo '384000 1050' > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo '422400 1050' > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo '460800 1050' > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo '499200 1075' > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo '537600 1100' > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo '576000 1100' > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo '614400 1125' > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo '652800 1150' > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo '691200 1175' > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo '729600 1200' > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo '768000 1200' > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo '806400 1225' > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo '844800 1250' > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo '883200 1275' > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo '921600 1300' > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo '960000 1300' > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo '998400 1300' > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo '1036800 1325' > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo '1075200 1325' > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo '1113600 1350' > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo '1152000 1350' > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo '1190400 1350' > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
Click to expand...
Click to collapse
Lower the values will increase the battery life and also overheating.
But be careful to set to low values..it can cause instabillity/freezes or you phone not boot anymore.
So PLEASE make a backup before editing these values.
Hi j4n87,
thanks for the reply!
I'll give that a try, hopefully it will solve my overheating problem. I'll update my findings after a few days of using with the new undervolt settings.
Nochmal, danke, und noch ein schönes Wochenende!
Grüße von der Käse Nachbarn, lol!
mister.halfblood said:
Hi j4n87,
thanks for the reply!
I'll give that a try, hopefully it will solve my overheating problem. I'll update my findings after a few days of using with the new undervolt settings.
Nochmal, danke, und noch ein schönes Wochenende!
Grüße von der Käse Nachbarn, lol!
Click to expand...
Click to collapse
Gern geschehen .
Some info:
after changing the values you have to reboot, to ensure teh values are set and used, the values also have to be in "/sys/devices/system/cpu/cpu0/cpufreq/vdd_levels"
Hi j4n87,
I downloaded the file "12vddlevels" and changed the content (in Notepad++) with the custom settings and then saved the file.
Then I used Absolute System to copy that file from my SD to the /system/etc/init.d folder with the same user rights as the other files that are in that folder, I believe it was "rwxr-x---".
I also copy/pasted the new content to "/sys/devices/system/cpu/cpu0/cpufreq/vdd_levels" manually and saved it with the program "Absolute System".
I rebooted my HD2, does this now mean that the new voltages are loaded??
Greets
mister.halfblood said:
Hi j4n87,
I downloaded the file "12vddlevels" and changed the content (in Notepad++) with the custom settings and then saved the file.
Then I used Absolute System to copy that file from my SD to the /system/etc/init.d folder with the same user rights as the other files that are in that folder, I believe it was "rwxr-x---".
I also copy/pasted the new content to "/sys/devices/system/cpu/cpu0/cpufreq/vdd_levels" manually and saved it with the program "Absolute System".
I rebooted my HD2, does this now mean that the new voltages are loaded??
Greets
Click to expand...
Click to collapse
the last step, to copy the content also to "/sys/devices/system/cpu/cpu0/cpufreq/vdd_levels" was wrong!
...after editing the values in the init.d folder and rebooting the values in "/sys/devices/system/cpu/cpu0/cpufreq/vdd_levels" should change automatically without your doing..if they do, you can ensure its working.
Ok, so I've checked the last step, opened the file /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels, and to my surprise nothing has changed? The file itself is totally empty...even after a few reboots. Does this mean the values from the /system/etc/init.d/12vddlevels file haven't been pushed trough the system?
I've also noticed the "12vddlevels" file didn't have any extention when coming straight out of the zipfile here from xda. Still I opened it in Notepad++ and changed and saved the values and so on and so on...
I did the check trough adb shell with the command line:
adb shell cat /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
This basicly showed the content of the file I had put in /system/etc/init.d folder earlier. I rebooted my phone three times now, but still nothing has changed in the /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels file, it's blanc?
I also executed a "fix permissions" routine via the CWM AD Recovery menu, I read somewhere this could help, but still nothing has changed??
Have I overlooked a step, or did I execute something in a wrong way?
Please advise...
Greets
...fix permissons only affect installed apps i think.
yeah, if the file under "/sys..." is empty or got the default values the init.d script are not executed correctly.
Did you set the right permission?
750or 777 should be the right ones.
mister.halfblood said:
Ok, so I've checked the last step, opened the file /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels, and to my surprise nothing has changed? The file itself is totally empty...even after a few reboots. Does this mean the values from the /system/etc/init.d/12vddlevels file haven't been pushed trough the system?
I've also noticed the "12vddlevels" file didn't have any extention when coming straight out of the zipfile here from xda. Still I opened it in Notepad++ and changed and saved the values and so on and so on...
I did the check trough adb shell with the command line:
adb shell cat /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
This basicly showed the content of the file I had put in /system/etc/init.d folder earlier. I rebooted my phone three times now, but still nothing has changed in the /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels file, it's blanc?
I also executed a "fix permissions" routine via the CWM AD Recovery menu, I read somewhere this could help, but still nothing has changed??
Have I overlooked a step, or did I execute something in a wrong way?
Please advise...
Greets
Click to expand...
Click to collapse
Hopefully I can help you
1. check that your vddlevels file is still in unix mode (open it in notepad++, then go to edit>eol conversion> if UNIX is greyed out then its already in unix mode and you can move to the next step (if you can click on it then go ahead and save the file after its been converted to unix)
2. Some people have had issues trying to automatically fix permissions on the file. I personally just used root explorer to fix the permissions (it should mimic the permissions of the other files in the init.d folder)
for my hyperdroid rom the owner settings should look like this (to match the other owner settings of the files in the init.d folder)
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
the permissions should look like this (to match the permissions of the other files in the init.d folder)
3. reboot and all should be fine. I found out that my phone cant handle 1190 using tyween's low voltages. 1152 works fine so thats what I'm running in my daily build
Hi j4n87,
I've checked the permissions on the 12vddlevels file, and I changed that to read+write+execute for ALL. So I guess now the permissions shouldn't be the problem anymore, right?
After a few reboots the file in /sys/devices/... still is empty.
But I also wonder where the results come from when entering the command line:
adb shell cat /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
Because when I look into that file manually, it's empty, when executing the adb command line, I see all the voltage settings...
In the meantime I've installed SetCPU and made a few profiles for different scenarios, I have the feeling this does change my heat problem slightly, but not much. Because when I play Crystal Defender for example, my HD2 is able to do that for like 10 minutes max. till it crashes and I have to take te battery out to reboot. Before installing SetCPU it only took 2 minutes till a crash occured.
It's sad to see that such a well build android phone has this ridiculous problem, I blame HTC for the cooling design failure! Bleh!
So...what now?
Greets
DramatikBeats said:
Hopefully I can help you
1. check that your vddlevels file is still in unix mode (open it in notepad++, then go to edit>eol conversion> if UNIX is greyed out then its already in unix mode and you can move to the next step (if you can click on it then go ahead and save the file after its been converted to unix)
2. Some people have had issues trying to automatically fix permissions on the file. I personally just used root explorer to fix the permissions (it should mimic the permissions of the other files in the init.d folder)
for my hyperdroid rom the owner settings should look like this (to match the other owner settings of the files in the init.d folder)
the permissions should look like this (to match the permissions of the other files in the init.d folder)
3. reboot and all should be fine. I found out that my phone cant handle 1190 using tyween's low voltages. 1152 works fine so thats what I'm running in my daily build
Click to expand...
Click to collapse
Hi DramatikBeats,
I followed your instructions and THAT DID IT!
First I had an old version of Root Explorer, so I wasnt able to set the right owner, just the permissions. After changing all the settings like your guide I rebooted. After reboot I immediatly checked the vddlevels file, and voila! Now it isn't empty, so I assume it's done!
So now I will try to stress the HD2's CPU a bit with some games and other stuff, I will update this post with my findings next week.
I thank both j4n87 and DramatikBeats for all your time and effort to help me out!
Peace to you, and have a nice weekend!
mister.halfblood said:
Hi DramatikBeats,
I followed your instructions and THAT DID IT!
First I had an old version of Root Explorer, so I wasnt able to set the right owner, just the permissions. After changing all the settings like your guide I rebooted. After reboot I immediatly checked the vddlevels file, and voila! Now it isn't empty, so I assume it's done!
So now I will try to stress the HD2's CPU a bit with some games and other stuff, I will update this post with my findings next week.
I thank both j4n87 and DramatikBeats for all your time and effort to help me out!
Peace to you, and have a nice weekend!
Click to expand...
Click to collapse
No problem...ever heard/seen the thanks buttons on each post here on xda? =P
mister.halfblood said:
Hi DramatikBeats,
I followed your instructions and THAT DID IT!
First I had an old version of Root Explorer, so I wasnt able to set the right owner, just the permissions. After changing all the settings like your guide I rebooted. After reboot I immediatly checked the vddlevels file, and voila! Now it isn't empty, so I assume it's done!
So now I will try to stress the HD2's CPU a bit with some games and other stuff, I will update this post with my findings next week.
I thank both j4n87 and DramatikBeats for all your time and effort to help me out!
Peace to you, and have a nice weekend!
Click to expand...
Click to collapse
same to u man take it easy
Ok guys,
after a week of testing I noticed my CPU's heat problem got a bit less, meaning, I can feel the temperatures are lower then before. But......and this is the sad part......after all this UV and trying to find the best settings possible, my HD2 still crashes after a few minutes of gameplay. The temperature still rises, so I think my motherboard is broken or something like that...
So I bought myself a Galaxy Tab, unlocked it, flashed it with a new Gingerbread Rom and rooted it.
But thnx again for all your help, I've learned a lot!
Have a nice weekend guys! ;-)

Script Oc/Uv (ziggys kernel)

Ok so this is my first time doing this so I apologize for anything wrong with it. I made this script because I don't like using 3rd party apps to control voltage/CPU freq. This script will set the freq. to 245ghzmin and 1.2ghzmax with the lagfree governor. You will need some kind of explorer that can r/w your system files like root explorer or script manager to edit the 01vdd_levels which is in system/etc/init.d
Unless someone can make a flashable so people can flash thru recovery.
Code:
#!/system/bin/sh
sysfile="/sys/devices/system/cpu/cpu0/cpufreq/vdd_levels"
echo "245760 750" > $sysfile
echo "368640 775" > $sysfile
echo "768000 850" > $sysfile
echo "806400 900" > $sysfile
echo "883400 925" > $sysfile
echo "960000 975" > $sysfile
echo "1036800 1025" > $sysfile
echo "1113600 1050" > $sysfile
echo "1190400 1075" > $sysfile
echo "1267200 1075" > $sysfile
echo 245760 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo 1267200 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo lagfree > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
This will do everything in boot, so I suggest downloading CPU master and incredicontrol and set the freq. And voltages through them first to see if it will be stable for you, as it is for me. If its not stable you can change some of the voltages yourself to your liking.
I know its a simple script, but I hope it will still help people
* as always I am not responsible for anything that happens.
Sent from my ADR6400L using xda premium
Thank you for this, it makes running Ziggy's kernel slightly tolerable now.
Sent from Slot #4 (SkyRaider Zeus)
Haha, I myself have been a ziggy fan for a long time but I'm testing kernels, and seeing which one will provide best battery life undervolted/overclocked, going to test imoseyens kernel
Sent from my ADR6400L using xda premium
If you click the QandA link in my sig it will take you to my thread. Take a look at the "Second Page". That's how I've been doing things for a while. I need to fix the script in the box, but I think you'll like some of the stuff in there. There's a lot more you can do with a script than just CPU settings.

[Bible] Galaxy S II Bible: Complete reference (updated 01/02/12)

An all in one collection for Galaxy S II where you can get all the information, tutorials, guides, mods, apps, tweaks, tips, tricks, DIY and many more.
Tutorials & Guides
How to build a perfect ROM
Know the Basics
Without knowing what you are getting yourself into will only make things worse even before you start off. To build a good Rom is different and to atleast build a fully functional Rom is different. So make sure you are fully aware of the technical fundamentals of building a Rom to enough extent so that you are able to fix the bugs and know what and where can things go wrong and how to solve them.
Performance, Memory, Stability and Battery
These are the four defining points which decide the pros and cons of the Rom that you develop. The Rom should be Fast, Have enough storage and program memory, should be stable and have a good battery backup. Trying to get a good balance of all these is very important. So make sure you keep all these things in mind while developing your Rom.
Be Patient and Polite
Building a good/perfect or bug free Rom wont come immediately. It’ll take many releases, experiments, testing and knowledge till you reach a nearly perfect Rom. So be patient as it sometimes takes weeks or sometimes months. Dealing with the public is not an easy job. You’ll find all sort of people of various characters. The can be nice as well as rude, but do remember that their critics are the only way you can improve. All they want from you is a good Rom, just keep this in mind and ignore the negatives.
Make it User Friendly
There are many ways in which you can make your Rom user friendly. Integrating useful apps. Prepping Eye candy themes, Important shortcuts etc.
Stay Motivated
This is the only driving force behind every Rom developer to continue doing their work with ease and success. Stay motivated and alert so that you can deliver the best with every release. Its hard sometimes but its it important.
Give Time to your Work
Most of the developers are either students or work some where and building Roms is some what like a hobby for us. Its correct that we are not supposed to spend all the time on building Roms but if we want to have a good working Rom we should manage considerable amount of time for few alternate days to work on this project.
Make it Different
You Rom characteristics should be some what different from what is already been provided by other developers. If its nothing different and Catchy then it’ll be hard to get users trying your Rom consistently. I still remember the days when i used to try alot of different Roms but still couldn’t find one that was nearly perfecting my needs. I tried alot of Roms that time.
Join Hands with another Developer
This is what i like the most. Join hands and team up with other developers and thus improve the efficiency and effectiveness of your Rom. The mind of two can bring together wonders. You can even team up with Developers of other devices and build a Rom for device that you personally do not own but you you widen your work area.
Don’t be ignorant
Make sure you are attentive and up to date with all what is discussed about your Rom, all bugs, all tests, reports, etc. so that you do not miss out on any bug possibly to be fixed for next release. If you ignore or avoid fixing the important bugs, the users will think that you are not really capable of solving them or not really interested in this Rom.
Get Testers
Testers are users who like to test the Rom and report you the bugs before you go public with the release. They are very helpful if you like to avoid the criticism after the release of the Rom as before itself you’ll be able to get rid of maximum number of Bugs and issues present in the Rom. That is where testers come in handy. Jus give a notice and many would love to try and test your Beta releases.
Keep Detailed Changelogs
Changelogs keep track of your developments over the time. They come in handy when ever you need to check for prolonged bugs. For example you may not notice it but if someone reports that he has been having an issue since your 3rd Rom release, then you can check out what all changes you made on that release and cross check whether one of those changes cause that bug.
Be Active on the Rom Page
This is the most important part of being interactive with the users cause there is alot that they want to be done in your Rom. Talk to them, answer their questions and discuss the pros and cons of the Roms with them. You can learn alot from them. Being active to the discussion will make them feel that you are eager to further develop and make this Rom improve further.
Add only Useful apps and Regularly Update them
Make sure the application you add to your Rom are useful by the people. Adding two Music Players in the Rom is not a good choice. Choose one that is best and use that only. But make sure you add one possibly best Application for all needs of the users. Keep track of all the applications that you have included in your Rom and make sure the latest versions are included. It keep the user feel updated with your Rom. Many times there are applications which are important to add but have some bug. Later these bugs are fixed in their next releases, so even you should add those updated fixed Applications. Use only Genuine Licenses and No Warez Applications. Warez is like a virus to the development of your Rom. Copyright issues and illegal use of cracked applications make pose a ban on you Roms by the Blogs and threads where you list them. Either you use development licenses to use the in your Roms or use an equally good free Application.
Good looking User Interface and Graphics
This is the major aspect that defines your Rom and makes it distinct from others. Work on that graphics that can be changed in your Rom, try different themes and skin enhancements in different aspects of os like dialer, lockscreen, fonts etc.
Keep Polls and ask Questions
Polls and asking questions from users is a very important way by which you can interact with users and get their feedback. Polls can be asking them about their preferences. Which applications they like or dislike, asking frequents questions on that changes you will be making in the Rom cause at the end of the day it is them who will be using them.
Learn from Competition
I don’t call the fellow developers a competition and usually many share their work and are supportive like i am to each other’s work. But you can learn from what is included in their Rom and if its catchy and important then you can add it to your Rom aswel. There might be many new and useful applications and features that other developers might be using and you are not even aware of that. It can be very helpful in evolving your Rom completely.
Listen and Learn from Users
Listening what a user has to say about their experiences on using your Rom is very important. They might have something very important to share from their experiences which you can incorporate in your Rom. It really helps in fixing bugs and improving your Rom further.
In the end you are the Decision Maker
Its you who has to take the decisions in the end. There will be many people wanting you to do this or that and add this or remove that but in the end you have to keep an unbiased judgment on all the requests, ideas and suggestions and bring forward the changes that you feel the masses are going to appreciate. And for that you will need to take care of all the above mentioned points in mind.
Give Credits
Not to forget that 70%-80% of your work is inspired from that of other developers. And it wonk charge you anything to be humbly give credit or some appreciation to the help you have got from other developers in terms of guides, tips, tricks, applications, UI Enhancements, etc. It just shows your character as a person as well.
What are Stock Roms and Custom Roms?
What is a Rom?
ROM – Read Only Memory is that memory which stores the system files of your Device. Those files which make up the basic Operating System, be is Windows Mobile Phone OS, Android, Symbian, Windows OS, etc. Every electronic device has a Read only Memory which stores the basic programming of the functions that the Electronic equipment is to perform. ROM in terms of our Android Devices the basic set of programming applications and files of functions which your device performs Out of the Box. Without a Rom no electronic device exists.
What are Stock ROMs?
Those ROMs which come pre installed are called Stock ROMs. Stock ROMs are the ones that come Box packed with your Device preinstalled. These are official Software that are provided by the Manufacturer or the OEM.
Is it possible to Edit/Customize/Alter Stock ROMs?
Yes it is. For a lot of Operating Systems be it Windows Mobile Phone OS, Android, Symbian, etc, it is possible to Customize these stock ROMs and install them to our devices.
What are Custom ROMs?
They are Custom ROMs are based on Stock ROMs but customized by the user in terms of additions in applications, improvements, removal of unnecessary application, etc. A customized ROM may be an minor improvement to Stock Rom or can even be a complete makeover of Stock Rom even changing the drivers of the Rom with that of other compatible devices providing better performance.
Why do we need Custom Rom?
Customization is making things personal. That is one main reason why we customize a Stock Rom. A stock Rom no matter what will have a lot of unnecessary applications, files, images, settings that are pre set by the Manufactures but are not at all important to us and uses a lot of space for no reason. No matter what there has to be one or the other Bug in a Stock Rom. To get rid of these issues we customize a stock ROM by either adding useful applications, settings, removed crap, fixing bugs and on getting a Top Notch easy to use and completely customized Device.
What about the warranty?
This is decision that you need to make personally. Yes, Custom ROMs will take away your precious warranty. But that to only if your device stops working while you are using Custom Rom on your device and you have to take it to the company. If you want you can revert back to Stock ROMs and then take your device to the Service Center and they won’t even know about it. But you need to consider reverting back to Original Stock Rom.
su
Also referred to as substitute user - a command for changing the account in the current terminal (usually black screen with blinking cursor). Default account is root account. So if you insert into terminal 'su' and hit enter, you will become root user.
root
Root alias superuser or poweruser is special user account for system administration. Similar to windows having its administrator account, unix-like systems have a root account. With this, you can do anything and if you run a command to delete the whole system, unix will just do it! No asking, no confirming. So, watch your steps!
rooting
Rooting is just enabling power of root for applications and other purposes.
Superuser app
After rooting is done, you will see a new app called superuser in app drawer. This app can delegate applications to use su (root) feature. When an app asks this from first use, a popup window will appear asking if the application should be allowed to use root permission.
sh, bash
is a command-line interpreter or shell that provides a traditional user interface for the Unix operating system and for Unix-like systems. So simply, it is some interface, which can execute command(s), which you have entered. Many shells exist, but in scope of android you can (as far as I know) use only sh (standard - Bourne-shell) or bash (compiled in BusyBox or separately on XDA). Both are basically same, but bash has much more features and it is more comfortable.
user/root shell
How do I know if I'm root or normal user? It's simple. Root's shell is ended with # (usually it's shell looks like "bash-3.2# _") and user's ends with $ (usually bash-3.2$ _). In terminal emulator you also can have only [path]($|#) (for root for example "/etc # _")
BusyBox
also called "The Swiss Army Knife of Embedded Linux" is a tool which brings into Android basic tools known from unix system, but is much more smaller than standard tools is. But this "packing" has limited functions in comparison to standard tools in unix-system (missing special modes of tool, color output and so on). Many application use this. For example busybox grep (filtering of text) is needed for application called Market enabler.
BusyBox commands
list of commands is really wide, so it's not possible explain all, so I pickup only top few. (hint: if you want what some command do, just search on google for "man <command_name>" for example man mv or enter command here
cd - change directory - same like in windows. You can switch directory. example: cd /sdcard
ls - list of files in actual directory (have few switches like for example: ls -l /sdcard/*.png (detailed listing)
cat - print file into standard output (like more in windows) Example: cat /sdcard/data.txt
vi - editing of file. But on limited phone keyboard (no keyboard) it is little harder Read more about vi
cp - copy of one or more file. Example: cp /sdcard/bike.jpg /sdcard/media/bike-wallpaper.jpg
mv - moving/rename files, Example: mv /sdcard/bike.jpg /sdcard/media/renamed-moved-bike.jpg
rm - delete file (rm -R for recursive, or for delete whole folder), Example: rm -R /sdcard/wallpaper-bad/*
find - search for files, Example find / -name "best-chopper-ever.avi"
mkdir - make directory - creates directory, Example: mkdir mynewdir
chmod - changes access of files
less - similar like cat, but you can scroll in it and it doesn't produce any output. Example: less /sdcard/funnytext.txt
For BusyBox's tool help, just enter BusyBox <command_name> -h.
ADB (shell)
ADB - Android Debug Bridge is a versatile tool that lets you manage the state of an emulator instance or Android-powered device. It is a client-server program that includes three components:
* A client, which runs on your development machine. You can invoke a client from a shell by issuing an adb command. Other Android tools such as the ADT plugin and DDMS also create adb clients.
* A server, which runs as a background process on your development machine. The server manages communication between the client and the adb daemon running on an emulator or device.
* A daemon, which runs as a background process on each emulator or device instance.
Generally, it can be compared with standard cmd prompt in windows (you can write commands which will be executed locally, for example in Terminal Emulator) or it can be just like SSH in unix-like system (you connect to terminal through adb client (in Android SDK) and commands will be run remotely.
Android SDK
Android software development kit is a complex set of tools for developing apps on Android. It includes a fully usable emulator of Android OS on your PC, where you can do everything. You can install/delete apps, browse web page in embedded web browser, play games or make your own application in Eclipse (widely used IDE for development). Of course, with emulator you can use also GPS or camera.
Android SDK tools
* Fully emulated Android device
* Android Development Tools Plugin (Eclipse IDE)
* Android Virtual Devices (AVDs)
* Hierarchy Viewer
* layoutopt
* Draw 9-patch
* Dalvik Debug Monitor Service (ddms)
* Android Debug Bridge (adb)
* Android Asset Packaging Tool (aapt)
* Android Interface Description Language (aidl)
* sqlite3
* Traceview
* mksdcard
* dx
* UI/Application Exerciser Monkey
* monkeyrunner
* Android
* zipalign
Tools for work with Android adb shell
You have two ways to connect into ADB service - locally and remotely.
Locally - for local access you will need some application which can connect to local adb shell.
Terminal Emulator (free) - probably most commonly used app from market, which works and looks like standard unix shell.
ConnectBot (free) - same as Terminal Emulator, but it can be also used for connecting via SSH or telnet
Remotely- For remote connection you need phone configuration adjustment:
Home desktop -> [menu button] -> Settings -> Applications -> Development -> USB debugging [ON].
Also you need connect your phone via USB (or finds on market some widget/app, witch enable using ADB also via wi-fi)
adb tool from Android SDK
After downloading Android SDK, extract the archive anywhere (in example I extracted it in c:/AndroidSDK). Then follow instructions on developer.android.com for installation of SDK Platform-tools (contains adb). After installation click on start menu and in Run... (in Windows7 in search bar) enter 'cmd' and press Ok or [enter]. Then write in cmd line:
Quote:
cd c:\AndroidSDK\android-sdk-windows\tools [enter]
now you can enter following command to connect to phone's adb shell if you don't have more connected device (virtual or real-one)
Quote:
adb shell
If you have more then one, you need explicitly say which one should be used for connection. So list connected devices with
Quote:
adb devices
which shows you serial number of connected devices. Than use
Quote:
adb -s <serial-number> shell
3. Custom recovery
* What is custom recovery
* Tools which custom recovery provide - NAND backup/restore, formatting of SDcard, partitioning (ext1,ext2, ext3), wiping, flashing of Custom ROM, ...
* Is it safe to install? - potential problems, backup/restore of original recovery
* How this whole thing works - installation description (not how-to install, just explanation of what is done during installation)
What is custom recovery
Recovery is an image (binary data) stored in internal memory. This image contains something like a "program" or "tool", which can boot-up independently from the Android system. This tool is part of phone system, and in PC terminology recovery can by compared to BIOS with some added features. This recovery state can be reached on all phones, but if you don't have a custom recovery, it will do a so-called HW reset and automatically restart itself into standard boot mode.
Tools which custom recovery provides
* USB-MS Toggle :mounts sdcard as mass storage
It just mounts your phone as USB-mass storage (USB disk) so you can access it through your PC
* Backup/Restore:
Absolutely GREAT feature. With NAND you can copy an image of your actual system (phone's memory). It means that you can backup the whole system with all configuration, customization, wallpapers, system's tweaks... just everything. This image will be written to your SD card which you are then free to copy around and back up on your computer
* Flash Zip From Sdcard
This tool is designed for installation of custom ROMs or tweaks. If you are instructed to install via custom recovery, then you should use this menu. Never unzip the file because it contains meta-information about itself with some validate-checks so if you edit it, or unpack and pack back, it won't work. And remember to place the file in the root (main folder) of your sdcard.
* Wipe Menu:
Wipe data/factory reset: wipes data & cache
- wipes user data (contacts, apps, configuration, ...) and cache (caches of applications)
Wipe cache
- wipes cache only
Wipe Dalvik cache : Wipes Dalvik cache in all possible locations if moved by apps2sd
- wipes Dalvik cache
Wipe SD:ext : Wipes Apps2sd ext partition
- if you used Partition SDcard option, you can wipe it here
Wipe Battery Stats (remember to fully charge your phone before doing this)
- If you think, that your battery life is too short, you can try delete battery stats. Than let phone fully charge. (more)
Wipe rotate settings
- wipe sensor settings (acceleration, ...)
Wipe .android secure : Wipes froyo native .android_secure on sdcard
- wipe information about moved apps
* Partition Sdcard:
Partition SD: Partitions sdcard for apps2sd (this formats card so all data will be lost)
- will create ext2 partition (you will be asked for size of ext2 and cache)
Repair Sd:ext
SD:ext2 to ext3 : converts apps2sd ext2 partition to ext3 (requires kernel support for ext3)
SD:ext3 to ext4 : same as above but ext3 to ext4 (requires kernel support for ext4)
ext2 - file system for the Linux kernel (no journal, fast but not recovery of I/O error)
ext3 - file system for the Linux kernel (journal, slower than ext2 because of journal, but provides recovery on I/O error)
ext4 - file system for the Linux kernel (journal, enhanced version of ext3)
* Mounts:
Gui automatically mounts folders
png-optimized -
png files takes less memory, are loads faster
JIT -
just-in-time compilation also known as dynamic translation, is a method to improve the runtime performance of computer programs, but it takes some time to convert into it on start.
HW:acceleration -
using of HW acceleration for rendering GUI. Increases battery consumption.
VM.Heap Size -
maximum memory an application can consume
stagefright -
In Android 2.2 new media framework that supports local file playback and HTTP progressive streaming
Deodex
Advantages or disadvantages
- Odexed ROMs are slightly faster, deodexed ROMs are slightly slower
+ You can make custom themes for your ROM
+ Performance los is negligible.
Requirements:
Download XUltimate
Busybox installed
Root
1. Connect phone to computer
2. Start xUltimate, we will now get the required files from our phone to deodex and zipalign it which we will describe in the 3rd step.
3. On the main menu of xUltimate, choose option 5 (Pull and deodex all). Everything will be done for you here. Don't worry. You will see all your finished files in the folders 'done_app' and 'done_frame' which are located in the installation directory of xUltimate.
4. move folders 'done_app' and 'done_frame' folders to your sdcard, you can find these folders in the directory of xUltimate as described in the previous step.
5. Make sure the sdcard is not mounted to pc anymore
6. Open Windows Command Prompt and type the following commands.
adb shell
su
stop
mount -o remount,rw /dev/block/stl12 /system
rm /system/app/*.odex
rm /system/framework/*.odex
busybox cp /sdcard/done_app/* /system/app/
busybox cp /sdcard/done_frame/* /system/framework/
chmod 644 /system/app/*
chmod 644 /system/framework/*
mount -o remount,ro /dev/block/stl12 /system
sync
reboot recovery
7. Now data and cache reset in the recovery menu...
8. reboot
If one of the commands, for example 'cp' is not found, try putting busybox in front of the command:
eg: busybox cp /sdcard/done_frame/* /system/framework/
--------------------------------------------------------------------------------------------------
[How To] Setup ADB for Windows/ Mac
For Windows
Want to set up ADB or Android Debugging Bridge on your PC, here is a quick guide for you. This tutorial does not need large download or full Android SDK installation. You will just have to download a small compressed file, which is all that you require.
STEP 1: First download this file called ADBUNZIPTOCDRIVE.zip, just click on the link, download will start automatically.
STEP 2: Now download PdaNet for driver installation. It comes with drivers from all major manufacturers, so this is all you need. Install PDAnet after downloading.
STEP 3: Now extract the zip file that we downloaded in the first step to C drive and name the extracted folder ADB.
STEP 4: Now we will go to the desktop and right click to make a new shortcut.
STEP 5: Point the shortcut to ADB folder that we created in step 3, and name the shortcut ADB or whatever you want.
STEP 6: Now right click on that shortcut and go to properties and change START IN field to c:\adb.
STEP 7: Click Apply or OK and you are done. Click on ADB shortcut on the desktop and you are good to go.
Here is list of ADB commands that might be useful for you in the future.
adb devices – list all connected devices
adb push <local> <remote> – copy file/dir to device
adb pull <remote> [<local>] – copy file/dir from device
adb sync [ <directory> ] – copy host->device only if changed
adb shell – run remote shell interactively
adb shell <command> – run remote shell command
adb emu <command> – run emulator console command
adb logcat [ <filter-spec> ] – View device log
adb forward <local> <remote> – forward socket connections forward specs are one of: tcp:<port>
localabstract:<unix domain socket name>
localreserved:<unix domain socket name>
localfilesystem:<unix domain socket name>
dev:<character device name>
jdwp:<process pid> (remote only)
adb jdwp – list PIDs of processes hosting a JDWP transport
adb install [-l] [-r] [-s] <file> – push this package file to the device and install it
adb uninstall [-k] <package> – remove this app package from the device (‘-k’ means keep the data and cache directories)
adb bugreport – return all information from the device
that should be included in a bug report.
adb help – show this help message
adb version – show version num
adb wait-for-device – block until device is online
adb start-server – ensure that there is a server running
adb kill-server – kill the server if it is running
adb get-state – prints: offline | bootloader | device
adb get-serialno – prints: <serial-number>
adb status-window – continuously print device status for a specified device
adb remount – remounts the /system partition on the device read-write
adb reboot [bootloader|recovery] – reboots the device, optionally into the bootloader or recovery program
adb reboot-bootloader – reboots the device into the bootloader
adb root – restarts the adbd daemon with root permissions
adb usb – restarts the adbd daemon listening on USB
adb tcpip <port> – restarts the adbd daemon listening on TCP on the specified port
:: build.prop tweaks ::
Experimental / Not Tested
##Date format
ro.com.android.dateformat=MM-dd-yyyy
ro.com.google.locationfeatures=1
ro.setupwizard.mode=DISABLED
keyguard.no_require_sim=true
ro.com.android.dataroaming=true
# Default network type.
ro.telephony.default_network=8
##8 => CDMA/EVDO/LTE auto mode preferred. (I don't know what should be the value for our Galaxy 3)
#proximit sensor disable touch distance
mot.proximity.distance=60
Working
##Makes phone boot rapidly fast
persist.sys.shutdown.mode=hibernate
##Force launcher into memory
ro.HOME_APP_ADJ=1
## Raise JPG quality to 100%
ro.media.enc.jpeg.quality=100
##VM Heapsize; 178MB RAM = 32 is better
dalvik.vm.heapsize=48m
##Render UI with GPU
debug.sf.hw=1
##Decrease dialing out delay
ro.telephony.call_ring.delay=0
##Helps scrolling responsiveness
windowsmgr.max_events_per_sec=150
##Save battery
wifi.supplicant_scan_interval=180
pm.sleep_mode=1
ro.ril.disable.power.collapse=0
##Disable debugging notify icon on statusbar
persist.adb.notify=0
##Increase overall touch responsiveness
debug.performance.tuning=1
video.accelerate.hw=1
##Raise photo and video recording quality (2.3 ROM only)
ro.media.dec.jpeg.memcap=8000000
ro.media.enc.hprof.vid.bps=8000000
# Photo and video recording quality tweak (2.2 Rom only)
ro.media.dec.jpeg.memcap=10000000
ro.media.enc.hprof.vid.bps=1000000
##Signal (3G) tweaks
ro.ril.hsxpa=2
ro.ril.gprsclass=12
ro.ril.hep=1
ro.ril.enable.dtm=1
ro.ril.hsdpa.category=10
ro.ril.enable.a53=1
ro.ril.enable.3g.prefix=1
ro.ril.htcmaskw1.bitmask=4294967295
ro.ril.htcmaskw1=14449
ro.ril.hsupa.category=6
ro.ril.def.agps.feature=1
ro.ril.enable.sdr=1
ro.ril.enable.gea3=1
ro.ril.enable.fd.plmn.prefix=23402,23410,23411
ro.ril.enable.a52=1
ro.ril.enable.a53=1
ro.ril.enable.dtm=1
##Net speed tweaks
net.tcp.buffersize.default=4096,87380,256960,4096,16384,256960
net.tcp.buffersize.wifi=4096,87380,256960,4096,16384,256960
net.tcp.buffersize.umts=4096,87380,256960,4096,16384,256960
net.tcp.buffersize.gprs=4096,87380,256960,4096,16384,256960
net.tcp.buffersize.edge=4096,87380,256960,4096,16384,256960
##Disable blackscreen issue after a call
ro.lge.proximity.delay=25
mot.proximity.delay=25
##Fix some application issues
ro.kernel.android.checkjni=0
##Phone will not wake up from hitting the volume rocker
ro.config.hwfeature_wakeupkey=0
##Force button lights on when screen is on
ro.mot.buttonlight.timeout=0
##Disable boot animation for faster boot
debug.sf.nobootanimation=1
# Enable Stagefright helps stream Video and Music Faster
media.stagefright.enable-player=true
media.stagefright.enable-meta=true
media.stagefright.enable-scan=true
media.stagefright.enable-http=true
# Enable display Dithering
persist.sys.use_dithering=1
# Enable purgeable assets
persist.sys.purgeable_assets=1
# For SD storage insert notification sound
persist.service.mount.playsnd=0
##Miscellaneous flags
ro.config.hw_menu_unlockscreen=false
persist.sys.use_dithering=0
persist.sys.purgeable_assets=1
dalvik.vm.dexopt-flags=m=y
ro.mot.eri.losalert.delay=1000
Click to expand...
Click to collapse
init.d scripts
(needs ROM with init.d access and busybox, open empty file, insert header #!/system/bin/sh and put these there, save in /system/etc/init.d and name it something like 77tweaks)
Code:
##internet speed tweaks
echo "0" > /proc/sys/net/ipv4/tcp_timestamps;
echo "1" > /proc/sys/net/ipv4/tcp_tw_reuse;
echo "1" > /proc/sys/net/ipv4/tcp_sack;
echo "1" > /proc/sys/net/ipv4/tcp_tw_recycle;
echo "1" > /proc/sys/net/ipv4/tcp_window_scaling;
echo "5" > /proc/sys/net/ipv4/tcp_keepalive_probes;
echo "30" > /proc/sys/net/ipv4/tcp_keepalive_intvl;
echo "30" > /proc/sys/net/ipv4/tcp_fin_timeout;
echo "404480" > /proc/sys/net/core/wmem_max;
echo "404480" > /proc/sys/net/core/rmem_max;
echo "256960" > /proc/sys/net/core/rmem_default;
echo "256960" > /proc/sys/net/core/wmem_default;
echo "4096,16384,404480" > /proc/sys/net/ipv4/tcp_wmem;
echo "4096,87380,404480" > /proc/sys/net/ipv4/tcp_rmem;
##vm management tweaks
echo "4096" > /proc/sys/vm/min_free_kbytes
echo "0" > /proc/sys/vm/oom_kill_allocating_task;
echo "0" > /proc/sys/vm/panic_on_oom;
echo "0" > /proc/sys/vm/laptop_mode;
echo "0" > /proc/sys/vm/swappiness
echo "50" > /proc/sys/vm/vfs_cache_pressure
echo "90" > /proc/sys/vm/dirty_ratio
echo "70" > /proc/sys/vm/dirty_background_ratio
##misc kernel tweaks
echo "8" > /proc/sys/vm/page-cluster;
echo "64000" > /proc/sys/kernel/msgmni;
echo "64000" > /proc/sys/kernel/msgmax;
echo "10" > /proc/sys/fs/lease-break-time;
echo "500,512000,64,2048" > /proc/sys/kernel/sem;
##battery tweaks
echo "500" > /proc/sys/vm/dirty_expire_centisecs
echo "1000" > /proc/sys/vm/dirty_writeback_centisecs
##EXT4 tweaks (greatly increase I/O)
(needs /system, /cache, /data partitions formatted to EXT4)
tune2fs -o journal_data_writeback /block/path/to/system
tune2fs -O ^has_journal /block/path/to/system
tune2fs -o journal_data_writeback /block/path/to/cache
tune2fs -O ^has_journal /block/path/to/cache
tune2fs -o journal_data_writeback /block/path/to/data
tune2fs -O ^has_journal /block/path/to/data
##perfect mount options
busybox mount -o remount,noatime,noauto_da_alloc,nosuid,nodev,nodiratime,barrier=0,nobh /system
busybox mount -o remount,noatime,noauto_da_alloc,nosuid,nodev,nodiratime,barrier=0,nobh /data
busybox mount -o remount,noatime,noauto_da_alloc,nosuid,nodev,nodiratime,barrier=0,nobh /cache
##Flags blocks as non-rotational and increases cache size
LOOP=`ls -d /sys/block/loop*`;
RAM=`ls -d /sys/block/ram*`;
MMC=`ls -d /sys/block/mmc*`;
for j in $LOOP $RAM
do
echo "0" > $j/queue/rotational;
echo "2048" > $j/queue/read_ahead_kb;
done
##microSD card speed tweak
echo "2048" > /sys/devices/virtual/bdi/179:0/read_ahead_kb;
##Defrags database files
for i in \
`find /data -iname "*.db"`
do \
sqlite3 $i 'VACUUM;';
done
##Remove logger
rm /dev/log/main
##Ondemand governor tweaks
SAMPLING_RATE=$(busybox expr `cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_transition_latency` \* 750 / 1000)
echo 95 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
echo $SAMPLING_RATE > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate
##Auto change governor and I/O Scheduler
a) I/O Scheduler (Best: MTD devices - VR; EMMC devices - SIO) - needs kernel with these
echo "vr" > /sys/block/mmcblk0/queue/scheduler
or
echo "sio" > /sys/block/mmcblk0/queue/scheduler
b) Governor (Best: Minmax > SavagedZen > Smoothass > Smartass > Interactive) - needs kernel with these
echo "governor-name-here" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
##Block Ads with Hosts regularly updated in Sekhy ROM
Patch your hosts file for blocking Ads
(please think before doing this; many developers are supported through this way)
You can use AdFree application for this or changing manually your hosts file.
Here are some databases:
http://www.mvps.org/winhelp2002/hosts.txt
http://pgl.yoyo.org/adservers/serverlist.php?showintro=0;hostformat=hosts
##Use Google's dns servers
Create an empty file, name it resolv.conf and put there these 2 lines:
nameserver 8.8.8.8
nameserver 8.8.4.4
Save to /system/etc/.
Update Superuser and su binary to latest version
http://goo-inside.me/superuser/
I think many of you were familiar with QTADB. It is easy to manage your phone with it. But geeks who are interested doing the stuff in different ways try some of these:
Go to command command prompt where your ADB installed. (assuming you are familiar installing adb before doing these)
To install ADB download these and extract to any of the desired drive. Say D:\ or E:\ etc.
code to delete unwanted apps:
adb shell
su
mount -o remount,rw /dev/block/stl9 /system
rm /system/app/nameofapk.apk
Click to expand...
Click to collapse
code to add apps and stuff:
adb shell
su
mount -o remount,rw /dev/block/stl9 /system
exit
exit
adb push nameofapk.apk /system/app/
Click to expand...
Click to collapse
Tips & Tricks
Taking Screenshots
Taking screenshots on Android devices is a pain, but on the Galaxy S2, you can simply hold down the home button and then briefly press the power key to take a screenshot. You can then see your screenshots in the Gallery.
Adjusting Brightness with Notification Bar
The notification bar can serve as a brightness scroll on the Galaxy S 2, if you are not using the automatic brightness option. Just hit the notification bar, hold for a second and swipe left to decrese and right to increase the brightness.
Browser Text Wrapping
Out of the box the Galaxy S2 doesn’t automatically reflow the text in the webpage if you zoom in. But if you just goto settings and check the ‘auto-fit pages’ option, all is well again.
Changing User Agent
The SGS2 browser lets you change the user-agent without needing an extra app, just type ‘about:useragent’ in browser's location bar and you can choose between the iPhone, Nexus One, Desktop, Galaxy S or even enter a custom string.
Test Mode
Dialing *#0*# in the dialer enters the LCD test mode, useful if you are looking for for dead pixels, debugging sensors and other hardware parts of your SGS2.
Search Key
Although SGS2 like the SGS doesn’t have a dedicated search key that all other Android devices have, but if you long press menu, it launch the search screen, anywhere you'd need it.
Video Screen Lock
Pressing the power button while video player is playing locks the screen, now you can hold the device any way you like, no more accidental presses will happen. To unlock, just press the power button again.
Customizing App Launcher Bar
If you would like to change applications shortcuts in bottom application launcher bar, press the Applications button, then Menu -> Edit. You can then rearrange those shortcuts or replace them with other applications or remove them completely. There's limita of maximum 3 shortcuts and the Home button will always be there.
Changing USB to File Transfer Mode
When you connect USB cable, SGS2 mounts it's file system read-only and transfering files between PC and handset is possible with Kies only. To change this behavior to normal read-write USB file transfer mode, go to Settings -> Applications -> Development and enable USB debugging.
User interface
Scrolling:
- Use two fingers to scroll until fingers are released.
- Use three fingers to scroll fast until top/bottom.
Phone wake up: Via home or power.
Hold menu: Quick access Android search.
Dobule click home: Quick access voice commands.
Screenshot: Press home and power simultaneously. Screenshots are saved in /sdcard/ScreenCapture/
Home screen
Multiple home screens: Touch the dots to switch directly to a screen or hold and drag left/right to scroll very fast.
Changing shortcuts at the bottom: Click „Applications“ (bottom right), then menu, click „Edit“: Now change the three (left) icons via drag & drop. Afterwards click menu and choose „Save..“.
Quick brightness change: Hold the notification bar (on the top) and drag left/right to modify brightness (if not set to auto).
Pinch home screen to view all home screens and add/delete them.
Pinch application screen to view all application screens and reoder them.
Set background image for lock screen: When changing your desktop background image, there are two buttons, choose the right one (smaller area) and save. Now you‘ll be asked to use this image for the lockscreen too.
Android Apps
E-Mail: Pinch in the overview list to fold/unfold by date.
E-Mail: Click longer on a date (either the sent date or a date in the email text): Create a new calendar event for this date.
Contacts: Drag left over a contact to send SMS, drag right to call
Keypad: Use the letters on number keys to type a name, the triangle on the right shows how many matching contacts are found, clicking on it reveals them.
Camera: Change shortcut buttons by clicking menu, “Edit”, then modify shortcut buttons via drag&drop.
Camera: Pinch to zoom in/out.
Browser: Pinch to view all tabs/windows.
Browser: Go to “about:debug” via address bar. Now you have additional options when pressing the menu (at the bottom)
Browser: Go to “about:useragent” via address bar. Now you can modify the user agent string.
Video player: Drag left/right to Fast forward/Rewind
Video player: Power locks/unlocks the screen
Calendar: Pinch in month view to get an overview, swipe left/right to change the year.
Easter egg from Google: Go to preferences, about phone, click some times on “Android Version” (try multiple times)
[DIY] Do it yourself guides:
Reset Galaxy S II
Warning: All your data including contacts, messages will be lost!
Hard Reset:
Press and Hold Volume Up + Home button.
Keep pressing these two and press Power button for 2-3 seconds.
Release only power button. But keep pressing Volume UP + Home buttons.
Now, with Volume down, select wipe data/facotory reset (3rd)
Press Power
Useful Codes:
*#0*# LCD Screen test
*#06# Show IMEI Number
*#2222# HW Version
*#1234# Phone info
*#34971539# Camera Firmware
*#9900# Sysdump (Logfiles etc.)
*#0228# Battery diagnostics
*#7284# Phone utility
*#7353# Function testing
*#9090# Service Mode
*#*#197328640#*#* Service Mode Menu
*2767*3855# Factory Reset
Complete Codes Collections for SGS II and should work with other Samsung droids many of them.
Warning: Please use with caution
1 #*#8377466# S/W Version & H/W Version.
2 #*0227# GPRS Switch.
3 #*0277# GPRS Switch.
4 #*2027# GPRS Switch.
5 #*2077# GPRS Switch.
6 #*2252# Current CAL.
7 #*2255# Call Failed.
8 #*2256# Calibration info? (For CMD set DEBUGAUTONOMY in cihard.opt)
9 #*22671# AMR REC START.
10 #*22672# Stop AMR REC. (File name: /a/multimedia/ sounds/voice list/ENGMODE.amr)
11 #*22673# Pause REC.
12 #*22674# Resume REC.
13 #*22675# AMR Playback.
14 #*22676# AMR Stop Play.
15 #*22677# Pause Play.
16 #*22678# Resume Play.
17 #*22679# AMR Get Time.
18 #*2286# Databattery.
19 #*2337# Permanent Registration Beep.
20 #*2351# Blinks 1347E201 in RED.
21 #*2474# Charging Duration.
22 #*2527# GPRS switching set to (Class 4, 8, 9, 10)
23 #*2558# Time ON.
24 #*2562# Restarts Phone.
25 #*2565# No Blocking? General Defense.
26 #*2677# Same as 4700.
27 #*2679# Copycat feature Activa/ Deactivate.
28 #*2775# Switch to 2 inner speaker.
29 #*2787# CRTP ON/OFF.
30 #*2834# Audio Path. (Handsfree)
31 #*2836# AVDDSS Management Activate/ Deactivate.
32 #*2886# AutoAnswer ON/OFF.
33 #*3270# DCS Support Activate/ Deactivate.
34 #*3273# EGPRS multislot. (Class 4, 8, 9, 10)
35 #*3282# Data Activate/Deactivate.
36 #*3353# General Defense, Code Erased.
37 #*3370# Same as 4700.
38 #*3476# EGSM Activate/Deactivate .
39 #*3676# FORMAT FLASH VOLUME!!!
40 #*3725# B4 last off.
41 #*3728# Time 2 Decod.
42 #*3737# L1 AFC.
43 #*3757# DSL UART speed set to. (LOW, HIGH)
44 #*3837# Phone Hangs on White screen.
45 #*3838# Blinks 3D030300 in RED.
46 #*3838# Blinks 3D030300 in RED.
47 #*3849# Restarts Phone.
48 #*3851# Restarts Phone.
49 #*3876# Restarts Phone.
50 #*3877# Dump of SPY trace.
51 #*3888# BLUETOOTH Test mode.
52 #*3940# External looptest 9600 bps.
53 #*3941# External looptest 115200 bps
54 #*4263# Handsfree mode Activate/ Deactivate.
55 #*4472# Hysteresis of serving cell: 3 dB
56 #*4700# Please use function 2637.
57 #*4760# GSM Activate/Deactivate.
58 #*4773# Incremental Redundancy.
59 #*4864# White Screen.
60 #*5133# L1 HO Data.
61 #*5171# L1P1.
62 #*5172# L1P2.
63 #*5173# L1P3.
64 #*5176# L1 Sleep.
65 #*5187# L1C2 G trace Activate/ Deactivate.
66 #*5376# DELETE ALL SMS!!!!.
67 #*5737425# JAVA Mode.
68 #*6833# New uplink establishment Activate/Deactivate .
69 #*6837# Official Software Version: (0003000016000702)
70 #*7200# Tone Generator Mute.
71 #*7222# Operation Typ: (Class C GSM)
72 #*7224# !!! ERROR !!!
73 #*7252# Operation Typ: (Class B GPRS)
74 #*7271# CMD: (Not Available)
75 #*7274# CMD: (Not Available)
76 #*7284# L1 HO Data.
77 #*7287# GPRS Attached.
78 #*7288# GPRS Detached/Attached .
79 #*7326# Accessory.
80 #*7337# Restarts Phone. (Resets Wap Settings)
81 #*7352# BVMC Reg value (LOW_SWTOFF, NOMINAL_SWTOFF)
82 #*7372# Resetting the time to DPB variables.
83 #*7462# SIM Phase.
84 #*7524# KCGPRS: (FF FF FF FF FF FF FF FF 07)
85 #*7562# LOCI GPRS: (FF FF FF FF FF FF FF FF FF FF FF FE FF 01)
86 #*7666# White Screen.
87 #*7683# Sleep variable.
88 #*7693# Sleep Deactivate/Activate .
89 #*7722# RLC bitmap compression Activate/Deactivate .
90 #*77261# PCM Rec Req.
91 #*77262# Stop PCM Rec.
92 #*77263# PCM Playback.
93 #*77264# PCM Stop Play.
94 #*7728# RSAV.
95 #*7732# Packet flow context bit Activate/Deactivate .
96 #*7752# 8 PSK uplink capability bit.
97 #*7785# Reset wakeup & RTK timer cariables/variables.
98 #*7828# Task screen.
99 #*7878# FirstStartup. (0 NO, 1 YES)
100 #*7983# Voltage/Freq.
101 #*7986# Voltage.
102 #*8370# Tfs4.0 Test 0.
103 #*8371# Tfs4.0 Test 1.
104 #*8372# Tfs4.0 Test 2.
105 #*8373# Tfs4.0 Test 3.
106 #*8374# Tfs4.0 Test 4.
107 #*8375# Tfs4.0 Test 5.
108 #*8376# Tfs4.0 Test 6.
109 #*8377# Tfs4.0 Test 7.
110 #*8378# Tfs4.0 Test 8.
111 #*8379# Tfs4.0 Test 9.
112 #*8465# Time in L1.
113 #*8466# Old Time.
114 #*8724# Switches USBACM to Generator mode.
115 #*8725# Switches USBACM to Loop-back mode.
116 #*8726# Switches USBACM to Normal.
117 #*8727# Switches USBACM to Slink mode.
118 #*9270# Force WBS.
119 #7263867# RAM Dump. (On or Off)
120 *#*#4636#*#* Access Phone/Battery/Usage Stat/WiFi Info
121 *#0*# Access Sensor/LCD Screen Test/ Vibration/ Camera/ Speaker etc test
122 *#0011# ServiceMode/Debug /Basic
123 *#06# IMEI Number.
124 *#1234# Firmware Version.
125 *#2222# H/W Version.
126 *#2255# Call List.
127 *#232337# Bluetooth MAC Adress.
128 *#4777*8665# GPSR Tool.
129 *#5282837# Java Version.
130 *#8999*327# EEP Menu.
131 *#8999*364# Watchdog ON/OFF.
132 *#8999*377# Error Menu.
133 *#8999*427# WATCHDOG signal route setup.
134 *#8999*523# LCD Brightness.
135 *#8999*667# Debug Mode.
136 *#8999*8376263# All Versions Together.
137 *#8999*8378# Test Menu.
138 *#92782# PhoneModel. (Wap)
139 *2767*226372# E2P Camera Reset. (deletes photos)
140 *2767*2878# E2P Custom Reset.
141 *2767*3855# E2P Full Reset.
142 *2767*688# Reset Mobile TV.
143 *2767*927# E2P Wap Reset.
Useful Links
-Debrand & Rebrand back to O2 for Samsung Galaxy S2
-Permanently Fix SGS2 Echo and Digital Noise Reduction/Cancellation Problems
-Back up your data before moving to a new rom
-Recover your IMEI in 9 steps.
-Battery Saving Tips Collection
Mods:
-add customizable 14 statusbar toggle buttons for samsung ROM
-Long press volume buttons to skip songs.
-Manually Deodex and Odex back
-Learn to make your own 'eye-candy' mods [Easy Steps]
Tools:
-EFS Pro v1.2.6 - Advanced '/efs' Backup and Restore!
Patches:
-Add native android SIP stack for Wifi AND 3G calls
-Extended Power Menu with no header (reboot / download / recovery)
Speechless lol. Well done though.
looks like an iphone but powered by android baby!!!!
This should be a sticky thread
androidkid311 said:
Speechless lol. Well done though.
looks like an iphone but powered by android baby!!!!
Click to expand...
Click to collapse
Thanks for feedback. Can you explain what iphone thing you have mentioned?
anshmiester78900 said:
This should be a sticky thread
Click to expand...
Click to collapse
Thanks feedback like these will encourage me to do more.
Bloody hell. Made good reading while I was having a dump.: D I say sticky time. I mean sticky thread
Sent from my ICS blood mode S2
sekhargreen said:
Thanks for feedback. Can you explain what iphone thing you have mentioned?
Click to expand...
Click to collapse
Think that is his signature.
Nice posts! But you STILL didn't explain how to make the godamn ROM. All I saw was how ROM makers should be bla bla. I didn't see anywhere how to make the godamn .zip file.
That is awesome. Please continue.
Such efforts must be awarded.
Nice one mate!
This was really a good read
nice ****load of tweaks, but they are useless if you dont define and explain what each of them do.
good work though, keep it up!
even the real bible don't have this much reservations in this forum ...
and waiting for it...
Awesome thread mate... defo sticky material!
Fantastic post
This should be a sticky thread. Helped me with a lot of those... Thank you
Thank you for for this great and nice job/sharing, it's good to know even more about the stuffs that what we are dealing with..!
Best regards!
Fail to understand what is the point of this thread. Lots of preaching and shallow stuff. Sorry.

[I9001] [SCRIPT] Zram script for arco's ICS build

Hello everybody,
I thought that ICS was a little bit slow on my SGS+ so I tried to tweak it.
This is when I came across the option compcache in the settings -> performance menu.
Only I found this option isn't w orking yet in arco's alpha 3 build, or isn't working anymore.
Either way I found out that zram0 is present on the device, so I created a little script with which you can set-up Zram.
Just put it somewhere you can browse to with Terminal Emulator.
Also make sure it's permissions are set to rwx-r-x-r-x.
After you set the permissions right, just execute with: ./zram start
Or if you want to stop the swapping again just give in ./zram stop
This is the code for the script:
#!/system/bin/sh
#
# Zram manager
# koudumrulez{at}gmail.com (PsychoGame)
case "$1" in
start)
echo 3 > /proc/sys/vm/drop_caches
echo 30 > /proc/sys/vm/swappiness
# get the amount of memory in the machine
mem_total_kb=$(grep MemTotal /proc/meminfo | grep -E -o '[[:digit:]]+')
mem_total=$((0,25 * mem_total_kb * 1024))
# initialize the devices
echo $((mem_total)) > /sys/block/zram0/disksize
# Creating swap filesystem
mkswap /dev/block/zram0
# Switch the swap on
swapon /dev/block/zram0
;;
stop)
# Switching off swap
swapoff /dev/block/zram0
;;
*)
echo "Usage: $0 {start|stop}"
esac
exit 0
You can just call the file zram, and then copy it on you're device for example you're SD.
I only used this script on ALPHA3 build. Maybe it works on others as well, but that's at you're own responsibility.
Greetings Psycho Game
Here I'am again.
There's been a little error from my side.
If you put this file on you're SD-Card you can't set the permissions right.
What I did was putting the file in /system/bin, so the full path would be /system/bin/zram.
I did this with ES File Manager, but you're free to use whatever file manager you like.
After this make sure the permissions are set to rwx-r-x-r-x in the file manager, or in the terminal you can do a "chmod 755 /system/bin/zram" without quotes.
The zram is now useable through executing the command: "/system/bin/zram start or stop".
You can also choose to mount the zram automatically with booting.
In this case you have to make a file called userinit.sh in the folder "/data/local/"
This file needs the following content:
#!/system/bin/sh
/system/bin/zram start
I also set the permissions of this file to 755 with "chmod 755 /data/local/userinit.sh" but I'm not sure if this is neccesary. Anyway it works.
Hopefully somebody can use this script as well. If you do, please leave a comment. Also if you have questions feel free to ask. I will keep an eye on this post.
And the question if this will work on Alpha 4, yes it does.
Greetings,
Psycho Game
Hi Psycho,
thanks for your effort.
I also saw that zRam is indeed not working on the latest Alpha 6 (i use the Galxy W / i8150 Build).
I had a look at your script and some other sources and enabled zRam on my deivce for testing purposes.
My conclucsion so far is, that there seems so be some major problem of interference with an other memory management policy.
Independent from the Size and Swapiness configuration - there is something going wrong hier i think
I watched the systems memory stats through proc/meminfo and free. Once the system is out of fresh memory, it begins swapping. zRam swap then getfs filled up quickly. Now the system gets extremely slow, i also had two restarts (likely in cause of some kernel panics from acute memory problems).
Will be difficult to track down the problem, my guessings so far:
- Interference with LMK, as it only indirectly knows about zRam
- Some kind of io block size might have been set to a bad value for the zram device
- CPU-load through compression simply much to high (unlikely, but have not checked it yet)
.. and plenty other possibilites
ATM, its definitely only a huge decrease in performance for me. What was your experience?
From the technical specs, i guess zRam should behave much better, so i really guess theres going something wrong.
Guess i found a possible reason for the bad performance.
I will write more details when i have the time to.
Just tried the above script on CM9 (build 0814) for Galaxy Exhibit 4G (a sister phone of Galaxy W as I understand it). I ran the script in the Terminal. Initially the performance became very bad after a period of time (especially after opened many apps). It almost looked like zRam made it worse once it got used for some storage amount. However, after I changed mem_total_kb from MemTotal to MemFree, and removed 0,15 for mem_total, the horrible slow down seemed to disappeared (even after I opened 5 apps at the same time).
any further refinements of this script?

[H812][UsU][v29a]Ultimate custom settings/tweaks mega-post

This is for the H812 only, however I am sure much can be used on any device. I decided to make one post of all my settings instead of individual posts in different threads as a way to avoid off topic etc. This is a wip and I will update as required.
*** Use anything I say at your own risk, I will not be held responsible for bricking or otherwise screwing up your device in any way. No whining about this doesn't work or that it doesn't make any sense etc I say again USE AT YOUR OWN RISK ***
Ok so first thing is to backup then backup and copy backup to multiple locations, backup again (lol)!!!
Backup then Unlock with UsU (SALT) by @steadfasterX here: https://forum.xda-developers.com/g4/general/unlock-unlock-lg-g4-device-usu-t3760451 Make sure to install TWRP and make backups.
Figure it out yourself by reading the OP several times and post as necessary in that thread.
Install the Nougat v29a mentioned in the above thread under FAQ #16.
Install Titan kernel (H811 stock Nougat) by @kessaras here: https://forum.xda-developers.com/g4/development/g4-t3667878
I use 1.7 with the following settings:
EDIT:I have since changed these settings although the following is still good.
Big cores at 1632 max 384 min.
Little cores at 1440 max 384 min
CPU gov intelliactive for both.
Disable CPU boost.
GPU using cpufreq gov.
FIOPS for both internal and external set to 1024kb.
Low memory killer set to light.
Misc settings, enable fsync with Westwood TCP.
Install Magisk with Dolby Atmos (LeEco Le Pro3), Enable Doze for GMS (huge savings for battery) and Unified Hosts Adblock modules.
NOTE: I use Adaway beta 4.09 now instead of unified hosts module. Google framework module for Google apps like Phone. Single user mod and force fast charge are also good!
For now that should be enough to get a bunch of users messed up, I have other tweaks like bloat removal, useful apps etc to add later if people want them.
Feel free to post questions about the above for further explanation/clearification.
Do not ask for help fixing things you break, that's what backups are for!
Cheers!
Edit: Great post for H812 consider thanking that user
https://forum.xda-developers.com/g4/general/unlock-unlock-lg-g4-device-usu-t3760451/page110
List of useful apps that I use:
Kernel Adiutor
https://play.google.com/store/apps/details?id=com.grarak.kerneladiutor
Magisk
https://forum.xda-developers.com/apps/magisk/beta-magisk-v13-0-0980cb6-t3618589/page577
Build prop editor
https://play.google.com/store/apps/details?id=com.jrummy.apps.build.prop.editor
BusyBox
https://play.google.com/store/apps/details?id=ru.meefik.busybox
Catlog
https://play.google.com/store/apps/details?id=com.nolanlawson.logcat
Devcheck
https://play.google.com/store/apps/details?id=flar2.devcheck
ES File Explorer
https://play.google.com/store/apps/details?id=com.estrongs.android.pop.pro
Official TWRP
https://play.google.com/store/apps/details?id=me.twrp.twrpapp
Quick Reboot
https://play.google.com/store/apps/details?id=com.antaresone.quickrebootpro
Titanium Backup
https://play.google.com/store/apps/details?id=com.keramidas.TitaniumBackup
Wifi analyzer
https://play.google.com/store/apps/details?id=info.wifianalyzer.pro
Build.prop edits that may help;
ro.build.fingerprint
lge/p1_rgs_ca/p1:6.0/MRA58K/1619418088183:user/release-keys
(Passes safety net check for me, use the entry from your original MM built.prop)
ro.product.model
LG-H812
(Helps apps show correct model)
ro.gps.agps_provider
1
(From original build.prop)
ro.ril.def.preferred.network
9
ro.telephony.default_network
9
telephony.lteOnCdmaDevice
1
telephony.lteOnGsmDevice
1
(Networking to use LTE 4g etc)
ro.factorytest
0
(Removes an error in log)
*** I soft bricked my device changing too many entries in build.prop so be cautious.
Here's a list of all the apps I have frozen in Titanium Backup.
com.android.cellbroadcastreceiver
com.android.LGSetupWizard
com.google.android.apps.books
com.google.android.apps.docs.editors.sheets
com.google.android.apps.docs.editors.slides
com.google.android.apps.magazines
com.google.android.play.games
com.google.android.talk
com.google.android.videos
com.google.android.webview
com.lge.appbox.client
com.lge.bnr
com.lge.bnr.launcher
com.lge.cloudhub
com.lge.concierge
com.lge.easyhome
com.lge.email
com.lge.exchange
com.lge.fmradio
com.lge.gcuv
com.lge.gestureanswering
com.lge.homeselector
com.lge.ia.task.smartsetting
com.lge.iftttmanager
com.lge.launcher2
com.lge.lgaccount
com.lge.lgdmsclient
com.lge.lgmapui
com.lge.mtalk.sf
com.lge.myplace
com.lge.myplace.engine
com.lge.qvoiceplus
com.lge.remote.setting
com.lge.sizechangable.favoritecontacts
com.lge.sizechangable.weather.platform
com.lge.sizechangable.weather.theme.optimus
com.lge.smartcover
com.lge.smartsharepush
com.lge.sync
com.lge.updatecenter
com.lge.wernicke
com.lge.wernicke.nlp
com.maluuba.android.qvoice
com.rsupport.rs.activity.lge
com.sika524.android.quickshortcut
com.ti.server
One of the easiest and most effective ways to increase the perceived speed and snappiness of your device!
Developer Options > Drawing
Window animation scale [Off or .5]
Transition animation scale [Off or .5]
Animator duration scale [1x]
Here are the settings I use for the stock Titan kernel (1.7 I been having issues with 1.8) including Kernel Adiutor profile:
Code:
version 1
profile
commands
path /sys/module/msm_performance/parameters/cpu_max_freq4
command echo '4:1440000' > /sys/module/msm_performance/parameters/cpu_max_freq
path /sys/module/msm_performance/parameters/cpu_max_freq5
command echo '5:1440000' > /sys/module/msm_performance/parameters/cpu_max_freq
path /sys/devices/system/cpu/cpu%d/cpufreq/scaling_max_freq4
command #{"path":"\/sys\/devices\/system\/cpu\/cpu%d\/cpufreq\/scaling_max_freq","value":"1440000","min":4,"max":5,"bigCpus":[4,5],"LITTLECpus":[0,1,2,3],"corectlmin":2}
path /sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor0
command #{"path":"\/sys\/devices\/system\/cpu\/cpu%d\/cpufreq\/scaling_governor","value":"intelliactive","min":0,"max":3,"bigCpus":[4,5],"LITTLECpus":[0,1,2,3],"corectlmin":2}
path /sys/module/cpu_boost/parameters/input_boost_enabled
command echo '0' > /sys/module/cpu_boost/parameters/input_boost_enabled
path /sys/module/cpu_boost/parameters/boost_ms
command echo '0' > /sys/module/cpu_boost/parameters/boost_ms
path /sys/module/cpu_boost/parameters/input_boost_freq0
command echo '0:0' > /sys/module/cpu_boost/parameters/input_boost_freq
path /sys/module/cpu_boost/parameters/input_boost_freq4
command echo '4:0' > /sys/module/cpu_boost/parameters/input_boost_freq
path /sys/class/kgsl/kgsl-3d0/devfreq/governor
command echo 'cpufreq' > /sys/class/kgsl/kgsl-3d0/devfreq/governor
path /sys/block/mmcblk0/queue/scheduler
command echo 'fiops' > /sys/block/mmcblk0/queue/scheduler
path /sys/block/mmcblk0/queue/read_ahead_kb
command echo '1024' > /sys/block/mmcblk0/queue/read_ahead_kb
path /sys/block/mmcblk0/queue/iostats
command echo '0' > /sys/block/mmcblk0/queue/iostats
path /sys/block/mmcblk1/queue/scheduler
command echo 'deadline' > /sys/block/mmcblk1/queue/scheduler
path /sys/block/mmcblk1/queue/read_ahead_kb
command echo '2048' > /sys/block/mmcblk1/queue/read_ahead_kb
path /sys/block/mmcblk1/queue/iostats
command echo '0' > /sys/block/mmcblk1/queue/iostats
path /sys/module/lowmemorykiller/parameters/minfreechmod
command chmod 666 /sys/module/lowmemorykiller/parameters/minfree
path /sys/module/lowmemorykiller/parameters/minfreechown
command chown root /sys/module/lowmemorykiller/parameters/minfree
path /sys/module/lowmemorykiller/parameters/minfree
command echo '21780,29040,36300,43560,50820,65340' > /sys/module/lowmemorykiller/parameters/minfree
path /proc/sys/vm/swappiness
command echo '60' > /proc/sys/vm/swappiness
path /sys/module/msm_thermal/parameters/enabled
command echo 'N' > /sys/module/msm_thermal/parameters/enabled
path /sys/module/msm_thermal/core_control/enabled
command echo '1' > /sys/module/msm_thermal/core_control/enabled
path /sys/module/cpu_boost/parameters/input_boost_ms
command echo '0' > /sys/module/cpu_boost/parameters/input_boost_ms
Have fun!
EDIT: Added a Kernel Adiutor profile json zipped file as per suggestion.
https://drive.google.com/file/d/1mOdzGOI0f25NEQJLCS81nwqa-FCBq1sX/view?usp=drivesdk
Latest profile I am using with excellent results:
https://drive.google.com/file/d/13JFYnbjc7zxZed2Pgsp0KtdyiyOMICCO/view?usp=drivesdk
Turn off dt2w and pocket detection. I use my phone at work and it keeps coming on and randomly running apps, pocket dialing and opening the camera app. Very annoying for me.
Use Shortcut Master: https://play.google.com/store/apps/details?id=org.vndnguyen.shortcutmaster.lite
Select 3 dot menu > search for knock. Find the hidden menu in the list. Select launch and it will open a menu to allow disabling of this feature. (It also disables dt2sleep.
Select 3 dot menu > search for pocket. Same procedure as above.
This has probably been posted already but I wanted to post here. (Credit to reddit user spring45 https://www.google.ca/amp/s/amp.red...to_disable_double_tap_to_wake/#ampf=undefined)
Mmmm....
grantdb said:
Here are the settings I use for the stock Titan kernel (1.8):
Have fun!
Click to expand...
Click to collapse
Hi, not everyone can interpret the code. How'bout you just state the settings you choose instead. Thanks for sharing.
fi5z.x9 said:
Hi, not everyone can interpret the code. How'bout you just state the settings you choose instead. Thanks for sharing.
Click to expand...
Click to collapse
Will try if I get time.
Well I personally would prefer kernel Adiutor profiles.. You can export that and a user can import it.. That way you could even share several ones easily..
Jm5c
Sent from my LG-H815 using XDA Labs
Hi. Come to this post from Titan kernel one. I saw that this is about stock firmware v29a plus Titan kernel 1.7 for H812.
My question is, Can I use the Kernel Adiutor profile in my H815?
kinuris said:
Hi. Come to this post from Titan kernel one. I saw that this is about stock firmware v29a plus Titan kernel 1.7 for H812.
My question is, Can I use the Kernel Adiutor profile in my H815?
Click to expand...
Click to collapse
I don't see why not. They have the same options. Make sure you create your own profile in case something doesn't work. No matter what you can always flash the kernel again.

Categories

Resources