I am trying to get the WiFi passwords programmatically from a non-rooted Android device.
All I need is to be able to read the passwords, I do not need to be able to edit them.
Can I get permission in the manifest file?
This is not possible as this would be a major security risk.
You may be able to if the phone is rooted but I do not know, I would imagine, and hope, even if you could get to where it is stored on the phone, it would be encrypted.
If your application is a privileged app (that is - installed in /system/priv-app
for example using SuperUser) then you can use the new WifiManager#getPrivilegedConfiguredNetworks()
API in Lollipop and newer.
See: https://android.googlesource.com/platform/frameworks/base/+/758bdf4a915c313f1c3bef0b95b494c91f363f03%5E%21/#F1
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With