How to determine the package name of an Android App
Occasionally it’s necessary to know the package name of an Android app. The package name is a unique name to identify a specific app. Generally, the package name of an app is in the format domain.company.application, but it’s completely up to the app’s developer to choose the name. The domain portion is the domain extension, like com or org, used by the developer of the app. The company portion is usually the name of the developer’s company or product. The final application portion usually describes the app itself. This could be one word or multiple words separated by periods.
For example, com.amazon.tv.launcher is the package name of the Fire TV’s home screen launcher app, org.xbmc.kodi is the package name for Kodi, and eu.bandainamcoent.pacman256 is the package name of the PAC-MAN 256 game released by the European division of Bandai Namco Entertainment. This guide will show you several ways to determine the package name of an app.
Method 1: Using AAPT with the APK file
If you have the APK on your PC, you can use AAPT to retrieve the APK’s package name. AAPT is one of the command line utilities that come with the Android SDK. Open a command line and enter aapt.exe dump badging [path-to-apk] if you’re using Windows, or aapt dump badging [path-to-apk] if you’re using a Mac or Linux. Be sure to replace [path-to-apk] with the full path to the APK file on your PC. A lot of information about the APK file will be printed, but near the top will be an area that says something like package: name=’org.xbmc.kodi’
Method 2: Using ADB if the app is already installed
If the app is already installed on your Fire TV or other Android device, you can run a shell command that lists all the apps, with their package names, that are installed on your device. First, connect to your device via ADB, then run the command adb shell pm list packages -3 -f. That will list all the apps you’ve personally installed on the device. If you want to see a list of all the apps, including system apps, then run the command adb shell pm list packages -f instead. Each line of the app list that is displayed will end in the app’s package name. For example, package:/data/app/org.xbmc.kodi-1/base.apk=org.xbmc.kodi is the line for Kodi. The package name should be descriptive enough for you to be able to pick out the app you’re looking for.
Method 3: Using the Appstore URL or Page
Depending on where you’re downloading the app from, the URL or page may contain the package name. The Google Play Store, for example, puts the package name of the app in the URL after the text id=. Amazon’s appstore used to list the app’s package name as the “Manufacturer reference” label. Amazon also lists the package name as the “Manufacturer Part Number (MPN)” when you query their API for product information of an app. The above methods are sure fire ways to retrieve an app’s package name, but the appstore page may also have it listed.
Thanks for this. I actually found 2 Google Play Store APKs within that I assumed would have been deleted with the deletion of the app. I now only see each preferred and installed APK after ridding the GPS APKs from a rooted Fire TV.
Can you use these package names via Firestarter to download the apps? I am looking for the directv app url from Google play store. So I can side load on fire tv box with Firestarter.
This application shows all the apps ith package name