Speed up phone ring times! Make htc music run FAST! -Possible BFS Conflict - G1 Android Development

First I need to give credit to Devsk and everyone else who helped figure out the concept behind this thread http://forum.xda-developers.com/showthread.php?t=548502&page=14
I knew the idea of renicing the processes would work but I couldn't figure out a way to make it happen all of the time. Processes do not even startup necessarily when the phone starts up and if they do, they will close for no appearant reason and then restart. So I wrote a script that updates every three minutes. And it can help in other ways besides phone ring times. I've included the music player and htc music player which makes them run really smoothly and switch tracks instantly. On JacHeroSki 1.8 I include the touch flo process and smoothed out that a lot. It's up to you on what else this script can do. If you have suggestions let me know and I will add them for other people to use.
If you don't want to install this, it is built into xROM and JacHeroSki. It made a huge improvement on both of those ROMs. I was waiting for those releases to come out before I posted this. I know someone else wrote apk that does something similar but I think this is more configurable for the time being and I wrote it before the apk was written. So I wanted to shart it anyway. You can change the priority for any process that you want using this script. I strongly suggest that you don't set anything at -20 or 20 and that you keep the settings that I have there. You can severely screw up your ROM if you do the wrong things here and you might have to wipe and reinstall. I am not responsible if you brick or damage your phone in any way. Although there is no reason this script should do any permanent damage to any phone. Just be careful.
There are 2 ways to implement this script. One is to download Autostart from the market. It is the method suggested in the thread listed above. The other way is to add a line in one of your startup scripts that calls this script. To use with the Autostart application you must rename the file to autostart.sh and then copy it to the /data/opt/ directory. To do that, you can use the following instructions. Copy the file to the root of your sdcard and then type the following in terminal.
Code:
su
cp /sdcard/autstart.sh /data/opt/autostart.sh
chmod 755 /data/opt/autostart.sh
You must fix the permissions every time you copy the file to the phone if you are making changes to it. The app will look for it there by default and run it at every startup. If you want to know how to implement it in the startup script let me know. It is different for different ROMs.
Once the script is started it will update the priorities every 3 minutes. You may still see some delay the first time that a process is loaded but it won't take more than 3 minutes for it to be updated. Due to some problems with the script having problems after running for a long time, I made it restart itself every hour. So far it has worked great and has not put any extra drain on the battery. The update interval is short but it takes less than a second to execute. It even helps with .mp3 files because the mediaserver process has a higher priority too.
There are two tools that will help you know how this is working. One is to use the following command to view the log file I created for this. It will clear the file and start over everytime the script starts so that it doesn't grow out of control. It will show you when the priorities were updated last and when the script was restarted. The command to use for this is:
Code:
cat /sdcard/autostart.txt
The other tool was written by Devsk. This is an awesome script that was very helpful in my quest to figure this out. Please thank Devsk for writing it. http://forum.xda-developers.com/showthread.php?p=4365912&highlight=printPriority#post4365912
I found a possible conflict with this method and BFS on xROM. If you are using a ROM with BFS and have problems with this, please remove it and let me know.

Great work, works fine (when started manualy)
atm. i'm useing 4.1.6 from cyanogen, but the /data/opt/ folder doesn't exist...
i created the folder manually, but it doesn't get started automaticaly...
I think it's because of the changes in Donut... any ideas how to fix?
Kubax

Awesome work Mike. I didn't think it was currently possible to schedule something through linux commands on the android.
Just curious, did you figure out a way to use Cron or android alarmmanager through script?

Thanks Mike! I'm on xRom 1.5r3 and this does seem to resolve the annoying lag I've had before when switching tracks.

it says autostart.txt does not exist do I need to create it?

Kubax83 said:
Great work, works fine (when started manualy)
atm. i'm useing 4.1.6 from cyanogen, but the /data/opt/ folder doesn't exist...
i created the folder manually, but it doesn't get started automaticaly...
I think it's because of the changes in Donut... any ideas how to fix?
Kubax
Click to expand...
Click to collapse
Make sure that you run the chmod command. It can't start automatically if you don't. Other than that, make sure the file has the correct name. I added the .txt to post it here so I hope that doesn't screw people up. If none of that works, try adding this line to your a2sd file in Cyanogen (as far as I know he still has that in 4.1.6)
/system/bin/sh /data/opt/autostart.sh
That will tell the ROM to start it automatically. On xROM I named it setPriority.sh because it made more sense. The autostart is only required for people who want to use that app.

PlatinumMOTO said:
it says autostart.txt does not exist do I need to create it?
Click to expand...
Click to collapse
It probably hasn't run if you are getting that message. Try running it manually
sh /data/opt/autostart.sh
and see if that works. If it doesn't give you any errors try running the cat command again. If the script runs but isn't autostarting, look at my other post and try that stuff. If that doesn't fix it, let me knw.

miketaylor00 said:
It probably hasn't run if you are getting that message. Try running it manually
sh /data/opt/autostart.sh
and see if that works. If it doesn't give you any errors try running the cat command again. If the script runs but isn't autostarting, look at my other post and try that stuff. If that doesn't fix it, let me knw.
Click to expand...
Click to collapse
shouldn't it be sh /system/bin/autostart.sh
or
sh /system/bin/setPriority.sh
Thats how I had it configured in the Hero Roms.

ccyrowski said:
shouldn't it be sh /system/bin/autostart.sh
or
sh /system/bin/setPriority.sh
Thats how I had it configured in the Hero Roms.
Click to expand...
Click to collapse
For the autostart app to use it, it has to be in the /data/opt/ directory. It makes more sense to be in /system/bin/ directory though.

What kind of ring times are you guys getting with this?
im currently on 4.0.4 with xinvert theme. Running dangerspl and latest radio and My phones screen and ringtone comes on after one ring.

Added it to my a2sd file, but that turns my phone into a booting loop...
i've got some linux experience, so i think the rights to the file, and the name are ok, since i can run it manualy from shell.
here are the last 5 lines of my a2sd...
Code:
setprop cm.a2sd.active 0;
fi;
sync;
setprop cm.filesystem.ready 1;
/system/bin/sh /data/opt/autostart.sh

I wonder why all this loggin to sd and this recursive launching of script is needed?
Couldn't some simpler script like this do it?
Code:
#!/system/bin/sh
#
echo "Renice Daemon launched: `date`"
# Set the priority every 3 minutes
while [ 1 ]
do
busybox renice 5 `pidof com.google.process.gapps`
busybox renice -18 `pidof com.android.phone`
busybox renice -18 `pidof android.process.media`
busybox renice -18 `pidof mediaserver`
busybox renice -16 `pidof com.android.launcher`
busybox renice -15 `pidof com.htc.music`
busybox renice -15 `pidof com.android.music`
sleep 180
done;
I tested it by launching it from my userinit.sh file with:
Code:
renice_daemon &
and it seems to work.

