• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

How to get more RAM (rooted devices only)

androidboss7

Well-Known Member
Jul 26, 2011
145
15
IF YOU DON'T KNOW WHAT THIS IS ABOUT, BEST NOT TO TRY IT!!

Get more RAM and faster responses by disabling verify-bytecode!
Here's a little tip that would give you more RAM on your device.
Also check out the links below.

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.

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

ROM devs could add this to the /data/local.prop or build.prop.
dalvik.vm.verify-bytecode = false
dalvik.vm.dexopt-flags=v=n,o=v


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.

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
__________________
Best of regards,
Nibras.

> more free RAM & better performance by disabling bytecode-verify
> 1-click odexing guide with scripts
> AOSP EMail with Exchange(Corporate)/ActiveSync
> list of apps for power users
> alternate fastboot/adb drivers(32 bit and 64bit)

I believe in sharing, simplicity & love.
(http://forum.xda-developers.com/showthread.php?p=17566510#post17566510)

Look at this site on how to increase RAM!!
(One click ODEXing a ROM for more RAM and better speed. - xda-developers)

Hope this Helped!!


THIS METHOD WILL ALSO INCREASE RAM!!
PLEASE ONLY USE ONE OF THESE METHOD'S



AS WITH ANY MODDING PROCEDURE/SCRIPTS FOR YOUR PHONE, THIS SCIPT ALSO COMES WITH NO WARRANTY. AUTHOR HOLDS NO RESPONSIBILITY FOR ANY DIRECT AND INDIRECT CONSEQUENCES OF RUNNING THIS SCRIPT. MAKE SURE YOU HAVE MADE A NAND BACKUP BEFORE PROCEEDING. MAKE SURE YOU HAVE AT LEAST 15% FREE ON /SYSTEM, THIS IS IMPORTANT BECAUSE IF YOU RUN OUT OF SPACE THINGS WILL GO BADLY WRONG..

Requires busybox.

If your system partition is almost full, have a look at http://forum.xda-developers.com/showthread.php?t=734236.

This script will *attempt* to odex all apks found at /system/app. Theming would be impossible once the ROM is odexed. Themes applied at the time of odexing will be preserved. If you plan on applying a theme, apply it before odexing. If you want to theme after odexing, you must deodex the ROM before theming. If you change themes often, odexing is not for you.

Quick Instructions for Windows:
Connect the phone with USB cable and enable USB debugging. (No wireless or Android Terminal shell)
Put the phone in airplane mode.
Download and extract the attached file and run odex.bat
Download link
(http://www.4shared.com/file/270vm-Mx/odex-WinXP.html?)

Instructions for advanced users:
This attachment contains a folder called odex. Push that folder to data and set the permission of odex.sh to 4755. Mount system as r/w(could be done via adb remount system). Next, execute odex.sh. All of this should be done via USB using ADB shell. Do not use wireless adb or Android Terminal.

Advantages:
More free space in system partition.
Faster booting.
More free RAM(I was able to gain 20-30MB.)
Faster access to system apps.

Disadvantages:
Cannot be themed after odexing.
APK tweaks cannot be applied.
Might break some of the non-AOSP system apps such as Root Explorer if they are installed as system app.

Acknowledgments:
Only the odex.bat was created by me. Similar projects were done in past but most of the downloads are broken. So, I collected together different stuff from different places to put together this package.
adb.exe is from the RATC batch ROOT.
adb dlls are from Android SDK
odex.sh is from Paul O Brian from MoDaCo (pastebin.com/EZLWUdea)
zip, zipalign and dexopt-wrapper are from XDA (http://forum.xda-developers.com/showthread.php?t=734236)

Next aim: Odex for apps in data/app



Update:
I got 1017 on quadrant and 61.8fps on swiftdroid 2.0 M6 overclocked to 844MHz(offline mode with wifi on. No apps except system apps). It must be noted that sometimes odexed ROM performs slightly slower in benchmarks but the difference is very small. However, this does not mean their performance is lower. Odex means apps could load fast thereby making app switching, app loading really fast. And, it also reduces system RAM usage which means more apps could stay in memory making multi-tasking easier. Odexing is something like swap or compcache. Sacrifice something to gain something else. This is for some people who think odexing is useless. The drop in speed is so small that it cannot be noticed without a benchmark but the performance of the phone increases noticeably due to more space in dalvik and RAM.
 
t didn't worked for me, I was trying the first part but when i entered 3 step it gave me some error. :'(

Someone Plz help
 

Attachments

  • error1.JPG
    error1.JPG
    31.2 KB · Views: 127
Upvote 0
@androidboss7:
isn't there any other option to get it working or to get dalvik cache back???

I don't know about getting dalvik cache back..
But do when you do it this time don't put in
the 2nd line!! :):)
That should do the trick!!
Cause some people said that it didn't work so
just remove the 2nd line!!

And if that doesn't work use TE!! :):)
Report back!!
 
Upvote 0
hey i have tried the method one, it worked great now i am getting around 100mb RAM free, thanks a lot mate, just a single query

ROM devs could add this to the /data/local.prop or build.prop.
dalvik.vm.verify-bytecode = false
dalvik.vm.dexopt-flags=v=n,o=v

do i need to copy this also? else performance is great and do it impact mobiles battery life in any manner.
 
Upvote 0
hey i have tried the method one, it worked great now i am getting around 100mb RAM free, thanks a lot mate, just a single query



do i need to copy this also? else performance is great and do it impact mobiles battery life in any manner.

No you don't need to copy that.
And no it doesn't effect the battery life, it should make it
last a bit longer!! ;););)
 
Upvote 0
Ok. Have youself tried it yet? What's your result?

Yes i have tried this myself!! ;);)
And i could say that the ram increases about 5-20mb
of ram and quicker switching in apps!! :):)

On phones with more than 200mb of ram then it
might not make a difference in ram but it will
in app switching!! ;);)
(i also tried both methods and 2nd method gives you
more ram):D:D
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones