Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
View Poll Results: Did you find this post useful?
Yes! 157 87.22%
No. 23 12.78%
Voters: 180. You may not vote on this poll

Post Reply

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

OP nibras_reeza

15th September 2011, 10:34 AM   |  #1  
OP Senior Member
Flag Colombo
Thanks Meter: 410
 
850 posts
Join Date:Joined: Feb 2011
Donate to Me
More
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
Last edited by nibras_reeza; 17th September 2011 at 11:08 PM.
The Following 61 Users Say Thank You to nibras_reeza For This Useful Post: [ View ]
15th September 2011, 10:41 AM   |  #3  
OP Senior Member
Flag Colombo
Thanks Meter: 410
 
850 posts
Join Date:Joined: Feb 2011
Donate to Me
More
Quote:
Originally Posted by GadgetCheck

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.
15th September 2011, 10:56 AM   |  #4  
GadgetCheck's Avatar
Retired Forum Moderator / Recognized Developer
Flag India,Kerala,Trivandrum (God's own Country)
Thanks Meter: 5,263
 
3,191 posts
Join Date:Joined: Sep 2010
More
Yeah I know!!

But trying dosen't hurt!

Sent from my GT-I9100 using XDA App
The Following 2 Users Say Thank You to GadgetCheck For This Useful Post: [ View ]
15th September 2011, 11:13 AM   |  #5  
OP Senior Member
Flag Colombo
Thanks Meter: 410
 
850 posts
Join Date:Joined: Feb 2011
Donate to Me
More
Quote:
Originally Posted by GadgetCheck

Yeah I know!!

But trying dosen't hurt!

Sent from my GT-I9100 using XDA App

Thanks. Looking forward to your feedback. =)
15th September 2011, 11:21 AM   |  #6  
Member
Sydney
Thanks Meter: 0
 
46 posts
Join Date:Joined: Aug 2011
More
Sounds really awesome, probably would try it. hmm... one concern, would it mess the os config.?
15th September 2011, 11:29 AM   |  #7  
OP Senior Member
Flag Colombo
Thanks Meter: 410
 
850 posts
Join Date:Joined: Feb 2011
Donate to Me
More
Quote:
Originally Posted by skydeve

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
15th September 2011, 03:17 PM   |  #8  
eterno13's Avatar
Senior Member
Flag houston
Thanks Meter: 242
 
1,709 posts
Join Date:Joined: Dec 2010
More
Someone knows of this work?

Sent from my HTC Bliss using XDA Premium App
15th September 2011, 05:23 PM   |  #9  
VeEuzUKY's Avatar
Senior Member
Thanks Meter: 79
 
967 posts
Join Date:Joined: 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!!
15th September 2011, 05:45 PM   |  #10  
fLipz's Avatar
Senior Member
Flag ManiLa
Thanks Meter: 418
 
285 posts
Join Date:Joined: Oct 2008
More
What about the start and stop command?

The Following User Says Thank You to fLipz For This Useful Post: [ View ]
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes