yashsingh1/xdaforums huggingface dataset:
[Nexus 7 Original Development] phonic:
Option 2:

1) Install/Run a Terminal Emulator, or open up an ADB shell session.

2) Issue the following commands: (comments in parenthesis)

su (superuser- actually, technically this command is "switch user", with root/superuser being the default if a username isn't specified)

mount -o rw,remount /system (remount /system as read-write)

mkdir /system/etc/init.d (make init.d directory)

chmod 755 /system/etc/init.d (set the permissions properly - probably not needed since it should be the default)

cp /sdcard/98tweak /system/etc/init.d/98tweak (replace first part with wherever you downloaded it to - copies the init script to the init.d directory)

chown root:root /system/etc/init.d/98tweak (not necessary, but cleaner - sets file ownership)

chmod 755 /system/etc/init.d/98tweak (sets file permissions to be executable)

mount -o ro,remount /system (remounts /system as read-only)

3) Done.

You can probably do all of this through a file manager app, but I prefer the oldschool approach.
[Nexus 7 Original Development] evonc:
You could also extract the tweak file to anywhere and then use smanager or other script editor to execute it as a script on boot.

Sent from my Nexus 7
[Nexus 7 Original Development] demandarin:
Is that 98tweak the same thing that's automatically activated with trinity kernel toolbox? I used smanager to execute file as script. With SU & boot. Then I ran it. It activated but made no difference in I/O scores. Reason likely because I already have script from TKT running. I wasn't sure if they're the same thing or not.
[Nexus 7 Original Development] Tapek-AU:
Great googly moogly! Just ran that tweak and it quadrupled my I\O score! Is there a reason this isn't implemented by default by EVERYTHING?

Thanks for making me aware of it guys :)
[Nexus 7 Original Development] evonc:
I'm pretty sure its the same script that is executed at the start of tkt. Quadrant is very very inconsistent in scores. I run one bench at 6200 and the next is down to 4600. Needs some serious optimization and fixing.
[Nexus 7 Original Development] nize2beme:
I also had this issue, no change after tweak. Then I noticed I was supposed to flash 1.0.5 first, so I did. And now I am stuck in bootloop :( I have flash stock kernel but still bootloop. Any ideas? maybe i'm just tired and need rest to have an AHAH moment.
[Nexus 7 Original Development] nize2beme:
OK, I was tired. I'm back on 117 but just noticed. I never flashed 1.0.5 in the past. I went straight from stock, to 1.0.7 to 1.0.12. Do I need to go back to 1.0.5 to enable stuff like OP states? and If so what am I doing wrong, b/c it causes bootloops when I try to go back. maybe i should try stock from here and see what happens..... will report back

---------- Post added at 05:54 AM ---------- Previous post was at 05:49 AM ----------

nope, I can't go back to 1.0.5 or stock it seems from 1.0.12. Why is that?
[Nexus 7 Original Development] t_007_v2:
major thanks to all for helping me get the io tweak working! this is only my 2nd android device but i have to say !!very impressed with the community that surrounds the tech!!

i had to create the folder in system/etc & set the permissions on it. i then copied the 98tweak into it but left the permissions alone. i then used terminal emulator in system tuner pro, within terminal i hit the script tab went into the init.d folder i created and selected the 98tweak. the next step was to check mark the SU box on the right side of the screen and hit execute. i missed that box the first time...

my io score was 1400+- and it went to 6900 with the tweak (: i also got a 64.8fps on nena 2

the next hurdle is zram lol. first what the hark is zram and what does it do??? xda search all forums is a life saver!
[Nexus 7 Original Development] glenn37216:
@1.5 CPU w/520 GPU (Performance Gov.) With a -25MV on the 1.5 clock. :D

I've tried many roms and kernals on my N7... hands down montley is the best ad most stable. all because of the people here contributing to this kick ass thread .:highfive:
[Nexus 7 Original Development] czater:
So if i flash this kernel to stock rom(ofc first unlock,root,CWM,busybox), i must create init.d directory first? it doesn't create automatically? :confused:
[Nexus 7 Original Development] luke05dee:
_motley do U think the bottlenecks for 520mhz can ever be solved? I don't know, maybe bus overclocking a bit? Or is it a unsolvable limitation and this is as good as it is ever going to be? Great work by the way :highfive:
[Nexus 7 Original Development] bovineyard:
OTG?

Will OTG (on the go) adapters with USB sticks work on this kernel?
[Nexus 7 Original Development] phonic:
I don't see why not. I haven't tested it on this kernel, but it worked fine on stock.

---------- Post added at 08:10 PM ---------- Previous post was at 07:45 PM ----------

BTW, in case anyone wants to know, these are my Quadrant scores:

Stock Kernel/Settings, fresh reboot:

3684 11156/2852/1698/251/2465

Motley Kernel, default settings, fresh reboot.

4189 13243/3308/1745/251/2397

4167 14427/2083/1659/253/2412

Motley Kernel, 1.5OC/sio, fresh reboot:

4542	14649/3353/1924/336/2446

Motley Kernel, 1.6OC/sio, fresh reboot:

4547	14580/3327/2021/336/2470

Like I said earlier, 1.5->1.6 isn't really anything special.

Anyone else having UV'ing problems, with it not applying?
[Nexus 7 Original Development] Prey521:
Just pulled a 4731 on Quadrant @ 1.6ghz/Interactive/Noop and 4686 @ 1.5ghz.

This kernel is insane LOL

Time to do some voltage testing!
[Nexus 7 Original Development] Clienterror:
You can doooooo it!!! :) I want 5k so BAD rofl
[Nexus 7 Original Development] Prey521:
Anyone have any tips for undervolting? I used to UV my old Motorola Triumph phone but I swear that it didn't make a difference on that POS of a phone.
[Nexus 7 Original Development] boynamedstacy:
Well, add me to the few who can't OC. SetCPU only goes up to 1300. Sucks ballz. Running KRAKD rom
[Nexus 7 Original Development] h3r3tic:
Was the booting issues sorted out so far?
[Nexus 7 Original Development] bradm23:
Thanks for the great kernel for the Nexus 7. My only question is how come I cannot over clock? 13000 is my max in setcpu and there arnt any steps above this on my end. Thank!
[Nexus 7 Original Development] Prey521:
Only thing i've noticed so far is that the N7 will not go into Deep Sleep mode......didn't have that problem with the Atlantis kernel.
[Nexus 7 Original Development] boynamedstacy:
Booting issues must have been solved, I just flashed with no problems. Only thing I noticed is that I can't OC quite yet. I am going to try a new rom to see if that helps any... Motley is the **** and has been creating the BEST kernel available for the Transformer Prime. If you look at the highest Prime benchmark scores, I am willing to bet most of them are running Motley. We are super lucky to have him developing for this tablet. :good::D
[Nexus 7 Original Development] bigxie:
Are you guys using the latest version of SetCPU?
[Nexus 7 Original Development] boynamedstacy:
WTH? Yes, I am. I just downloaded it so I assume it is the lates version. I just flashed the EOS rom hoping that will make a difference. Booting now and will find out...
[Nexus 7 Original Development] bradm23:
I have the latest setcpu and cannot over clock. No complaints because the kernel is very fast, but mine maxes out at 1.3 and no steps show above this. My set CPU does have the extra steps like the post above this. So strange?
[Nexus 7 Original Development] boynamedstacy:
Crap, now that I am on EOS I can't install Set CPU. I tried restoring with TiBu and failed. Also tried DLing from the PLay store and got an "unknown error code -24". I guess I will try noFrills next. What gives? What rom are you guys on?
[Nexus 7 Original Development] DJLamontagneIII:
Just flashed eos and this kernel and have no oc steps in latest setcpu
[Nexus 7 Original Development] boynamedstacy:
OK, now I don't feel so bad. We are in the same boat my friend. Although I was unable to install SetCPU. So weird!! NoFrills only shows up to the 1300 slot also. Anyway, Motley will have some answers for us sooner or later. I am not worried at all. THis kernel is still speedy as all get out anyway! Thanks guys.
[Nexus 7 Original Development] brizey:
I am finding that setcpu cannot seem to activate the 51 mhz slot...keeps popping to 100 mhz, which is not a real slot. I just had sleep death, so I think there is something up with the interaction with setcpu. I changed the min to 102 for now.
[Nexus 7 Original Development] giveen:
I tried flashing this kernel with modaco ROM and got boot loop

Sent from my Nexus 7
[Nexus 7 Original Development] boynamedstacy:
Does that ROM meet all the requirements in the OP? I looked at it earlier but I can't remember.
[Nexus 7 Original Development] Prey521:
Interestingly enough, after I posted that Quadrant score of 4700+, I haven't been able to breakt 3700! Weird......
[Nexus 7 Original Development] DJLamontagneIII:
http://en.m.wikipedia.org/wiki/ZRam

Same thing as io tweak just put thishttp://db.tt/8pfJ6eqB in init.d folder and set the same permissions as before:

XXX

XOX

XOX

Reboot... to see if its active type free in terminal emulator and the values for swap is the zram :beer:
[Nexus 7 Original Development] DJLamontagneIII:
Yes because stock ROM doesn't have init.d support out of the box.. custom ROMs do or you can use the method a few posts up by phonic to set it up on stock ROM

its the exact same thing ...morfic just implemented it in the app so ppl without init.d supported ROMs could have a easy fix and use it
[Nexus 7 Original Development] CharliesTheMan:
You're probably running a custom rom with a custom ramdisk if I had to guess. The anykernel method is built the way it is because it allows you to keep your roms ramdisk, init.d, things like that, and not over write it with something else that will prevent your setup from booting.

1.0.5 isn't built using the anykernel method so it replaces the ram disk and stuff. Anykernel versions don't touch that stuff so where as the non anykernel version, you would need to build it using whatever rom you're running.
[Nexus 7 Original Development] demandarin:
question

smanager will work the same? click on file. execute as script. toggle Su & Boot. then run. profit?
[Nexus 7 Original Development] Rafase282:
Firing up /system/etc/init.d/90zram so you should rename it to 90zram, not really necesary tho.
[Nexus 7 Original Development] BenMGP:
1.5 mhz. 520 gpu. Default voltages.
[Nexus 7 Original Development] demandarin:
latest kernel build performing well..temps stay lower also

latest kernel performing well. here is my quadrant & CF Bench(I beat out Samsung galaxy S3 with its 32nm dual core)
[Nexus 7 Original Development] DJLamontagneIII:
Of course you could but why use another app if you dont have to i like to have as few apps running and using resources as possible
[Nexus 7 Original Development] demandarin:
Good point

I don't have that init.d folder. I can simply create a folder called "init.d" and place file in system/etc/init.d ? Of course setting permissions like previous post said.
[Nexus 7 Original Development] thracemerin:
Depends on if the ramdisk you are using has init.d support in it or not, if you're unsure you can flash 1.0.5 to make sure, then flash back to latest.
[Nexus 7 Original Development] DJLamontagneIII:
You would have to do this but change the 98 tweak to what ever script you want to put there
[Nexus 7 Original Development] t_007_v2:
Thanks for All your help you rock!! A issue I'm having is with the io tweak on reboot it's not auto running. I have to go into terminal and execute it again and then it works. I have setup the init.d two ways now and neither one are starting the 98tweak on reboot. number 1. I create the folder myself and set the permissions then copied 98tweak into init.d and used terminal to execute in su mode. Quadrant showed 98tweak was working but with reboot Nada. Thought I might have did something wrong so I deleted It all and tried number 2. I followed the instructions below and tested with quadrant and it shows io 98tweak is working but not on reboot. Question is how to make the settings stick??

Where in the world are these permissions your talking about? Xxx xox xox? Using es file explorer I pull up the properties for 98tweak and click on permissions and it certainly doesn't give me the permission options you show.

Thx

phonic THX for this!!!

1) Install/Run a Terminal Emulator, or open up an ADB shell session.

