0

If you try to download and install an APK of Instagram or TikTok on an AVD it will not be installed and you will get an error but the same APK would work on a physical device, I would like to restrict an app to be installed on an emulator device in the same way, For that, I have tried adding these to the AndroidManifest.xml but it doesn't seem to be working even on a signed APK.


<uses-feature android:name="android.hardware.sensor.accelerometer" 
              android:required="true" />
<uses-feature android:name="android.hardware.sensor.compass"
                  android:required="true" />

I precise it, I want to prevent the app from installation not from starting!

Meglali20
  • 11
  • 1
  • 6
  • No, it checks after installation and exits when app starts, I need to prevent installation as I have precise. – Meglali20 Nov 27 '20 at 20:20
  • Whats the actual error you get? – David Kroukamp Nov 27 '20 at 20:25
  • The solution you suggested would let the apk install successfully and then exit the app only after it starts( if it checks that it's an emulator), it's not logical! I would like the same solution that the apps I mentioned are using to make the installation fail. – Meglali20 Nov 27 '20 at 20:42
  • I'm trying to find out what the error says you still haven't posted. I don't know of any way of stopping an install on a emulator, only after its run. – David Kroukamp Nov 27 '20 at 20:43
  • Exactly I need that way of stopping install on an emulator, If you use the same apk and try to install Instagram on an AVD the installation will fail but it will succeed on a physical device! – Meglali20 Nov 27 '20 at 20:48
  • But you don't give an error message? – David Kroukamp Nov 27 '20 at 21:05
  • The given error during installation is "The APK failed to install. Error: Could not parse error string." – Meglali20 Nov 27 '20 at 21:44
  • Lol yeah that doesn't sound like some any emulator install going on mate. So don't think it's that. Nothing like that exists to my knowledge – David Kroukamp Nov 28 '20 at 03:30

0 Answers0