[HACK] JIT enabled Dalvik VM on Android 1.6 (Dusted Donuts) [Hack]

Search This thread

aaraya1516

Senior Member
Jan 13, 2009
199
23
It seems that licknuts and I had a common goal in getting JIT on our phones. Here's his the link to his post, I just figured some of you guys could benefit.
http://xdaforums.com/showthread.php?t=637419

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://xdaforums.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.

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..
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.
Code:
#e2fsck -fpDC0 /dev/block/mmcblk0p2
#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

Code:
#su
#mount -o rw,remount auto /sdcard
#cd /sdcard/dusted-donuts
#sh backup
#sh install
#sync
#reboot

phone won't boot past G1 screen? Go to recovery console and restore libdvm.dll
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.
t5lx.jpg

I don't know much about troubleshooting this, I am just posting what worked for me. In the original post I linked above people have been posting their issues and comments.

All credit goes to those mentioned above, not me.
 

st0kes

Senior Member
Mar 9, 2005
631
8
ukstokes.com
Thanks for posting. I just read the other thread about this in the G1 Dev section. How is the stability with the JIT Dalvik VM ... is this hack ready for primetime? Is the performance increase noticeable in apps other than benchmark utilities?
 

aaraya1516

Senior Member
Jan 13, 2009
199
23
Thanks for posting. I just read the other thread about this in the G1 Dev section. How is the stability with the JIT Dalvik VM ... is this hack ready for primetime? Is the performance increase noticeable in apps other than benchmark utilities?

I've been using it since yesterday. No forced closes yet. Certain apps seem to work a little smoother, but I don't run many games. Test it out, it's reversible.
 

st0kes

Senior Member
Mar 9, 2005
631
8
ukstokes.com
OK ...

Before I was getting 2.21x average in Linpack
After I am getting 3.59 average

This is using my rom st0kes1.4 and doing a 'end all' in advanced task manager before the test.

I'll run it for a few days and come back and comment in this thread :)
 

99bluoval

Member
Jan 26, 2010
17
0
So I must be an idiot every time I type; #mount -o rw,remount auto /sdcard
it returns; Usage: mount [-r] [-w] [-o options] [-t type] device directory.

I've tried reading through the list of option and trying a few but i always get the same thing, both in terminal and recovery. Android has been my longest try at anything linux related. Any suggestions might be nice... and I have searched, I find the same sort of command everywhere but they all return the same thing.
Thanks

Edit:
Still never got that line to do anything more for me. But I was able to run the backup and install scripts without it. Although if anybody knows what I was missing in the above line I'd still like to know, even if you can just point me to directions that make sense. thanks
 
Last edited:

aaraya1516

Senior Member
Jan 13, 2009
199
23
So I must be an idiot every time I type; #mount -o rw,remount auto /sdcard
it returns; Usage: mount [-r] [-w] [-o options] [-t type] device directory.

I've tried reading through the list of option and trying a few but i always get the same thing, both in terminal and recovery. Android has been my longest try at anything linux related. Any suggestions might be nice... and I have searched, I find the same sort of command everywhere but they all return the same thing.
Thanks

Edit:
Still never got that line to do anything more for me. But I was able to run the backup and install scripts without it. Although if anybody knows what I was missing in the above line I'd still like to know, even if you can just point me to directions that make sense. thanks

try from a command line in either windows or linux. do adb remount and it should work. That is assuming you have installed the android sdk
 

pagubg

Senior Member
Aug 7, 2008
229
2
Plovdiv
So I must be an idiot every time I type; #mount -o rw,remount auto /sdcard
it returns; Usage: mount [-r] [-w] [-o options] [-t type] device directory.

I've tried reading through the list of option and trying a few but i always get the same thing, both in terminal and recovery. Android has been my longest try at anything linux related. Any suggestions might be nice... and I have searched, I find the same sort of command everywhere but they all return the same thing.
Thanks

Edit:
Still never got that line to do anything more for me. But I was able to run the backup and install scripts without it. Although if anybody knows what I was missing in the above line I'd still like to know, even if you can just point me to directions that make sense. thanks

Just type
Code:
mount /sdcard
 

chrisgto4

Senior Member
Dec 17, 2009
608
121
Dallas
tmobile-mytouch 3g
latest cyan
ram hack
custom kernel
jit enabled monday night.
everything was working really good. yesterday I decided to do a wipe and start from scratch to see if it would work even better. works just the same after wipe. I personally havent had any problems, but did notice a huge increase in stability.
 

phantommusik

Senior Member
Feb 4, 2010
50
0
Seattle
I have to admit the changes were VERY noticable to me. I ran linpack for the benchmark.

Before - 2.0-2.3
After - 3.2-3.6

Good work on this guys! I really appreciate it! Everything is so snappy now!
 

pyee0124

Senior Member
Jan 20, 2010
119
7
BC
Running solid for a few days. Tried on multiple ROMs, even without killing tasks. Can still do over 3.5 with Live Wallpapers running.
 

wreq5

Member
Nov 15, 2009
29
6
Finally managed to get this going on my MT3G with st0kes 1.4.....it is FAAAAAAAAAAAAAAAAAAST!!!!!!