[GUIDE] Jay's Recipe for Buttery Goodness (cross-posted from AF) (REVISED! 10/10/12)

Search This thread

Jay Aristide

Senior Member
Jun 27, 2011
996
894
49
Dyer, Tennessee
www.daede.com
IMPORTANT: If you updated your system to Android 4.1.2, *DO NOT* flash either _motley kernel, as they are built on 4.1.1 and contain the wrong interface to the power management chip. This will result in a bootloop at the least, and possibly much much worse

What we're doing, here, is turning your n7 into a multitasking muscle-machine, and giving it the I/O throughput to match. These instructions are for the stock ROM, but can be applied to any ROM with a little modification. Enjoy!

Do the OTA update to 4.1.1 (if you're stock and haven't, already), and then......

[KERNEL][GPL][Linaro][OC 1.6GHz][UV][GPU+][ZRAM][SIO+V(R)] 2012-08-10 motley 1.1.1


From that thread, you need:

a) the 1.1.1 kernel of your choice
b) the 1.0.5b kernel with ramdisk (if you're already running a custom ROM with init.d support, you don't need this, nor do you need to create /system/etc/init.d in a future step)

You'll also need:

a) root
b) cwm
c) busybox (absolute must, make sure your symlinks are proper)
d) some type of root-enabled text editor (I use root explorer)
e) a full featured cpu/sd management app (I use System Tuner)


BEYOND THIS POINT, THERE BE DRAGONS. I'm not responsible if you FUBAR your device, but if you follow my instructions to the letter, you won't

0.5) READ THIS ENTIRE POST BEFORE PROCEEDING

1) install cwm and root your tab (if you haven't already)

2) reboot into CWM, flash the 1.0.5b kernel with ramdisk (if you're on stock or a stock-based ROM without init.d support), then immediately flash the 1.1.1 kernel you chose (gpu overclocking is nice and all, but I haven't found a game that doesn't run perfectly with the stock GPU speed of 416MHz..Looks great on benchmarks, though)

3) reboot back into JB, fire up root explorer, remount /system rw, create a folder in /system/etc called init.d (permissions rwxr-xr-x), create a file in it called S90zRAMandSpeedTweaks (permissions rwxrwxrwx), and long-press to open it in a text editor

4) make it look like this:

Code:
#!/system/bin/sh

#remount /data for faster i/o
mount -o remount,noauto_da_alloc /data /data

#disable fsync (controversial, I've been doing it for years with no real issues)
echo 0 > /sys/class/misc/fsynccontrol/fsync_enabled

#set zRAM size (recommended sizes are 64 and 128, as this compresses an actual block of RAM. Setting it higher will likely impede performance)
echo $((1024*1024*128)) >  /sys/block/zram0/disksize

#use busybox to create and activate zram0, if busybox is not in /system/xbin, modify accordingly
/system/xbin/busybox mkswap /dev/block/zram0
/system/xbin/busybox swapon /dev/block/zram0
It's important to leave at least one trailing line in scripts. Just trust me, it's a linux thing.
*NOTE* The above script does NOT check to see if it was successful, but if you copied it directly and installed busybox to /system/xbin then it will work. Once you reboot in a few minutes, you can check by using the command "busybox free" from a terminal emulator or adb shell

5) Save the file, delete the .bak now in that folder, and close root explorer.

6) Open System Tuner, tap on the SD option, change cache to 1024 and scheduler to deadline

7) Tap the Voltage option and hit -25 4 times and save the settings as voltage_table_uv

8) Tap the CPU option and tap Boot Settings. For CPU and SD, set the method to init.d

9) Close System Tuner and reboot your device.

10 Profit/consume butter

It seems like a lot, but it really only takes about 15 minutes if you're a complete rooting n00b, and the end result is a buttery-smooth multitasking powerhouse (that blows iOS *away*). The 100mV undervolt also greatly extends battery life. I haven't had ANY issues at -100mV, but if you do, just increase it by hitting +25 on the voltage tab of System Tuner until you have something that works for you (in fact, you might want to start at -25mV and slowly grow it to -100mV, playing games and checking for instablity along the way)

