yashsingh1/xdaforums huggingface dataset:
[Nexus 7 Q&A, Help & Troubleshooting] HandyAndyXDA:
Using your example except for the directory names being different this is what I would get:

(I am using the names of your directories for simplicity....I know enough that mine would vary lol)

After running adb and entering the command as you did. This is the outcome:

'adb' is not recognized as an internal or external command, operable program, or batch file.
[Nexus 7 Q&A, Help & Troubleshooting] Pirateghost:
because you have not set adb to be an environment variable.

browse to where your adb.exe is located

make a new directory called n7

hold down shift and right click in the box somewhere in windows explorer

click on open command window here

then type this:

adb pull /data/media n7/

/data/media and /sdcard are the same location
[Nexus 7 Q&A, Help & Troubleshooting] HandyAndyXDA:
OK, did that which made perfect sense.

This is what it outputs:

pull: building file list...

0 files pulled. 0 files skipped.

(That was trying it with /media n7/)

The following is when i tried it with /sdcard:

remote object '/sdcard' not a file or directory
[Nexus 7 Q&A, Help & Troubleshooting] Pirateghost:
/data/media

/data is the partition, media is the directory

/media is looking for a media directory on the root or /
[Nexus 7 Q&A, Help & Troubleshooting] GedBlake:
I usually just run...

adb pull /mnt /N7backup

Which copies everything to a folder called 'N7backup' onto the root of my C:/ drive in Windows...

But, boy... does it take a while! Seriously, I could be half way through 'War & Peace' by the time it's done! (OK, bit of an exaggeration, but you get my point).

For this reason, I rarely use ADB much... I tend to use MTP to copy select folders over - drag'n'dropping folders... Titanium, TWRP, MyStuff, etc., et.al. But even that takes it own sweet time.

---------------------

The N7 is a great device... but it's crippled by the lack of removable storage (microSD), that I can slip into my laptop, and can copy everything within 5 minutes.

Rgrds,

Ged.
[Nexus 7 Q&A, Help & Troubleshooting] HandyAndyXDA:
I appreciate you're patience with me and the help.

Do I need to do some connect command before doing any of that?
[Nexus 7 Q&A, Help & Troubleshooting] Pirateghost:
no. the command is simply

adb pull /data/media /nameoffolderyouwanttosenditto
[Nexus 7 Q&A, Help & Troubleshooting] HandyAndyXDA:
I agree with the first part but I would like to understand and get ADB going and give it a try myself.

As for the "crippled by lack of removable storage" ..........if you are rooted you can use an adapter to go from the usb port on the nexus to a regular USB port then you can use usb flash drives or any kind of usb storage / card reader whatever. You will need to be rooted / have that adapter / and install an app like StickMount so the device can see the drive and mount it as a directory. This works great.

Thanks
[Nexus 7 Q&A, Help & Troubleshooting] HandyAndyXDA:
This should work but instead right away it outputs this:

pull: building file list...

0 files pulled. 0 files skipped.

:(
[Nexus 7 Q&A, Help & Troubleshooting] HandyAndyXDA:
Sorry I was replying quick and misunderstood.......yes an actual sdcard would not be something I'd say no to. What would be good too is if you didnt have to use either MTP or PTP.....if it just showed up as a drive
[Nexus 7 Q&A, Help & Troubleshooting] GedBlake:
Oh, don't get me wrong - I wasn't trying to dissuade you from using and understanding ADB... and you should give it a try. Definitely. Both Fastboot and ADB are powerful and useful tools, and IMHO you should learn everything you can about them.

I was just grumbling about the data transfer speeds from N7 to laptop...

Yes,Yes,Yes... and thrice times YES!:):):).

Rgrds,

Ged.
[Nexus 7 Q&A, Help & Troubleshooting] HandyAndyXDA:
I understand and agree completely. And, yes i would love to learn as much as i can. This android stuff is awesome and fun.

Thanks again and I like your attitude :)
[Nexus 7 Q&A, Help & Troubleshooting] HandyAndyXDA:
BUMP:

