简体   繁体   中英

How can I launch and execute Vending.apk on the Android Emulator from adb

I've been trying to install Vending.apk into my emulator w/o success. It says it already exists and fails to replace it when I use adb install -r. The icon does not show up on the screen so I can't tap it to launch the Google Play marketplace.

Therefore, I thought I could run it from my PC (MacOSX) using adb like this:

adb shell am start -a android.intent.action.MAIN -n com.android.vending/.Vending

I constructed the above from examples that work in this article: How to run (not only install) an android application using .apk file?

And I unzipped the AndroidManifest.xml file using info from this method to see if I could discover the activity name, but no luck:

aapt dump xmltree <apk-file> AndroidManifest.xml

I guess I need to know the exact command to execute the vending apk because I can't seem to find the correct Activity class. adb shell am start keeps giving me error type 3, Activity class does not exist.

Thanks

你可以试试这个:

adb shell am start -n com.android.vending/com.google.android.finsky.activities.MainActivity

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM