backing up ext2 partition - G1 Apps and Games

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?

Related

How do I completly clear out my ext2 partition through Terminal emulator

I had to wipe my phone and have ext2 partition on my card but when I try the copy.sh app command it works but always hangs on the flashing g1 after I reboot the phone. So this leads me to believe its because the apps are still there on the ext2 partition and need to be removed before I could do it again.
Joeriginal said:
I had to wipe my phone and have ext2 partition on my card but when I try the copy.sh app command it works but always hangs on the flashing g1 after I reboot the phone. So this leads me to believe its because the apps are still there on the ext2 partition and need to be removed before I could do it again.
Click to expand...
Click to collapse
well you can try flashing LucidREM mod that has the files for mounting it located here and instead of using the copy.sh app first try this.
$su
# cd /system/sd
# ls -la
check if the app folder is there if it is than
# cd app
#ls
check if the files are there.. and if they exist than try this
# rm -rf /data/app
# ln -S /system/sd/app /data/app
# reboot
hope that helps and it u still want to wipe the ext2 parttition than jut
# rm -rf /system/sd/*
or
# rm -a /system/sd/*
Nitro212 said:
well you can try flashing LucidREM mod that has the files for mounting it located here and instead of using the copy.sh app first try this.
$su
# cd /system/sd
# ls -la
check if the app folder is there if it is than
# cd app
#ls
check if the files are there.. and if they exist than try this
# rm -rf /data/app
# ln -S /system/sd/app /data/app
# reboot
hope that helps and it u still want to wipe the ext2 parttition than jut
# rm -rf /system/sd/*
or
# rm -a /system/sd/*
Click to expand...
Click to collapse
I have problems when I get to ln -S /system/sd/app /data/app
it says link failed no such file exists
Joeriginal said:
I had to wipe my phone and have ext2 partition on my card but when I try the copy.sh app command it works but always hangs on the flashing g1 after I reboot the phone. So this leads me to believe its because the apps are still there on the ext2 partition and need to be removed before I could do it again.
Click to expand...
Click to collapse
I kinda had the same question but was wondering if there was an easier way of wiping the ext2 partition? I'm kinda new at all this and am now starting to get the hang of flashing different roms onto my phone but I realized that doing an Alt+W before flashing new roms does not wipe the ext2 partition. (At least I'm pretty sure it doesn't.)
I'm not too savvy on using terminal yet..I've heard of using adb but I don't even know where to begin with that..so I was wondering if going into Paragon Partition Manager and just formatting the ext2 partition will work? Any info will be greatly appreciated.
Ok i finally have it working. I keep getting a social network force close.
wiping an ext2/ext3 partition
Joeriginal said:
I had to wipe my phone and have ext2 partition on my card but when I try the copy.sh app command it works but always hangs on the flashing g1 after I reboot the phone. So this leads me to believe its because the apps are still there on the ext2 partition and need to be removed before I could do it again.
Click to expand...
Click to collapse
there is an app on the market called lucid REM that runs his script via terminal emulator. after getting it and running it you can go to terminal and type
su
lucid -c (this wipes ext2/3 partition)
hopefully this helps you. if you are on a rom that uses auto a2sd then you will most likely getting force closes all over until you flash your new rom.
I posted a thread with steps to do it http://forum.xda-developers.com/showthread.php?t=533731
Code:
Open console and enter the following commands. Press "Enter" after each line. This wipes the ext partition.
mount -o rw /dev/block/mmcblk0p2 /system/sd
rm -r /system/sd/
[code]
Glad this wasnt deleted right away, maybe it can just be moved?
It helped because I also was wondering the best way of doing this, and now I know.
Thanks .
Odd, double post for no reason. Sorry delete this post?

apps2sd reboot loop

hi everyone,
***i searched and searched but i couldnt find the answer***
i had apps2sd on a previous rom and i recently switched to the mytouch rom.
after i wiped and applied update, i get stuck at the boot loop. i know that this is caused by the apps2sd and i remember seeing a set of commands that erase it from the sd card but it was deep in a thread and i dont remember which thread it was.
can someone please help me ( and others) out by posting the commands that will get it past the boot loop?
i tried this in the recovery console but it didnt work:
mount data
ln -s /system/sd/app /data/app
Thanks guys!
also tried this but it didnt work:
mount data
rm /data/app
mkdir /data/app
im still stuck on boot loop
Code:
mount -o rw /dev/block/mmcblk0p2 /system/sd
cd /system/sd
rm -r *
slyfury said:
also tried this but it didnt work:
mount data
rm /data/app
mkdir /data/app
im still stuck on boot loop
Click to expand...
Click to collapse
mount -o rw /dev/block/mmcblk0p2 /system/sd
cd /system/sd
rm -r *
does that delete everything on the sd card?
this gives me an invalid argument error:
"mount -o rw /dev/block/mmcblk0p2 /system/sd"
i can get to
/system/sd #
when i type in cd /system/sd
?????what do i do???
slyfury said:
mount -o rw /dev/block/mmcblk0p2 /system/sd
cd /system/sd
rm -r *
does that delete everything on the sd card?
this gives me an invalid argument error:
"mount -o rw /dev/block/mmcblk0p2 /system/sd"
i can get to
/system/sd #
when i type in cd /system/sd
?????what do i do???
Click to expand...
Click to collapse
said what the hell and tried the rm command and i got permision denied on everyfile it tried to erase
easiest way would be to reformat your ext partition.
then wipe and reflash
other roms can leave junk in the ext partition that causes bootloops quite often. this is a very common problem and i always find a reformat, which takes like 30 seconds with gparted live cd, fixes it
is there a way to do it through the phone?
my micro sd adapter broke and im waiting for amazon to send my a new one
found it:
http://forum.xda-developers.com/showthread.php?t=534714

Ubuntu Help !