2) Issue the following commands: (comments in parenthesis)

su (superuser- actually, technically this command is "switch user", with root/superuser being the default if a username isn't specified)

mount -o rw,remount /system (remount /system as read-write)

mkdir /system/etc/init.d (make init.d directory)

chmod 755 /system/etc/init.d (set the permissions properly - probably not needed since it should be the default)

cp /sdcard/98tweak /system/etc/init.d/98tweak (replace first part with wherever you downloaded it to - copies the init script to the init.d directory)

chown root:root /system/etc/init.d/98tweak (not necessary, but cleaner - sets file ownership)

chmod 755 /system/etc/init.d/98tweak (sets file permissions to be executable)

mount -o ro,remount /system (remounts /system as read-only)

3) Done.
[Nexus 7 Original Development] demandarin:
I was unsure. I know I flashed that kernel when it first dropped but I've also tested out other kernels from other people. So I flashed back to 1.05. Then flashed back to latest. The folder "init.d" I created is still there with the file inside ( /system/etc/init.d ) Both folder and file permissions set to what was posted. So I should be good then?

Is what I did with what I posted on other quote good enough? I tried that typing "free" in terminal emulator but no values popping up. Unless I'm typing the wrong thing in there to see if the zram is activated. I saw your other post but seems I'm doing something or typing something wrong in terminal emulator to check and see if it's activated.

