[Magisk] Setialpha:
NanoDroid 23.0.1

Hi everyone,

version 23.0, codename All Aboard, was shadow-dropped last week, I totally forgot to make an announcement here. Anyway, version 23.0.1, codename FCK 2020, is now available containing two bug fixes.

Highlights

Fixes for Android 11 support in the Installer

Alot of fixes regarding System Mode installation

Shiny new microG build which is just a few hours old

Fixes regarding mounting partitions in TWRP

We now compress APKs using ZStd instead of GZip for better performance on low-end devices

When creating your own NanoDroid builds using build-package you can now side-load custom APKs from local/ directory inside the NanoDroid source tree

several fixes and improvements all over the place - see the ChangeLog

Notes

If you use Google Play, but it doesn't show your bought apps as bought, check this out: https://gitlab.com/Nanolx/NanoDroid...lay-store-does-not-show-bought-apps-as-bought

microG GmsCore may need to be installed as user app for all permissions to be granted, now `service.sh` does the job, see this microG issue 1100 https://github.com/microg/android_packages_apps_GmsCore/issues/1100#issuecomment-711088518

this is not required for /system mode

nanodroid-perm now passes microG GmsCore userId to `pm` when granting restricted permissions, see microG issue 1100 https://github.com/microg/android_packages_apps_GmsCore/issues/1100#issuecomment-711141077

Full ChangeLog since 22.9

## 23.0.1.20201029 "[FCK 2020](https://www.discogs.com/de/Scooter-FCK-2020/release/16102123)"

### Bug Fixes

* Installer, SysTest, Patcher, Uninstaller
* fix a logical issue preventing mounting of `/system` on some non-A/B devices

* Patcher
* fix `BASEDIR` being declared to late

### Updates

* automatic
* F-Droid (1.10)
* Simple Calendar (6.11.0)
* Simple Gallery (6.16.4)

## 23.0.20201023 "[All Aboard](https://www.discogs.com/Francesco-Zeta-All-Aboard/release/15998163)"

### Note

If you use Google Play, but it doesn't show your bought apps as bought, [check this Issue entry for a fix](https://gitlab.com/Nanolx/NanoDroid/-/blob/master/doc/Issues.md#play-store-does-not-show-bought-apps-as-bought)

### Bug Fixes

* Installer
* update privapp-permission detection to fix bootloops on Android 11
* update APEX mount code for new `com.android.art.runtime` in Android 11
* fix that empty `nanodroid_init=""` setup variable will get overriden with default value
* note: missing `nanodroid_init` will still make the default value used, as desired
* improve handling of conflict between `Fake Store` and `Play Store`
* when `nanodroid_forcesystem=1` is given, but we flash from Magisk Manager stop
* when you want `/system` installation, install from TWRP
* fix creating Uninstaller/Addon.d information for installed init scripts
* look for configuraiton files in `/sdcard` explicitely (in certain occasions `/data/media/0` might not be available, still `/sdcard` is)
* when flashing NanoDroid directly after Magisk (without booting into ROM first), the installer previously wouldn't find Magisk, thus falling back to `/system` installation

* Installer, Patcher, SysTest, Uninstaller
* improve detection of system-as-root devices and fix issues mounting `/system`
* ensure we mount `/vendor` block device if direct mounting fails
* fixes issue with mounting `/vendor` on some devices in TWRP
* only create `/system/vendor -> /vendor` compat link needed on some devices if there's no `vendor_${SLOT}` partition

* Addon.d
* several fixes and improvements

* Patcher
* fix check whether we're updating the Magisk Module

* Uninstaller
* fix that NanoDroid-Patcher Magisk module wouldn't have been uninstalled

* NanoDroid-Overlay script
* `--genconfig` no longer forcefully sets config to `/data/.nanodroid-overlay`
* fix running `nanodroid-overlay` during addon.d
* fix read-write remounting `/system` for system mode debloating in when there's no `/system` but `/` to handle instead

* build-package
* fix downloading APK from GitHub when release tag has multiple APKs
* make mime-type checking more robust

