[DEV] Script for tweaks (version 1.02) 18-12-2010

Search This thread

ruigui

Senior Member
Oct 11, 2010
54
23
Here is a script i've made (had nothing to do, so...).
Phone must be rooted and have busybox installed.

What first menu looks like:
1 - enable/disable hardware acceleration
2 - enable/disable jit
3 - enable/disable stagefright player
4 - change heapsize

s - show status
r - revert to original configuration

q - quit (don't forget to reboot your phone!)
==================
enter your option:

Download:
http://www.4shared.com/file/gApTB6EG/tweaks.html
md5 b0865d9de67a82215913512cb644211d

Just copy the file to your sdcard. Then in a terminal emulator run:
su
cat /sdcard/tweaks > /data/tweaks
rm /sdcard/tweaks
cd /data/
./tweaks

If it doesn't run, type first:
chmod 755 /data/tweaks

Additional notes:
Script does not work if run from sdcard, must be in /data/ or /system/ (this one goes to allsalvati for testing)

---

If anything is wrong i will fix it, but only if you give me feedback ;)
If you know any good tweaks, say it and i'll add them.

---

Changelog:
version 1.02:
backup/restore added

version 1.01d:
working again. sorry for the mess...

version 1.01c:
nothing new. just rearranging code

version 1.01b:
messages were not staying in output. fixed

version 1.01a:
small fix. v1.01 was not working

version 1.01:
added status menu
 
Last edited:

The_ERROR

Senior Member
Nov 13, 2010
594
362
Ostrava (mostly)

ruigui

Senior Member
Oct 11, 2010
54
23
Yes. For now it's what it does.
The ideia is to be able to enable/disable a certain tweak, without reflashing zips, and rewriting files in phone.
But i need some feedback to know if it is working. I can't test it.
It will only change values in /data/local.prop, nothing else.
 

ruigui

Senior Member
Oct 11, 2010
54
23
Thanks for testing. I'm still waiting to have some money so i can buy this phone...
Meanwhile, i'm "playing" with ROMs and files. I'm not good at scripting, but i'm trying to learn while doing something useful.
 

ruigui

Senior Member
Oct 11, 2010
54
23
How much did you increase the heap size?

I didn't increase it. Script shows this message:
"default=24, recommended=32"
"enter new heapsize value (1-64): "

You can enter any value between 1 and 64.

If you enter any other value, or a string, character, symbol... script will show this message:
"wrong value"
"please input a value between 1 and 64"
 
Last edited:

eigokyoukan

Senior Member
Feb 2, 2010
729
320
Cincinnati
For those who don't feel like editing this themselves this is great. Thanks for releasing it for people to try out more tweaks on stock ROMs.
 

allsalvati

Senior Member
Nov 29, 2010
176
16
Florianópolis
i'm trying to run this script and gives me the following message: ./tweaks: permission denied

Before anything i typed su, then chmod 777 and it gave me error.
 

ruigui

Senior Member
Oct 11, 2010
54
23
It should work be working...
Anyone else confirms this issue? Is this script running or not?
If it is working and there are more tweaks, i can easilly add them to the script.
If this is an isolated case, i really can't help. I don't own an android phone (yet), so i can't test....

allsalvati do you have busybox installed?
 

ruigui

Senior Member
Oct 11, 2010
54
23
That may be your issue.

You must mount /system/ as read-write, then copy busybox binary to /system/xbin/, then run these commands in terminal emulator:

su
cd /system/xbin
/system/bin/chmod 755 busybox
./busybox --install -s /system/xbin

After that you can mount /system/ as read only again, and reboot your phone.

I don't know if there is another way to install it that is easier.
 

allsalvati

Senior Member
Nov 29, 2010
176
16
Florianópolis
I downladed busybox installer from market and the app says that was installed. The. /tweaks gives me the same message.

How do i test if busybox was installed right?

Sent from my LG-P500h using XDA App
 

ruigui

Senior Member
Oct 11, 2010
54
23
I found this:
That is a problem, you cannot chmod a script to executable on the SD card. (well some things can, but 99% no) the system is designed to prevent u executing scripts from an SD card

cp it to /system/xbin or /system/bin.

Or if u hate to see it in system', use /data/

THEN chmod it. should be fine to run

