Please help a beginner understand ADB - Nexus 7 Q&A, Help & Troubleshooting

I am quite proud to have got as far as I have (please see screenshot).
However, I am trying to adb pull my nandroid backup from TWRP onto my PC. I've searched all over the place for the right commands but whatever I type, I get a "could not find" message.
Could someone please let me know what to type to adb pull the nandroid backup onto my PC please?
Also, when I have reformatted my Nexus 7, what do I need to do to adb push the nandroid backup back onto my sdcard?
Many thanks in advance!

It should be in your /data/media/0/TWRP/BACKUPS/015d4172c98600219/ directory to c:/users/a/desktop.

Username invalid said:
It should be in your /data/media/0/TWRP/BACKUPS/015d4172c98600219/ directory to c:/users/a/desktop.
Click to expand...
Click to collapse
Thanks! I have been at it all day! I've finally managed to adb pull my nandroid backup and my TBU. I now want to sideload them to make sure I can do everything before I reformat my N7. When I enter: adb sideload 015d172c98600219, I get a "cannot read message". What is it that I should be entering?

You can not sideload a nandroid backup. You need to push it to your TWRP directory.

Username invalid said:
You can not sideload a nandroid backup. You need to push it to your TWRP directory.
Click to expand...
Click to collapse
Ah ok, good to know! So it's "adb push /015d4172c98600219/data/media/0/TWRP/BACKUPS/"?

Example
Code:
adb push c:/users/a/desktop/2013-07-29--11-07-31 /sdcard/TWRP/BACKUPS/015d4172c98600219/2013-07-29--11-07-31

Username invalid said:
Example
Code:
adb push c:/users/a/desktop/2013-07-29--11-07-31 /sdcard/TWRP/BACKUPS/015d4172c98600219/2013-07-29--11-07-31
Click to expand...
Click to collapse
Thanks very much for this. I guess adb is not for me.
This is where I am (screenshots). No matter what code I try nothing happens. I just see a set of instruction run quickly on the screen and then I'm back to square one.
Do I need to do something about the device itself, in "mount" perhaps?
Sorry to be a pain! Don't worry if you don't have the time!

StrangerWeather said:
Thanks very much for this. I guess adb is not for me.
This is where I am (screenshots). No matter what code I try nothing happens. I just see a set of instruction run quickly on the screen and then I'm back to square one.
Do I need to do something about the device itself, in "mount" perhaps?
Sorry to be a pain! Don't worry if you don't have the time!
Click to expand...
Click to collapse
Make a temporary backup so it will create the directory. You should still have your system image after the format so have you tried booting up then copying through My Computer?

Well I haven't reformatted yet because I wanted to make sure I mastered the adb method before I wiped everything. But now I don't know whether I should format at all. Sounds a bit risky if I don't have a rom to go back to!
Sent from my Nexus 7 using xda premium

It's strange, though, that I can successfully adb pull files but not adb push them back. Does anybody have a clue?

Your ROM will still be there after formatting. If is not, just reflash it with fastboot or sideload.
Also, you can't have spaces in the command.

Related

help trying to nand restore

