yashsingh1/xdaforums huggingface dataset:
[Android Software/Hacking General [Developers Only]] spambayes:
True. Maybe I'm just too impatient for the future. You know, I've often thought about how the current development of the smartphone mirrors the early days of desktop PCs. Remember the XTs and 286/386/486 ATs running on DOS with DESQview and Win 3.1? Multitasking was a joke compared to what we have today. Today we think nothing of running 10 programs concurrently on multi-monitor setups powered by multi-GHz, dual/quad-core processors and still quibble about getting that extra 20 FPS out of a new graphics card.

I see smartphone development following a similar but shorter technological roadmap due to an accelerated Moore's Law effect. I believe that within a few years, we will no longer be so constrained by lack of memory and plagued by lags. Another generation will have grown up knowing neither. Still, I am impatient -- I want that experience now. I want instantaneous app switching, true multitasking and battery life that runs for days under load and I want it all right out of the box without me having to cultivate my inner geek to perform the hacking and patching and flashing. And no, I

do not

want an iPhone. :p Not that iPhones are any better.

Ok, I'll run this for a while before giving feedback.

But I like my pizzas this way. :p Ok, seriously, I get what you're saying and I agree. That's why I try never to mix -- it's too confusing and the potential for something going wrong just goes up exponentially.

No worries. I like your philosophy. I'm just looking for the perfect daily driver and I prefer a tuned Volvo to a prototype supercar. To me, performance should always be tied to robustness and stability.

Thanks.
[Android Software/Hacking General [Developers Only]] pikachu01:
Well, our I9000 isn't geared enough for that. We're lucky that it managed to survive this long :P

iPhones also routinely suffer from lags and stutters if you install a lot of applications. Worse still, sometimes the only way to get back the speed is to do a full reset :/

Let me know how it goes :)

Not if your pizza comes with with processed meats and look-a-like ingredients coming from god knows what animal. :P

Yeah. Stability and battery life will always be one of the key traits of ThunderBolt! I will not include things that will make either of these suffer.
[Android Software/Hacking General [Developers Only]] Min3r:
Hey Pikachu01,

I salute you for an awesome mod :D Tried it out now and it works awesome :p Must be the best optimization script Ive seen till now :highfive:

Would it be alright if I included it my rom ? I'll definitely mention you in the credits ofc :)

Let me know :p

Cheers
[Android Software/Hacking General [Developers Only]] shoutokuyaki:
Sir..now script work...thanks

:D:thumbup::thumbup::thumbup::thumbup:
[Android Software/Hacking General [Developers Only]] zerorated24:
Hi pikachu, this thunderbolt script is really awesome! And it pairs perfectly with maximum multitasking MOD for gingerbread by zeppelinrox. Yours and undervolt script are the only script I have in init.d. My phone now runs faster, more snappy and more responsive.

I have a question though, what if I shift to ICS, you stated in the OP that LMK is also compatible with ICS right? But what I have read in v6 supercharger thread is that ICS does not anymore read ADJ values at build.prop because ADJ values are already hard-coded in services.jar

Is it really true that this build.prop method for LMK script really works in ICS? Just asking sir. I jsut dont want to flash ICS and revert back to GB again. heheheh! :D
[Android Software/Hacking General [Developers Only]] pikachu01:
Yeah. That's alright :) Let me know if you need any help.

Good to know :)

If you're using Samsung based ICS, LMK is still compatible with it as the ADJ/MEM values are not read from the services.jar. AOSP ICS and JB has its LMK generated on the fly, thus we cannot use build.prop to set it.

One warning though. Even if you hack the services.jar, you'll only be able to adjust the ADJ settings, but not the MEM settings. This would mean that you can only change the Linux LMK. Changing only the Linux LMK will result in a half baked LMK.

Hence it is better to leave it to the Android OS to calculate the LMK values rather than rely on half-baked LMK.
[Android Software/Hacking General [Developers Only]] killeeeeer:
What remount script to use ? I have I8150 with CM 10.1 .
[Android Software/Hacking General [Developers Only]] pikachu01:
remountCM_MIUI-yaffs :)

To confirm, let me see the output of your

mount

in Terminal Emulator
[Android Software/Hacking General [Developers Only]] killeeeeer:
here
[Android Software/Hacking General [Developers Only]] ernestnwanu:
Pikachu, do I need to use the same remount script on a Desire Z? I skipped the remount part because I didn't see my device but I guess that's a general one? I'm talking about the CM-MIUI script
[Android Software/Hacking General [Developers Only]] pikachu01:
Yours should be:

remountCM_MIUI-fullext4 instead.

Please provide me with the output of

mount

I'll make a remount for you if it's not in the list I have :)
[Android Software/Hacking General [Developers Only]] ernestnwanu:
I don't think it works, I tried the fullext4 and this is what I get:
[Android Software/Hacking General [Developers Only]] pikachu01:
That is the correct output. There's a "for" loop that gets all the lines in the mount and tries to apply "noatime" flag on it. Some might not get applied as those are virtual mounts that cannot change.

If you take a look at your

mount

output, you'll see that barrier is turned off and commit is 60 seconds :)
[Android Software/Hacking General [Developers Only]] ernestnwanu:
Oh alright! Would you mind taking a look at these? Getting some errors.
[Android Software/Hacking General [Developers Only]] Starsream88:
Hi pika,

thank you for the great script.

Can i use remount script on my i9000 running Slim Bean 3.1 ? and wich one ? (CM10 partition layout)

Thank you :)
[Android Software/Hacking General [Developers Only]] killeeeeer:
Thanks for the help :)

Do you recommend any other script that's compatible with my Phone/Rom ?

Thanks again
[Android Software/Hacking General [Developers Only]] pikachu01:
What ROM are you using? Gingerbread?

sqlite_optimize = If you're using JB, the CWM updater_script might have detected the wrong sqlite3 binary to extract. You'll have to manually extract the sqlite3 from /system_jb in the CWM zip.

zipalign = Already checked. Nothing wrong there.

CFS = Your kernel dev did not enable sched_debug flag. This prevents users from changing the CFS settings.
[Android Software/Hacking General [Developers Only]] pikachu01:
Use: remountCM_MIUI-yaffs :)

Umm, ThunderBolt! should encompass everything you should need for scripts ;)

Just take a look at /etc/bolt_scripts and see what each script does (The description is on Post #2).
[Android Software/Hacking General [Developers Only]] ernestnwanu:
It's a JB rom (CM10 based). Alright, I'll extract the sqlite 3 from the zip. Where do I extract it to?

I guess not much can be done about the CFS then..

Thanks!
[Android Software/Hacking General [Developers Only]] zerorated24:
my phone is xperia mini. Does that mean that hacking services.jar will just give me half-effective LMK settings? Ok2x, I'll just try LMK if it works. Upgrading to ICS now. I'll report back
[Android Software/Hacking General [Developers Only]] pikachu01:
To /system/xbin :)

Yes. Hacking services.jar will at best give you a half-effective LMK setting. Let me know if you face any problems :)
[Android Software/Hacking General [Developers Only]] zerorated24:
ICS still lags even after using LMK and main script. I think I'll go back to GB now. :) This script is very excellent in GB. I used 60mb,80mg, even 100mb LMK but still it lags. Maybe its because ICS is a failed project by google. Just like windows vista from microsoft way back years ago.
[Android Software/Hacking General [Developers Only]] topiratiko:
ICS and jb are a million times smoother than GB man. Your doin something wrong. What device?

Android Open Collective Project

Samsung Galaxy SII

Siyah 501
[Android Software/Hacking General [Developers Only]] zerorated24:
st15i..xperia mini, just a crappy phone. I think it is Sony's fault that ICS implementation on our device is half-baked. But anyway our phone runs like high-end when running gingerbread so Im going to stick with GB.

Maybe if you have Samsung Galaxy S series, ICS and JB runs very smooth because your device is high-end one. Xperia mini is just a low-end phone and only has 345MB user-available RAM. Maybe that's the reason why it struggles running in ICS
[Android Software/Hacking General [Developers Only]] FitAmp:
Included main cwm zip and 80mb lmk in my rom :) gave credits :thumbup:

Sent from my p500h powered by Vanilla Flow~
[Android Software/Hacking General [Developers Only]] pikachu01:
Did you activate the remount script, CFS plus ran the zipalign + sqlite_optimize?

The LMK doesn't work if you're using AOSP ICS/JB as in AOSP ICS/JB, they made it so that LMK is calculated on the fly and then applied to both Linux and Android LMK.

Samsung Galaxy S is also having ~ 380MB of RAM.

Link? :)
[Android Software/Hacking General [Developers Only]] FitAmp:
Here it is. http://xdaforums.com/showthread.php?p=35461460

It's not much but hey, I have to start somewhere :)

Sent from my p500h powered by Vanilla Flow~

---------- Post added at 08:13 PM ---------- Previous post was at 08:08 PM ----------

Just wondering if it would be possible to have a remount script for my device. LG optimus one running stock 2.3.3. I'd love to include it in my rom :p

Sent from my p500h powered by Vanilla Flow~
[Android Software/Hacking General [Developers Only]] pikachu01:
Yeah you can. Give me the output of:

mount

from Terminal Emulator :)
[Android Software/Hacking General [Developers Only]] FitAmp:
$ su

# mount

rootfs / rootfs rw,noatime,nodiratime 0 0

tmpfs /dev tmpfs rw,noatime,nodiratime,mode=755 0 0

devpts /dev/pts devpts rw,noatime,nodiratime,mode=600 0 0

proc /proc proc rw,noatime,nodiratime 0 0

sysfs /sys sysfs rw,noatime,nodiratime 0 0

tmpfs /mnt/asec tmpfs rw,noatime,nodiratime,mode=755,gid=1000 0 0

tmpfs /mnt/obb tmpfs rw,noatime,nodiratime,mode=755,gid=1000 0 0

none /dev/cpuctl cgroup rw,noatime,nodiratime,cpu 0 0

/dev/block/mtdblock1 /system yaffs2 rw,noatime,nodiratime 0 0

/dev/block/mtdblock9 /data yaffs2 rw,nosuid,nodev,noatime,nodiratime 0 0

/dev/block/mtdblock8 /cache yaffs2 rw,nosuid,nodev,noatime,nodiratime 0 0

/dev/block/mtdblock3 /lgdrm yaffs2 rw,nosuid,nodev,noatime,nodiratime 0 0

/dev/block/vold/179:1 /mnt/sdcard vfat rw,dirsync,nosuid,nodev,noexec,noatime,nodiratime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0

/dev/block/vold/179:1 /mnt/secure/asec vfat rw,dirsync,nosuid,nodev,noexec,noatime,nodiratime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0

tmpfs /mnt/sdcard/.android_secure tmpfs ro,noatime,nodiratime,size=0k,mode=000 0 0

/dev/block/dm-0 /mnt/asec/com.quoord.tapatalkxda.activity-1 vfat ro,dirsync,nosuid,nodev,noatime,nodiratime,uid=1000,fmask=0222,dmask=0222,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0

#

That's without sdext mounted
[Android Software/Hacking General [Developers Only]] pikachu01:
Your partitions are all yaffs2. Only ext4 partitions are supported. Hence you can't use a remount script:(
[Android Software/Hacking General [Developers Only]] zerorated24:
My rom is based on stock ics .587. I also activitaed CFS, zipalign and sqlite_optimize scripts in boltscripts folder. I did not run remount script since I dont have ext4 partition. I don't partition my sd card
[Android Software/Hacking General [Developers Only]] pikachu01:
Try not installing the LMK?

As I do not have the particular device, I can't be sure whether the LMK is calculated on the fly or not.

On the other hand, Sony might have did a bad job on ICS that it's slow. There's nothing we can do about that then. :/
[Android Software/Hacking General [Developers Only]] zerorated24:
That is why I reverted back to GB where everything is perfect with your script. :D

Also, thunderbolt runs in perfect tandem with zep's multitasking Mod. The LMK settings in thunderbolt is very good. I am currently using 100MB and there is not a single lag even if I play HD games.
[Android Software/Hacking General [Developers Only]] pikachu01:
Good to know :) Let me know if you find any issues.
[Android Software/Hacking General [Developers Only]] spambayes:
Hi Pika,

It just occurred to me that I've been using remounti9000 all this time. Should I be using something else? Here's my "mount" output:

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/mtdblock3 /cache yaffs2 rw,noatime 0 0
/dev/block/mtdblock5 /radio yaffs2 rw,noatime 0 0
/dev/block/mtdblock2 /datadata yaffs2 rw,noatime 0 0
/dev/lvpool/system /system ext4 ro,noatime,barrier=0,data=ordered 0 0
/dev/lvpool/userdata /data ext4 rw,noatime,errors=panic,commit=60,barrier=0,nomb
lk_io_submit,data=ordered,noauto_da_alloc,discard 0 0
/dev/block/mtdblock4 /efs yaffs2 rw,noatime 0 0
/sys/kernel/debug /sys/kernel/debug debugfs rw,noatime 0 0
/dev/block/dm-2 /mnt/asec/slide.cameraZoom-1 ext4 ro,dirsync,nosuid,nodev,noatim
e,barrier=1 0 0
/dev/block/vold/179:9 /storage/sdcard1 vfat rw,dirsync,nosuid,nodev,noexec,noati
me,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocha
rset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/block/vold/179:1 /storage/sdcard0 vfat rw,dirsync,nosuid,nodev,noexec,noati
me,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocha
rset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/block/vold/179:1 /mnt/secure/asec vfat rw,dirsync,nosuid,nodev,noexec,noati
me,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocha
rset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
tmpfs /storage/sdcard0/.android_secure tmpfs ro,noatime,size=0k,mode=000 0 0

mount | grep yaffs gives:

/dev/block/mtdblock3 /cache yaffs2 rw,noatime 0 0
/dev/block/mtdblock5 /radio yaffs2 rw,noatime 0 0
/dev/block/mtdblock2 /datadata yaffs2 rw,noatime 0 0
/dev/block/mtdblock4 /efs yaffs2 rw,noatime 0 0

I'd also like to ask you about the scripts in my init.d directory.

I have the following scripts in it:

00banner
00check
01zipalign
02sysctl
03firstboot
05freemem
06removecache
07fixperms
09cron
10sdboost
90userinit
98tweaks
S98system_tweak

Should I delete any one of them? I'm running Slim Bean 3.1 with Semaphore kernel and, of course, your excellent Thunderbolt CWM. :)

Thanks.
[Android Software/Hacking General [Developers Only]] pikachu01:
You should use the remountCM_MIUI-yaffs :)

Can you attach the scripts in the zip file and let me take a look at it? :)
[Android Software/Hacking General [Developers Only]] spambayes:
Thanks! I thought using the wrong remount script would result in bad things happening? I hope not, since I've been doing that for er... 1 week now? :(

Zip is attached.

View attachment 1569572
[Android Software/Hacking General [Developers Only]] pikachu01:
No bad things will happen. Just error messages that yaffs2 partitions can't be remounted. I'll take a look at zip in a bit. :)

