How to change SD card after moving apps? - G1 Q&A, Help & Troubleshooting

So I've got a dilemma:
I've rooted my phone the cyanogen method and have partitioned out my 1 gig SD card which now has all of my apps moved to it. I've read that the phone gets wonky if you remove the SD card.
So, having purchased an 8 gig card and want to use it, but how do I migrate all of my data and settings from the 1 gig to the 8, including properly partitioning it?

You can either do it in Ubuntu or you can run some commands
cd sdcard
mkdir app
mkdir app-private
cp /system/sd/app/* /sdcard/app/
cp /system/sd/app-private/* /sdcard/app-private/
Your apps are now on your Fat32 partition, so copy everyrthing in your Fat32 to a folder on your computer. Use parted or whatever you want to add the partitions you want and copy everything back to your fat32
Go back to the recovery console
mount -o rw /dev/block/mmcblk0p2 /system/sd
cp /sdcard/app/* /system/sd/app
cp /sdcard/app-private/* /system/sd/app-private/
And you're done
Thanks AdrianK I just copied and pasted one of your last posts.

Related

Hero help

Hi, I just got an 8gb microsd, but i am currently running jacero 2.73 on my original 1gb card. Now all my apps or on the 1gb card; the question is how can I transfer all my apps to the new card. I know they are on the ext2 partition of the card, but my computer (vista) doesn't see the files in the partition. Thanks n advance.
macetex said:
Hi, I just got an 8gb microsd, but i am currently running jacero 2.73 on my original 1gb card. Now all my apps or on the 1gb card; the question is how can I transfer all my apps to the new card. I know they are on the ext2 partition of the card, but my computer (vista) doesn't see the files in the partition. Thanks n advance.
Click to expand...
Click to collapse
Vista wont see it because Ext's are linux partitions.
to copy your apps to the Fat32, in the terminal:
Code:
cp /system/sd/app/* /sdcard/app
cp /system/sd/app-private/* /sdcard/app-private
then copy them to the fat32 of the new card, then in terminal:
Code:
mount -o rw,remount /dev/block/mtdblock3 /system
cp /sdcard/app/* /system/sd/app
cp /sdcard/app-private/* /system/sd/app-private
AdrianK said:
Vista wont see it because Ext's are linux partitions.
to copy your apps to the Fat32, in the terminal:
Code:
cp /system/sd/app/* /sdcard/app
cp /system/sd/app-private/* /sdcard/app-private
then copy them to the fat32 of the new card, then in terminal:
Code:
mount -o rw,remount /dev/block/mtdblock3 /system
cp /sdcard/app/* /system/sd/app
cp /sdcard/app-private/* /system/sd/app-private
Click to expand...
Click to collapse
you might also want to transfer your data over (settings of various applications and whatnot).
cp -r /data/data /sdcard/data
-to restore-
cp -r /sdcard/data /data/data
Thank you guys very much

backup ext3 partition

Hey guys,
is there a way to backup the ext3 partition? when flashing Drizzys ROM you must have a clean ext3 to do initial boot. without clean ext3 you get a bootloop. Ive flashed his ROMS several times and i want to flash a new cyans 4.0.1 but im afraid that ill lose my apps.
any ideas on how to keep your info AANNNDDDD flash drizzys ROM??
If you have adb up and running you can adb pull /system/sd/app (some directory on your computer) to make a back up the adb push (same dir from above) /system/sd/app if you don't have adb then i do not know
If you ant to go from Drizzy to Cyan you should be fine. Just wipe and flash Cyan.
For fututre refrence, to back up your ext, go in to the recovery console
Code:
mkdir /sdcard/app/
mkdir /sdcard/app-private/
cp /system/sd/app/* /sdcard/app
cp /system/sd/app-private/* /sdcard/app-private
All that does is make the "app" and "app-private" folders on the fat32 partition of your sdcard and copies the apps to them from the ext3 partition (the mount point of ext3 is /system/sd).
To push them back after flashing a new ROM (again from recovery, don't do this from the terminal when your phone is on):
Code:
mount -o rw /dev/block/mmcblk0p2 /system/sd
cp /sdcard/app/* /system/sd/app/
cp /sdcard/app-private/* /system/sd/app-private
This time was also have to mount the ext3 as re-writeable so we can copy to it.
Hope that helps.
or just do cp /system/sd/* /sdcard
gets you all the folders in /system/sd
This makes it really easy http://forum.xda-developers.com/showthread.php?t=549876

Question about first time Swap setup....

i am interested in creating a SWAP partition on my sd card to increase rom speed, even tho CMs roms are preety fast already. I hav e 8gb CD with about 500mb ext2. now if i use this method to create Swap partition:
Reboot and enter recovery
Enter console
#parted /dev/block/mmcblk0
#print (to verfiy we know what size card we are dealing with, the details should be straight forward)
rm 1
rm 2
mkpartfs primary fat32 0 7200
mkpartfs primary ext2 7200 7700
mkpartfs primary linux-swap 7700 7732
#print (to verify we have the 3 partitions)
i know how to backup music and everything on fat32 to my PC(to later restore) because doing the above will reformat entire card.
my question is do i need to back up my ext2 with all my apps and data on it, and if so how? or will it do everything itself when i reboot my CM rom? i am trying to create this swap partition without really changing everything and without wiping
There are quite a few threads on this, but granted they aren't that easy to find (I'm looking at you, people who name their threads "PLZ HELPPPPP!!")
boot in to recovery and go to the console:
cd sdcard
mkdir app
mkdir app-private
cp /system/sd/app/* /sdcard/app/
cp /system/sd/app-private/* /sdcard/app-private/
All your apk's are now on your Fat partition, copy those two folders to your computer
after you have remade the partitions go back to the recovery console (don't do this in terminal, but you can use adb shell when the phone is in recovery mode). This time we have to mount your new ext partition as rw.
mount -o rw /dev/block/mmcblk0p2 /system/sd
cd /system/sd
mkdir app
mkdir app-private
cp /sdcard/app/* /system/sd/app/
cp /sdcard/app-private/* /system/sd/app-private/
You're done. expect your phone to take a few minutes to boot up as it re-creates the dalvik-cache.

backing up ext2 partition

i have done a search, but came back with nothing that sounded like an answer to me, what I wanted to know is how would I go about backing up my ext2 partition, so that if I wanted to change my memory card I could just back and restore onto new card and continue using my phone as it was. I am running cyanogen's 4.04 rom with a 500mb ext2 partition on an 8gb card.
Do a quick search in the Dev forum for something called switchrom. Read up on what it does, and you'll see how to do what you want to do. If you can't figure it out after reading up on it, pm me and i'll walk you through it.
cheers...had a look through the whole thread seems like it could be implemented into next update to cyangogen recovery so will wait..dont want to mess around with scripts sounds a little scary!..
I've answered this on a few threads before, but I can't find them to copy and paste :-S
in the recovery console
Code:
cd /sdcard
mkdir app
mkdir app-private
cp /system/sd/app/* /sdcard/app
cp /system/sd/app-private/* /sdcard/app-private
your apps are now on your fat partition, so do your victory dance and copy the two folders on to the root of your new sdcard.
Go back to the recovery console (*not* terminal, it's just not a good idea to do this while the phone is running, but you can use adb shell when the phone is in recovery).
Code:
mount -o rw /dev/block/mmcblk0p2 /system/sd
rm -r /system/sd/*
cd /system/sd/
mkdir app
mkdir app-private
cp /sdcard/app/* /system/sd/app
cp /sdcard/app-private/* /system/sd/app-private
You're done, it's a good idea to wipe and reflash the ROM before you reboot.
Thanks mate, that makes sense..people always say search first but the search function is not the best on the forums..
I will give that code a go..thanks
after the first CP command line it says cp: cannot stat '/system/sd/app/*' : no such file or directory.
it cant find the app dir?

[9001]Mounting external SD Card as ext3

Hey,
I like to mount my external SD Card as ext3 to support large files. The SD Card is formatted with ext3 but now Android shows only an empty folder.
So i tried to remount the SD:
Code:
mount -o rw,remount -t ext3 /dev/block/vold/197:33 /mnt/sdcard/externald_sd
But it doesnt use something... Does anybody has an idea? Some Example or sthing else?
Greetz
FaxXer said:
Hey,
I like to mount my external SD Card as ext3 to support large files. The SD Card is formatted with ext3 but now Android shows only an empty folder.
So i tried to remount the SD:
Code:
mount -o rw,remount -t ext3 /dev/block/vold/197:33 /mnt/sdcard/externald_sd
But it doesnt use something... Does anybody has an idea? Some Example or sthing else?
Greetz
Click to expand...
Click to collapse
u need a kernel that supports ext3. u can ask one of the guys compiling at the moment if they have time to add an ext3 module for u.
May be a stupid question:
would ext4 work instead? I thought the system partition would use this FS.
filesystem is already ext4
wintel_mac said:
May be a stupid question:
would ext4 work instead? I thought the system partition would use this FS.
Click to expand...
Click to collapse
well the system uses ext4 so it should work, but i'm not sure what u're trying to achieve. i use a 16 gb class 10 formatted fat32
Blumdum said:
filesystem is already ext4
Click to expand...
Click to collapse
He's talking about formatting external sd-card
When I get him right, he has a file that exceeds the 4GB FAT32 limit.
So he looks for an alternative to FAT32, which might be some kind of ext*-FS.
wintel your right!
In the Android-Hilfe Forum someone said the system expect first an vfat partition and then the ext. I think thats wrong cause its not working but somehow it has to go.
Hmm should I write these mount command I postet in the init.rc? Or something else. Would be very nice if you post your ideas!
Thanks
init.rc+ ext3 module/object included in kernel
Hmm okay thats good but how do I use them? So I can read and write to my external sd card with an ext3 or ext2 partition.
Thanks
Come on guys where are the great developers?!
Ok I did a test with busybox inbuilt mount, but I tried only with an image.
Not with a real SD card! This worked for me:
On a linux box:
# dd if=/dev/zero of=/tmp/image bs=1M count=1k
# mkfs.ext4 /tmp/image
Copy file to your phone. Then:
On the phone with terminal:
# mkdir /sdcard/mmnt
# busybox mount -o loop /sdcard/image /sdcard/mmnt
To unmount:
# busybox umount -l /sdcard/mmnt
Anybody tried that?
If I understand u right u puting an image file (ext3/4) on the sd and mount that as a virtual disk. Wouldn't the image file be bound to the same restrictoins as other content on a fat32 file system? Like the 4 gig limit!
YOU WILL LOSE ALL DATA ON YOUR SDCARD IF YOUR FDISK
BACKUP WHATEVER IS ON THERE FIRST!!!
YOU'VE BEEN WARNED
using a photon 4g but....
what i did was get an external sdcard reader writer...
(used ubuntu) and let it mount
fdisk device and DELETE ALL PARTITIONS
write
fdisk again
create a linux primary type 83
type mount and grab the /dev/sdcX value (it was /dev/sdc1 for me)
umount that
then
mkfs.ext3 /dev/sdcX ... ( heres the thing though with cyanogen mod 7 kernel 2.6.32.9 SMP PREEMPT)
had to reboot twice for it to be seen in file manager...
its buggy but it does work for the most part
Reviving an old thread, but I just found that I can format a MicroSD under NTFS and it will work with Paragon's NTFS module. At the very least, my phone will mount the drive. I partitioned and formatted it with ext4 on my Linux machine and it didn't recognize it, but I did have it use the GUID partition table. Hoping to be able to load up some videos to take with me.
ext4 sdcard mount works
FaxXer said:
Hey,
I like to mount my external SD Card as ext3 to support large files. The SD Card is formatted with ext3 but now Android shows only an empty folder.
So i tried to remount the SD:
Code:
mount -o rw,remount -t ext3 /dev/block/vold/197:33 /mnt/sdcard/externald_sd
But it doesnt use something... Does anybody has an idea? Some Example or sthing else?
Greetz
Click to expand...
Click to collapse
The problem is with the shell interpreting the special character ":"
To make it work, first create a symlink to the device node:
Code:
ln -s /dev/block/vold/197\:17 /dev/sd2
Then mount it:
Code:
busybox mount /dev/sd2 /mnt/tmp
Code:
sh-4.1# ls -l /dev/sd2
lrwxrwxrwx root root 2013-11-16 14:45 sd2 -> /dev/block/vold/179:17
sh-4.1# mount|grep sd2
/dev/sd2 /mnt/tmp ext4 rw,relatime,user_xattr,acl,barrier=1,data=ordered 0 0
success mounting ext formatted SD Card on Android
An improvement in technique to mount ext formatted SDcard:
1) be root and open terminal
2) insert the card
3) see the block device and partition names from dmesg
4) mount device to location of choice (create the directory if needed)
Below is an example of an SD card with one ext4 partition on it
Code:
bash-4.1# dmesg | tail | grep mmc
<6>[20230.719541] mmc1: new high speed SDHC card at address 0007
<6>[20230.722803] mmcblk1: mmc1:0007 SD32G 29.3 GiB (ro)
<6>[20230.728352] mmcblk1: p1
bash-4.1# busybox mount /dev/block/mmcblk1p1 /data/mnt/sdcard2
tribh said:
An improvement in technique to mount ext formatted SDcard:
1) be root and open terminal
2) insert the card
3) see the block device and partition names from dmesg
4) mount device to location of choice (create the directory if needed)
Below is an example of an SD card with one ext4 partition on it
Code:
bash-4.1# dmesg | tail | grep mmc
<6>[20230.719541] mmc1: new high speed SDHC card at address 0007
<6>[20230.722803] mmcblk1: mmc1:0007 SD32G 29.3 GiB (ro)
<6>[20230.728352] mmcblk1: p1
bash-4.1# busybox mount /dev/block/mmcblk1p1 /data/mnt/sdcard2
Click to expand...
Click to collapse
Would this work just the same way with i9000?
After this, no more access to the extSD by the Windows PC but only with Ubuntu, right?
tetakpatak said:
Would this work just the same way with i9000?
After this, no more access to the extSD by the Windows PC but only with Ubuntu, right?
Click to expand...
Click to collapse
Since it's generic Linux kernel and busybox functionality it should work on any 'droid. The SDcard device name might be different than in the above example - you will see the correct device and partition names after you insert SDcard and run `dmesg | tail` on the tablet or phone.
(of course your device must be rooted and have busybox...)
Typically Windows is engineered not to recognise anything that does not come from Microsoft, so you will not be able to mount the Linux partition via Windows.

Categories

Resources