'aapt dump badging' on ADB shell
adb shell dumpsys
will give you ton of information, including launchable activities. For example, the output will list activities that react to the action android.intent.action.MAIN
:
android.intent.action.MAIN:
423fff90 com.android.bluetooth/.bpp.BluetoothBppActivity filter 42400218
424003d0 com.android.bluetooth/.bpp.BluetoothBppSetting filter 42400608
42400758 com.android.bluetooth/.bpp.BluetoothBppPrintPrefActivity filter 424009b8
42400b08 com.android.bluetooth/.bpp.BluetoothBppStatusActivity filter 42400d60
42400f10 com.android.bluetooth/.bpp.BluetoothBppAuthActivity filter 42401158
42408bb8 com.google.android.apps.books/.app.BooksActivity filter 42408e88
42414f50 com.android.providers.calendar/.CalendarContentProviderTests filter 42415270
42415a38 com.android.providers.calendar/.CalendarDebug filter 42415c28
42415df0 com.android.providers.calendar/.CalendarDebugActivity filter 42416048
...
Note that the output is huge; you might want to limit the output. You can see what sub-categories dumpsys knows about at the top of its output:
Currently running services:
SurfaceFlinger
accessibility
account
activity
alarm
...
package
...
In your case you're probably interested in only the output of adb shell dumpsys package
.
Related videos on Youtube
Comments
-
Ben about 2 years
I'm trying to get a list of apps and their launchable activities from a command line. I know that
aapt dump badging
will give me this information. I'm just wondering if I can get this information from within the context of an ADB shell. I realize I could pull the files to the local machine, but some of the APKs are rather large, so I'd prefer to just get that information directly from the device...
-
Ben about 11 yearsperfect. now I just have to figure out the grep command to grab them from that monstrosity. :)