The #1 Nexus 7 News, Discussion and Fan Site!

2012 Nexus 7 Discussion Forums (1st Generation) => Nexus 7 Root, Hacks, Mods And Development => Topic started by: chaikenj on October 09, 2014, 12:23:01 PM

Title: Using adb pull without rooting Nexus7 (2012)
Post by: chaikenj on October 09, 2014, 12:23:01 PM
I want to copy a file from my Nexus7 (2012) before I root the Nexus7.  The file is said to be in /data/misc/wifi, but adb shell won't give me permission for the root data directory and the su command is "not found".  I just want to gain permission to pull a file in the /data directory, or to be a rooted user or a super-user temporarily. Is this impossible to do without rooting the Nexus7?
  The situation seems like catch-22, since if I root my Nexus 7, the file I want will have disappeared.
Any advice?
Title: Re: Using adb pull without rooting Nexus7 (2012)
Post by: matt on October 09, 2014, 01:29:32 PM
Look under sdcard/data/misc/WiFi with file explorer? The data folder under root directory is empty on mine. You should be able to read and copy but not write to protected folders.

Sent from my Le Pan TC1020 using Tapatalk

Title: Re: Using adb pull without rooting Nexus7 (2012)
Post by: chaikenj on October 10, 2014, 08:07:28 AM
If your Nexus7, like mine, is not rooted, you can't see any content in the root data directory.  There are other wifi subdirectories on sdcard and elsewhere that have a file with the name I am seeking (wpa_supplicant.conf), but these files are just templates that don't have the current information that I am seeking.  I am trying to get it from the wifi subdirectory inside the root data directory.
Title: Re: Using adb pull without rooting Nexus7 (2012)
Post by: matt on October 10, 2014, 10:27:54 AM
Yer right, just tried on my rooted 2013. Are you using adb from a computer or a terminal app?

sent by mirrorflash Morse code

Title: Re: Using adb pull without rooting Nexus7 (2012)
Post by: matt on October 10, 2014, 02:15:19 PM
That file seems to store all the WiFi passwords, under system settings/ backup and restore, there is an option to backup WiFi passwords to Google's servers.

Sent from my Le Pan TC1020 using Tapatalk

Title: Re: Using adb pull without rooting Nexus7 (2012)
Post by: chaikenj on October 11, 2014, 12:27:11 AM
Yer right, just tried on my rooted 2013. Are you using adb from a computer or a terminal app?

sent by mirrorflash Morse code

I am using adb from a Windows computer connected to my Nexus78 (2012)
Title: Re: Using adb pull without rooting Nexus7 (2012)
Post by: chaikenj on October 11, 2014, 12:29:01 AM
That file seems to store all the WiFi passwords, under system settings/ backup and restore, there is an option to backup WiFi passwords to Google's servers.

Sent from my Le Pan TC1020 using Tapatalk

Great.  How can I make use of the backed-up WiFi passwords?  (I want to use them on my Nexus7 (2013) but right now they are only on my Nexus7 (2012))
Title: Re: Using adb pull without rooting Nexus7 (2012)
Post by: matt on October 11, 2014, 08:41:49 AM
I leave the first option in backup and reset checked, back up my data, on all devices. When I enter a password on one it automatically transfers to the others.

Sent from my Le Pan TC1020 using Tapatalk

Title: Re: Using adb pull without rooting Nexus7 (2012)
Post by: chaikenj on October 14, 2014, 06:07:30 PM
I leave the first option in backup and reset checked, back up my data, on all devices. When I enter a password on one it automatically transfers to the others.

Sent from my Le Pan TC1020 using Tapatalk

But the list of WiFi networks on one device is not the same as on the other.  Do you think if I am using Nexus7 (2013) and come to a WiFi network whose password is stored on Nexus7 (2012), the Nexus7 (2013) will mysteriously know the password?
Title: Re: Using adb pull without rooting Nexus7 (2012)
Post by: matt on October 14, 2014, 07:46:59 PM
If it doesn't, there is a method to use adb bmgr on the rooted device to restore from the google backup set of the other.

Sent from my Le Pan TC1020 using Tapatalk

Title: Re: Using adb pull without rooting Nexus7 (2012)
Post by: matt on October 14, 2014, 08:28:30 PM
http://www.ehow.com/how_8784894_transfer-one-android-phone-another.html

Also, if you enable backup, then root, then check restore when setting it up again, the WiFi passwords should be there.

Sent from my Le Pan TC1020 using Tapatalk

Title: Re: Using adb pull without rooting Nexus7 (2012)
Post by: chaikenj on October 14, 2014, 11:12:27 PM
if you enable backup, then root, then check restore when setting it up again, the WiFi passwords should be there.

Thanks Matt--
Please let me know if the following plan of action sounds correct and complete to you.
On my Nexus7 (2012) I have enabled backup to the Google servers and also restore. It allows developer mode and USB connection.  It runs KitKat 4.4.4
I am planning to use the WugFresh Nexus Root Toolkit 1.8.8, as the interface seems understandable to a newbie like me.