Try to copy the file to /data/ (so you don't mess with /system/), and then try to run it with:
cd /data/
chmod 777 tweaks
./tweaks

It should not need to be run as root
 
Last edited:
  • Like
Reactions: allsalvati

allsalvati

Senior Member
Nov 29, 2010
176
16
Florianópolis
Moved to /data and worked.

I changed heap size to 32 and disabled hardware accelaration just to test.
With hw acc - 981 on Quadrant
Without - 820

So i think this is working.

Perhaps you should print the values so the user can see what is enabled or not before apply.

Thanks for your help

Sent from my LG-P500h using XDA App
 

ruigui

Senior Member
Oct 11, 2010
54
23
Can you test something for me?
Make sure you have hardware acceleration disabled, and reboot you phone.
Then open terminal and run:
getprop | grep hw (see what it outputs)
then run the script, enable hardware acceleration on it, but DON'T reboot your phone yet.
Then exit script, and run again:
getprop | grep hw
Has the value changed, or is it the same?
I need to know if the system assumes immediately any changes (although they may not be functional until reboot).
This is needed to work on your request.

Perhaps you should print the values so the user can see what is enabled or not before apply.

I'll work on that and post an update after someone tries what i asked above.

Thanks for testing ;)

EDIT: to test benchmarks, enable/disable jit. It gives greater differences in values
 
Last edited:

allsalvati

Senior Member
Nov 29, 2010
176
16
Florianópolis
I tried what you say and both outputs are the same:

$getprop | grep hw
[debug.sf.hw]: [0]
[hw.keyboards.65537.devname]: [7k_handset]
[hw.keyboards.65540.devname]: [thunder_keypad]
[hw.keyboards.65541.devname]: [touch_mcs6000]
[hw.keyboards.65542.devname]: [atcmd_virtual_kbd]

Edit: Tested disabling JIT and it worked. Linpack Before 7.35 - After 4.3
 
Last edited:

ruigui

Senior Member
Oct 11, 2010
54
23
So i can't rely on getprop to check current values...
If anything is changed, getprop won't give the right output till reboot.
Damn... Script was almost updated. Now i must find a new way and redo this section.

Thanks for testing again

EDIT:
New version for download at first post. status menu added.
I think it's all ok.
 
Last edited:

heaven666

Member
Oct 8, 2010
36
17
It seems work fine on my phone. But I can't see the status. When I choose to see current status or status after reboot, the screen of my emulator returns too fast to the selection menu (show curent status or after reboot) and I can't see anything !
 

Top Liked Posts

  • There are no posts matching your filters.
  • 5
    Here is a script i've made (had nothing to do, so...).
    Phone must be rooted and have busybox installed.

    What first menu looks like:
    1 - enable/disable hardware acceleration
    2 - enable/disable jit
    3 - enable/disable stagefright player
    4 - change heapsize

    s - show status
    r - revert to original configuration

    q - quit (don't forget to reboot your phone!)
    ==================
    enter your option:

    Download:
    http://www.4shared.com/file/gApTB6EG/tweaks.html
    md5 b0865d9de67a82215913512cb644211d

    Just copy the file to your sdcard. Then in a terminal emulator run:
    su
    cat /sdcard/tweaks > /data/tweaks
    rm /sdcard/tweaks
    cd /data/
    ./tweaks

    If it doesn't run, type first:
    chmod 755 /data/tweaks

    Additional notes:
    Script does not work if run from sdcard, must be in /data/ or /system/ (this one goes to allsalvati for testing)

    ---

    If anything is wrong i will fix it, but only if you give me feedback ;)
    If you know any good tweaks, say it and i'll add them.

    ---

    Changelog:
    version 1.02:
    backup/restore added

    version 1.01d:
    working again. sorry for the mess...

    version 1.01c:
    nothing new. just rearranging code

    version 1.01b:
    messages were not staying in output. fixed

    version 1.01a:
    small fix. v1.01 was not working

    version 1.01:
    added status menu
    1
    I found this:
    That is a problem, you cannot chmod a script to executable on the SD card. (well some things can, but 99% no) the system is designed to prevent u executing scripts from an SD card

    cp it to /system/xbin or /system/bin.

    Or if u hate to see it in system', use /data/

    THEN chmod it. should be fine to run

    Try to copy the file to /data/ (so you don't mess with /system/), and then try to run it with:
    cd /data/
    chmod 777 tweaks
    ./tweaks

    It should not need to be run as root
    1
    Now you tell me, I actually did any of these messages that appear.
    I also tried to cast a glance at your script. But I have yet to find where that could come. When I apply a tweak, the terminal remains on the menu without saying if the tweak has been applied or if it was already "enable / disable" exactly like when I watch the status of tweak. I can see that something is happening, but no time to see the menu reappears so quickly.
    1
    Script fixed. This time i could test it, thanks to my new phone ;)
    I think there are no issues anymore, but give feedback if you find something wrong, or if there are new useful tweaks.
    Sorry again for messing everything up
    1
    hi ruigui and thanks for your work...i' ve some errors when i try to change the heapsize in my o1...I had enabled jit and hardware acceleration through the how to present in this forum, maybe is this the problem??? By the way this is the output of my terminal;
    enter new heapsize value (1-64): 32
    clear: not found
    [: not found
    wrong value
    please input a value between 1 and 64

    please help me!!!!

    I also had problems like this because busybox was not properly installed.

    try busybox --install -s /system/xbin