It's also worth mentioning that if you're currently completely stock, you will need to unlock your bootloader to root and install CWM, and unlocking the bootloader wipes your device (no way around it, unfortunately. Hook your N7 up to your computer and backup the entire contents of /storage/sdcard0 to make restoring your data as painless as possible)

farmerbb's scripts - If you're having trouble getting your scripts to stick, or just don't want to be assed with installing System Tuner, use these! There are three different packages, for 64MB, 128MB, and 256MB zRam setups. Thanks, farmerbb!!

------- Revisions as of 9/1/12 -------

Fixed first line of script so it will actually run
Fixed zRam settings, as zRam is a block of actual RAM, not written to storage
Removed JRummy busybox installer as recommended. Use whichever you like, just make sure your symlinks are good :)
 
Last edited:

Harry GT-S5830

Senior Member
Apr 9, 2012
886
232
Dont suppose anyone has a copy if 1.0.5? Removed from Motleys OP

Nvm, went on web version and it was there :)

Sent from my Nexus 7 using xda app-developers app
 
Last edited:

bso44

Senior Member
Oct 2, 2010
3,405
853
Copied this over from the other thread to show that it works:

Here's my Androbench after applying the zRAM and fsync tweaks that Jay Aristide posted on page 6. I didn't really have a problem with lag but now my N7 is absolutely flying! Only minor annoyance is that my System Tuner settings won't stick after a reboot.

Screenshot_2012-08-26-17-50-49.png



And here's my Androbench before I did the tweaks for comparison:

Screenshot_2012-08-22-11-35-47.png
 
  • Like
Reactions: jastonas

ChrisJ951

Senior Member
Jan 25, 2011
494
307
*NOTE* The above script does NOT check to see if it was successful, but if you copied it directly and installed busybox to /system/xbin then it will work. Once you reboot in a few minutes, you can check by using the command "busybox free" from a terminal emulator or adb shell
/QUOTE]

What should it say here if it worked? Thanks for the guide
 

guinnes.s

Senior Member
May 11, 2009
739
28
www.cabscentralbracknell.co.uk
so just to make sure before attempting this mod:
im on stock 4.1.1 rooted with cwm

i need :???????
motley_nexus7_with_stock_ramdisk_v1.0.5_build_39.zip

and witch one of those??

motley_anykernel_nexus7_1.1.1_NoGPUOC_build_220.zip (GPU stock 416GHz)
motley_anykernel_nexus7_1.1.1_GPU484_build_219.zip (GPU OC 484MHz)
motley_anykernel_nexus7_1.1.1_GPU520_build_218.zip (GPU OC 520MHz)

thanx
 

BIGSimon

Senior Member
Jan 19, 2012
556
807
Barnsley
so just to make sure before attempting this mod:
im on stock 4.1.1 rooted with cwm

i need :???????
motley_nexus7_with_stock_ramdisk_v1.0.5_build_39.zip

and witch one of those??

motley_anykernel_nexus7_1.1.1_NoGPUOC_build_220.zip (GPU stock 416GHz)
motley_anykernel_nexus7_1.1.1_GPU484_build_219.zip (GPU OC 484MHz)
motley_anykernel_nexus7_1.1.1_GPU520_build_218.zip (GPU OC 520MHz)

thanx

Yes to the first one and take your pick with the second ones the only difference is the GPU overclock, stock works just fine so try that first

Sent from my CM9 TouchPad using Tapatalk 2
 

Harry GT-S5830

Senior Member
Apr 9, 2012
886
232
so just to make sure before attempting this mod:
im on stock 4.1.1 rooted with cwm

i need :???????
motley_nexus7_with_stock_ramdisk_v1.0.5_build_39.zip

and witch one of those??

motley_anykernel_nexus7_1.1.1_NoGPUOC_build_220.zip (GPU stock 416GHz)
motley_anykernel_nexus7_1.1.1_GPU484_build_219.zip (GPU OC 484MHz)
motley_anykernel_nexus7_1.1.1_GPU520_build_218.zip (GPU OC 520MHz)

