0

We need to connect the wifi programmatically such that user cannot check the password for connected wifi using application in rooted phones. Is there any way or algorithm we could use to protect the password.

Navdroid
  • 1,541
  • 3
  • 25
  • 52
  • The password is stored in configuration setting, and is in plain text, and is owned by root. On rooted handsets, that will be visible once you know where to look. In short, the answer is no, that is a server side configuration, and anyway, what is the reason for programmatically connecting to a secure wifi? Just enter it once, wpa-supplicant will remember next time. – t0mm13b May 10 '16 at 06:53
  • Yes there are but your app will also have the code to decrypt that pass to plain text so.... You know... It's impossible to protect it – Pedro Oliveira May 10 '16 at 07:53

1 Answers1

0

Yes, you can do it as follows, if you want to hide password, save in encrypted and decrypt it only at runtime.

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

Community
  • 1
  • 1
Ashish Rawat
  • 5,541
  • 1
  • 20
  • 17
  • 2
    The decryption algorithm would be seen when reverse engineered. The OP seemed concerned with rooted handsets, implying tech-savvy users, who could decompile the apk. – t0mm13b May 10 '16 at 06:58
  • In a rooted device, the user might even capture the key at the driver level, when the program configures it. No need to decrypt: wait til its decrypted. – curiousguy Sep 26 '17 at 05:23