Skip to content

Instantly share code, notes, and snippets.

@munnadroid
Created January 3, 2024 05:39
Show Gist options
  • Save munnadroid/a5094803f1bf15fa663267d34fe1a223 to your computer and use it in GitHub Desktop.
Save munnadroid/a5094803f1bf15fa663267d34fe1a223 to your computer and use it in GitHub Desktop.
Read package name from apk file
package=$(aapt dump badging "$*" | awk '/package/{gsub("name=|'"'"'",""); print $2}')
activity=$(aapt dump badging "$*" | awk '/activity/{gsub("name=|'"'"'",""); print $2}')
echo
echo " file : $1"
echo "package : $package"
echo "activity: $activity"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment