[Tweak] Performance "Tweaks" (Updated 4/26/2011)

mmarz

Well-known member
Mar 9, 2011
1,130
447
0
Visit site
Grrr, not very happy at the moment. Some things stick, but not all of it.
Well, I was planning on some changes to the roms anyhow, so...

There isn't much you can do by way of changing build.prop.

init.thunderc.rc from the kernel will always overwrite them. You'll need a custom kernel if you don't want a diy script to run on each boot.
 

sdxben

Well-known member
Feb 19, 2011
122
11
0
Visit site
Two questions- Do I have to reinsert after swapping or updating roms?
Also, I can execute through root explorer but when I try to use gscript > create new script> load> *no files show under "select a file" even though my afterboot.sh is on the root of my sdcard.
 

mmarz

Well-known member
Mar 9, 2011
1,130
447
0
Visit site
Two questions- Do I have to reinsert after swapping or updating roms?
Also, I can execute through root explorer but when I try to use gscript > create new script> load> *no files show under "select a file" even though my afterboot.sh is on the root of my sdcard.

He means that was his read and write speeds before applying the tweak, and the second number is what they were changed to after he applied the tweak.

Yes, roms overwrite everything most of the time.

You need to put the script in the gscript folder on the micro sd card, not just in the root of the card. Once you add it as a script in gscript and save it, you can long click on the homescreen and add the script as a shortcut.
 
  • Like
Reactions: sdxben

sdxben

Well-known member
Feb 19, 2011
122
11
0
Visit site
Ok...so I rebooted my phone and in the status bar it is stuck with sd card symbol saying checking for errors. I thought that was weird so I ran afterboot in gscript and all I see is "stderr:" line by line. Results pre script- write9.7 read 8.6 post script- write4.6 read 14.1 What did I do wrong?
 

mmarz

Well-known member
Mar 9, 2011
1,130
447
0
Visit site
Ok...so I rebooted my phone and in the status bar it is stuck with sd card symbol saying checking for errors. I thought that was weird so I ran afterboot in gscript and all I see is "stderr:" line by line. Results pre script- write9.7 read 8.6 post script- write4.6 read 14.1 What did I do wrong?

Which kernel and rom are you using?

It is not supposed to effect write speeds, only read speeds. Anything that happens on a reboot is not the fault of the script. All it's effects are cleared on a reboot. It sounds like you have corruption on your micro sd card.

FYI, the libsqlite.so file I posted is meant for Froyo only (ie Stock, Aphrodite, Rodimus).
 

sdxben

Well-known member
Feb 19, 2011
122
11
0
Visit site
Which kernel and rom are you using?

It is not supposed to effect write speeds, only read speeds. Anything that happens on a reboot is not the fault of the script. All it's effects are cleared on a reboot. It sounds like you have corruption on your micro sd card.

FYI, the libsqlite.so file I posted is meant for Froyo only (ie Stock, Aphrodite, Rodimus).
I am using Aosp's 415 rom, no extra kernels. I did not download libsqlite (I know that). After 15 minutes the sdcard symol went away- done checking for errors and loaded. I also have no data2ext partition on the sd. Is the "stderr:" what you see line by line when you run afterboot on gscript? My phone is running fine now, hard to tell initially what the large differences are.
 

mmarz

Well-known member
Mar 9, 2011
1,130
447
0
Visit site
I am using Aosp's 415 rom, no extra kernels. I did not download libsqlite (I know that). After 15 minutes the sdcard symol went away- done checking for errors and loaded. I also have no data2ext partition on the sd. Is the "stderr:" what you see line by line when you run afterboot on gscript? My phone is running fine now, hard to tell initially what the large differences are.

Does it say anything after stderr?

It could be any number of things, but this script was originally made for Aosp (on another phone). So I am surprised that you have problems.
 

anon(235100)

Well-known member
Mar 20, 2011
155
50
0
Visit site
how to run automatically using Scheduled Scripting App - Scheduled Reboots, etc... Phone Prioritizer App - xda-developers

download afterboot.sh, rename it to afterboot.txt and put it in a folder called phonePrioritizer on your sdcard

---------------------------------------------------
download the other 2 files to:
\sdcard\libsqlite.so
\sdcard\sqlite3

Unrar the sqlite3 file and place it inside your /system/bin/ folder. Set the permissions to "rwxr-xr-x".
go to adb shell and type
mount -o remount,rw -t yaffs2 /system /system
mv /sdcard/sqlite3 /system/bin
chmod 755 /system/bin/sqlite3
mv /sdcard/libsqlite.so /system/lib
chmod 644 /system/lib/libsqlite.so

restart phone
 
Last edited:

mmarz

Well-known member
Mar 9, 2011
1,130
447
0
Visit site
Haha, wow that's pretty much right, except I did put instructions for libsqlite.so in the first post.

Once you have phonePrioritizer installed, you rename afterboot.sh to afterboot.txt and replace the file in the phonePrioritizer folder. Then you open phonePrioritizer and tell it to run the script at boot. The first time it runs it should ask you for root access. You don't have to put all the files in the phonePrioritizer folder. Put libsqlite and sqlite3 in the root of the sdcard. That way, this command will actually work:
mv /sdcard/sqlite3 /sytem/bin

Fix up these instructions, and I'll link to them on the first post. I can tell you put a lot of work into this! Thanks! I didn't even know where that tweak came from :)
 

anon(235100)

Well-known member
Mar 20, 2011
155
50
0
Visit site
thanks. Well your way, combining the battery/performance tweak post and the readahead sdcard tweak made me feel motivated to write it out. I wish the battery & performance guy would've explained what each tweak does because he just says 'google them' basically.

