New: XDA launches forum for app developers. Discuss coding, tools, marketing, and more.
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
gr0gmint
Old
(Last edited by gr0gmint; 17th June 2010 at 04:00 PM.) Reason: old version is better.. meh..
#1  
Member - OP
Thanks Meter 5
Posts: 64
Join Date: Feb 2008
Lightbulb Dalvik JIT working on Desire with Sense UI!

NEW VERSION! Less hackish!

Commenting out some code that limits how much heap-memory an application can allocate + adding one dummy JNI function , JIT-enabled Dalvik is now working very stable (i haven't had one crash so far for some hours).
EDIT: this version is not just a hack based on commenting out some code. The only code that needed hacking was dalvik/vm/native/dalvik_system_VMRuntime.c and dalvik/vm/alloc/HeapSource.c . The other fix is just a change you need to make in /system/build.prop - This is important

Instructions:
0. BACKUP ALL THE FILES THAT YOU ARE OVERWRITING HERE !!!
1. Copy libdvm.so and libnativehelper.so to /system/lib/
2. Copy dalvikvm to /system/bin
3. chmod 0755 /system/bin/dalvikvm
4. chmod 0644 /system/lib/libnativehelper.so /system/lib/libdvm.so
5. Optionally clear dalvik-cache (?) I didn't have to though

6. Append the line "dalvik.vm.execution-mode=int:jit" to /system/build.prop
7. Change line in /system/build.prop: dalvik.vm.heapsize=24m to dalvik.vm.heapsize=38m (38 megs should be more than sufficient so far. The problem is, as someone also pointed out in this thread, that JIT increases the memory usage

Remember you have to mount the /system partition in recovery mode.
Attached Files
File Type: zip dalvikjit_old.zip - [Click for QR Code] (403.3 KB, 607 views)
 
biebi
Old
#2  
Junior Member
Thanks Meter 0
Posts: 27
Join Date: Jul 2009
1 gr0gmint/Copenhagen 8.774 HTC Desire 998.4MHz htc_wwe/htc_bravo/bravo/bravo:2.1-update1/ERE27/155070:user/release-keys


Gratz on linpack record with that
 
gr0gmint
Old
#3  
Member - OP
Thanks Meter 5
Posts: 64
Join Date: Feb 2008
Quote:
Originally Posted by biebi View Post
1 gr0gmint/Copenhagen 8.774 HTC Desire 998.4MHz htc_wwe/htc_bravo/bravo/bravo:2.1-update1/ERE27/155070:user/release-keys


Gratz on linpack record with that

Thaaank you
 
Loccy
Old
#4  
Senior Member
Thanks Meter 82
Posts: 756
Join Date: Jul 2005
Wouldn't mind giving this a spin, but how does one remove it if it doesn't work out? Assume you can just remove the files and the line in build.prop?
 
iDance°-->ra1n
Old
#5  
iDance°-->ra1n's Avatar
Senior Member
Thanks Meter 2
Posts: 295
Join Date: Dec 2009
not working for me
HTC HD2 ‹ Google Nexus One

Try my Android Boot animation! (Ubuntu Like) --> http://forum.xda-developers.com/show...ar#post5827914



If you like my work PLEASE DONATE
 
gr0gmint
Old
#6  
Member - OP
Thanks Meter 5
Posts: 64
Join Date: Feb 2008
Quote:
Originally Posted by Loccy View Post
Wouldn't mind giving this a spin, but how does one remove it if it doesn't work out? Assume you can just remove the files and the line in build.prop?
Backup the files beforehand. I'll edit OP
 
Loccy
Old
#7  
Senior Member
Thanks Meter 82
Posts: 756
Join Date: Jul 2005
Quote:
Originally Posted by gr0gmint View Post
Backup the files beforehand. I'll edit OP
I figured that out and went ahead anyway Getting 9.3-ish on Linpack. How're you getting 10+?
 
DocRambone
Old
#8  
Recognized Developer
Thanks Meter 2407
Posts: 6,335
Join Date: Jan 2010
Location: Stockholm

 
DONATE TO ME
Is it compatible with the cm506 for desire?
 
gr0gmint
Old
#9  
Member - OP
Thanks Meter 5
Posts: 64
Join Date: Feb 2008
Quote:
Originally Posted by Loccy View Post
I figured that out and went ahead anyway Getting 9.3-ish on Linpack. How're you getting 10+?
hmm, good question, it might be because i'm using a BFS kernel
 
gr0gmint
Old
#10  
Member - OP
Thanks Meter 5
Posts: 64
Join Date: Feb 2008
Quote:
Originally Posted by DocRambone View Post
Is it compatible with the cm506 for desire?
It should theoretically work with any rom.


XDA PORTAL POSTS

Avoid Framework Bootloops on Xperias Running Jelly Bean

If you’re a Sony device owner running a stock Android Jelly Bean firmware and … more

Forum Added for the Samsung Galaxy Mega

What do you do when the Galaxy Note line is simply not big enough? You get theSamsung Galaxy Mega. … more

Voice Control Your Phone with Tasker and AutoVoice – XDA Developer TV

XDA Developer TV Producer Kevin set up his phone to respond to … more

Guide to Take Better Control of Your Volume Levels

Would you like to know one of the things that really annoys me on a daily basis? Tough, … more