How to get my backed up apps back onto SD card? - G1 Android Development

So before I resized my partitions I backed up the app and app-private folders on my SD card. Now that I have reformatted the card I am not sure how to get them back onto the card. cp -R command got the files onto the card but they didnt work (in ubuntu had a funny symbol on their icons). So I think I should be able to just copy the files back and have them work again but I cant figure out how to get them copied. And IFS drives didnt help, the SD card doesnt show up.
Ideally I would like to use windows or copying the files from my FAT32 partition onto my ext2 partition.

Code:
adb pull /sdcard/location_of_apks app/
adb push app /system/sd/app

That is working for me but for some reason it keeps hanging on/after copying instamapper. Should I keep waiting or can I do it again and leave out that file?

Ok, so I removed instamapper and tried again and it worked fine. Here is what I used, and thanks again for that command, I was close but had a problem with my syntax
Code:
adb push app /system/sd/app
adb push app-private /system/sd/app-private

brandenk said:
So before I resized my partitions I backed up the app and app-private folders on my SD card. Now that I have reformatted the card I am not sure how to get them back onto the card. cp -R command got the files onto the card but they didnt work (in ubuntu had a funny symbol on their icons). So I think I should be able to just copy the files back and have them work again but I cant figure out how to get them copied. And IFS drives didnt help, the SD card doesnt show up.
Ideally I would like to use windows or copying the files from my FAT32 partition onto my ext2 partition.
Click to expand...
Click to collapse
i've always backed up with "cp -a" and then copy back the same way "cp -a" for the EXT2 partition .. have not yet encountered any troubles with that .. without the "cp -a" you won't have all the permissions set properly

Thanks for the advice! Im starting to get the hang of this.

Related

[Q] internal sd card for samsung captivate shows as write protected

