Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

get launchable activity name of package from adb

Tags:

android

adb

Is there a way to get the launchable activity for a package from using adb? For an unroot phone (i.e. without having the pull the apk from /data/app directory and inspect with appt).

I tried dumpsys, but it does not include information on default launchable activity.

Thanks

like image 422
fruitJuice Avatar asked Oct 02 '12 21:10

fruitJuice


People also ask

How do I find my package name and activity name?

Step 1: Download “APK Info” app from Google Play Store on your android mobile. Step 4: Click the option “Detailed Information” option. It would show the detailed log for the app. Step 5: Then to find the appActivity name of the app, scroll down to the sub-section “Activities”.

How do I find my current activity name adb?

You can find current activity name in activity stack.


1 Answers

You don't need root to pull the apk files from /data/app. Sure, you might not have permissions to list the contents of that directory, but you can find the file locations of APKs with:

adb shell pm list packages -f 

Then you can use adb pull:

adb pull <APK path from previous command> 

and then aapt to get the information you want:

aapt dump badging <pulledfile.apk> 
like image 109
kabuko Avatar answered Sep 28 '22 03:09

kabuko