diff --git a/boxes/phone/init/.gitignore b/boxes/phone/init/.gitignore index a1eebe5..a251293 100644 --- a/boxes/phone/init/.gitignore +++ b/boxes/phone/init/.gitignore @@ -1 +1,2 @@ app_cache/ +gpapp_cache/ diff --git a/boxes/phone/init/gpapps b/boxes/phone/init/gpapps new file mode 100644 index 0000000..0eb5e35 --- /dev/null +++ b/boxes/phone/init/gpapps @@ -0,0 +1,3 @@ +com.ministrycentered.PlanningCenter +com.groupme.android +com.brivo.pass diff --git a/boxes/phone/init/main.sh b/boxes/phone/init/main.sh index a469451..63eb388 100755 --- a/boxes/phone/init/main.sh +++ b/boxes/phone/init/main.sh @@ -4,3 +4,31 @@ for i in $(cat apps); do curl "$i" --max-redirs 999 -L -C - -o "app_cache/$output_name" adb install "app_cache/$output_name" done + +mkdir -p gpapp_cache +for i in $(cat gpapps); do + apkeep -a "$i" ./gpapp_cache/ +done + +for i in $(ls gpapp_cache/ | grep xapk); do + # this is specific to planning center online + xapk_playground=$(mktemp) + rm $xapk_playground + mkdir $xapk_playground + + cp gpapp_cache/$i $xapk_playground + cd $xapk_playground + mkdir out + unzip $i -d out + cd - + cd $xapk_playground/out + rm icon.png + rm manifest.json + adb install-multiple * + cd - +done + +cd gpapp_cache +for i in $(ls | grep '\.apk'); do + adb install $i +done diff --git a/boxes/phone/init/shell.nix b/boxes/phone/init/shell.nix new file mode 100644 index 0000000..3210a59 --- /dev/null +++ b/boxes/phone/init/shell.nix @@ -0,0 +1,7 @@ +{ pkgs ? import {} }: + +pkgs.mkShell { + packages = [ + pkgs.apkeep + ]; +}