Hey Guys wondering is someone can assist
i been using different ROMS for about 3 months now
i have several SD card that have been partitioned to FAT32 and Ext3
however i recently purcahsed an 8GB card but what i want to do it change cards but i want to copy my Ext3 partition so its just a matter of drag and drop to the new card
however via ubuntu its not letting me access Ext3 partition, it clearly shows that its there but wont let me mount it .... can mount up FAT32 with no issues
if someone could assist it would be greatly appreciated
Running latest ubuntu 9.04 from Live CD
if you have the android sdk set up I believe you can pull it, create the partition and then push the files to the partition that way. Not sure if ubuntu can mount an ext partition. Google!
not sure if it is ROM specific but I can mount ext from linux using cyanogens rom.
plug phone in and click mount usb.
from linux open console
Code:
dmesg # to find out which device (mine is /dev/sda)
sudo fdisk -l /dev/sda # or whatever dmesg said
sudo mkdir /mnt/tmp
sudo mount /dev/sda2 /mnt/tmp
ls /mnt/tmp #should show contents of ext3 if it worked
copy files
Code:
sudo umount /mnt/tmp
on phone click unmount usb or whatever.
Strange, Ubuntu always mounts my ext3 no problems. You could try pulling the file to you fat32 on the old card, copy them to fat on the new card and push to the ext3
On the old card
cp /system/sd/app/* /sdcard/app
Cp /system/sd/app-private/* /sdcard/app-private
Then copy those 2 folder to the fat32 of the new card, then:
Cp /sdcard/app/* /system/sd/app
Cp /sdcard/app-private/* /system/sd/app-private
You will have to remount /system and mkdir's first, though.
dumfuq said:
not sure if it is ROM specific but I can mount ext from linux using cyanogens rom.
plug phone in and click mount usb.
from linux open console
Code:
dmesg # to find out which device (mine is /dev/sda)
sudo fdisk -l /dev/sda # or whatever dmesg said
sudo mkdir /mnt/tmp
sudo mount /dev/sda2 /mnt/tmp
ls /mnt/tmp #should show contents of ext3 if it worked
copy files
Code:
sudo umount /mnt/tmp
on phone click unmount usb or whatever.
Click to expand...
Click to collapse
Ill check thos out my friend
thanks , i will report bk
It's a little odd what it does with the ext partition. I noticed it did not show up except in /media. The fat partition gets a shortcut on the desktop. If you have gparted on your machine, open it up and it should tell you where it mounted it to (if it got mounted).
Good luck.
dmesg
sudo fdisk -l /dev/sdf
sudo mkdir /mnt/tmp
sudo mount /dev/sdf2 /mnt/tmp ..... SO FAR THIS WORKS
when i enter this command ..... ls /mnt/tmp ..... i get error message "ls: cannot open directory /mnt/tmp: Permission denied"
any other idea's
AdrianK said:
Strange, Ubuntu always mounts my ext3 no problems. You could try pulling the file to you fat32 on the old card, copy them to fat on the new card and push to the ext3
On the old card
cp /system/sd/app/* /sdcard/app
Cp /system/sd/app-private/* /sdcard/app-private
Then copy those 2 folder to the fat32 of the new card, then:
Cp /sdcard/app/* /system/sd/app
Cp /sdcard/app-private/* /system/sd/app-private
You will have to remount /system and mkdir's first, though.
Click to expand...
Click to collapse
through terminal ? or linux command ? or through recovery mode ?
also can you give instructions to remount system , only if you can
cheers appreciated
also any idea's why your fat 32 AND ext system auto shows so that files can be dragged and dropped ?
dumfuq said:
not sure if it is ROM specific but I can mount ext from linux using cyanogens rom.
plug phone in and click mount usb.
from linux open console
Code:
dmesg
sudo fdisk -l /dev/sda
sudo mkdir /mnt/tmp
sudo mount /dev/sda2 /mnt/tmp
ls /mnt/tmp
copy files
Code:
sudo umount /mnt/tmp
on phone click unmount usb or whatever.
Click to expand...
Click to collapse
ok managed to do this , but how then do i copy the files ?
drewno1 said:
through terminal ? or linux command ? or through recovery mode ?
also can you give instructions to remount system , only if you can
cheers appreciated
also any idea's why your fat 32 AND ext system auto shows so that files can be dragged and dropped ?
Click to expand...
Click to collapse
Was posting from my G1 late at night so I was feeling lazy
to remount /system as rw
mount -o rw,remount /dev/block/mtdblock3 /system
input those commands in to the recovery console, it's not a good idea to push apk's while your phone is on (I mean, it is in android).
No idea. I'm on Ubuntu 9.04, it auto mounts them and opens them, they also appear in the sidebar in nautilus.
drewno1 said:
ok managed to do this , but how then do i copy the files ?
Click to expand...
Click to collapse
Code:
cp -rv /mnt/tmp/* /path/to/where/you/want/the/files/
or drag and drop using nautilus file browser.
cp /system/sd/app/* /sdcard/app
Cp /system/sd/app-private/* /sdcard/app-private
Cp /sdcard/app/* /system/sd/app
Cp /sdcard/app-private/* /system/sd/app-private
mount -o rw,remount /dev/block/mtdblock3 /system
OK that never worked , anymore idea's ?
dmesg
sudo fdisk -l /dev/sdf
sudo mkdir /mnt/tmp
sudo mount /dev/sdf2 /mnt/tmp ls /mnt/tmp
cp -rv /mnt/tmp/* /sdcard/app/* /system/sd/app
cp -rv /mnt/tmp/* /sdcard/app-private/* /system/sd/app-private
sudo umount /mnt/tmp
will try this method and report bk
drewno1 said:
dmesg
sudo fdisk -l /dev/sdf
sudo mkdir /mnt/tmp
sudo mount /dev/sdf2 /mnt/tmp ls /mnt/tmp
cp -rv /mnt/tmp/* /sdcard/app/* /system/sd/app
cp -rv /mnt/tmp/* /sdcard/app-private/* /system/sd/app-private
sudo umount /mnt/tmp
will try this method and report bk
Click to expand...
Click to collapse
LMAO this never worked , i feel like pulling my hair out haha
billquinn1 said:
It's a little odd what it does with the ext partition. I noticed it did not show up except in /media. The fat partition gets a shortcut on the desktop. If you have gparted on your machine, open it up and it should tell you where it mounted it to (if it got mounted).
Good luck.
Click to expand...
Click to collapse
checked GParted and here is where it says its mounted
Path: /dev/sdf2
Status: Mounted on /media/disk-1
Since this is Ubuntu Help, i figured i'd post this here, if it is the wrong forum, let me know.
I am trying, and have been for a week now, to use
Code:
adb shell
however, it keeps giving me the message
Code:
device not found
i know it's there because i am able to mount the sd to my pc and browse the files, but adb doesn't find it. device not found....
any help?
temporizer said:
Since this is Ubuntu Help, i figured i'd post this here, if it is the wrong forum, let me know.
I am trying, and have been for a week now, to use
Code:
adb shell
however, it keeps giving me the message
Code:
device not found
i know it's there because i am able to mount the sd to my pc and browse the files, but adb doesn't find it. device not found....
any help?
Click to expand...
Click to collapse
You need to edit a couple of files first. Google is your friend.
AdrianK said:
You need to edit a couple of files first. Google is your friend.
Click to expand...
Click to collapse
I tried that. i searched for hours before i posted. and tried a couple things. but none work. thats why i ask the wonderful people here.
temporizer said:
I tried that. i searched for hours before i posted. and tried a couple things. but none work. thats why i ask the wonderful people here.
Click to expand...
Click to collapse
Hmm I didn't follow those exact intructions but something similar for jaunty and it worked fine :-S

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

No Apps2SD?

Just got my Droid yesterday. Already have Simple ROM 1.0 running... And I'm looking on here for apps2sd and can't find anything. Any answers? Before I did the flash, I was sitting at 120 megs of memory easily. Now... I'm sitting at around 77 megs.
Please help!!!
Sent from my Droid using XDA App
Haven't tried that rom, but if you go into settings>>applications, and go into each application, there should be an option to move to SD card. Don't move your launchers, or anything that has a widget, or you will have issues. Some apps will not allow you to move them anyways. It also doesn't move the entire application, usually about half to two thirds of the app gets moved.
If his suggestion doesn't work, Cyanogenmod has Apps2SD integrated and working. I thought you had to create an ext* partition, but apparently not anymore. It works fine as normal.
I'm using CyanogenMod right now... And I hate it. I keep getting FCs from .acore, whatever that is. I think it's a Firmware System File, and it's corrupted.
And that dude's answer is like the answer for a total noob that has no clue what they're doing. Sorry, but I'm not new to this. LOL!
Back on topic.... is there any way to get Apps2SD using the SDK's ADB Shell? I think I read somewhere that there's some way of basically tricking the Market and the phone into saving Apps2SD by using the ADB. If you've got commands, I can type them.
And also.... If I were to get Apps2SD working in SimpleRom, is there going to be a way that I can just pull the apps off my SD Partition without having to go all the way back through the excruciating process of RE-DOWNLOADING ALL MY APPS from the Market?
Until we figure this out, I'll be tinkering away on my own... LOL!
Regarding the force close with acore...have you tried clearing the dalvik-cache? I've had issues with the dalvik-cache getting hosed (or having an older copy).
Quickest way of clearing the dalvik-cache:
If dalvik is on internal storage: busybox rm -f /data/dalvik-cache/*
if dalvik is on cache partition: busybox rm -f /cache/dalvik-cache/*
In both cases, reboot the phone.
If the CyanogenMod is a nightly build, I noticed it puts the dalvik-cache on /cache partition. With my Darktremor Apps2SD, this messes up the program as it completely bypasses /data/dalvik-cache. Simple workaround would be to copy the files in /cache/dalvik-cache to /data/dalvik-cache, remove the /cache/dalvik-cache, then create a symlink of /cache/dalvik-cache pointing to /data/dalvik-cache.
Classic Apps2SD (or as some would call A2SD+) can be achieved by performing the following actions (after you launch ADB Shell):
1. Find out where your EXT partition for your SD card mounted to. There's at least two mount points: /system/sd or /sd-ext
2. Perform the following command:
- for mount point /system/sd: cd /system/sd
- for mount point /sd-ext: cd /sd-ext
3. Create two directories: app and app-private:
- busybox mkdir app
- busybox mkdir app-private
- chmod 777 app
- chmod 777 app-private
4. Copy the contents of both /data/app and /data/app-private to the SD card:
For mount point /system/sd:
- busybox cp -fp /data/app/* /system/sd/app
- busybox cp -fp /data/app-private/* /system/sd/app
For mount point /sd-ext:
- busybox cp -fp /data/app/* /sd-ext/app
- busybox cp -fp /data/app-private/* /sd-ext/app-private
5. Remove the /data/app directory and /data/app-private directory:
- busybox -rf /data/app
- busybox -rf /data/app-private
6. Create symlinks to the sd card:
For mount point /system/sd:
- busybox ln -s /system/sd/app /data/app
- busybox ln -s /system/sd/app-private /data/app-private
For mount point /sd-ext:
- busybox ln -s /sd-ext/app /data/app
- busybox ln -s /sd-ext/app-private /data/app-private
And that should do it. Just make sure that the rom mounts the /dev/block/mmcblk0p2 device:
Mount to /system/sd:
- busybox -t auto -o rw /dev/block/mmcblk0p2 /system/sd
Mount to /sd-ext
- busybox -t auto -o rw /dev/block/mmcblk0p2 /sd-ext
Hope this helps.
DyMiC said:
I'm using CyanogenMod right now... And I hate it. I keep getting FCs from .acore, whatever that is. I think it's a Firmware System File, and it's corrupted.
And that dude's answer is like the answer for a total noob that has no clue what they're doing. Sorry, but I'm not new to this. LOL!
Back on topic.... is there any way to get Apps2SD using the SDK's ADB Shell? I think I read somewhere that there's some way of basically tricking the Market and the phone into saving Apps2SD by using the ADB. If you've got commands, I can type them.
And also.... If I were to get Apps2SD working in SimpleRom, is there going to be a way that I can just pull the apps off my SD Partition without having to go all the way back through the excruciating process of RE-DOWNLOADING ALL MY APPS from the Market?
Until we figure this out, I'll be tinkering away on my own... LOL!
Click to expand...
Click to collapse
I used a simple shell command in terminal emulator which worked fine for me, I believe its
pm setInstallLocation 2 (1 instead to reset to internal storage.)
one line of code, simple fix. and as stated earlier, no launchers or widgets should be moved, so if you install one after entering this, move it back to phone through application settings, manage applications.

Categories

Resources