1.  I download NRT_v1.8.8.sfx.exe to my Windows Vista computer and run it to install the Toolkit.
2.  Since the Vista computer already runs Android SDK (which includes ADB and Fastboot) and connects to the Nexus7, I assume I won't have to install any drivers.  But anyway WugFresh Toolkit seems to have a Step 3 that will test the drivers.
3.  I'm not going to backup anything to the PC, because the only file I want to save is presumably on the Google backup server.
4.  I connect the Nexus7 by USB and push the "Unlock" button in WugFresh Toolkit.
5.  I click the "custom recovery" box (I don't understand why) and push the WugFresh Toolkit button "Root".
After following instructions, I restart the Nexus7 and enter my account information and ask to restore my files from the Google server.  I am unclear whether there will now be PlayStore apps on my Nexus7 again -- I don't really want them.
6.  One of my apps already is SuperSU (but of course it doesn't do anything right now because my Nexus7 has not been rooted).  I install and run SuperSU (I don't understand this either).
7.  Then, if necessary, I uninstall apps I don't want, and I reinstall apps I want plus other apps that work on a rooted Nexus7.
8.  Now I will be able to find the file I want, which is said to be in /data/misc/wifi, and I can save it somewhere.
Title: Re: Using adb pull without rooting Nexus7 (2012)
Post by: matt on October 15, 2014, 06:26:12 AM
if you enable backup, then root, then check restore when setting it up again, the WiFi passwords should be there.

Thanks Matt--
Please let me know if the following plan of action sounds correct and complete to you.
On my Nexus7 (2012) I have enabled backup to the Google servers and also restore. It allows developer mode and USB connection.  It runs KitKat 4.4.4
I am planning to use the WugFresh Nexus Root Toolkit 1.8.8, as the interface seems understandable to a newbie like me.

1.  I download NRT_v1.8.8.sfx.exe to my Windows Vista computer and run it to install the Toolkit.

2.  Since the Vista computer already runs Android SDK (which includes ADB and Fastboot) and connects to the Nexus7, I assume I won't have to install any drivers.  But anyway WugFresh Toolkit seems to have a Step 3 that will test the drivers.
Not sure of vista, due to usb updates, I'd upgrade to 7, but √
3.  I'm not going to backup anything to the PC, because the only file I want to save is presumably on the Google backup server.

4.  I connect the Nexus7 by USB and push the "Unlock" button in WugFresh Toolkit.
Test drivers first. You're dealing with chip set and windows USB functionality as well as correct? adb drivers and quality of USB cable. Of the 5 ports on my laptop, only one works correctly for adb.
5.  I click the "custom recovery" box (I don't understand why) and push the WugFresh Toolkit button "Root".
The recovery is needed to flash new su binaries to system.





After following instructions, I restart the Nexus7 and enter my account information and ask to restore my files from the Google server.  I am unclear whether there will now be PlayStore apps on my Nexus7 again -- I don't really want them.
Probably, delete them.
6.  One of my apps already is SuperSU (but of course it doesn't do anything right now because my Nexus7 has not been rooted).  I install and run SuperSU (I don't understand this either).
It is the gateway to root access, you may need to update binaries within the app to get it working right. Su = Linux command to switch user, with no other parameters it defaults to root user.

7.  Then, if necessary, I uninstall apps I don't want, and I reinstall apps I want plus other apps that work on a rooted Nexus7.

8.  Now I will be able to find the file I want, which is said to be in /data/misc/wifi, and I can save it somewhere.


As long as you don't recheck the backup option, the old dataset for that device will still be on the server. Every time you uncheck it deletes the old backup. Goto settings, your accounts, google, and enable all the syncs to ensure backups.You may need to let it restore for quite some time during setup. Depending on number of apps installed.

As long as the backup set for that device isn't erased, it may be possible to retrieve it manually with adb bmgr command, should something fail.

Sent from my Le Pan TC1020 using Tapatalk
Title: Re: Using adb pull without rooting Nexus7 (2012)
Post by: chaikenj on October 20, 2014, 07:26:09 PM
if you enable backup, then root, then check restore when setting it up again, the WiFi passwords should be there.

OK, Matt, thanks, my Nexus 7 is now rooted, following your annotated instructions.  SuperSU is working on my Nexus 7 and also BusyBox.  However, I still don't understand how to give myself root access to be able to see and copy the file I want in /data/misc/wifi.  I was able to give "adb shell" root access, so I know the file I want is there, but I can't figure out how to give root access to adb itself.

  I also installed RootExplorer on my Nexus 7 and don't understand it at all (maybe not the right RootExplorer).  Please tell me how to give root access to root explorer or another file explorer on the Nexus 7.
Title: Re: Using adb pull without rooting Nexus7 (2012)
Post by: chaikenj on October 20, 2014, 07:32:33 PM
if you enable backup, then root, then check restore when setting it up again, the WiFi passwords should be there.

By the way, after rooting, the only apps that were on my Nexus7 are the apps that Google supplies with a new Nexus7.  (This is how I wanted it.)
Title: Re: Using adb pull without rooting Nexus7 (2012)
Post by: matt on October 21, 2014, 12:01:02 AM
I use es file explorer. In the left side expand tools and turn root explorer on. With the app root explorer there's a mount rw button for read/write operation, default is ro read only.

(http://img.tapatalk.com/d/14/10/21/pa8u5uvy.jpg)

(http://img.tapatalk.com/d/14/10/21/atanyva4.jpg)
Sent from my Le Pan TC1020 using Tapatalk
Title: Re: Using adb pull without rooting Nexus7 (2012)
Post by: chaikenj on October 21, 2014, 10:07:06 AM
I use es file explorer. In the left side expand tools and turn root explorer on. With the app root explorer there's a mount rw button for read/write operation, default is ro read only.


Thanks, that works.  I can read the wifi passwords file that I wanted, but it does not have the info from before rooting. So I am trying to restore from Google backup again.   I removed my Google account and then, on the new setup of the same account, the only check-choice I have is "BACKUP AND RESTORE.....[] Back up data to your Google account"    I have not checked that because of your advice....  and I don't  get any restore option.
  Now what?  I am thinking of checking the box because I  am assuming I can't be worse off than I am now (which is, no access to my previous WiFi passwords file).  What do you suggest?
Title: Re: Using adb pull without rooting Nexus7 (2012)
Post by: matt on October 21, 2014, 03:08:35 PM
If you're rooted, download a terminal emulator and read up on using adb bmgr. One of the commands will show the backups on google server tied to the device ids. Then using an I'd you can force it to backup to your device.

Sent from my Le Pan TC1020 using Tapatalk

Title: Re: Using adb pull without rooting Nexus7 (2012)
Post by: matt on October 21, 2014, 03:32:00 PM
http://android.stackexchange.com/questions/42245/google-backup-multiple-devices-using-the-same-account-what-happens-on-restore

You shouldn't need shell in a terminal. Just su. Then bmgr list sets. Then  bmgr restore set name. Then maybe bmgr run.

(http://img.tapatalk.com/d/14/10/22/zemare9e.jpg)

Sent from my Le Pan TC1020 using Tapatalk
Title: Re: Using adb pull without rooting Nexus7 (2012)
Post by: matt on October 21, 2014, 03:43:31 PM
It may be that the backup wasn't completed on the server,  delayed or something, sorry. I'm not seeing several of my devices for some reason.

Sent from my Le Pan TC1020 using Tapatalk

Title: Re: Using adb pull without rooting Nexus7 (2012)
Post by: chaikenj on October 21, 2014, 04:21:35 PM
It may be that the backup wasn't completed on the server

Thanks.  I used "bmgr list sets" and find two sets, one for each of my Nexus7s.  I cannot tell which is which, because the hex number is not the serial number or MAC address or anything I can find.

Now I'll look up the subcommands for bmgr ....
Title: Re: Using adb pull without rooting Nexus7 (2012)
Post by: chaikenj on October 21, 2014, 04:56:32 PM
It may be that the backup wasn't completed on the server

Thanks.  I used "bmgr list sets" and find two sets, one for each of my Nexus7s.  I cannot tell which is which, because the hex number is not the serial number or MAC address or anything I can find.

Well, well!  I used "bmgr restore" for the first-named Nexus7 and Google restored all my apps and WiFi networks.  My project is finished!   Thanks for your help, Matt...  this solution to my "adb pull" question certainly is not well documented.
Title: Re: Using adb pull without rooting Nexus7 (2012)
Post by: matt on October 21, 2014, 07:27:26 PM
Flying by the seat of my pants on this one, lol. Great!

Sent from my Le Pan TC1020 using Tapatalk

Title: Re: Using adb pull without rooting Nexus7 (2012)
Post by: chaikenj on October 22, 2014, 09:12:48 PM
I am posting the answer to my question, as the thread is lengthy.

1. I wanted to get wifi passwords off my old Nexus7 (not rooted) to use on my new 2nd gen LTE
2. All the apps that would show wifi passwords needed root
3. But I was told if I installed the program adb on my Windows computer I could pull the file /data/misc/wifi/wpa_supplicant.conf, which contains the wifi passwords, even without rooting
4. This advice is NOT TRUE --you need root to pull this file to your computer using adb
5.I rooted my old Nexus7. But on startup it did not offer a choice of restoring from Google's servers
6. I installed a terminal emulator and ran bmgr restore
Google downloaded my wifi passwords and all apps to my Nexus7
7. Since the Nexus 7 is now rooted, there are various ways I can see the passwords.