yashsingh1/xdaforums huggingface dataset:
[Android Software/Hacking General [Developers Only]] pikachu01:
News

The new LMK settings is released as LMK addons 2.1.zip. Also, I've found out how screenstate_scaling can work in AOSP/CM/AOKP roms. Check the instructions to find out.

Changelog:

12/24/2012 (LMK addons 2.1)

- Revamped how LMK works. Added 120MB LMK.

- The LMK now incorporates knowledge from reading the ActivityManagerServices source code. It should correctly make your apps handle its own memory more efficiently based on how memory is evaluated in the Android OOM. Apologies for this as the previous implementation actually broke some degree of how LRUs/Memory trimmings for apps are calculated.

More Info:

- Screenstate_scaling can be loaded in Script Manager. Do note that if you choose to do this, Script Manager cannot be started normally. This is because the screenstate_scaling somehow cannot be forked correctly and since screenstate_scaling is an infinite loop, Script Manager assumes that it needs to wait till the script ends until it is started.

- You can override this by killing Script Manager in OS Monitor. This kills the screenstate_scaling as well though hence you'll need a restart after making whatever changes you need in Script Manager.

Future Plans:

- Fix zipalign to test the output of a zipaligned APK first before continuing zipalign

- Get around to hacking libsqlite for ICS/JB.
[Android Software/Hacking General [Developers Only]] roshan2989:
which one is compatible to galaxy s CM10.1 19000 (40 to 120LMK)..?

after install it in cwn..what should i do in script manager and which script should i enable it...?

sorry for this noob question..im willing to learn...
[Android Software/Hacking General [Developers Only]] ernestnwanu:
Thanks for the update Pikachu. Since the Desire Z with Jelly Bean is now compatible, I have the same question as the person above me. Which LMK file do you recommend? (370 mb ram)
[Android Software/Hacking General [Developers Only]] pikachu01:
Any. You can try the 50/60/80MB LMK and see which is better for you in terms of multitasking/performance
[Android Software/Hacking General [Developers Only]] pikachu01:
Are you using AOSP/AOKP/CM ROM? If so LMK is not compatible with it. It calculates the LMK on the fly. Trying to modify it with or without the services.jar hack will render it to have a mismatch with the Android LMK.
[Android Software/Hacking General [Developers Only]] ernestnwanu:
I see... I tried screen state scaling but I'm a bit confused. Step 7 and 8 seem to be the same and I get the same error.
[Android Software/Hacking General [Developers Only]] roshan2989:
after install it in cwn..what should i do in script manager and which script should i enable it...?
[Android Software/Hacking General [Developers Only]] pikachu01:
Oops, that's a typo error. I updated the first post. Please refer.

And your error for CFS. It's due to your kernel dev not enabling the SCHED_DEBUG flag.

LMK can be installed by installing the CWM zip, then restarting twice.
[Android Software/Hacking General [Developers Only]] akira888:
So am I right that as for AOKP ROM users, we just need to install the main ThunderBolt CWM zip, no need for the LMK zip?

Then after boot, just use script manager to selectively load the additional scripts that you prefer?

Thanks. :D
[Android Software/Hacking General [Developers Only]] Sami Kabir:
Did anyone try this on Galaxy S Advance.. if so did you "really" notice any performance boost and if you don't mind how did you do it....?

Sent using XDA-Developers' App on my GT-i9070 ;)
[Android Software/Hacking General [Developers Only]] pikachu01:
Yes. That's correct. An additional step to enable screenstate_scaling addon is needed with Script Manager that's all.

I've read people with Galaxy S Advance posting about it and that they enjoyed it well ;)
[Android Software/Hacking General [Developers Only]] ernestnwanu:
Me trying to apply screen state scaling. I can still access Script Manager. But I don't know if it's doing its job because when I hit back on the screenshot, I get the options to leave in background or kill.
[Android Software/Hacking General [Developers Only]] pikachu01:
If you've setup the script to start at boot (The wheel icon), then killing it is fine, though you have to restart your phone in order for it to start running.
[Android Software/Hacking General [Developers Only]] thewaywardgeek013:
Screen State Scaling can be disabled/not used if using SetCPU to set it w/ Profiles right? Also I don't see any ill effects in using 120MB LMK in my 386MB Phone.
[Android Software/Hacking General [Developers Only]] akira888:
I am using AOKP ROM with siyah kernel

I just ran the screenstate file as a script.

It seems it needs to run at the background indefinitely? When I was trying to close script manager, script manager asked about the closing instruction. I chose to leave it at background. Did I do anything wrong here?

Also does running the S98bolt_siyah do any good? So what does it do exactly?

Thanks and merry Christmas:)

---------- Post added at 10:38 AM ---------- Previous post was at 10:26 AM ----------

Also I found that my phone becomes snappier after running your script. :) but the phone feels hotter and it seems to use the max frequency more often?

What I did so dar were:

1. Installed the main CWM

2. Ran zipalign

3. Ran drop

4. Ran S98CFS and remount then set them as boot

5. Ran TCPbuffers, sqlite

6. Ran bolt siyah

7. Ran screenstate then leave it in background.

Did I do anything wrong here? Thanks
[Android Software/Hacking General [Developers Only]] pikachu01:
It's different. SetCPU doesn't tweak VM parameters while ThunderBolt! screenstate_scaling does. Also, the 120MB LMK will deteriorate your multitasking capabilities somewhat.

You shouldn't use bolt_siyah. It's meant to be edited first before using. You might be using some dangerous voltage levels :S

About the screenstate_scaling, you can leave it in the background. Once you restart your phone, it'll start it up automatically.

TCPBuffers can be setup to start automatically as well.
[Android Software/Hacking General [Developers Only]] akira888:
Thanks. Just restarted the phone to get rid of bolt_siyah. I assume the effect of the bolt_siyah would go away after reboot as I didn't set it to boot?:p
[Android Software/Hacking General [Developers Only]] pikachu01:
Yup. That is correct :)
[Android Software/Hacking General [Developers Only]] spambayes:
It's Christmas. Wishing Pika and everyone Peace and Joy in this season of blessings. :angel:
[Android Software/Hacking General [Developers Only]] akira888:
Hey mate, your script absolutely rocks. I got told to visit this thread by the siyah fans and I didn't expect I would have gained such enormous improvement in user experience.

Thanks for all your effort. Wish you a merry Christmas and a happy new year.
[Android Software/Hacking General [Developers Only]] asdot:
Wanna try this tweaks but arrrhhhh..CWM error (status 0) :banghead:

Sent from MARVEL
[Android Software/Hacking General [Developers Only]] Starsream88:
Hi pika,

My i9000 is running CM10.1 nightly, i Flashed latest LMK 80 addon and i don't know if its working or not, since my LMK values still in default status, i'm using system tuner app to check this values.

And i have some supercharger values added to my build.prop file.

Thank you

EDIT : Content of "/sys/module/lowmemorykiller/parameters/adj" file ==> 0,1,2,4,9,15
[Android Software/Hacking General [Developers Only]] pikachu01:
Good to know :) My only wish for Christmas is to spread the joy of ThunderBolt! to the masses. Merry Christmas :)

Merry Christmas to you too!

You must be using an older CWM version. Try extracting the updater_binary from a CWM zip that is usable for you in the META_INF folder. Replace the updater_binary with ThunderBolt!'s. Let me know if you have any issues.

LMK is not supported AOSP/AOKP/CM ROMs ICS and JB. Remove the LMK entries in the build.prop and let the system determine the best amount of LMK. This is because in AOSP/AOKP/CM ROMs for ICS/JB, LMK is calculated on the fly by the system.
[Android Software/Hacking General [Developers Only]] asdot:
Yah it works but now I'm stuck at white HTC logo, had to restore my nandroid backup.

Sent from Wildfire S
[Android Software/Hacking General [Developers Only]] pikachu01:
Which CWM zip did you flash and which script did you enable? What OS are you using?
[Android Software/Hacking General [Developers Only]] asdot:
signed_ThunderBolt-CWM v2.9.0 on CM10