thanx

The middle one works best IMO, but they will all do what you seek :)

Sent from my Nexus 7 using xda app-developers app
 

Jay Aristide

Senior Member
Jun 27, 2011
996
894
49
Dyer, Tennessee
www.daede.com
done, it seems is not working i still have no numbers next to "Swap" instead of just zeroes

Did you run the busybox installer you downloaded from the play store and have it install busybox to /system/xbin?

From terminal emulator, type

busybox which busybox

If it says anything other than /system/xbin/busybox you'll need to modify the script accordingly

Sometime in the next couple days, I'm going to make a cwm-flashable zip that does everything.. I just need to read up on how :p
 

guinnes.s

Senior Member
May 11, 2009
739
28
www.cabscentralbracknell.co.uk
Did you run the busybox installer you downloaded from the play store and have it install busybox to /system/xbin?

From terminal emulator, type

busybox which busybox

If it says anything other than /system/xbin/busybox you'll need to modify the script accordingly

Sometime in the next couple days, I'm going to make a cwm-flashable zip that does everything.. I just need to read up on how :p

Yes is installed in the right place and typing the busybox command it gives that directory. I jus copy and paste ur code when creating the file? ?is that OK, I have the 16gb model.
 

bso44

Senior Member
Oct 2, 2010
3,405
853
done, it seems is not working i still have no numbers next to "Swap" instead of just zeroes

Mind didn't work until I ran the script via Script Manager. Download the app, find that zRAM script file you created in the init.d folder, select it, choose script, press the SU & boot icon up top and press Run. You'll see it run in command and say zRAM successful. Press Back and then save it.

For some reason, System Tuner doesn't seem to want to play nice with this script - at least for me.
 
  • Like
Reactions: volcan96

