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

Root expanding ram

Phones haven't yet been built with expandable RAM. You'll have to wait until (and if) someone comes out with a phone like that.
 
It's doable. They were able to on the Prevail through ctmod.

ctmod did not expand the phone's ram (random access memory) it allowed you to 'increase' the phones storage (internal memory) by using the sdcard as the phone's internal memory.

It also allowed you to enable swap, which is like virtual memory, but is not expanding the physical ram. This is not possible with smart phones today

Also, none of the modifications available with ctmod and the prevail are available for this phone (yet)
 
I miss my old prevail :(

Anyway, I saw a thread on xda I believe that discussed additional ram for the Asus tf101. Granted, it's a tablet, and you would have to compile your own kernel to accommodate for that particular mod, but it was (in theory) possible... But the prevail 2 is far from a tablet so I'm mostly just rambling right now...
 
Hi all -

While you can't upgrade the RAM in the phone, creating a swap file on your SD card is almost as good as upgrading the RAM.

Most cheap SD cards for sale now are category 6, which is much faster than a swap file or swap partition on a mechanical hard drive. Not quite as fast as the phone's RAM, but not far from it.

Here is how to do it:

Before doing anything, back up the contents of your SD card, since we'll be wiping your SD card. Samsung Keis is a really easy way to do this if you haven't used something like Titanium before.

  • First, make sure that your phone is rooted. None of this will work if it isn't. There is a forum sticky on that topic, using Framaroot and SuperSU - it's pretty easy. It worked for me. I Googled Framaroot and downloaded an updated version (1.9.4).
  • Second, download and install AParted - think of it as GParted for an Android device - and reboot your phone.
  • Third, download Link2SD, which will restore App2SD like functionality after you've partitioned your SD card.
  • Fourth, launch AParted and use it to partition your SD card so that the first partition is FAT32 - this is where your media (pictures, music, downloads) will be stored.
  • Fifth, Create a second partition for a swap file - I used a cheap catagory 6 SD card from Microcenter, - it's plenty fast. Much faster than a swap file on a computer that uses a mechanical hard drive, in fact.
  • Sixth, while you're at it you might as well create a final partition (I'd recommend choosing EXT4 as the format) for moving apps to your SD card using Link2SD - it works great, and freeing up your internal storage has the effect of further speeding up your phone.

I'm not sure why that is, but it's a noticeable improvement.

AParted is pretty easy to use once you play around with it, and so is Link2SD.

Just to recap:

AParted is an Android partition manager.

Link2SD restores App2SD functionality to a phone that has App2SD functionality disabled (after creating a partition on the SD card that it can use for applications).

I would post a link on how to use Link2SD and how to use AParted, but I'm under newbie lockdown. Hopes this helps.
 
Hi Lord Vincent -

Everything you say is right on, and thanks for taking your time to respond!

I was attempting to keep my response really simple - since that seemed necessary due to the nature of the original question - and skip covering the base concepts of swap, RAM, internal/external application storage, etc.

But I have to say that those background information links you posted do great job of explaining the basics, and are a better way to go.

Edit - actually, I think I did get off-topic and into moving applications. Ahem.
 
Edit - actually, I think I did get off-topic and into moving applications. Ahem.
:p:D

I did notice you mentioned creating a swap partition in the instructions, which will work, if the kernel supports it, and you enable it with a script/app/etc

But as mentioned in the link, you will see very little improvement with newer devices
 
We're not talking about Windows or Linux, we're talking about Android. The same speed memory that's used for a swap partition is used for storage, so whether you're swapping the app in from the swap partition or the storage partition makes no difference in speed.

Remember, Android doesn't waste time moving an app and its data to another chunk of memory if it needs that piece that's being used. An app is responsible for always keeping its data stored. If the Android memory manager needs the space the app is in, it just kills the app. No swap partition, running on ANY class of card, is anywhere near that fast, regardless of the size of the app being killed or swapped. (It takes just as long to kill a 100KB app as it does to kill a 100MB app.) When you return to that app, it's loaded back, still has its data and you never notice that it spent some amount of time not being there.
 
Rukbat, thanks for the info!

I guess being an IT guy, I just assume that some of the base concepts regarding memory management would be the same (as Linux), but clearly they aren't the same.

Is this memory management/swap utilization model optimized for mobile devices?

I can see how simply killing the app until needed again rather than paging into and out of a swap file/partition might result in greater access speed on a mobile device...
 
Oh yeah...and that brings to mind another concern.

SD card degradation.

Even if Android did swap data in the same way that a Linux or Windows laptop/desktop did, I would think that this would shorten the life span of the external SD card.

But...my Android device seems to think that it already has an internal SD card installed, and seems to be used for System application storage.

Which brings to mind a couple of questions:

  • Do Android device have only RAM, or does it use RAM in conjunction with a swap partition located on the internal SD card?
  • And what kind of sense would that even make if Android's memory management model follows what you're saying?

It seems that, according to the info in the link that LordVincent 90 shared, the Android model of swapping is optimized to minimize read/writes. So perhaps SD card (assuming the swap partition is located on the internal SD card) degradation is less of an issue.

Maybe I should have phrased that as a question ;)

  • If it's a swap partition located on internal SD storage, is there really no advantage to increasing or pointing the swap partition to an external SD card with a larger swap part?
  • Wouldn't this result in fewer slow downs resulting from that process of reading/writing of app state prior to killing the app and re-launching the aforementioned app when it is brought into focus again?

EDIT - forgot a couple of questions:

  • So, assuming that there is a swap part (not clear on that yet), and that it is located on the internal SD card, does the internal SD card utilize the USB bus?
  • If it does, wouldn't this impose a performance penalty?
 
Allrighty...

I finally read (as opposed to skimming) the Cyagen mod wiki on Swap and Compache, and answered my own question - in the sense that none of my questions really matter ;)
 
Back
Top Bottom