farmatito said:
I wonder why all this loggin to sd and this recursive launching of script is needed?
Couldn't some simpler script like this do it?
Code:
#!/system/bin/sh
#
echo "Renice Daemon launched: `date`"
# Set the priority every 3 minutes
while [ 1 ]
do
busybox renice 5 `pidof com.google.process.gapps`
busybox renice -18 `pidof com.android.phone`
busybox renice -18 `pidof android.process.media`
busybox renice -18 `pidof mediaserver`
busybox renice -16 `pidof com.android.launcher`
busybox renice -15 `pidof com.htc.music`
busybox renice -15 `pidof com.android.music`
sleep 180
done;
I tested it by launching it from my userinit.sh file with:
Code:
renice_daemon &
and it seems to work.
Click to expand...
Click to collapse
The logging isn't needed, it just made it easier to see if it was running so I left it in.
I think your method probably makes more sense. I found that the script would sometimes die or stop updating all of the processes if it ran for a few hours. So I had it restart itself and that issue went away. Will that be a problem with your method?

Kubax83 said:
Added it to my a2sd file, but that turns my phone into a booting loop...
i've got some linux experience, so i think the rights to the file, and the name are ok, since i can run it manualy from shell.
here are the last 5 lines of my a2sd...
Code:
setprop cm.a2sd.active 0;
fi;
sync;
setprop cm.filesystem.ready 1;
/system/bin/sh /data/opt/autostart.sh
Click to expand...
Click to collapse
I'm not sure why you would get into a boot loop. That is strange. The last 5 lines of your a2sd look the same as mine. When you run it manuall, does it output to the log file?

-- Nevermind --
I just saw your post over the xROM thread.
That gave me the answer about my network connection problems.
Thanks.

blueheeler said:
I installed xROM this morning (r3), and it's been hit or miss every time that I reboot, I may or may not get "network connection". That started with the initial setup wizard and has gone on throughout the day.
I thought removing all the widgets would do it, but that hasn't been a solution and I had to switch back to Cyan's until this gets worked out.
Could this have anything to do with problem, and would there be a possible fix?
I'd like to try this on my installation of Cyan, but I'd like to see if I would need to make an modications should I run into the no network problem on other roms.
Click to expand...
Click to collapse
I think those are 2 different issues but they are both being addressed on xROM. It seems that this script will cause conflicts with BFS and shouldn't be run on any ROM that uses BFS, xROM or Cyan.
The radio issues are probably being caused by the new donut radio that was added to xROM. JAC is going to get this resoved as well. Look for an update later today.

ive been trying to get this to work on my jachero1.7r2 almost all day , since i loved how it work on jachero 1.8 but unfortionally there were some problems with that rom that brought me back to 1.7r2.
i follow the directions, but theres not folder in data/opt...i also notice the file was place in the "bin" folder in 1.8...should i try that ?
any help will be greatly appriciated...thxs in advance

Exilim809 said:
ive been trying to get this to work on my jachero1.7r2 almost all day , since i loved how it work on jachero 1.8 but unfortionally there were some problems with that rom that brought me back to 1.7r2.
i follow the directions, but theres not folder in data/opt...i also notice the file was place in the "bin" folder in 1.8...should i try that ?
any help will be greatly appriciated...thxs in advance
Click to expand...
Click to collapse
Ahhh, a perfect example for using this script. It will work great with 1.7r2. I'll attach an updated a2sd file for you and the same script that is used in 1.8. You will need to drop them both in the /system/bin/ folder and then run these commands from terminal
su
rwsystem
chmod 755 /system/bin/a2sd
chmod 755 /system/bin/setPriority.sh
Let me know if you need more info.
Edit: fixed the command from as2d to a2sd.

i copied both files using Root Explorer , and check they were both there....
but eveything time i get to the comands :
chmod 755 /system/bin/as2d
i get " unable to /system/bin/as2s: no such file or directory"
but it works with :chmod 755 /system/bin/setPriority.sh
is there anything im missing ?

Exilim809 said:
i copied both files using Root Explorer , and check they were both there....
but eveything time i get to the comands :
chmod 755 /system/bin/as2d
i get " unable to /system/bin/as2s: no such file or directory"
but it works with :chmod 755 /system/bin/setPriority.sh
is there anything im missing ?
Click to expand...
Click to collapse
oh crap, typo. it should be a2sd.

Related

Preferences Ownership issues?

I have been using JF 1.43 for a few months and loved it. Seeing that Cupcake became mainstream, I took the plunge two days ago and have been having issues. I tried JF 1.51, then a mod, then theDudes, all with some problems. I tried wiping and keeping apps in regular memory just for testing. I finally got a clean install using TheDudesCupcake which worked ok for me. When I pushed my preferences back using adb, it just hung on the "android" screen.
I was getting annoyed at myself for not understanding what was going on . The confounding problem was that the set of prefs that I was restoring had adb disabled, so I couldn't get a logcat to see what was really happening.
Long story shorter...
After some more fresh installs, I think what I have sorted out is that all of my preferences files lost their correct ownership. I found that when I had a program that was crashing, I would log in to an adb shell, use ps to see what user the app was running as, for example app_82. Then, I would chown app_82.app_82 for the directory within /data/data. I would then to it recursively since busybox doesn't have -R for chown by issuing the command chown app_82.app_82 /data/data/com.android.weather/cupcake/* and then chown app_82.app_82 /data/data/com.android.weather
It fixes programs that were having problems accessing their sqlite3 DBs which was the clue in the logs that led me to this solution.
As I am going through I see that it improves the performance and error rate of programs by doing this. Obviously core functionality doesn't have the same ease of repair.
Is this the wrong thing to do here? Is there a better way to restore files after an upgrade so that this doesn't happen again?
I saw that someone wrote a python script to fix these permissions, though I don't understand where they got python to run on Android in the first place. Is there a shell script that can parse an app's uid and fix its supplemental files accordingly?
I tried searching, but may not have used good keywords about this issue.
Any help/advice/info would be appreciated.
The answer
This guy has a python scirpt that nicely spits out a shell script to fix all of them
http://blog.elsdoerfer.name/2009/05/25/android-fix-package-uid-mismatches/
Code:
"""Parse Android's /data/system/packages.xml file and spits out
shell code to fix UIDs.
This helps you fix "Package x.y.z has mismatched uid: 10089 on disk, 10079
in settings" errors.
"""
from xml.dom import minidom
xmldoc = minidom.parse('packages.xml')
packages = xmldoc.getElementsByTagName('package')
ignored = []
for package in packages:
try:
userId = package.attributes['userId'].value
is_shared = False
except KeyError:
userId = package.attributes['sharedUserId'].value
is_shared = True
# do not touch permissions of shared apks (they userid always seems to be 1000)
if not is_shared:
print "busybox chown %s:%s %s" % (userId, userId, package.attributes['codePath'].value)
for subdir in ('', 'databases', 'shared_prefs'): # note we don't touch lib/
print "busybox chown %s %s:%s /data/data/%s/%s" % (
'-R' if subdir else '', userId, userId, package.attributes['name'].value, subdir)
Essentially, you can use adb pull to pull /data/system/packages.xml locally, run this python script on it, and then send each command back. One way to do this on *NIX is
Code:
adb pull /data/system/packages.xml . ; python fix.txt | xargs adb shell

