Adb command to Print the path to the .apk of the data and system PACKAGE

First we need to identify whether the package we are looking for to identify apk name has been installed or not. For example, we are looking for a package “com.linkedin.android” which is a Linkedin android application.

 $ adb shell cmd package list package | grep linkedin 

If this command returned like “package:com.linkedin.android” it means the application has been installed and command returned with the package name. If the application is not installed above command will return empty.

Now, using the above package name, we can identify the path as,

 $ pm path com.linkedin.android                                    
package:/data/app/com.linkedin.android-VIOCcgXsvHQIZu8pnDQ9Og==/base.apk 

Since this is an application installed from playstore, it shown the path in /data/app, now lets identify the location of any system application.

 $ cmd package list package | grep launcher                                       <
package:com.evenwell.foxlauncher.partner
package:com.android.launcher3
package:com.evenwell.foxlauncher.overlay.base.s600ww
package:com.android.launcher3.overlay.base.s600ww
 $ pm path com.android.launcher3
package:/system/priv-app/NBBLauncher/NBBLauncher.apk

This shown the path of the launcher on Nokia 7+ mobile.

Android Android Commands Android Java Applications Application Libraries Application Stack / User Interface Bash / Shell Scripts Commands and Packages Compilation Content Management System - CMS Core Kernel C Programs Development & Build Development Environment Setup Errors & Failures Flutter git Go Language Programs Hardware Platforms HTML JAVA Programs Kernel & Device Drivers Linux, OS Concepts and Networking Linux Device Drivers Linux Host, Ubuntu, SysAdmin Linux Kernel Linux Networking Middleware Libraries, HAL Monetization / Google AdSense Multimedia - Audio, Video, Images NDK / Middleware / HAL OS Concepts PHP Programming Languages RaspberryPi Scripting and Automation Search Engine Optimisation ( SEO ) Social Media Socurce Code Management ( SCM ) System Administration, Security Testing and Debugging Uncategorized User Interface Web design and development Wordpress Yocto / Bitbake / Openembedded

Leave a Reply / Ask Question