How to backup app2sd data - myTouch 3G, Magic Android Development

I don't think this is exactly development so my apologies if this is not the right place. I think this will be trivial to most of you but it might help a lot of users. It looks like Android's tar included in the recovery roms keeps the file permission and this is all we need.
Disclaimer: Use at your own risk.
It's supposed you have
Rom with app2sd working (you partitioned card and stuff)
Recovery with root (like Amon_RA or Cyanogen). Those steps have been tested with Amon_RA's.
To backup
Boot into recovery mode
Connect to shell via "adb shell" (with sdk tools)
# mount /sdcard
# mount /system/sd
# cd /system/sd
# tar cvzf /sdcard/name_you_want.tar.gz *
# umount /system/sd
# umount /sdcard
To restore
Boot into recovery mode
Connect to shell via "adb shell"
# mount /sdcard
# mount /system/sd
# cd /system/sd
# rm -rf app* dal*
# tar xvzf /sdcard/name_you_want.tar.gz
# umount /system/sd
# umount /sdcard
Of course, you don't type "#". The backup will be in the sdcard's root.
This might even be included in the amazing recoveries out there. Please note that if you change room, you might have trouble with the applications. This is intended to be paired with its corresponding nandroid backup.

Has anyone tried this and was successfully?
I got a new class 6 SD card and I want to transfer everything to the new card

HUmmm,
i was unable to get the virtual keyboard working on the recovery console on my MyTouch3G...
How do you do that..?

HUmmm,
i was unable to get the virtual keyboard working on the recovery console on my MyTouch3G...
How do you do that..?

PToN22 said:
HUmmm,
i was unable to get the virtual keyboard working on the recovery console on my MyTouch3G...
How do you do that..?
Click to expand...
Click to collapse
There is an app in the Market called "Better Terminal Emulator" That works on the MyTouch3G. (Works for Terminal commands, not sure about Recovery)

Related

modified: Installing & Run application on sdcard

WARNING: Proceed at your own risk, this may damage your phone and/or make it unstable. This is for advanced users only and should only be attempted by those who understand the risks of the following changes
Original post: http://www.androidin.net/thread-1099-1-1.html
AS usual, this is for those WITH ROOT ONLY
Preparation:
1. Installed JF RC30 V1.2 (only if you are using JF RC30 1.2 , this is not compatible with RC8)
2. Make a NANDROID backup (you may get everything back to normal if the phone screw up)
3. A MICRO-SD card with 2 partitions divided : (1) a fat-32 partition, (2) a ext2, you need a linux/mac to format the sdcard with ext2 partition
* the fat 32 will be mounted as sdcard and the ext2 will be mounted as /sd for application data, make your own decision for the size*
4. insert the sdcard with 2 partition on the phone
5. set the phone to aeroplane mode for safe
Procedure:
1. adb pull /system/etc/mountd.conf /*somewhere you may want to back it up*
2. rm -f /system/etc/mountd.conf
3. using the modified mountd.conf, adb push /*the path of modified mount.conf */mount.conf /system/etc/mountd.conf
4. adb pull /system/init.rc /*somewhere you may want to back it up*
5. rm -f /system/init.rc
6. using the modified init.rc, adb push /*the path of modified init.rc*/init.rc /system/init.rc
7. reboot
8. busybox cp -a /data/app /sd/
9. rm -r /data/app
10. ln -s /sd/app /data/app
11. reboot
Now, the phone will install and run everyone on /sd, still mounting /sdcard as usual. It is possible that to mount or unmount /sdcard by usb without everything screwed up. Beware that your sdcard will be used as part of system, removing the sdcard may freeze the phone. If the phone get freeze because of removing the sdcard, plug the sdcard again and soft reset.
It is also possible that copy the application data to another card. If you want to change the sdcard, switch the phone off, mounting the sdcard to computer directory, copy the /sd partition to another sdcard with ext2 partition
Back to normal:
1. rm -f /system/etc/mountd.conf
2. adb push /*the backup of mountd.conf* /system/etc/mountd.conf
3. rm -f /system/init.rc
4. adb push /*the backup of init.rc* /system/init.rc
5. busybox cp -a /sd/ /data/app
6. rm -r /sd/
Change of mountd.conf:
changing /dev/block/mmcblk0 to /dev/block/mmcblk0p1
change of init.rc:
adding
insmod /system/modules/2.6.25-01843-gfea26b0/kernel/fs/ext2/ext2.ko
mknod /dev/mmcblk0p2 b 179 2 1000
mount ext2 /dev/mmcblk0p2 /sd noatime nodiratime
Any chance of this being simplified into the actual commands necessary for this!?
I'm a semi-noob at *nix stuff... I can format my SD card into 2 partitions, but I'm lost at step 4... What do we need to edit??
Changed step 4...just adb pull the mount.conf for editing..open the file in text editor..find "mmcblk0" and change it "mmcblk0p1" ..save the .conf...del the original one..push the new one to the original directory..
Yay. Now hopefully we can get this in an update.zip to flash
Yeah, I'm putting off doing this until someone makes an update.zip which I definitely know how to apply and get rid of if I screw anything up
REPLACES the internal memory...?
So the internal memory isnt used?
kinda the same trick as the browser cache and market cache, just a bit more complex as its an entire filesystem your moving, which wouldnt let the sys see the internal, mem, please correct me if im reading it wrong, Im not a total noob at linux but no guru dev either...
bhang
The internal memory is still used, just not for /data/app
19.rm -r /data/app
20.ln -s /sd/app /data/app
Click to expand...
Click to collapse
It should probably be /sdcard/app. In any case, this is a fairly complex mod that is not suited for Linux newbies. I would advise against folks considering this mod unless they understand and can test each step before attempting.
I agree and added a warning to the first post
Ummm yea, so what happens when you mount your sdcard for storage? I expect the phone goes crazy?
This tutorial, if you could call it that,(no offense) is really badly written and this process seems too risky for what you gain considering that if we are patient google will come out with this themselves.
Stericson
Stericson said:
Ummm yea, so what happens when you mount your sdcard for storage? I expect the phone goes crazy?
This tutorial, if you could call it that,(no offense) is really badly written and this process seems too risky for what you gain considering that if we are patient google will come out with this themselves.
Stericson
Click to expand...
Click to collapse
The procedure calls for two partitions on the microsd, one FAT32, other EXT. Theoretically it should work with mounting for mass storage. However, I agree that it's a rather sloppy hack.
There is talk about a similar strategy being officially implemented by the Android team. Instead of two partitions, it would be loopback mounted to a file in the FAT32. That would also provide some encryption security. See here. It's just talk though. Won't be a reality for at least a few months.
Well talk is certainly better than nothing...thanks for the info....
Stericson
I post a method withtout compiling the ramdisk.img but that do not force mounting the sd ext2 drive under rootfs but still workable...probably when i back to work I can compile 1 to flash
Am I the only one that thinks there are a few things that are getting 'lost in translation' here?
I'm not getting /sd mounted properly upon reboot...there's no way I'm going to continue attempting this till I see a better (no offense) tutorial or do a little more research on the command lines.
I would really shy away from this if you're an average user or don't know what mountd and init.rc files are used for....this could flat out wreck your phone.
TheDudeOfLife said:
Am I the only one that thinks there are a few things that are getting 'lost in translation' here?
I'm not getting /sd mounted properly upon reboot...there's no way I'm going to continue attempting this till I see a better (no offense) tutorial or do a little more research on the command lines.
I would really shy away from this if you're an average user or don't know what mountd and init.rc files are used for....this could flat out wreck your phone.
Click to expand...
Click to collapse
/sd is /sdcard (mount point for the micro sd card's partition)
I'm getting stuck right here:
8. busybox cp -a /data/app /sd/
9. rm -r /data/app
10. ln -s /sd/app /data/app
11. reboot
It's saying read only system blah blah, even though I have indeed mounted it is rw
pershoot said:
/sd is /sdcard (mount point for the micro sd card's partition)
Click to expand...
Click to collapse
No....no it is not.
/sd is a mount of the ext2 partition used for the 'copy' of /data/app (one of the things i disagreed with is picking /sd as a mount point for the second partition.)
/sdcard is the fat32 mount point...used as usual for mounting files.
IzzeLing said:
I'm getting stuck right here:
8. busybox cp -a /data/app /sd/
9. rm -r /data/app
10. ln -s /sd/app /data/app
11. reboot
It's saying read only system blah blah, even though I have indeed mounted it is rw
Click to expand...
Click to collapse
Type mount in adb shell and see if /sd is even mounted. I wasn't seeing it in my list. I don't think his mount command in the init.rc is correct, but I'm too busy with holiday stuff.
Don't rm -r /data/app if you have not 100% verified the copy works.
This line looks mangled (need flags in the args):
Edit: nevermind, looks like it should work in the init.rc
TheDudeOfLife said:
No....no it is not.
/sd is a mount of the ext2 partition used for the 'copy' of /data/app (one of the things i disagreed with is picking /sd as a mount point for the second partition.)
/sdcard is the fat32 mount point...used as usual for mounting files.
Click to expand...
Click to collapse
ahh yea. i just re-glanced over the instructions.
cool.
TheDudeOfLife said:
Type mount in adb shell and see if /sd is even mounted. I wasn't seeing it in my list. I don't think his mount command in the init.rc is correct, but I'm too busy with holiday stuff.
Don't rm -r /data/app if you have not 100% verified the copy works.
Click to expand...
Click to collapse
Yeah, don't see it. Hm.

[How to] mount SD card in recovery.

Please add this thread to the sticky!
If you messed up your ROM, and want to just reflash, but don't have your update on the SD card... or you mess up apps2sd and you need to clear them, this thread is for you. I've needed to do this MANY times, and it's a pain in the ass to remember how to do it every time.
Get into the recovery, and ./adb shell (if you can). Otherwise, hit alt + x to drop into the terminal. Then type this:
Code:
echo /dev/block/mmcblk0 > /sys/devices/platform/usb_mass_storage/lun0/file
Then, if you need to unmount:
Code:
echo "" > /sys/devices/platform/usb_mass_storage/lun0/file
This allows you to drag/drop files right from your PC to the sd card.
.... this is why i have card readers.
on another note, if you can get into adb cant you just
Code:
adb push /sdcard/
Simplest way - if you dont`t have update.zip on card simple click Alt-S. Recovery menu mount sdcard and show error (update.zip not found) but don`t unmount card
dbhatesyou said:
.... this is why i have card readers.
on another note, if you can get into adb cant you just
Code:
adb push /sdcard/
Click to expand...
Click to collapse
Because then you'd have to mount the sdcard to the device, it's easier to just do it this way. Although the post below yours does give a good example of how to easily mount it, I often keep updates on the card.
So by using this and mounting it to the PC, I can easily change files/names/etc.
thanks
dude i registered just to thank you for this piece of advice. thanks gary works perfectly
this works for me and is much simpler:
adb shell
mount /sdcard
exit
once you do that you can:
adb push updateofyourchoice.zip /sdcard/update.zip
edit: you can even shorten it to:
adb shell mount /sdcard
Gary13579 said:
Please add this thread to the sticky!
If you messed up your ROM,
Click to expand...
Click to collapse
Learn to speak with out school yard language.
just bookmared this page hahha
agreed, this bit ought to be in the index...added to the "how to" section
mhm
how to access my ext3 partition so i can format it ?? (i'm using vista x64, adb works fine)
alapapa said:
this works for me and is much simpler:
adb shell
mount /sdcard
exit
once you do that you can:
adb push updateofyourchoice.zip /sdcard/update.zip
edit: you can even shorten it to:
adb shell mount /sdcard
Click to expand...
Click to collapse
Yep, I have to agree, this is what I do too... much easier really
Gary13579 said:
Please add this thread to the sticky!
If you messed up your ROM, and want to just reflash, but don't have your update on the SD card... or you mess up apps2sd and you need to clear them, this thread is for you. I've needed to do this MANY times, and it's a pain in the ass to remember how to do it every time.
Get into the recovery, and ./adb shell (if you can). Otherwise, hit alt + x to drop into the terminal. Then type this:
Code:
echo /dev/block/mmcblk0 > /sys/devices/platform/usb_mass_storage/lun0/file
Click to expand...
Click to collapse
First of all, thanks for this thread!
When I get to this point, I get a Permission Denied message.
(The way I typed it was echo /dev/block/mmcblk0 press enter /sys/devices/platform/usb_mass_storage/lun0/file)
Long story short.
I have Hero ROM (2.4). I had the FAT32/Ext2 partition. I used Paragon Partition Manager to complete delete partition and created a new FAT32/Ext3.
After I did this, it said that my SD card was not "formatted". I hit FORMAT button, but it gave me a force close error. I had no other choice but to turn off G1, when I turn on again (since HERO depends on your SD Card FAT32/Ext2,3 to load correctly, not it won't get pass HERO screen, it loops forever).
I will buy a SD card reader today (The way I have been working is thru another Phone (T-Mobile Wing, I removed SD card from G1 and put it on the Wing, but now it won't even read that, so that's another issue), regardless of this outcome. But I wanted to share my story.
I want to format my SD card thru the recovery console, if it's possible.
By the way, I typed also:
adb shell
It says Not found
Thanks in advanced.
thanks
after typing this in i get
"mount: mounting /dev/block/mmcblk0p1 on /sdcard failed: No such file or directory" no matter if my sdcard is inserted or not.
Ya'know, if you have Cyanogen's recovery image (which is awesome, has JF recovery features and more) you can just use:
ums_enable
ums_disable
Click to expand...
Click to collapse
to mount and unmount, works great.
AdrianK said:
Ya'know, if you have Cyanogen's recovery image (which is awesome, has JF recovery features and more) you can just use:
ums_enable
ums_disable
Click to expand...
Click to collapse
to mount and unmount, works great.
Click to expand...
Click to collapse
Wow, thats easier to remember, thanks!!! Now if he could add this into his menu would be even better!
bassbox said:
mhm
how to access my ext3 partition so i can format it ?? (i'm using vista x64, adb works fine)
Click to expand...
Click to collapse
From Terminal:
# mount -o rw /dev/block/mmcblk0p2 /system/sd
# rm -rf /system/sd/*
# reboot recovery
ive gota say top advice from all of you!! it would have been a paper weight untill i got home but all working now..
YOU SIR
Are a lifesaver.
i thought i'd ruined my phone which means my om woulda killed me. but i didnt thanks to your halp!
bassbox said:
mhm
how to access my ext3 partition so i can format it ?? (i'm using vista x64, adb works fine)
Click to expand...
Click to collapse
not the best at unix and assuming 2nd partition is your ext2/3/4 ...
from console or better yet adb shell
mount /dev/block/mmcblk0p2 /system/sd
cd /system/sd
ls -l (to see the contents)
rm [filenames] (to delete the files)
rmdir (to delete empty directories)
.

How to swap SD cards w/ Apps2SD

All props go to Jonnythan who gave the steps in another post. Mods may want to sticky this....
1. As always: Nandroid backup
2. reboot phone
3. adb shell into the phone
4. mkdir /sdcard/backup/
mkdir /sdcard/backup/app
mkdir /sdcard/backup/app-private
cp -r /data/app/* /sdcard/backup/app/
cp -r /data/app-private/* /sdcard/backup/app-private/
5. copy sd card to pc
6. Shut off phone and remove old sdcard and insert new sdcard
7. Start in recovery mode and partition new sdcard (fat32, ext2, swap)
8. Enable usb mode, copy data from old sdcard to newly partitioned sdcard
9. reboot and ignore force closings
10. Plug in USB and enable USB mode
From PC ADB shell into phone and type the following (enter after each line):
rm -r /data/app/*
rm -r /data/app-private/*
[chances are those directories are empty already, but you never know]
cp -r /sdcard/backup/app/* /data/app/
cp -r /sdcard/backup/app-private/* /data/app-private
reboot recovery
11. Restore most recent nandroid
12. reboot and enjoy
All thanks again to Jonnythan
Tweaks:
Between 5 and 6, shut off phone. Then start step 7 by specifying to start into recovery mode to partition the card. Then specify that you need to plug in the usb and adb shell for step 10. End step 10 by typing in "reboot recovery" which will reboot you right into the recovery partition.
Thanks for writing it up! Now I don't have to
Ok, I must be doing something wrong here... Does this require a custom ROM or anything? Im on the sprint Hero, stock ROM and I do have root. Everytime I get to step 4, at the cp -r /data/app/* /sdcard/backup/app/ command i get an error. It cant find the directory. Also, if i check the folder properties through Astro or linda file manager, it says 0 files, 0 folders, and also shows that it is not taking up any space. Just as a test to see if I was somehow blocked, I made a nandroid backup and deleted the /data folder, and upon reboot nothing had changed. Still have all of my apps on the phone...
I think the stock ROM doesn't include the cp command.
jonnythan said:
I think the stock ROM doesn't include the cp command.
Click to expand...
Click to collapse
Wait, when i get my sd card I have to do all this? I can't just reformat using the utility and drag and drop everything back into the sd card?
runsoverfrogs said:
Wait, when i get my sd card I have to do all this? I can't just reformat using the utility and drag and drop everything back into the sd card?
Click to expand...
Click to collapse
Not if you're using AppsToSD.
If you're not using A2SD then just make a backup of the old card, unmount it, put the new one in, and copy everything back. If you are using A2SD, the process is more complex.
Cp = Copy. Works on any rom. Like he said since you're on the stock rom, I doubt you're using Apps2SD so no you don't have to do all this.
If only people would actually read the thread title....
"How to swap SD cards w/ Apps2SD."
Don't have Apps2SD? Then this isn't the thread for you.
Exactly what I was thinking.
jonnythan said:
If only people would actually read the thread title....
"How to swap SD cards w/ Apps2SD."
Don't have Apps2SD? Then this isn't the thread for you.
Click to expand...
Click to collapse
I'm using the modaco 1.1, i should've mentioned that. Doesnt that come with Apps2SD built in?
Only if you partitioned your sd card before you flashed.
After step 6, how do you boot into recovery mode to partition the new card if you dont have the recovery image on the new card? Did I miss a step where I added the recovery image to the new card?
chalan30 said:
After step 6, how do you boot into recovery mode to partition the new card if you dont have the recovery image on the new card? Did I miss a step where I added the recovery image to the new card?
Click to expand...
Click to collapse
The recovery partition is installed on the phone itself, not the card.
thanks I dont know why the first time I tried i didn't get back into the recovery screen but the second time I booted into it just fine... oh well thanks for all your hard work!!!
Partitioning links
To partition the new card, you might want to include links to sdparted and this page for people who want to do it manually.
I have a question about how to make the swap. I have moved /data/dalvik-cache/ to my sd card and freed up about 25 meg of space on internal memory. Is there anything I need to do in addition to your instructions or would it be better to just do a wipe and start from scratch. I am using MoCaDo 1.2 Rom using apps2sd and ext3 partition. I have a 16 gig card coming. By moving the cache I now have 143 meg of internal memory with about 65 apps installed counting some of the stock apps. I have removed several of those as well. 34 apps from the market or handmark.
esoteric1311 said:
All props go to Jonnythan who gave the steps in another post. Mods may want to sticky this....
1. As always: Nandroid backup
2. reboot phone
3. adb shell into the phone
4. mkdir /sdcard/backup/
mkdir /sdcard/backup/app
mkdir /sdcard/backup/app-private
cp -r /data/app/* /sdcard/backup/app/
cp -r /data/app-private/* /sdcard/backup/app-private/
5. copy sd card to pc
6. Shut off phone and remove old sdcard and insert new sdcard
7. Start in recovery mode and partition new sdcard (fat32, ext2, swap)
8. Enable usb mode, copy data from old sdcard to newly partitioned sdcard
9. reboot and ignore force closings
10. Plug in USB and enable USB mode
From PC ADB shell into phone and type the following (enter after each line):
rm -r /data/app/*
rm -r /data/app-private/*
[chances are those directories are empty already, but you never know]
cp -r /sdcard/backup/app/* /data/app/
cp -r /sdcard/backup/app-private/* /data/app-private
reboot recovery
11. Restore most recent nandroid
12. reboot and enjoy
All thanks again to Jonnythan
Click to expand...
Click to collapse
I see some possible problems with this method... what happens if you're copying the sdcard onto a windows machine to backup? You'll lose symlinks, uid, and the like.
Also, what if /app and /app-private don't get put back onto the new sdcard? You'll end up with symlinks that point to nothing.
How 'bout this method? (just a little tweak).
Boot into recover (adb shell reboot recovery)
when recovery comes up, go to the shell (adb shell)
Then, issue these commands (this assumes your ext partition is ext3, and that you're using Amon-Ra's recovery so you have BusyBox 1.13.2 or later):
mkdir /sdcard/extback
mount -o ro -t ext3 /dev/block/mmcblk0p2 /system/sd
cp -a /system/sd/. /sdcard/extback/
Now, back up the sdcard to a linux machine... keeping uid's and everything the same.
Turn the phone off, swap the cards, reboot into recovery (manually), format, partition, and convert ext2->ext3 the sdcard, put all the stuff back onto the card... and in the shell (within recovery
mount -o rw -t ext3 /dev/block/mmcblk0p2 /system/sd
cp -a /sdcard/extback/. /system/sd/
reboot
Now, it should all come up with the same attributes, no force close, and everything...
Basically, this method would swap sd cards outside of the normal OS (in recovery), but would keep all the attributes, symlinks, and uids the same for the main OS.
I think if you're using a windows box to backup the card, then we may want to look into making a tarball of the ext partition. I'm not sure if Amon-Ra's recovery supports this or not.
jmanley69 said:
I see some possible problems with this method... what happens if you're copying the sdcard onto a windows machine to backup? You'll lose symlinks, uid, and the like.
Also, what if /app and /app-private don't get put back onto the new sdcard? You'll end up with symlinks that point to nothing.
How 'bout this method? (just a little tweak).
Boot into recover (adb shell reboot recovery)
when recovery comes up, go to the shell (adb shell)
Then, issue these commands (this assumes your ext partition is ext3, and that you're using Amon-Ra's recovery so you have BusyBox 1.13.2 or later):
mkdir /sdcard/extback
mount -o ro -t ext3 /dev/block/mmcblk0p2 /system/sd
cp -a /system/sd/. /sdcard/extback/
Now, back up the sdcard to a linux machine... keeping uid's and everything the same.
Turn the phone off, swap the cards, reboot into recovery (manually), format, partition, and convert ext2->ext3 the sdcard, put all the stuff back onto the card... and in the shell (within recovery
mount -o rw -t ext3 /dev/block/mmcblk0p2 /system/sd
cp -a /sdcard/extback/. /system/sd/
reboot
Now, it should all come up with the same attributes, no force close, and everything...
Basically, this method would swap sd cards outside of the normal OS (in recovery), but would keep all the attributes, symlinks, and uids the same for the main OS.
I think if you're using a windows box to backup the card, then we may want to look into making a tarball of the ext partition. I'm not sure if Amon-Ra's recovery supports this or not.
Click to expand...
Click to collapse
Now I'm confused don't take much.
I tried reading the ext2 partition using ubuntu and loading it temp on my windows 7 PC. It would not let me open that partition so I could not copy anything to it.
I guess the easiest way is to just wipe the phone back to factory, booting to recovery with the new card in and create the fat32-ext2-swap partition, re-flash the MoDaCo or any Rom that uses Apps2Sd and install all my apps again. I am assuming this would work as well.
jmanley69 said:
I see some possible problems with this method... what happens if you're copying the sdcard onto a windows machine to backup? You'll lose symlinks, uid, and the like.
Also, what if /app and /app-private don't get put back onto the new sdcard? You'll end up with symlinks that point to nothing.
How 'bout this method? (just a little tweak).
Boot into recover (adb shell reboot recovery)
when recovery comes up, go to the shell (adb shell)
Then, issue these commands (this assumes your ext partition is ext3, and that you're using Amon-Ra's recovery so you have BusyBox 1.13.2 or later):
mkdir /sdcard/extback
mount -o ro -t ext3 /dev/block/mmcblk0p2 /system/sd
cp -a /system/sd/. /sdcard/extback/
Now, back up the sdcard to a linux machine... keeping uid's and everything the same.
Turn the phone off, swap the cards, reboot into recovery (manually), format, partition, and convert ext2->ext3 the sdcard, put all the stuff back onto the card... and in the shell (within recovery
mount -o rw -t ext3 /dev/block/mmcblk0p2 /system/sd
cp -a /sdcard/extback/. /system/sd/
reboot
Now, it should all come up with the same attributes, no force close, and everything...
Basically, this method would swap sd cards outside of the normal OS (in recovery), but would keep all the attributes, symlinks, and uids the same for the main OS.
I think if you're using a windows box to backup the card, then we may want to look into making a tarball of the ext partition. I'm not sure if Amon-Ra's recovery supports this or not.
Click to expand...
Click to collapse
Well, for one thing your method requires a linux machine
But what would you even have symlinks on the SD card for? Symlinks, uids, and attributes on SD card files simply aren't an issue at all for most people.
And truthfully if you are already doing that kind of stuff, you don't need this guide.
jonnythan said:
Well, for one thing your method requires a linux machine
But what would you even have symlinks on the SD card for? Symlinks, uids, and attributes on SD card files simply aren't an issue at all for most people.
And truthfully if you are already doing that kind of stuff, you don't need this guide.
Click to expand...
Click to collapse
As far as Linux... get VMWare player for free and download ubuntu and you're set real fast. Also if you notice what I said about doing a tar instead id using Linux.
As far as symlinks. You're right there "shouldn't" be any... but if you're backing up something why not do it right just in case? We have no idea what future versions of apps2ad sill do. It may happen that a file MUST reside on internal memory and therefore you'd need a symlink.
As far as the rest...
Actualy... each app gets its own user id and mismatches in those can cause problems with some apps. And each file in Linux gets attributes to tell the OS who is allowed ti read/write/execute it. If those get messed up it can cause problems.
So... we have a responsibility aa educators to give the best instructions possible. And not give instructions that ultimately would result in a backup that is missing vital information and would lead to a complete reload to fix the problems.
There are many reasons why Google decided to restrict apps to internal memory and we will never know all of them... this may very well be one of the problems they saw happening.

Clone an SD card (including EXT3) to another?

Like ghosting a HDD to another, I wanted to know if there's an app that can do this?
I think my 8GB LG branded MicroSD is failing as Windows keeps reporting that the drive needs to be scanned when I mount it via USB from my Desire so I'd like to just get a new Sandisk 8GB card and clone the old to new one to avoid having to go through restoring backups and so on.
If anyone has any ideas that would be grand!
check winimage.
That app can make image and recover it to drives!
Doesnt matter if disk is bigger than previous ( NB! may need to resize to get total space if its bigger, cannot remember)
I've always used it for vmware ESXi embedded sticks, made a million of them and the app works!
also linux routers.
Hope this helps.
vmware ESXi runs linux so it supports EXT!
No need for a program, copy data from fat partitions vis pc and use this ( from cyanogen wiki page) Used it three times now and no problems
Upgrading SD / Moving data to new SD
If you are using RA recovery, this is all done for you by making a BART backup. The following is if you're wanting to do it from the command line.
1. First, backup your ext partition on to your fat32 partition. Note, you will need enough free space to hold all of your apps.
* In Terminal Emulator or recovery console:
mount -a [enter]
tar cvf /sdcard/ext.tar /system/sd [enter]
Note that you must have root access for Terminal Emulator. If you get "permission denied" after entering the above command, then try entering the command "su". "sudo" will not work. After entering "su" try the above command again.
* Or, Using ADB shell from your PC:
adb shell
mount -a [enter]
tar cvf /sdcard/ext.tar /system/sd [enter]
2. Next, mount your SD card and download/backup everything on your fat32 partition. Make sure to get the ext.tar file that you just created in the previous step.
3. Change cards/repartion, or do whatever it is you planned to do here. For instructions on creating new partitions see the installation instructions above.
4. If you're not already, reboot into your recovery. Restore your backup files to your fat32 partition. Don't boot into CM yet!
5. Either go to console or ADB shell and type:
*
mount -a [enter]
*
tar xvf /sdcard/ext.tar [enter]
6. Double check that your directories are moved with:
ls /system/sd [enter]
7. Now you can reboot into CM!
8. Run fix permissions to fix any corrupted permissions.
9. Enjoy your new card!
If you have Amon Ra's recovery on your android phone you can do a bart backup with your old sd card, partition the new sd card as required, copy the bart backup to new sd card and then do a bart restore. It is what i did when i upgraded from my 2gb to 8gb, worked a treat.
Since I created this thread a few great things have happened, EXT4 support in unrevoked permanent flashed AmonRA recovery being the main one so now I am sorted thanks!
I use Gparted just copy paste

Mimic fstab entry by using a mount command that runs in an init.d script

Hey guys. I have an android tablet (running Android 8.1) that I flashed with a rooted system partition. The tablet has two main storage partitions: user and sdcard. sdcard is 20gb of storage that is immediately accessible via USB if plugged into the computer.
The problem I'm having is, after flashing with the new system partition, the 20gb storage is no longer mounted. I'm able to mount it using the following command:
Code:
$ mkdir /mnt/media_rw/sdcard
$ chmod 777 /mnt/media_rw/sdcard
$ mount -o rw /dev/block/blck27 /mnt/media_rw/sdcard
The problem is, after mounting it, I can't open media files, and I can't access it via USB either. I looked in the /vendor/fstab file to see how this partition is being mounted, which looks like this:
Code:
/dev/block/mmcblk0/mmcblk0p27 auto vfat defaults voldmanaged=sdcard1:auto,noemulatedsd
I'm not sure how to create a mount command that mimics the functionality of this. Any help would be greatly appreciated.

Categories

Resources