Sent from MARVEL JellyScream
[Android Software/Hacking General [Developers Only]] pikachu01:
Weird. The only thing I can see happening is that you don't have enough space in your /system.

Try running the s98system_tweak in the CWM zip in Script Manager. What output do you get?
[Android Software/Hacking General [Developers Only]] asdot:
I get output like this

Sent from MARVEL JellyScream
[Android Software/Hacking General [Developers Only]] pikachu01:
Weird. Did you check your /system space and see if you have at least 3MB left?

If it doesn't hang your phone when using Script Manager, I'm not sure what else could cause a boot hang.
[Android Software/Hacking General [Developers Only]] asdot:
I have 49meg /system

Hmm maybe I should try to push those files manually :D

Sent from MARVEL JellyScream
[Android Software/Hacking General [Developers Only]] pikachu01:
Try pushing the files manually. It might be that the CWM version differences interprets the updater_script differently thus extracting the files to the wrong folder?
[Android Software/Hacking General [Developers Only]] thewaywardgeek013:
Would the Screet_State_scaling script run properly even if I have SetCPU running and setting the governors, also do I need to set the AWAKE_GOVERNOR and SLEEP_GOVERNOR? And the 120MB LMK doesn't really affect me that much as I normally close apps that I don't use via long pressing the "Home" Button, the buttery smoothness and resposiveness is really what I like.

UPDATE:

Upon examining the Script, seems even if I don't put an AWAKE_GOVERNOR or SLEEP_GOVERNOR the VM Parameters will work, then, if my assumption correct, running the Script with SetCPU with Profiles will work, right? Do note that I'm not a dev and have limited ability to read scripts.

UPDATE 2:

Upon testing it seems that if I don't put an AWAKE_GOVERNOR/SLEEP_GOVERNOR, the SetCPU Initial Governor will kick in, making the profiles of SetCPU ineffective. How do I comment it out so I could use the VM Parameters sans the AWAKE_GOVERNOR/SLEEP_GOVERNOR?

UPDATE 3:

Commented it out! One thing I've noticed though, is the frequency tweaks like the "up_threshold", "down_differential", "sampling_rate", etc. doesn't stick properly with SetCPU "after" waking up, so if you changed from "conservative" to "ondemand" while it's awake, the frequency tweaks will be partiallty applied/not applied altogether.
[Android Software/Hacking General [Developers Only]] akira888:
I just realised that I need to allow wakelock in script manager so as to let the screenstate script run properly.

So I am just wondering would this prevent the phone from deep sleep?

I also found after a period of time the screenstate has been running, you would not be able to see it is still running when you check in script manager. (Swipe across the screen in script manager, no such script is running) . So I reckon the script has been terminated by the system?

Your expertise folks?
[Android Software/Hacking General [Developers Only]] alkhafaf:
Hello pikacho

In my ROM I use 100 lmk

Sometimes the apps that I open close suddenly after a second of opening ( no fc just getting exit out of the app)

Is that because of a problem in the lmk ???

That happens alot with the Dailer and sometimes other apps like whatsapp

This issue is on i9000 GB stock

Thanks
[Android Software/Hacking General [Developers Only]] pikachu01:
It will run properly if you don't provide conflicting values. You don't need to comment out AWAKE/SLEEP GOVERNOR. That's because it's already commented out.

If it gives problems to SetCPU, try doing this:

sleep 2;
# && echo $AWAKE_GOVERNOR > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor;

No need for wakelock. It'll perform the screenstate_scaling without wakelock. That's because you only need to change the parameters while the phone is awake. When you turn off the screen, the phone actually wait ~ 1-2 secs before going to sleep and that's more than enough for the screenstate_scaling to kick in.

About your script getting terminated, I'm guessing it's your LMK. It's unavoidable, hence why using Script Manager isn't the complete solution. However, it's the only solution right now as loading it as init.d will cause a boot-hang.

I seem to remember this happening to one other person. I don't think it's LMK but try using a less aggressive LMK and try again?
[Android Software/Hacking General [Developers Only]] thewaywardgeek013:
Yep, that's what I did, and plus I also removed the Governor Tweaks as I am not sure why they do not stick properly after being on "awake" state, like if from "conservative" I change to "ondemand", then back, Governor Tweaks will be overwritten by original defaults. But still thanks a lot for the reply and Kudos to your work with the Scripts, they really helped me bring the full potential of this phone!

UPDATE:

Seems the reason it won't stick is not with the Scripts itself as I have tried setting it with SetCPU, so I just opted for the defaults. Defaults are already good anyways. ;)
[Android Software/Hacking General [Developers Only]] pikachu01:
Governor tweaks aren't sticking because of a race condition. Every time you change the governor it defaults to its default values. If you change the governor parameters first then only change the governor, what you'll see are default values.
[Android Software/Hacking General [Developers Only]] thewaywardgeek013:
Thanks! Also, I'm not sure if you already know this, but just to let you know, screenstate_scaling is working properly after commenting out the AWAKE_GOVERNOR and SLEEP_GOVERNOR for CM7 Mirage Kang Build.
[Android Software/Hacking General [Developers Only]] pikachu01:
Actually, it got mine working too in CM10.1.

Looks like they fixed the wait_for_fb_wake issue, but echoing an empty governor at boot time hangs the boot sequence. :/

Thanks for the tip. I'll release a new screenstate_scaling with this fix soon. :)
[Android Software/Hacking General [Developers Only]] thewaywardgeek013:
Nice, that would be awesome! BTW been checking out the remount scripts and it already includes this "trick", the thing is I've tried that script, removing the fSync and zRAM as my kernel doesn't support it yet, and it "seems to work", but haven't tested yours because according to your OP the Remounts are only applicable to the devices stated, so question is, how can I edit your script to work on my device/is it possible for you to create a script for our device? If so, what data should I provide in order for you to create one? ;)
[Android Software/Hacking General [Developers Only]] GoSooners345:
Drop cache works for me

Sent from my Death Star
[Android Software/Hacking General [Developers Only]] pikachu01:
You just need to provide the output of

mount

About fsyncs, I don't have the interface to disable it in my devices I'm using. I could create a script in bolt_scripts to turn off fsyncs, though it'll only work for devices that has an interface to disable it.

Good to know :)
[Android Software/Hacking General [Developers Only]] pikachu01:
Final phases of testing on-going:

- Fixed screenstate_scaling for AOSP ROMs (thanks thewaywardgeek013)

- Added compatibility fix for some JB versions not getting the correct sqlite3 binary

- Added sqlite3 binary from JB 4.2.1

- Fixed zipalign script to not zipalign if zipalign fails
[Android Software/Hacking General [Developers Only]] thewaywardgeek013:
Here's the result of my "mount".

rootfs / rootfs ro,noatime 0 0
tmpfs /dev tmpfs rw,nosuid,noatime,mode=755 0 0
devpts /dev/pts devpts rw,noatime,mode=600 0 0
proc /proc proc rw,noatime 0 0
sysfs /sys sysfs rw,noatime 0 0
none /acct cgroup rw,relatime,cpuacct 0 0
tmpfs /mnt/asec tmpfs rw,noatime,mode=755,gid=1000 0 0
tmpfs /mnt/obb tmpfs rw,noatime,mode=755,gid=1000 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
/dev/block/mmcblk0p12 /system ext4 ro,noatime,user_xattr,barrier=0,data=ordered 0 0
/dev/block/mmcblk0p13 /data ext4 rw,nosuid,nodev,noatime,user_xattr,barrier=1,nodelalloc,data=ordered,noauto_da_alloc,noinit_itable 0 0
/dev/block/mmcblk0p14 /persist ext4 rw,nosuid,nodev,noatime,user_xattr,barrier=1,data=ordered 0 0
/dev/block/mmcblk0p15 /cache ext4 rw,nosuid,nodev,noatime,user_xattr,barrier=1,data=ordered 0 0
/dev/block/mmcblk0p19 /data/sdext2 vfat rw,noatime,fmask=0000,dmask=0000,allow_utime=0022,codepage=cp437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro 0 0
/dev/block/vold/179:33 /mnt/sdcard vfat rw,dirsync,nosuid,nodev,noexec,noatime,uid=1000,gid=1015,fmask=0000,dmask=0000,allow_utime=0022,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/block/vold/179:33 /mnt/secure/asec vfat rw,dirsync,nosuid,nodev,noexec,noatime,uid=1000,gid=1015,fmask=0000,dmask=0000,allow_utime=0022,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
tmpfs /mnt/sdcard/.android_secure tmpfs ro,noatime,size=0k,mode=000 0 0
/dev/block/vold/179:19 /mnt/sdcard/SD_CARD vfat rw,nosuid,nodev,noexec,noatime,fmask=0000,dmask=0000,allow_utime=0022,codepage=cp437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro 0 0

