yashsingh1/xdaforums huggingface dataset:
[Optimus One, P500 Android Development] mihachris:
Thank you for tour answer.

Will this delete anything on my phone (applications, files on sd, etc.)?

Sorry for my noob questions but I'm new to this and I don't want to do anything stupid!
[Optimus One, P500 Android Development] franciscofranco:
That is not my job to say. Just use the search function, you'll find plenty of information around. Google is your friend as well ;)
[Optimus One, P500 Android Development] franciscofranco:
Data2ext and a battery improvement guide probably later tonight if everything goes well.
[Optimus One, P500 Android Development] theb3s7:
We're patiently waiting :D
[Optimus One, P500 Android Development] franciscofranco:
Battery improvement for Dummies guide added.

Data2ext probably tomorrow.
[Optimus One, P500 Android Development] mmarz:
Thanks for this thread. I've actually started using a modified version of these for the Optimus V

I did some testing on under/overclocking the Optimus V but it should apply to your phone to: http://xdaforums.com/showpost.php?p=12699840&postcount=2

It pretty much confirms the first part of your battery improvement guide that underclocking worsens your battery life. People tend to not believe me until I show them the charts.
[Optimus One, P500 Android Development] eyeseal:
Hello,

For the file local.prop, I have put it into my SD card under /data.

But after having restarted the system, all apps and widgets are unusable until I delete the file local.prop and restart again.

I have installed App2sd+ and have all apps installed in the EXT4 partition in my SD card.

So, should I put the file local.prop into sd-ext/data instead of sdcard/data?

Thanks
[Optimus One, P500 Android Development] Zerobarat1:
Bro I really don't agree 480 min cpu . In terms of sleeping , I noticed ( in a vacuum , for ex. on mik's b6.2 , that's where I tested the most your tweaks + different governors and diff speed settings ) that on a 8 hour sleep ( device ) , it consumed about 5% with 480 min , while on the other hand 122 min consumed 2 % . That is a 125% increase in battery life for lower freq.

Practically this is what is bugging me now on andy's new build , that I can't use 122 min and I'm stuck on 320 min .

I am using atm a livewallpaper because they've really gotten under my skin . Let's face it , they're ellegant and if you have all your homescreens pretty filled up with widgets , icons , you have 2 optimum solutions : either be a battery preservation freak and just go for a blank screen , cause you won't even notice what's under all the content , or LIVEWALLPAPER . And I do have to say it's a pretty minimal additional consumption but( around a +2% increase in batt consump ) ... that's why I have an android phone and not a dumb Iphone :D ( which is awesome as a console for games but sooooo dumb as a smartphone ).

The other stuff I completely agree with you , keeping 3g , Data, Sync , bluetooth, Wifi off , as the phone can power them on almost instantly and 3G for example eats up a lot of battery regardless of OS version ( Froyo or Gingerbread ) . Maybe if you have a weather widget , or news widget , I guess keeping only Data on with 2G networks only would be a smaller evil , as those aren't even such big consumers.

Well cheers Mr. Franco .
[Optimus One, P500 Android Development] mmarz:
When your phone is idle and the screen is off:

3G consumes no battery life when it is left on and you have no data being transferred. It is equivalent to turning on airplane mode. Wifi will roughly double your battery drain when there is no data being transferred compared to airplane mode. If you do have battery drain issues with either 3G or Wifi left on, it is because you have programs that access the web on a regular basis.

3G consumes 2mA when idle

Wifi consumes 5mA when idle

If there is data being transferred, battery consumption can reach 300-500mA. Even a second of data transfer will shorten your standby time by 10 mins.

Setup Droidwall to block apps from using your 3G and Wifi. I have it setup with Tasker to have different firewalls up for the screen being off and on. I leave both 3G and Wifi on constantly. I have my clock speed set to 806/806 MHz (underclocking can only hurt your battery life). I get 80 hours of battery life with light use. 50 hours with medium use.

I do have a slightly different phone, but the same principles should apply.
[Optimus One, P500 Android Development] Zerobarat1:
Lol this kinda sounds SURREAL :) . But what phone do you have ? Is it a Optimus V , S ? Also , why have WIFI + 3G constantly on ? It makes no sense , as I said the phone powers them up almost instantly , especially with a power widget on the home screen ;)
[Optimus One, P500 Android Development] mmarz:
I get that a lot :)

I have the Optimus V. I have a voip client on 24/7 for incoming calls. That is why Wifi and 3G are on. And as I said, 3G doesn't consume any power unless you use it so there is no drawback. There is a slight hit if you leave the wifi on AND you are connected to an AP (the 5mA). Otherwise, wifi being left on only consumes power when it looks for AP's.

Here are the full line of tests that I performed: http://xdaforums.com/showthread.php?p=12699840

I know it all seems counter intuitive, but crank up your clock speed and leave your 3G on to save battery. There are a few situations where a lower clock speed will help: streaming audio and playing MP3. Even then, the most efficient clock speed is 600 MHz. Anything lower and you are wasting battery life.
[Optimus One, P500 Android Development] Zerobarat1:
Now , that's a battery optimization guide :D . Thx mate ;)
[Optimus One, P500 Android Development] Krnla:
Can someone please post the lastest tweaks.zip, the link is down
[Optimus One, P500 Android Development] Samhain77:
Link is not down for me! Please download it from a computer or just have a look a the address on your phone and remove the http:// at beginning.....

(it's something we talked about some posts ago.......)
[Optimus One, P500 Android Development] Krnla:
Ha i cant believe i missed that.. thanks
[Optimus One, P500 Android Development] mihachris:
Should I do that every time I update from one beta to another?

Also f I hadn't done it when I flashed CM7 for the first time, will it work if I do it know?
[Optimus One, P500 Android Development] franciscofranco:
Just under normal /data on the internal memory.
[Optimus One, P500 Android Development] lekhwani:
So how is everything going on cm7 6.2 with these tweaks?
[Optimus One, P500 Android Development] lekhwani:
@mmarz,

I use wifi only at home. You said wifi consumes power when it looks for APs. So, what should be the optimum value for wifi_supplicant in build.prop?
[Optimus One, P500 Android Development] aursta:
franco you are really cool guy, your write article for DUMMIES really cooll:D you are tough guy;D for dummies you say :D respect
[Optimus One, P500 Android Development] franciscofranco:
Not calling anyone dummy, just thought it would be a nice title ;)
[Optimus One, P500 Android Development] salte_eskil:
Flashed it but terminal emulator replied 2700
[Optimus One, P500 Android Development] franciscofranco:
Read speed is waaaay more important that write speed, specially with a2sd you'll probably notice an improvement on performance.
[Optimus One, P500 Android Development] waydownsouth:
rather than all the vi freakyness

instead of steps 6 - 10 you could just:

echo "/system/bin/busybox sh /data/mytweaks.sh" >> 35apps2sd

or, you could just put your script in the init.d folder...

cp /sdcard/mytweaks.sh /system/etc/init.d/99mytweaks
chmod 0700 /system/etc/init.d/99mytweaks
[Optimus One, P500 Android Development] franciscofranco:
I'm gonna test that out, seems pretty awesome ;)

EDIT: It works, thanks all of you, I'll update the first post with instructions. UPDATED, enjoy.
[Optimus One, P500 Android Development] waydownsouth:
Cool thread BTW.

My experiences,

I found that on my phone (not a p500) that once I had set one mtdblk to noop that they were all set...

I ended up removing the loop and achieved the same result... does this work in your case?

DM=`ls -d /sys/block/dm*`;
MTD=`ls -d /sys/block/mtd*`;
LOOP=`ls -d /sys/block/loop*`;
RAM=`ls -d /sys/block/ram*`;

for j in $DM $MTD $LOOP $RAM;
do
echo 0 > $j/queue/rotational;
done

gave me lots of errors, the loop, dm & ram devices don't have the rotational flag, its probably device/kernel related...

echo 0 > /proc/sys/vm/swappiness;
echo 10 > /proc/sys/vm/dirty_ratio;
echo 1000 > /proc/sys/vm/vfs_cache_pressure;
echo 4096 > /proc/sys/vm/min_free_kbytes;

you can set these in /system/etc/sysctl.conf like this:

vm.swappiness=0
vm.dirty_ratio=10
vm.vfs_cache_pressure=1000
vm.min_free_kbytes=4096

mine has vfs_cache_pressure=1 which seems to make things pretty responsive

but after a lot of uptime the phone can get starved of memory, so manually clearing the fs caches seems to help.

I finally got crond running which does this every night at 1am :cool:

sync; echo 3 > /proc/sys/vm/drop_caches

you could do this via gscript or tasker too
[Optimus One, P500 Android Development] kt0ce:
Hi don't notice any differences

First of all,

Thanks all you guys for helping and showing all of us how to edit our phones. I try all the tweaks here and I notice my phone running a little hot. However, the lockscreen seems to be smoother. Other than that it's almost the same as before. One more thing is I can't find this on the buildprop:

mot.proximity.delay=25 // proximity sensor tweak to make it more responsive

windowsmgr.max_events_per_sec=60 // makes the ui more fluid and snappy

But other than that, I was able to find and tweak all the other tweaks. Can someone help me understand why I can't find those two tweaks from the buildprop. Another thing that is very interesting is when altering the buildprop I notice they list the CPU as MSM7627, is this CPU for Optimus One? I have optimus T and the CPU should be MSM7227. Can I change it to MSM7227? Does this affect the phone? I'm a newbie, so if I sound like I don't know anything please excuse me because I really don't know much.. LOL..

Oh, one more thing after doing the tweak my fancy widget does give me the correct temperature. It seems like it's stuck at 63 degrees Fahrenheit.
[Optimus One, P500 Android Development] franciscofranco:
Thanks for your input. About the noop, I had to set it to all the blocks otherwise it didn't work for all of it. All of these blocks were flagged as rotational, that's why I changed the script to set the flag null for all of them.

I'll test your vfs_cache_pressure setting and will provide further feedback ;)
[Optimus One, P500 Android Development] franciscofranco:
You gotta add those lines to the build.prop and then reboot your phone. About that CPU issue, don't worry about it, I don't think it matters to be honest. I think that hot problem may be situational, none of these tweaks can be responsible for that.
[Optimus One, P500 Android Development] waydownsouth:
Cool, I guess it can be put down to device/kernel differences...

the dm, loop & ram don't even have a queue directory on mine.

Def interested in your feedback on the vfs_cache_pressure
[Optimus One, P500 Android Development] ungaze:
Nice.

More tweaks to come! ! ! ! !
[Optimus One, P500 Android Development] lekhwani:
Guys, kindly suggest/clarify

1.If I don't need my phone to scan for other wifi supplicants, how much value should I set? I use wifi at home only.

2. Default read_ahead value is 128. Is 4096 not too much.
[Optimus One, P500 Android Development] peacekeeper05:
the tweaks really made my homescreen snappier.

@ungaze

im waiting..... lol XD
[Optimus One, P500 Android Development] tazzz811:
I'm waiting too....
[Optimus One, P500 Android Development] kly91:
i tried it but i only got 2767..any help?
[Optimus One, P500 Android Development] kly91:
I used root explorer and opened the 35apss2sd and this is what it have "/system/bin/busybox sh /data/runme.sh"

Is this what it was supposed to be?.."because when i check it using adb i only got 2767
[Optimus One, P500 Android Development] franciscofranco:
1. Save all the tweaks in a script, tweaks.sh for example.
2. Using adb: adb shell and then su (to root you)
3. Paste your script in /sdcard/ (adb push mytweaks.sh /sdcard/)
4. Mount /system read and write using: mount -t yaffs2 -o remount,rw /dev/block/mtdblock1 /system
5. Then you're going to copy the file to the init.d folder so it runs every reboot, automatically: cp /sdcard/mytweaks.sh /system/etc/init.d/99mytweaks
6. Giving it the right permissions:chmod 0700 /system/etc/init.d/99mytweaks
7. Mounting /system read-only again: mount -t yaffs2 -o remount,ro /dev/block/mtdblock1 /system
8. Reboot
[Optimus One, P500 Android Development] kly91:
hi..I can't find this on my build.prop:

mot.proximity.delay=25 // proximity sensor tweak to make it more responsive

windowsmgr.max_events_per_sec=60 // makes the ui more fluid and snappy

Where can i see them?
[Optimus One, P500 Android Development] vault1965:
You need to add them...
[Optimus One, P500 Android Development] ungaze:
Anyone know what app this is?

@salte_eskil

Which ROM are you using?
[Optimus One, P500 Android Development] franciscofranco:
It works everytime you want to!
[Optimus One, P500 Android Development] aursta:
battery

fack it

use it properly and it will serve you..

may battery last for 2 days..

and i dont live in as island i can charge it....
[Optimus One, P500 Android Development] mmarz:
There is no optimum value. The larger the value, the longer between checks for an AP which will result in your Wifi being used less when you are out of the house. The amount of battery it uses is not that much, however. I have mine set to 300 (5 mins). That means that within 5 mins of coming home, the wifi will find my AP and turn back on. That is acceptable for me. Your millage might vary.
[Optimus One, P500 Android Development] ungaze:
Nice to see mmarz here. Still waiting for yout battery tips/tricks part 4 BTW ;)

I use "wifi.supplicant_scan_interval=600"(10 mins).

P.S. (using 2.2/2.2.1/2.2.2) Since were talking about this, I noticed that modifying build.prop or even local.prop and inserting the wifi scan interval line mentioned above, getprop would still show the default value set by android/LG, which is 20. Upon further investigation, I found out that init.thunderg.rc has a setprop command changing the value back to 20, thus making the modifications made to local/build.prop obsolete. Modifying init.thunderg.rc won't work as init.thunderg.rc along with other .rc files(init.rc, etc.) gets loaded from ramdisk on every boot making any modification to it before rebooting, again, obsolete. One way to make this work is to pull ramdisk from android, modify init.thunderg.rc from ramdisk and push ramdisk back to your phone. Well that's not practical, right?(just thought I'd give you the idea) A simpler and easier method is to use init.d support and make a script with the wifi.supplican_scan_interval in it and add the desired value. Just like we(franco's tweaks) used before. The same goes with net.tcp.buffersize.etc-etc.

P.P.S. This is the case with non-aosp ROMs only, I don't have a copy of any 2.3 ROMs(AOSP) right now so I can't really confirm.
[Optimus One, P500 Android Development] Samhain77:
This is just what I'm checking since 2-3 days....... all these settings aren't working on 2.2.2.... it just keep the original one......

no local.prop and no 99tweaks scripts are working........
[Optimus One, P500 Android Development] Magnumutz:
Just tried 787/787 cpu freq and i had 12% drain in 5 hours, with all these tweaks, everything off... doesn't feel like max freq saves battery.
[Optimus One, P500 Android Development] Samhain77:
@ungaze

I'm trying this from adb shell:

setprop wifi.supplicant_scan_interval 600

it gives no errors so I thought it's working......

then with getprop | grep wifi.supplicant I should receive: [wifi.supplicant_scan_interval]: [600]

instead I receive: [wifi.supplicant_scan_interval]: [20]

Why it's not working???

I'm on froyo 2.2.2
[Optimus One, P500 Android Development] Zerobarat1:
How about using the franco's local.prop and edit the file itself . The wifi supplicant you can set it yourself to 600 and the command lines that you don't trust you can just remove ;).

LE : Hey franco , testing your tweaks with Andy's build and battery life rocks ;) . But... , boot time is still very slow compared to how it was on Mik 6.2 :(
[Optimus One, P500 Android Development] Samhain77:
The local.prop settings aren't working either as for what ungaze said on 2.2/2.2.1/2.2.2 so I was just trying to set manually and see if it's working......
[Optimus One, P500 Android Development] Zerobarat1:
Then why not try Mik's 6.2 ginger build . As it is now it's awesome and rock stable and with franco's tweaks , battery life is at least on par with froyo if not a tad better ;) .

If you don't need bluetooth audio device ( bluetooth headset ) , good camera , usb tethering you should really give it a try ;)
[Optimus One, P500 Android Development] Samhain77:
I'll give it a try one day (by the way... is it multilanguage?)...

I'm just wondering why I can't modify that....
[Optimus One, P500 Android Development] Samhain77:
Please injure me!!!

:o

If I do a su command before..... all it's working.......................................
[Optimus One, P500 Android Development] franciscofranco:
Of course, with su it gives terminal root permissions ;)
[Optimus One, P500 Android Development] Samhain77:
I'm using ubuntu since 5 years...... and now I've done that noob thing......... :p
[Optimus One, P500 Android Development] Samhain77:
Ok..... pushed away a little bit of confusion from my head I've made some tests and I found that in 2.2/2.2.1/2.2.2 froyo versions these lines on local.prop are overwritten by default system configuration:

I've also tried to modify 99tweaks script with these lines:

but no luck.... :(

I also made a rom with these settings in build.prop and same result....

but I had them working by launching setprop commands on the adb shell.... but obviously you have to do it on every reboot

They also works if I run 99tweaks script from adb shell.... issuing these commands:
[Optimus One, P500 Android Development] lekhwani:
This thread really is dev thread! Very confused by what ungaze wrote on last page.
[Optimus One, P500 Android Development] mmarz:
Again, I use the Optimus V amd not this phone, but I found the only way to get the prop values to stick was to use setprop from within the script and to run the script after everything has already booted up. When I ran it from init.d, the settings would be overwritten.
[Optimus One, P500 Android Development] Samhain77:
WOW!!! :D

I managed to modify init.thunderg.rc and init.rc directly on the boot.img file on my Kitchen so now these are the default settings!!! :cool:
[Optimus One, P500 Android Development] N_lover27:
i guys can I intall local.prop.zip on Nessy that is bassed on 2.2.2 ???

when I try to install it after tweaks it gvs signature error on thundrag 1.1.0
[Optimus One, P500 Android Development] Samhain77:
You can install it but some options won't be applied on 2.2.2 (read some posts above)

You have to unzip the local.prop under the folder /data
[Optimus One, P500 Android Development] franciscofranco:
Disable verification in recovery.
[Optimus One, P500 Android Development] ungaze:
I notcied you have already solved your problem(the hard way) but I would still like to ask as to know the source of the initial problem. When checking the files inside init.d, do you see anything using the same number prefix as franco's tweaks? eg, 99?
[Optimus One, P500 Android Development] Samhain77:
Yes there is the 99complete script for a2sd
[Optimus One, P500 Android Development] ungaze:
If you have time can you test?:

-change wifi scan interval with franco's 99tweaks with another value(other from the one in init.thunderg.rc)

-change number prefix for fanco's tweaks(just look for a number not being used up).

-reboot and check with getprop
[Optimus One, P500 Android Development] Samhain77:
I've just tested that way... it doesn't work I also tried to rename the 99complete but same thing.
[Optimus One, P500 Android Development] Momaro:
This work from terminal emulator then? did you get local.prop to work?
[Optimus One, P500 Android Development] Samhain77:
in froyo local.prop is working except for the lines described above...

in gingerbread it should totally works
[Optimus One, P500 Android Development] franciscofranco:
I'm not so sure about that, in the end I just ended adding the lines to my build.prop just in case.
[Optimus One, P500 Android Development] kly91:
Francisco i have a problem with local.prop..it seems like it does not work when you are using ungaze's data2ext..I placed the local.prop file in /data but when i try checking on my terminal using getprop, the settings under local prop can't be found..the wifi supplicant was still at 120 and not 200..the other adjustments where not visible too
[Optimus One, P500 Android Development] ungaze:
I think this problem should not be addressed to this thread as it was working fine until you used data2sd, hence data2sd is causing the problem. Anyways, I will be tackling this issue and hope that the next data2sd build will be fully compatible with the local.prop.
[Optimus One, P500 Android Development] franciscofranco:
I agree, problems with your script are to be addressed in the respective thread.
[Optimus One, P500 Android Development] franciscofranco:
New version up with a few additions. Enjoy.
[Optimus One, P500 Android Development] mmarz:
I'm 99% sure the old version is still up.

echo "4096" > /proc/sys/vm/min_free_kbytes;

is still in there. There also does not appear to be any changes to the non-rotational storage.
[Optimus One, P500 Android Development] franciscofranco:
Another sleepless night tweaking this up and I forgot to sync dropbox. Try again.
[Optimus One, P500 Android Development] mmarz:
giggity! ;)
[Optimus One, P500 Android Development] aaofik:
i am using rom v10c..cannot flash new "tweak" using recovery, error after flash. but, when using last tweak.zip its flash able. any help?
[Optimus One, P500 Android Development] Aldeirid:
@fransiscofranco: Regarding your latest tweaks, you enable the No-op scheduler, which is fine, but then modify the following tunables (where $a is the block device) :

$a/queue/iosched/low_latency;

$a/queue/iosched/quantum;

$a/queue/iosched/back_seek_penalty;

$a/queue/iosched/slice_idle;

which are ONLY available when using the CFQ scheduler. The No-op scheduler doesn't actually provide any tunable.

That said, this shouldn't lead to errors or anything, it's just the logic behind the changes being wrong.

A.
[Optimus One, P500 Android Development] franciscofranco:
Yeah you're right I was sleepy already. I was actually thinking about taking the "noop" scheduler changing part because with the latest data2ext from ungaze CFQ/BFQ performs better and I'm my system I've been running with BFQ for a while.

New version up.
[Optimus One, P500 Android Development] randms:
Well, I think I have something to ask...

I'm a little bit confused with the word "twice" here. there are 2 zips to be flashed, if I flashed both of them at the same time, does it means so I need to reboot the phone twice for every one zip I flashed (4x reboot), or just one reboot for every one flashed zip (2x reboot)?

and one more question, what background process that you think are safe to kill? I'm using CM7 and there are a lot of background process that I dont understand such as:

FOTA kill,

Pico TTS,

Google Partner Setup,

CMStats,

Themes Provider,

Calendar Storage,

etc.

is it safe to kill them all? (I'm using watchdog)

and is it safe if I freeze them using titanium backup instead of killing them everytime after boot?
[Optimus One, P500 Android Development] franciscofranco:
Just reboot once, I forgot to update the instructions.

I'm not at home at the moment, I'll edit this post with the answer to your processes question once I get home!
[Optimus One, P500 Android Development] ppascuzz:
Flashed all three zips again to update but now it wont boot, i get a kernal panic. reverting to my nandroid backup now.