Android Instant Apps - Can not “Run unverified software, run arbitrary native code”. Only Instant Apps runtime

大兔子大兔子 提交于 2019-12-01 15:28:03

问题


Android Instant Apps documentation states in the restricted features section that it can not:

Run unverified software, run arbitrary native code, or load code dynamically other than the code provided by the Instant Apps runtime.

I don't fully understand the above statement but it sounds to me like it may not accept any third party software or any native libraries other than libraries given in SDK/NDK.

Could someone help to elaborate?


回答1:


This statement:

Prepare your app > Restricted features

Run unverified software, run arbitrary native code, or load code dynamically other than the code provided by the Instant Apps runtime.

Refers to APKs, libraries, or code that is sideloaded, not packaged within the original apk.

unverified software

  • In other words, only the signed apk and its contents are allowed.

arbitrary native code

  • Everything must run from your apk or be provided by the framework.

load code dynamically

  • Such as use of DexClassLoader to retrieve stuff that’s not already packaged with the apk.



回答2:


You can use third-party libraries. What you can't do, for example, is download a binary from your server at runtime and run that.




回答3:


An unofficial answer from an official Google representative was that with Instant Apps, unlike normal apps, there is no technical way to run downloaded code, or load classes dynamically. For normal apps, the restriction is written in Play Store Developer Policy, and is enforced only on Play Store via standard security monitoring procedures.



来源:https://stackoverflow.com/questions/45499287/android-instant-apps-can-not-run-unverified-software-run-arbitrary-native-co

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!