[Q] Best Backup Solution for ROOTED but LOCKED Nexus 7 - Nexus 7 Q&A, Help & Troubleshooting

Hello Everyone,
I recently Rooted my Nexus 7, but did not Unlock it because as I understand it......Unlocking will wipe my data.
I have tried many backup solutions and I find TWRP to be by far the best, but there is one catch and it's bugging me.
TWRP doesn't backup everything. For example "Internal Storage" aka "SDCARD" aka what ever else android calls the directory to be more confusing lol
I have been trying different things to backup what TWRP doesn't cover and it has just been a long frustrating failure.
MTP is terrible. It can't really be trusted and Windows Explorer becomes unresponsive. It worked better when I selected a few folders at a time but still horrible to trust. However I am open to any suggestions.....maybe there is an MTP Client that is better at handling this than Windows Explorer? I don't know.
ADB Kinda sorta doesn't seem to work with a locked device. Although Holo backup which uses ADB seemed to save a lot to a backup file, it didn't work to restore from it. Even tried unzipping it to see what was in that file but no luck. So I don't know if this means ADB is also hopeless or not.
Airdroid / Wifi File Transfer app also don't work very well with certain directories or major transfer sizes.
Any suggestions would be greatly appreciated. I would really like to be able to do the unthinkable which is recover from a Hard Factory Reset, but I am fine with just being able to save a backup of everything that TWRP won't.
Thanks so much in advance.

External USB and Titanium Backup. You can order a cable to use an external usb on amazon for about a dollar.

What about uploading to cloud storage? Dropbox, drive, etc. Might not work so good for large files though.
Sent from XDA app

Not sure why you created another thread on this issue, but what doesn't work with adb? Adb pull /sdcard will pull everything from your sdcard including your twrp backup.
Adb doesn't care if you have a locked boot loader.
Sent from my Galaxy Nexus

KingVeto said:
External USB and Titanium Backup. You can order a cable to use an external usb on amazon for about a dollar.
Click to expand...
Click to collapse
Thanks I already have one and I been using it for the things I tried above. Mine is just a small adapter no cord.
gc84245 said:
What about uploading to cloud storage? Dropbox, drive, etc. Might not work so good for large files though.
Click to expand...
Click to collapse
That would be ok but as you said not so good for large files. plus i would prefer an offline backup solution to toss on my NAS as well.
Pirateghost said:
Not sure why you created another thread on this issue, but what doesn't work with adb? Adb pull /sdcard will pull everything from your sdcard including your twrp backup.
Adb doesn't care if you have a locked boot loader.
Click to expand...
Click to collapse
Honestly it beats me why I can't get ADB to work. Only reason why I though it was related to my bootloader being locked was because some programs / toolkits I used brought up an error saying that it couldnt connect adb due to locked bootloader.
I can't get ADB working and it has been driving me mad lol. I feel like maybe I am doing something stupid wrong when trying to use an adb command.
At this point I would love a noob guide with screen shots on how to use adb command, the adb command line tool....the works on adb lol.
Screenshots would be a huge help to prove that I am not doing something dumb and that I actually have some issue with adb.
Thanks Everyone.