* service.sh
* microG GmsCore may need to be installed as user app for all permissions to be granted, now `service.sh` does the job
* this is not required in `/system` mode
* see microG [issue 1100](https://github.com/microg/android_packages_apps_GmsCore/issues/1100#issuecomment-711088518)

* nanodroid-perm
* pass microG GmsCore userId to `pm` when granting restricted permissions
* `android.permission.ACCESS_BACKGROUND_LOCATION` and `android.permission.RECEIVE_SMS` on Android 10+
* see microG [issue 1100](https://github.com/microg/android_packages_apps_GmsCore/issues/1100#issuecomment-711141077)

### General Changes

* Installer, SysTest, Patcher, Uninstaller
* NanoDroid can now be flashed from TWRP, even if `/data` couldn't be mounted
* in this case configuration files can be read from `/tmp`

* Installer
* improve function to auto-detect wether we use official or Nanolx GmsCore/DroidGuard and migrate between, if required
* (there's no public Nanolx microG GmsCore build, I'm using this for internal testing)
* simplify function for checking whether ROM has builtin or selfpatched support for `android.permission.FAKE_PACKAGE_SIGNATURE`
* simplify and speed-up function for on-the-fly creation of privapp-permission whitelists
* simplify function for linking swipe libraries
* new `setup_installer()` function to reduce amount of code in each module's `update-binary`
* re-order functions and make the `CommonInstaller` file better readable
* store System Mode file list in `/system/addon.d` instead of `/data/adb`
* allows for full compat with recoveries that can't decrypt `/data`
* when newly flashing NanoDroid from Magisk Manager use `pm` to reset runtime permissions for better compat
* when flashing from TWRP the runtime-permissions.xml is still removed
* this is in both cases not done on NanoDroid upgrades

* Full, microG packages
* move all utilities from `/system/xbin` to `/system/bin`

* Patcher, SysTest, Uninstaller
* update functions from Installer

* SysTest
* minor internal improvements

* NanoDroid-Overlay script
* in system mode the script now only removes apps, no longer backs them up and restores them
* allows for full compat with recoveries that can't decrypt `/data`
* somewhat nicer output
* major code clean-up and simplification

* NanoDroid-Perm script
* add newly required `android.permission.RECEIVE_SMS` restricted permission for microG GmsCore
* when granting microG GmsCore restricted permissions, pass it's userId to `pm` for better compat
* allow running `nanodroid-perm` via `adb` @FriendlyNeighborhoodShane

* Patcher, Patcher Addon.d
* install Patcher environment into `/system/addon.d` no longer `/data/adb`
* allows for full compat with recoveries that can't decrypt `/data`

* Uninstaller
* update for changes to `nanodroid-overlay`
* update for changes to Patcher
* update for new location of System Mode file list
* both new and old locations are supported
* drop support for uninstalling ancient NanoDroid versions
* simplify code

* Full package
* add `Warden` an app management utility that let's you disable Services and Trackers
* drop shell utilites from the package
* except `lesskey` and `lessecho`, they'll be installed together with `bash` and `less` if `nanodroid_bash=1`

* build-package
* allow side-loading custom APKs from `local` directory inside the NanoDroid tree
* side-loading libraries is currently not supported
* simplify functions for downloading APKs from github, gitlab, url and opengapps
* use Android build-tools version 29.0.3 when calling `dx` utility
* for `build-package dalvik`
* compress APKs using ZStandard instead of GZip
* better performance on low-end devices

* sysconfig
* whitelist Aurora Services for `allow-in-power-save-except-idle`
* whitelist Aurora Services for `system-user-whitelisted-app`
* drop whitelist for Yalp Store (removed from NanoDroid since ages)

* Documentation
* update and improve Issues section
* some minor improvements

## Updates

* automatic
* microG GmsCore (0.2.13.203915)
* Amaze (3.5.0)
* Blokada (4.8.5)
* Bromite System WebView (86.0.4240.99)
* F-Droid (1.10-alpha1)
* FreeOTP+ (2.1)
* K-9 Mail (5.718)
* KeePassDX (2.8.7)
* NewPipe (0.20.1)
* OAndBackupX (3.2.0)
* Odyssey (1.1.20)
* OpenVPN (0.7.21)
* Simple Calendar (6.10.3)
* Simple Gallery (6.16.3)
* SmartPack Kernel Manager (13.8)
* Termux (0.102)

* manual
* GNU Bash (5.1-rc1)
* MPV (201016-nightly)

In case of errors, please provide

when installing from TWRP

/data/media/0/nanodroid_logs/MODID_log_INSTALLDATE

/data/media/0/nanodroid_logs/MODID_twrp_INSTALLDATE

/tmp/recovery.log

when installing from Magisk Manager

/data/media/0/nanodroid_logs/MODID_log_INSTALLDATE

press the save icon and post the Magisk Manager created logfile aswell

SysTest package logfile

logcat (if applicable)