yashsingh1/xdaforums huggingface dataset:
[G1 Android Development] tribalb:
i can confirm a better running phone with this hack. im running super d 1.8 and the reboot alone is rediculous fast. i notice some snappier parts where i expected more from swap. but this hack did the trick. i think ill be leaving my phone the way is. this hack/mod whatever you want to call it made my phone how i like it now. thanks for the work. props to you.
[G1 Android Development] BoomBoomPOW:
Works great on WG-Build

From 2.3 Mflops/s to 3.6

Now it's time to start tweaking with it to get to 13 Mflops/s :D
[G1 Android Development] licknuts:
I revised the instructions and crammed more info in there, more than what was needed obviously but to cover some of the issues some people might have because of the state of their current file system. fix_permissions or One thing that may clear it up is to remove the .dex file and have it rebuilt:

Go into Recovery Console

#mount -a
#sh /sbin/fix_permissions
#sync
#reboot

or

If using apps2sd

#mount -o rw,remount auto /system/sd
#rm -f /system/sd/dalvik-cache/system@app@Browser.apk@class.dex
#sync
#umount /system/sd
#reboot

Lazy fingers (linux is case sensitive):

#mount -a
#rm -f /*/*/*/*Browser*.dex
#sync
#umount -a
#reboot
[G1 Android Development] oreoOozZz:
I just installed fine, when i went into SetCPU though and went to set min/max to 528/128 as soon as i moved the max slider to 528, the phone froze up and wouldnt do anything. Gonna wipe, re flash the rom and not touch SetCPU.

Edit: Just rebooted for the hell of it and everythings fine, weird right? Phone does seem speedy but im coming off of a previous fresh wipe also. I am getting a benchmark of 3.5's consistently in linkpack though.
[G1 Android Development] tribalb:
linkpack 3.xxx

i think all of us with g1's wont get much higher on the mflops/s because of our limited processor. unlike the snapdragons (n1/moto droids) which will definitely get into the double digits.
[G1 Android Development] phuKKah:
...because the Droid has a snapdragon and all...
[G1 Android Development] licknuts:
When adjusting SetCPU, adjust the minimum bar first because for some reason it's set at 128 and will keep freezing you when adjusting the maximum. This happens to my phone even on fresh flash with no hacks.
[G1 Android Development] oreoOozZz:
Sounds good, ill remember that for the future. I just pulled the batt powered the phone on and everything was fine. Phone is in great shape, constant 3.5 m/flops.
[G1 Android Development] njuncos:
same thing happened to me. for some reason, this hack DOES NOT work on OpenEclair.
[G1 Android Development] linkoo:
I think it was mentioned in a twitter post recently that wes was about to jit-enable again for the 1.2.2 release.
[G1 Android Development] traspler:
Tried it on my ADP1 and got the 3.5Mflops BUT it seems the Home app has some issues with it and the phone gets noticeably hot in my hand even when just in Home. Does it disable all the CPU frequency scaling?

Browser seems laggier as well but that I can not say for certain as it was laggy before as well.
[G1 Android Development] Shrivel:
Overclock Widget shows my CPU scaling up and down just fine.
[G1 Android Development] ttabbal:
I agree. I'm about 24 hours in, and things are still running very well. I did a fair bit of work with Java back before it had a JIT, and the performance difference is significant. The best thing about a JIT, is that a good one will increase speed of execution the longer you run the program in it. Of course, there is an upper limit, but it sure beats slowing down over time. :)

I still think it needs to be watched, but I'm liking it so far.

As for the battery, if any change is noticed, I would expect it to be better, not worse. The faster the VM can execute the instructions, the less time the CPU needs to be clocked up to run them. As noted, this will only affect Java code, not native libraries or other apps written in C/C++.
[G1 Android Development] oreoOozZz:
Using Super D 1.9.2 with this hack, it breaks the application PhoneMyPC. Just figured i would post to let anyone know who uses this hack and also uses this app. When you go to interact live, it will work but only for a few seconds then freeze up. Thats the only error i have seen thus far though, everything else is fine and back to home screen, opening apps, etc...is in fact speedy.
[G1 Android Development] drbobb:
Nice, it seems to be flying on my HTC Magic 32A / Cyanogenmod current stable.

Although getprop dalvik.vm.execution-mode just returns an empty line, logcat indicates that JIT is in use, I guess:

D/dalvikvm( 622): Total arena pages for JIT: 2

D/dalvikvm( 622): Total arena pages for JIT: 3

etc.
[G1 Android Development] ma401:
I don't know if it's just me but I found that after applying this hack every time I rebooted my phone it would restart once or twice again before settling down to what seemed to be stable?

