8

I'm connected to a wifi spot with my android, but i'd like to connect with my laptop aswell. I don't want to root my phone (warranty and stuffs) nor reset the router, as it has complex settings on it. I tried recovering the password from /data/misc/wifi/wpa_supplicant.conf using adb, but i get an error, which sent me on a rabbithole of solutions until i met a dead end. I'll post the steps i followed bellow, i would like someone to tell me if i goofed on any step.

(I wanted to post images, but i need 10 reputation, sorry)

So i enter on adb and i check if my device is recognized using

>adb devices

Everything seems fine, i proceed to try to pull out the config file with

>adb pull /data/misc/wifi/wpa_supplicant.conf c:/wpa_supplicant.conf

At this step i get this message:

failed to copy from "...." to "..." : permission denied.

So i searched for a solution for this and i found that i have to use "adb root" to restart adb with root permissions. I try it, but i get this message.

adb can't run as root on production builds.

So again, i went down the rabbit hole, and i found someone else with the same problem, who says that solved it using ">adb shell" and then "$ su". I'm getting tired, but i try it, i go to shell, and everything seems fine i get into shell@android with no problem, now i only need to access as su, but as i try i get this message:

system/bin/sh: su: not found

Now this may or may not have to do with this (i'm a noob), but if i used "adb devices" while on shell, or right after exiting it, no devices would appear listed, even if i checked before doing all the above.

I'm very noob at this and i'm sure i'm messing up somewhere, but i can't find where and its getting late. I've spent 2 hours aready looking for solutions and every step deeper i get, less results i get because any of the above solutions worked for other people. Does anybody have any idea on how to access that damned file without rooting my phone?

(I can use my phone as router usb while i'm connected to the wifi, but i'd rather have the freedom of knowing the password, as i'm going to stay here for the whole summer)

Miaur
  • 81
  • 1
  • 1
  • 3
  • 1
    The root is a process of placing the su's binary in the required path so that, when you issue 'su' it executes (granted or denied is a different flow). Without rooting IMHO you cant. Period. – Narayanan Jul 01 '15 at 07:43
  • 1
    Neither you nor ADB seems to have the privilege to access wpa_supplicant.conf. I'm aware of few ways to get the access: – Firelord Jul 01 '15 at 10:22
  • 2
  • You root the device and be happy for life, 2) You try the hard way. a) ADB Backup should possibly be able to get its hand on that file, never verified it, so can't be sure here. b) If your Recovery allows adb shell then you're good to go for adb pull in Recovery mode, c) If you can extract the backup made by your Recovery then make backup and extract it to get the file, d) If there is a tool that can dump your device's storage whose content you somehow can access, then go ahead and take dump. /// As you would have noticed, Root is comparatively very easy.
  • – Firelord Jul 01 '15 at 10:22
  • 1
    Resetting the router would be a better option to save time IMO, if the device isn't rooted. – Firelord Jul 01 '15 at 10:24
  • If you're in luck you can connect to the router without any wireless key using WPS. Many routers have this disabled by default but if the Windows password prompt states you could also connect by pressing a button, you could try and search for any WPS buttons on the router. This requires physical access to the router but doesn't require any password or resetting. – gertmenkel Sep 06 '16 at 10:15