Stack Overflow archive
1 score

Is there any regex to find package name

score
1
question views
1.1K
license
CC BY-SA 3.0

Just because the app name is "2048" does not mean it is used in the package name. However, I looked up the most popular Google Play game and it does have 2048 in the package name.

You could use grep to get the package. The following example will get the path to the APK file:

bash
adb shell pm list packages -f | grep 2048 | cut -d: -f2 | cut -d= -f1
...
/data/app/com.estoty.game2048-1.apk

An easy way to find out the package name of an app on Google Play is to just search on the Google Play Store and look at the last part of the URL:

https://play.google.com/store/apps/details?id=com.presselite.the2048game

Originally posted on Stack Overflow. Public user contributions are licensed under Creative Commons Attribution-ShareAlike.