5,597,937 Members 38,781 Now Online
XDA Developers Android and Mobile Development Forum
View Poll Results: Did you find this post useful?
Yes! 147 87.50%
No. 21 12.50%
Voters: 168. You may not vote on this poll

Get more RAM and faster responses by disabling verify-bytecode!

Tip us?
 
nibras_reeza
Old
(Last edited by nibras_reeza; 17th September 2011 at 10:08 PM.)
#1  
Senior Member - OP
Thanks Meter 408
Posts: 850
Join Date: Feb 2011
Location: Colombo

 
DONATE TO ME
Default Get more RAM and faster responses by disabling verify-bytecode!

Here's a little tip that would give you more RAM on your device.

AS WITH ANY MODDING PROCEDURE FOR YOUR PHONE, THIS GUIDE ALSO COMES WITH NO WARRANTY. AUTHOR HOLDS NO RESPONSIBILITY FOR ANY DIRECT AND INDIRECT CONSEQUENCES OF FOLLOWING THIS GUIDE. MAKE SURE YOU HAVE MADE A NAND BACKUP BEFORE PROCEEDING.

This is not useful in odexed ROMs & devices with 1GB or more RAM. However, this will give a performance boost in deodexed ROMs as much as odexing system & data apps. This is an alternative for odexing. It's not that you can't apply this tweak on an odexed ROM but rather, it's useless to do so.

1) Open Terminal Emulator on phone or adb shell from PC and type the following.
su
setprop dalvik.vm.verify-bytecode false
setprop dalvik.vm.dexopt-flags v=n,o=v
rm /data/dalvik-cache/*
rm /cache/dalvik-cache/*
reboot


2) Add these to the /data/local.prop or build.prop.
dalvik.vm.verify-bytecode = false
dalvik.vm.dexopt-flags=v=n,o=v

(Copy local.prop or build.prop to SD and edit them. Copy back afterwards. If lines starting with dalvik.vm.verify-bytecode or dalvik.vm.dexopt-flags exist already, please modify them as above. Also type following in adb shell or terminal emulator.
rm /data/dalvik-cache/*
rm /cache/dalvik-cache/*
reboot


Advantages:
  • More free RAM.
  • Faster launch for system & user apps during the second launch.
  • Gives as much as of a performance boost as ODEX without odexing. Themer friendly.
  • Smoother app switching.

Disadvantages:
  • Might break some apps.

You can read more information about this on here and here.


Thanks to Danzano for testing this tweak in advance.

Reversing the change/undo tweak.
Type the following in shell.
su
setprop dalvik.vm.verify-bytecode true
rm /data/dalvik-cache/*
rm /cache/dalvik-cache/*
reboot
The Following 60 Users Say Thank You to nibras_reeza For This Useful Post: [ Click to Expand ]
 
GadgetCheck
Old
#2  
GadgetCheck's Avatar
Retired Forum Moderator / Recognized Developer
Thanks Meter 5245
Posts: 3,158
Join Date: Sep 2010
Location: India,Kerala,Trivandrum (God's own Country)
Wow. Will try it

Sent from my GT-I9100 using XDA App

www.checkrom.com
Where support gets refined as social networking
Founder and Developer of CheckROMô for Samsung Phone's
The Following 2 Users Say Thank You to GadgetCheck For This Useful Post: [ Click to Expand ]
 
nibras_reeza
Old
#3  
Senior Member - OP
Thanks Meter 408
Posts: 850
Join Date: Feb 2011
Location: Colombo

 
DONATE TO ME
Quote:
Originally Posted by GadgetCheck View Post
Wow. Will try it

Sent from my GT-I9100 using XDA App
SGS2 has 1GB RAM. That's a lot. This tweak is more useful in devices with 256-512MB RAM.
 
GadgetCheck
Old
#4  
GadgetCheck's Avatar
Retired Forum Moderator / Recognized Developer
Thanks Meter 5245
Posts: 3,158
Join Date: Sep 2010
Location: India,Kerala,Trivandrum (God's own Country)
Yeah I know!!

But trying dosen't hurt!

Sent from my GT-I9100 using XDA App

www.checkrom.com
Where support gets refined as social networking
Founder and Developer of CheckROMô for Samsung Phone's
The Following 2 Users Say Thank You to GadgetCheck For This Useful Post: [ Click to Expand ]
 
nibras_reeza
Old
#5  
Senior Member - OP
Thanks Meter 408
Posts: 850
Join Date: Feb 2011
Location: Colombo

 
DONATE TO ME
Quote:
Originally Posted by GadgetCheck View Post
Yeah I know!!

But trying dosen't hurt!

Sent from my GT-I9100 using XDA App
Thanks. Looking forward to your feedback. =)
 
skydeve
Old
#6  
Member
Thanks Meter 0
Posts: 46
Join Date: Aug 2011
Location: Sydney
Sounds really awesome, probably would try it. hmm... one concern, would it mess the os config.?
 
nibras_reeza
Old
#7  
Senior Member - OP
Thanks Meter 408
Posts: 850
Join Date: Feb 2011
Location: Colombo

 
DONATE TO ME
Quote:
Originally Posted by skydeve View Post
Sounds really awesome, probably would try it. hmm... one concern, would it mess the os config.?
OS config in the sense? If you are talking about parameters given to Android in build.prop and stuff like that, it is both an yes and no.

bytecode-verify is an important dalvik-vm parameter and so, it will change the OS config for byte-code verify ONLY. Other parameters will not change.

You can undo this with,
su
setprop dalvik.vm.verify-bytecode true
rm /data/dalvik-cache/*
rm /cache/dalvik-cache/*
reboot
 
eterno13
Old
#8  
eterno13's Avatar
Senior Member
Thanks Meter 234
Posts: 1,672
Join Date: Dec 2010
Location: houston
Someone knows of this work?

Sent from my HTC Bliss using XDA Premium App
 
VeEuzUKY
Old
#9  
VeEuzUKY's Avatar
Senior Member
Thanks Meter 72
Posts: 898
Join Date: Oct 2008
Could you create a script to apply this fo the less proficient in these matters such as me?

Thanks for sharing! Great job!!
 
fLipz
Old
#10  
fLipz's Avatar
Senior Member
Thanks Meter 107
Posts: 131
Join Date: Oct 2008
Location: ManiLa
What about the start and stop command?

The Following User Says Thank You to fLipz For This Useful Post: [ Click to Expand ]
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes