Skip to content

Instantly share code, notes, and snippets.

@Neo-Oli
Created June 27, 2018 15:10
Show Gist options
  • Save Neo-Oli/252908b44a98edc1b81af673a446e06c to your computer and use it in GitHub Desktop.
Save Neo-Oli/252908b44a98edc1b81af673a446e06c to your computer and use it in GitHub Desktop.
#!/data/data/com.termux/files/usr/bin/sh
apkdir=~/apks
cd "$apkdir"
for f in *.apk; do
cp "$f" "$f.old"
done
gplaycli -u "$apkdir" -p --log -v -y
if [ -f "apps_downloaded.log" ]; then
echo "Updating:"
cat apps_downloaded.log
cat apps_downloaded.log | xargs -I_ su -c "pm install -r _.apk"
rm apps_downloaded.log
for f in *.apk; do
cmp --silent "$f" "$f.old" && rm "$f.old"
done
else
echo "Nothing to update"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment