react-native-tethering icon indicating copy to clipboard operation
react-native-tethering copied to clipboard

Error: Arp table reading failed, are you using targetSdk 32 and an Android 13 device? when calling getConnectedDevices()

Open ghost opened this issue 1 year ago • 1 comments

Error: Arp table reading failed, are you using targetSdk 32 and an Android 13 device?

getConnectedDevices() returns an empty array, I had to look into logs and I discovered that Google introduced some restrictions in Android 10

"Android 10 introduces several privacy-related restrictions that disallow apps to access certain information that could be potentially misused for fingerprinting and data collection. One of among them is the restriction on access to /proc/net filesystem on devices that run Android 10 or higher, apps cannot access /proc/net, which includes information about a device's network state. Apps that need access to this information, such as VPNs, should use the NetworkStatsManager or ConnectivityManager class."

ghost avatar Feb 18 '24 18:02 ghost

Android 13 & 14 need more testing but unfortunately I don't have currently any devices to do more testing on them. if you can fix this in your side please make a PR

aboozaid avatar Feb 23 '24 18:02 aboozaid