Top Liked Posts

  • There are no posts matching your filters.
  • 77
    IMPORTANT: If you updated your system to Android 4.1.2, *DO NOT* flash either _motley kernel, as they are built on 4.1.1 and contain the wrong interface to the power management chip. This will result in a bootloop at the least, and possibly much much worse

    What we're doing, here, is turning your n7 into a multitasking muscle-machine, and giving it the I/O throughput to match. These instructions are for the stock ROM, but can be applied to any ROM with a little modification. Enjoy!

    Do the OTA update to 4.1.1 (if you're stock and haven't, already), and then......

    [KERNEL][GPL][Linaro][OC 1.6GHz][UV][GPU+][ZRAM][SIO+V(R)] 2012-08-10 motley 1.1.1


    From that thread, you need:

    a) the 1.1.1 kernel of your choice
    b) the 1.0.5b kernel with ramdisk (if you're already running a custom ROM with init.d support, you don't need this, nor do you need to create /system/etc/init.d in a future step)

    You'll also need:

    a) root
    b) cwm
    c) busybox (absolute must, make sure your symlinks are proper)
    d) some type of root-enabled text editor (I use root explorer)
    e) a full featured cpu/sd management app (I use System Tuner)


    BEYOND THIS POINT, THERE BE DRAGONS. I'm not responsible if you FUBAR your device, but if you follow my instructions to the letter, you won't

    0.5) READ THIS ENTIRE POST BEFORE PROCEEDING

    1) install cwm and root your tab (if you haven't already)

    2) reboot into CWM, flash the 1.0.5b kernel with ramdisk (if you're on stock or a stock-based ROM without init.d support), then immediately flash the 1.1.1 kernel you chose (gpu overclocking is nice and all, but I haven't found a game that doesn't run perfectly with the stock GPU speed of 416MHz..Looks great on benchmarks, though)

    3) reboot back into JB, fire up root explorer, remount /system rw, create a folder in /system/etc called init.d (permissions rwxr-xr-x), create a file in it called S90zRAMandSpeedTweaks (permissions rwxrwxrwx), and long-press to open it in a text editor

    4) make it look like this:

    Code:
    #!/system/bin/sh
    
    #remount /data for faster i/o
    mount -o remount,noauto_da_alloc /data /data
    
    #disable fsync (controversial, I've been doing it for years with no real issues)
    echo 0 > /sys/class/misc/fsynccontrol/fsync_enabled
    
    #set zRAM size (recommended sizes are 64 and 128, as this compresses an actual block of RAM. Setting it higher will likely impede performance)
    echo $((1024*1024*128)) >  /sys/block/zram0/disksize
    
    #use busybox to create and activate zram0, if busybox is not in /system/xbin, modify accordingly
    /system/xbin/busybox mkswap /dev/block/zram0
    /system/xbin/busybox swapon /dev/block/zram0
    It's important to leave at least one trailing line in scripts. Just trust me, it's a linux thing.
    *NOTE* The above script does NOT check to see if it was successful, but if you copied it directly and installed busybox to /system/xbin then it will work. Once you reboot in a few minutes, you can check by using the command "busybox free" from a terminal emulator or adb shell

    5) Save the file, delete the .bak now in that folder, and close root explorer.

    6) Open System Tuner, tap on the SD option, change cache to 1024 and scheduler to deadline

    7) Tap the Voltage option and hit -25 4 times and save the settings as voltage_table_uv

    8) Tap the CPU option and tap Boot Settings. For CPU and SD, set the method to init.d

    9) Close System Tuner and reboot your device.

    10 Profit/consume butter

    It seems like a lot, but it really only takes about 15 minutes if you're a complete rooting n00b, and the end result is a buttery-smooth multitasking powerhouse (that blows iOS *away*). The 100mV undervolt also greatly extends battery life. I haven't had ANY issues at -100mV, but if you do, just increase it by hitting +25 on the voltage tab of System Tuner until you have something that works for you (in fact, you might want to start at -25mV and slowly grow it to -100mV, playing games and checking for instablity along the way)

    It's also worth mentioning that if you're currently completely stock, you will need to unlock your bootloader to root and install CWM, and unlocking the bootloader wipes your device (no way around it, unfortunately. Hook your N7 up to your computer and backup the entire contents of /storage/sdcard0 to make restoring your data as painless as possible)

    farmerbb's scripts - If you're having trouble getting your scripts to stick, or just don't want to be assed with installing System Tuner, use these! There are three different packages, for 64MB, 128MB, and 256MB zRam setups. Thanks, farmerbb!!

    ------- Revisions as of 9/1/12 -------

    Fixed first line of script so it will actually run
    Fixed zRam settings, as zRam is a block of actual RAM, not written to storage
    Removed JRummy busybox installer as recommended. Use whichever you like, just make sure your symlinks are good :)
    5
    Gotcha. I've got to say...it's amazing what you can do in Android with the help of the XDA community. You guys are awesome.

    Thanks, man. It should be pretty obvious by now that I'm learning as much as you guys are as I go, here. My helpful nature insists on a 'pay it forward' mentality, so as I learn something, I do my best to educate others, as well :)

    Now, to go see if the new Dr. Who is available anywhere, yet.. TTYL & never stop learning!
    5
    If anyone's still having trouble getting this to work, here's some premade script packages, with differing zRAM values. The number in the filename of each zip gives you that many megabytes of zRAM. The "0MB" package completely disables zRAM. 64MB and 128MB are the values that are recommended by Jay. The 256MB version is great if you're a heavy multitasker like me :)

    Extract these to /system/etc/init.d/ (if you're on a CyanogenMod-based ROM, it's better to use /data/local/userinit.d/). Set the permissions to rwxrwxrwx, and enjoy!
    4
    I'm sure this is a stupid question, bare with me I'm a noob. But since I'm running a CM based rom, I need to create a folder called userinit.d and put the scripts in there?

    Sent from my Nexus 7 using xda premium

    Normally what you'd do is install the script to the /system/etc/init.d/ folder. CyanogenMod ROMs also run init.d scripts from another place: the /data/local/userinit.d/ folder. This puts the script on your /data partition instead, so that when you upgrade to a new version of your ROM you don't have to put it on /system again (because /system is wiped whenever you update CM)
    3
    I'm out of thanks for the next few hours, so here's a ^5! Glad it's working well for you :)