---------- Post added at 02:54 PM ---------- Previous post was at 02:52 PM ----------

Try using root explorer to set permissions. Make sure to mount it as RW. Then long click on folder/file. Then select permissions. Then you will see pop up to set permissions.
[Nexus 7 Original Development] thracemerin:
I think so, but only way to be sure is to reboot it and see if the scripts are implemented or not.
[Nexus 7 Original Development] demandarin:
OK.but I was trying to find out what do I type in terminal emulator after I reboot to see if script implemented or not. Or is there another way of finding out?
[Nexus 7 Original Development] thracemerin:
The way i test it is this:

Make a file called 99test in /system/etc/init.d

put the following in it:

#!/system/bin/sh
touch /data/local/tmp/init.d_log_test.txt
echo "done" >> /data/local/tmp/init.d_log_test.txt

reboot

if init.d worked, there will be a file in /data/local/tmp/ called init.d_log_test.txt with the word "done" in it.

once you've tested that it works, you can delete 99test.

if it didn't work, then we'll have to look harder at why.
[Nexus 7 Original Development] RI5E:
Try removing the .txt extension from the 98tweak file. I was saving the same issue and removing the extension solved .y problem. Also make sure your permissions are correct.
[Nexus 7 Original Development] t_007_v2:
thx for your help!! see anything wrong with the below image?
[Nexus 7 Original Development] demandarin:
It was a no go. No file appeared in that directory After rebooting. Tried several times. Made the file, inserted code through text editor(copy n paste), and put it in direcory you said. Not sure. What's the deal..lol. all permissions set correctly for init.d folder & the 95zram file.

I might end up trying to manually create folder and stuff through terminal emulator like said a few posts back(old school method of doing it). Or I may just stick with using smanager to implement the zram script with su & boot. Then run. I was just trying to see if I can implement the init.d way without having to use scriptmanager.

I made sure to remove extensions & permissions are set correctly. Just trying to implement 95zram file/script through init.d method. I have no issues with implementing it through script manager but still looking for a way to confirm 95zram is activated(other than the init.d 99test file I tried out). There's something you can type in terminal to see the zram values pop up but I tried what was previously said(to type in terminal "free" ) and nothing showed up.

---------- Post added at 03:50 PM ---------- Previous post was at 03:48 PM ----------

Looks like you set permissions correctly.
[Nexus 7 Original Development] thracemerin:
Hmmm....I can make you a boot.img for stock that I know is working and you can flash that, then reflash Motley if you want to try it, if you aren't on stock ROM it might not boot though.
[Nexus 7 Original Development] demandarin:
I'm on stock rom. Do you mean stock kernel? If so I have the one that was posted from before or in op. Appreciate the offer. I wouldn't mind trying it out but for right now, script manager is looking like the easiest way, for me, to implement the zram at the moment.
[Nexus 7 Original Development] thracemerin:
Well, it would be the kernel I'm using which is stock with init.d implemented and the mount tweaks already in the ramdisk, all you'd need to do is fastboot flash my boot.img, then boot into recovery and reflash motley.
[Nexus 7 Original Development] DJLamontagneIII:
After you type free in terminal it will show the zram labeled swap
[Nexus 7 Original Development] demandarin:
OK, it tells me not found. Even with me enabling it with script manager. Typing in "free" gives me "not found"
[Nexus 7 Original Development] thracemerin:
Do you have busybox installed? because without it there may not be a 'free' command in android.

Edit: confirmed, free is part of busybox. If you don't have busybox installed that's probably why your init.d doesn't work too since init.d requires run-parts which is also part of busybox.
[Nexus 7 Original Development] demandarin:
Profit..lol. I know I had busybox installed. So I checked again. It was there. So I opened it up. Asked for SU permissions. Tried terminal typing "free" again,still nothing. So I went back into busybox. There was a bunch of components or parts of busybox that needed updating/installing. I I installed all the recommended parts. Then tried terminal again. Typed in free and all the values popped up.so my zram is enabled.

Only thing now is to figure out if its enabled through the init.d folder I made with file in it or if its scriptmanager enabling it. I guess I can clear the configs on smanager and try terminal again to see.

Thanks! Although I had initial busybox free app installed, that post lead me to messing around and figuring it out.