I initially wrote it out so the working folder would all be in one place.

I wish all of these were just some android market app because they become onerous. Or if people are incorporating these into ROMs I wish they'd specify that they did in their release notes.

[edit] I think I got your changes in there now
 
Last edited:

mmarz

Well-known member
Mar 9, 2011
1,130
447
0
Visit site
thanks. Well your way, combining the battery/performance tweak post and the readahead sdcard tweak made me feel motivated to write it out. I wish the battery & performance guy would've explained what each tweak does because he just says 'google them' basically.
I wish all of these were just some android market app because they become onerous. Or if people are incorporating these into ROMs I wish they'd specify that they did in their release notes.

If you read the first few pages as he's developing them, they explain them. What's funny is that their tweaks aren't working yet because they don't want to launch the script like us. They want the OS to launch it at boot, and some of their settings get overwritten. Great job on the right up, I'm going to link to it if you don't mind!

You should add this:

mv /system/lib/libsqlite.so /system/lib/libsqlite.so2
mv /sdcard/libsqlite.so /system/lib/
chmod 644 /system/lib/libsqlite.so


before the restart but after you've mounted the file system as rw.
 
Last edited:

anon(235100)

Well-known member
Mar 20, 2011
155
50
0
Visit site
that'd be great if they look good.
I've installed his before his way and it didn't seem to bad. Are you saying his way will run more of them at startup instead of your script scheduler way?
I verified the sdcard readahead portion worked because I had that SD Speed Increase app still on my phone when I was testing yours.
 

mmarz

Well-known member
Mar 9, 2011
1,130
447
0
Visit site
that'd be great if they look good.
I've installed his before his way and it didn't seem to bad. Are you saying his way will run more of them at startup instead of your script scheduler way?
I verified the sdcard readahead portion worked because I had that SD Speed Increase app still on my phone when I was testing yours.

They run the script using init.d. This happens before some of the ramdisk files run which results in some of their settings being overwritten. BTW this line also has a typo:

mv /sdcard/sqlite3 /sytem/bin

system

This is how it should all look:

mount -o remount,rw -t yaffs2 /system /system
mv /sdcard/sqlite3 /system/bin/
chmod 755 /system/bin/sqlite3
mv /system/lib/libsqlite.so /system/lib/libsqlite.so2
mv /sdcard/libsqlite.so /system/lib/
chmod 644 /system/lib/libsqlite.so
 

mmarz

Well-known member
Mar 9, 2011
1,130
447
0
Visit site
yeah. i just found that after testing my steps:-[

ah... so your way gets all the scripts applied

You should also backup your original libsqlite.so, in case something goes wrong. That is what:

mv /system/lib/libsqlite.so /system/lib/libsqlite.so2

is for.

Also, when moving or copying things, it is best to provide a file name that it should be named as:

mv /sdcard/libsqlite.so /system/lib/libsqlite.so
 
Apr 22, 2011
10
1
0
Visit site
Hello all. You might know me for the original thread @XDA.

@jawz101

The sdcard speed "hack" is already applied with my script in case you didn't notice:

echo "4096" > /sys/devices/virtual/bdi/179:0/read_ahead_kb;

@mmarz

You said not all of my tweaks were applied because they run before the ramdisk. Care to specify which ones don't get applied?

EDIT: I was looking at your .sh file and I didn't see any difference between mine (appart from the setprop lines that I took out because they were getting overwritten on boot).

from Liquidplacidity: If you notice any lag in your phone from these tweaks, take this out of the init.d .. echo "6000" > /proc/sys/vm/dirty_writeback_centisecs;
The default setting is 60 if I remember correctly, setting it to only work every 6000 centisecs (every 10 minutes I think) so there's no lag coming from that, it even helps not to stress the CPU.
 
Last edited:

mmarz

Well-known member
Mar 9, 2011
1,130
447
0
Visit site
@mmarz

You said not all of my tweaks were applied because they run before the ramdisk. Care to specify which ones don't get applied?

EDIT: I was looking at your .sh file and I didn't see any difference between mine (appart from the setprop lines that I took out because they were getting overwritten on boot).


The default setting is 60 if I remember correctly, setting it to only work every 6000 centisecs (every 10 minutes I think) so there's no lag coming from that, it even helps not to stress the CPU.

I guess you are right. Originally I had removed parts, for example when you used:

Code:
for j in $DM $MTD $LOOP $RAM;
do
	echo 0 > $j/queue/rotational;
done

because $DM returned no results. And there were others that caused my screen to hang among other issues. But I guess we ended up in the same place. Which is funny, because I've been debugging and copying parts of your scripts for a while now.

With our kernel, these lines are run after init.d:
setprop wifi.supplicant_scan_interval 20
setprop net.tcp.buffersize.default 4096,87380,110208,4096,16384,110208
setprop net.tcp.buffersize.wifi 4095,87380,110208,4096,16384,110208
setprop net.tcp.buffersize.umts 4094,87380,110208,4096,16384,110208

I'm not sure about the other settings, but it is safe to assume some of them could be overwritten.


While I have you, what is the point of this line:

chmod 0755 /system/etc/init.d/99tweaks;

in your script? If the script won't run because of permissions, how can it change its own permissions? And if it can run, what need is there to change the permissions? Just curious.
 
Last edited:

Members online

Trending Posts

Forum statistics

Threads
943,214
Messages
6,917,882
Members
3,158,891
Latest member
cottoneyejoe