We are going to find an Android application and extract its APK file.
After that we will reinstall it.
List installed packages and find the app name
This adb command list all installed applications in your phone.
$ adb shell pm list packages
There are a lot, so another way to find the application name is using a web browser, going to Google Play and finding there the app.
The URL contains the app name:
The app name I am looking for is com.psa.sa.
Other way, when installing the app I could perform a diff in the list:
$ adb shell pm list packages > list_pre.txt
Install the app
$ adb shell pm list packages > list_post.txt
$ diff list_pre.txt list_post.txt
Find the application actual path to extract it
Find the path of the application file:
$ adb shell pm path com.psa.sa
Extract the APK file to your hard disk:
$ adb pull /data/app/com.psa.sa-1/base.apk
3783 KB/s (4785000 bytes in 1.235s)
We get base.apk file.
Install the app from the APK file
To install the app:
$ adb install -s base.apk
3403 KB/s (4785000 bytes in 1.372s)
or uninstall it:
$ adb uninstall com.psa.sa
Android: How to install adb and fastboot in Debian