Zram customisation - LG Optimus 4X HD

hi,
{
"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"
}
i'm creating this new thread in order to help bring back to life our p880.
Android is like linux (of course it is)
it caches the background processes that are not currently in use and uses the physical ram for only the active apps.
But what happens if the app needs more physical ram ?
It has 2 ways to get it.
1. zram
2. swap
Let's go first with swap. Swap is slow, it uses the disk storage for "physical ram" but it's not a physical ram.
It only emulates the physical ram. What does this mean ? It does exactly what ram does.
But ram is at least 1 milisecond faster than hard disk. What ram does in 1ns (depends on the ram) the hard disk do it in 1ms (maybe more, depends on the disk).
Ram writes and reads every single "thing" the cpu needs to calculate and it's not found in L1,L2,etc cache...
Ram is our no1 upgrade on a pc hardware when we need to make it faster, because it cooperates with the cpu at everything. (cannot explain it with more simple words)
Zram on the other hand it's compressed physical ram. This way we sucrifice a very tiny amount of physical ram speed and cpu usage to compress the physical ram. But cpu and ram are 1 million times faster than the hard disk.
check your available ram
Code:
adb shell free
Anyway, below i will show you a way to double or triple your zram.
Download my attached file below,unzip and place it in /system/etc/init.d
Code:
adb root
adb remount
adb push <path to file>/97zram /system/etc/init.d/
check permissions and ownership.
They must be 755 and root:shell. If they are not, then do:
Code:
adb shell
su
chmod 755 /system/etc/init.d/97zram
chown root:shell /system/etc/init.d/97zram
Good. Now navigate back to /system/build.prop and open it like a text to edit it
At the end add the line:
Code:
persist.service.zram=200
200 is the size and it means 200% of the physical ram.
Of course you can use a lower value if you want.
Now reboot.
check again the available ram.
adb shell free
Surprise.
How much of ram do you have now ?
phys.ram + zram = ???
If you like it, hit thanks.
*If your init.d isn't executed on boot for some reason *maybe supersu blocks it *maybe the kernel has some mistake *for any reason ... you can use kernel adiutor to emulate init.d on boot.
**For those that don't have init.d support by their kernel , they must install busybox to install sysinit or/and init
***Those that don't have zram partition at all, too bad, change kernel because that one doesn't support zram at all.
XDA:DevDB Information
Zram and various tweaks for p880, Tool/Utility for the LG Optimus 4X HD
Contributors
kessaras
Version Information
Status: Stable
Created 2016-12-22
Last Updated 2017-03-22

p880 full/all tweaks
this is a script that goes in pair with my 97zram script.
In addition now in this script i have set some tweaks , as many as i can and only those that are not harmful and can damage a phone.
- Better mount point flags
- Internal storage:
nomerges
nr_requests
lower safe read_ahead_kb
cfq scheduler
remove add_random (if its enabled in the kernel by default)
rq_affinity
- external storage:
nomerges
nr_requests
lower safe read_ahead_kb
cfq scheduler
remove add_random (if its enabled in the kernel by default)
rq_affinity
- Net and virtual memory:
tcp_congestion_control
disable_ipv6
dirty_writeback_centisecs
dirty_expire_centisecs
dirty_background_ratio
dirty_ratio
drop_caches
kernel.panic
min_free_kbytes
overcommit_ratio
panic_on_oom
full swappiness
vfs_cache_pressure
- Kernel customisations
disable ksm
lowmemorykiller
read_wakeup_threshold
write_wakeup_threshold
- Only the safe internet customisations
tcp_timestamps
tcp_tw_reuse
tcp_sack
tcp_tw_recycle
tcp_window_scaling
tcp_keepalive_probes
tcp_keepalive_intvl
tcp_fin_timeout
- Reduce Vibration strength
How to "install" it ? Simple. just like you "installed" the zram script.
Set exactly same permissions, set ownership to root:shell and reboot.

