3

How can I get Wifi Signal Strength Level On android phone with linux? My Android phone is plug in via usb to linux. I use adb module to communicate with my phone "adb shell". I access in android shell and I search the file or the directory in the android phone shell with the Wifi Signal Strength Level. I would like use a linux command from python via popen module.

  • The output from `adb shell "dumpsys | grep RSSI:"` might be challenging to parse from a python subprocess. Your line of least resistance is to snarf and modify some of the code from the question I linked to and install that on your phone. Then call that from `subprocess.call()` – Niall Cosgrove Oct 05 '17 at 11:23
  • Thanks it's clear for me. – Search solution Oct 05 '17 at 11:58

1 Answers1

2

Android will give you the WiFi signal strength as an RSSI value. This will be a number between -100 and 0 dBm, where 0 is the strongest and -100 is the weakest signal.

A quick and easy method to find the RSSI via adb shell is to use dumpsys

For example:
adb shell "dumpsys | grep RSSI:"

There are some related questions getting-wifi-signal-strength-in-android and how-to-get-the-connection-strength-of-wifi-access-points that are worth reading if you would like to write a more directed tool for the job.

WifiManager.startScan() and WifiManager.getScanResults() are the api calls you would use for that.

Niall Cosgrove
  • 1,273
  • 1
  • 15
  • 24
  • I have an other question. I would like to find the Wifi Signal Strength Level in percent. Because with adb shell "dumpsys | grep RSSI:" command I have just the signal strength in dbm. – Search solution Oct 06 '17 at 14:40
  • @search-solution What steps have to taken to solve this problem yourself? – Niall Cosgrove Oct 06 '17 at 14:45