Using ADB to Determine Package Name and Launchable Activity

Article ID: 92392356

Issue / Question

How to find out the Android application package name to configure in Enterprise Home Screen auto launch?

Determine Android application launchable activity

Applicable To

Android Devices

Resolution / Answer

Overview

Android Debug Bridge (adb) is a versatile command-line tool that lets you communicate with a device. The adb command facilitates a variety of device actions, such as installing and debugging apps, and it provides access to a Unix shell that you can use to run a variety of commands on a device. Read More>>

1. Setup and configure ADB. Read More>> 
2. Type in the following command to list all packages and their associated files. Read More>>

adb shell pm list packages -f


Example:

C:\ADB>adb shell pm list packages -f

package:/system/app/SetupUtility/SetupUtility.apk=com.zebra.printersetup
package:/system/app/com.wavelink.velocity/com.wavelink.velocity.apk=com.wavelink.velocity
package:/system/app/Browser/Browser.apk=com.android.browser




3. Type in the following command to download the target package file. Read More>>

adb pull <remote> [local]


Example: Will download com.wavelink.velocity.apk​

C:\ADB>adb pull /system/app/com.wavelink.velocity/com.wavelink.velocity.apk
/system/app/com.wavelink.velocity/com.wavelink.velocity.apk: 1 file pulled. 3.6 MB/s (22600604 bytes in 6.012s)




4. Download aapt.exe from a reliable source from the Internet then copy it to your ADB folder.



5. Type in the following command to display the values of individual elements or parts for the app declared in APK. Read More>> 

aapt dump badging <package>


Example:

C:\ADB>adb pull /system/app/com.wavelink.velocity/com.wavelink.velocity.apk
/system/app/com.wavelink.velocity/com.wavelink.velocity.apk: 1 file pulled. 3.6 MB/s (22600604 bytes in 6.012s)

C:\ADB>adb pull /system/app/com.wavelink.velocity/com.wavelink.velocity.apk
/system/app/com.wavelink.velocity/com.wavelink.velocity.apk: 1 file pulled. 2.7 MB/s (22600604 bytes in 8.005s)

C:\ADB>aapt dump badging com.wavelink.velocity.apk
package: name='com.wavelink.velocity' versionCode='16301' versionName='1.2.101.16301.4001b0b'
sdkVersion:'19'
uses-permission:'android.permission.WAKE_LOCK'
uses-permission:'android.permission.INTERNET'
uses-permission:'android.permission.WRITE_EXTERNAL_STORAGE'
uses-permission:'com.symbol.emdk.permission.EMDK'
uses-permission:'android.permission.VIBRATE'
uses-permission:'android.permission.ACCESS_WIFI_STATE'
uses-permission:'android.permission.READ_PHONE_STATE'
uses-permission:'android.permission.BLUETOOTH_ADMIN'
uses-permission:'android.permission.BLUETOOTH'
uses-permission:'android.permission.ACCESS_COARSE_LOCATION'
uses-permission:'android.permission.ACCESS_FINE_LOCATION'
uses-permission:'com.honeywell.decode.permission.DECODE'
application-label:'Velocity'
application-icon-120:'res/drawable-ldpi-v4/icon.png'
application-icon-160:'res/drawable-mdpi-v4/icon.png'
application-icon-240:'res/drawable-hdpi-v4/icon.png'
application-icon-320:'res/drawable-xhdpi-v4/icon.png'
application: label='Velocity' icon='res/drawable-mdpi-v4/icon.png'
uses-library-not-required:'com.symbol.emdk'
launchable-activity: name='com.wavelink.velocity.te.HostProfilesActivity'  label='Velocity' icon='res/drawable-mdpi-v4/icon.png'
uses-permission:'android.permission.READ_EXTERNAL_STORAGE'
uses-implied-permission:'android.permission.READ_EXTERNAL_STORAGE','requested WRITE_EXTERNAL_STORAGE'
uses-feature:'android.hardware.location'
uses-implied-feature:'android.hardware.location','requested a location access permission'
uses-feature:'android.hardware.location.gps'
uses-implied-feature:'android.hardware.location.gps','requested android.permission.ACCESS_FINE_LOCATION permission'
uses-feature:'android.hardware.location.network'
uses-implied-feature:'android.hardware.location.network','requested android.permission.ACCESS_COURSE_LOCATION permission'
uses-feature:'android.hardware.bluetooth'
uses-implied-feature:'android.hardware.bluetooth','requested android.permission.BLUETOOTH or android.permission.BLUETOOTH_ADMIN permission and targetSdkVersion > 4'
uses-feature:'android.hardware.wifi'
uses-implied-feature:'android.hardware.wifi','requested android.permission.ACCESS_WIFI_STATE, android.permission.CHANGE_WIFI_STATE, or android.permission.CHANGE_WIFI_MULTICAST_STATE permission'
uses-feature:'android.hardware.touchscreen'
uses-implied-feature:'android.hardware.touchscreen','assumed you require a touch screen unless explicitly made optional'
main
other-activities
other-services
supports-screens: 'small' 'normal' 'large' 'xlarge'
supports-any-density: 'true'
locales: '--_--'
densities: '120' '160' '240' '320'
native-code: 'armeabi' 'armeabi-v7a'

C:\ADB>



 

+ Applicable Products

  • MC3300
  • MC40
  • MC67 NA Mobile Computer
  • MC9200 Mobile Computer
  • TC20
  • TC25
  • TC51
  • TC55 Touch Computer
  • TC56
  • TC70x
  • TC75
  • TC75x
  • TC8000
  • VC80X
  • WT6000 Wearable Terminal