i get the error : run'nandroid-mobile.sh restore' via adb i tried putting in commands but i dont know what to do please help asap
Did you rename it?
my dir is C:\android-sdk-windows\tools\adb
what should i type in command prompt
nothing? You're trying to restore a nand so restart in recovery and go to nandroid and restore...
If you've changed the name of your nandroid file make sure it has nothing but numbers and/or letters
Palmbxr said:
my dir is C:\android-sdk-windows\tools\adb
what should i type in command prompt
Click to expand...
Click to collapse
plug in and run adb devices and see what pops up
then try to restore from amon-ra again
in not just use that command in adb
i didnt change anything or rename it its exactly how it came when i did a nand+ext backup, whenever i try to flash it i get that error" run 'nandroid-mobile.sh restore' via adb!"
DS36 said:
plug in and run adb devices and see what pops up
then try to restore from amon-ra again
in not just use that command in adb
Click to expand...
Click to collapse
C:\Users\Kyle>C:\android-sdk-windows\tools\adb devices
List of devices attached
HT9AZHG26799 recovery
C:\Users\Kyle>
any ideas im still stuck here... :\
Is your ext partition still there and the same size as when ya backed up? I had a similar problem flashing a nand + ext after modifying my ext partition.
Sent from my FroyoEris using Tapatalk
adaneshade said:
Is your ext partition still there and the same size as when ya backed up? I had a similar problem flashing a nand + ext after modifying my ext partition.
Sent from my FroyoEris using Tapatalk
Click to expand...
Click to collapse
exactly the problem, good thing i restored it to my pc before thanks
I don't know if you have already resolved this issue or not but the same thing happened to me.
Turn off your phone. Plug it into the computer. Open your command promt. Navigate into your tools directory of the android SDK. Enter either adb "command it tells you to enter," or ./adb "command it tells you to enter." Now boot into the recovery and try your Nand restore again. It should work. That's all I did to fix the problem. Lemme know.

Please help: How do u put files on the SD with CWM?.

Ok..
I cleared delvik cache.. battery and decided to try out a new kernel.. now it hangs..
Now I only have an 8 gig.. I guess i cleared out the backup to save space because as I went to look for it, it was gone. Now I cant get any roms on the phone to reflash.. and i deleted the ROMs on there...
How do I get a rom on the phone to reflash it. Any help would be greatly appreciated.
Thanks
Chris
Bump
Can anybody help with this? Basically is there a way to get files on the phone in recovery mode?
I'm sort of new... I see the side load but not sure how to use it. Says load the files on once activated but not sure how the relates to the computer. Or where I put the commands to do it. Thanks.
Chris
Sent from my SGH-I747 using xda app-developers app
You are running a custom recovery right?
You can use adb to push files when booted into a custom recovery.
The command used would be
Code:
adb push nameofzip /storage/emulated/0
To read more on adb check out efrants sicky http://forum.xda-developers.com/showthread.php?t=2010338 adb commands are about half way down on the OP.
When u say custom recovery do u mean CWM? I do have that... and my computer registers the phone when I plug it in. But nothing pops up. I don't think USB debugging is on...
I'll check out the link.
Sent from my SGH-I747 using xda app-developers app
Yep, that is a custom recovery. If you have questions post them here. I'll be around for a little while.
I think I am so close.
I got the adb and fastboot files, and upon checking devices in fastboot, it does say that my device is connected.
But I cant get the adb driver to put the files on my phone.
Im using "adb push -d C:\android1\cm-10.1-20121214-NIGHTLY-mako.zip
And it says device not found?
Sorry for the questions, but thank you for the help.
Chris
(and im in the directory where the adb file is located)
(Once I get this resolved... im always gonna have one backup on my phone)
wizshaw said:
I think I am so close.
I got the adb and fastboot files, and upon checking devices in fastboot, it does say that my device is connected.
But I cant get the adb driver to put the files on my phone.
Im using "adb push -d C:\android1\cm-10.1-20121214-NIGHTLY-mako.zip
And it says device not found?
Sorry for the questions, but thank you for the help.
Chris
(and im in the directory where the adb file is located)
(Once I get this resolved... im always gonna have one backup on my phone)
Click to expand...
Click to collapse
Ok. The best way is to open the command prompt from the folder in which you have adb. The easy way to do that is hold down shift and right click. Then choose open window here.
Next, once you are booted into recovery type
Code:
adb devcies
If it returns a number then proceed to push the file. (Its easy to make a typo so change the file to something easy like cm10.zip)
So you would type
Code:
adb push cm10.zip /storage/emulated/0
I erased everything the other day by mistake and total noobishness Lol. I just used wugs tool kit to flash the stock image back. Might be useful if struggling with adb etc.
Sent from my Nexus 4
slymobi said:
I erased everything the other day by mistake and total noobishness Lol. I just used wugs tool kit to flash the stock image back. Might be useful if struggling with adb etc.
Sent from my Nexus 4
Click to expand...
Click to collapse
What is anyone going to learn by using a toolkit?! I commend the OP for putting in the time to learn how to use adb. So in the future if they were to run into a problem they would know how to easily fix it.
Sent from my Nexus 4
I got it guys.
I realized that fastboot and adb only get activated in their respective UI's... And i refined my CMD commands a bit after a little more reading.
Problem solved. And i learned more about the android platform in the process. Time well spent.
I want to formally thank you guys. This is why this community is great.
Chris