BTW the "noatime" there is the result of the Main Thunderbolt Script, I opted not to remove the Script in init.d before rebooting my device :p
[Android Software/Hacking General [Developers Only]] mbze430:
Does your Tweak work well with the US Variant of the SGS3 with 2GB of RAM? I really like to optimize the way the kernel handles RAM
[Android Software/Hacking General [Developers Only]] pikachu01:
It seems that you can use remounti9001 without problems. :)

Yes. It works :)

Let me know if you face any issues installing it.
[Android Software/Hacking General [Developers Only]] mbze430:
Err nevermind I thought i was in the Jkay Deluxe thread....lol
[Android Software/Hacking General [Developers Only]] pikachu01:
News

Fixed screenstate_scaling to be compatible with AOSP ROMs. Fixed zipalign script to determine whether there are any errors before proceeding to replace the APK. Fixed sqlite3 binary extraction for JB 4.2 and some other JB versions.

Changelog:

12/30/2012 (main CWM 2.9.1 and screenstate_scaling 2.4.0)

- Fixed screenstate_scaling to be AOSP ROM compatible

- Fixed zipalign script to determine whether there are any errors on zipalign before committing. (Inspired by this.)

- Fixed sqlite3 extraction to certain JB ROMs (like 4.2)
[Android Software/Hacking General [Developers Only]] akira888:
I got a problem here with the latest update. I am using AOKP ROM

I found the phone would be stuck at boot screen if I flash the new 2.4 screenstate zip after the 2.9.1 main zip. Only flashing the main 2.9.1 zip alone doesn't have any problem. Boot successfully.

Did I do anything wrong? Right now I just extract the screenstate script from the 2.4 zip and run it through script manager (also set as boot, the old method).
[Android Software/Hacking General [Developers Only]] pikachu01:
It might be that the AOKP ROM you're using doesn't have the wait_for_fb_wake/sleep fix that affected screenstate_scaling back in the Gingerbread days. You'll just have to use Script Manager to activate it. :/
[Android Software/Hacking General [Developers Only]] prabu33:
hi sir, i Htc One X user tried to use your tweaks and works well on the phone. I just wanted to ask if it was true for me in choosing remounti9300 etc/bold_secripts/Remount?? or you have some other means for me?? thanks
[Android Software/Hacking General [Developers Only]] pikachu01:
Let me confirm it :)

Post the output of

mount

in Terminal Emulator.
[Android Software/Hacking General [Developers Only]] prabu33:
that results after mounting the terminal emulator, and now what do I do on my HTC OneX. thanks