Code:
C:\Users\pirateghost>adb
Android Debug Bridge version 1.0.31
-d - directs command to the only connected USB device
returns an error if more than one USB device is present.
-e - directs command to the only running emulator.
returns an error if more than one emulator is running.
-s <specific device> - directs command to the device or emulator with the given
serial number or qualifier. Overrides ANDROID_SERIAL
environment variable.
-p <product name or path> - simple product name like 'sooner', or
a relative/absolute path to a product
out directory like 'out/target/product/sooner'.
If -p is not specified, the ANDROID_PRODUCT_OUT
environment variable is used, which must
be an absolute path.
devices [-l] - list all connected devices
('-l' will also list device qualifiers)
connect <host>[:<port>] - connect to a device via TCP/IP
Port 5555 is used by default if no port number is specified.
disconnect [<host>[:<port>]] - disconnect from a TCP/IP device.
Port 5555 is used by default if no port number is specified.
Using this command with no additional arguments
will disconnect from all connected TCP/IP devices.
device commands:
adb push <local> <remote> - copy file/dir to device
adb pull <remote> [<local>] - copy file/dir from device
adb sync [ <directory> ] - copy host->device only if changed
(-l means list but don't copy)
(see 'adb help all')
adb shell - run remote shell interactively
adb shell <command> - run remote shell command
adb emu <command> - run emulator console command
adb logcat [ <filter-spec> ] - View device log
adb forward <local> <remote> - forward socket connections
forward specs are one of:
tcp:<port>
localabstract:<unix domain socket name>
localreserved:<unix domain socket name>
localfilesystem:<unix domain socket name>
dev:<character device name>
jdwp:<process pid> (remote only)
adb jdwp - list PIDs of processes hosting a JDWP transport
adb install [-l] [-r] [-s] [--algo <algorithm name> --key <hex-encoded key> --iv <hex-encoded iv>] <file>
- push this package file to the device and install it
('-l' means forward-lock the app)
('-r' means reinstall the app, keeping its data)
('-s' means install on SD card instead of internal storage)
('--algo', '--key', and '--iv' mean the file is encrypted already)
adb uninstall [-k] <package> - remove this app package from the device
('-k' means keep the data and cache directories)
adb bugreport - return all information from the device
that should be included in a bug report.
adb backup [-f <file>] [-apk|-noapk] [-shared|-noshared] [-all] [-system|-nosystem] [<packages...>]
- write an archive of the device's data to <file>.
If no -f option is supplied then the data is written
to "backup.ab" in the current directory.
(-apk|-noapk enable/disable backup of the .apks themselves
in the archive; the default is noapk.)
(-shared|-noshared enable/disable backup of the device's
shared storage / SD card contents; the default is noshared.)
(-all means to back up all installed applications)
(-system|-nosystem toggles whether -all automatically includes
system applications; the default is to include system apps)
(<packages...> is the list of applications to be backed up. If
the -all or -shared flags are passed, then the package
list is optional. Applications explicitly given on the
command line will be included even if -nosystem would
ordinarily cause them to be omitted.)
adb restore <file> - restore device contents from the <file> backup archive
adb help - show this help message
adb version - show version num
scripting:
adb wait-for-device - block until device is online
adb start-server - ensure that there is a server running
adb kill-server - kill the server if it is running
adb get-state - prints: offline | bootloader | device
adb get-serialno - prints: <serial-number>
adb get-devpath - prints: <device-path>
adb status-window - continuously print device status for a specified device
adb remount - remounts the /system partition on the device read-write
adb reboot [bootloader|recovery] - reboots the device, optionally into the bootloader or recovery program
adb reboot-bootloader - reboots the device into the bootloader
adb root - restarts the adbd daemon with root permissions
adb usb - restarts the adbd daemon listening on USB
adb tcpip <port> - restarts the adbd daemon listening on TCP on the specified port
networking:
adb ppp <tty> [parameters] - Run PPP over USB.
Note: you should not automatically start a PPP connection.
<tty> refers to the tty for PPP stream. Eg. dev:/dev/omap_csmi_tty1
[parameters] - Eg. defaultroute debug dump local notty usepeerdns
adb sync notes: adb sync [ <directory> ]
<localdir> can be interpreted in several ways:
- If <directory> is not specified, both /system and /data partitions will be updated.
- If it is "system" or "data", only the corresponding partition
is updated.
environmental variables:
ADB_TRACE - Print debug information. A comma separated list of the following values
1 or all, adb, sockets, packets, rwx, usb, sync, sysdeps, transport, jdwp
ANDROID_SERIAL - The serial number to connect to. -s takes priority over this if given.
ANDROID_LOG_TAGS - When used with the logcat option, only these debug tags are printed.
Code:
c:\temp\gnex>adb pull /sdcard

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.

HandyAndyXDA said:
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.
Click to expand...
Click to collapse
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:
Code:
adb pull /data/media n7/
/data/media and /sdcard are the same location

Pirateghost said:
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:
Code:
adb pull /data/media n7/
/data/media and /sdcard are the same location
Click to expand...
Click to collapse
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

HandyAndyXDA said:
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
Click to expand...
Click to collapse
/data/media
/data is the partition, media is the directory
/media is looking for a media directory on the root or /

I usually just run...
Code:
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.

Pirateghost said:
/data/media
/data is the partition, media is the directory
/media is looking for a media directory on the root or /
Click to expand...
Click to collapse
I appreciate you're patience with me and the help.
Do I need to do some connect command before doing any of that?

HandyAndyXDA said:
I appreciate you're patience with me and the help.
Do I need to do some connect command before doing any of that?
Click to expand...
Click to collapse
no. the command is simply
adb pull /data/media /nameoffolderyouwanttosenditto

GedBlake said:
I usually just run...
Code:
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.
Click to expand...
Click to collapse
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

Pirateghost said:
no. the command is simply
adb pull /data/media /nameoffolderyouwanttosenditto
Click to expand...
Click to collapse
This should work but instead right away it outputs this:
pull: building file list...
0 files pulled. 0 files skipped.

GedBlake said:
I usually just run...
Code:
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.
Click to expand...
Click to collapse
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

HandyAndyXDA said:
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
Click to expand...
Click to collapse
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...
HandyAndyXDA said:
...if it just showed up as a drive
Click to expand...
Click to collapse
Yes,Yes,Yes... and thrice times YES!.
Rgrds,
Ged.

GedBlake said:
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.
Click to expand...
Click to collapse
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

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. I won't be offended you guys are a real help.

HandyAndyXDA said:
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. I won't be offended you guys are a real help.
Click to expand...
Click to collapse
UPDATE:
I tried
adb reboot-bootloader
and that worked so why dont
pull
work?

Related

Adb commands for beginners

ADB COMMANDS
This is just a simple guide on how to open up and run adb commands from your windows based operating system.
Open up run by simultaneously pressing the windows flag key and r.
In the window that pops up type cmd. Now command prompt is open
type the commands each followed by the enter key: cd\
cd androidsdk/tools
Now your in your in your androidsdk/tools folder. You can do several things in here but i'll start with some basics each
of the following commands is to be followed by the enter key
adb devices (this lets you know what devices are attached to the computer in usbdebugging)
How to get your logcat (this will put your logcat in txt format in your sdk tools folder)
adb logcat > logcat.txt
copy an app from your phone to your computer
adb pull /system/app/whatever.apk C:\ateam (replace whatever.apk with the app your pulling also replace ateam with the
folder your placing the app in
Install an app from your computer on your phone
adb install whatever.apk (put an apk in your sdk tools and replace"whatever" with the name of the apk and it will install it)
also you can add either -r or -s to reinstall or install on the sdcard for instance: adb install -r Rosie.apk
this command will reinstall the new rosie from your tools file and still keep the same user data as before.
-r for reinstall
-s for sdcard (gotta test this)
Push an app from your computer to your phones filesystem (in some cases also installs)
adb remount
adb push whatever.apk /system/app (put an apk in your sdk tools and replace "whatever" with the name of the apk and this
will push it to your system app folder. You can change the destination as well for example: You want to push Launcher2.apk
to your data/app folder: adb remount
adb push Launcher2.apk /data/app )
Remove an app from your phone
adb remount
adb shell
cd /system/app (this will change your disk to system/app you may also change to another folder as well)
ls -a ( a list will show of all the apps inside your system app folder)
rm whatever.* (replace the whatever.* with the name of a apk you want to remove )
Flash a recovery image to your phone
First pace the recovery image in your sdcard root and rename it to recovery (so the full name will now be recovery.img)
adb shell
flash_image recovery /sdcard/recovery.img (wait till this# sign shows up again before you type the next command)
reboot recovery
get your current battery level
adb shell cat /sys/class/power_supply/battery/capacity
get your current rom build
adb shell getprop ro.build.description
Reboot into fastboot ruu
adb shell reboot oem-78
How to run the ruu via adb
First thing first start the ruu give it permissions and so fourth
When it gets to the part where it says "Follow the instructons below..."
Move the ruu window out of the way and start your task manager
Go to processes right click on ARUWizard.exe and choose open file location
A new window will open scroll till you see ROM.zip
Copy and paste Rom.zip to your desktop
Once you have copied it to your desktop shutdown the ruu and task manager
Click start menu then click computer
A window will open up click the c drive
now click create new folder and name it test
put the rom.zip in the test folder
plug your phone in and open command prompt and type
Code:
adb devices
adb shell reboot oem-78
fastboot devices
fastboot getvar boot-mode
fastboot erase cache
fastboot flashzip C:\test\rom.zip
fastboot devices
fastboot getvar boot-mode
fastboot reboot
Very useful man thanks for the guide. I also think newbies would use this guide as its in the right catagory and not in some G1 section or Mt3g section.
Edit** isnt this already in the tuorials section?
sandboxlove said:
i think its a great idea, we need a more compilied list to refer to
add more!!!!
Click to expand...
Click to collapse
I'm going to try to add one everyday. tomorrows lesson how to run the ruu from adb
Powers16 said:
Very useful man thanks for the guide. I also think newbies would use this guide as its in the right catagory and not in some G1 section or Mt3g section.
Edit** isnt this already in the tuorials section?
Click to expand...
Click to collapse
Where? Pagelink
http://forum.xda-developers.com/showthread.php?p=5799939#post5799939
but its a less in depth reference so i hope this gets added into the tutorial section as here are no in depth tuts about adb in there..
also to remove apk
adb shell rm /system/ (then put in either app or media or what ever folder name /whatever.apk
Papa Smurf151 said:
also to remove apk
adb shell rm -r /system/ (then put in either app or media or what ever folder name /whatever.apk
Click to expand...
Click to collapse
rm -r is a recursive deletion and can have a lot of unwanted and harmful side-effects if used incorrectly. To just remove apks, a simple rm works just fine. If they typed the wrong directory, file name, whatever, a recursive deletion would clear the entire folder... Not really something you'd want.
This is great, I will be coming back for more.
Thanks a lot
DevinXtreme said:
rm -r is a recursive deletion and can have a lot of unwanted and harmful side-effects if used incorrectly. To just remove apks, a simple rm works just fine. If they typed the wrong directory, file name, whatever, a recursive deletion would clear the entire folder... Not really something you'd want.
Click to expand...
Click to collapse
thanks...i knew that but wasnt paying attention. I just copied and pasted from my adb notepad file. i edited my post and removed the -r
DevinXtreme said:
rm -r is a recursive deletion and can have a lot of unwanted and harmful side-effects if used incorrectly. To just remove apks, a simple rm works just fine. If they typed the wrong directory, file name, whatever, a recursive deletion would clear the entire folder... Not really something you'd want.
Click to expand...
Click to collapse
LOL, yeah, I've done that
Might want to also include a note that says when using linux or mac shell you replace the "adb" with "./adb" (I believe that is correct or at least what I do now when reading the windows cmd guides)
tejasrichard said:
LOL, yeah, I've done that
Click to expand...
Click to collapse
I wiped out 16 years of source code with it once....I got fired.
Kcarpenter said:
I wiped out 16 years of source code with it once....I got fired.
Click to expand...
Click to collapse
Oh damn that's crucial man. Hope they had backups
Screwin around
So I was screwin around with adb tryin to learn this stuff and I stumbled across this by just typing adb after cd'ing in. Hopefully its useful. Mind you I am a total noob to android/linux and this was a total accident. I am sure you all know about it though. Useful info though
Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\>cd\
C:\>cd android-sdk-windows
C:\android-sdk-windows>adb
Android Debug Bridge version 1.0.26
-d - directs command to the only connected USB device.
returns an error if more than one USB device is present.
-e - directs command to the only running emulator.
returns an error if more than one emulator is running.
-s <serial number> - directs command to the USB device or emulator with the given serial number. Overrides ANDROID_SERIAL environment variable.
-p <product name or path> - simple product name like 'sooner', or
a relative/absolute path to a product
out directory like 'out/target/product/sooner'.
If -p is not specified, the ANDROID_PRODUCT_OUT
environment variable is used, which must be an
absolute path.
devices - list all connected devices
connect <host>:<port> - connect to a device via TCP/IP
disconnect <host>:<port> - disconnect from a TCP/IP device
device commands:
adb push <local> <remote> - copy file/dir to device
adb pull <remote> [<local>] - copy file/dir from device
adb sync [ <directory> ] - copy host->device only if changed
(see 'adb help all')
adb shell - run remote shell interactively
adb shell <command> - run remote shell command
adb emu <command> - run emulator console command
adb logcat [ <filter-spec> ] - View device log
adb forward <local> <remote> - forward socket connections
forward specs are one of:
tcp:<port>
localabstract:<unix domain socket name>
localreserved:<unix domain socket name>
localfilesystem:<unix domain socket name>
dev:<character device name>
jdwp:<process pid> (remote only)
adb jdwp - list PIDs of processes hosting a JDWP transport
adb install [-l] [-r] [-s] <file> - push this package file to the device and install it
('-l' means forward-lock the app)
('-r' means reinstall the app, keeping its data)
('-s' means install on SD card instead of internal storage)
adb uninstall [-k] <package> - remove this app package from the device
('-k' means keep the data and cache directories)
adb bugreport - return all information from the device
that should be included in a bug report.
adb help - show this help message
adb version - show version num
DATAOPTS:
(no option) - don't touch the data partition
-w - wipe the data partition
-d - flash the data partition
scripting:
adb wait-for-device - block until device is online
adb start-server - ensure that there is a server running
adb kill-server - kill the server if it is running
adb get-state - prints: offline | bootloader | device
adb get-serialno - prints: <serial-number>
adb status-window - continuously print device status for a specified device
adb remount - remounts the /system partition on the device read-write
adb reboot [bootloader|recovery] - reboots the device, optionally into the bootloade or recovery program
adb reboot-bootloader - reboots the device into the bootloader
adb root - restarts the adbd daemon with root permissions
adb usb - restarts the adbd daemon listening on USB
adb tcpip <port> - restarts the adbd daemon listening on TCP on the specified port
networking:
adb ppp <tty> [parameters] - Run PPP over USB.
Note: you should not automatically start a PPP connection.
<tty> refers to the tty for PPP stream. Eg. dev:/dev/omap_csmi_tty1
[parameters] - Eg. defaultroute debug dump local notty usepeerdns
adb sync notes: adb sync [ <directory> ]
<localdir> can be interpreted in several ways:
- If <directory> is not specified, both /system and /data partitions will be u
pdated.
- If it is "system" or "data", only the corresponding partition
is updated.
C:\android-sdk-windows>
Hi, I'm abcdfv, and I approve this thread.
abcdfv said:
Hi, I'm abcdfv, and I approve this thread.
Click to expand...
Click to collapse
LOL Thanks
I've always been an advocator of EVERYONE learning the ADB basics at least.
updated with run the run the ruu via adb commands
I'm trying to flash my recovery image. I need help. What is the first comand I type at C:\Windows\System32> normally I type cd:\android-sdk-windows\tools
then i adb remount, then adb shell. When I do that now I get "remount failed: Invalid argument" I'm not TOTALLY clueless, although it may turn out that I am after this. any help would be great. I am booted in recovery, but since my recovery image is gone, its just an exclamation in a triangle. if i adb devices, i can see my phone and it says i'm in recovery. Thanks.
I need some serious help with this.....do you need to download anything on your computer?? can you explain all the stuff you need to do leading up to what you type into command prompt...anyone..i need help..i flashed darchstar froyo build and the recovery is all messed up..i cant flash anything..so i need to push a new recovery img.but i don't know anything about adb shell or anything .....please........ive never had to push anything..everyone always just puts flashable zips out for you...HELP

Adb issues

Ok trying to learn a little about adb. and im trying to push a file to my phone.
cd c:\android-sdk-windows\tools ( done this to change the directory)
c:\android-sdk-windows\tools>adb push screengrab.apk .\sdcard.
failed to copy screengrabber.apk to .\sd card: Read-only file system
how do i change it to a write only file system also. i tryed adb shell i granted it SU permissions. then i done something and its telling me daemon still not runningerror cannot connect to daemon. what exactly does this mean it will start up successfully then it will stop and that message will come up
your sdcard is not read only. make sure you do not have it mounted at all on your computer and verify you are using PROPER command
adb push screengrab.apk /sdcard/
Pirateghost said:
your sdcard is not read only. make sure you do not have it mounted at all on your computer and verify you are using PROPER command
adb push screengrab.apk /sdcard/
Click to expand...
Click to collapse
there is nothing mounted in my pc not internal or sd card when i used the PROPER command. It brings up a whole lot of stuff like the different commands and stuff.

Minimal rooting - back to basics

There are many tools and "Super-Ultra-Mega-Rooters" and things to root your Nook.
They will install 23 different things on your Nook.
If you like them, use them.
What is "rooting"?
At the most basic level, "rooting" is managing to get a root (all-powerful) shell (command line interpreter).
When your Nook is sitting there with a prompt saying # then you are rooted.
Alright, a prompt #, but on where?
On your desktop computer, which has to be linked somehow to your Nook.
The way we link Android devices to desktop computers is with ADB (Android Debug Bridge).
Every Android device has this capability built in, but sometimes it's disabled.
Sometimes they make it easy to enable, sometimes they make it hard.
On the Nook, it's fairly easy because the Nook will boot up off an external SD card.
How to root any Nook
The configuration for the Nook is stored in a filesystem called uRamdisk inside the boot partition.
If we can get a copy of uRamdisk, modify it, then replace the copy in the boot partition we can root.
Copy uRamdisk to the desktop
There are two easy ways to get a copy of uRamdisk:
Put noogie on an SD card, boot up, connect the USB and a disk will appear on your desktop.
This will be the boot partition, copy uRamdisk.
Get the update zip from B&N and unzip it.
They call the file ramdisk.img, but it's uRamdisk.
Modify uRamdisk
You need to extract two files out of uRamdisk then replace them.
There is a utility for Win32 called bootutil.exe in the signature below.
Code:
bootutil /x /v uRamdisk init.rc default.prop
This should say that it extracted two files.
Using an editor you need to edit the two files.
Don't use Windows Notepad (it's miserable and doesn't understand Unix end-of-lines).
Try Notepad++ if you don't have a good text editor.
Comment out a few lines in init.rc (additions in red):
Code:
service adbd /sbin/adbd
[color=red]#[/color] disabled
...
# adbd on at boot in emulator
on property:ro.kernel.qemu=1
[color=red]#[/color] start adbd
on property:persist.service.adb.enable=1
[color=red]#[/color] start adbd
on property:persist.service.adb.enable=0
[color=red]#[/color] stop adbd
You can use ADB over WiFi or USB.
Over WiFi can be easier because you don't need to configure desktop drivers.
As so far modified the ADB would use USB.
If you want it to work over WiFi instead, delete the comment # mark:
Code:
[color=red]#[/color] setprop service.adb.tcp.port 5555
Now a minor modification to default.prop.
Change it so that it reads only (no other lines):
Code:
ro.secure=0
ro.allow.mock.location=1
ro.debuggable=1
To put these two files back into the desktop's copy of uRamdisk:
Code:
bootutil /v /r uRamdisk init.rc default.prop
This should say that it replaced two files.
Copy uRamdisk to the Nook
Use noogie as in step one and just copy the uRamdisk over the old copy.
Reboot. Make sure that your WiFi is turned on and connected.
Use ADB
Get adb.exe from the Android SDK.
You connect to your Nook using either an IP address or a host name if you defined one in your C:\Windows\System32\drivers\etc\hosts.
Code:
adb connect nook [color=red][i]or whatever you named it[/i][/color]
adb shell
or
Code:
adb connect 192.168.1.2 [color=red][i]or whatever the IP is[/i][/color]
adb shell
Then you will get your # prompt.
You can do whatever you want.
Usually the point of all this is to allow you to modify something in the system.
To do this, you have to "remount" the system partition.
Code:
# mount -o rw,remount /dev/block/mmcblk0p5 /system
The rest is up to you!
Can you release a version of this utility for linux?
nobricks said:
Can you release a version of this utility for linux?
Click to expand...
Click to collapse
In Unix (as always) you can accomplish your purpose by chaining together a half dozen commands with obscure case-sensitive parameters.
I don't know the exact parameters, but the general drift of things is here.
Thanks for pointing me in the right direction.
Did some further searching on the forums and found this post with the proceedure for modifying uRamdisk under linux.
Renate NST said:
Over WiFi can be easier because you don't need to configure desktop drivers.
Click to expand...
Click to collapse
Renate,
Question about NST USB drivers for ADB.
In short: I got 2 NSTs, they do have "slightly" different hardware, I guess. Or might be, internal SD card size is different only?
First was rooted long time ago, and my WinXP see it as ADB device (backup size 1,958,739,968 bytes)
NST modded ADB driver was installed long time ago.
Another one is a bit newer (backup size 1,962,934,272 bytes)
I’ve decided to root second one, followed instruction to the letter.
It was not detected as ADB device, only ADB via WiFi worked.
Apparently, /sbin/adbd was started, but I was not able to adb connect via USB at all, but only via WiFi with following line was uncommented (obviosly):
setprop service.adb.tcp.port 5555
Tried few times, the results are consistent.
Made me think, are there different drivers for "slightly" different NST hardware?
Am I mistaken?
The partitioning on an NST actively uses 1,941,962,752 bytes.
Any capacity over that is unused by the stock partitioning.
The exact capacity of the "2 GB" is varied.
I wrote a note somewhere of 3 different sizes that I have seen.
adbd, the ADB daemon uses either USB or TCP (on the Nook, that's WiFi).
Whether service.adb.tcp.port is defined determines this.
Renate,
Renate NST said:
The partitioning on an NST actively uses 1,941,962,752 bytes.
…
I wrote a note somewhere of 3 different sizes that I have seen.
Click to expand...
Click to collapse
The Q is: Does all 3 use exact same windows driver?
Could you compare your NST Android Composite ADB Interface driver with mine, please:
Google, Inc. | 8/11/2009 | 2.0.10.2
Hardware Ids
USB\Vid_2080&Pid_0003&Rev_0216&MI_01
USB\Vid_2080&Pid_0003&MI_01
The excess size of the internal NAND does not make a difference in anything.
The "ADB driver" is basically a way to tell Windows:
Hey, dude, you don't really know this device but pretend that you do.
It just has a bulk in endpoint and a bulk out endpoint.
Don't worry your little head over what the data is.
Just use the generic driver file C:\Windows\System32\drivers\winusb.sys
And if I feel like using it I'll interface through C:\Windows\System32\winusb.dll
Click to expand...
Click to collapse
And Windows sighs and just does it.
(Well, actually, it's a bit more complicated than that because it creates the Android Device install class.)
Anyway, what was your question?
Then what about adb wireless apps? Do we still need one of those to adb-connect wirelessly? I tried this on a fresh Nook with 1.1.2, and don't seem to be able to connect to the Nook.
If you use ADB over WiFi and if you leave your WiFi on then you have a big security leak unless you are only on a private network.
People use app like ADB Konnect to disable ADB over WiFi.
I prefer just using ADB over USB.
Renate NST said:
If you use ADB over WiFi and if you leave your WiFi on then you have a big security leak unless you are only on a private network.
People use app like ADB Konnect to disable ADB over WiFi.
I prefer just using ADB over USB.
Click to expand...
Click to collapse
Thank you for the advice. Then, if I want to use adb over wifi, but want it to be off (or standby or whatever state that doesn't allow adb connection over wifi) at boot so that it can be toggled on/off later using one of adb wireless apps, what should I do? Is keeping "setprop service.adb.tcp.port 5555" commented sufficient for this?
ADB is only designed to support one transport at a time, USB or WiFi.
Apps that control this have to kill the adbd to have it restart.
If you comment the service.adb.tcp.port out then USB will be used.
Renate NST said:
ADB is only designed to support one transport at a time, USB or WiFi.
Apps that control this have to kill the adbd to have it restart.
If you comment the service.adb.tcp.port out then USB will be used.
Click to expand...
Click to collapse
I've been having a really hard time today attempting to get ADB over USB working on my NSTG 1.2.1. I followed the instructions, but when I do
Code:
adb usb
-OR-
Code:
adb devices
I always get
Code:
error: device not found
Which, of course, means that ADB isn't picking up my Nook as an ADB device.
Can you help?
Use Device Manager (devmgmt.msc) to see if the USB part is working.
See: http://forum.xda-developers.com/showthread.php?p=55428192#post55428192

[Q] Copying nandroid backups to MAC

I am sure this has been asked and answered, but I am not finding the answer. Anyone have a good method for backing up CWM backups to MAC? I know the CWM backups are stored at /data/media/clockworkmod which is not accessible to the MAC. I guess I could copy them to /data/media/0 and then access them from my mac. I guess I could also use ADB, but am looking for something simpler and less data manipulation. If this has been answered, please link me.
1. open terminal
2. ./adb pull /data/media{0, clockworkmod, twrp}
3. popcorn
Pirateghost said:
1. open terminal
2. ./adb pull /data/media{0, clockworkmod, twrp}
3. popcorn
Click to expand...
Click to collapse
I have done it with ADB. Was hoping for something more elegant. Thank you.
Sent from my Nexus 7 using xda app-developers app
Pirateghost said:
1. open terminal
2. ./adb pull /data/media{0, clockworkmod, twrp}
3. popcorn
Click to expand...
Click to collapse
Could you please write it in a more specific way? I'm a noob
I explain what I did:
I opened the terminal and I went in the folder were I keep the fastboot and adb etc..
I tried first with "./adb pull.." but nothing happened (aka: -bash: ./adb: No such file or directory)
Then I tried "./adb-mac pull.." and it didn't work either but I got the following long message:
"Android Debug Bridge version 1.0.31
-d - directs command to the only connected USB device
returns an error if more than one USB device is present.
-e - directs command to the only running emulator.
returns an error if more than one emulator is running.
-s <specific device> - directs command to the device or emulator with the given
serial number or qualifier. Overrides ANDROID_SERIAL
environment variable.
etc..."
I tried both commands at first with the mobile on, then I reset it and I went in recovery mode with the same results..
I'm going insane, I even tried to copy the whole folder of clockworkmod with my backup to another folder, but I couldn't see it with my computer.
I'm running mac OS X, I could eventually try also to my PC windows 7.. I just need to copy my backup to a safe place :crying:
After the pull command you need to tell it what to pull
Sent from my Galaxy Nexus
Pirateghost said:
After the pull command you need to tell it what to pull
Sent from my Galaxy Nexus
Click to expand...
Click to collapse
Sorry Pirateghost, I meant that I wrote as you said:
./adb-mac pull /data/media{0, clockworkmod, twrp}
and I got just the long message from the Terminal and it doesn't work (even when using ./adb without the "-mac")
edit: ok I solved it:
I used this and it seems working (finally)
./adb-mac pull /data/media clockworkmod
ziovelvet said:
Sorry Pirateghost, I meant that I wrote as you said:
./adb-mac pull /data/media{0, clockworkmod, twrp}
and I got just the long message from the Terminal and it doesn't work (even when using ./adb without the "-mac")
edit: ok I solved it:
I used this and it seems working (finally)
./adb-mac pull /data/media clockworkmod
Click to expand...
Click to collapse
the {0, clockworkmod, twrp} was to indicate that you can pull ONE of those folders at a time, or pull /data/media and get ALL of them at once

[Q] ADB pull problem on linux

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.

Categories

Resources