Cyanogized Compache nocturna.JacHeroz (jachero 2.7.3MOD with compache support)

THIS HAS NOTHING TO DO WITH JAC 2.7.4 This is different!!
JacHeroski cyanagized with compache swap
07/21/09 1:27PM
download rename to update.zip and put on the phone flash as normal requires special spl and new radio
also requires ext2/3 swap and linux swap partitions
Nocturna.JacHeroZ cyanogized 1.0b
Much thanks to: justanothecrowd,cyanogen,ccyrowski,haykuro,jesufreke,D.b. hates you,drizzydrakerogers,h.nocturna, and jasherai
H.NOCTURNA! thanks for those .ko files or i wouldve been up till like 5 am looking
Im at work right now so i cant really put this all together quite yet but ill give you the rundown of how it will be done
if you dont wanna use the precompiled update.zip to avoid wipe
First download and flash Jachero 2.7.3
Then download jacheroski 1.4c and unzip in the folder you will need to things the "boot.img" in the main folder then jump into the /system folder and go ahead and copy the "modules" folder as well then open up /system/lib/modules/ and copy the wlan.ko
also youll need /system/bin/a2sd.sh
you should have 4 files pulled from this rom:
Modules
Boot.img
wlan.ko
a2sd.sh
heres what you do with those things:
Take modules and
adb push modules /system/modules/
take boot.img
adb push boot.img /sdcard/
wlan.ko
adb push wlan.ko /system/lib/modules
then please check this post and download the .ko files zipped attached to post
right here!!!
youll need to put these two files onto /system/modules/
one should be ramzswap.ko and xvmalloc.ko
Now for the a2sd.sh .. this script is ran on boot to do apps2sd but you can add to the end of it wich is what we are going to do
you will need to open this i used a word processor on my mac so it worked i duno about windows but you need to add these lines of code and then save it as a seperate document KEEP THE ORIGINAL!
#!/system/bin/sh
insmod /system/modules/xvmalloc.ko;
insmod /system/modules/ramzswap.ko memlimit_kb=32000 backing_swap=/dev/block/mmcblk0p3;
mknod /dev/ramzswap0 b 253 0;
echo 20 > /proc/sys/vm/swappiness;
swapon /dev/ramzswap0;
exit;
THEN adb time agian
adb push a2sd.sh /system/bin/
adb shell chmod 755 /system/bin/a2sd.sh
ok after this is done we need to change over to cyanogens boot.img wich contains his kernel that works with compache
so you either need to do this in adb or in terminal from the phone
$su
#flash_image boot /sdcard/boot.img
#exit
$exit
bingo bango cyanogized now!
ok now its time to reboot the phone
should start up as normal "may take a bit the first boot"
after fully booting up open up terminal app and type the following
$su
#free
(this should display your swap line with numbers in it)
IF YOU GET ZEROS HERE STOP WHAT YOUR DOING AND SKIP TO THE BOTTOM FOR INSTRUCTIONS TO FIX THAT
if you dont get zeros everything is going good
now type the following
$su
#cat /proc/ramzswap
you should get a list of things if it says not found stop what your doign skip to the bottom for instructions to fix it
if it gave you a list of numbers great everythings good enjoy your new faster jachero!
IF YOU GOT ZEROS IN YOUR SWAP LINE OR NO READING FOR ramzswap!!!
Do the following,
take your original a2sd.sh and get in adb
adb push a2sd.sh /system/bin/
adb shell chmod 755 /system/bin/a2sd.sh
adb shell reboot
now....
i suggest doing this in adb but you can type it all in terminal if you want...
type the following to enable compache
$su
#insmod /system/modules/xvmalloc.ko
##insmod /system/modules/ramzswap.ko memlimit_kb=32000 backing_swap=/dev/block/mmcblk0p3
#mknod /dev/ramzswap0 b 253 0
#echo 20 > /proc/sys/vm/swappiness
#swapon /dev/ramzswap0
#cat /proc/ramzswap
should show a list of numbers probably all at 0.. this is good
reboot phone now (the insmod and swap on stick after reboot)
tada!!
whenever i get off work ill compile this and post the update.zip for those who dont feel like doing this much work
this is not a SUPER customized rom or anything i just put together pieces i wanted to enable the compache swap on this... i feel it increases responsivness ALOT and alot smoother interface using compache and linux swap
lmk about any bugs or anything
h.nocturna said:
I actually have my update.zip completely finished. I threw it together last night, but I lost multi-touch as well as the weather update for the "Current City" everywhere else would update, but it would say no weather information for my current location. =/ I can throw the update.zip up if you guys want. I have basically the exact same changes that Zarboz had since I followed his instructions... lol
EDIT: Uploading now...
http://depositfiles.com/files/k449ghyxq
If anyone knows how to fix the weather problem or get multi-touch back, let me know and I'll update, and resign for you guys.
Compcache set up: push userinit.sh from zip to /system/sd/
-or-
Code:
#!/system/bin/sh
insmod /system/sd/xvmalloc.ko;
insmod /system/sd/ramzswap.ko memlimit_kb=32000 backing_swap=/dev/block/mmcblk0p3;
mknod /dev/ramzswap0 b 253 0;
echo 20 > /proc/sys/vm/swappiness;
swapon /dev/ramzswap0;
exit;
Click to expand...
Click to collapse
'
TODO LIST!
Multitouch on Cyanogens kernel
optimize compache script on boot (reading jasherais posts like crazy)
wow thanks for this, will wait for ya update.zip! out of curiosity, how much automation will your update.zip have? example, after flashing with Jachero 2.7.3, will your update.zip take care of everything else?
trying this now, will report back if it works after im done
Edit: ill quickly compile an update.zip for this, might take a while to upload though
the only problem i encountered when i did this was editing the a2sd.sh and getting it to work after i put it back in the system
if you have to get into terminal and do
su
chmod 755 /system/bin/a2sd.sh
exit
just to be safe
this script also enables the linux swap partition on boot
so your using compache highspeed swap as piramry and linux swap as secondary the compache swap is stored on your ext2/3 partition
Zarboz said:
the only problem i encountered when i did this was editing the a2sd.sh and getting it to work after i put it back in the system
if you have to get into terminal and do
su
chmod 755 /system/bin/a2sd.sh
exit
just to be safe
this script also enables the linux swap partition on boot
so your using compache highspeed swap as piramry and linux swap as secondary the compache swap is stored on your ext2/3 partition
Click to expand...
Click to collapse
I wish I wasn't at work so that I could do this right now!! I guess that I will have to wait a few hours (Plus by then I'm sure someone will have an update to flash. If not I'll make on when I get home and upload it)
i'm gonna try this now. will report back
Diceman4 said:
I wish I wasn't at work so that I could do this right now!! I guess that I will have to wait a few hours (Plus by then I'm sure someone will have an update to flash. If not I'll make on when I get home and upload it)
Click to expand...
Click to collapse
yah when i get off a t 9pm central time ill make a update.zip and get it put up somewhere
I actually have my update.zip completely finished. I threw it together last night, but I lost multi-touch as well as the weather update for the "Current City" everywhere else would update, but it would say no weather information for my current location. =/ I can throw the update.zip up if you guys want. I have basically the exact same changes that Zarboz had since I followed his instructions... lol
EDIT: Uploading now...
http://depositfiles.com/files/k449ghyxq
If anyone knows how to fix the weather problem or get multi-touch back, let me know and I'll update, and resign for you guys.
Compcache set up: push userinit.sh from zip to /system/sd/
-or-
Code:
#!/system/bin/sh
insmod /system/sd/xvmalloc.ko;
insmod /system/sd/ramzswap.ko memlimit_kb=32000 backing_swap=/dev/block/mmcblk0p3;
mknod /dev/ramzswap0 b 253 0;
echo 20 > /proc/sys/vm/swappiness;
swapon /dev/ramzswap0;
exit;
NguyenHuu said:
wow thanks for this, will wait for ya update.zip! out of curiosity, how much automation will your update.zip have? example, after flashing with Jachero 2.7.3, will your update.zip take care of everything else?
Click to expand...
Click to collapse
itll basically be 2.7.3 wiht some minor structure changes
all i really did was add compache support i didint rewrite the whole thing
h.nocturna said:
I actually have my update.zip completely finished. I threw it together last night, but I lost multi-touch as well as the weather update for the "Current City" everywhere else would update, but it would say no weather information for my current location. =/ I can throw the update.zip up if you guys want. I have basically the exact same changes that Zarboz had since I followed his instructions... lol
EDIT: Uploading now...
Click to expand...
Click to collapse
sweet lmk when it gets up and ill put a link on main page
i might crack it open and do some other minor changes i might know why the current city isnt working
##edit## it works on mine .......
MULTITOUCH WILL NOT WORK ON THIS BUILD! due to cyanogens kernel
i dont use it anyway....
lmk when its up
Zarboz said:
sweet lmk when it gets up and ill put a link on main page
i might crack it open and do some other minor changes i might know why the current city isnt working
##edit## it works on mine .......
lmk when its up
Click to expand...
Click to collapse
Its up now. Out of curiosity, do you still have multi-touch on yours?
EDIT: HAHAHAHAHA!! Looks like we got one-upped. JACHero2.7.4 w/ compcache is being uploaded now.
h.nocturna said:
Its up now. Out of curiosity, do you still have multi-touch on yours?
EDIT: HAHAHAHAHA!! Looks like we got one-upped. JACHero2.7.4 w/ compcache is being uploaded now.
Click to expand...
Click to collapse
PSHH dangit
o well wahts the link ill still put it up
Zarboz said:
PSHH dangit
o well wahts the link ill still put it up
Click to expand...
Click to collapse
I added the link to my other post on page 1
h.nocturna said:
I actually have my update.zip completely finished. I threw it together last night, but I lost multi-touch as well as the weather update for the "Current City" everywhere else would update, but it would say no weather information for my current location. =/ I can throw the update.zip up if you guys want. I have basically the exact same changes that Zarboz had since I followed his instructions... lol ..snip..
Click to expand...
Click to collapse
I just set this up myself using the directions in the first post, and I can get weather info for my current location...
EDIT: And it flies now... Here's my info...
Code:
# free
free
total used free shared buffers
Mem: 97908 96472 1436 0 92
Swap: 94672 14208 80464
Total: 192580 110680 81900
# cat /proc/ramzswap
cat /proc/ramzswap
DiskSize: 32000 kB
NumReads: 1946
NumWrites: 3848
FailedReads: 0
FailedWrites: 0
InvalidIO: 0
PagesDiscard: 0
ZeroPages: 276
GoodCompress: 75 %
NoCompress: 7 %
PagesStored: 3572
PagesUsed: 1135
OrigDataSize: 14288 kB
ComprDataSize: 4510 kB
MemUsedTotal: 4540 kB
BombaMyte said:
I just set this up myself using the directions in the first post, and I can get weather info for my current location...
EDIT: And it flies now...
Click to expand...
Click to collapse
i think that rosie girl likes the compache dope makes her go real fast
My system is not utilizing compcache, instead preferring to use my swap. I'm now testing my system with swap partition disabled:
# swapoff /dev/block/mmcblk0p3;
coolbho3000 said:
My system is not utilizing compcache, instead preferring to use my swap. I'm now testing my system with swap partition disabled:
# swapoff /dev/block/mmcblk0p3;
Click to expand...
Click to collapse
The way h.nocturna coded the userinit.sh for this made it prefer compache over linux swap partition for speed issues then linux swap is secondary
lmk how it runs with no linux swap partition on
EDIT
my system didnt use the compache swap till after reboot then it was FAST
Zarboz said:
i think that rosie girl likes the compache dope makes her go real fast
Click to expand...
Click to collapse
LMAO! Hell yeah she likes that compcache dope! Got a friend that's been trying *not* to root his phone for a few months now. He will once he sees this...
BombaMyte said:
LMAO! Hell yeah she likes that compcache dope! Got a friend that's been trying *not* to root his phone for a few months now. He will once he sees this...
Click to expand...
Click to collapse
i need to change the scripting the swap is getting slow after a day or two there was some info in the compache thread about this ... ill let yall know whtas goin on
I realized you need to turn on the swap on sd after compcache has initialized.

