I was going through a question about how to find a saved password in a rooted phone and while doing this I found a file in data/misc/wifi/softap.conf. What is the content of this file?

  • 1
    please consider posting a comment before downvoting....(I am not against downvoting but i should know the reason so that i will not repeat the mistake if any). – Jasser Jul 7 '15 at 6:28

A .conf file is usually readable by any text file reader as long as permissions are correct.

The said file contains SSID and password of your portable Wi-Fi hotspot. E.g.:

Android.SE  #$#$ANDROID

where Android.SE is the SSID which other users would see when trying to locate Wi-Fi network and #$#$ANDROID is the password they need to enter to connect to your hotspot.

As for the name is concerned, I never researched for it because I know ap → Access point, and I've seen softap term in logcat's output when enabling hotspot.

There are other ways to see the content of this file. In my Android 4.2.1, I can do:

adb shell su -c 'service call wifi 30'

As for the Android 5.0 (CM12), it would be:

adb shell service call wifi 36

The output isn't very human-friendly but it's not unreadable, and you can easily see SSID and password of hotspot.

Edit: For those who might wonder what those adb shell .. commands actually does in bits and pieces, here is a missing piece:

  • adb shell: you get a remote shell (access to device)
  • su: to attain root privileges, use if only necessary; -c: is to pass the following command which would be executed with root privileges
  • service: it allows you to read and manipulate services running in your system. Enter adb shell service list to see a list of running ones, and adb shell service to see the command's usage.
  • call connectivity: to call a particular service (connectivity here). Name of services can be found using service list.
  • 36 is the number assigned to a function of the connectivity service amongst many of it, which we're calling here. You can also pass an integer or a string to the function like adb shell service call connectivity 36 i32 1, but it would take effect only if the function has provision to accept such value. Take a look here to see such functions.
  • Correct! it consists of SSID and password(I couldn't recognize it). Bieng a noob in android development i would like to know about "logcat" and the commandline thing "adb shell ....". By the way thankyou for your response. – Jasser Jul 5 '15 at 12:43
  • 1
    @Jasser A quick note: This site is for end-users only, which means all development/programming questions would be off-topic. That said, "logcat" and "adb" is for end-users too, so try How can I get a LogCat?, and as for adb shell: it opens a remote shell on your PC where you can send commands to Android device. More Q/A only on a new question please. :) And do search since your question might be asked before. – Firelord Jul 5 '15 at 13:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.