Verify how an Instant App in Android is launched

隐身守侯 提交于 2020-06-01 06:18:52

问题


According to the documentations, an Instant App is downloaded via Google Play and launched on the fly. It is not installed but is rather cached in the Android system. As a developer and user, I would like to validate this behaviour.

I have tried running Clash Royale by hitting the "Try now" - that is when a splash screen is shown with a progress bar (assuming that's when the feature APK is downloaded?) and it launches soon. On exit, there is no application icon which is expected.

In the device storage I looked for trace of the APK but with no success. Do I need ROOT permissions to see this? Is there a way to inspect and verify?


回答1:


There is still an APK installed.

For O+ devices, run adb shell pm path com.supercell.clashroyale after TRY NOW

And you'll see:

package:/data/app/com.supercell.clashroyale-CUaYOumzCbUDNAdv1MRtRg==/base.apk
package:/data/app/com.supercell.clashroyale-CUaYOumzCbUDNAdv1MRtRg==/split_split_2_tutorial_battles.apk

Do it again after INSTALL (for comparison), and you'll see:

package:/data/app/com.supercell.clashroyale-0Dn0s6yq6WqGCRZ9ETT8bA==/base.apk
package:/data/app/com.supercell.clashroyale-0Dn0s6yq6WqGCRZ9ETT8bA==/split_config.arm64_v8a.apk
package:/data/app/com.supercell.clashroyale-0Dn0s6yq6WqGCRZ9ETT8bA==/split_config.en.apk
package:/data/app/com.supercell.clashroyale-0Dn0s6yq6WqGCRZ9ETT8bA==/split_config.xxxhdpi.apk

(For pre-O devices, the first part won't work, but I don't know any other cmd that will do the same)



来源:https://stackoverflow.com/questions/59620006/verify-how-an-instant-app-in-android-is-launched

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