Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how Google home can get specific wifi's password programmatically?

In google home app, the app can connect with GoogleHome without asking password for connecting.

Even though, the app doesn't have root permission to do that. How google home can connect with device?

like image 777
DongHo Lee Avatar asked Feb 01 '17 01:02

DongHo Lee


People also ask

How do I extract a saved Wi-Fi password?

In Network and Sharing Center, next to Connections, select your Wi-Fi network name. In Wi-Fi Status, select Wireless Properties. In Wireless Network Properties, select the Security tab, then select the Show characters check box. Your Wi-Fi network password is displayed in the Network security key box.

Can you reveal a Wi-Fi password?

On the Wi-Fi network's overview page, select the Share button. You'll need to confirm your face/fingerprint, or enter your PIN code, to proceed. Once you do, you'll see your network's Wi-Fi password listed below a QR code.

How do I connect to a specific Wi-Fi network in Android programmatically?

First and foremost, add permissions in your manifest file. These 4 permissions are required to make changes in your device network connectivity. Setup configuration to connect one specific wifi using WifiConfiguration. WifiConfiguration config = new WifiConfiguration();


1 Answers

Short answer: you cannot access the Wi-Fi password without root access. (with root it's just stored as plain text on disk)

What Google does (I'm guessing) is to get your Wi-Fi password from your Android Phone's backup. After all, after resetting your Android phone you just have to log in to your account and you magically have your Wi-Fi passwords back.

Note: They could also be using a private API, but as that would be a security risk, my best guess is the solution above.

Note2: This is very much in line with what Apple does in their WAC set up protocol. They've provided a proprietary flow to set up "Made for iOS" devices so you don't have to ask a user for her password.

like image 68
Jeroen Mols Avatar answered Sep 22 '22 12:09

Jeroen Mols