This library is born because Google has removed the possibility to use command like ip neigh
for all the apps with targetSDK 30
.
More precisely apps cannot bind netlink socket when targeting Android API 30, then apps cannot retreive Arp table anymore.
With this library, you can easily do that!
Step 1. Add the JitPack repository in your root build.gradle
file at the end of repositories
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
Step 2. Add the dependency
dependencies {
...
implementation 'com.github.fulvius31:ip-neigh-sdk30:v0.0.3alpha'
}
Use this library, is pretty easy. You have to call a method from the library that returns a String.
import it.alessangiorgi.ipneigh30.ArpNDK;
...
String arpTable = ArpNDK.getARP();
This library does not work with Android 13 devices if you use targetSdk
equals to 32
.