Reserved for OP (Future use) If Needed

kessaras said:
hi,
i'm creating this new thread in order to help bring back to life our p880.
Android is like linux (of course it is)
it caches the background processes that are not currently in use and uses the physical ram for only the active apps.
But what happens if the app needs more physical ram ?
It has 2 ways to get it.
1.zram
2.swap
Let's go first with swap. Swap is slow, it uses the disk storage for "physical ram" but it's not a physical ram.
It only emulates the physical ram. What does this mean ? It does exactly what ram does.
But ram is at least 1 milisecond faster than hard disk, what ram does in 1ns (maybe less, depends on the ram, but not slower) disk does it in 1ms (maybe more maybe less, depends on the disk).
Ram writes and reads every single "thing" the cpu needs to calculate and it's not found in L1,L2,etc cache...
Ram is our no1 upgrade on a pc hardware when we need to make it faster, because it cooperates with the cpu at everything. (cannot explain it with more simple words)
Zram on the other hand it's compressed physical ram. This way we sucrifice a very tiny amount of physical ram speed and cpu usage to compress the physical ram. But cpu and ram are 1 million times faster than the hard disk.
check your available ram
Anyway, below i will show you a way to double or triple your zram.
Download my attached file below,unzip and place it in /system/etc/init.d
check permissions , owner and group.
Our current kernels now that are also compatible with f2fs do that by default, but you must check it , just in case they aren't set by default.
Good. Now navigate back to /system/build.prop and open it like a text to edit it
At the end add the line:
200 is the size and it means 200% of the physical ram.
Of course you can use a lower value if you want.
Now use kernel adiutor to emulate init.d on boot since it's not enabled by default.
Now reboot.
check again the available ram.
adb shell free
Surprise.
How much of ram do you have now ?
phys.ram + zram = ???
If you like it, hit thanks.
**The 98balance is just a gift from me.
Those are my default settings for everyday use.
Init.d can do anything if we have some time to manually make our own script.
Have fun
XDA:DevDB Information
Zram, Tool/Utility for the LG Optimus 4X HD
Contributors
kessaras
Version Information
Status: Stable
Created 2016-12-22
Last Updated 2016-12-22
Click to expand...
Click to collapse
I copy the file to /system/init.d by file explorer. I can set permisdion to 755 but I can"t change the group to shell (the only option is root)
Then I modified the build prop as suggested and activated emulated init in Kernel Adiutor.
After reboot my ram still not changed.
Any suggestion?
Sent from my LG-P880 using XDA Labs

masmoe said:
I copy the file to /system/init.d by file explorer. I can set permisdion to 755 but I can"t change the group to shell (the only option is root)
Then I modified the build prop as suggested and activated emulated init in Kernel Adiutor.
After reboot my ram still not changed.
Any suggestion?
Click to expand...
Click to collapse
Use another file manager that has more options.
It works only if kernel supports init.d.

kessaras said:
Use another file manager that has more options.
It works only if kernel supports init.d.
Click to expand...
Click to collapse
In which ROM you have tested this?? And What kernel you had tested with.

Salman Al-Badgail said:
In which ROM you have tested this?? And What kernel you had tested with.
Click to expand...
Click to collapse
Aosp6. Works on aosp7 and all.
Also works on almost any Rom. Omni,rr and more. It won't work only to kernels that don't support init.d

kessaras said:
Aosp6. Works on aosp7 and all.
Also works on almost any Rom. Omni,rr and more. It won't work only to kernels that don't support init.d
Click to expand...
Click to collapse
Thanks for reply, Can you tell me what is limit for extending RAM or in other words maximum limit of this RAM

Salman Al-Badgail said:
Thanks for reply, Can you tell me what is limit for extending RAM or in other words maximum limit of this RAM
Click to expand...
Click to collapse
At 250 it gave me an error. I believe it's close to 200 the limit

