2018-03-15 19:38:17 +00:00
|
|
|
#!/system/bin/sh
|
|
|
|
|
|
|
|
APK_DIR=/sdcard/nanodroid_apks
|
|
|
|
nlx="https://www.nanolx.org/apk"
|
|
|
|
|
|
|
|
update_apk () {
|
|
|
|
if $(which wget >/dev/null); then
|
|
|
|
mkdir -p ${APK_DIR}
|
|
|
|
|
|
|
|
apk=${1}
|
|
|
|
apk_p=$(basename ${apk} .apk)
|
|
|
|
apk_o=$(basename ${apk})
|
|
|
|
|
|
|
|
if [[ -f ${MODPATH}/system/${apk} ]]; then
|
|
|
|
echo -e "\nUpdating: ${apk_p}"
|
|
|
|
|
|
|
|
rm -f ${APK_DIR}/${apk_o}
|
|
|
|
wget ${2} -O ${APK_DIR}/${apk_o} || error "failed to download ${apk_p}"
|
|
|
|
pm install -r ${APK_DIR}/${apk_o} || error "failed to install ${apk_p}"
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
error "wget is not installed, install Busybox"
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
error () {
|
|
|
|
echo "!! ${@}"
|
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
|
|
|
|
[[ $(whoami) != "root" ]] && error "not running as root"
|
|
|
|
|
|
|
|
case ${1} in
|
|
|
|
ps | playstore )
|
|
|
|
update_apk priv-app/Phonesky/Phonesky.apk "${nlx}/Phonesky.apk"
|
|
|
|
;;
|
|
|
|
|
2018-03-19 16:45:04 +00:00
|
|
|
#ol | openlauncher )
|
|
|
|
# update_apk app/OpenLauncher/OpenLauncher.apk "${nlx}/OpenLauncher.apk"
|
|
|
|
#;;
|
2018-03-15 19:38:17 +00:00
|
|
|
|
2018-03-18 10:41:45 +00:00
|
|
|
mpv | MPV )
|
|
|
|
update_apk app/MPV/MPV.apk "${nlx}/MPV.apk"
|
|
|
|
;;
|
2018-03-15 19:38:17 +00:00
|
|
|
|
|
|
|
fs | fakestore )
|
|
|
|
update_apk priv-app/FakeStore/FakeStore.apk "${nlx}/FakeStore.apk"
|
|
|
|
;;
|
|
|
|
|
|
|
|
* )
|
|
|
|
echo "nanodroid-upd
|
|
|
|
|
|
|
|
Utility to update custon NanoDroid apks
|
|
|
|
|
|
|
|
Usage: nanodroid-upd <apk>
|
|
|
|
short | long apk name
|
|
|
|
|
|
|
|
ps | playstore
|
2018-03-18 10:41:45 +00:00
|
|
|
fs | fakestore
|
|
|
|
mpv | MPV"
|
2018-03-15 19:38:17 +00:00
|
|
|
;;
|
|
|
|
esac
|