nmilcoff / BreachDetector

Detect root, emulation, debug mode and other security concerns in your Xamarin apps
MIT License
89 stars 14 forks source link

Crash on: IsRunningOnVirtualDevice() #5

Closed jamesmontemagno closed 4 years ago

jamesmontemagno commented 4 years ago

Looks like there may be some weird packaging issue. If you create a new project, bring in the nuget and run - IsRunningOnVirtualDevice you get a crash

Java.Lang.UnsatisfiedLinkError: 'dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.qwertylolman.breachdetectortest-xFII-F5aHtB3vLsHVPWkCQ==/base.apk"],nativeLibraryDirectories=[/data/app/com.qwertylolman.breachdetectortest-xFII-F5aHtB3vLsHVPWkCQ==/lib/arm64, /data/app/com.qwertylolman.breachdetectortest-xFII-F5aHtB3vLsHVPWkCQ==/base.apk!/lib/arm64-v8a, /system/lib64, /system/product/lib64]]] couldn't find "libanti.so"'

I believe that this is because the .so file isn't being packed in.

nmilcoff commented 4 years ago

Thanks for reporting James, I can also reproduce this in the java test app -> https://github.com/strazzere/anti-emulator/issues/14

I will remove this dependency for now, it only adds a few more (smart) checks for detecting emulation.

nmilcoff commented 4 years ago

For the record: I didn't remove the dependency but fix the problem in the original lib in this fork. Also pushed the changes to the original repo: https://github.com/strazzere/anti-emulator/pull/15