P.s. you likely right about the init.d not working also. Now to see which one IS working that's enabling my zram.
[Nexus 7 Original Development] thracemerin:
There's a good chance if your busybox was messed up a bit that 'run-parts' wasn't working too and that's the command used to p**** init.d, you can always check init.d again with the 99test method I suggested before you do anything else now that you've updated busybox.

Edit: ROFL p a r s e gets filtered cuz it has a bad word in it :p
[Nexus 7 Original Development] Cam2:
1.0.12 GPU520 seems to be running great. Did you figure out what was causing the reboots on 1.0.11?
[Nexus 7 Original Development] demandarin:
I initially cleared configs from smanager. then rebooted. ran terminal, typed free and saw values(which I attached). so I initially was thinking init.d was working. well I ran your test again. still a no go. no new txt file appeared in /data/local/tmp. only the init.rc file was still there. also some new toolbox file. not sure where that came from. both files had updated date & time. I looked inside init.rc just to see but didn't see the word "done" in there. those likely updated when I added new busybox stuff.

so I went back to smanager. found the zram file. I enabled SU&Boot. then RUN. I noticed a difference after I pressed run..this time it said zram activated and listed where busybox and the other file was at(I attached screenshot). so now Smanager is truly able to activate it since before I didn't have all parts of busybox installed.

not sure what's up with the init.d support though. hmmm....let me try flashing back to 1.05 then to latest. now that I have all busybox parts installed. might make- a difference..lol

Update: flashed back to 1.05 then to 1.0.12(latest) tied 99test file again. Seems like init.d support still not working. For now, oh well..lmfao. with your help, at least I'm able to properly activate it wth Smanager. Its activating fine through there. I'm done with the init.d thing for now..lol. bought to go out and eat. Thanks again everyone for the ideas and help! Appreciate it ;)

Motley will likely have a new build up when I get back..lol.
[Nexus 7 Original Development] mkiker2089:
I thought zram was only for hard drive devices. Does it make a noticeable difference when dealing with flash based storage?
[Nexus 7 Original Development] demandarin:
Thereotically, yes. It swaps cause Ram will be faster than internal flash memory. Someone posted Wikipedia definition where it states its useful for flash storage based devices.
[Nexus 7 Original Development] _motley:
Hi guys, just got back from my travels...I see we are concentrating on zRAM today! Glad to see you all helping each other, we have an awesome community as usual.

Like many of the other tweaks done in the Android world, ZRAM is another one of them that is controversial, probably because people only think in terms of immediate performance they can measure easily with benchmarks etc. Here is my take...think I will add this to the Q&A section as well.

What is zRAM?

This is a mainline kernel feature for Compressed RAM block device support (CONFIG_ZRAM)

http://en.wikipedia.org/wiki/ZRam

Will it make my device faster? Will I score higher on benchmarks?

For normal usage, the answer is no. zRAM is most useful for those that are configuring Android to be a true multitasking workhorse. For example, if I enable zRAM, open an bunch of apps at one time, and actually start to work towards depleting the memory of the system. For example, say I open system tuner, a browser with several tabs, a word processing app, a game, and perhaps a picture viewing app or a movie. If I don't formally close out of each one by hitting back and just begin switching between apps and the home screen, you will see zRAM start showing benefits.

If you tweak the Android memory and swappiness settings, this can also be useful in this type of environment.

How do I know it is initialized and working?

You can type "free" from an command line and see the swap space.

Also, you can look at the disksize to see if it is initialized

cat /sys/block/zram0/disksize

To see how much it is being used in your environment, you can look at the output from:

cat /sys/block/zram0/num_writes

cat /sys/block/zram0/num_reads

So, unless you have a heavy workload as stated above, then it won't be of a lot of use for the casual user.
[Nexus 7 Original Development] phonic:
As always, thanks for the detailed technical walk through on this topic.
[Nexus 7 Original Development] CyberCitizen:
Are both the 480, 520, and no GPU of equally stable/safe to use?
[Nexus 7 Original Development] omnikai:
Hi all,

Sorry if this has been covered before, but after installing this kernel on stock JB, I can change CPU settings to 1.5gHz (which runs great BTW!), but the settings keep resetting to default values, seems to happen after waking from sleep. I've tried antutu and system tuner and it happens for both. I'm using Supersu and Busybox Free.

Thanks in advance for the help, and thanks for what looks like a great kernel!
[Nexus 7 Original Development] demandarin:
arw you running the latest build? it has powerhal fix built in so it "shouldnt" be reverting back.

also make sure to open up busy box app and make sure the checked files are installed/updated. ;)