So any last ideas on what could be wrong with ADB not working? :(

I don't blame you if you are stumped at this point.

PS:

At this point I am desperate, so feel free to even ask me noob questions such as .....Did I connect the device to the computer. :P I won't be offended you guys are a real help. :)
[Nexus 7 Q&A, Help & Troubleshooting] HandyAndyXDA:
UPDATE:

I tried

adb reboot-bootloader

and that worked so why dont

pull

work?

:eek:
[Nexus 7 Q&A, Help & Troubleshooting] GedBlake:
As PirateGhost has alluded to, navigate to the folder on your Windows box, where the ADB .exe file is stored, and open a COMMAND PROMPT window on that folder.

With the Nexus 7 turned on and ADB debugging activated in SETTINGS>>DEVELOPER OPTIONS...

Type...

adb devices

You should see something like this... a serial number...

List of devices attached
015d2d123456789 device

If you see this, then you have a viable ADB connection.

Next type...

adb pull /mnt /N7backup

...where /N7backup is the name of the DESTINATION FOLDER of this backup, to be created on the root directory of the Windows C:/ drive. Of course, you are free to change this to whatever destination folder you like.

I'm puzzled why you're having problems here...

Anyway, I'll be online for the next hour or so... so don't hesitate to post back. If I can, I will try to help.

Rgrds,

Ged.
[Nexus 7 Q&A, Help & Troubleshooting] HandyAndyXDA:
Yes I can confirm that I have a Viable ADB connection working.

Not only did I pull the device serial number but I can also get it to boot into recovery menu from doing "adb reboot-bootloader"

Thanks so much for your help, this is really bugging me now too.:eek:

Still cant get

pull or backup

commands to work

backup left me with a backup.ab file that was only 1K in size
[Nexus 7 Q&A, Help & Troubleshooting] GedBlake:
This is most peculiar... I just run an ADB pull myself, without problems.

Are you running the latest version of ADB? I recall Google updating the SDK relatively recently, specifically the ADB component, it 'ties' the Android Device to the PC for security reasons.

http://www.androidpolice.com/2013/0...es-from-stealing-your-data-in-some-situations

Rgrds,

Ged.
[Nexus 7 Q&A, Help & Troubleshooting] HandyAndyXDA:
Thanks I'll try that now.

Yeah, I don't know. I even tried "adb bugreport" and :eek: WOW did it but on a show of log information flashing quickly and for a pretty long time lol
[Nexus 7 Q&A, Help & Troubleshooting] bftb0:
does a trailing slash on the source directory make a difference (to the version of adb you are using)?

e.g.

adb pull /sdcard/

or

adb pull /data/media/
[Nexus 7 Q&A, Help & Troubleshooting] HandyAndyXDA:
I don't want to leave you guys hanging. I'm grateful for the help just had to put this on hold. :( I'll get back to you on it either tonight or tomorrow.

Thanks all and regards,

Handy
[Nexus 7 Q&A, Help & Troubleshooting] bftb0:
One other thing to try - to avoid problems with the "adbd" daemon running as a non-root user (as it would with lightly-rooted stock) is to do the adb pull operation with the custom recovery running.

adbd will be running as the root user in that case.

Obviously, other prerequisites apply - you should have the correct driver installed so you can communicate with adb in the recovery (usually separate from the adb driver you used for the normal OS), and the filesystem you are pulling from needs to be mounted.

Good luck
[Nexus 7 Q&A, Help & Troubleshooting] HandyAndyXDA:
Hey guys,

Hard at work and dead tired lol

Just wanted to thank you all very much.

I got ADB working with the pull and backup commands.

Some of the example command line codes suggested did not work and some did :D I assure you I will let you know the specifics. Been hard at work in this heatwave we've had and I am away from my computer.

Thanks again and take care.
[Nexus 7 Q&A, Help & Troubleshooting] HandyAndyXDA:
It seems to work fine so long as I don't specify where it pulls the files to.

If I have to have it pull to the root directory of my hard drive im fine with that.

The next thing that is really bothering me more than anything is that I seem to have lost all my notes saved in AKNotepad.

I don't even use that app anymore but when I did I had a lot of important work related notes in there.

I hope I can get them back somehow.

Anyway thanks again and have a great memorial day weekend.
[Nexus 7 Q&A, Help & Troubleshooting] bftb0:
Use a "cd" command (Change Directory) first, and all the files will get dropped into that (current) directory when you do the "adb pull" operation.

AFAIK, that app doesn't back them up to the /sdcard but just puts them in the per-app storage folder under /data/data/com.... so, if you uninstall the AK Notepad app or wipe application data, the notes disappear (assuming you are not using the cloud backup feature).

If you made a Nandroid backup while you were still using that app, then you have files you are looking for in the Nandroid backup, as of the exact moment you made the backup. You can do a restore of that Nandroid backup, figure out how you want to export the data, and then revert back to whatever your current ROM is, using its' backup.

See how easy having Nandroid backups makes this?
[Nexus 7 Q&A, Help & Troubleshooting] HandyAndyXDA:
Lol except, I didn't have this problem until I restored a nand backup. I made the backup when aknotpad still showed all my saved notes in the ap as it always did. However, once I restored the backup all I was left with was an empty list of saved notes :(
[Nexus 7 Q&A, Help & Troubleshooting] bftb0:
Earlier today I was messing around with some rooting stuff in a vanilla stock ROM; just now I restored from a Nandroid backup a CM10.1 ROM made about 24 hours ago. It had AK Notepad installed and 7 of 7 notes that it had are all still there with exactly the contents I recall.

Don't know what you are doing differently. (But I have not wiped /sdcard - perhaps that is different?)
[Nexus 7 Q&A, Help & Troubleshooting] HandyAndyXDA:
I didn't wipe the device before restoring the backup either.

Maybe today I will try to restore that backup again and hope for the best, but I am afraid it might make my chances of getting the notes back even worse.

I contacted AKNotepad and after a few emails back and forth they told me they would have one of their engineers contact me after the Memorial Day weekend.

So I might wait to hear from them although most likely they can't / won't be much of any help.

They told me the notes are saved to internal memory but they didnt know exactly where and just said that the data saved can only be read by aknotepad.

I still want to know where its saved and if it can only be opened by aknotpad then so be it, I will open them with aknotepad lol

I just really need these notes back.

I am not sure where to find the data/data/com directory either. Is it possibly a different name?
[Nexus 7 Q&A, Help & Troubleshooting] bftb0:
Hmmm. Anything else? You aren't using some combination of Nandroid restore plus something else such as Titanium Backup are you?

Sorry, forgot you are a bit of a newb at this. In Android, every app gets it's own user ID. This allows them to be protected from other apps both from the running process perspective as well as their individual file storage areas.

Each app has a folder in /data/data/<application-package-name>

For instance AK Notepad is at /data/data/com.akproduction.notepad/

What you are looking for is in there... or should be in there. As a matter of fact, it appears that the individual notes are simply stored in an sqlite3 database file at

/data/data/com.akproduction.notepad/databases/notepad.db

So, perhaps you can live up to your handle. Get handy with this info: the Nandroid backups are just .tar archive files, can be opened up with 7zip on a PC, and sqlite3 is publicly available (possibly natively on Windoze too). This means that you can dig the database file out of the nandroid backup without restoring the whole thing. Failing the mastery of the sqlite3 utility, it is evident that the ASCII comprising the individual notes are also stored in plaintext inside the .db file - which means that you can get most of the data out of that .db file using an editor that is capable of dealing with binary files.

But, if I were a betting man, I'd guess that the problems you are experiencing have nothing to do with a failure of the Nandroid backup. The data you are looking for may well be gone because of something you did.

Which recovery are you using (incl. version number) and did you perform the "factory reset" procedure in the custom recovery before you performed the Nandroid recovery?
[Nexus 7 Q&A, Help & Troubleshooting] HandyAndyXDA:
:( when you said nandroid backup I thought you meant something like TWRP. TWRP is what I used.

Thanks so much for the help once again.
[Nexus 7 Q&A, Help & Troubleshooting] HandyAndyXDA:
hmm but I dont remember erasing the SDcard Storage since i know TWRP wouldnt back it up.

and I probably cant run any recovery data programs on the nexus 7 like i would on corrupt HDDs because the nexus 7 only has mtp and ptp. :( man i hate this really.

Was trying to avoid rooting and all because I was afraid of this. And I know rooting didnt cause it but indirectly it did lol.
[Nexus 7 Q&A, Help & Troubleshooting] bftb0:
You need to re-read my prior comment about Nandroid backups being .tar files. The data.ext4.win file in the Nandroid backup is a .tar archive and may be trivially examined on any number of platforms, e.g. using 7zip on a Windoze PC. (maybe change the name of a copy of the file to data.ext4.win.tar to make your life simpler)

Note that when the /data partition is backed up, the tar file names might be either absolutely-rooted, or path-relative, so you are looking for either

/data/data/com.akproduction.notepad/databases/aknotepad.db or

data/com.akproduction.notepad/databases/aknotepad.db

If you had/have AK Notepad installed, there most certainly was/is a folder named

/data/data/com.akproduction.notepad/

in your tablet.

The fact that you can't find it suggests you are not using a root-aware file manager or root (command) shell, and permission problems are keeping you from "seeing it"

Time to start getting handy, Andy. ;)
[Nexus 7 Q&A, Help & Troubleshooting] HandyAndyXDA:
I hope its because I am not using a root file explorer. I will try that. Also, would it matter if I tried to extract TWRP backup files since TWRP can't backup SDCARD? I mean I was told that aknotes are saved in system but I think the person didnt know what they were talking about lol. Anyway thanks again and let me get on this and get handy and see what I can do.
[Nexus 7 Q&A, Help & Troubleshooting] HandyAndyXDA:
ok I got root browser lite. I can see the aknotepad.db file now but sadly i doubt it has my notes in it since its only 36K :(

And I am searching any and all backups i saved on my desktop and so far no luck finding it but i wont give up yet
[Nexus 7 Q&A, Help & Troubleshooting] Pirateghost:
/data/data is NOT your sdcard, so the fact that you cant find them is indicative of not using a root capable file browser.

/system is READ-ONLY so there is no way that the app is saving its data to /system

almost every setting/preference/data for every app (there are a few exceptions, like games and some other items that store on /sdcard) stores its data in databases of some sort in /data/data/com.nameofrespectiveapp.blah

an app like Titanium Backup will back up those databases and restore them without loss of data.
[Nexus 7 Q&A, Help & Troubleshooting] bftb0:
Any backups you made via MTP or PTP do not contain application internal data*. For example

/data/app/ <-- market app .apk files are here

...

/data/data/ <-- private per-app storage

...

/data/media/0/ <-- == SDCARD - THE ONLY THING MTP or PTP SEES

...

/data/system/ <-- Android settings, installed app metadata, user lists, etc

...

You can quickly see if there is any of your note data in that app database:

- Using your root explorer app, copy the aknotepad.db file to your /sdcard/ folder.

- with a terminal emulator app (something that has a decent busybox), execute this command:

$ strings /sdcard/aknotepad.db

If there are any remnants of your notes in there, you will see text from your notes that you recognize. Frankly, I doubt it though - it is more probable that the protein screwed up than the silicon.

As I said earlier and now repeatedly, you should look in your Nandroid backup (.tar archive) for that file. If you can't find the data in there, then you deleted it somehow prior to the Nandroid backup.

* The exception to this rule is media apps placing pictures/videos/music into folders on the /sdcard/ ( == /data/media/0/ ) for convenient access from PCs, et cetera. Some apps will also use the /sdcard area for other purposes (some games do this) . So, in some cases, to correctly restore 100% of an apps statefulness, you need either a Nandroid or TiBu backup plus whatever the app puked out onto the /sdcard into whatever folder location it chose (Apps are supposed to do this into folders underneath /sdcard/Android/ but this kind of behavior varies widely for the minority of apps that do this)
[Nexus 7 Q&A, Help & Troubleshooting] HandyAndyXDA:
I tried unzipping and looking in any and all backups i had.

I also understand about using MTP or PTP means i cant backup everything.

I am not talking that at all here. I am talking strictly TWRP at this point.

I made more than one backup using TWRP. I also know that TWRP don't backup SDCARD but from what you are telling me I shouldnt care since aknotepad db isnt saved in sdcard........so therefore TWRP should have them.

Later I will make a backup using both titanuim and twrp. then recover one of my past twrp bacups and hope for the best with getting those notes back.

if i dont get them back then :( lesson learned and I will have to move on.

I can't believe i didnt at least take screen shots of those notes as another way to back them up.

there was so many things i could have done but didnt. I know that believe me lol
[Nexus 7 Q&A, Help & Troubleshooting] HandyAndyXDA:
Oh and Thanks bftb0, I learned a lot about what is stored where :) also I did try what you said and as you expected my outcome was nothing gained.
[Nexus 7 Q&A, Help & Troubleshooting] bftb0:
The one that you have not tried is to look inside the data.ext4.win(.tar) archive files in each of the TWRP Nandroid backups. I would think you will be able to tell from their size alone whether they contain significant content. (BTW my tab has 7 AK notes - a few of them rather lengthy - and its .db file is only 44k)

For the third time, the data.ext4.win files are just .tar archives which can be inspected without unpacking them using archive programs such as "7zip" or via command line, e.g.

$ tar tvf data.ext4.win | grep aknotepad.db
[Nexus 7 Q&A, Help & Troubleshooting] HandyAndyXDA:
I am trying once again to extract those files that TWRP saved from an old backup I made before I lost those notes.

The first 2 data.ext4 files would not extract. one being an MD5 so thats obvious.

The 3rd (data.ext4.win001) did and it only contains 2 folders inside. One folder contains all apk files.....the other looked promising since i saw all app data files in there like com.appname, however nothing that said akproductions or anything like it. :(

4th is an MD5

5th data.ext4.win002 is extracting and contains lots more com.appname files but nothing for akproductions :(

OK now I am on to something here I think.

in that file i extracted i went in here \data.ext4\data\dalvik-cache and found data@app@com.akproduction.notepad-1.apk@classes.dex

I opened it in notepad++ and it shows a lot of NULL and encrypted characters but I feel like it is in fact my notes. the arrangement of the text seems like it.

I am going to send it to the nexus 7 and see if i can get it open in the app.

Thanks so much and lets hope this works.
[Nexus 7 Q&A, Help & Troubleshooting] HandyAndyXDA:
data.ext4.win003 wouldnt extract.

and that is the last of the data files
[Nexus 7 Q&A, Help & Troubleshooting] HandyAndyXDA:
Still no luck :(

but it was worth a shot.
[Nexus 7 Q&A, Help & Troubleshooting] Pirateghost:
dont extract them, just open in 7zip and browse the contents
[Nexus 7 Q&A, Help & Troubleshooting] HandyAndyXDA:
I tried that. Does it really make a difference?

I will try it again though.
[Nexus 7 Q&A, Help & Troubleshooting] HandyAndyXDA:
yeah no difference.
[Nexus 7 Q&A, Help & Troubleshooting] bftb0:
I'm not even sure what you are doing at this point.

There should be thousands of files in those data.ext4.win backup archives, and there certainly are more than two sub-directories inside of /data. You should be able to inspect that for yourself using your root-aware file browser.

So, either you were making Nandroid backups to a device that was completely full (and thus the backups are faulty or truncated), or there is a significant problem with your understanding about the way things work.

The .dex file from the dalvik cache will do you absolutely no good. I gave you the exact pathname of the file you should be looking for in the archive(s):

/data/data/com.akproduction.notepad/databases/aknotepad.db (absolute path) or

data/com.akproduction.notepad/databases/aknotepad.db (relative path)

BTW, please note that saying stuff like "it doesn't work" or "it's no good" is completely unhelpful - it says approximately nothing about what you actually tried, nor what the nature of the failure(s) you encountered were.

I think I asked this question before: WHAT VERSION OF TWRP ARE YOU USING?

Are you saying that you made 5 different Nandroid backups? Or that when you made them, you always gave the same backup name so that it dropped a whole bunch of files

( .win001, .win002, .win003, et cetera) into a single folder?
[Nexus 7 Q&A, Help & Troubleshooting] HandyAndyXDA:
LOL this isn't my day......now when i try to reply with your quoted text it keeps telling me that the message is too short and that i need to add 2 more characters. I did that and still same issue.

getting rid of the QUOTE tags fixed it.