Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 879
John Klein Avatar asked Dec 20 '22 19:12

John Klein


1 Answers

You can try this:

adb shell am start -n com.android.vending/com.google.android.finsky.activities.MainActivity
like image 82
rav_kr Avatar answered Jan 23 '23 04:01

rav_kr