Did it only changed the swap or zram happens to be called swap when running "free"?
That was my output:
Code:
$ free -m
total used free shared buffers cached
Mem: 968 936 32 0 1 279
-/+ buffers/cache: 655 313
Swap: 1453 30 1422
Edit:
Forgot to mention:
Code:
persist.service.zram=150

Danielcdar said:
Did it only changed the swap or zram happens to be called swap when running "free"?
That was my output:
Code:
$ free -m
total used free shared buffers cached
Mem: 968 936 32 0 1 279
-/+ buffers/cache: 655 313
Swap: 1453 30 1422
Edit:
Forgot to mention:
Code:
persist.service.zram=150
Click to expand...
Click to collapse
exactly. good job. swap is called anyway. there isn't a word like zram anywhere. zram we call it because we use the ram to swap not the hard disk :good:

kessaras said:
exactly. good job. swap is called anyway. there isn't a word like zram anywhere. zram we call it because we use the ram to swap not the hard disk :good:
Click to expand...
Click to collapse
Cool, but, for it to work I had to manually run
Code:
swapoff /dev/block/zram0
Tried adding
Code:
busybox swapoff dev/block/zram0
To your script, but, I guess the rest of the script is executed before it finishes "cleaning" the swap, and I am no programmer.

kessaras said:
Use another file manager that has more options.
It works only if kernel supports init.d.
Click to expand...
Click to collapse
I am on AOSP 7.1.1 and use es explorer pro.
Are any option in Developer menu should be activated? Or should I install adb application?
Btw I use Termux for terminal.
Sent from my LG-P880 using XDA Labs

Danielcdar said:
Cool, but, for it to work I had to manually run
Code:
swapoff /dev/block/zram0
Tried adding
Code:
busybox swapoff dev/block/zram0
To your script, but, I guess the rest of the script is executed before it finishes "cleaning" the swap, and I am no programmer.
Click to expand...
Click to collapse
busybox echo 1 > /sys/block/zram0/reset
does swap off too why add
busybox swapoff dev/block/zram0 ?
but you gave me a great idea too for those that don't have init.d support in the kernel.
they can also download busybox to add init.d support. these days that i will have some free time i will improve it.
does not work for you ? if you want it to wait before it creates the new zram, give it the command
sleep 1
1 is time in seconds = 1 second
make it wait as much time you want
masmoe said:
I am on AOSP 7.1.1 and use es explorer pro.
Are any option in Developer menu should be activated? Or should I install adb application?
Btw I use Termux for terminal.
Sent from my LG-P880 using XDA Labs
Click to expand...
Click to collapse
es explorer never shows the group shell right ?
use root explorer or enable adb and do
Code:
adb shell
su
mount -o remount rw /system
chmod 755 /system/etc/init.d/97zram
chown root:shell /system/etc/init.d/97zram
or in a terminal inside your p880
Code:
su
mount -o rw remount /system
chmod 755 /system/etc/init.d/97zram
chown root:shell /system/etc/init.d/97zram

adb shell command not found. Is it missing something?
Sent from my LG-P880 using XDA Labs

Thanks for the info man, now i know how works zram and how configure it well

Thank you. It seems working

masmoe said:
adb shell command not found. Is it missing something?
Sent from my LG-P880 using XDA Labs
Click to expand...
Click to collapse
adb is used to open a port on pc for communication with the phone.
when we are in the phone terminal we directly do the command without adb , adb shell, etc.
for example :
Code:
cat /proc/sys/vm/swappiness/
to see our swappiness
at my previous post i gave you other commands to use inside p880

kessaras said:
adb is used to open a port on pc for communication with the phone.
when we are in the phone terminal we directly do the command without adb , adb shell, etc.
for example :
to see our swappiness
at my previous post i gave you other commands to use inside p880
Click to expand...
Click to collapse
I succesfully change permisdion and owner. I activated emulated init.d by kernel adiutor also but my swap dize still not changed. Any hints?
Sent from my LG-P880 using XDA Labs

masmoe said:
I succesfully change permisdion and owner. I activated emulated init.d by kernel adiutor also but my swap dize still not changed. Any hints?
Sent from my LG-P880 using XDA Labs
Click to expand...
Click to collapse
Init.d support missing in that kernel you are on now.
install busybox to enable init.d or change kernel

Related

changing and editing user configurable

Hello, I follow the instruction on how to enable linux swap, cpu, and virtual memory here http://forum.xda-developers.com/showthread.php?t=542899
when but i typed those commands in the terminal to enable them
su
#linux_swap_en=1
#sys_vm_en=1
#proc_cpu_en=1
#reboot
after a reboot, i check, it doesn't seem to me those are enable. Can you please tell me if i am doing it right?
I'm running Cyan latest rom, I have 1gb ext2, 32 mb linux swap.
Much thanks.
you have to change it in the actual file, not enter it in the terminal. then push the file to your phone and chmod 775 it
oh ok, thanks. So i'm running cyan's rom, can you recommend which settings are best to get them enable?
i haven't really experimented with the user.conf setting much since i have been working on my theme. i use the compache 32mb with linux-swap 32mb with whatever the all the other standard settings are in the user.conf file.

[TWEAKS][UPDATED 1/05/2011 - Flashable .zips] Performance and battery tweaks

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.

[Script]Swap2cache (make use of unused Memory)

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

[BOOT IMAGE][GT-P31XX] KK-Boot - Custom boot image for stock 4.1.1/4.1.2 ROM