[HACK] (!update 04/26/2010) JIT enabled Dalvik VM on Android 1.6 (Dusted Donuts)

Update (fix for /cache/dalvik-cache 04-26-2010): Really only use this if your having issues using the symbolic link fixes posted by other members or are just out of free space on /cache. First the new issues people are experiencing is in cm-based-kernels from 4.2.15.x and not JIT enabled DalvikVM and people using danger/death spl will experience problems faster. Lack of space on /cache is a problem and will cause market downloads to fail as well as email attachments. The other problem is the kernel fails for various and unknown reasons to mount bind /cache/dalvik-cache to /data/dalvik-cache.
The other issue is the use to dalvik-cache clearing scripts and options in RA recovery, stop clearing your dalvik-cache, the .dex files are created when missing and you do not get any benefits by doing so and cause more wearing leveling of NAND, plus the script in RA recovery doesn't appear to look at /cache/dalvik-cache for dex files. This little update script (when installed correctly).
Understand that /cache/dalvik-cache is a newer option as a means to free up space on /data is by using /cache/dalvik-cache as a first storage of dex files then using the standard /data/dalvik-cache for over flow of dex files and newer installed apps. Somewhere along the way something may throw this and you get douplicate dex files in both locations, one way to check is to boot into recovery and
Code:
mount -a
and check dalvik-cache directories in both /cache and /data for douplicate dex files.
The script will fix these issues, or should at least:
Endless loop FCs on boot
broken /cache/dalvik-cache mount
no binded mount
missing user apps
missing system apps
failed market downloads
non-working symlink patches and installers (no need to run these, they will break this patch)
fixes duplicate dex files in both /cache/dalvik-cache and <target>/dalvik-cache (because it deletes /cache/dalvik-cache)
Will not Fix:
your ignorance
your unwillingness to read
your unwillingness to learn
your compulsive ROM flashing disorder
your compulsive dalvik-cache clearing syndrome
version 1.1.1(updated 4/27/2010 @ 10:10 PM) is current and was slapped together from Phonekenstein, it doesn't look for the existance of /cache/dalvik-cache it assumes it's there and deletes it wether it's a directory, a symlink or a file, re-creates a new empty /cache/dalvik-cache with Android default permissions and mount binds it to /data/dalvik-cache (be it a directory, a symlink or another binded mount) /cache/dalvik-cache will follow the target /data/dalvik-cache (no worries for apps2sd users or non-apps2sd users).
Script will turn on the blue LED when booting so you know it executed (if it annoys you then edit the script and make it pink)
Tested on Cyanogen MOD 4.2.15.1 and SuperD 1.10.3:
with and without apps2sd
with and without a /dev/block/mmcblk0p2 (apps2sd script nulled)
with and without a custom /dev/block/mmcblk0p4
with mount binded /ext/dalvik-cache (mmcblk0p4) to /data/dalvik-cache
with /data/dalvik-cache as a symbolic link to /ext/dalvik-cache (mmcblk0p4)
All scenarios experienced no failures as long as you set your permissions correctly on all targets and files and /cache/dalvik-cache followed and binded flawlessly.
install is simple and can be done through terminal:
1. download 86dalvik-cache-fix <--Long press and chose "save link as" (also attached to this post)
2. open terminal and issue these commands:
NOTE: COMMANDS ARE CASE sensitive in LINUX and as such ANDROID!!!!!!
ALL OFF THESE COMMANDS ARE IN lower case. SO Turn off your Auto-Caps options in your keyboard options. These command assume you downloaded the script using your the web browser on your G1/Magic whatever phone and the file is located in /sdcard/download (the default location for web browser downloads).
Code:
su
mount -o rw,remount /system
cp /sdcard/download/86dalvik-cache-fix.txt /system/etc/init.d/86dalvik-cache-fix
chown 0:2000 /system/etc/init.d/86dalvik-cache-fix
chmod 755 /system/etc/init.d/86dalvik-cache-fix
sync
reboot
Why 86dalvik-cache-fix? We want the script to execute after all scripts in /system/etc/init.d/ including /system/sd/userinit.sh (if you are using one) and before script 99. 86 because in 1987 everything got 86'd.
If you are having a problem getting the script to execute, copy it or merge it into /system/sd/userinit.sh (even if you aren't using a mmcblk0p2(ext partition)) it may make it work with FastTest builds, however the permissions on his builds appear to be root everything and I have problems getting the script to execute out of /system/etc/init.d even with root permissions.
--------------------------------------------------------------------------------------------------------------
Primer: Read this about Dalvik VM http://en.wikipedia.org/wiki/Dalvik_virtual_machine
Read this to: Google Groups post about JIT compiler for Dalvik VM from Android-Platform Link
From the post we see that this particular compiled library is ALPHA, so results can vary, but from reading most posts in this thread the results are right near the talked about 3x faster code, stability is going to vary on what apps and or widgets are running. More Widgets = slower performance as these have processes that are eating cycles. When testing with Linpack wait for the advertisement to load first then tap the benchmark button and remove your finger from the touch screen. Background process such that interrupt or having auto-rotate enabled while testing is going to give you slower benchmarks.
In short your apps should load faster and run faster, particularly 3D games. The web browser is faster and you can actually scroll through pages even while graphics are still loading.
The reboot when enabling it is long even appearing to hang at the G1 Screen for 5 minutes or more but once it starts booting past this you will know that your ROM is compatible. The cause is that the dex files are being optimized, after about a third reboot, your ROM should feel pretty snappy and launching apps should be quicker as well as switching apps. The snappiness lasts as well and as some may have said that it's a placebo effect are wrong. Bench mark readings prove it and more importantly a few ROM builders have included this in their 2.1 ROMs as experimental.
The libdvm.so that t3steve cross compiled for the DROID at the time was for Android 2.0, the library works for with newer ROMs Android 1.6 that have some eclair pieces built into the kernel, CyanogenMOD has been using bits and pieces for a while now, if other ROM builders have been using his kernel and framework than a good chance it will work for your phone as well.
I have nothing to do with the compiling of this or the exact functions of enabling JIT except that I had a hunch that the combo might work and it did, so I'm sharing it.
If you aren't good at typing in commands, or don't know how to extract a zip file and understand that a sub folder may or may not exist where you have extracted said zip file to, well.... you may run into some issues, maybe a video tutorial for basic command line on youtube would be a good place to learn.
I wanted to make a very detailed post on www.andoidonroids.com about how to mash the JIT enabled Dalvik VM library into Android 1.6 Donuts I'm calling the hack "Dusted Donuts" and take from the name for what you will. I have been using the JIT enabled Dalvik VM for about two weeks and i runs decent but not perfect. Anyhow a death in the family Sunday has kept me from making a decent post and haven't had the time to get to the website and post and cross post and give credit where due.
No doubt that aaraya1516 broke the news on http://forum.xda-developers.com/showpost.php?p=5703076&postcount=193 as he was first to break the hack on FastTest, not taking anything away from him on that.
My testing goes back two weeks or more even during the 580mhz & 780mhz hack, I was waiting for someone to compile a boot.img with some 2.x stuff and sure enough the carlospants boot.img from ctso worked with enabling JIT for Dalvik VM, but as we know now the overclocking doesn't work at the moment.
Thank Cyanogen and t3hSteve of which may not know that this was entirely possible. Cyanogen mixed in enough Eclair into his Donuts (he's like Willy Wonka) that makes it possible to use the cross compiled JIT enabled Dalvik VM library from 2.1 for the Motorola DROID 2.0.1 libdvm.so that t3hSteve of www.alldroid.com compiled for the custom roms on Droid.
WARNING: Using other methods supplied from other forum members that include replacing the build.prop may cause problems, using the build.prop from the original VMLIBS.ZIP (which is here for reference and original source for libdvm.so) is definitely going to cause ROM and application problems. Hello....use your head here... the VMLIBS.ZIP is for Motorola DROIDS, why would you put the build.prop file for a DROID on your G1 and expect your apps or ROM to work afterwards? It's so simple, you need 1 file, it's called libdvm.so it goes in /system/lib a file by the same name already exists there and it's in your best interest to at least back it up before overwriting it and gives you the ability in the event that your system doesn't boot up you can restore it through recovery console and get your phone to boot past the G1 screen.
FYI: Some ROMs have the option dalvik.vm.execution-mode=int:fast in the /system/build.prop file, this would need to be changed to dalvik.vm.execution-mode=int:jit or commented out or deleted. If you want to play with advanced options create /data/local.prop and fiddle in there with options available from typing dalvikvm -h in your console or terminal app.
Required:
1. Android 1.6 ROMS with a bit Eclair stuff in the Kernel and framework such as Cyanogen ROM 4.2.x, Super D 1.8 - 1.92, WG Y2.6, FastTest, KingKlick Eclair and more.. This libdvm.so works on Android 2.1 as well as it seems it should.. 1 st bootup is slow and I recommend you let it sit even when desktops are up for a couple of minutes and then reboot it, 2nd and 3rd bootups are faster and smoother response overall even for long durations, days.
FIX YOUR FILE SYSTEM FIRST !!!!!! Got to do it from Recovery Console, It's partly the cause of poorly running ROMS and takes seriously longer to type the command than to fix your unknowingly faulty file system. EXT2 is the worst offender and the built in function to repair falls short, even more so when checking EXT4.
Code:
#e2fsck -fcpDC0 /dev/block/mmcblk0p2
#reboot recovery
For the lazy fingers
#e2fsck -fcpDC0 /*/*/*0p2
#reboot recovery
1. Download www.androidonroids.com/dusted-donuts (File has 3 scripts backup, install, restore, 2 folders, 1 libdvm.so)
2. Extract zip to root of /sdcard or where ever you like (the zip has a folder containing the files named dusted-donuts)
3. Open Terminal or go to Recovery Console
FYI when running the install through Terminal your system may freeze or reboot and if it does I highly recommend that you prepare to enter Recovery Mode and check your file system. EXT2 corrupts quickly choosing this for apps2sd to use is not the best option especially if you are using custom ROMs that may lockup or reboot, basically that's a crash.
Code:
$su
#mount -o rw,remount auto /sdcard
#cd /sdcard/dusted-donuts
#sh backup
#sh install
#sync
#reboot
Check the Dalvik VM execution mode. look at the bottom line with_jit means the it is installed , and look at all of those options that can be jammed into your build.prop and local.prop files
Code:
$su
#dalvikvm -h
Phone won't boot past G1 screen? Go to recovery console and restore libdvm.so (give it at least 5 minutes first before giving up)
Code:
#mount -o rw,remount auto /sdcard
#cd /sdcard/dusted-donuts
#sh restore
#sync
#reboot
---------------------------------------------------------------------------------------------------------------------
prefer to use VMLIBS.ZIP from t3hSteve? This is how you can install using that.
Required:
1. Android 1.6 ROMS with a bit Eclair stuff in the Kernel and framework such as Cyanogen ROM 4.2.x, Super D 1.8 - 19.2, WG Y2.6, FastTest, KingKlick Eclair and more.. This libdvm.so works on Android 2.1 as well as it seems it should..
How to install: (easier to go in recovery mode but can be done through terminal)
1. Download the VMLIBS.ZIP from t3hSteve of allroid.com http://alldroid.org/download/file.php?id=1374
2. You only need the libdvm.so file of which appears to be JIT enabled by default.
3. Backup the original libdvm.so #cp /system/lib/libdvm.so /sdcard/libdvm.so
4. Copy the JIT enabled libdvm.so #cp -f /sdcard/vmlibs/libdvm.so /system/lib/libdvm.so
5. Set permissions on the file #chmod 644 /system/lib/libdvm.so
Optional for disabling: (easier to do vi through recovery console, since the back key escapes out of terminal)
To disable JIT MODE but want to keep the libdvm.so create a local.prop in /data and add dalvik.vm.execution-mode=int:fast
#vi /data/local.prop
press the i key to enter vi interactive mode
type dalvik.vm.execution-mode=int:fast
press back key to exit vi interactive mode
to write the file out and quit vi type :wq
or
restore your backed libdvm.so file from the sdcard.
-----------------------------------------------------------------------------------------------------------------------
Enjoi! the dusted donuts,
-Licknuts (me? I'm like Varuca Salt, I want another pony)
Vendor G1 roms around 1.2 Mflops, Custom G1 roms are around 2.4 MFlops/s and with JIT compiled Dalvik VM 3.6 MFlops/s. At most you will see 3.5 MFlops/s fairly consistently with a minimal load on your system and highs at 3.7 Mflops/s. Test before and after using Linpack from the Market, it's free.
The 13.236 Mflops/s is not normal and you will probably not see with your testing, I have seen 5.x & 7.x but these are far and few between and this took a while with tweaked configurations/settings with a persistent app to kill processes, it is attainable and I hope a ROM developer finds the sweet spot to exploit.
Looks nice.
Pre-JIT enabled: 2.194 Mflops/s
Post-enabled: 3.459 Mflops/s
Not quite getting the results you have there.
Running SuperD 1.9.2 Black W/ Nexus Theme. I copied it twice to make sure that the libdvm.so was copied correctly to the directory. Rebooted the phone, same results. Looks very promising though. If I did something wrong, lemme know.
Managed to get #10 on G1 Benchmarks with 3.583 Mflops/s... still nowhere near 13.~ Mflops/s
same here. Running Super D 1.9 on my magic
before JIT I got 1.xxxx Mflops/s
after i have 2.xxxx Mflops/s
how do you get the 13 Mflops/s ?
-edit-
with swap disabled i'm getting 3.5 Mflops/s
h.nocturna said:
Looks nice.
Pre-JIT enabled: 2.194 Mflops/s
Post-enabled: 3.459 Mflops/s
Not quite getting the results you have there.
Running SuperD 1.9.2 Black W/ Nexus Theme. I copied it twice to make sure that the libdvm.so was copied correctly to the directory. Rebooted the phone, same results. Looks very promising though. If I did something wrong, lemme know.
Managed to get #10 on G1 Benchmarks with 3.583 Mflops/s... still nowhere near 13.~ Mflops/s
Click to expand...
Click to collapse
I got 9 seconds on the pi benchmark
What will this do??
samsara00 said:
same here. Running Super D 1.9 on my magic
before JIT I got 1.xxxx Mflops/s
after i have 2.xxxx Mflops/s
how do you get the 13 Mflops/s ?
-edit-
with swap disabled i'm getting 3.5 Mflops/s
Click to expand...
Click to collapse
So I guess this only works with Swap off?
sabin123 said:
What will this do??
Click to expand...
Click to collapse
Speed your *hit up!
it works with and without swap.
Just the benchmark result is better when swap is turned off.
Got nearly the same as samsara00:
Rom: SuperD 1.9.2
Before (swap off): ~ 2.3 MFlops/s
After JIT enabling (swap off): ~ 3.5 MFlops/s
But the increase to 13.x seems so unreal, why is there only one result that high in the toplist of greene.com!?
Now to find out if this actually speeds up everyday use lol
CM4.2.14.1
Before: 2.3
After: 3.5
Wow! This made my 3G connection faster too. Was only getting 1500kbps before, now getting on average 3200kbps. Awesome. I'm located in Toronto, on Rogers.
Question: Is this Google's JIT? Will Myraids Dalvik Turbo be faster?
Doesn't boot past the G1 screen when using Dwangs 1.17.1 Assume thats because it has no Eclair in it, but it was worth the dream .
Waw!! great works!!
left is before - right one is after
on CM 4.2.14.1, enabled Swap 64MB, CC ON, RAM Hacked
So do we copy the zip to the root of our sd card? Do I extract it first and just copy the one file? The instructions are kind of vague.
G1ForFun said:
So do we copy the zip to the root of our sd card? Do I extract it first and just copy the one file? The instructions are kind of vague.
Click to expand...
Click to collapse
Not to be rude, but if you don't understand those directions, this isn't the sort of thing you should try to do yourself. Wait for a ROM builder to add this in. The directions are perfectly clear, you just need to understand command line use.
If you want to learn something about CLI use, install Linux on your computer and learn to use it without the GUI. If you don't want to do that, google for "cygwin" and use the bash shell they provide for Windows based machines.
Personally, I used adb and just pushed the darn file lol works perfectly fine, like everything else I've ever pushed. Just don't forget to set the permissions for the file.
tried in a terminal and with adb getting read-only file system when trying to copy over the libdvm.so file
SilentTweak said:
Personally, I used adb and just pushed the darn file lol works perfectly fine, like everything else I've ever pushed. Just don't forget to set the permissions for the file.
Click to expand...
Click to collapse
Nothing wrong with adb. Hell, I used SSH to do it. Just about anything will work, you just have to know what you're doing.
Damn.... I just rebooted and it took about half the time it used to.
Tried the Linpack benchmark, getting about 3.5 with SuperD 1.9.2 w/Compcache 16M swappiness=10. Fresh reboot, obviously. Lock your CPU to 528 (min and max) for more consistent results. When I have 128min 528max, it gives different results depending on the current CPU speed. SetCPU or Overclock Widget helps a lot here. No instability noticed yet, but this should probably be considered an unstable hack for now till we all get more experience with it. I know OpenEclair removed the JIT VM because of stability problems.
Sgt.EddieWinslow said:
tried in a terminal and with adb getting read-only file system when trying to copy over the libdvm.so file
Click to expand...
Click to collapse
Do "adb remount" first
ttabbal said:
Not to be rude, but if you don't understand those directions, this isn't the sort of thing you should try to do yourself. Wait for a ROM builder to add this in. The directions are perfectly clear, you just need to understand command line use.
If you want to learn something about CLI use, install Linux on your computer and learn to use it without the GUI. If you don't want to do that, google for "cygwin" and use the bash shell they provide for Windows based machines.
Click to expand...
Click to collapse
Obviously they are not clear to me. Why argue the point?
I have worked plenty with cmd type interfaces...so please...put down your know it all stick and be helpful.
edit: hope this helps somebody else...look better instructions posted in the fasttest thread!
download files here and copy them on the sdcard
created a folder /sdcard/jit and put the three files in it
make a folder /sdcard/dalbk and copy the original files
adb pull /system/build.prop .
Open in WordPad/Textpad and add as the last line: dalvik.vm.execution-mode=int:jit
SAVE IT, copy/push it on the /sdcard/jit folder
Sgt.EddieWinslow said:
tried in a terminal and with adb getting read-only file system when trying to copy over the libdvm.so file
Click to expand...
Click to collapse
Code:
C:\Android\tools>adb shell
# su
su
# mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
# chmod 777 /system/lib/libdvm.so
chmod 777 /system/lib/libdvm.so
# cp -f /sdcard/vmlibs/libdvm.so /system/lib/libdvm.so
cp -f /sdcard/vmlibs/libdvm.so /system/lib/libdvm.so
# chmod 644 /system/lib/libdvm.so
chmod 644 /system/lib/libdvm.so
# reboot
Damn.... I just rebooted and it took about half the time it used to.
Click to expand...
Click to collapse
Indeed
Licknuts result : 3.1-3.5 (with Super-D 1.9.2)
My method of installing it:
adb remount
adb push libdvm.so /system/lib/libdvm.so
Then open console and type:
su
chmod 644 /system/lib/libdvm.so
reboot
I'm about to try this myself.. has anyone noticed an overall increase in speed? Benchmarks are great but it's all about how it actually performs!
I'll post my own findings in a bit.

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

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:
Click to expand...
Click to collapse
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
ruigui said:
Here is a script i've made (had nothing to do, so...). Phone must have busybox.
Download:
http://www.4shared.com/file/gApTB6EG/tweaks.html
md5 ea568c399c67ecd87db0dd790cdf0e93
Just copy the file to your sdcard. Then in a terminal emulator run:
cd /sdcard/
./tweaks
If it doesn't run, type first:
chmod 777 /sdcard/tweaks
Please give me some feedback. I don't own the phone so i can't test.
Click to expand...
Click to collapse
what the script does?
So script should be able to do:
enable/disable hw acceleration
enable/disable jit
enable/disable stagefright player
change heapsize
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.
It seems that it is well written, so I will try that and let you know what's happened.
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.
How much did you increase the heap size?
domenic_s said:
How much did you increase the heap size?
Click to expand...
Click to collapse
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"
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.
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.
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?
No, i don't.
Sent from my LG-P500h using XDA App
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.
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
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
Click to expand...
Click to collapse
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
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
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.
allsalvati said:
Perhaps you should print the values so the user can see what is enabled or not before apply.
Click to expand...
Click to collapse
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
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
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.
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 !

Better integrating Busybox (2012-11-17)

Most Android ROMs use toolbox as primary binary with symlinks in /system/bin and /system/xbin. The problem with toolbox is that it sucks. On some ROMs it's even so limited that it does not even allow for --prefix
Busybox is a great replacement for toolbox, but in order to use it, you have to call it using 'busybox cmd'. I would much rather use it by calling 'cmd' but this would execute toolbox instead of busybox.
Most would think the command 'busybox --install' would fix this, but it does'nt. It tries to install links at /bin and /sbin.
The script below will replace any toolbox links in /system/bin and /system/xbin that is supported by the busybox version installed on the Android device running the script. This will make busybox the default binary when executing regular commands without adding 'busybox' at the beginning of the command.
For an example 'ls' instead of 'busybox ls'
Download as an update.zip
v1.3.0 (Nov 17, 2012) (MD5: c233964f0f62a16d7376739041e8b250) - busybox_installer.zip (Only for ArmV7 devices)
v1.3.0 (Nov 17, 2012) (MD5: e921a6c4119644a18d4feea565824ab1) - busybox_installer-nobin (Without binaries)
busybox.sh
Code:
#!/sbin/sh
for cmd in test find basename readlink ln rm; do
eval export "_$cmd=\"/sbin/busybox $cmd\""
done
_busybox=$($_find /system -type f -name "busybox")
_toolbox=$($_find /system -type f -name "toolbox")
if $_test -e "$_busybox" && $_test -e "$_toolbox"; then
sToolboxList="watchprops wipe vmstat date uptime reboot getevent getprop setprop id iftop ioctl ionice log lsof nandread newfs_msdos notify ps r schedtop sendevent setconsole setprop sleep smd start stop top"
sBusyboxList="`$_busybox --list`"
for applet in $sBusyboxList; do
if $_test -L /system/bin/$applet; then
if $_test "`$_basename $($_readlink -f /system/bin/$applet)`" = "toolbox"; then
$_ln -sf $_busybox /system/bin/$applet
if $_test -L /system/xbin/$applet; then
$_rm -rf /system/xbin/$applet
fi
fi
elif $_test -L /system/xbin/$applet; then
if $_test "`$_basename $($_readlink -f /system/xbin/$applet)`" = "toolbox"; then
$_ln -sf $_busybox /system/xbin/$applet
fi
elif ! $_test -e /system/bin/$applet && ! $_test -e /system/xbin/$applet; then
$_ln -sf $_busybox /system/bin/$applet
fi
done
for applet in $sToolboxList; do
$_ln -sf $_toolbox /system/bin/$applet
done
fi
Toolbox install links
watchprops, wipe, vmstat, date, uptime, reboot, getevent, getprop, setprop, id, iftop, ioctl, ionice, log, lsof, nandread, newfs_msdos, notify, ps, r, su, schedtop, sendevent, setconsole, setprop, sleep, smd, start, stop, top
Busybox install links
Whatever the currently installed busybox supports that is not in the list of toolbox install links
Change log
Dec 10 2011, 21:39 UTC:
The script will now leave skip replacing /system/bin/reboot as it needs to be pointed at toolbox
Dec 11 2011, 10:08 UTC:
Added an update zip that will configure busybox and it provides an extended 1.4MB binary instead of the regular 480KB most ROM's provide
Dec 12 2011, 09:25 UTC:
Added new busybox build (1.20.0.git 2011-12-11) since there was problem with the old one for some people
Added more busybox search dirs (/system/sbin and /sbin)
Added Toolbox install to make sure that some android specific links uses toolbox instead of busybox. See list above.
Jun 27 2012, 13:45 UTC:
Better Busybox and Toolbox search
Added symlink check to make sure that busybox only replaces toolbox links and not things like "sh -> mksh"
Nov 17 2012, 10:30 UTC:
Added a custom toolbox binary to the ArmV7 installer
Added latest CM9 busybox binary to the ArmV7 binary
Added an auto search function to locate the binaries on the device
Fixed both installers to work with newer devices that uses EXT4 file system
Thanks, dk_zero-cool. I've been looking for a guide to installing BusyBox, since I can only find an add-supported installer in the Android Market.
Thanks, nice job!!
Ran the script, worked and did fine....ONE BIG ISSUE....now if you have any script or app that relies on the "reboot" function, it no longer works. For example, rom manager & bootstrapper will not boot into recovery. I even open up terminal and typed:
Code:
$ su
# reboot
...and nothing...does the reboot in /bin need to not be linked to busybox?
KMDonlon said:
Ran the script, worked and did fine....ONE BIG ISSUE....now if you have any script or app that relies on the "reboot" function, it no longer works. For example, rom manager & bootstrapper will not boot into recovery. I even open up terminal and typed:
Code:
$ su
# reboot
...and nothing...does the reboot in /bin need to not be linked to busybox?
Click to expand...
Click to collapse
Try to relink it back to toolbox and then I will update the script to leave reboot alone.
1: mount -o remount,rw /system
2: rm -r /system/bin/reboot
3: ln -s /system/bin/toolbox /system/bin/reboot
Great! Will try again!
Cool... can I steal this?
I'd implement it with a busybox install script
I'm not a super expert on the subject but is /system/sbin a possible location?
zeppelinrox said:
Cool... can I steal this?
I'd implement it with a busybox install script
I'm not a super expert on the subject but is /system/sbin a possible location?
Click to expand...
Click to collapse
You can use this as you like.
And you can type "echo $PATH" in an adb shell, if /system/sbin is there, then it will work. But why? /system/xbin is usually the default dir for placing busybox, otherwise /system/bin. And you will have to change the script since it will only check in /system/bin and /system/xbin
All times in my scripts report UTC time instead of system time, I am sure there is one other applet in /bin that was linked to toolbox that is now linked to busybox and reporting the date wrong or at least the date/time that busybox says (UTC time).
KMDonlon said:
All times in my scripts report UTC time instead of system time, I am sure there is one other applet in /bin that was linked to toolbox that is now linked to busybox and reporting the date wrong or at least the date/time that busybox says (UTC time).
Click to expand...
Click to collapse
Do the same as before, only this time replace 'reboot' with 'date'
This must be a setting in the busybox compile menu. A new binary might fix this because busybox should be able to display system time. But for now point date back to toolbox and it will work for you.
Yup, did what you just said and all is fine. Thanks! Is there a way you can implement the reboot and date applet ignore in the script within the .zip you made.... I think it will save users some headaches.
dk_zero-cool said:
You can use this as you like.
And you can type "echo $PATH" in an adb shell, if /system/sbin is there, then it will work. But why? /system/xbin is usually the default dir for placing busybox, otherwise /system/bin. And you will have to change the script since it will only check in /system/bin and /system/xbin
Click to expand...
Click to collapse
Well bb is sometimes installed elsewhere.
At first SuperCharger only looked in those 2 locations and stopped when it wasn't found.
What would happen if there was a second version elsewhere?
I suppose it wouldn't matter because of the symlinks.
KMDonlon said:
Yup, did what you just said and all is fine. Thanks! Is there a way you can implement the reboot and date applet ignore in the script within the .zip you made.... I think it will save users some headaches.
Click to expand...
Click to collapse
The reboot fix is already in the zip file.
The date fix I don't want in it, I would much rather fix busybox to work properly.
I'm currently looking at that.
zeppelinrox said:
Well bb is sometimes installed elsewhere.
At first SuperCharger only looked in those 2 locations and stopped when it wasn't found.
What would happen if there was a second version elsewhere?
I suppose it wouldn't matter because of the symlinks.
Click to expand...
Click to collapse
No that does not mater because of the symlinks.
That's why I referrer to the complete path, f.eks, "/system/xbin/busybox" and not just the binary name "busybox".
I am going to try your binary for Busybox and see, I am currently using JRummy's BB installer which installed v1.19.3 which is about 1.06MB....
EDIT: Just flashed the .zip, my phone will not boot past the logo....did a battery pull several times and can't get into CWR....SBF time
KMDonlon said:
I am going to try your binary for Busybox and see, I am currently using JRummy's BB installer which installed v1.19.3 which is about 1.06MB....
EDIT: Just flashed the .zip, my phone will not boot past the logo....did a battery pull several times and can't get into CWR....SBF time
Click to expand...
Click to collapse
Put in your USB cable, open a terminal/console on your computer and try "adb logcat" to see what it says when it stops booting.
You must of cause have adb installed on your computer, and USB drivers if you use windows, which I don't and cant help with.
Already reflashed phone back....sorry, no logcat....
Do it again...
C'mon take one for the team... hehe...
LMFAO!!!! Sorry dude, I ain't gonna do it....will let some other poor soul ....I got honey do's today, it's Sunday!!
Whatever it was I can't recreate it. Works fine when I flash the damn thing.
Here's a thought.....make a script that reverses the toolbox links, I can undo it and try to flash again....I was unable to manually install your busybox version so I think some other toolbox applet is causing me trouble.....

Categories

Resources