u0_a210@android:/ $ su
u0_a210@android:/ # mount
rootfs / rootfs ro,noatime 0 0
tmpfs /dev tmpfs rw,nosuid,noatime,mode=755 0 0
devpts /dev/pts devpts rw,noatime,mode=600 0 0
proc /proc proc rw,noatime 0 0
sysfs /sys sysfs rw,noatime 0 0
debugfs /sys/kernel/debug debugfs rw,noatime 0 0
none /acct cgroup rw,relatime,cpuacct 0 0
tmpfs /mnt/asec tmpfs rw,noatime,mode=755,gid=1000 0 0
tmpfs /mnt/obb tmpfs rw,noatime,mode=755,gid=1000 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
/dev/block/platform/sdhci-tegra.3/by-name/APP /system ext4 ro,noatime,user_xattr,acl,barrier=0,data=writeback 0 0
/dev/block/platform/sdhci-tegra.3/by-name/UDA /data ext4 rw,nosuid,nodev,noatime,user_xattr,acl,barrier=0,data=writeback,noauto_da_alloc 0 0
/dev/block/platform/sdhci-tegra.3/by-name/CAC /cache ext4 rw,nosuid,nodev,noatime,user_xattr,acl,barrier=0,data=writeback,noauto_da_alloc 0 0
/dev/block/platform/sdhci-tegra.3/by-name/RCA /rca ext4 ro,noatime,user_xattr,acl,barrier=0,data=ordered 0 0
/dev/block/platform/sdhci-tegra.3/by-name/RFS /rfs ext4 rw,noatime,user_xattr,acl,barrier=0,data=ordered 0 0
/dev/block/platform/sdhci-tegra.3/by-name/DLG /devlog ext4 rw,nosuid,nodev,noatime,user_xattr,acl,barrier=0,data=ordered 0 0
htcfs /data/htcfs fuse.htcfs rw,nosuid,nodev,noatime,user_id=0,group_id=0,allow_other 0 0
DxDrmServerIpc /data/DxDrm/fuse fuse.DxDrmServerIpc rw,nosuid,nodev,noatime,user_id=0,group_id=0,allow_other 0 0
/dev/block/vold/179:14 /storage/sdcard0 vfat rw,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro,discard 0 0
/dev/block/vold/179:14 /mnt/secure/asec vfat rw,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro,discard 0 0
tmpfs /storage/sdcard0/.android_secure tmpfs ro,relatime,size=0k,mode=000 0 0
/dev/block/dm-0 /mnt/asec/freeapk.market.full-1 ext4 ro,dirsync,nosuid,nodev,noatime,user_xattr,acl,barrier=1 0 0
u0_a210@android:/ #
[Android Software/Hacking General [Developers Only]] pikachu01:
I'll need to create a remount script for HTC One X :)

I'll release it in the next version.
[Android Software/Hacking General [Developers Only]] prabu33:
wow good news for me and the user One X, I patiently waited for version One X out. thank professor :good:;)
[Android Software/Hacking General [Developers Only]] thewaywardgeek013:
BTW what is the Library "libncurses.so", is it related to the sql libs? Also do you know these tweaks for tune2fs?

#!/system/bin/sh
tune2fs -o journal_data_writeback /block/path/to/system
tune2fs -O ^has_journal /block/path/to/system
tune2fs -o journal_data_writeback /block/path/to/cache
tune2fs -O ^has_journal /block/path/to/cache
tune2fs -o journal_data_writeback /block/path/to/data
tune2fs -O ^has_journal /block/path/to/data
busybox mount -o remount,noatime,noauto_da_alloc,nodiratime,barrier =0,nobh /system
busybox mount -o remount,noatime,noauto_da_alloc,nosuid,nodev,nodir atime,barrier=0,nobh /data
busybox mount -o remount,noatime,noauto_da_alloc,nosuid,nodev,nodir atime,barrier=0,nobh /cache
[Android Software/Hacking General [Developers Only]] pikachu01:
libncurses.so is related to sqlite3 binary. It is compiled from the Cyanogenmod repo itself.

The tune2fs commands require th block path to be unmounted first before it can be tuned. The tune2fs commands basically removes journaling (and turns any ordered journal to writeback) from the mount points.
[Android Software/Hacking General [Developers Only]] pedro.coba:
when will the update to One X??
[Android Software/Hacking General [Developers Only]] pikachu01:
I'll try to get it done by tomorrow :)
[Android Software/Hacking General [Developers Only]] pedro.coba:
I patiently wait until tomorrow or until done to your great work One X and other users. very helpful :good:;)
[Android Software/Hacking General [Developers Only]] thewaywardgeek013:
Ok, because I was just curious why it's in the Main CWM.zip.

So basically that tune2fs tweak won't work at all as there is no remount of the block, correct?