From f7f6812564173298ad897e98343aeb2472afaa0e Mon Sep 17 00:00:00 2001 From: Christopher Roy Bratusek Date: Tue, 2 Oct 2018 09:35:03 +0200 Subject: [PATCH] nupd is gone in favor of a F-Droid Repository --- CommonInstaller | 6 +- Full/system/xbin/nanodroid-overlay | 221 ----------------------------- Full/system/xbin/nupd | 3 - README.md | 32 ++--- doc/NanoDroidUPD.md | 29 ---- 5 files changed, 13 insertions(+), 278 deletions(-) delete mode 100755 Full/system/xbin/nanodroid-overlay delete mode 100755 Full/system/xbin/nupd delete mode 100644 doc/NanoDroidUPD.md diff --git a/CommonInstaller b/CommonInstaller index 02d151d..cc697c7 100644 --- a/CommonInstaller +++ b/CommonInstaller @@ -854,9 +854,9 @@ install_bash () { install_nanodroidscripts () { ui_print " << with NanoDroid Scripts" - for script in npem nupd nutl novl \ - nanodroid-perm nanodroid-upd \ - nanodroid-util nanodroid-overlay; do + for script in npem nutl novl \ + nanodroid-perm nanodroid-util \ + nanodroid-overlay; do nanodroid_install_file xbin/${script} bin done diff --git a/Full/system/xbin/nanodroid-overlay b/Full/system/xbin/nanodroid-overlay deleted file mode 100755 index b9e9e56..0000000 --- a/Full/system/xbin/nanodroid-overlay +++ /dev/null @@ -1,221 +0,0 @@ -#!/system/bin/sh - -export NO_MAGISK=0 -export MODPATH=@MODPATH@ - -if [ -z "${MODPATH}" ]; then - OVERLAY_PATH="" - NO_MAGISK=1 -elif [ -d "/dev/tmp/magisk_img/$(basename "${MODPATH}")" ]; then - OVERLAY_PATH="/dev/tmp/magisk_img/$(basename "${MODPATH}")" -elif [ -d "${MODPATH}" ]; then - OVERLAY_PATH="${MODPATH}" -else - echo "couldn't find NanoDroid!" - exit 1 -fi - -error () { - echo "!! ${@}" - exit 1 -} - -show_help () { - - echo "nanodroid-overlay - -Magisk Mode: Manages Overlays (Pseudo Debloat feature) -System Mode: Manages Moved-Outs (Force Debloat feature) - -Options: --a | --add [appname] add override for app [appname] --r | --remove [appname] remove override for app [appname] --s | --show show non-overriden /system applications --l | --list show all overriden /system applications --x | --create create all overrides --u | --update update all overrides (= clear + create) --c | --clear remove all overrides --g | --genconfig (re-)create configuration from existing overrides -" - - exit 0 -} - -test "$(whoami)" != "root" && error "not running as root" - -get_config () { - config="" - config_exists=0 - for path in ${config_locations}; do - if test -r "${path}/${1}" -a -f "${path}/${1}"; then - config="${path}/${1}" - config_exists=1 - return - fi - done -} - -overrides_add_intern () { - sysdir=${1} - app=${2} - - if [[ ${NO_MAGISK} -eq 0 ]]; then - echo " creating overlay: ${app}" - mkdir -p "${OVERLAY_PATH}/system/${sysdir}/${app}" - touch "${OVERLAY_PATH}/system/${sysdir}/${app}/.replace" - else - mkdir -p "/sdcard/nanodroid_backups/${sysdir}" - echo " moving to /sdcard/nanodroid_backups: ${app}" - rm -rf "/sdcard/nanodroid_backups/${sysdir}/${app}" - mv "/system/${sysdir}/${app}" "/sdcard/nanodroid_backups/${sysdir}/" - fi - - grep -q "^${app}" "${config}" || echo "${app}" >> "${config}" -} - -overrides_add () { - for app in ${@}; do - [ -d /system/app/${app} ] && overrides_add_intern app ${app} - [ -d /system/priv-app/${app} ] && overrides_add_intern priv-app ${app} - done -} - -overrides_remove_intern () { - sysdir=${1} - app=${2} - - if [[ ${NO_MAGISK} -eq 0 ]]; then - echo " removing overlay: ${app}" - rm -rf "${OVERLAY_PATH}/system/${sysdir}/${app}" - else - if [[ -d /system/${sysdir}/${app} ]]; then - echo " removing old backup: ${app}" - rm -rf "/sdcard/nanodroid_backups/${sysdir}/${app}" - else - echo " reinstalling: ${app}" - mv "/sdcard/nanodroid_backups/${sysdir}/${app}" "/system/${sysdir}/" - fi - fi - - sed -e "/^${app}$/d" -i "${config}" -} - -overrides_remove () { - for app in ${@}; do - if [[ ${NO_MAGISK} -eq 0 ]]; then - [ -f ${OVERLAY_PATH}/system/app/${app}/.replace ] && overrides_remove_intern app ${app} - [ -f ${OVERLAY_PATH}/system/priv-app/${app}/.replace ] && overrides_remove_intern priv-app ${app} - else - [ -d /sdcard/nanodroid_backups/app/${app} ] && overrides_remove_intern app ${app} - [ -d /sdcard/nanodroid_backups/priv-app/${app} ] && overrides_remove_intern priv-app ${app} - fi - done -} - -overrides_list () { - if [[ ${NO_MAGISK} -eq 0 ]]; then - echo "Overrides for /system/app:" - for app in $(find "${OVERLAY_PATH}/system/app" -name "*.replace"); do - echo " * $(basename $(dirname "${app}"))" - done - - echo "Overrides for /system/priv-app:" - for app in $(find "${OVERLAY_PATH}/system/priv-app" -name "*.replace"); do - echo " * $(basename $(dirname "${app}"))" - done - else - echo "Moved-Out apps from /system/app:" - for app in $(find "/sdcard/nanodroid_backups/app" -mindepth 1 -maxdepth 1 -type d); do - echo " * $(basename $(dirname "${app}"))" - done - - echo "Moved-Out apps from /system/priv-app:" - for app in $(find "/sdcard/nanodroid_backups/priv-app" -mindepth 1 -maxdepth 1 -type d); do - echo " * $(basename $(dirname "${app}"))" - done - fi -} - -overrides_list_non () { - if [[ ${NO_MAGISK} -eq 0 ]]; then - echo "non-overriden apps from /system/app:" - for app in $(find "/system/app" -mindepth 1 -maxdepth 1 -type d); do - [[ ! -f ${OVERLAY_PATH}/${app}/.replace ]] && echo " * $(basename ${app})" - done - - echo "non-overriden apps from /system/priv-app:" - for app in $(find "/system/priv-app" -mindepth 1 -maxdepth 1 -type d); do - [[ ! -f ${OVERLAY_PATH}/${app}/.replace ]] && echo " * $(basename ${app})" - done - else - echo "non-moved-out apps from /system/app:" - for app in $(find "/system/app" -mindepth 1 -maxdepth 1 -type d); do - echo " * $(basename ${app})" - done - - echo "non-moved-out apps from /system/priv-app:" - for app in $(find "/system/priv-app" -mindepth 1 -maxdepth 1 -type d); do - echo " * $(basename ${app})" - done - fi - -} - -overrides_clear () { - if [[ ${NO_MAGISK} -eq 0 ]]; then - echo " removing Overlays from ${OVERLAY_PATH}" - for app in $(find "${OVERLAY_PATH}/system/app" -name "*.replace") \ - $(find "${OVERLAY_PATH}/system/priv-app" -name "*.replace"); do - echo " removing override: $(basename $(dirname ${app}))" - rm -rf "$(dirname "${app}")" - done - else - echo " overrides_clear() does nothing in System Mode!" - fi -} - -overrides_genconfig () { - if [[ ${NO_MAGISK} -eq 0 ]]; then - rm -f ${config} - export config="/data/.nanodroid-overlay" - - for app in $(find "${OVERLAY_PATH}/system/app" -name "*.replace") \ - $(find "${OVERLAY_PATH}/system/priv-app" -name "*.replace"); do - xapp=$(basename $(dirname ${app})) - echo " adding ${xapp} to configuration" - grep -q "^${xapp}$" "${config}" || echo "${xapp}" >> "${config}" - done - else - echo " overrides_genconfig() does nothing in System Mode!" - fi -} - -# check for configuration files -config_locations="/sdcard /external_sd @ZIPDIR@ /data /dev/tmp/install" -get_config .nanodroid-overlay - -if [[ -f ${config} ]]; then - export config -else overrides_genconfig -fi - -opt=${1} -[[ -z ${opt} ]] && show_help || shift - -case ${opt} in - -l | --list ) overrides_list ;; - -a | --add ) overrides_add "${@}" ;; - -r | --remove ) overrides_remove "${@}" ;; - -s | --show ) overrides_list_non ;; - -c | --clear ) overrides_clear ;; - -x | --create ) overrides_add "$(cat "${config}")" ;; - -g | --genconfig ) overrides_genconfig ;; - - -u | --update ) - overrides_clear - overrides_add "$(cat "${config}")" - ;; - - - * ) show_help ;; -esac diff --git a/Full/system/xbin/nupd b/Full/system/xbin/nupd deleted file mode 100755 index 7a9a3ae..0000000 --- a/Full/system/xbin/nupd +++ /dev/null @@ -1,3 +0,0 @@ -#!/system/bin/sh - -nanodroid-upd "${@}" diff --git a/README.md b/README.md index 5a04602..a06ca1f 100644 --- a/README.md +++ b/README.md @@ -56,19 +56,13 @@ The `build-package` script additionally supports the following parameters: * `ver [version] [date]` change project version * `bump` increment Magisk module version by 1 -The following applications are custom builds: +The following applications are custom builds (F-Droid Repository below): * Play Store (reason: re-signed and modified to support (in-)app-purchases with microG GmsCore) - * [Download Link](https://www.nanolx.org/apk/Phonesky.apk) -* Fake Store (reason: built with CHECK_LICENSE permission) - * [Download Link](https://www.nanolx.org/apk/FakeStore.apk) -* microG GmsCore (reason: built with more recent spoofed Play Services Version, more) - * [Download Link](https://www.nanolx.org/apk/GmsCore.apk) - * [source](https://github.com/Nanolx/android_packages_apps_GmsCore) +* microG GmsCore (reason: built with additions) * microG DroidGuard Helper (reason: built with fix for non 32bit arm devices failing SafetyNet attestation) - * [Download Link](https://www.nanolx.org/apk/DroidGuard.apk) -* MPV (reason: infrequent updates, merge-requests included) - * [Download Link](https://www.nanolx.org/apk/MPV.apk) +* MPV (reason: infrequent updates) +* OpenLauncher (reason: infrequent updates) Also `build-package` looks if the configuration files @@ -213,6 +207,12 @@ Extra packages, always flash through TWRP. * restores GApps and location services auto-removed during installation (System Mode) * restores `services.jar` patched by NanoDroid-Patcher (System Mode) +### F-Droid Repository + +In order to ease updating NanoDroid's custom application builds you can use it's companion [F-Droid Repository](https://www.nanolx.org/fdroid/repo) + +* `https://www.nanolx.org/fdroid/repo?fingerprint=862ED9F13A3981432BF86FE93D14596B381D75BE83A1D616E2D44A12654AD015` + ### Scripts Misc. Scripts for use from PC/Notebook, while device is in TWRP, they are found in this repository: @@ -255,18 +255,6 @@ The `nanodroid-perm` script grants microG and Co. required permissions, if lacki Full details on the NanoDroid-Perm Script [> Details](doc/NanoDroidPerm.md) -#### NanoDroid-UPD - -The `nanodroid-upd` script allows to update NanoDroid's custom apks - - * Play Store - * Fake Store - * MPV - -which can't be updated through Play/Yalp Store or F-Droid otherwise - -Full details on the NanoDroid-UPD Script [> Details](doc/NanoDroidUPD.md) - #### NanoDroid-Util The `nanodroid-util` script contains the following features diff --git a/doc/NanoDroidUPD.md b/doc/NanoDroidUPD.md deleted file mode 100644 index aaca4b1..0000000 --- a/doc/NanoDroidUPD.md +++ /dev/null @@ -1,29 +0,0 @@ -# NanoDroid-UPD Script - -## Purpose - -The `nanodroid-upd` Script, respectively it's shortcut `nupd` is used by NanoDroid to update NanoDroid's custom apks - - * Fake Store - * Play Store - * MPV - * microG GmsCore - * microG DroidGuard Helper - -Applications are only updated if they are installed already during NanoDroid installation - -**`nanodroid-upd` requires Busybox to be installed!** - -## Invocation - -From within a terminal on your device, for example `adb shell` or `Termux` invoke the script using either - -`nanodroid-upd [apk]` - -or - -`nupd [apk]` - -where **apk** can be - -`ps`, `playstore`, `fs`, `fakestore`, `mpv`, `MPV`, `mg`, `microG`, `dg` or `DroidGuard`