So, CWM saves its backups and blob directory in /mnt/shell/emulated which is not accessible via MTP. I've started using TWRP for all my new backups but I would like to copy the existing CWM backups to my PC before wiping the directory on my phone. It's currently using 8-9 GB. However, when I try to move the directory from /mnt/shell/emulated to a directory in a directory in /sdcard, the move operation ends instantly and nothing is copied. I'm wondering if the problem is that I don't have enough free space. I've got about 2.5 GB free.
EDIT: It appears that you need to have enough space to copy the entire directory before deleting it. The phone ran out of space halfway through a file copy using ES File Explorer. I guess that's why Root Explorer won't allow the move to begin.
Use adb to pull the directory to your computer, adb pull /mnt/shell/emulated
I would like to do this as well like I used to do with older versions of CWM on my Gnex. Then it was as easy as moving the large backup file found in /sdcard/clockworkmod/ folder.
I just tried that adb pull command mentioned in the post above and this starts to copy the entire contents of my phone to some unknown source on my PC (I can't find where?).
How would one go about simply backing up a CWM nandroid restore file onto a PC?
dralways said:
I just tried that adb pull command mentioned in the post above and this starts to copy the entire contents of my phone to some unknown source on my PC (I can't find where?).
Click to expand...
Click to collapse
It copies to the directory that you ran the adb command from, so if you run abd from c:\windows\apps\adb it'll copy the files there
peachpuff said:
Use adb to pull the directory to your computer, adb pull /mnt/shell/emulated
Click to expand...
Click to collapse
Thanks for the help. I don't know why I didn't think to do that myself.
Create a folder on your computer and open the command prompt from that directory. And then run adb pull /mnt/shell/emulated/clockworkmod/backup
This way only the backups will be copied to your pc, not the whole storage.
cmd prompt not working
dushan90 said:
Create a folder on your computer and open the command prompt from that directory. And then run adb pull /mnt/shell/emulated/clockworkmod/backup
This way only the backups will be copied to your pc, not the whole storage.
Click to expand...
Click to collapse
Hi, I just ran into this issue also. I tried the cmd prompt but it doesn't pull anything. It says 'adb' is not recognized as an internal or external command, operable program or batch file.
Any help would be greatly appreciated, I know it's been a while since the last post but thank you.
SlickJamesBtch said:
Hi, I just ran into this issue also. I tried the cmd prompt but it doesn't pull anything. It says 'adb' is not recognized as an internal or external command, operable program or batch file.
Any help would be greatly appreciated, I know it's been a while since the last post but thank you.
Click to expand...
Click to collapse
>Go to your android sdk folder/platform-tools.
>r.click an empty space while holding down the shift.
>Select Open Command Window here
>then run the adb command
This should work
dushan90 said:
Create a folder on your computer and open the command prompt from that directory. And then run adb pull /mnt/shell/emulated/clockworkmod/backup
This way only the backups will be copied to your pc, not the whole storage.
Click to expand...
Click to collapse
how if I want to put it back into CWM? is there any specific way to do that? or I just have to copy and paste the data to the "/mnt/shell/emulated/clockworkmod/backup" directory.
Haven't you tried this?
Related
I am rooted but just on the Stock ROM. How can I copy a file in the data\app-private dir to my PC. I have paid for apps but cannot get them from the market. I want to have a backup of this is case I have to reset the phone again.
I tried the cp command but it did not work. I am also not using APP2SD.
I have had good luck using app "Root Explorer"... seems to do the job of moving and copying that folder.
(I am on Modco using App2sd)
You can run a command on your PC while your phone is connected
Code:
C:\>adb pull {location on the phone} {location on your pc}
dailypush said:
I have had good luck using app "Root Explorer"... seems to do the job of moving and copying that folder.
(I am on Modco using App2sd)
Click to expand...
Click to collapse
This worked great to copy them to my sd card, can you also use this to add apps back like Sprint and HTC apps and widgets.
dagnasty said:
You can run a command on your PC while your phone is connected
Code:
C:\>adb pull {location on the phone} {location on your pc}
Click to expand...
Click to collapse
I tried this from the C:\> and got adb was not recognized
I tried from the android/tools and got the same error and tried from insdie the phone. No luck moving files from the CMD prompts. I am not sure where to go from here.
My bad, I added the path to the SDK to my 'path' system variables. It should work if you are in the tools directory of the sdk.
It says pull is not recognized as an internal or external command is what it says when I do pull in the Android/tools dir
Here is what I typed
pull /system/app/Stock.apk C:\
or
pull /system/app/Stock.apk/ C:\
neither work
So I deleted a few apps and am curious as to how I go about restoring them to the phone if I say, deleted them by accident. I made a backup of all of the apps on my pc in the SDK Tools subdirectory so they are all there. Also, will installing an .odex file be the same as an .apk file? Do I need to restore the .odex files or will they automatically be rebuilt?
How did you perform this backup? With adb? Then it will be easy to put the apps back. You should just be able to use adb with the install command. Just type in adb at the command prompt and read the help instructons for install. Not sure if the install command takes care of the .odex files. You could try it and then copy them over manually if they dont get copied. I am sure once you boot the phone the default .odex will be built, just a quess on that though.
anika200 said:
How did you perform this backup? With adb? Then it will be easy to put the apps back. You should just be able to use adb with the install command. Just type in adb at the command prompt and read the help instructons for install. Not sure if the install command takes care of the .odex files. You could try it and then copy them over manually if they dont get copied. I am sure once you boot the phone the default .odex will be built, just a quess on that though.
Click to expand...
Click to collapse
I would think that pushing the files back to the original location from recovery would be the safest bet. ADB install will install it to /data and I would think that the apps being system apps originally then they don't have the signatures anyway to allow an ADB install.
I think you're right
I believe I originally used ADB to put them in Android SDK Tools/Desktop/~ folder. When I tried installing them back I don't believe it worked. I specifically remember receiving an error when trying to install the .odex file about a database issue. Assuming it's a system file I'm trying to restore, does someone have the syntax for the push command or how I go about doing that?
If you have the .apk and .odex files on your computer, or really backed up anywhere, you can install them a few ways:
ADB Method
#Prerequisites:
Make sure you have the APK files in AndroidSDK/tools.
1. Connect the phone to your computer
2. Launch a command prompt and enter the following commands:
cd C:\AndroidSDK\tools
Replace "C:\AndroidSDK\tools" with the path to the tools folder in your SDK installation.
adb install filename.apk
Replace "filename.apk" with the name of the file you're trying to install.
Actually, **** it, the ADB method works anyway, why list a bunch lol
No wait, these are original files so you should probably put them back in their original location.
Just use "adb push filename.apk /system/app", replacing filename.apk with your filename, of course..
Push it
Okay, thanks for the tips. So I guess when you have files in the system/app directory on the phone it knows automatically to look there for program installs. This is good to know.
I did a few things the other day in SDK, messing around with emulators. Now I can't get adb to work.
I keep getting this:
c:\AndroidSDK>adb
'adb' is not recognized as an internal or external command,
operable program or batch file.
This is the exact path I had used in the past, even following the .txt instructions that have worked for me in the past.
Yes in am in debugging, charge only, partition mount showing "unmount /system" like it has in the past. Does this have anything to do with what packages I updated when I was messing with SDK emulator?
duckredbeard said:
I did a few things the other day in SDK, messing around with emulators. Now I can't get adb to work.
I keep getting this:
c:\AndroidSDK>adb
'adb' is not recognized as an internal or external command,
operable program or batch file.
This is the exact path I had used in the past, even following the .txt instructions that have worked for me in the past.
Yes in am in debugging, charge only, partition mount showing "unmount /system" like it has in the past. Does this have anything to do with what packages I updated when I was messing with SDK emulator?
Click to expand...
Click to collapse
Go into the directory and see if there is a file called adb in there...if it's not check the other folders like tools or something like that i'm at work so i don't know the exact name of the directories...
duckredbeard said:
I did a few things the other day in SDK, messing around with emulators. Now I can't get adb to work.
I keep getting this:
c:\AndroidSDK>adb
'adb' is not recognized as an internal or external command,
operable program or batch file.
Click to expand...
Click to collapse
This is a PC error message stating that the file adb.exe is no longer in the AndroidSDK directory. As zervic mentioned, check and see if the file adb.exe is in that directory.
We're onto something...there is no adb in the AndroidSDK folder. So where do I get this adb? I did the SDK so long ago, like 5 months. Don't remember a thing about it and consider myself lucky that I got it going back then, piecing together youtube videos and several forums.
duckredbeard said:
We're onto something...there is no adb in the AndroidSDK folder. So where do I get this adb? I did the SDK so long ago, like 5 months. Don't remember a thing about it and consider myself lucky that I got it going back then, piecing together youtube videos and several forums.
Click to expand...
Click to collapse
Just reinstall (or unzip if I remember right) the Android SDK into that directory
I started the "update all" in the "installed packages" window. If that doesn't fix it, I shall follow your advice.
Edit: The "update all" didn't fix it.
I found the .zip and extracted it to my c:\AndroidSDK folder, but still a nogo. I also tried copying adb.exe straight to the AndroidSDK folder, still a nogo.
Anything else to try?
When I copied adb.exe to the tools folder and tried adb in cmd prompt, I got "This application has failed to start because AdbWinApi.dll was not found. Re-installing the application may fix this problem"
Are they telling me to uninstall SDK and start over? Like I said, I was lucky to get it going the first time!
Smack myself in the head while I Edit: Found the AdbWinApi.dll in the zip and copied it to the tools folder. Adb runs now and recognizes my device. Later I will find out if I can rm some stock apps from my wife's new phone.
Thanks for your help in this matter.
duckredbeard said:
I found the .zip and extracted it to my c:\AndroidSDK folder, but still a nogo. I also tried copying adb.exe straight to the AndroidSDK folder, still a nogo.
Anything else to try?
When I copied adb.exe to the tools folder and tried adb in cmd prompt, I got "This application has failed to start because AdbWinApi.dll was not found. Re-installing the application may fix this problem"
Are they telling me to uninstall SDK and start over? Like I said, I was lucky to get it going the first time!
Smack myself in the head while I Edit: Found the AdbWinApi.dll in the zip and copied it to the tools folder. Adb runs now and recognizes my device. Later I will find out if I can rm some stock apps from my wife's new phone.
Thanks for your help in this matter.
Click to expand...
Click to collapse
Just so you know that may be a little unstable. It may be worth your while to check the "platform-tools" folder and see if adb is in there, i believe that's where it is by default and it also may be worth your while to run adb from that folder instead of where you jerry rigged it to run. But, on the other hand, it may work the way you have it. You never know. Just figured I'd throw that out there.
While rooting my Nook Color, I came across a recommendation for a free app in the market called adbWireless.
It's AWESOME! No need to use USB or worry about drivers, just install the app, push the big huge button and then type the adb command it shows you to connect to your device. Worked absolutely perfectly on my Nook... haven't tried it on my Aria, but next time I need to ADB something on it, you can bet I will!
did anyone check their tools directory?
ie: C:\android-sdk-windows\tools
LOL
so i had a thread about getting these files pulled off of my buddies busted n4. but the adb command given wouldnt work and i didnt figure out how to make a tarball untill after i pulled the files. anyways...
i managed to pull the nandroid using this command - adb pull /sdcard/clockworkmod/backup/2013-08-07.23.11.28/.
what i ended up with were all of the files separately on my pc.
so if i put all of the files back into its own folder with the same name on my pc, what would be the command to push it back onto the new phone that i am about to root. using cwm.
assuming i kept the folder in platform tools. C:\androiddev\sdk\platform-tools
and do i need to create directory in the phone first? .../clockworkmod/backup/2013-08-07.23.11.28
it seems like i remember these commands, or at least i could figure it out by the commands listed, in one of the original root unlock stickies. but they seem to have been replaced with one click dealios. i need to start using adb for all of my flashing and such just so i can stop looking like an idiot for not knowing the simple stuff. in other words i would experiment and figure it out.... but i am afraid that i will just litter his phone with files and still end up coming back here.
thank you.
A quick guide to the adb pull and adb push commands:
Code:
adb pull <remote> <local>
adb push <local> <remote>
Remote being folder location on phone, local being folder location on computer.
So the correct command to pull the backup and put it into a folder under platform-tools (let's use the folder name you are using) would be this:
Code:
adb pull /sdcard/clockworkmod/backup/2013-08-07.23.11.28/ 2013-08-07.23.11.28
All you have to do to put it into it's own folder is put a space after the remote location and type whatever name you want the folder to be.
Now on to your current question. You said you pulled the files onto the computer, but they weren't in their own folder. I would put them into their own folder (we'll use 2013-08-07.23.11.28 for now) and push the contents of that folder to a folder on your phone, that we will also call 2013-08-07.23.11.28 under the backup location (If you want to make sure you have only the files contained in the backup, try re-pulling them using the above pull command. If you're pretty sure you know which ones it pulled, I wouldn't worry about it). Try this:
Code:
adb push 2013-08-07.23.11.28 /mnt/shell/emulated/clockworkmod/backup/2013-08-07.23.11.28/
That'll push the contents of folder 2013-08-07.23.11.28 under platform-tools and put them in a folder called 2013-08-07.23.11.28 under /backup/. If it doesn't exist, it'll create the folder. Now you pulled the backups by using /sdcard/, I didn't know you could just do that, so I guess you could try pushing using that too:
Code:
adb push 2013-08-07.23.11.28 /sdcard/clockworkmod/backup/2013-08-07.23.11.28/
I'm pretty sure those should do the trick. Let me know if that helped.
Johmama said:
A quick guide to the adb pull and adb push commands:
Code:
adb pull <remote> <local>
adb push <local> <remote>
Remote being folder location on phone, local being folder location on computer.
So the correct command to pull the backup and put it into a folder under platform-tools (let's use the folder name you are using) would be this:
Code:
adb pull /sdcard/clockworkmod/backup/2013-08-07.23.11.28/ 2013-08-07.23.11.28
All you have to do to put it into it's own folder is put a space after the remote location and type whatever name you want the folder to be.
Now on to your current question. You said you pulled the files onto the computer, but they weren't in their own folder. I would put them into their own folder (we'll use 2013-08-07.23.11.28 for now) and push the contents of that folder to a folder on your phone, that we will also call 2013-08-07.23.11.28 under the backup location (If you want to make sure you have only the files contained in the backup, try re-pulling them using the above pull command. If you're pretty sure you know which ones it pulled, I wouldn't worry about it). Try this:
Code:
adb push 2013-08-07.23.11.28 /mnt/shell/emulated/clockworkmod/backup/2013-08-07.23.11.28/
That'll push the contents of folder 2013-08-07.23.11.28 under platform-tools and put them in a folder called 2013-08-07.23.11.28 under /backup/. If it doesn't exist, it'll create the folder. Now you pulled the backups by using /sdcard/, I didn't know you could just do that, so I guess you could try pushing using that too:
Code:
adb push 2013-08-07.23.11.28 /sdcard/clockworkmod/backup/2013-08-07.23.11.28/
I'm pretty sure those should do the trick. Let me know if that helped.
Click to expand...
Click to collapse
thanks a ton. it worked. i tried the first option. rebooted recovery. and it could not find the files. i rebooted the phone. and then went back into recovery. the files still were not there.
so then i did the second option. with the sdcard. it worked like a charm. his phone is back to aug 7th. and didnt lose a thing... other than the last four days of his new data.
phermey said:
thanks a ton. it worked. i tried the first option. rebooted recovery. and it could not find the files. i rebooted the phone. and then went back into recovery. the files still were not there.
so then i did the second option. with the sdcard. it worked like a charm. his phone is back to aug 7th. and didnt lose a thing... other than the last four days of his new data.
Click to expand...
Click to collapse
Well that's odd, I'm the exact opposite, I can't see the files in /sdcard/, only the path through /mnt/. I'm not too familiar with how the Nexus 4 handles the emulated sdcard, I just never had the reason to explore it.
Actually, I think the difference between where our recoveries saw the backups is because of a version difference. CWM has changed their backup location in the past, and I'm sure you are using a version that is looking for backups in the /sdcard/ directory, while mine was looking for them through /mnt/.
EDIT:
Oh btw, you might advise your friend to download a file explorer app (I use ES File Explorer) and erase those backups that he didn't use in the /mnt/ folder. I'm sure they are still there taking up space on his phone. You may or may not need root to see the correct folder though.
Hi All,
I am in the process of trying to root and install a custom rom on my Nexus 4 4.4.2. I am a new linux user (Linux Mint 16) and my rooting experience is limited. When I try to do an "abd pull /sdcard/ /sdcard/" this is what it says
adb pull /sdcard/ /sdcard/
pull: building file list...
pull: /sdcard/Android/data/com.google.android.gallery3d/cache/imgcache.1 -> /sdcard/Android/data/com.google.android.gallery3d/cache/imgcache.1
cannot create '/sdcard/Android/data/com.google.android.gallery3d/cache/imgcache.1': No such file or directory
I was able to successfully do an abd backup...
USB debugging is enabled.
I get the same error whether the phone is connected as a Media device (MTP) or Camera (PTP).
any reason why the pull command wont work?
Any help is appreciated!
smokewagon said:
Hi All,
I am in the process of trying to root and install a custom rom on my Nexus 4 4.4.2. I am a new linux user (Linux Mint 16) and my rooting experience is limited. When I try to do an "abd pull /sdcard/ /sdcard/" this is what it says
adb pull /sdcard/ /sdcard/
pull: building file list...
pull: /sdcard/Android/data/com.google.android.gallery3d/cache/imgcache.1 -> /sdcard/Android/data/com.google.android.gallery3d/cache/imgcache.1
cannot create '/sdcard/Android/data/com.google.android.gallery3d/cache/imgcache.1': No such file or directory
I was able to successfully do an abd backup...
USB debugging is enabled.
I get the same error whether the phone is connected as a Media device (MTP) or Camera (PTP).
any reason why the pull command wont work?
Any help is appreciated!
Click to expand...
Click to collapse
Maybe this will help?
http://www.herongyang.com/Android/adb-push-and-pull-Command.html
Not a big fan of the CLI.
Sent from my Nexus 7 (2013)
Your problem (almost certainly) is that you don't have a /sdcard directory (folder) on your computer unless you created one (there certainly is no default /sdcard in a linux desktop system).
I also don't know how you installed ADB on your computer.
(This should work, otherwise I'll have to change what I wrote below).
Try this:
$ cd ~/Desktop
(This changes you to your desktop directory, if you are not already there)
$ mkdir sdcard
(this will make a new directory called "sdcard" on your desktop, you should see it pop up on your desktop)
$ adb pull /sdcard/ ~/Desktop/sdcard
(should pull the contents of /sdcard from your phone and put them in your newly created directory on your desktop: ~/Desktop/sdcard)
BAM
A little extra basic info for you, and welcome to linux. Soon you have the power to take over the world (ha ha ha... no, actually I'm not kidding at all).
As a basic rule, you should pretty much always be working inside of your home directory, for dealing with your personal files. Your home directory is /home/yourname. On my computers, my home is /home/kirk. My wife's home directory is /home/amy.
"~" is a shortcut for the home directory, for whomever is logged in at that moment.
If you wanted something that is on your desktop, it would be in the directory: /home/yourname/Desktop (~/Desktop). If you wanted to use your documents directory, it is : /home/yourname/Documents(~/Documents).
/home/yourname is where you usually where want to do your stuff.
"/" is the very root directory of the whole system, so you would be better off not creating and doing things like making directories like "/sdcard". That's a bad move. Leave root for system files. Not that you are necessarily going to destroy something by creating a /sdcard directory. But it'll cause you a few hassles.
So, use /home/yourname/sdcard (~/sdcard). Or if you want it on your desktop, (like I did above) use /home/yourname/Desktop/sdcard (~/Desktop/sdcard). Doing things inside of /home/yourname(~) means that you are the owner of that folder and everything in it, not root.
Otherwise you will just be causing headaches for yourself and having to grant yourself root permissions to work with those files (hassle). There's no good reason to do that to yourself. And if you did give yourself root permissions, and screwed up other stuff in the root directory like in: /etc or /dev or /bin, then you will REALLY be irritated.
Stick to your home for your personal files. /home/yourname (~)
Leave "/" or the "root" directory for system files.
You could check my little bash program for adb for Linux too. It's a program to be used in the terminal and it'll pull data off the sdcard etc. You can find it here
Sent from my Nexus 4 running Android 4.4
Thank you all for the help, I'll let you know how it goes.
Do I need drivers for my nexus 4 to work with Linux?
Sent from my Nexus 4 using Tapatalk
smokewagon said:
Thank you all for the help, I'll let you know how it goes.
Do I need drivers for my nexus 4 to work with Linux?
Sent from my Nexus 4 using Tapatalk
Click to expand...
Click to collapse
Try it without any installation of drivers just install adb tools and try the command line or my little tool. If it's not working, check the guides how to set up the usb-rules for adb
Sent from my Nexus 4 running Android 4.4
Thanks, will do.
Sent from my Nexus 4 using Tapatalk
iowabeakster said:
Try this:
$ cd ~/Desktop
(This changes you to your desktop directory, if you are not already there)
$ mkdir sdcard
(this will make a new directory called "sdcard" on your desktop, you should see it pop up on your desktop)
$ adb pull /sdcard/ ~/Desktop/sdcard
(should pull the contents of /sdcard from your phone and put them in your newly created directory on your desktop: ~/Desktop/sdcard)
BAM
Click to expand...
Click to collapse
BAM INDEED! It worked! I am pulling the contents now. Thanks a ton, and thanks for the other basic linux info, I will put it to good use.
Any other tips on using Linux to root android?
Shooooot....
So after the pull command finished, i opened the sdcard directory I created on my desktop, and it was empty....the pull command said this when it was done...
1733 files pulled. 0 files skipped.
2129 KB/s (995292697 bytes in 456.480s)
Any ideas?
Ok, I played with some settings and got it to work, though I don't know why it worked.
USB Debugged is enabled.
The first time I tried to 'pull' i had my USB computer connection set to "Camera (PTP)" - it didn't work.
I tried again changing the USB computer connection to "Media device (MTP)" - it didn't work.
I changed it back to "Camera (PTP)" and my computer recognized it in a different way than the first time (a dialog box popped up asking me what I wanted to do with the pictures that were on the device I had connected, this didn't happen the first time).
I am glad the pull command finally worked, I just wish I knew why.
I guess it's a tough road being a linux NOOB and a (near) Android NOOB. It's good to learn something new and keep my brain young.