Stuck on "Android is Updating, Apps is starting"

Hey Everyone,
So last night randomly while texting my phone reboots and is now stuck in "Android is Updating screen, Apps is starting" with the swirl icon swirling forever [waited over 15 min]. It keeps doing this and now I assume some file somehow got corrupt?
I'm on 4.2.2, stock rom, franco kernel. I've tried fixing permissions, wiping cache/dvalik and nothing has helped thus far. Only thing I can see is a complete wipe? Nandroid backup is not possible atm. Is there a way to pull all my pictures and files from recovery only?
Are there any other suggestions before I go that route?
Thanks,
Jonathan
Boot into recovery and use adb to pull all the contents of your SD card like this:
Code:
adb pull /sdcard/
Then do a full wipe and flash a ROM.
chromium96 said:
Boot into recovery and use adb to pull all the contents of your SD card like this:
Code:
adb pull /sdcard/
Then do a full wipe and flash a ROM.
Click to expand...
Click to collapse
Just had a question, how do I set where ADB pulls the files?
impruv said:
Just had a question, how do I set where ADB pulls the files?
Click to expand...
Click to collapse
Code:
adb pull \path\of\your\choice /sdcard/
i had the exact thing happen to me in january, something corrupted and it wouldnt finish booting. nandroid restore and wiping/flashing didnt help, i had to flash the factory img to get up and running, then i restored a nandroid backup. did you have fsync disabled?
chromium96 said:
Code:
adb pull \path\of\your\choice /sdcard/
Click to expand...
Click to collapse
Hmmm weird, it says my "remote object '\D:\nexuspull' does not exist" and I'm positive that's the correct path
impruv said:
Hmmm weird, it says my "remote object '\D:\nexuspull' does not exist" and I'm positive that's the correct path
Click to expand...
Click to collapse
Sorry I screwed up the command. It should be like this:
Code:
adb pull /sdcard/ D:\nexuspull
chromium96 said:
Sorry I screwed up the command. It should be like this:
Code:
adb pull /sdcard/ D:\nexuspull
Click to expand...
Click to collapse
Ah thank you. Works perfectly now!
chromium96 said:
Sorry I screwed up the command. It should be like this:
Code:
adb pull /sdcard/ D:\nexuspull
Click to expand...
Click to collapse
It seemed to have pulled MOST of the folders, but I have gone and manually done the rest. There is still one folder I can't pull because the folder name has spaces "Photo Grid". Can adb not deal with paths with spaces? I tried _ as a space but did not work.
impruv said:
It seemed to have pulled MOST of the folders, but I have gone and manually done the rest. There is still one folder I can't pull because the folder name has spaces "Photo Grid". Can adb not deal with paths with spaces? I tried _ as a space but did not work.
Click to expand...
Click to collapse
Have you tried putting the path is double quotes?

[Q] Broke Screen, Want to Backup files

Hi,
So today the front of my Nexus 4 cracked and rendered it completely dysfunctional. The worst part is that there's a screen lock, making it impossible for me to access through Android File Transfer. I was reading that you could use adb and screencast to access the phone and to unlock it, allowing for me to retrieve files. But after installing and running commands, it seemed like I couldn't find a device when I inputted the command 'adb devices'. I know, I searched it up and I think the reason is that usb debugging was not enabled (I don't remember if I did or didn't enable it at all). I've read past threads which explain how to enable it even with a cracked screen but I'm just too confused on how to do it. All this SDK and AVD stuff confuses the heck out of me (I'm fairly new to the whole Android notion) so I practically have the IQ of a 5 year old. My phone is rooted (In which it did wipe the memory so that may be why debugging could be off) and I'm currently flashing Cyanogenmod. Could someone please explain to me how do I enable debugging with a dysfunctional screen like I'm 5? Also, if there were an easier alternative to retrieving/backing up my files that would be nice knowing too because all of this stuff is currently doing my head in.
Thanks!
You can try to access adb from recovery too.
Turn off phone and start by holding VOL-DOWN and POWER together. You will boot into BOOTLOADER mode and there switch to RECOVERY MODE by VOLUME button (2 times press is this mode). If you have installed CyanogenMOD, then you have probably advanced recovery (CWM or TWRP). Now try command "adb devices".
If you haven't CWM or TWRP recovery installed, boot again into BOOTLOADER mode and flash recovery by fastboot.
xjcook said:
You can try to access adb from recovery too.
Turn off phone and start by holding VOL-DOWN and POWER together. You will boot into BOOTLOADER mode and there switch to RECOVERY MODE by VOLUME button (2 times press is this mode). If you have installed CyanogenMOD, then you have probably advanced recovery (CWM or TWRP). Now try command "adb devices".
If you haven't CWM or TWRP recovery installed, boot again into BOOTLOADER mode and flash recovery by fastboot.
Click to expand...
Click to collapse
Thanks for the quick reply,
After I hit advanced recovery and selecting my backup, which option do I press? Do I restore the boot, system, data, cache, or sd-ext?
Also typing in adb devices only lists the recovery device and I don't seem to be able to access it through Android File Transfer, what do I do with the serial number it tells me?
By the way I don't have any backups when I had no screen pattern so wouldn't recovering those areas still give get me locked out?
loolnicetry said:
Thanks for the quick reply,
After I hit advanced recovery and selecting my backup, which option do I press? Do I restore the boot, system, data, cache, or sd-ext?
Also typing in adb devices only lists the recovery device and I don't seem to be able to access it through Android File Transfer, what do I do with the serial number it tells me?
By the way I don't have any backups when I had no screen pattern so wouldn't recovering those areas still give get me locked out?
Click to expand...
Click to collapse
Android File Transfer is not working in recovery mode, but you can pull required files by "adb pull /sdcard/some-file-or-folder/ /to/some/path/on/your-system/". Of course you can pull whole /sdcard/. You can try also adb backup (I didn't try it yet). From recovery you can also make nandroid backup of the system and transfer to computer by adb pull.
In recovery mode you have access to full system (maybe you must mount some partitions), that means you can use magic command "adb shell", to get shell (in shell you can use "ls" for list files, "cd" for change directory) and do what you want. To remove screen lock try some guide from XDA, I've found for example [GUIDE][HOW-TO]Crack android pattern lock! or [EASIEST]Crack Android Pattern/Pin/Password Lockscreen without root.
I hope this will help you.
xjcook said:
Android File Transfer is not working in recovery mode, but you can pull required files by "adb pull /sdcard/some-file-or-folder/ /to/some/path/on/your-system/". Of course you can pull whole /sdcard/. You can try also adb backup (I didn't try it yet). From recovery you can also make nandroid backup of the system and transfer to computer by adb pull.
In recovery mode you have access to full system (maybe you must mount some partitions), that means you can use magic command "adb shell", to get shell (in shell you can use "ls" for list files, "cd" for change directory) and do what you want. To remove screen lock try some guide from XDA, I've found for example [GUIDE][HOW-TO]Crack android pattern lock! or [EASIEST]Crack Android Pattern/Pin/Password Lockscreen without root.
I hope this will help you.
Click to expand...
Click to collapse
I CANNOT THANK YOU ENOUGH! You were easy to understand and got straight to the point which was perfect! On a side note, do you know if there's a way I can extract and save my sms messages and read them on my computer? I know I can take out the .db file but it's complicated to open on a Mac and it's quite an effort. (Considering my phone still has a lock on it)
loolnicetry said:
I CANNOT THANK YOU ENOUGH! You were easy to understand and got straight to the point which was perfect! On a side note, do you know if there's a way I can extract and save my sms messages and read them on my computer? I know I can take out the .db file but it's complicated to open on a Mac and it's quite an effort. (Considering my phone still has a lock on it)
Click to expand...
Click to collapse
I'm really happy that I helped you!
Android is storing messages, contacts in SQLite database, there is not another way to grab these files from recovery. But it's not complicated to extract these files. Download for Mac OS X sqlite-shell-osx-x86-XXX.zip from SQLite Download Page and extract it somewhere.
Then pull messages by
Code:
cd /path/where/is/extracted-sqlite
adb pull /data/data/com.android.providers.telephony/databases/mmssms.db .
Finally you can list your messages by
Code:
./sqlite3 mmssms.db 'select address,body from sms'
If last command is not working try make it executable and repeat previous step
Code:
chmod +x sqlite3
xjcook said:
I'm really happy that I helped you!
Android is storing messages, contacts in SQLite database, there is not another way to grab these files from recovery. But it's not complicated to extract these files. Download for Mac OS X sqlite-shell-osx-x86-XXX.zip from and extract it somewhere.
Then pull messages by
Code:
cd /path/where/is/extracted-sqlite
adb pull /data/data/com.android.providers.telephony/databases/mmssms.db .
Finally you can list your messages by
Code:
./sqlite3 mmssms.db 'select address,body from sms'
If last command is not working try make it executable and repeat previous step
Code:
chmod +x sqlite3
Click to expand...
Click to collapse
For the pulling of the .db file, it says the remote object does not exist, what should I do?
loolnicetry said:
For the pulling of the .db file, it says the remote object does not exist, what should I do?
Click to expand...
Click to collapse
Hmm that is strange, maybe this will help you (especially check first answer): http://stackoverflow.com/questions/12266374/backup-full-sms-mms-contents-via-adb
Sent from my Nexus 4 using Tapatalk
xjcook said:
Hmm that is strange, maybe this will help you (especially check first answer):
Sent from my Nexus 4 using Tapatalk
Click to expand...
Click to collapse
When I try to enter the $mkdir command it says it's not found. Am I meant to include the $ in the command?
xjcook said:
Hmm that is strange, maybe this will help you (especially check first answer): http://stackoverflow.com/questions/12266374/backup-full-sms-mms-contents-via-adb
Sent from my Nexus 4 using Tapatalk
Click to expand...
Click to collapse
I FIXED IT MYSELF! I'm feeling a bit smart haha, it turns out my system and data wasn't mounted and all I had to do was mount it through cwm. Thanks a lot friend you were a great help, I'd be panicking a substantial amount without you!

Broke my screen, touch no longer works, want to back up

Hi everyone, I dropped my phone last night and the touch functionality is now finicky at best. Only a few very tiny spots respond to touch input. Anyway, I now want to back up my phone before I send it in for repairs just in case something happens. What is my best option for doing this? ADB won't work because I'm unable to enter the swipe pattern to unlock my device. My recovery is TWRP so I can't navigate it using the volume keys. I have no idea what I should do. Help?
Boot into recovery then use adb
Sent from my Nexus 5
jd1639 said:
Boot into recovery then use adb
Sent from my Nexus 5
Click to expand...
Click to collapse
You mean use adb backup? That requires me to unlock my phone, which is impossible.
Muniosi said:
You mean use adb backup? That requires me to unlock my phone, which is impossible.
Click to expand...
Click to collapse
just run the adb commands when you're in recovery. If you have usb debugging enabled you don't have to unlock your phone.
Sent from my Nexus 5
jd1639 said:
just run the adb commands when you're in recovery. If you have usb debugging enabled you don't have to unlock your phone.
Sent from my Nexus 5
Click to expand...
Click to collapse
I've already tried doing adb backup while in recovery, I just get Now unlock your device and confirm the backup operation. I can't back it up unless I unlock the phone, which I can't do.
Muniosi said:
I've already tried doing adb backup while in recovery, I just get Now unlock your device and confirm the backup operation. I can't back it up unless I unlock the phone, which I can't do.
Click to expand...
Click to collapse
Try using adb pull and pull your whole /sdcard. It'll take a long time but you'll get your stuff
Edit, you could also flash a non-touch cwm in fastboot, but using that for a backup won't backup pictures and stuff
Sent from my Nexus 5
jd1639 said:
Try using adb pull and pull your whole /sdcard. It'll take a long time but you'll get your stuff
Edit, you could also flash a non-touch cwm in fastboot, but using that for a backup won't backup pictures and stuff
Sent from my Nexus 5
Click to expand...
Click to collapse
Thanks, pulling sdcard now. What about app data? Would I just use CWM for that?
Muniosi said:
Thanks, pulling sdcard now. What about app data? Would I just use CWM for that?
Click to expand...
Click to collapse
You could make a nandroid with cwm, you'll want to adb pull that off too.
Edit you'll want to pull /mnt/shell/emulated/clockworkmod/backup.
Sent from my Nexus 5
jd1639 said:
You could make a nandroid with cwm, you'll want to adb pull that off too.
Edit you'll want to pull /mnt/shell/emulated/clockworkmod/backup.
Sent from my Nexus 5
Click to expand...
Click to collapse
Thanks, working on that now. When I was pulling my sdcard I got an error: cannot create '<filename>': No such file or directory. The file it's referring to is on my computer, so I'm not sure what it's trying to do that it's unable to. I even get it with an administrator command prompt.
Meanwhile, the CWM backup is running out of sdcard space. Is there a way I can write the backup directly to my computer's hard drive?
EDIT: I think I see the issue. The file adb is trying to pull has colons in it. Can I just skip this file, or is there a way to delete it in CWM?
Muniosi said:
Thanks, working on that now. When I was pulling my sdcard I got an error: cannot create '<filename>': No such file or directory. The file it's referring to is on my computer, so I'm not sure what it's trying to do that it's unable to. I even get it with an administrator command prompt.
Meanwhile, the CWM backup is running out of sdcard space. Is there a way I can write the backup directly to my computer's hard drive?
Click to expand...
Click to collapse
Use adb pull /sdcard c:/sdcard. That pull your sdcard and put it in the directory sdcard on your pc.
Sent from my Nexus 5
jd1639 said:
Use adb pull /sdcard c:/sdcard. That pull your sdcard and put it in the directory sdcard on your pc.
Sent from my Nexus 5
Click to expand...
Click to collapse
I don't think that's the issue. Did you see my edit? Also, what can I do about the nandroid backup?
Muniosi said:
I don't think that's the issue. Did you see my edit? Also, what can I do about the nandroid backup?
Click to expand...
Click to collapse
For your nandroid backup it's going to be harder. You need to clean up some space so you'll need to know what and where some large files you don't need any more are
Sent from my Nexus 5
jd1639 said:
For your nandroid backup it's going to be harder. You need to clean up some space so you'll need to know what and where some large files you don't need any more are
Sent from my Nexus 5
Click to expand...
Click to collapse
That's all well and good, but how can I clean up space? Do adb or CWM have functionality for deleting files? I could just pull the files using adb, but I would need to know their locations and filenames.
Muniosi said:
That's all well and good, but how can I clean up space? Do adb or CWM have functionality for deleting files? I could just pull the files using adb, but I would need to know their locations and filenames.
Click to expand...
Click to collapse
You can adb shell. Then from the shell use rm to remove files. But you need to know specifically what you want to remove, the folder it's in and the name and extension
As an example:
adb shell
rm /sdcard/DCIM/*.*
This would remove all your pictures in the gallery
Sent from my Nexus 5
jd1639 said:
You can adb shell. Then from the shell use rm to remove files. But you need to know specifically what you want to remove, the folder it's in and the name and extension
As an example:
adb shell
rm /sdcard/DCIM/*.*
This would remove all your pictures in the gallery
Sent from my Nexus 5
Click to expand...
Click to collapse
Thanks, I'd forgotten about that command. I'll try the same thing for the other problem of files with colons in them. I'll report back and let you know if it works!
Thanks man, got both backups to work. You were tons of help!

Categories

Resources