I will give some background to begin with. I had installed the Kies mini update to the 2.2 software on my Captivate. I then rooted with super one click. I have the drivers for the Captivate installed in Windows XP and I have USB debugging enabled. It recognizes the drive and will show me the contents on the computer, but it doesn't allow me to copy from the computer to the drive. I know I can use dropbox for some things, but for other things like installing a custom rom, I would like to be able to copy to the drive. It does show as mounted and mass storage is enabled on the phone. Any ideas?
If you are rooted just go into cwr and mount sd card there. if not i have no idea as i haven't kept a phone stock since a week after i got my old Moto Droid, as soon as i found out it was possible.
Well apparently the version of Clockwork Mod Recovery that I have doesn't give the option to mount the SD card. I have 2.5.1.2. I did find a way using SGS tools to download a custom rom to the root of the SD card. I was going to reinstall Debian Linux at some point on my computer so I may have better luck with using that to write to the SD card then I am having with XP.
Yeah
Make sure that the SD card isn't locked. Also, back up everything on it to your computer and do a complete format as well. And if you're wanting to write ROMs to your SD (or CWM, etc.) in Linux, you're going to have to use dd in the terminal, and most like will be writing to "sdb".
Here's a simple walkthrough just in case you don't know how to use dd:
Become root by typing "su" and following it with your password. If you don't have a root password, type in "sudo passwd" and set it.
Next you have to unmount your microSD. To see what you have mounted type in "mount". Your SD card will most likely be called "/dev/sdb" or "/media/sdb" or something along those lines (not sdb1, that is the partition on the card). Once you know what your SD is called and where it's located, type in "umount /dev/sdb", placing '/dev/sdb' with the actual location and name of your SD card.
Now we get to use dd. Type in: dd if=<insert location of IMG here without the tags I included> of=<location of your sd without the tags I included> bs=1M
Be patient, because it usually takes a while, depending on what you're writing. Good luck mate.
I was looking for an answer to this myself. Me and my girlfriend both have the same phone, galaxy S. We both put andromeda rom on it and are now going to switch to FireFly (I did, she's trying to).
Well, mounting her USB storage ends up with the internal SD card being recognized as a CD ROM and the external as a usb storage device.
Anything we try to do to her internal says there's write protection and to disable it or use something else every time we do anything.
Only even trying this because we're getting some weird "Error at line 17: symlink with SU..." blah blah....
Completely stuck here. Doesn't make any fracking sense.
same to me. what should i do? I'm trying to install Andromeda. But I can't even copy ROM file to internal SD card. HELP ME ASAP!

[Q] Moving and linking Folders to external SDCard (eg Google Music cache)

Hello folks,
I am trying to move my google music cache to the external 32GB SD card so that it won't fill up my internal storage but somehow I fail.
Here is what I did so far:
format sdcard as ext2
manually mount sdcard since it won't automatically when ext:
Code:
mkdir /Removable/MicroSD
mount -r -w -t ext2 /dev/block/vold/179\:9 /Removable/MicroSD
mkdir /Removable/MicroSD/GoogleMusicData
Then move all data from /sdcard/Android/data/com.google.android.music/cache to /Removable/MicroSD/GoogleMusicData/cache
I did this with root explorer since I'm not too much of a terminal h4xx0r.
Delete the folder /sdcard/Android/data/com.google.android.music/
Link the new Folder on external MicroSD Card to the original location via this terminal command:
Code:
ln -s /Removable/MicroSD/GoogleMusicData /data/media/Android/data/com.google.android.music
Since /sdcard is already a link like the one I am setting up here, it is not possible to link to this linked location (/sdcard/Android/data/com.google.android.music).
Instead I had to link to the origninal destination of /sdcard which is /data/media.
Now the microSD card is accessible for root explorer. It shows read and write access.
But google music won't find it. It says that it doesn't have enough space to stream music so I figure that it somehow doesn't have access to the sd card.
What could be the issue here?
Also instead of 28GB free memory root explorer shows me only 364,44MB free memory. the command "df" in terminal however confirms 28GB of free memory.
I thought that a reboot might do it. But it doesn't. Instead it gets rid of all the hacking I've done in terminal. So I guess I would have to place a script in /etc/init.d for the link to be set everytime I reboot, right?
Help please?
We don't know how gmusic checks that, but I would suggest checking the perms on the mount, perhaps even mounting somewhere else.
Never done it and don't have the resources but I'm sure with root, making /mnt/sdcard a real microsd is possible.
Sent from my Transformer Prime TF201 using Tapatalk
Maybe this thread will help ?
Thanks for your response!
What do you mean by "checking the perms on the mount"?
I don't want to mount my microsd to /sdcard since then I would have 16 gigs of unused space on my internal memory.
I would rather just link this music folder to my external card and maybe some others later (e.g. DCIM and so on).
I have also tried the mount -o bind command instead of ln but that didn't do the job either. the folder com.google.android.music then only appeared under /data/media/Android/data/ but not under /sdcard/Android/data/ which I totally don't understand how that can happen.
I have root of course.
Does anybody maybe have a script by hand of a similar undertaking so that I can look into that and try to understand how this whole mounting and binding thing works?

[HACK] How to move games' SD card data to internal memory

I recently bought ShadowGun and N.O.V.A 2 from Google Play and discovered that my SD card didn't have enough room with all of my music (10+ GB) and misc. other stuff, and I had around 6 GB of extra space on my internal memory, so I figured this out.\
Pre-requisites:
Plenty of space on your internal memory
Root access
Note: This has only been tested with SD card data that was already downloaded, but you should be able to download directly to internal memory. Also, this has only been tested on my Droid X running MIUI.
Step 1.
First, find your game's data location. ShadowGun's is at
Code:
/sdcard/Android/data/com.madfingergames.shadowgun
and N.O.V.A 2's is at
Code:
/sdcard/gameloft/games/GloftN2HM
Step 2.
Next, create the new folders in /data/data and /data/local for the Market cache. (Without this, the Market gives a "insufficient storage" error.)
Code:
adb shell
su
mkdir /data/data/ShadowGun
mkdir /data/data/GloftN2HM
mkdir /data/local/cache
Step 3.
If you haven't downloaded the game's data yet, skip this step.
If it's already on your SD card, then move the data from the folders we found before to the folders you just created.
Code:
mv /sdcard/Android/data/com.madfingergames.shadowgun/* /data/data/ShadowGun/
mv /sdcard/gameloft/games/GloftN2HM/* /data/data/GloftN2HM/
Step 4.
Finally, copy the following commands into a shell script:
Code:
mount -o bind /data/data/ShadowGun /sdcard/Android/data/com.madfingergames.shadowgun
mount -o bind /data/data/GloftN2HM /sdcard/gameloft/games/GloftN2HM
mount -o bind /data/local/cache /data/data/com.android.vending/cache
If other apps are crashing with insufficient storage errors, just link them all to /data/local/cache.
You can find whatever way you want to run this script every time you boot, but the easiest way is to download Script Manager from Google Play and set it to use su and to run at boot.
Step 5.
For those who haven't downloaded the SD data yet, download it and see if it takes up any more space on your SD card. I haven't tried it before, so no guarantees.
Uninstalling:
To uninstall, just move files back to SD card, disable script running at boot, and reboot.
I AM NOT RESPONSIBLE IF YOUR PHONE BLOWS UP, YOUR DOG GETS WORMS, OR WW3 STARTS. Thank you.
Can I do this with GPS iGO data (about 400 MB)?
worked on my xperia U! tried dead trigger game
The files will be at internal memory but also show at sd like they are there.. for exemple if we delete it on sd it will delet the file in internal memory!
Going to try with more games
Why is good do this?
i did the factory reset and i have all games on my SD like FIFA 12 etc.
is it possible to do it that way?
+ i am little mixed up with the code, where should i do it?
i can create folders and move data through file managers but not sure about the mount and bind action.
i downloaded scrip manager and console was showing Shell...is it the one i should write the commands as mentioned?

[Q] saving to micro SD card

I have been having some issues when saving music to my micro SD. I am running the latest version of katkiss(and love it). I have the files on my internal SD card, then try to move them to my external SD card using root browser, of file manager HD. It looks as though the files move, but when I unmount the card, and remount, or just reboot the tablet, the files are no longer there. Maybe I am doing something wrong, just looking for some good advice.
Thanks everyone for making this tf101 awesome again!!
I would try manually from adb or console to see if you get any errors which file managers can silently suppress.
I don't have the device with me right now so I can't give you the exact path to use, but something like:
cp -a /sdcard/Music/file-or-directory* /mnt/storage/2
the paths are wrong of course, I really can't remember where they're mounted. I'll update the post when I get home unless someone can give the proper paths before then. Using cp will tell you if there's errors.
I would also try to copy files to the card on a computer, to see if you can replicate the problem there. It could just be a dying card or a messed up filesystem on it.
Lethe6 said:
I would try manually from adb or console to see if you get any errors which file managers can silently suppress.
I don't have the device with me right now so I can't give you the exact path to use, but something like:
cp -a /sdcard/Music/file-or-directory* /mnt/storage/2
the paths are wrong of course, I really can't remember where they're mounted. I'll update the post when I get home unless someone can give the proper paths before then. Using cp will tell you if there's errors.
I would also try to copy files to the card on a computer, to see if you can replicate the problem there. It could just be a dying card or a messed up filesystem on it.
Click to expand...
Click to collapse
Thanks for the reply. I may be doing something wrong i don't know. The card is brand new, and i did the FAT32 long format. The same thing happens to me when i use a USB adapter in the main connector and try to move music from my tablet to a USB drive. It looks like it moves, but as soon as I unmount, and re-mount, no files are there. I am formatting my SD and USB drives on a windows 8 laptop. I have read where some people have luck formatting NTFS, but my laptop won't even let me format my USB drive that way.
I appreciate your effort. I am sure we can get this resolved some how. Just gotta keep messin' with it.
troyvs
Is it the dock sdcard or the tablet's?
The exact command to test a copy would be (for the tablet's external sdcard):
cp -av /storage/sdcard0/file.name /storage/sdcard1/
I'm running 021 and this worked for me. The command should return something like:
/storage/sdcard0/file.name -> /storage/sdcard1/file.name
and get you back to a shell if it works. Otherwise paste the message it gives you.
If the devices work elsewhere and you're sure it's the tablet, try wiping cache and dalvik... I've seen it cause weirder issues. You could also try to do a full backup in recovery and then do a full wipe, and reflash katkiss. If it works you know it's something with the old rom, and if it doesn't you can restore the backup.
troyvs said:
Thanks for the reply. I may be doing something wrong i don't know. The card is brand new, and i did the FAT32 long format. The same thing happens to me when i use a USB adapter in the main connector and try to move music from my tablet to a USB drive. It looks like it moves, but as soon as I unmount, and re-mount, no files are there. I am formatting my SD and USB drives on a windows 8 laptop. I have read where some people have luck formatting NTFS, but my laptop won't even let me format my USB drive that way.
I appreciate your effort. I am sure we can get this resolved some how. Just gotta keep messin' with it.
troyvs
Click to expand...
Click to collapse
I have moved files from the internal SD (photographs actually as there was no option to save them anywhere else only the internal SD) to the micro SD card using the X-plore app and the ES file manager app with no problems. I did however learn that both sd cards e.g. the internal and external are just called sd card and the internal sd card is shown under Device and under Storage so it is possible to cut and paste from the Internal sd card back into the Internal sd card.
I am assuming you are referring to the sd card on the tablet and not the sd card in the dock.

How can I format SD card that was formatted as internal SD in android 6.0?

Dear Friends,
I need your help, my Redmi Note 3 pro is dead and the 64GB sd card was formatted as internal storage and that means it canoot be used in other device, I cannot format it is regular whey- is there a way to remove the android protection?
all the filles are there- just cant delete/format or add files.
Xperia-Ray said:
Dear Friends,
I need your help, my Redmi Note 3 pro is dead and the 64GB sd card was formatted as internal storage and that means it canoot be used in other device, I cannot format it is regular whey- is there a way to remove the android protection?
all the filles are there- just cant delete/format or add files.
Click to expand...
Click to collapse
So you can't delete the files? Do a live boot of linux and see if it shows up.
sd card
ive just formated my sd card to ext4 partation for android 6.0 with KDE partation manager in linux mint and the sd card works fine on my phone so maybe try that hope it helps.
also if u cant delete files it more than likley because of permissions so ude need to chmod the permissions on the media device as such so bring up a terminal in linux or u could try terminal emulaitor and cd to the directory of ur storage usually something like /media/username/devicename in linux and the directory for ur phone may be different but u can bring its directory up with any file manager anyway once that is done su to root then once cd to directory or sub directory of mount point chmod 777 -r or chmod -r 777 for recursive and press enter if formating as root in linux dosent work. hope it helps
Or you can start a live cd version of gparted and wipe the whole thing and let it mount and let the device you want to use it on create the partitions itself. That's what I'd do.

Categories

Resources