Created
July 30, 2020 12:28
-
-
Save chijikpijik/51c1ba2e245bbe2d8223270fb6062229 to your computer and use it in GitHub Desktop.
Parse list of activities and deeplinks from AndroidManifest.xml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat AndroidManifest.xml | sed -e ':a' -e 'N' -e '$!ba' -e 's/\.*<activity\n/\<activity/g' | awk '/\<activity.*/ {activity_line=$0;print activity_line"\n"} /.*scheme.*/ {print $1;} /.*host.*/ {print $1} /.*pathPrefix.*/ {print $1}' | sed $'s/\/\>/\\\n/g' | sed 's/.*\<activity.*android\:\(.*\)/\1/g' | awk '{RS="";FS="\n"}/.*name.*/{an=$0;next;} /.*/{print an"\n"$0}' | awk '/.*name.*/{if (x)print x;x="";}{x=(!x)?$0:x" "$0;}END{print x;}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment