In this thread you'll find a compilations of tweaks and settings to improve your phone's performance and battery.
It isn't a walk in the park, I'll strongly advise against trying these tweaks if you don't know what you're doing. I'm not responsible for any bricked device or any kinds of problems you may have when applying the following changes. If you don't know what you're doing then simply DON'T.
Changelog 1/05/2011:
Reverted few changes, and everything should work correctly and easily. Instructions how to delete the previous version below.
Fixed the files permissions. Now you don't have to do it manually for it to work.
Download:
Tweaks .zip
Patched libsqlite .zip:
(don't use this on andy's 2.3.3 and latest CM7 from mik 6.3 roms or you'll end in a bootloop or your phone will drain a lot of battery according to some users)
libsqlite.so
Data2ext: http://forum.xda-developers.com/showthread.php?t=1042828 (thanks ungaze).
Very important:
libsqlite.so is a patched sqlite library file to turn sync off. With that change I/O should be waaay faster during db writes and reads. It only works with 2.3.x ROMs, don't bother flashing if you're with Froyo or you'll end up with a boot loop.
Instructions:
To delete the previous versions (thanks 32bits):
If you've installed any of the previously tweaks then you'll have to roll back. You have to do the following steps (this includes every possible locations):
1. Remove /system/etc/tweaks.sh
2. Remove /system/etc/init.d/00script
3. Remove /system/etc/init.d/99a
4. Remove /system/etc/init.d/99tweaks
5. Remove /data/local.prop
6. Reboot your phone.
For the .zips:
1. Download the .zips.
2. Enter recovery.
3. Flash them.
4. Reboot.
5. Done.
Prop settings, you can add them to your build.prop or local.prop:
Code:
wifi.supplicant_scan_interval=300
windowsmgr.max_events_per_sec=260
ro.lge.proximity.delay=25
mot.proximity.delay=25
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
ro.HOME_APP_ADJ=1
ro.mot.eri.losalert.delay=1000
video.accelerate.hw=1
ro.ril.disable.power.collapse=0
pm.sleep_mode=1
Don't forget to nand backup first in case something goes wrong. I'm not responsible for any problem from your part.
Thank you for your donation:
- Momaro
franciscofranco said:
Battery life increase for Dummies
Do you want some extra juice in your battery life? Does it seem that you lose your battery too fast? Then you came to the right
place.
Over the time I've gathered some information about our battery and while this isn't 100% proof (because all of us use the phone for different purposes)
I think it's most accurate:
The myth of having the lowest possible frequency on your CPU while it's asleep:
Having the lowest frequencies (122 or 248) set up, it's not good. Our phone doesn't change voltages while underclocking or overclocking (as far as I know overclocking
doesn't change voltages as well) so, and only talking about underclocking, having such a low frequency is bad for your phones battery and performance. For the battery
that's because it takes longer to wake up from sleep and the time that the cpu takes to scale from 122/248 to maximum instead of using it for processing power eats
your battery away. About the performance hit, well that's pretty obvious and it takes longer to idle up, so again, more battery drain.
Having read about this the last few days actually running in Performance Governor is pretty beneficial to your battery: it wakes up faster, it performs every task faster,
then it idles up faster. Yeah during "sleep" time having 122 frequency or 806 it's the same thing because it's not using its power for anything, it's just there idling.
In any case what I always suggest is TEST it up and see for yourself. If you don't want to run with Performance governor at least run with 480 minimum frequency, it really helps.
---
Why do you run with auto-sync, gps, wifi, 3G, firewalls, anti-virus, background apps killing your battery? That's bull****. Most of you complain that your battery doesn't last as long
as it should...well that's not ROMs fault, I've been running with CM7 buils since the first builds and I never, ever, ever had battery problems even when everyone complained. Why?
Because I'm careful. If you don't need auto-sync at that time, disable it...if you don't need gps, disable it and so on. I don't know why people leave this stuff on even when they are not
using them. Firewalls? That's bull**** as well along with anti-viruses. They eat up your resources for nothing. Same goes for background apps that eat it up. Google Maps = bull****. If
you used it go kill it after you're done with it. Same with Music app. Kill it after you've listened to your 1315618 songs. But DON'T use task killers. I can't repeat this enough, just
DON'T use them for your own sake. Same goes for 3G...just don't enable it all time if you're not using it.
No Live Wallpapers as well, nor 3D app drawers, these blow your battery away easily without you knowing how or why. Don't bother tuning your brightness down...you have a device, and
that's to be used. Why buying a mobile for 200€ and not using it's screen propely? It's there to be used, full brightness looks better, it's not by decreasing it down and hurting your
eyes that you'll get 21564561 more battery hours.
---
Do you want even more battery? Flash my tweaks along with local.prop. I'm running 2.3.3 without any modification except my tweaks + local.prop + libsqlite + LauncherPro as a launcher
(this is where most of the performance comes from).
So these are my "secrets". As you can see this is not really secret and I can easily run my device without charging for 1 day and a half, 2 days max with moderate usage.
AH there's something important. After flashing a ROM be sure to charge it to 100%, enter recovery and wipe battery stats, then reboot and only when the phone is up and running you then
unplug it.
Have fun reading, I laughed a lot while writting it
Click to expand...
Click to collapse
---------------------------------------------------------------------------------------
Different method to apply the tweaks. Make sure you thank ungaze for this script
Visit this thread for a completely new method to apply these tweaks: SD Tweakz
Code:
What does it do?
-mounts SD
-checks if "scriptz" folder exists
-copies scripts from "scriptz" folder to /data partition
-sets permission to scripts
-runs all the scripts
-deletes "scriptz" folder from /data partition
-unmounts SD
-done
P.S.- Everything is pretty clear, I won't be answering anything that is specifically stated above in my post or in the following ones.
in case u dont have root explorer
1. mount -t yaffs2 -o remount,rw /dev/block/mtdblock1 /system
2. echo 4096 > /sys/devices/virtual/bdi/179:0/read_ahead_kb
PS: u cud have integrated that read_ahead_kb in your script too..and dont u have to mount /system rw first ???
EDIT: found something !!! busybox has crontab ..Guess we can schedule the above script to execute like every half and hour or so !!!
franciscofranco said:
debug.sf.hw=1 // activates hardware acceleration
Click to expand...
Click to collapse
Lol . How is that and battery life or performance , even remotely equivalate ?
" ls -1 /sys/block/mtdblock* " u need to use cut and tr with it..DOesnt work
Here's My script :
mount -t yaffs2 -o remount,rw /dev/block/mtdblock1 /system
echo 4096 > /sys/devices/virtual/bdi/179:0/read_ahead_kb
for i in `ls -l /sys/block/mtdblock* | tr -s " "| cut -d " " -f 6`
do
echo "noop" > /sys/block/$i/queue/scheduler
done
echo "noop" > /sys/block/mmcblk0/queue/scheduler
Zerobarat1 said:
Lol . How is that and battery life or performance , even remotely equivalate ?
Click to expand...
Click to collapse
It increases performance and I'm sure a lot of people doesn't even remotely know how to activate HW acceleration.
sarfaraz1989 said:
" ls -1 /sys/block/mtdblock* " u need to use cut and tr with it..DOesnt work
Here's My script :
mount -t yaffs2 -o remount,rw /dev/block/mtdblock1 /system
echo 4096 > /sys/devices/virtual/bdi/179:0/read_ahead_kb
for i in `ls -l /sys/block/mtdblock* | tr -s " "| cut -d " " -f 6`
do
echo "noop" > /sys/block/$i/queue/scheduler
done
echo "noop" > /sys/block/mmcblk0/queue/scheduler
Click to expand...
Click to collapse
That's a variation, but my script works as well, been using it for a good while, but thanks anyway
sarfaraz1989 said:
in case u dont have root explorer
PS: u cud have integrated that read_ahead_kb in your script too..and dont u have to mount /system rw first ???
Click to expand...
Click to collapse
As far as I know there is no need to mount /system rw with any of those scripts, never did it before and always worked fine.
franciscofranco said:
build.prop edit:
windowsmsg.max_events_per_sec=60 // makes the ui more fluid and snappy
Click to expand...
Click to collapse
Are you sure it is not:
windowsmgr.max_events_per_sec
?
freddysam said:
Are you sure it is not:
windowsmgr.max_events_per_sec
?
Click to expand...
Click to collapse
Yes it is, it was a typo, thank you.
Some observations:
If you want to use "-1" option with ls, you'll need to use busybox's version. The stock ls doesn't support it.
The Linux sysfs file system (as mounted in /sys) is by design a read-write virtual file system. No need to do anything extra to play with it, other than be root.
These commands shouldn't be run from cron, they belong in some init script, perhaps /init.rc or other appropriate startup location.
My class 4 Kingston can achieve something like 40 mb/s with this tweak, but it may vary from card to card, this is just my experience.
Click to expand...
Click to collapse
with which benchmarking tool/app? Using SD tools but no apparent change.
@franciscofranco
sent you a PM
ungaze said:
with which benchmarking tool/app? Using SD tools but no apparent change.
@franciscofranco
sent you a PM
Click to expand...
Click to collapse
SD Tools indeed
First post updated with new tweaks.
cud somebody post differences before and after applying the patch..SOmebody benchmark 'em !!!
franciscofranco said:
SD Tools indeed
First post updated with new tweaks.
Click to expand...
Click to collapse
so we just add the new scripts from Ungaze?
and let the previous one as is....
using GScript, these folders are missing?
silly question but, do we need to create this folders?
-----------
and also, will this work in general for all android devices regardless of ROM?
franciscofranco said:
This thread contains some tweaks that I've found and tested myself to improve performance and battery of your ROM.
It isn't a walk in the park, I'll strongly advise you to try these tweaks if you don't know what you're doing. I'm not responsible for any bricked device or any kinds of problems you may have when applying the following changes, if you don't know what you're doing then simply DON'T.
build.prop edit:
wifi.supplicant_scan_interval=200 // interval of seconds that wifi scans for another networks
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
debug.sf.hw=1 // activates hardware acceleration
System files tweaks using Root Explorer (paid app from the Market):
Change /sys/devices/virtual/bdi/179:0/read_ahead_kb value to 4096, it improves the reading speed from the SD card. My class 4 Kingston can achieve something like 40 mb/s with this tweak, but it may vary from card to card, this is just my experience.
I/O schedulers:
To check which scheduler is used:
Code:
adb shell
~ # cat /sys/block/mtdblock0/queue/scheduler
[noop] cfq // in this case noop scheduler was selected
To select a different scheduler:
Code:
adb shell
~ # echo "noop" > /sys/block/mtdblock0/queue/scheduler
// you can change the schedulers for all your blocks, which, more likely will be mtdblock1,2,3,4,5,6,7,8 and 9. then mmcblk0 for the SD card.
This settings won't last through reboots, so either you create a shell script to run it every reboot or you change then manually. Same applies when changing read_ahead_kb file, it resets on reboot.
This is the script I'm using to run every reboot to change the scheduler:
Code:
for i in `ls -1 /sys/block/mtdblock*`
do
echo “noop” > $i/queue/scheduler
done
echo “noop” > /sys/block/mmcblk0/queue/scheduler
#[b]new line[/b] echo "noop" > /sys/block/dm-0/queue/scheduler
EDIT: ungaze kindly sent me a bunch of shell scripts and after researching, modifying them, and testing I'll suggest you to run them to increase general performance:
Code:
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
This one tells the kernel that all those devices are not "spinning disks" to it treats them as flash memory, because that's exactly what they are.
Code:
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;
These are tweaks to kernel Virtual Memory management.
Use GScript Lite from the market, it works fine.
If you want to know about the i/o schedulers I suggest you google it.
P.S.- Everything is pretty clear, I won't be answering anything that is specifically stated above in my post.
Click to expand...
Click to collapse
Thanks. any chance of making it flashable for us troglodytes...
bluviper said:
so we just add the new scripts from Ungaze?
and let the previous one as is....
using GScript, these folders are missing?
silly question but, do we need to create this folders?
-----------
and also, will this work in general for all android devices regardless of ROM?
Click to expand...
Click to collapse
Yes just add the scripts, don't need to mess with the previous ones.
If it says a directory was not been found don't worry about it, sometimes dm-0 is mounted, sometimes it is not, I still haven't found out when.
sarfaraz1989 said:
cud somebody post differences before and after applying the patch..SOmebody benchmark 'em !!!
Click to expand...
Click to collapse
You won't notice benchmark improvements, instead you'll notice it in the normal usage. Benchmark don't measure real life scenarios.
Omnichron said:
Thanks. any chance of making it flashable for us troglodytes...
Click to expand...
Click to collapse
I don't know how to do it I'm sorry.
EDIT: I'll have a loot at it.
to tell my experience, after installing the scripts, screen transitions is now snappy.
not like before that youll have to wait half a sec or something near that... now its instant and snappy, its cool to look at. returning to homescreen is abit faster now.
opening files on my ES explorer, unzipping etc etc. works faster now.
exploring and changing files on Root Explorer is quite faster than before.
im using LG Optimus P500....
so again my question goes... will this also work with other android phones under different ROMS?
bluviper said:
to tell my experience, after installing the scripts, screen transitions is now snappy.
not like before that youll have to wait half a sec or something near that... now its instant and snappy, its cool to look at. returning to homescreen is abit faster now.
opening files on my ES explorer, unzipping etc etc. works faster now.
exploring and changing files on Root Explorer is quite faster than before.
im using LG Optimus P500....
so again my question goes... will this also work with other android phones under different ROMS?
Click to expand...
Click to collapse
Awesome
It will probably work on most devices but most likely with some adjustments, nothing I can really predict unless taking a look over the phone and it's filesystems.
Related
SD Tweakz v2
Only works on custom ROMs with init.d(aka busybox runparts) support
UPDATED 04/11/11(added a few battery tweaks)
Wondering around on XDA will sometimes lead you to threads with scripts/tweaks that may or may not help you improve your android device in one way or another. Now most of these scripts/tweaks are not boot resistant. Meaning, after rebooting the tweaks gets disabled and you need to enter/execute them once again.
Well here's another script that would help you initialize those scrips/tweaks every time you restart/reboot you phone and make your life a lot more easier.
Instructions / How does it work?
1. Download the initial script here (SD Tweakz v2)
2. Flash via recovery This will install/copy the initial script into a portion of your android system which initializes/runs every time the phone boots
3. Create a folder on SD called "scriptz" (/sdcard/scriptz)
4. Place your tweaks/scripts inside "scriptz" folder. Usefull scripts/tweaks with explanation below
5. Reboot and see your script run on boot time By this point, every time you boot, the initial script will check your sdcard(/sdcard/sctiptz) if any scripts/tweaks are present. Once found it will then run the scripts for you each and every time you boot
What is it good for
Well there are lots of tweaks out there just waiting to be discovered. Some can yield great performance and some can provide you with a better battery management that can extend your battery life for hours. Unfortunately, some tweaks can only give you one of the benefits above and a bad performance on the other. Meaning you just can't have 'em all. Here you can choose which tweaks/scripts to apply, modify the values as you want as well as debugging which script provides the benefits that you expect. Another reason for using this mod is compatibility as some tweaks/scripts can be ROM dependent. Most of the time it's a kernel issue but some libraries can get involved too.
The Scripts
Scripts are just plain linux compliant text document which has certain linux commands that can be issued using adb/terminal.
You can make one yourself using some android text editors(from es file explorer, dropbox, root explorer etc.). Don't forget to add a ".sh" file extension.
Here's a few example of the scripts I use:
Code:
#These scripts are from various sources from different sites including [URL="http://forum.samdroid.net/"]Samdroid.net[/URL]
#And of course in collaboration with FranciscoFranco
#
#My approach in the scripts/tweaks that I use is basically just to
#squeeze more juice out of my phone. So in contrast to the tweaks
#included in FranciscoFranco's thread, the tweaks/scripts I use are less
#aggressive in terms of performance and more inclined to save battery.
#
#non-rotational.sh
#this script tells android that you are not using spinning disks
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
#noatime.sh
#Remount all partitions with noatime, for more info visit [URL="http://forum.xda-developers.com/showpost.php?p=8708125&postcount=1"]http://forum.xda-developers.com/showpost.php?p=8708125&postcount=1[/URL]
for k in $(busybox mount | grep relatime | cut -d " " -f3)
do
sync
busybox mount -o remount,noatime $k
done
#scheduler.sh
#Changes the scheduler used by the system, for more info visit [URL="http://forum.xda-developers.com/showpost.php?p=4806456&postcount=1"]http://forum.xda-developers.com/showpost.php?p=4806456&postcount=1[/URL]
for i in `busybox ls -1 /sys/block/mtdblock*`
do
echo "noop" > $i/queue/scheduler;
done
echo "noop" > /sys/block/mmcblk0/queue/scheduler;
echo "noop" > /sys/block/dm-0/queue/scheduler;
echo "noop" > /sys/block/dm-1/queue/scheduler;
#setprop.sh (currently testing)
#various build.prop settings
setprop wifi.supplicant_scan_interval 600
These are few of the tweaks that I have tested(and using right now), I will update it every time I test something out and will eventually add some of FranciscoFranco's tweaks for you to try out.
You can get some useful scripts from here - Performance and battery tweaks - by Franciscofranco (just read along)
Note: These scripts are no different from the scripts in FranciscoFranco's thread, I just categorized each individual tweaks and separated them for you to be able to apply each one separately. I will be more inclined to describe only battery saving tweaks as I am only interested with tweaks that could extend battery life(this includes performance tweaks that doesn't seem to affect the battery behavior at all)
Here's the my initial script again: SD Tweakz v2
Here's the downloadable version of each tweak mentioned above:
non-rotational.sh
scheduler.sh
noatime.sh
setprop.sh
If anything bad happens, just flash this Undo.zip(unsigned so just toggle signature verification) and everything should be back as it was before.
Huge thanks to NervGaz for providing a solution to the mount point conflict issue and of course Franciscofranco for those lively discussions and ideas we exchange.
Awesome job, I already linked this on my first page
@Ungaze
what is the difference from Tweakz V2?
bluviper said:
@Ungaze
what is the difference from Tweakz V2?
Click to expand...
Click to collapse
almost everything. Flashing this script alone won't do anything. You need to get your tweaks from here first and save it to /sdcard/tweakz folder. reboot and this way it will do exactly what Tweakz V2 did. Now if you notice any lag or performance drop, apply each tweak/script one by one to debug/troubleshoot which one is causing it.
Additionally if you found anything useful, you can make your own script.sh and place it on the /tweakz folder to run it on every boot.
ungaze said:
almost everything. Flashing this script alone won't do anything. You need to get your tweaks from here first and save it to /sdcard/tweakz folder. reboot and this way it will do exactly what Tweakz V2 did. Now if you notice any lag or performance drop, apply each tweak/script one by one to debug/troubleshoot which one is causing it.
Additionally if you found anything useful, you can make your own script.sh and place it on the /tweakz folder to run it on every boot.
Click to expand...
Click to collapse
Yes please, keep posting feedback either here or the other thread. Anything is useful since some users say they suffer some ocasional lag, others don't notice improvements, others say their phone became super fast...
ok now i get it... so the first batch of scripts on zip cannot be run on boot...
thats why you created this...
..ok i have finally applied everything! hehehe since i love smorgasbords...
and its very hard to tell that its there.... hehehe.. seems like fine to me.
no hiccups whatsoever..
but i feel its OK... thanks again man..
ok now i get it... so the first batch of scripts on zip cannot be run on boot...
thats why you created this...
Click to expand...
Click to collapse
the first batch of scripts had to be manually moved to init.d and had to be in a specific filename with a specific header and containing all the tweaks altogether in order to run on boot.
now what I did with the update.zips(Tweakz V1, Tweakz V2) was make moving it to init.d, renaming and fixing the header all easier for you guys but it still contain all the tweaks with no option for you guys to modify/add/remove lines that you want. This time it already runs on boot.
with this tweak, everything is easily manipulated through the sd card and a simple file explorer for more flexibility and easy troubleshooting. This should also work on most phones with init.d support.
Yes please, keep posting feedback either here or the other thread.
Click to expand...
Click to collapse
And to make things neater, just post stuff regarding only this script here and everything about tweaks on the other thread mentioned above.
You don't really need to move the scripts to the data partition, just invoke the with sh, ie. "sh /sdcard/scriptz/script.sh" it would make your for loop something like this:
for script in $list
do
sh /sdcard/scriptz/$script
done
Also I'd be careful with mounting SD ahead of vold, atleast on /sdcard or /mnt/sdcard make a tempfolder somewhere as a mount point instead and you shouldn't to worry about vold throwing up on you... Just a thought.
You don't really need to move the scripts to the data partition, just invoke the with sh, ie. "sh /sdcard/scriptz/script.sh" it would make your for loop something like this:
Click to expand...
Click to collapse
didn't work last time i tried running the scripts directly from sdcard but will try it with your script.
Also I'd be careful with mounting SD ahead of vold, atleast on /sdcard or /mnt/sdcard make a tempfolder somewhere as a mount point instead and you shouldn't to worry about vold throwing up on you... Just a thought.
Click to expand...
Click to collapse
I don't really have a choice right now but to use the same method as "VOID rom" is using when loading modules. Any ideas?
BTW thanks so much
A quick and simple solution would be to just add something along the lines of
mount -o rw,remount auto /
mkdir /tmp
<mount the sdcard>
<run the scripts>
<unmount the sdcard>
rmdir /tmp
mount -o ro,remount auto /
Not the cleanest solution of all time, but it should work and no risk of conflicting mount points. Another solution is to just have people install the scripts on the /data partition in a directory there as /data is mounted rw.
Sent from my LG-P500 using Tapatalk
NervGaz said:
A quick and simple solution would be to just add something along the lines of
mount -o rw,remount auto /
mkdir /tmp
<mount the sdcard>
<run the scripts>
<unmount the sdcard>
rmdir /tmp
mount -o ro,remount auto /
Not the cleanest solution of all time, but it should work and no risk of conflicting mount points. Another solution is to just have people install the scripts on the /data partition in a directory there as /data is mounted rw.
Sent from my LG-P500 using Tapatalk
Click to expand...
Click to collapse
I was worried about the mount point traffic as well, but I guess I will be implementing the second solution instead, with a very different approach, and a more complex script.
You seem to know your trade, too bad we didn't get to collaborate before I made this script(from scratch, with no knowledge at all with scripting and how they work). Was asking and trolling on different threads with no help at all. Good thing mr. google was always there for anyone who needs help .
I'll start working and hope to hear from you about my next release as well.
You might want to look at the userinit script in the CM based ROM's around if you're going down that route, it does what you want and there's no point reinventing the wheel if you know what I mean.
Sent from my LG-P500 using Tapatalk
Great! Nice tip, never done that before. Thanks alot man.
so all in all, is this script really running on boot or not?
It runs, only problem encountered is with CM7 roms. (mount point traffic or something like that in a sense) will edit 1st page till I finish the reworked script.
Hey ungaze,I have just flashed the script and everything. I'm on CM7. What is the problem? Do I have to wait for a fix and do everything over again? Because I'm currently not experiencing any problems
Nope, it worked once, it should also work every time. Dunno which beta version of CM7 some people are having problem with. I still think this method is easier and faster for testing scripts to run on boot, but the next script will just be more lets say "compatible to a wider variety of ROMs and even other devices".
The issue can occur on rom's that mount the sdcard on /mnt/sdcard and symlink that to /sdcard as your mountpoint doesn't exist. If memory serves me right this is the correct mount procedure since 2.2 and is more in line with FHS. Potentially you can see issues with this if it mounts before vold runs as well as vold with throw an error if the mountpoint is in use. This can occur on rom's that mount to /sdcard. Hope that clears it up a bit.
Sent from my LG-P500 using Tapatalk
How does this look?
Code:
mount -o rw,remount auto /
mkdir /tmp
mount sd
mount -t vfat /dev/block/mmcblk0p1 /tmp
if [ -e /tmp/scriptz ]
then
list=`ls /tmp/scriptz/*.sh`
for script in $list
do
sh $script
done
fi
umount sd
umount /tmp
rmdir /tmp
mount -o ro,remount auto /
Also "ls /tmp/scriptz/*.sh" would show the complete path including /tmp/scriptz/------ and so I just used sh $script on line 10. is this ok?
No need to mount the sdcard in the script, vold handles all that and its not used anyway. Apart from that it looks good to me.
Sent from my LG-P500 using Tapatalk
Hi all -
I wrote a script and created a CWM update-flashable to perform a one-line install of the CM7 GPS Fix, documented here by jwleonhart. There were some complaints about jwleonhart's install instructions; it's a bit cumbersome and not trouble-free, especially for noobs. Please read the original thread for detailed instructions on what my script does; the script exactly does jwleonhart's instructions.
NOTE: EVERY VERSION OF THIS FIX MAKES SUBTLE BUT IMPORTANT CHANGES THAT MAY IMPROVE OR DEPRESS YOUR GPS FUNCTIONALITY. UNTIL A TRUE GPS DRIVER DROPS FOR THE VIBRANT (which at this point seems very unlikely) ALL WE CAN DO IS HACK AND TWEAK. NEWER VERSIONS MAY WORK BETTER OR WORSE THAN OLDER ONES! PLEASE POST WITH YOUR EXPERIENCE USING THE VARIOUS VERSIONS OF THE FIX, AND PLEASE BE CONSTRUCTIVE/HELPFUL WITH YOUR FINDINGS!
There are three separate ways to install: CWM, CWM with no gpsd, and via shell script.
CWM Installation
The easiest way to install the GPSFix files is to download and flash Vibrant_CM7_GPSFix_V1.4-CWM-signed.zip. All files will be copied over and read/execute permissions will be properly set.
NOTE: Flashable does NOT contain AngryGPS. There are some people who have better results without it, so I'll let you install that one on your own. You can find the APK at jwleonhart's CM7 Install Guide.
OPTIONAL: There's a no-gpsd version of the CWM flashable as well - if you want to use the gpsd from your current nightly, or mix and match. The GPS driver might get better in time, and who knows if down the line the gpsd bundled with the latest nightly is better than this one, pulled from Trigger Redux#13 (CM7 Nightly#54).
Script Installation
The script is available for users who want to customize their own GPS fix. It requires an extra reboot (since you can't just run the script after installing a new nightly), but you can easily add/remove files to the script to suit your own needs. Personally, I use the script to test new versions before they go into the CWM flashable.
Attached is the zip file with all the files and the shell script you need. Just extract the folder to your SD card; then in a terminal (ADB or terminal emulator with root), run these commands:
Code:
su # if you're not already dropped into superuser status
cd /sdcard/GPSFix
bash GPSFix.sh
It will automatically copy all the files (gpsd, secgps.conf, gps.conf, 90getgps_lto) to the right places, then set permissions those files, then reboot. AngryGPSmod.apk is in there but is not installed; I suggest try the GPS fix without AngryGPS first, then install it after if you don't get good results.
Script Contents
For those interested, here's the contents of the script..
Code:
#!/system/xbin/bash
FIXFILES="/system/etc/gps.conf
/etc/init.d/90getgps_lto
/system/vendor/bin/gpsd"
REMOVEONLY="/data/gps/lto.dat
/data/gps/lto2.dat
/data/gps/svstatus.txt
/data/gps/ltoStatus.txt
/data/gps/secgps.conf
/system/bin/agpsd"
mount -o rw,remount /system
echo "==================================================="
echo "======Vibrant CM7 GPS Fix One-Command Install======"
echo "=================by strictlyrude27================="
echo ""
# Delete previous fix files
echo "Deleting previous fix files..."
for file in $FIXFILES $REMOVEONLY
do
if [ -f $file ]; then
rm $file
fi
done
# Copy new files and set permissions
echo "Copying new files over..."
for file in $FIXFILES
do
fname=$(basename $file)
cp $fname $file
chmod 0755 $file
if [ $file == "/system/vendor/bin/gpsd" ]; then
chgrp shell $file
fi
done
echo "Rebooting device.. Enjoy GPS!"
echo "Install AngryGPSmod.apk manually if you want to."
echo ""
reboot
Credits
jwleonhart - writing up the CM7 install guide
roffee - finding the original GPS Fix for CM7
jad3675 - providing original Long Term Orbital download script
PLEASE go to their threads and hit their Thanks button. They did all the heavy lifting, I just packaged up their findings and work into a simple-to-use flashable.
"If I have seen far, it is because I have stood on the shoulders of giants."
--Isaac Newton
Changelog:
Code:
V1.5.1
-- renamed init-script to overwrite CM7's implementation of V3 of this fix
-- now offering "newgpsd" variant - contains gpsd from latest CM7 nightly
-- standard zip: faster locks, but more prone to randomly quitting working
-- newgpsd variant: slower locks, but more resilient GPS indicator [color="red"] still needs testing[/color]
V1.5
-- cleaned up script
-- now keeping LTO data named lto2.dat (used to rename to lto.dat)
-- lowering threshold for lto2 refresh to 3 days
V1.4 (all variants)
-- replaced lto.dat with lto2.dat - preliminary testing indicates survival after reboot and better TTFF
-- now using us.pool.ntp.org for the time server - if you're not in the US, please adjust your gps.conf accordingly
-- gps.conf tweaks - trading accuracy for TTFF for now..
V1.3.1 (all variants)
--set permissions on downloaded lto.dat to 755 (was 644) - i couldn't get
any birds in view before, now i can lock. give this a try if 1.3 doesn't work.
V1.3 (all variants)
--removed agpsd
--added 90getgps_lto - will fetch latest long term orbit data on boot
--hopefully these changes help get REPEAT locks faster - please let us know!
V1.2CWM-nogpsd
--same as V1.2CWM, but with no gpsd. This way you can use gpsd from
the latest CM7 nightlies, or whatever nightly gpsd worked best for you.
I will start collecting gpsd files and posting them for your convenience soon!
V1.2CWM
--created CWM flashable for your convenience! performs the EXACT SAME
as the script, so if you've already run V1.2, no need to flash V1.2CWM.
But, it could be useful if you tend to flash nightlies all the time.
V1.2
--changed all file permissions to 0755 - not sure how reading .conf files
worked if there wasn't any read permission. gets me a faster lock after
applying the script.
V1.1
--fixed typo - "chmod shell" should have been "chgrp"
--removed \t, \n - was not being interpreted by shell correctly
V1
--initial release
If I helped you with your CM7 experience, please hit the Thanks Button
im about to try this
Dear all -
Script was updated to V1.2. I noticed that no read permissions were set to the .conf files; my thinking is there's no way Android could read those config files without read permissions, so they weren't even doing anything.
That said, the latest script now gives permission 0755 (rwxr-xr-x) to all files. After running the script now, I get a lock after first reboot in about 25 seconds.
You can download V1.2 and start from scratch, or just copy/paste the latest script contents into your GPSFix.sh. Or, run the following commands at a terminal (ADB or terminal emulator with root):
Code:
su
mount -o rw,remount /system
chmod 0755 /data/gps/secgps.conf
chmod 0755 /system/etc/gps.conf
chmod 0755 /system/bin/agpsd
mount -o ro,remount /system
reboot
Also, I noticed 31 downloads (and there were 20-some in the original post) but only a total of 3 Thanks.. I'm kind of addicted to the Thanks button and don't ask for donations otherwise, please push it if I help make a better CM7 experience for you
do they work with MIUI ?
chuotcontodung said:
do they work with MIUI ?
Click to expand...
Click to collapse
Should work with any CM7-based ROM; I hope someone else can confirm, though; I only run vanilla CM7 and occasionally Trigger Redux.
Any chance to make it CWM-based ?
It'd be so much nicer to drop the zip into a SD root and just run it after every nighty installation.
strictlyrude27 said:
Dear all -
Script was updated to V1.2. I noticed that no read permissions were set to the .conf files; my thinking is there's no way Android could read those config files without read permissions, so they weren't even doing anything.
That said, the latest script now gives permission 0755 (rwxr-xr-x) to all files. After running the script now, I get a lock after first reboot in about 25 seconds.
You can download V1.2 and start from scratch, or just copy/paste the latest script contents into your GPSFix.sh. Or, run the following commands at a terminal (ADB or terminal emulator with root):
Code:
mount -o rw,remount /system
chmod 0755 /data/gps/secgps.conf
chmod 0755 /system/etc/gps.conf
chmod 0755 /system/bin/agpsd
mount -o ro,remount /system
reboot
Also, I noticed 31 downloads (and there were 20-some in the original post) but only a total of 3 Thanks.. I'm kind of addicted to the Thanks button and don't ask for donations otherwise, please push it if I help make a better CM7 experience for you
Click to expand...
Click to collapse
You need to add "su" to the first line of your installation instructions
ferhanmm said:
You need to add "su" to the first line of your installation instructions
Click to expand...
Click to collapse
I assumed you would be entering the terminal with root. I'll update that in the OP though, thanks.
svladimir said:
Any chance to make it CWM-based ?
It'd be so much nicer to drop the zip into a SD root and just run it after every nighty installation.
Click to expand...
Click to collapse
I don't know how to make an update.zip, but perhaps this will be a good time to learn! I'm way better at shell scripting which is why I went this route. I'll see what I can do, hopefully I can have a CWM flashable soon.. if anyone else can help me I would much appreciate it.
That said, note that you can still open an adb shell in recovery mode, so you could run the script after you flash the nightly. I haven't tried that, but I will soon.
strictlyrude27 said:
I assumed you would be entering the terminal with root. I'll update that in the OP though, thanks.
Click to expand...
Click to collapse
Lol yea but I guarantee you that if you didn't add it more than 20 people would ask
It turns out making an update.zip isn't so hard after all testing it now, if it works out I'll upload to OP. I'll keep the original scripts and stuff for posterity's sake.
Great efforts, wow
This is just great piece of development, a sure and simple cure for the GPS and the CM 7+ roms.
Now that you have created this script, one so simple, there will be leages of Vibrant Users who will be able to take advantage of your generousity and put this puppy to work.
Kudos and once again, great work.... W.0.W.
I can confirm, with the AngryGPS I was able to lock in with fast lock in up to Accuracy of 20 feet, picked up 8 of the 12 satellites in view.
Thank you very, very much....
Dear all -
V1.2CWM released! As requested, a CWM flashable zip has been created. It does literally the exact same thing as V1.2 (copies over the GPS files to the right locations, sets 0755 permissions on all files). You don't need to flash if you've already installed V1.2, but I would keep the zip on hand for when you decide to flash a new nightly.
As always, the Thanks button lets me know I'm loved
I plan on starting a gpsd database, seems that while all gpsd's are created equal, some are more equal than others so you can mix and match the gpsd from a previous nightly, rather than referring to the supermassive black hole that is the official CM7 Nightly thread.
And finally, I must point out that I did NOT create these fixes. All the credit and praise belongs to jwleonhart and roffee. I just packaged up their work into an easy-to-install package, those guys did the real work! Please find their threads in the Credits section of my OP and hit the Thanks button!
My phone refuses to download these. Annoying.
^ try getting astro, go to preferences and allow internet downloads.
Also, chrome to phone is amazing
s15274n said:
^ try getting astro, go to preferences and allow internet downloads.
Also, chrome to phone is amazing
Click to expand...
Click to collapse
I already did the astro thing.
Turned it on and off several times.
And I used chrome to phone to send the link, with the same result.
I swtiched over to Opera, and that eventually agreed to download it.
OP updated. I now offer a no-gpsd version of the CWM flashable, in case you want to keep your gpsd or mix and match with other nightlys. I'll put up a link to a Dropbox to store GPS drivers from every nightly.
Ironically, the fix used to work for me 100% of the time, but not anymore. I'm going to start experimenting with new gpsd's from CM7 nightlies; please also let me know of your own results!
EDIT: I wasn't getting locks, or was getting and losing locks with my fix. Tried #72 gpsd and the nogpsd flash.. 0/8 birds after 5 minutes. Reflashed my own fix. TTFF [time to first fix] 17 seconds, 7/10 satellites, 150 ft accuracy. After 1 minute, 20 foot accuracy. Rebooted. 0/10 after 5 minutes.
I wish I understood you, GPS. I wish I understood you.
very nice.. i tried right now..
before this, its takes serveral minutes to get a lock.
after this patch.
first 30 secs, In View 12 satts.
1 min, get in USE 4 satts, 25 meters accuracy.
2 min, get 6 satts, 7 meters accuracy.
Very fast!
Thanks!
Nice!!! It will be much much easier now to get GPS working after nightlies. Awesome!
Sent from my SGH-T959 using XDA App
This works but great the first day but
GPS seems to not even lock in the next day.
Dattack said:
This works but great the first day but
GPS seems to not even lock in the next day.
Click to expand...
Click to collapse
tell me about it. i put the damn thing together and i'm in the same boat. It's really hit or miss for me.
i finally get it to work.
this script (if kernel support) create a swapfile on mostly unused /cache partition
-copy the script to phone
-chmod
-add it to end of hw_config.sh (or any other way of bootexecute)
have fun
inteks
update:
new version creates own loopdevice (thx to hygge)
pls guider install ??
niceee.
Does this work on rooted and locked 2.3.4 Arc ?
dubist said:
niceee.
Does this work on rooted and locked 2.3.4 Arc ?
Click to expand...
Click to collapse
sorry but you need a kernel with swap support ...
le_manhpro said:
pls guider install ??
Click to expand...
Click to collapse
the easiest way is to use i.e. rootexplorer to run the script but then you have to do it after every reboot.
maybe a good idea for testing
will it work on ray?
What's benefits we have using swap file?
Thx for answer
inteks said:
sorry but you need a kernel with swap support ...
Click to expand...
Click to collapse
So what kind of kernel, is DoomKernel support? why you dont give a sameple?
Interesting idea, I have setup swap as descriped but I had to change loop device to /dev/block/loop18 which was the only unused loop device on my mobile.
It was wierd, because all new loop devices I created was quickly reserved for the same app by the system, rather annoying. But luckily I had one unused allready available.
I will let you know how it works, how the system performance is percieved after some testing. I would think it could slow down the device, the memeory is increased but it will be on slower memory.
donghungx said:
So what kind of kernel, is DoomKernel support? why you dont give a sameple?
Click to expand...
Click to collapse
yepp, doomkernel support swap
Sent from my MT15i using Tapatalk
Hi inteks
Thanks allot for your script, it actually feels like its memory has been increased with 64MB. I have a few times experienced a slight lag when starting up memory hungry games but the homescreen no longer has to redraw when returning from the game
It is usually problematic in the Order and Chaos game to chat as the game loads the default keyboard which takes some time as it is removed from memory again as soon as you have send your message. The swap makes the keyboard stay in memory and open up instantly
I am also able to keep more applications open during normal use, I would normally have problems having mail, web and other document open at the same time.
I had to modify your script and manually create a new loop device, all loop devices from loop0 to loop38 was allready used.
# mknod -m640 /dev/block/loop50 b 7 50
hygge said:
Hi inteks
Thanks allot for your script, it actually feels like its memory has been increased with 64MB. I have a few times experienced a slight lag when starting up memory hungry games but the homescreen no longer has to redraw when returning from the game
It is usually problematic in the Order and Chaos game to chat as the game loads the default keyboard which takes some time as it is removed from memory again as soon as you have send your message. The swap makes the keyboard stay in memory and open up instantly
I am also able to keep more applications open during normal use, I would normally have problems having mail, web and other document open at the same time.
I had to modify your script and manually create a new loop device, all loop devices from loop0 to loop38 was allready used.
# mknod -m640 /dev/block/loop50 b 7 50
Click to expand...
Click to collapse
pls guider install tks
le_manhpro said:
pls guider install tks
Click to expand...
Click to collapse
Here is the script with my modifications manually creating a new loop devices. I have used loop50 as 0-38 was allready in use and it would leave some room for new loop devices.
I am using scriptmanager to either run the script manually or run it at boot.
Have marked my changes with bold
#!/system/bin/sh
if busybox [ ! -f /cache/swap/swapfile.swp ]
then
echo "Create Swapfile"
mkdir /cache/swap
busybox dd if=/dev/zero of=/cache/swap/swapfile.swp bs=1M count=64
busybox mkswap /cache/swap/swapfile.swp
busybox chmod 0600 /cache/swap/swapfile.swp
else
echo "Swapfile Exist"
fi
echo "connect loop devices"
mknod -m640 /dev/block/loop50 b 7 50
losetup /dev/block/loop50 /cache/swap/swapfile.swp
echo "use loopdev for swap"
swapon /dev/block/loop50
echo "raise swappiness 2 "
echo 90 > /proc/sys/vm/swappiness
cat /proc/sys/vm/swappiness
free
Thanks a lot for the script. What is this loop anyways?
matus201 said:
Thanks a lot for the script. What is this loop anyways?
Click to expand...
Click to collapse
It is a device driver in linux, the loop device driver is created as a block device which functions as disc device. The loop device driver are used to loop back into local imagefiles on the existing filesystem.
You then use losetup to point the loop device file towards an imagefile on the existing memory devices. In this case it is configured to point towards the new empty 64MB file that are created in the beginning of the script.
You now have a small 64MB filesystem attached that we can use as linux swap
Why not making a 128 swap file to improve even more?!
I'm a noob... So I just intested to know how it works...
Sent from my LT15i using XDA App
must this be added for your kernel to start swapping inactive applications from the RAM to the cache partition ?!
thanks man
---------- Post added at 09:30 PM ---------- Previous post was at 09:29 PM ----------
haimelf said:
Why not making a 128 swap file to improve even more?!
I'm a noob... So I just intested to know how it works...
Sent from my LT15i using XDA App
Click to expand...
Click to collapse
the cache partition is only 100mb
yes
Sent from my MT15i using Tapatalk
i heard that swap would wear the cache partition in time thus making it un-useful @ all for it's original use , i believe that cache is used for stuff like downloading apps from market !
thanks
What is "chmod" ??
Sent from my LT15i using xda premium
Easy way to speed up your phone
Install instructions:
1. Install Root Explorer
2. Download boost.zip file and then unzip the that file and put in the SD card...
3. Open Root Explorer (Mounted on R / W) / SDCard / menu button / Multi-select / chose boost / Copy / system / bin / then click paste...
4. Open Terminal emulator and taype:
su
boost
5. Your phone is turbo boosted now, enjoy in new speed on your phone...
6. Press thanks if you like my work...
7. Rate my thread...
And what exactly does this "Turbo boost" do?
Have you got any benchmark results or evidence of an performance increase? I'm not giving an program/script root access to my phone, without some proof of an increase.
Upon opening the file with Notepad++ all it had inside was this
#!/system/bin/sh
# Adrenaline Boost
# Brought to you by [email protected] Developers
sync;
sleep 1
echo "3" > /proc/sys/vm/drop_caches;
sleep 1
echo "1" > /proc/sys/vm/drop_caches;
sleep 1
echo " ** Turbo Boosted ** ";
Click to expand...
Click to collapse
Which after some googling found out it does (from a similar script for desktop Linux):
Writing to this will cause the kernel to drop clean caches, dentries and inodes from memory, causing that memory to become free.
Click to expand...
Click to collapse
nejc121 said:
And what exactly does this "Turbo boost" do?
Click to expand...
Click to collapse
Your phone will be faster and working bether...
I just get permission denied in terminal.
spudata said:
I just get permission denied in terminal.
Click to expand...
Click to collapse
Did you type in "su" before "boost"?
Yes, granted su permissions but no joy.
Same thread posted on the i9000 development area. wth
Sorted, had to change permissions of boost file
Can anyone confirm this to work?
Sent from my HTC Desire using Tapatalk
RESERVED.
installed, will update tomorrow with any feedback.
UPDATE: have found it runs pretty much same as V6 Supercharger, drains battery horribly though.
I was on 54% battery last night, data & wifi off and killed tasks before going bed.. I checked CPU Spy, it had been in a deep sleep state for most of the night.
I awoke to a dead phone, which doesn't even happen on the v6 supercharger!
How do I uninstall this script, can I just delete the file from bin?
I tried this but I see no difference ... should i restart the device?
cm 7.2 rc1, smartassv2 264-710 MHz
edit: rebooted the phone....still no difference.....
To really see the benefits of the boost, you need to change the file permissions. Go into a root terminal and type:
chmod +t boost
This gives the boost Time Travel permissions. Now, all processes will be completed before you even run them. Talk about a turbo boost!!
Also set the date of your phone to whatever you want the open the dialer and type "#"#7925#"#" and you'll be timewarped into the future.
Sent from the year 2019 using my years old HTC Wildfire using xda premium
Ok just done a little digging around the op's other thread (which is now locked by a mod) on a different forum as he hasn't exactly explained what this does in any of them which leads me to believe he doesn't exactly know, and probably copied it from someone else, http://forum.xda-developers.com/showthread.php?t=1542602
What this does is clear the cache filesystem. 3 = free pagecache, dentries and inodes, while 1 = just free pagecache. Which in theory will decrease battery life as the cache needs to then be rebuilt afterwards.
This is already included in v6 supercharger so no need to use this if you have v6, just perform the engine flush or whatever its called whenever you want to free up some memory stuck in cache files. Its basically the same thing according to other users, I haven't looked to see if thats true or not but they sounded like they knew what they we're talking about so i believe them.
GlennBrownie said:
UPDATE: have found it runs pretty much same as V6 Supercharger, drains battery horribly though.
I was on 54% battery last night, data & wifi off and killed tasks before going bed.. I checked CPU Spy, it had been in a deep sleep state for most of the night.
I awoke to a dead phone, which doesn't even happen on the v6 supercharger!
How do I uninstall this script, can I just delete the file from bin
Click to expand...
Click to collapse
??
Yes delete and reboot.
Sent from my HTC Wildfire using xda premium
SeeZaar said:
Easy way to speed up your phone
Install instructions:
1. Install Root Explorer
2. Download boost.zip file and then unzip the that file and put in the SD card...
3. Open Root Explorer (Mounted on R / W) / SDCard / menu button / Multi-select / chose boost / Copy / system / bin / then click paste...
4. Open Terminal emulator and taype:
su
boost
5. Your phone is turbo boosted now, enjoy in new speed on your phone...
6. Press thanks if you like my work...
7. Rate my thread...
Click to expand...
Click to collapse
yea, 1star rated as u just copy my work.
Moreover, u didnt give full description and spoiled my fame and work, this should be useful for everyone if they know how to use tis properly
Thread closed as the OP DOESNT have permission fro yhe dev yo post this.
Also he failed to provide credits.
This on XDA is kanging and is not tolerated!!!
************
This mod' has been updated to support AOSP only if you are running freeza's latest BEAST MODE KERNEL which contains a folder named "gnfre3" in the /system/etc directory. The methods of installation are the same. The file you are replacing for AOSP (after flashing his kernel) is /system/etc/gnfre3/war_mods.sh
So, see below for instructions. And any commands applicable to file paths for the /system/etc/init.qcom.post_boot.sh file, just change to the AOSP-specific ones above.
Make sure you download the correct variant... for both AOSP and stock ROMs, you'll have a 4 GB and 6 GB option
***************
Well, this device is a breath of fresh air? Wouldn't you guys say? 128 GB ROM, 6 GB RAM and a monster of a processor!
That being said, custom tuning for a device is always a necessity. "Canned" settings will get you by, but they are certainly never optimized for a specific device. In fact, Linux typically takes a general approach to find harmonic balance in default settings that will, for the most part, work in an acceptable manner for just about any device. There are a lot of resources available on this device, so we should utilize it in a manner appropriate to squeeze out as much battery life and performance as possible without sacrificing much of those outputs, don't you think? This is going to fix that for you.
Here is what is required of you before you begin:
1. Must be rooted
2. Must have the ZTE Axon 7 OR a device running the Snapdragon 820, as this modification is not so much device specific, but hardware specific. The important aspect being the snapdragon 820 and the RAM disk size.
3. Must have write protection disabled.
Using adb shell:
Code:
adb reboot disemmcwp
Using Linux terminal (from your phone, for example):
Code:
reboot disemmcwp
The above command can also be executed in recovery terminal.
IT IS IMPORTANT THAT YOU USE THE CORRECT VERSION (RAM), AS THIS COULD HAVE UNDESIRABLE PERFORMANCE IMPACTS OTHERWISE... however, nothing will be permanently damaged, this won't turn your device into a paperweight.
Let's begin.
Getting right to it, here's what I've done:
- modified parameters of the interactive governor, and quite extensively at that (search some of my threads if you want a little bit of a breakdown of the general approach I take)
- reconfigured input_boost parameters - disabled
- reconfigured vm parameters (again, the device has a lot of RAM resource, this will utilize it and give you a far better user experience. Basically, I've adjusted dirty_ratio and dirty_background_ratios, set swappiness value to 100, and other parameters of the virtual machine have also been adjusted, such as vfs_cache_pressure.)
- (Above) you will have as much available RAM as possible for your apps. This will reduce redraws if you are a heavy user. If you'd like to test this, reboot, and check your available RAM in the settings
- Enabled zRAM for all variants
- remapped minfree parameters for LMK (low memory killer) for 6 GB variants only
- Set scheduler to CFQ
- Tuned CFQ scheduler for flash storage devices
- Turned off core_ctl for BEAST MODE kernel.. you can enable this if you'd like, just know what you are doing. There are commented out lines of code near the bottom of my scripts to enable or disable it.
- Added an option to change GPU governor to simple_ondemand (again there is a commented out line at the bottom of each script, just remove the "#" symbol and blank spot right before the line. simple_ondemand is more power-friendly GPU governor, with a very small hit on performance
In a nutshell, that's what we're looking at here. I can guarantee you this will have a significantly positive impact on your device. Turbo time, homies.
How to install????
There are two main folders found in the unzipped package. One for the 4 GB variant, one for the 6 GB variant. Only use files from the appropriate folders for your device. Each of those two folders has 3 sub-folders: ondemand, conservative, interactive… this is where you will find the various init.qcom.post_boot.sh files
Note: magisk users, see this post https://forum.xda-developers.com/showpost.php?p=72144888&postcount=286
Easy. First, the file we are replacing is found in /system/etc... it is the "init.qcom.post_boot.sh" file - this file is basically shell scripts, which are applied at boot via this particular shell file.
All you have to do is download the zip file to your device, open up a file explorer (must have root capability) unzip the package, grab the file you want to use, navigate to the /system/etc folder with said file explorer, mount your /system as RW (read write), delete your stock "init.qcom.post_boot.sh" file, and replace it with mine.
After you've successfully done this, change the new file's permissions to rw-r--r-- (0644), and then reboot!
Or, if you are brave, you can do it manually via a terminal app and get your fingers wet... if you choose to do that, see below:
Make sure the file is located on the root of your internal sdcard in /sdcard, open your terminal app (again, must have root) and type the following commands, hitting enter after each one (be careful to pay attention to the spacing).
Code:
su
Code:
cd /
Code:
mount -o remount,rw /system
Code:
cd /system/etc
Code:
rm init.qcom.post_boot.sh
Code:
cd /sdcard
Code:
mv init.qcom.post_boot.sh /system/etc
Code:
chmod 0644 /system/etc/init.qcom.post_boot.sh
I don't want credit, don't need you to give or offer donations, this is purely for the community in the spirit of Linux ideology. All I ask is for you to hit the thanks button :good:
That's pretty much it, guys. Enjoy!
Links below
STOCK
6 GB
4 GB
AOSP (Using Latest Beast Mode Kernel with the /System/etc/gnfre3 folder present)
6 GB
4 GB
This is absolutely awesome! I have the 4GB model so I'm curious to take it for a spin once you upload. Happy to see devs cranking out goodies for this device! Thank you sir!
Sent from my ZTE A2017U using Tapatalk
dcscorpio76 said:
This is absolutely awesome! I have the 4GB model so I'm curious to take it for a spin once you upload. Happy to see devs cranking out goodies for this device! Thank you sir!
Sent from my ZTE A2017U using Tapatalk
Click to expand...
Click to collapse
Gotcha, bro. Its up... check it out
warBeard_actual said:
Gotcha, bro. Its up... check it out
Click to expand...
Click to collapse
Awesome. I'm on it. I'll report back tomorrow! Thank you bro!
Sent from my ZTE A2017U using Tapatalk
warBeard_actual said:
Well, this device is a breath of fresh air? Wouldn't you guys say? 128 GB ROM, 6 GB RAM and a monster of a processor!
That being said, custom tuning for a device is always a necessity. "Canned" settings will get you by, but they are certainly never optimized for a specific device. In fact, Linux typically takes a general approach to find harmonic balance in default settings that will, for the most part, work in an acceptable manner for just about any device. There are a lot of resources available on this device, so we should utilize it in a manner appropriate to squeeze out as much battery life and performance as possible without sacrificing much of those outputs, don't you think? This is going to fix that for you.
Here is what is required of you before you begin:
1. Must be rooted
2. Must have the ZTE Axon 7 OR a device running the Snapdragon 820, as this modification is not so much device specific, but hardware specific. The important aspect being the snapdragon 820 and the RAM disk size.
IT IS IMPORTANT THAT YOU USE THE CORRECT VERSION (RAM), AS THIS COULD HAVE UNDESIRABLE PERFORMANCE IMPACTS OTHERWISE... however, nothing will be permanently damaged, this won't turn your device into a paperweight.
Let's begin.
Getting right to it, here's what I've done:
- modified parameters of the interactive governor, and quite extensively at that (search some of my threads if you want a little bit of a breakdown of the general approach I take)
- reconfigured input_boost parameters
- reconfigured vm parameters (again, the device has a lot of RAM resource, this will utilize it and give you a far better user experience)
- disabled zRAM (RAM compression, again, not needed on this device really, this mod will save you CPU cycles and power)
- remapped minfree parameters for LMK (low memory killer)
In a nutshell, that's what we're looking at here. I can guarantee you this will have a significantly positive impact on your device. Turbo time, homies.
How to install????
Easy. First, the file we are replacing is found in /system/etc... it is the "init.qcom.post_boot.sh" file - this file is basically shell scripts, which are applied at boot via this particular shell file.
All you have to do is download the file to your device, open up a file explorer (must have root capability), navigate to the /system/etc folder with said file explorer, mount your /system as RW (read write), delete your stock "init.qcom.post_boot.sh" file, and replace it with mine.
After you've successfully done this, change the new file's permissions to rw-r--r-- (0644), and then reboot!
Or, if you are brave, you can do it manually via a terminal app and get your fingers wet... if you choose to do that, see below:
Make sure the file is located on the root of your internal sdcard in /sdcard, open your terminal app (again, must have root) and type the following commands, hitting enter after each one (be careful to pay attention to the spacing).
Code:
su
Code:
cd /
Code:
mount -o remount,rw /system
Code:
cd /system/etc
Code:
rm init.qcom.post_boot.sh
Code:
cd /sdcard
Code:
mv init.qcom.post_boot.sh /system/etc
Code:
chmod 0644 /system/etc/init.qcom.post_boot.sh
I don't want credit, don't need you to give or offer donations, this is purely for the community in the spirit of Linux ideology. All I ask is for you to hit the thanks button :good:
That's pretty much it, guys. Enjoy!
6GB VARIANT
4GB VARIANT
Click to expand...
Click to collapse
This will compliment my kernel nicely bro. Thanks.
freeza said:
This will compliment my kernel nicely bro. Thanks.
Click to expand...
Click to collapse
My bro freebro over here just quoting entire OP because he literally just doesn't gaf.
I swear if you don't drop me a link tonight we're fighting to the death, bro.
Dont have the file .I have only this file init.qcom.bt.sh .Is it right?
Thank you , Getting excited about all Devs coming to this device
Kevinkuensken said:
Dont have the file .I have only this file init.qcom.bt.sh .Is it right?
Click to expand...
Click to collapse
same here
Guido83 said:
same here
Click to expand...
Click to collapse
Are either of you on LOS? If so, that could be why.
warBeard_actual said:
Are either of you on LOS? If so, that could be why.
Click to expand...
Click to collapse
Resurrection Remix
Guido83 said:
Resurrection Remix
Click to expand...
Click to collapse
Well that's why. The file doesn't exist on that build. You won't be able to use it, unfortunately.
Im on aokp
Installed via ssh.
Everything seem to work great. i didn't really see a difference till now. But i'm sure it's a good mod. Thank you
awesome! glad to see more devs on this device. also, funny line you added at the beginning of the file. thanks? i guess....
after this command "mount -o remount,rw /system", the terminal says "mount:Read-only file system"
I don't know if my unit was rooted systemless or not. does it matter?
update: nevermind post above.. i just did the steps using TWRP terminal..
Thanks OP!
BTW, will this mod affect AKT Profiles? I am using project zhana battery atm.
@warBeard_actual could it work if put on /data/local renamed as userinit.sh? Seems on LOS (and other maybe based on aosp) there is a file in /system/etc/init.d/*userinit that would run that script post boot - http://android.stackexchange.com/questions/6558/how-can-i-run-a-script-on-boot
Or this script should work only on official ROM? Thanks
I'm curious about the AKT as well. I'm also on Zhana project?
Sent from my ZTE A2017U using XDA-Developers Legacy app
Does this work on LineageOS? or only on B15(stock)?
I immediately notice snappier response from phone. Number of my apps open much more quickly