ROOTING, TWEAKING, NEW GPU DRIVER, CPU AND/OR GPU OVERCLOCK​
Using CyanogenMod kernel source from https://github.com/kumajaya/android_kernel_samsung_espresso10/tree/cm-10.1-blackhawk for both P31xx and P51xx target, from codeworkx and heavily modified by me
CPU clock: 300MHz, 600MHz, 800MHz, 1.008GHz, 1.2GHz, 1.35GHz, 1.42GHz, 1.48GHz, and 1.52GHz, locked @ 1.008GHz on boot, thanks to cmenard
CPU voltage control, thanks to cmenard. You can use Android Tuner or System Tuner to set CPU voltage
GPU clock: 153.6MHz, 307.2MHz, 384MHz, and 512MHz, 384MHz as the default maximum clock, thanks cmenard
The ramdisk base on JB 4.1.2 ramdisk, thanks to Google and Samsung
Using newer PowerVR SGX 540 kernel modules and binaries blob build [email protected], thanks to omapzoom.org
row (thanks to gokhanmoral), sio, and vr scheduler support
Governor bug fix, replace Samsung's interactive governor with default OMAP4 3.0.31 interactive governor from omapzoom.org, pegasusq and lulzactive governor from gokhanmoral
ntfs read-only (not loaded by default), exFAT, NFS (not loaded by default) and CIFS/samba (loaded by default) filesystem support
LZO compressed kernel and initrd, bigger but faster
swap support
kernel config, insmod configs.ko and then you can access /proc/config.gz
external modem support, for PPP Widget (not loaded by default, P31xx need powered USB hub for external modem)
Some tweaks from gokhanmoral's siyahkernel for S3
Remove a lot of debug message from touchscreen driver, display, mmc, modem, etc
linaro arm-linux-gnueabihf- cross compiler
SuperSU v1.25 by Chainfire
No-frills CPU Control v1.26 by hrk
BusyBox v1.20.2-cm9 bionic (2012-07-14 01:52 +0200) in /sbin, will overwrite busybox in /system/bin or /system/xbin and save it as busybox.backup
nano and bash from CyanogenMod 9, sysrw and sysro from dsixda Android Kitchen
Early boot scripts support (/system/etc/init.d, /data/local/userinit.sh, and /data/local/userinit.d)
Post boot script support (/system/etc/init.post_boot.sh), use it to swap between external SD card and internal media
Custom boot animation support (/data/local/bootanimation.zip or /system/media/bootanimation.zip if exists, Samsung boot animation as a fallback). If a bootanimation.zip found, the boot sound will be turned off as well as the shutdown animation.
Modified mount options
adb mode in charge state, thanks to codeworkx
adb insecure
Advanced TCP congestion support, westwood as the default congestion (recommended by someone but I forgot)
No /system/etc/hosts patch, you can install one of ads blocker form Google Play (i.e. AdAway)
KNOWN BUGS/UNSUPPORTED FEATURES:
Youtube HD bug WiFi driver update fix this issue, thank to paraiso-san since this solution is achieved because his cooperation and "pressure" as well
Using this boot image, you will lose exFAT filesystem kernel support
In certain situations (MTP transfers, wireless transfers), CPU frequency sometimes exceeds maximum frequency setting Finally, I managed to fix it :victory:
INSTALL:
There are 2 choices of installation: without overclock (*core* filename) and overclock version (*addon-oc* filename). All *addon* require the *core* package, otherwise your device will be soft brick because the graphics subsystem will fail to start. Confused? Do not download any package! Flash this using the latest CWM recovery at your own risk.
For GPU overclock, change:
Code:
echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/gpu_oc
to:
Code:
echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/gpu_oc
in /system/etc/init.d/00boot or run above command on "Terminal Emulator" or "adb shell" as root every boot
To set your external SD card as internal SD card, over "adb shell" or Terminal Emulator:
Code:
su
setprop persist.customboot.sdcard external
and then reboot your device.
To restore SD card default mount point:
Code:
su
setprop persist.customboot.sdcard internal
and then reboot your device.
BIG FAT WARNING: If you set your external SD card as internal media, always turn off your device first before ejecting your card!
To set your preload partition as swap partition, over "adb shell" or Terminal Emulator:
Code:
su
setprop persist.customboot.swap true
and then reboot your device.
To disable preload partition as swap partition:
Code:
su
setprop persist.customboot.swap false
and then reboot your device.
This kernel has driver and filesystem modules are not enabled by default, edit /system/etc/init.d/01modules to enable NFS filesystem, NTFS filesystem (read-only), and USB GSM & CDMA modem driver for PPP Widget or to change TCP congestion
DOWNLOAD:
kkboot-0.6.0-core-p31xx.zip (10.4 MB)
kkboot-0.6.0-addon-oc-p31xx.zip (5.3 MB)
kkboot-0.6.0-addon-exfat-p31xx.zip (5.7 MB)
kkboot-0.6.0-addon-oc-exfat-p31xx.zip (5.7 MB)
CREDITS:
Linux, Google, Samsung, Texas Instruments/omapzoom.org, CyanogenMod developers, Chainfire, dsixda, cmenard, gokhanmoral, hrk, imoseyon, coolbho3k, Faux123
Discontinued, for historical purpose only!
---------- KK-Boot for stock 4.0.4 ROM ----------
ROOTING, TWEAKING, and GPU BOOSTER​
CONFIRMATION NEEDED:
Is external as internal sdcard solution break MTP support? My Ubuntu 12.04 MTP support is broken and still have no time to solve this problem
Base on P3100XXBLE3_P3100OLBBLE2_XSE boot image, stock kernel 3.0.8-583493-user including kernel modules ("stock-espresso" version)
Base on codeworkx's CyanogenMod samsung_espresso10 kernel source ("cw-espresso" and "cw-maguro" version)
Using stock 4.0.4 GPU binaries, build [email protected] ("stock-espresso" and "cw-espresso" version)
Using Galaxy Nexus 4.0.4 GPU binaries, build [email protected] ("cw-maguro" version)
SuperSU v0.96 by Chainfire
BusyBox v1.20.2-cm9 bionic (2012-07-14 01:52 +0200) in /sbin, will overwrite busybox in /system/bin or /system/xbin and save it as busybox.backup
Scripts support (busybox run-parts /system/etc/init.d, /system/bin/customboot.sh, /system/xbin/customboot.sh and /data/local/customboot.sh)
Post boot script support using /system/etc/init.post_boot.sh
Custom boot animation (/data/local/bootanimation.bin, /data/local/bootanimation.zip, /system/media/bootanimation.zip, or /system/bin/samsungani). Galaxy Nexus 4.0.4 factory images boot animation included in /data/local
Enable/disable boot sound
Enable/disable external sdcard as internal sdcard. /data/media mounted to /mnt/media using a modified sdcard binary
/sbin/propset and /sbin/propget scripts as a simple persistent property writer and reader
/system/lib/modules/cifs.ko kernel module for samba share support (all version, including dns_resolver.ko and md4.ko for "stock-espresso")
/system/lib/libion.so and /system/lib/libtiutils.so taken from stock 4.0.3 GT-P3100 firmware to enable hardware accelleration video ("cw-espresso" and "cw-maguro")
Remount all ext4 partition (except /efs) with noauto_da_alloc,barrier=1,noatime,nodiratime options (new in KK-Boot 0.2)
adb insecure
No /system/etc/hosts patch, you can install one of ads blocker form Play.
TIP:
SuperSU have a strange force close issue in 4.0.4, disable notification in SuperSU settings resolve the problems!
DOWNLOAD:
Stock 4.0.4 kernel and stock 4.0.4 GPU binaries: kkboot-0.2-stock-espresso-p3100.zip
Samsung epresso10 kernel source from codeworkx, GPU and video driver revert back to Samsung GT-P3100 kernel source and stock 4.0.4 GPU binaries: kkboot-0.2-cw-espresso-p3100.zip
Samsung espresso10 kernel source from codeworkx, GPU driver and video revert back to epresso10 ics branch and Galaxy Nexus ("maguro") GPU binaries: kkboot-0.2-cw-maguro-p3100.zip = 3D performance booster without overclocking!
Samsung espresso10 kernel source from codeworkx, Galaxy Nexus ("maguro") 4.1.1 GPU binaries: kkboot-0.2-cw-maguro_jb-p3100.zip = 3D performance booster without overclocking! 2D transition feel slower than "cw-maguro" (confirmation needed)
KK-Boot update, "cw-maguro" for now: kkboot-0.3-cw-maguro-p3100.zip
CREDITS:
Google, Samsung, codeworkx, Chainfire
A modified Google Gears Boot Animation from ZeroXtreme, attached here as bootanimation.zip
To disable boot sound:
Code:
# propset customboot.bootsnd disabled
# reboot
To enable boot sound:
Code:
# propset customboot.bootsnd enabled
# reboot
Link /mnt/sdcard to /mnt/extSdCard:
Code:
# propset customboot.sdcard external
# reboot
Link /mnt/sdcard to /mnt/media (/data/media):
Code:
# propset customboot.sdcard internal
# reboot
Flash this using CWM recovery at your own risk!
Click to expand...
Click to collapse
Again - reserved !
How to modify Google Gears Boot Animation from ZeroXtreme for KK-Boot:
Edit desc.txt to:
Code:
600 600 60
p 0 0 part2
Resize to 600x600 and rotate -90 degrees, have to manually rename part2/*.jpg before zip:
Code:
$ convert -resize '600x600^' -gravity center -crop 600x600+0+0 +repage -rotate -90 part0/anim*.png part2/anim.jpg
$ rm bootanimation.zip
$ zip -0 -r bootanimation.zip desc.txt part2
$ adb push bootanimation.zip /data/local/
thanks gan..
its so glad to see you here... :thumbup:
Nice!!! I'll give it a try ,,,, does it automatically mounts ,the ext SD card, as main sdcard? Thanks
Sent from my GT-P3100 using xda app-developers app
Have Have you tried this on p3100??
NEOHACK
No I haven't,,, I don't even know, which ROM , to be on..
Sent from my GT-P3100 using xda app-developers app
CXENTE said:
Nice!!! I'll give it a try ,,,, does it automatically mounts ,the ext SD card, as main sdcard? Thanks
Sent from my GT-P3100 using xda app-developers app
Click to expand...
Click to collapse
Yes, propset settings persistent. Internal sdcard mounted on /mnt/media, /mnt/sdcard linked to /mnt/media or /mnt/extSdCard on boot depend on customboot.sdcard value.
CXENTE said:
No I haven't,,, I don't even know, which ROM , to be on..
Sent from my GT-P3100 using xda app-developers app
Click to expand...
Click to collapse
Tested on stock 4.0.4 P3100.
OK,, I'm going too try it ,,. report back...
Flash it.. sdcard still they same.. is there a script, or something? Thats suppose too be ran?
Sent from my GT-P3100 using xda app-developers app
This is off-topic, but can you help me out? I'm trying to unpack the CM10 boot image, but the only instructions I can find are here. When I do these, I get the following error upon running "perl unpack-bootimg.pl boot.img":
Code:
cpio: default.prop: Function not implemented
gunzip: ../boot.img-ramdisk.cpio.gz: invalid compressed data--format violated
cpio: premature end of file
@Macadamia
You can use my helper script:
[DEVELOPERS TOOLS] Unpack, repack boot.img, and editing boot logo
CXENTE said:
OK,, I'm going too try it ,,. report back...
Flash it.. sdcard still they same.. is there a script, or something? Thats suppose too be ran?
Sent from my GT-P3100 using xda app-developers app
Click to expand...
Click to collapse
Open Terminal Emulator or "adb shell" and type:
Code:
su
propset customboot.sdcard external
Reboot.
ketut.kumajaya said:
Open Terminal Emulator or "adb shell" and type:
Code:
su
propset customboot.sdcard external
Reboot.
Click to expand...
Click to collapse
Oh snap!!!!... I should have known
Sent from my GT-P3100 using xda app-developers app
ketut.kumajaya said:
@Macadamia
You can use my helper script:
[DEVELOPERS TOOLS] Unpack, repack boot.img, and editing boot logo
Click to expand...
Click to collapse
So, I'm trying these, but whenever I try to execute unpackbootimg I get a "No such file or directory" error. I have verified I am in the right directory and all the files are in place.
Macadamia Daze said:
So, I'm trying these, but whenever I try to execute unpackbootimg I get a "No such file or directory" error. I have verified I am in the right directory and all the files are in place.
Click to expand...
Click to collapse
Make sure you are in the root of blackhawk-tools:
Code:
chmod 755 unpackbootimage.sh
chmod 755 repackbootimage.sh
chmod 755 tools/*
Is this only for stock, or will it work on AOKP JB ?
Thanks.
ketut.kumajaya said:
Make sure you are in the root of blackhawk-tools:
Code:
chmod 755 unpackbootimage.sh
chmod 755 repackbootimage.sh
chmod 755 tools/*
Click to expand...
Click to collapse
I did that, but it turned out to be a different issue. I had just installed 64-bit Ubuntu, so I had to download ia32-libs in order to execute these files. Now it works. Thanks!
It seems KK-Boot need a new cool boot animation, any ideas? Now I have 2 version of KK-Boot, one with improved 3D performance. The kernel base on codeworkx's code, tuna pvr driver, and maguro (Galaxy Nexus) blob. Hardware acceleration video works!
{
"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"
}

12/4/2017 [] war_mod [] Axon 7 (msm 8996) [] CPU, GPU, VM, RAM, IO "Tune"

************
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

Categories

Resources