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

Root Some info on Apps2SD

andrizoid

Android Expert
Mar 25, 2010
2,266
358
31
Well, this morning i was the only eris user in the world able to use a2sd- that was a cool feeling, not gonna lie- and up until about 5 minutes ago there was only one ROM with a2sd capabilities, nobody had the chance to realize this but.....can i get a drum roll please?!

When going from one a2sd enabled ROM to another, even after doing a data reset and a dalvik wipe, your apps are still installed! no more having to back all of your apps up before switching ROMs!

thought this was a cool little tidbit. might convince a few 1.5 users to jump to root, and might convince a few root users to jump ship to either Evil Erisv2 or the other ROM i just got done compiling...waiting to release the name of this one until i get word from the dev. Dont want to steal his THUNDER :rolleyes:


i will be working hand in hand with the devs to make sure this is a standard part of all the new ROMs being released.
if you are on a non a2sd compatible rom and would like to see this a feature, have the dev contact me and as soon as i get permission i will have it up and running.
 
  • Like
Reactions: MJL
(see OP above)

Quick question just to make sure I understand:

When doing a nandroid restore of a previously saved ROM (in which the /data partition is saved), there's no need to re-download apps from the Market.

So, this saves some time for new (a2sd-enabled) ROMs which you haven't tried before, so long as you are starting from an a2sd-enabled ROM and going to a a2sd-enabled ROM... and of course, gives you lots of space to store apps.

I'm sort of wondering out loud here - if someone is using a root-enabled ROM which is not a2sd-enabled, but have partitioned their SD card - is there a convenient way to back up stuff in /data to the ext2(3?) partition from Amon_RA's recovery console?

eu1

even if the sd card is partitioned and even if they have the apps saved on the sd card, if the ROM they are using is not a2sd enabled then this wont work.

what happens with an a2sd enabled rom is that there is a "bridge" built between the partition on the sd card and the /system/app and /data/app files where the apps are normally stored.without this "bridge" the phone would not not to look for the apps in the sd card and will not see them

hope that answers your question.

oh and the nand backup has nothing to do with the restoration of the apps, again that is all do to the "bridge" created between the directories.


Longtime *nix user here - I'm wondering if a2sd just mounts the ext(2,3) partition of the SD card right on top of /data during the boot. (Is that what you mean by "bridge"?) If that were the case, it would be completely transparent to everything on the phone. Seems reasonable that would work (but would make ejecting the SD card with the phone booted a bad idea).

But, it would also mean that you could use busybox or something within Amon_RA's recovery boot (via adb from the PC, I guess) to simply clone the /data partition to the ext(2/3) partition on the SD card. That would make migrating from a non-a2sd enabled ROM to an enabled one that much easier. Even easier I suppose if the functionality was added to the Amon_RA console - no need to connect a PC to the phone.

I can't test it right now - my dev station is down. :(

eu1
 
Upvote 0
Quick question just to make sure I understand:

When doing a nandroid restore of a previously saved ROM (in which the /data partition is saved), there's no need to re-download apps from the Market.

So, this saves some time for new (a2sd-enabled) ROMs which you haven't tried before, so long as you are starting from an a2sd-enabled ROM and going to a a2sd-enabled ROM... and of course, gives you lots of space to store apps.

I'm sort of wondering out loud here - if someone is using a root-enabled ROM which is not a2sd-enabled, but have partitioned their SD card - is there a convenient way to back up stuff in /data to the ext2(3?) partition from Amon_RA's recovery console?

eu1




Longtime *nix user here - I'm wondering if a2sd just mounts the ext(2,3) partition of the SD card right on top of /data during the boot. (Is that what you mean by "bridge"?) If that were the case, it would be completely transparent to everything on the phone. Seems reasonable that would work (but would make ejecting the SD card with the phone booted a bad idea).

But, it would also mean that you could use busybox or something within Amon_RA's recovery boot (via adb from the PC, I guess) to simply clone the /data partition to the ext(2/3) partition on the SD card. That would make migrating from a non-a2sd enabled ROM to an enabled one that much easier. Even easier I suppose if the functionality was added to the Amon_RA console - no need to connect a PC to the phone.