Edit: Took a look at it. Seems like the script will cause some problems with ThunderBolt! as it overwrites some values. And the scripts are installed by Jrummy's app or something?
[Android Software/Hacking General [Developers Only]] spambayes:
I think the scripts either came stock with Slim Bean rom (which has integrated Semaphore) or with the update to the latest Semaphore kernel I flashed. Semaphore manager was included in the Rom. I have not added any 3rd-party scripts at all (other than yours). I have the following options in the Rom:

which I've largely disabled.

As for options in Semaphore Manager, I have only changed the Active Governor, Scheduler and enabled Big Mem. All else are default.

What would be your recommendation?

Thanks.
[Android Software/Hacking General [Developers Only]] pikachu01:
I think it came with Slim Bean. Yes, don't enable them. I see now that they are gated by variables and those variables are from the ROM.
[Android Software/Hacking General [Developers Only]] spambayes:
Cool. Thanks. I'm still confused about which are the safe options to enable, not just in Slim Bean but in any other Rom with integrated tweaks. I guess the more obvious ones like Zipalign apks are clear enough to be in conflict with Thunderbolt but what about:

SD Boost (Read Ahead)

Fix Permissions

Clear cache on boot

Enable sysctl

Processor speed

I/O scheduler

Processor voltage

zRam and KSM (safe, I think, given what you told me a couple days ago)

Just wanting to learn more. You know, give a man a fish and you feed him for a day, let him learn and you feed him for life. :)

Thanks.
[Android Software/Hacking General [Developers Only]] riztdroid:
[*]Copy the CWM zip and all the addons you need to your sdcard (internal or external, as long as CWM can access it).

[*]Install using CWM all the CWM zips without needing a reboot in between

[*]Wait for bootup

[*]Open up Script Manager and launch /etc/bolt_scripts/remount[device] (e.g. remounti9000) as Root (The skull icon) and as Boot (The wheel icon).

[*]Open up Script Manager and launch /etc/bolt_scripts/sqlite_optimize as Root (The skull icon). This script can be used arbitrarily at anytime that you want. Don't load it as boot or copy it to init.d though, it'll significantly slow down your boot up as the script is a very long running script.

[*]Open up Script Manager and launch /etc/bolt_scripts/s70darky_zipalign as Root (The skull icon). This script can be used arbitrarily at anytime that you want. You can copy it to init.d and setting its permission to rwx-rwx-rwx. I moved it to bolt_scripts so that first boot for some people won't be slowed down.

[*]Open up Script Manager and launch /etc/bolt_scripts/CFS/S98CFS as Root (The skull icon) and as Boot (The wheel icon)..

[*]????

[*]PROFIT

[/LIST]
[Android Software/Hacking General [Developers Only]] pikachu01:
SD Boost (Read Ahead) - No, it conflicts

Fix Permissions - Shouldn't need to do this. It just rewrites busybox links (I think). It actually launches another shell script which I isn't in the scripts zip you've posted.

Clear cache on boot - Why would you want to do that?

Enable sysctl - Don't need to as you don't have a sysctl.conf

Processor speed - Don't know what it does. Implementation isn't included in the scripts.zip

I/O scheduler - Don't know what it does. Implementation isn't included in the scripts.zip

Processor voltage - Don't know what it does. Implementation isn't included in the scripts.zip

zRam and KSM (safe, I think, given what you told me a couple days ago) - Safe if your ROM/kernel supports ZRAM/KSM.

Hmm?
[Android Software/Hacking General [Developers Only]] pikachu01:
Been waiting for your reply :P

Looks like someone needs a brush up on his Java ;)

Low-end and high end *_MEM limits are defined here.

// These are the low-end OOM level limits. This is appropriate for an
// HVGA or smaller phone with less than 512MB. Values are in KB.
private final long[] mOomMinFreeLow = new long[] {
8192, 12288, 16384,
24576, 28672, 32768
};
// These are the high-end OOM level limits. This is appropriate for a
// 1280x800 or larger screen with around 1GB RAM. Values are in KB.
private final long[] mOomMinFreeHigh = new long[] {
32768, 40960, 49152,
57344, 65536, 81920
};

These are the calculated OOM values that the code will echo in to the lowmemorykiller's minfree.

// The actual OOM killer memory levels we are using.
private final long[] mOomMinFree = new long[mOomAdj.length];

This is the code that actually does the OOM calculations on the fly judging by screen size and memory

private void updateOomLevels(int displayWidth, int displayHeight, boolean write) {
// Scale buckets from avail memory: at 300MB we use the lowest values to
// 700MB or more for the top values.
float scaleMem = ((float)(mTotalMemMb-300))/(700-300);

// Scale buckets from screen size.
int minSize = 320*480; // 153600
int maxSize = 1280*800; // 1024000 230400 870400 .264
float scaleDisp = ((float)(displayWidth*displayHeight)-minSize)/(maxSize-minSize);
Slog.i("XXXXXX", "scaleDisp=" + scaleDisp + " dw=" + displayWidth + " dh=" + displayHeight);

StringBuilder adjString = new StringBuilder();
StringBuilder memString = new StringBuilder();

float scale = scaleMem > scaleDisp ? scaleMem : scaleDisp;
if (scale < 0) scale = 0;
else if (scale > 1) scale = 1;
for (int i=0; i<mOomAdj.length; i++) {
long low = mOomMinFreeLow[i];
long high = mOomMinFreeHigh[i];
mOomMinFree[i] = (long)(low + ((high-low)*scale));

if (i > 0) {
adjString.append(',');
memString.append(',');
}
[B][COLOR="red"] adjString.append(mOomAdj[i]);
memString.append((mOomMinFree[i]*1024)/PAGE_SIZE);[/COLOR][/B]
}

//Slog.i("XXXXXXX", "******************************* MINFREE: " + memString);
if (write) {
[B][COLOR="Red"] writeFile("/sys/module/lowmemorykiller/parameters/adj", adjString.toString());
writeFile("/sys/module/lowmemorykiller/parameters/minfree", memString.toString());[/COLOR][/B]
}
// GB: 2048,3072,4096,6144,7168,8192
// HC: 8192,10240,12288,14336,16384,20480
}

Note the bolded red text. Those are the final values that are calculated and echoed into the /sys/module/lowmemorykiller.

Edit: Here's the source:

https://github.com/CyanogenMod/andr...s/java/com/android/server/am/ProcessList.java
[Android Software/Hacking General [Developers Only]] zeppelinrox:
Sorry for the delay :P

Yeah... only the minfree file is effected.

That's what I said: the calcualtion in ProcessList.java is only to determine the minfrees. edit: and the adj file, obviously - it just slipped my mind before.

So after those are set and you run an init'd script to apply whatever minfrees you like, there's nothing to worry about since that calculation doesn't seem to effect anything else I'm quite sure.

The 2 bits of code that I quoted are in AMS.java which are the only things that may have a chance of effecting anything - but I don't think they do.

Edit: And yes I know the source quite well - ever since ICS came out. It drove me crazy trying to hack services.jar and that was my starting point :P

I was only messing with ProcessList.smali at first since it has all those ADJ values at the top but it wasn't to be that easy as most changes that are needed are in AMS.smali

Anyway, the gist of it is: there is no longer any *MEM values and they haven't been replaced by something else.
[Android Software/Hacking General [Developers Only]] pikachu01:
Au contraire. You're not looking hard enough :)

The Android AMS.java is the server. You haven't looked at the client side yet. The AMS for the app, it's in core\java\android\app\ActivityManager.java

You didn't notice that outInfo was an object that is passed along/created/destroyed with each app that is instantiated on the Android phone. Each of the app that is assigned an ADJ will then be compared with the system ADJ. The threshold as well is compared.

Hence, only changing the ADJ by services.jar is indeed half baked.

QED