From e6e00bbb2c9486ca5c716a5d70817532f0876a2d Mon Sep 17 00:00:00 2001 From: Fan Date: Mon, 17 Aug 2020 17:20:13 +0800 Subject: [PATCH] update method to find wifi password (#77) --- README.en.md | 19 +++++++++++++++++++ README.md | 17 +++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/README.en.md b/README.en.md index c1d6f17..81bd76c 100644 --- a/README.en.md +++ b/README.en.md @@ -2124,6 +2124,25 @@ network={ `Ssid` we shall see in the WLAN settings in the name,` psk` the password, `key_mgmt` security encryption. + +If android version is above O, the path of config file should be in `WifiConfigStore.xml`. + +```sh +adb shell +su +cat /data/misc/wifi/WifiConfigStore.xml +``` + +Example output: + +> because of too many items in the file, it can be focused on `ConfigKey`-- WiFi name and `PreSharedKey` -- WiFi password. + +```xml +"Wi-Fi"WPA_PSK +"931907334" +``` + + ### To set the system date and time ** Note: You need root privileges. ** diff --git a/README.md b/README.md index 149913b..ff80907 100644 --- a/README.md +++ b/README.md @@ -2154,6 +2154,23 @@ network={ `ssid` 即为我们在 WLAN 设置里看到的名称,`psk` 为密码,`key_mgmt` 为安全加密方式。 +如果Android O 或以后,WiFi密码保存的地址有变化,是在`WifiConfigStore.xml`里面 + +```sh +adb shell +su +cat /data/misc/wifi/WifiConfigStore.xml +``` + +输出格式: + +数据项较多,只需关注`ConfigKey`(WiFi名字)和`PreSharedKey`(WiFi密码)即可 + +```xml +"Wi-Fi"WPA_PSK +"931907334" +``` + ### 设置系统日期和时间 **注:需要 root 权限。**