I can't test it right now - my dev station is down. :(

eu1

kinda lost me there xD
you are correct about it mounting the partition on top of the /data folder, and i myself tested that by pulling the
SD card while booted up. total system freeze with battery pull required.

you went way over my head with the amons image part though, im still not too familiar with some of the ins and outs of the program. if you want more info though go to xda and PM tkirton. he is the dev of a2sd, and im sure he would be able to answer
 
Upvote 0
you went way over my head with the amons image part though, im still not too familiar with some of the ins and outs of the program. if you want more info though go to xda and PM tkirton. he is the dev of a2sd, and im sure he would be able to answer

I might have partly answered my own question - I can't check it 100% because I don't have a 'puter with the SDK on it right now.

In the recovery console, one of the menu items under "Other" is "Move apps+dalv to SD". I'm not sure yet, but it might be exactly what I was thinking of. I tried it with the following steps:
1) Boot into recovery.
2) Make a nandroid backup (from the recovery console).
3) Do the Other... Move apps+dalv to SD (from the recovery console)
4) reboot.

Took a long time for the phone to boot, but eventually it did. Sure enough, all my apps were gone.

5) Boot into recovery
6) Wipe Data and Dalvik cache
7) Restore nandroid backup from step #2
8) reboot.

(Everything normal, as you would expect). Checked the SD card using ES File Explorer - didn't see anything new in there, which suggests that the recovery menu item (Other ... Move apps+dalv to SD) probably moved that stuff to the ext2 partition on my SD card.

I guess I could download EE2+ad2sd and give it a whirl, and see if all my market apps are already on there.

If it works it would be a way to convince folks to give your ROM a whirl since it would save them from having to re-download all apps (currently installed in their non-a2sd based ROMs)

If you already have an a2sd-enabled ROM and you try this, you might want to first do a nandroid backup+ext2 (just in case the "Move apps+dalv to SD" option messes up the ext2).

eu1
 
Upvote 0
i messed around with that the first night i worked with tkirton trying to work on a fix, but couldnt find any way to get it ti work. now that the boot image has been modified to actually work with a2sd it may be worth looking into.

and just for the record, this isnt my rom, its frameworks and i in no way take credit for any part of it except the a2sd capabilities.
dont want an agry dev getting on me for taking his credit :)
 
Upvote 0
i messed around with that the first night i worked with tkirton trying to work on a fix, but couldnt find any way to get it ti work. now that the boot image has been modified to actually work with a2sd it may be worth looking into.

I just DL'ed and flashed EE20-a2sd ... and there were my apps! I guess that's why Amon_RA put that functionality ("Other... Move apps+dalv to SD") into his recovery after all.

Still have to re-perform all the other (home) customizations, but at least some time has been saved.

Looks like I'll be giving this ROM a spin.

eu1
 
Upvote 0
Ok slow down here....

So, with a2sd, you wont need to download apps again if you switch to a new rom? And thats only if you have redownloaded the your first rom with a2sd and set it up that way first right?

Im assuming we will still get updates to apps with a2sd even tho its on a sd partition? seems like a dumb question but thought it would ask.

How does this affect doing nands? Say we set our EE2.0 rom up with a2sd and then decide to flash to a new rom that just came out that doesnt have a2sd enabled. I'm guessing we will have to download all our apps again, but say we do a nand restore back to EE2.0, will nand save all our a2sd info or would we have to go back thru the a2sd set up process?

Guess the biggest thing for me is how it incorporates with the recovery image. I tend to like flashing to other roms to give them a look and test them out, if its going to be complicated to go back to my fav a2sd enabled rom, it might not be worth it.

Good work btw bro
 
Upvote 0
Ok slow down here....

oooooohhhhhhhhkaaaaaaaaaay. :)

So, with a2sd, you wont need to download apps again if you switch to a new rom? And thats only if you have redownloaded the your first rom with a2sd and set it up that way first right?

Yes to the first question. As for the second question, you can use the recovery console menu item "Other... Move apps+dalv to SD" (after you have partitioned the SD card, of course). Note that this mucks up the current rom, so you want to have a nandroid backup of that before you begin. For instance, starting from a non-a2sd ROM:

Read through these instructions completely before you begin, making sure you understand why each step is being performed. (Obviously, they apply only to a rooted phone with Amon_RA's recovery partition.)



(0) Put the .zip file for the new ROM in the root folder of your SD card.

(1) Make a complete backup of your SD card to your PC. Everything!

(2) Boot Eris into recovery (Vol-Up+End)

(3) Partition the SD card. It's up to you how big the FAT portion and ext2 should be; obviously, the FAT portion should be big enough to hold all your stuff you backed up in (1) plus a lot of space for Nandroid backups.

(4) Restore everything from your PC backup (step #1) into the FAT partition on your SD card. If you are going to boot the phone to do this, expect some quirks, as the SD card will be blank to begin with.

(5) Shut down phone (if applicable) and boot into recovery (Vol-Up+End).

(6) Perform a nandroid backup of your current ROM. (Make sure it succeeds!)

(7) Do the (recovery console) "Other ... Move apps+dalv to SD" menu option. Note that this sort of "wrecks" your current ROM state (but does not render it unbootable - but it surely will take a long time to boot if you try booting it this way).

[Optional- 8] Do a Wipe /data and Wipe dalvik cache, and then a nandroid restore of the backup you just made in step (6). This step is not really needed, unless you have a last-minute issue before you switch to the new ROM. (Perhaps you want to look at something one last time, or whatever).

(9) Do a Wipe /data and Wipe dalvik cache, and then flash the new ROM from the root of the SD card

Enjoy.


Im assuming we will still get updates to apps with a2sd even tho its on a sd partition? seems like a dumb question but thought it would ask.

Yes.

If a2sd works by mounting the ext2(or ext3) partition from the SD card on /data (instead of the phone flash memory partition), then the Market software literally has no idea this is taking place (until such a time as HTC's security folks intentionally try and screw us), so everything should work as you expect.

How does this affect doing nands? Say we set our EE2.0 rom up with a2sd and then decide to flash to a new rom that just came out that doesnt have a2sd enabled. I'm guessing we will have to download all our apps again, but say we do a nand restore back to EE2.0, will nand save all our a2sd info or would we have to go back thru the a2sd set up process?

You need to be a little bit careful and understand what you are trying to do. If you revert to a non-a2sd ROM, you prior Nandroid backups will be fine for reverting to whatever state the phone was in when you made the backups. (The ext partition on the SD card is ignored in that case)

As far as backing up what is in the ext2 (or ext3) partition on the SD card, you can either use the Nandroid "Nand + ext backup", or resort to god-like Unix/Linux skills to do it in other fashions (not documented here).

Technically speaking, you don't need to do "Nand + ext backup", because the regular Nandroid backup/restore doesn't ever fool with the ext2(3) partition on the SD card - whatever was there in the ext partition will still be there the next time you fire up a a2sd-enabled ROM. OTOH, phones fail or get lost, and SD cards fail from time to time too - having Nandroid backups with ext makes it convenient to back up your entire phone to a PC or other offline media.

The only thing which you can't do conveniently (it can be done, but again, those mad Unix/Linux skills are needed) is to get apps from an a2sd ROM to a non-a2sd ROM.

Guess the biggest thing for me is how it incorporates with the recovery image. I tend to like flashing to other roms to give them a look and test them out, if its going to be complicated to go back to my fav a2sd enabled rom, it might not be worth it.

Only the conceptual part is difficult initially - it's no more difficult than using the regular Nandroid backup and restore.


eu1
 
  • Like
Reactions: Wooglin and benso87
Upvote 0
Lol smartass...

Seriously, thanks for that extensive breakdown. Not only did it help me understand things better but it will be a great reference post for other people that have questions about this.

Sent from my Aloysius Eris with tapatalk.

ya, i agree. that was a great post and i will include it on the EE2 post in a little while
 
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