I've since gone back to stock SuperD 1.9.2.. but considering trying this again?

Not entirely sure if it felt faster or not though.. ugh
[G1 Android Development] njuncos:
yes, it seems the:

getprop dalvik.vm.execution-mode

command does return an empty line.

i'm now running CM 4.2.14.1 and i'm getting Linpack scores of around 3.5-3.6 consistently

Update: Google Shopper FC'ed when i tried to scan a barcode...
[G1 Android Development] g1DDriver:
Tried this thing. Mflops increased, but started some issues of data connection in bad signal area :confused:. Restrore - everything working fine and Mflops still 3+ :confused::confused:.

How to check is it actually turned on or off?
[G1 Android Development] alabasta10:
Thanks for The hack! benchmark with linpack constant 3.5-3.6 on 6.35 32a Eclair 2.1 by Ahgmsk Rom :D. Thanks!
[G1 Android Development] giantcrazy:
Just put the hack on my CM 4.2.14.1 - tests were 2.217 Mflop before, 3.481 Mflop after. Looking forward to seeing if this translates into better performance in practical use as well as the stability.

I'll report back, but thanks!
[G1 Android Development] cyanogen:
JIT was the reason I backported Eclair's Dalvik to Donut to begin with. Lots of people have done extensive testing, and yes, it helps with benchmark apps but it is very unstable and uses more memory.

It's nice to see whats coming down the pipeline from Google, but I don't expect to see this code updated until Froyo.
[G1 Android Development] xaueious:
In otherwords not recommended at the moment

Thanks for the input Steve
[G1 Android Development] domenukk:
If the maestro himself said it, its not gonna be included in roms so far.

working nicely for me, though.
[G1 Android Development] linuxluver:
Installed on FastTest 2.7

I've installed this on FastTest 2.7 on my second - sandbox- HTC Magic 32B phone (flash 5 ROMs by lunchtime!!).

I didn't get any error messages running the backup and install scripts. The first boot didn't seem to take overly long.

The command:

"getprop dalvik.vm.execution-mode"

...just produces a blank line and returns to the # prompt.

As FastTest is a fast ROM anyway I'm wary of the "placebo effect".

Linpack shows 2.273 Mflops (and other values in that range).....about the same as usual.

Anyone else tried it with FastTest 2.7?
[G1 Android Development] linuxluver:
"Vague"

The instructions are actually quite clear....you just don't understand them. There is a difference.

"Danger, Will Robinson!"

Take you time and don't skim over stuff you don't understand. Understand it....then it becomes obvious. That might sound dumb.....but we all too easily just ignore the bits we don't understand...and find ourselves half way through a screwed up effort to do something.

Act as though every word matters and dig into any you don't understand in context. You may understand it at the bus stop...but in this context the meaning may be different.
[G1 Android Development] linuxluver:
3G data

I also had trouble with data on re-booting. I had no 3G (UMTS) or 2G (GSM) connectivity at all.

I tried re-registering with my network provider and that at least got my connection going again. Don't know yet if it will be stable. Glad I didn't apply this to my main phone...and took a backup of the whole system first.
[G1 Android Development] domenukk:
You most probably have not installed it. (mflops should be somewhere around 3,5)

There is a full package avaliable:

http://xdaforums.com/showthread.php?t=637825

just install this ;)
[G1 Android Development] nagash91:
Don't work on my superD 1.9.2..

# getprop dalvik.vm.execution-mode

don't print anything on the screen..

My mflops are 2.200 ( I try installing by recovery and android terminal emulator.. but don't work!)
[G1 Android Development] skyundersea:
I have it working on SD 1.9.2. I used the instructions found here:

http://xdaforums.com/showpost.php?p=5703076&postcount=193
[G1 Android Development] SilentTweak:
Try fixing your filesystem in recovery too, that fixed it for someone else.
[G1 Android Development] Chapsticky:
Very cool...

I'm running the Pay-Rom

Before:2.3

After :4.2

3g before :475kb

3g after :605kb
[G1 Android Development] Jigga0o7:
I ran into a situation this morning where I got sudden freezing and I got a force close message for System. This was with 32mb Compcache w/ 20 swapiness. I've since turned off Compcache and turned on 32mb swap w/ 20 swappiness. No problems so far.
[G1 Android Development] Klyentel:
Was working great all day yesterday but now Im getting random reboots, and my google voice keeps force closing, I've un-installed, and re-installed 4 times, still does it.
[G1 Android Development] linuxluver:
JIT jamming on HTC Magic

The OP's scripts didn't work on my phone (no error messages, but Mflops stayed at 2.1-ish.

But doing it manually this way worked fine. I'm now seeing 3.4-ish Mflops. My logcat is a JIT-fest now.
[G1 Android Development] linuxluver:
Alpha.....and known to be unstable

Yeah..this is why we don't have it in all the ROMs. It's not stable.
[G1 Android Development] Shrivel:
Yep. I restored my BART backup from before I installed this due to the problems with Google Voice. I was getting a FC every time in GV and force closes in other apps that have always been stable for me (Nubinews). Doesn't appear to play nice with a lot of apps that are must haves for me.
[G1 Android Development] Klyentel:
I agree^^^ and GV is a very important app for me, as I have a lot of people call and text my google number, its like I have two phones in one, lol
[G1 Android Development] boredpcguy:
Running Super D 1.8 and so far so good, 24 hours or so and I am good to go. In response to those with Google Voice FC issues, I installed Google Voice after I adb pushed libdvm.so but otherwise followed the instructions... It is working well for me so maybe reinstalling could help.

Note that I am also running Autokiller and I had it running before the mod... based on the following numbers, and what we're measuring here, I'm not sure what difference this would make.

Linpack:

Before: 2.2-2.3 MFLOPS

After: 3.4-3.6 MFLOPS

And for the record, my Benchmark Pi hit a possible fluke low of 9003, seems to hit 9300's consistently... Not Earth-shattering but better than numbers I'm used to (10-12000ms). I'm going to see if I can break it tonight, I'd rather not be out and experience the issues others are having.
[G1 Android Development] SilentTweak:
So far the hack has been awesome for me. Past the 24 hour mark since this morning, and no issues to speak of.
[G1 Android Development] zoid_99:
I had big stability problems with JIT & Super D 1.9.2. It would crash on boot sometimes, other times it would crash shortly after boot. It never ran more than 2 minutes. I wiped ext3 & cache prior and that didn't seem to help. Maybe I did something wrong?
[G1 Android Development] linuxluver:
Seems OK on FastTest 2.7 (so far)

Might just be the ROM. I'm on FastTest v2.7 and aside from the occasional 3G dropout (cause not certainly known)....it seems to be running great.

I have turned off my swap file as I read a post that said JIT works better if there is no swapping. I have kept the Compcache at 32MB. My phone seems to run fine. The Mflops went up from 2.1 to 3.4....but it's hard to say for certain the phone is actually any faster in real terms.
[G1 Android Development] skyundersea:
I'm not having any stability issues at all with JIT and Super D 1.9.2. I didn't use the main method in this thread, but the alternative posted here:

http://xdaforums.com/showpost.php?p=5703076&postcount=193

I've been running this for over 24 hours now, and I have not had any problems at all. Google Voice has been functioning normally, and my Mflops are at 3.5. :)

EDIT: I also noticed that it does seem to run better with swap turned off. I'm using a 32mb compcache.
[G1 Android Development] Synchronize:
I'm running CyanogenMod 4.2.14.1 with 96 MB swap and 10 MB ram hack. I followed the instructions that the OP posted, and everything's running smoothly for me. :) I'm getting 3.4-3.6 mflops now compared to 2.1-2.2 before.
[G1 Android Development] licknuts:
Today I'm running Super D 1.9.2. Using Spare Parts I disabled all effects, swaps, compatabilty mode etc as I normally do. It's running stable and fast. FYI a fresh wipe, newly created ext4 partition, flashed ROM and add the libdvm.so file before the first boot seems to help with some FCs issues. Will try to put a video together to get some visual documentaion available.
[G1 Android Development] alongenemylines:
I actually ended up disabling JIT tonight. It was causing lag issues in a couple apps, especially after my g1 had been constantly on for almost a full day.

Certainly nice that a reboot and a change to build.prop cab quickly disable it though.
[G1 Android Development] linuxluver:
Experiment with latest CM

I backed up my phone and then wiped it completely and flashed it clean with the latest Cyanogen Mod. Before rebooting the first time, I installed the JIT hack. I'm curious to see how it goes right from the start, including installing all apps fresh with JIT operating. It may run like a dog or crash all over the place......or it might not. :-)

Update1: I've installed about 40 apps so far. I had some trouble getting dolphin browser to install. At first it was an error about Market permissions. A logcat showed the phone was trying to get a chunk of memory back from swap and wasn't able to as it was invalid. I rebooted the phone and the problem went away. The swap file data is non-persistent, so I was sure that would sort it out and it appears to have. The Dolphin browser then installed with no problems. Might be time to get a new sdcard. This one is almost 3 months old and it has taken a hammering.

Update2: Installed a game: "Speed Forge 3D". It's a larg-ish game at 7MB. It started up reasonably well and once loaded ran better than I can recall it running before. I also notice Handcent SMS - usually a laggy app - is actually *snappy*. It feels like some apps benefit more from JIT than others...and overall it seems to be better.
[G1 Android Development] licknuts:
I think you will see better app compatibility.
[G1 Android Development] Eclair~:
If it freezes after I run sh install through the terminal, what am I supposed to do at this point?
[G1 Android Development] XxKOLOHExX:
Umm kinda worried i might have done something wrong but how long does the 1st boot up usually take ? (Time Frame by any chance)
[G1 Android Development] skyundersea:
It wasn't noticeably long at all. It was actually right around normal for me.
[G1 Android Development] XxKOLOHExX:
LOL okay then i did something wrong thanks for the help :D
[G1 Android Development] licknuts:
reboot and check if it installed if the last line says with_jit it is installed if not run the install through recovery console. Why this happens is because this library's default mode is with_jit enabled a setting that was not available previously, the system locks, watchdog may kick in and reboot it for you, it might not.

$su
#dalvikvm -h
[G1 Android Development] licknuts:
One build I tested I swear took 5 minutes to leave the g1 screen and another 5 minutes to get through to the bootup. More apps will take longer as the .dex files get optimized. Anormal process when switching execution modes in Dalvik.
[G1 Android Development] XxKOLOHExX:
Okay thanks :D
[G1 Android Development] linuxluver:
JIT and fresh install

So far.....looks like you're right.
[G1 Android Development] licknuts:
Sweet, I have found this to work early on and as much as I hate to wipe and start from scratch but just found Titanium Backup and that does make it a lot quicker to get back up and running with re-installation of apps and their settings.
[G1 Android Development] chrisgto4:
tmo mytouch, latest cyan, cust kernel w/ ram hack, no swap.....running very well with JIT....blew up the top 10 on linpack. Decided then to wipe system and start from scratch. ended up with the same results as far as speed. I havent had any force closes. Also seems the longer its enabled on the phone the faster it runs.
[G1 Android Development] chrisgto4:
also I coudnt seem to enable through recovery. I had to do it through terminal... kept getting package not signed error.
[G1 Android Development] licknuts:
The dusted-donuts.zip is not installable like a ROM zip through Recover, you would need to extract the zip using an app such as Astro File Manager, then drop into terminal and browse to the foleder and run the scripts.
[G1 Android Development] gthing:
Click for full size

Did 3 tests before and 3 tests after JIT install on clean boot with no programs running. Averaged the results.

A marked jump in CPU but at the cost of graphics, Memory, and Filesystem. Not sure I want to keep this...
[G1 Android Development] chrisgto4:
Is the repair for the file system only for those running ext 1/2/3. when I type in the command it says the ext not found or the superblock may be corrupt
[G1 Android Development] charnsingh_online:
would be nice if you could tell us how to get to 13 mflops even 5-7 would work
[G1 Android Development] PJcastaldo:
OK, i have been running the hack on my Mt3G running latest cyan, and i have to say at first it seemed smoother... But as i go along some times it will get UBER slow, and not always and not always doing the same things... weird right? So i guess while it makes good benchmark numbers, maybe tis not ready for full use.... :(
[G1 Android Development] licknuts:
the command is for ext2, 3 and 4 only. You can check if you have a 2nd partition by terminal or recovery console

#ls /dev/block/

if you don' see mmcblk0p2 then you don't have a second partion, if it is there then yes it could be corrupt or there is no file system on it.

you can use parted to create partitions but be warned prexisting data will get deleted in the process.

if you want a file system on an existing mmcblk0p2 that has no filesystem try ext4 you can do this through Recovery Console and probably terminal if it's not in use somehow.

#mke2fs -O has_journal,extents,dir_index,sparse_super,uninit_bg,^resize_inode,^ext_attr,^filetype /dev/block/mmcblk0p2
#tune2fs -o journal_data_writeback /dev/block/mmcblk0p2
#e2fsck -fcpDC0 /dev/block/mmcblk0p2
[G1 Android Development] linuxluver:
I'm finding the same thing. My clean install of CM 4.2.14.1 (with the JIT hack installed before the first boot) is feeling more like FastTest the more I use it. Not as-fast-as, but smoother and faster than CM was before on the same phon. I also have a second phone with FastTest 2.7 so I'm able to make direct comparison. Granted, still subjective. Logcat shows a fair number of "low memory" conditions, but this is normal for Android as it constantly kills off old apps to make way for new ones. Whether it is worse now or now I can't tell.

But I'm going to leave this hack on both my phones. Aside from the one swap error on the CM phone, I've had no issues. Note: The CM phone is using Ap2sd, while Fasttest does not on an HTC Magic 32B. Both my phones are HTC magic 32B's.
[G1 Android Development] skipfletcher:
When I type the line: "mount -o rw,remount auto /sdcard"

I get:mount: "mounting auto on /sdcard failed: Invalid argument"

I'm doing this in recovery, I have ext4, and I'm on Recovery RA-dream-1.5.2

Thanks!
[G1 Android Development] linuxluver:
Many ROMs, like FastTest and SuperD, don't use Ap2sd on HTC Magic / MT3G, so the ext partition almost certainly isn't used at all. Therefore there is no need to execute this step if using such a ROM.

But CM 4.2.14.1 does use Ap2sd on an HTC Magic so it would be required.
[G1 Android Development] linuxluver:
Wouldn't work in recovery for me either

I had the same issue. I used adb instead. Only two commands, really, unless you use a third one to backup the original libdvm.so first. . You could also just use Root Explorer to copy the file into place and set the permissions. I'd then reboot immediately.
[G1 Android Development] linuxluver:
Google Shopper FC

Was it a fresh install? Had you used the Barcode Scanner yet by itself? The first time you use the barcode Scanner it throws up a page requiring you to touch "Done". Another app calling the Barcode Scanner crashes if it hits that condition. You have to have started the Barcode Scanner at least once by itself for other apps to be able to call it.
[G1 Android Development] linuxluver:
Magic / MyTouch3G can't use recovery console. Need adb.

Note: This only works on G1 phones. HTC Magic 32B and MyTouch3G have to use adb. The recovery console doesn't support the trackball or soft keyboard. You need a physical keyboard and they don't have one.
[G1 Android Development] licknuts:
try:

#mount -o rw,remount -t vfat /sdcard

maybe try:

#mount -a
[G1 Android Development] skipfletcher:
I just did the commands in terminal and it worked fine. ~3.6Mflops

Thank you so much Licknuts!

P.S. will I have to run through this procedure again when I update my ROM? I'm gonna assume so...
[G1 Android Development] Ace42:
Yep file would be replaced with new one from the rom your flashing.
[G1 Android Development] linuxluver:
More swapping?

JIT sees the system using more memory (according to Cyanogen), so you may be swapping more to the sdcard. If you have swap on and also use aps2sd, then you may occasionally see I/O contention on the sdcard....trying to swap in and out and load apps and perhaps write data, too, for apps like FeedR or Dolphin or TwiDroid. Too much activity to the sdcard - especially virtual RAM activity - could *really* slow things down until the log jam clears.

But at least you can DO it! :-) The only real alternative is to run fewer apps or buy a phone with more RAM.
[G1 Android Development] charnsingh_online:
i had my benchmarks around 4 and they have suddenly dropped to 2.2 i have no bg apps running any ideas
[G1 Android Development] linuxluver:
CPU scaling?

Have you got SetCPU enabled to scale the CPU up or down?

One of the profiles sees drop to 384MHz if you start charging your battery, for example.

Android does it's own scaling. It's also dependent on which ROM you're using and what the scaling settings might be as defined by the dev.
[G1 Android Development] Maisum:
Hows this working with SuperD's 1.9.3?
[G1 Android Development] charnsingh_online:
no set cpu
[G1 Android Development] pumacat311:
The best modification/hack yet for the G1

To all the still be skeptics out there, this is in my opinion the most worthwhile hack you can apply to the G1.. There is no possible way that anyone could mistake the great speed enhancements for something that's "just in their heads". I am running the fast test 2.2.8.1 and before the JIT, set cpu woulkd benchmark me somewhere between 630 and 690 consistently and now I am getting benchmark at 480ms to 500. 500 was the highest I have seen after many times checking. 490 is the average now.. Absolutely every aspect of my phone seems to have been affected and the speed improvements are awesome. It really is so exciting to see these continuos breakthroughs for our phones, and to watch the G1 become better and better as it becomes older and older.
[G1 Android Development] chrisgto4:
exactly.........
[G1 Android Development] chrisgto4:
Default buffer size used in BufferReader constructor. It would be better to be explicit if an 8k-char buffer is required.

Im seein this in my logcat. I searched google and found a bunch of stuff about it , buyt nothing sayin how to fix it. Anyone? ...