Merge branch 'master' into 'master'

Documentation improvement + minor corrections from shellcheck

See merge request Nanolx/NanoDroid!35
merge-requests/37/merge
Christopher Roy Bratusek 3 years ago
commit 0cedf2bf81

@ -53,8 +53,8 @@ EOF
}
ui_print () {
echo -n -e "ui_print ${1}\n" >> /proc/self/fd/${OUTFD}
echo -n -e "ui_print\n" >> /proc/self/fd/${OUTFD}
echo -e "ui_print ${1}" >> /proc/self/fd/${OUTFD}
echo -e "ui_print" >> /proc/self/fd/${OUTFD}
}
detect_outfd () {

@ -77,16 +77,16 @@ print_info () {
echo "${@}"
decho "${@}"
else
echo -n -e "ui_print ${@}\n" >> /proc/self/fd/${OUTFD}
echo -n -e "ui_print\n" >> /proc/self/fd/${OUTFD}
echo -e "ui_print ${@}" >> /proc/self/fd/${OUTFD}
echo -e "ui_print" >> /proc/self/fd/${OUTFD}
fi
}
show_progress() {
show_progress () {
${BOOTMODE} || echo "progress ${1} ${2}" >> /proc/self/fd/${OUTFD}
}
set_progress() {
set_progress () {
${BOOTMODE} || echo "set_progress ${1}" >> /proc/self/fd/${OUTFD}
}
@ -161,11 +161,11 @@ detect_bootmode () {
# Taken from Magisk, grep build_props / /proc/cmdline for value
##########################################################################################
grep_prop() {
grep_prop () {
sed -n "s/^${1}=//p" /system/build.prop ${2} | head -n 1
}
grep_cmdline() {
grep_cmdline () {
local REGEX="s/^${1}=//p"
sed -E 's/ +/\n/g' /proc/cmdline | \
sed -n "${REGEX}" 2>/dev/null
@ -185,7 +185,7 @@ set_perm () {
fi
}
set_perm_recursive() {
set_perm_recursive () {
find ${1} -type d 2>/dev/null | while read dir; do
set_perm ${dir} ${2} ${3} ${4} ${6}
done
@ -234,13 +234,13 @@ toupper() {
}
find_block () {
local block tmp partname devname device
local block partname devname device
block=${1}${SLOT}
device=$(find /dev/block \( -type b -o -type c -o -type l \) -name ${block} | head -n 1)
if [ ! -z ${device} ]; then
readlink -f ${device}
if [ -n "$device" ]; then
readlink -f "$device"
return 0
fi
@ -254,8 +254,8 @@ find_block () {
done
device=$(find /dev \( -type b -o -type c -o -type l \) -maxdepth 1 -iname ${block} | head -n 1)
if [ ! -z ${device} ]; then
readlink -f ${device}
if [ -n "$device" ]; then
readlink -f "$device"
return 0
fi
@ -1505,8 +1505,8 @@ install_addond () {
installinfo_add () {
if [ "${MODE}" = "SYSTEM" ]; then
for file in ${@}; do
echo ${file} >> ${NANODROID_LIST}
for file in "${@}"; do
echo "${file}" >> ${NANODROID_LIST}
done
fi
}
@ -1530,7 +1530,7 @@ nanodroid_install_file () {
[ -z "${source}" ] && error "file: ${file} not found"
# strip off .${BIN_ARCH} from final filename (if any)
xfile=$(basename ${file} .${BIN_ARCH})
xfile=$(basename "${file}" .${BIN_ARCH})
decho " installing file: ${xfile}"
@ -1627,7 +1627,7 @@ nanodroid_install_apk () {
nanodroid_install_lib "${dest}/${dest_apk}" "${2}"
[ "${dir}" == "system/priv-app" ] && create_privapp_permissions_whitelist ${app}
[ "${dir}" = "system/priv-app" ] && create_privapp_permissions_whitelist "$app"
set_perm_data -r "${dest}"
}
@ -1638,7 +1638,7 @@ nanodroid_install_apk () {
nanodroid_install_lib () {
apk="${1}"
dest="$(dirname ${1})"
dest="$(dirname "$1")"
multilib="${2}"
unset libd

@ -28,13 +28,13 @@ Created by [gh-md-toc](https://github.com/ekalinin/github-markdown-toc)
# NanoDroid
NanoDroid is a installer for various OpenSource related things, most noticably microG and F-Droid. It supports direct /system installation, both devices with or without A/B partition scheme or system-as-root, aswell as Magisk Mode (module) installation. It also includes several tools (eg. GNU Bash, tools from util-linux/bsdmainutils and more) and additional features (system debloating, init scripts, automatic logcat creation), aswell as a companion F-Droid Repository.
NanoDroid is an installer for various OpenSource projects, most noticably [microG](https://microg.org/) and [F-Droid](https://f-droid.org/). It supports all Android 4.4+ phones and all partition layouts (System-as-root, A/B) and can be installed as a Magisk module. NanoDroid also includes several tools (eg. GNU Bash, tools from util-linux/bsdmainutils and more) and additional features (system debloating, init scripts, automatic logcat creation), aswell as a companion F-Droid Repository.
Furthermore it allows the user to do fine-graded installations using configuration files, which allow to choose what to install, or if several alternatives are available, which of them, see [Installation](#installation) below.
Furthermore it allows the user to do fine-graded installations using configuration files to choose what to install, or if several alternatives are available, which of them. See [Installation](#installation) below.
In order for full microG experience NanoDroid contains a modified Play Store which allows (in-)app-purchases with microG, which would normally not be possible. It also tries to remove all previously installed GApps on it's own. For ROMs without builtin signature spoofing support NanoDroid includes an on-device Patcher which tries to patch your ROM from either TWRP or Magisk Manager.
The full microG experience NanoDroid contains a modified Play Store allowing (in-)app-purchases with microG, which would normally not be possible. It also tries to remove all previously installed GApps on its own. For ROMs without builtin signature spoofing support, NanoDroid includes an on-device Patcher which tries to patch your ROM from either TWRP or Magisk Manager.
Versions until 15.1 were called **NanoMod**, starting with 16.0 they're called **NanoDroid**.
**NanoDroid** was previously called **NanoMod** (before version 16.0).
## Current Release
@ -45,30 +45,29 @@ Versions until 15.1 were called **NanoMod**, starting with 16.0 they're called *
### Primary Mirror
On Nanolx the latest stable and current beta releases are available, no previous releases.
Only the latest stable and beta releases are maintained and are available on Nanolx:
* Stable Downloads [> Nanolx](https://downloads.nanolx.org/NanoDroid/Stable)
* Beta Downloads [> Nanolx](https://downloads.nanolx.org/NanoDroid/Beta)
### SHA256 Checksum and GPG Signature
Since version 18.3.1 all releases hosted on nanolx.org contain a SHA256 checksum and GPG signature to check their validity. AFH does provide the SHA256 checksum on the downloads summary page, but does not allow to upload a GPG signature.
Since version 18.3.1 all releases hosted on *nanolx.org* contain a SHA256 checksum and GPG signature to check their validity. AFH does provide the SHA256 checksum on the downloads summary page, but does not allow to upload a GPG signature.
You can obtain the public part of my GPG key from:
You can verify the checksum with the public GPG key:
* download the public key from [photonic.asc](https://downloads.nanolx.org/NanoDroid/Stable/photonic.asc)
* import it using `gpg --import photonic.asc`
* download and import using `gpg` from pgp.mit.edu:
* `gpg --keyserver pgp.mit.edu --recv B0ABCE622A077B584B81339E340FD70EFFC52B26`
You can verify the checksum and signature like:
```
```bash
gpg --verify NanoDroid-19.0.20181027.zip.sha256.sig
sha256sum -c NanoDroid-19.0.20181027.zip.sha256
```
Additionally you may want to ensure the signing date is close to the release date.
Additionally, you may want to ensure the signing date is close to the release date.
### Snapshots
@ -115,7 +114,7 @@ Earlier versions will never officially be supported (you may still report bugs,
## Recommended Thirdparty Projects
* [busybox](https://forum.xda-developers.com/showthread.php?t=2239421) by Osm0sis (highly recommended for all NanoDroid scripts properly working)
* [Busybox](https://forum.xda-developers.com/showthread.php?t=2239421) by Osm0sis (highly recommended for all NanoDroid scripts properly working)
* [GNU Nano editor](https://forum.xda-developers.com/showthread.php?t=2239421) by Osm0sis (simple, powerful commandline editor)
## Support
@ -128,13 +127,13 @@ Full, user-readible [> ChangeLog](ChangeLog.md)
## Summary
**NanoDroid** can be installed as a Magisk Module or directly to /system, most functionality is available, in System Mode, too.
**NanoDroid** can be installed as a Magisk Module or directly to `/system`, most of the functionalities are available, in System Mode too.
More information about Magisk [> XDA](https://forum.xda-developers.com/apps/magisk)
NanoDroid includes
* microG and it's companions
* microG and its companions
* GApps are auto-removed during installation
* using [> NanoDroid-Overlay](doc/NanoDroidOverlay.md)
* the Uninstaller will restore them in System Mode (or re-flash the ROM)
@ -172,7 +171,7 @@ See the [Packages](doc/Packages.md) summary for information about the available
### 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)
In order to ease updating NanoDroid's custom application builds, you can use its companion [F-Droid Repository](https://www.nanolx.org/fdroid/repo).
## Details
@ -180,11 +179,11 @@ See the [> Detail information](doc/Details.md) for full details on microG, F-Dro
## Installation
See the [Installation](doc/Installation.md) docs for instructions
See the [Installation](doc/Installation.md) docs for instructions.
## microG Setup
See the [microG setup](doc/microGsetup.md) documentation
See the [microG setup](doc/microGsetup.md) documentation.
## Issues
@ -192,7 +191,7 @@ See [the list of known issues](doc/Issues.md) and their respective fixes or work
## License & Credits
My own work (NanoDroid itself) is licensed under the GNU General Public License version 3 or newer [> GNU](https://www.gnu.org/licenses/gpl-3.0.txt)
My own work (NanoDroid itself) is licensed under the GNU General Public License version 3 or newer [> GNU](https://www.gnu.org/licenses/gpl-3.0.txt).
For more details (including authors and license) on every provided application or Software press the link next to it.
@ -226,7 +225,7 @@ Special Thanks to the contributors (starting with most recent contribution)
* fixes for x86_64 support
* Vavun
* OsmAnd package
* several contributions to NanoDroid (and it's former microG GmsCore fork)
* several contributions to NanoDroid (and its former microG GmsCore fork)
Special Thanks to the beta testers
@ -238,12 +237,12 @@ Special Thanks to the beta testers
## FAQ
```
Q: will there be a GApps version, instead of microG?
A: no. but you can choose not to populate microG.
Q: Will there be a GApps version, instead of microG?
A: No. But you can choose not to populate microG.
Q: what devices is this tested on?
Q: What devices is this tested on?
A: OnePlus 5T, OnePlus 3T, Nexus 6
Q: what ROMs was this tested on?
A: AICP, OmniROM, NitrogenOS; should work on any LineageOS / AOSP based ROM and most Stock ROMs.
Q: What ROMs was this tested on?
A: AICP, OmniROM, NitrogenOS. It should work on any LineageOS / AOSP based ROM and on most Stock ROMs.
```

@ -47,7 +47,7 @@ done
[[ -z ${1} ]] && show_help
for opt in ${@}; do
for opt in "$@"; do
case ${opt} in
full)
check_nanodroid || error "run 'build-package pull' first!"

@ -13,38 +13,38 @@
#
##########################################################################################
# nanodroid_microg: whether to install microG
# supported packages: Full, microG
# nanodroid_microg: microG installation
# supported packages: Full, microG
# supported values:
# 0 = don't install microG at all (Note: does not effect NanoDroid-microG package)
# 1 = install microG GmsCore, GsfProxy and DroidGuard Helper and Nominatim Geocoder Backend
# 0 = do not install microG microG (note: does not effect NanoDroid-microG package)
# 1 = install microG GmsCore, GsfProxy, DroidGuard Helper and Nominatim Geocoder Backend
# 2 = install microG GmsCore and Nominatim Geocoder Backend only
nanodroid_microg=1
# nanodroid_nlpbackend: what uNlp backends to install
# supported packages: Full, microG
# this setting is four digits long, each digit represents one uNlp backend:
# 0 = for each digit means don't install the backend
# 1 = for each digit means install the backend
# supported packages: Full, microG
# this setting is 4 digits long, each digit represents one uNlp backend:
# 0 = don't install the backend
# 1 = install the backend
# digits represent the following backends:
# 1st digit = Déjà Vu backend
# 2nd digit = Ichnaea (Mozilla) backend
# 3rd digit = Apple backend
# 4th digit = Radiocells.org backend
# examples:
# nanodroid_nlpbackend=1000 = install Déjà Vu backend
# nanodroid_nlpbackend=1000 = install Déjà Vu backend only
# nanodroid_nlpbackend=1010 = install Déjà Vu and Apple backends
nanodroid_nlpbackend=1000
# nanodroid_mapsv1: whether to install Google Maps version 1 API support
# supported packages: Full, microG
# nanodroid_mapsv1: Google Maps version 1 API support
# supported packages: Full, microG
# supported values:
# 0 = don't install Maps v1 API support
# 1 = install Maps v1 API support
nanodroid_mapsv1=1
# nanodroid_play: what app store to install
# supported packages: Full, microG
# nanodroid_play: App store installation
# supported packages: Full, microG
# supported values:
# 00 = install no app store
# 10 = install Google Play (patched with microG (in-)app-purchase support)
@ -54,8 +54,8 @@ nanodroid_mapsv1=1
# 30 = install Google Play (patched with microG (in-)app-purchase support) and Aurora Store (alongside Aurora Services addon)
nanodroid_play=21
# nanodroid_fdroid: whether to install F-Droid
# supported packages: Full, F-Droid
# nanodroid_fdroid: F-droid installation
# supported packages: Full, F-Droid
# supported values:
# 0 = don't install F-Droid at all (Note: does not effect NanoDroid-FDroid package)
# 1 = install official F-Droid client (alongside priviledged extension)
@ -63,30 +63,31 @@ nanodroid_play=21
# 3 = install both official and Aurora F-Droid clients (alongside their addons)
nanodroid_fdroid=1
# nanodroid_apps: whether to install appliations
# supported packages: Full
# nanodroid_apps: Apps installation
# supported packages: Full
# supported values:
# 0 = don't install applications
# 1 = install applications
# 0 = don't install any applications
# 1 = install all applications listed in .nanodroid-apps file
# see: https://gitlab.com/Nanolx/NanoDroid/-/blob/master/doc/Applications.md
nanodroid_apps=1
# nanodroid_overlay: whether to utilize NanoDroid-Overlay
# supported packages: Full, microG
# nanodroid_overlay: use NanoDroid-Overlay
# supported packages: Full, microG
# NanoDroid-Overlay can be used to pseudo-debloat `/system` applications in Magisk Mode, or force-debloat on System Mode
# for more information: https://gitlab.com/Nanolx/NanoDroid/-/blob/master/doc/NanoDroidOverlay.md
# supported values:
# 0 = don't utilize NanoDroid-Overlay
# 1 = utilize NanoDroid-Overlay
# 0 = don't use NanoDroid-Overlay
# 1 = use NanoDroid-Overlay
nanodroid_overlay=1
# nanodroid_bash: whether to install GNU Bash (alongside the less pager)
# supported packages: Full
# nanodroid_bash: GNU Bash installation
# supported packages: Full
# supported values:
# 0 = don't install GNU Bash
# 1 = install GNU Bash
nanodroid_bash=1
# nanodroid_init: whether and what init scripts to install
# nanodroid_init: init scripts installation
# supported packages: Full
# for more information: https://gitlab.com/Nanolx/NanoDroid#init-scripts
# this setting is a list of init scripts, each listed item will be installed, possible values
@ -95,26 +96,27 @@ nanodroid_bash=1
# 30_logcat
# 40_external_sd
# 50_logscleaner
# leave empty (nanodroid_init="") to install no init scipts, "" are mandatory in any case
# Empty quotes (nanodroid_init="") to not install any init scipts.
nanodroid_init="10_sqlite 20_fstrim 30_logcat 40_external_sd 50_logscleaner"
# nanodroid_gsync: whether to install Google Sync Adapters
# supported packages: Google
# nanodroid_gsync: Google Sync Adapters installation
# supported packages: Google
# supported values:
# 0 = don't install Google Sync Adapters
# 1 = install Google Sync Adapters
nanodroid_gsync=1
# nanodroid_swipe: whether to install Swipe libraries
# supported packages: Google
# nanodroid_swipe: Swipe libraries installation
# supported packages: Google
# supported values:
# 0 = don't install Swipe libraries
# 1 = install Swipe libraries
nanodroid_swipe=0
# nanodroid_forcesystem: force direct /system installation (else NanoDroid will
# autodetect whether Magisk is installed and will prefer Magisk Module installation)
# supported packages: Full, miroG, F-Droid, Bromite System WebView, OSM Android, Google
# nanodroid_forcesystem: force direct /system installation
# If not set to 1, if Magisk is installed, NanoDroid will prefer Magisk Module installation)
# Note: You should keep this setting to 0 unless you really know what you are doing.
# supported packages: Full, miroG, F-Droid, Bromite System WebView, OSM Android, Google
# supported values:
# 0 = auto detect installation mode
# 1 = force /system installation

@ -23,73 +23,63 @@ Created by [gh-md-toc](https://github.com/ekalinin/github-markdown-toc)
## Configuration File
To alter the installation you can create the file
To alter the installation you can create the file `.nanodroid-setup` on your device, in one of the following directories:
`.nanodroid-setup`
on your device, in one of the following directories
* `/data/media/0` (internal storage (TWRP))
* `/sdcard1` (internal storage (ORANGEFOX))
* `/data/media/0` (internal storage **[TWRP]**)
* `/sdcard1` (internal storage **[ORANGEFOX]**)
* `/external_sd` (TWRP path to SD Card (if any))
* `/data` (fallback)
* `/system/addon.d/` (fallback if TWRP can't mount `/data`)
* `/tmp` (fallback if TWRP can't mount `/data`)
You can use the [default configuration file](.nanodroid-setup) as a starting point. Below follows the detailed information on what each setting does (also described in the file itself); also which setting is support by what package. If an required entry is missing from your configuration file, the default setting will be added to your configuration file.
You can use the [default configuration file](.nanodroid-setup) as a starting point. Below follows its detailed description. If a required entry is missing from your configuration file, the default setting will be added to your configuration file.
## Detailed Description
### nanodroid_microg
whether to install **microG**
**microG** installation
* supported packages
* Full package
* microG package
**supported packages:** *Full package*, *microG package*
Syntax: `nanodroid_microg=1`, value can be 0, 1 or 2:
**Syntax:** `nanodroid_microg=1`, value can be 0, 1 or 2:
* 0 = don't install microG at all (Note: does not effect NanoDroid-microG package)
* 1 = install microG GmsCore, GsfProxy and DroidGuard Helper and Nominatim Geocoder Backend
* 1 = install microG GmsCore, GsfProxy, DroidGuard Helper and Nominatim Geocoder Backend
* 2 = install microG GmsCore and Nominatim Geocoder Backend only
* note: OpenSource purists setting; this will leave you
* without Push Messaging support through GCM
* without the ability to pass SafetyNet attestation
* note: OpenSource purists setting; this will leave you without
* Push Messaging support through GCM
* SafetyNet attestation
### nanodroid_nlpbackend
what uNlp backends to install
* supported packages
* Full package
* microG package
**supported packages:** *Full package*, *microG package*
Syntax: `nanodroid_nlpbackend=1000`
**Syntax:** `nanodroid_nlpbackend=1000`
this setting is four digits long, each digit represents one uNlp backend:
* 0 = for each digit means don't install the backend
* 1 = for each digit means install the backend
* 0 = don't install the backend
* 1 = install the backend
digits represent the following backends:
* 1st digit = Déjà Vu backend
* 2nd digit = Ichnaea (Mozilla) backend
* 3rd digit = Apple backend
* 4th digit = Radiocells.org backend
* 1st digit = `Déjà Vu` backend
* 2nd digit = `Ichnaea` (Mozilla) backend
* 3rd digit = `Apple` backend
* 4th digit = `Radiocells.org` backend
examples:
* nanodroid_nlpbackend=1000 = install Déjà Vu backend
* nanodroid_nlpbackend=1010 = install Déjà Vu and Apple backends
* nanodroid_nlpbackend=1000 = install `Déjà Vu backend` only
* nanodroid_nlpbackend=1010 = install `Déjà Vu` and `Apple` backends
### nanodroid_mapsv1
whether to provide **microG** Maps API v1
**microG** Maps API v1 support
* supported packages
* Full package
* microG package
**supported packages:** *Full package*, *microG package*
Syntax: `nanodroid_mapsv1=1`, value can be or 1:
**Syntax:** `nanodroid_mapsv1=1`
* 0 = don't install Maps v1 API support
* 1 = install Maps v1 API support
@ -98,11 +88,9 @@ Syntax: `nanodroid_mapsv1=1`, value can be or 1:
what app store to install
* supported packages
* Full package
* microG package
**supported packages:** *Full package*, *microG package*
Syntax: `nanodroid_play=21`, this setting is value pair, the first digit declares the app store, the second whether to install Fake store alongside:
**Syntax:** `nanodroid_play=21`, the first digit declares the app store, the second whether to install Fake store alongside:
* 00 = install no app store
* 10 = install Google Play (patched with microG (in-)app-purchase support)
@ -112,35 +100,32 @@ Syntax: `nanodroid_play=21`, this setting is value pair, the first digit declare
* 30 = install Google Play (patched with microG (in-)app-purchase support) and Aurora Store (alongside Aurora Services addon)
Note:
* if `nanodroid_play=11` or `nanodroid_play=31` it will be silently treated as `10` or `30`
* if `nanodroid_play=11` or `nanodroid_play=31` it will be silently treated as `10` or `30`
* you can't install both Play Store and Fake Store at the same time
### nanodroid_fdroid
whether to install **F-Droid**
**F-Droid** installation
* supported packages
* Full package
* F-Droid package
**supported packages:** *Full package*, *F-droid package*
Syntax: `nanodroid_fdroid=1`, value can be 0, 1, 2 or 3:
**Syntax:** `nanodroid_fdroid=1`, value can be 0, 1, 2 or 3:
* 0 = don't install F-Droid at all (Note: does not effect NanoDroid-FDroid package)
* 0 = don't install F-Droid at all (**Note:** does not effect NanoDroid-FDroid package)
* 1 = install official F-Droid client (alongside priviledged extension)
* 2 = install unofficial Aurora F-Droid client (alongside Aurora Services addon)
* 3 = install both official and Aurora F-Droid clients (alongside their addons)
### nanodroid_apps
whether to install applications
Apps installation
* supported packages
* Full package
**supported packages:** *Full package*
Syntax: `nanodroid_apps=1`, value can be 0 or 1:
**Syntax:** `nanodroid_apps=1`, value can be 0 or 1:
* 0 = don't install applications
* 1 = install applications
* 1 = install all applications listed in .nanodroid-apps file
see [> Applications](Applications.md) for detailed information
@ -148,7 +133,9 @@ see [> Applications](Applications.md) for detailed information
whether to utilize the NanoDroid-Overlay to pseudo-debloat `/system` applications in Magisk Mode, or force-debloat on System Mode
Syntax: `nanodroid_overlay=1`, value can be 0 or 1:
**supported packages:** *Full package*, *microG package*
**Syntax:** `nanodroid_overlay=1`, value can be 0 or 1:
* 0 = don't utilize NanoDroid-Overlay
* 1 = utilize NanoDroid-Overlay
@ -157,24 +144,24 @@ see [> NanoDroid-Overlay](NanoDroidOverlay.md) for detailed information
### nanodroid_bash
whether to install GNU Bash (alongside the less pager)
GNU Bash (alongside the less pager) installation
* supported packages
* Full package
**supported packages:** *Full package*
Syntax: `nanodroid_bash=1`, value can be 0: 1:
**Syntax:** `nanodroid_bash=1`, value can be 0: 1:
* 0 = don't install GNU Bash
* 1 = install GNU Bash
### nanodroid_init
whether and what init scripts to install
init scripts installation
* supported packages
* Full package
**supported packages:** *Full package*
this setting is a list of init scripts, each listed item will be installed, possible values
**Syntax:** `nanodroid_init="10_sqlite 20_fstrim"`
This setting is a list of init scripts, each listed item will be installed, possible values
```
10_sqlite
@ -184,47 +171,41 @@ this setting is a list of init scripts, each listed item will be installed, poss
50_logscleaner
```
to install no init scripts, leave empty (`nanodroid_init=""`), the `""` are mandatory in any case
Leave an empty quote (`nanodroid_init=""`) to not install any init script
see [here for more information](../README.md#init-scripts)
see [init-scripts](../README.md#init-scripts) for more information
### nanodroid_gsync
whether to install Google Sync Adapters
Google Sync Adapters installation
* supported packages
* Google
**supported packages:** *Google*
Syntax: `nanodroid_gsync=1`, value can be 0 or 1:
**Syntax:** `nanodroid_gsync=1`, value can be 0 or 1:
* 0 = don't install Google Sync Adapters
* 1 = install Google Sync Adapters
### nanodroid_swipe
whether to install Swipe libraries
Swipe libraries installation
* supported packages
* Google
**supported packages:** *Google*
Syntax: `nanodroid_swipe=1`, value can be 0 or 1:
**Syntax:** `nanodroid_swipe=1`, value can be 0 or 1:
* 0 = don't install Swipe libraries
* 1 = install Swipe libraries
### nanodroid_forcesystem
force direct /system installation (else NanoDroid will autodetect whether Magisk is installed and will prefer Magisk Module installation)
Force `/system` installation instrad of Magisk Module installation (if Magisk available)
**Note:** You shouldn't touch this settings unless you really know what you are doing.
* supported packages
* Full package
* microG package
* F-Droid package
* Bromite System WebView package
* OSM Android
* Google package
**supported packages:** *Full*, *miroG*, *F-Droid*, *Bromite System WebView*, *OSM Android*, *Google*
Syntax: `nanodroid_forcesystem=0`, value can be 0 or 1:
**Syntax:** `nanodroid_forcesystem=0`, value can be 0 or 1:
* 0 = auto detect installation mode
* 0 = auto detect installation mode (default)
* 1 = force /system installation

@ -21,7 +21,7 @@ On GNU/Linux, MacOS or xBSD clone this repository and use the provided `build-pa
download required files:
* `build-package pull` to download all required apks and libraries for the Full, microG and F-Droid packages
for apks downloaded from F-Droid repositories or from APK Mirror, `build-package` checks the SHA256 hash.
For apks downloaded from F-Droid repositories or from APK Mirror, `build-package` checks the SHA256 hash.
update required files:
* `build-package u-microg` to update microG
@ -62,14 +62,14 @@ The `build-package` script additionally supports the following parameters:
If you want to use custom APKs in your build, place them into the `local` directory in the root of the NanoDroid tree.
The name of your APK must match the targetname in the NanoDroid package, e. g. `GmsCore` for a custom microG build or `Phonesky` for a custom Play Store build.
The name of your APK must match the targetname in the NanoDroid package, e.g. `GmsCore` for a custom microG build or `Phonesky` for a custom Play Store build.
See the `file_database` in [build-package.database](../data/build-package.database).
Note: sideloading libraries is currently not supported!
**Note:** sideloading libraries is currently not supported!
## "Secret" parameters
* `export BP_DEBUG=1` allows seeing debug messages when repos are fetched and APKs are downloaded
* `export BP_USE_WGET=1` tells the script to use wget for downloading indices and APks
* `export BP_USE_WGET=1` tells the script to use wget for downloading indices and APKs

@ -1,4 +1,3 @@
Table of Contents
=================
@ -14,11 +13,11 @@ Created by [gh-md-toc](https://github.com/ekalinin/github-markdown-toc)
Here you can find instructions on how to manually deodex `services.jar` as preparation for Signature Spoofing support.
If you want to check beforehand (or afterwards), if your ROM supports Signature Spoofing, use this [tool](https://f-droid.org/de/packages/lanchon.sigspoof.checker/).
If you want to check beforehand (or afterwards) if your ROM supports Signature Spoofing, use this [tool](https://f-droid.org/de/packages/lanchon.sigspoof.checker/).
## Pre-Check
If your `/system/framework/services.jar` file contains the file `classes.dex`, you can skip deodexing and start patching right-away, else following these instructions.
If your `/system/framework/services.jar` file contains the file `classes.dex`, you can skip deodexing and start patching right-away. Else follow these instructions.
## Android 9.0 Pie
@ -28,9 +27,9 @@ VdexExtractor will create CompatDex for Android 9.0 (more precisely VDEX 019 fil
## VDEX
If you can see `/system/framework/oat/[arch]/services.vdex`, where [arch] is the device architecture (arm, arm64, x86 or x86_64), you should follow theese instructions.
If you can see `/system/framework/oat/[arch]/services.vdex`, where `[arch]` is the device architecture (arm, arm64, x86 or x86_64), you should follow theese instructions.
the instructions are basically simple, though plenty commands:
The instructions are basically simple, though there is a lot of commands:
* connect phone with PC while in TWRP, mount `/system` **read-write**
* get latest `vdexExtractor`
@ -38,46 +37,45 @@ the instructions are basically simple, though plenty commands:
* zip/unzip utilities for commandline (or some UI tool)
* common sense on using commandline (or some UI tool instead)
```
```bash
adb pull /system/framework framework
cp framework/services.jar services.jar-backup
```
now deodex `services.vdex`:
```
```bash
vdexExtractor -i framework/oat/[arch]/services.vdex --ignore-crc-error
```
this will create the following file:
* framework/oat/[arch]/services.apk_classes.dex
This will create the following file: `framework/oat/[arch]/services.apk_classes.dex`
if it's properly been created rename it to classes.dex and add it to `services.jar`, if there are additional files like services.apk_classes2.dex, rename them to classes2.dex and so on and add them to services.jar like:
If it has been properly created, rename it to `classes.dex` and add it to `services.jar`. If there are additional files like `services.apk_classes2.dex`, rename them to `classes2.dex` and add them to `services.jar` like this:
```
```bash
mv framework/oat/[arch]/services.apk_classes.dex classes.dex
... mv for other dex files ...
zip -j framework/services.jar classes*.dex
```
next install the new `services.jar` to device:
Then, install the new `services.jar` on the device:
```
```bash
adb push framework/services.jar /system/framework
adb shell
chmod 0644 /system/framework/services.jar
chown root:root /system/framework/services.jar
```
unmount `/system` and flash the NanoDroid-Patcher.
Unmount `/system` and flash the **NanoDroid-Patcher**.
If something goes wrong you still have the unpatched `services.jar`, as we created a copy named `services.jar-backup`.
If something goes wrong, you still have the unpatched `services.jar`, as we created a copy named `services.jar-backup`.
## ODEX
If you can see `/system/framework/oat/[arch]/services.odex`, where [arch] is the device architecture (arm, arm64, x86 or x86_64), you should follow theese instructions.
If you can see `/system/framework/oat/[arch]/services.odex`, where `[arch]` is the device architecture (arm, arm64, x86 or x86_64), you should follow theese instructions:
the instructions are basically simple, though plenty commands:
The instructions are basically simple, though there is a lot of commands:
* connect phone with PC while in TWRP, mount `/system` **read-write**
* get latest `baksmali.jar` and `smali.jar`
@ -85,35 +83,35 @@ the instructions are basically simple, though plenty commands:
* zip/unzip utilities for commandline (or some UI tool)
* common sense on using commandline (or some UI tool instead)
```
```bash
adb pull /system/framework framework
cp framework/services.jar services.jar-backup
```
```
```bash
java -jar baksmali.jar x framework/oat/[arch]/services.odex -d framework/[arch] -d framework/ -o services-new
java -jar smali.jar a services-new -o classes.dex
```
somestimes baksmali.jar can't find the bootclasses file itself, in this case pass it manually using `-b`, for example:
Sometimes `baksmali.jar` can't find the bootclasses file itself. In this case, you need to pass it manually using `-b`, for example:
`-b framework/[arch]/boot.oat`
in any case, if a new classes.dex was successfully created in the services-new directory, re-package it into the services.jar we previously pulled:
In any case, if a new `classes.dex` was successfully created in the services-new directory, re-package it into the `services.jar` we previously pulled:
```
```bash
zip -j framework/services.jar classes*.dex
```
next install the new `services.jar` to device:
Then, install the new `services.jar` on the device:
```
```bash
adb push framework/services.jar /system/framework
adb shell
chmod 0644 /system/framework/services.jar
chown root:root /system/framework/services.jar
```
unmount `/system` and flash the NanoDroid-Patcher.
Unmount `/system` and flash the NanoDroid-Patcher.
If something goes wrong you still have the unpatched `services.jar`, as we created a copy named `services.jar-backup`.

@ -17,7 +17,7 @@ Created by [gh-md-toc](https://github.com/ekalinin/github-markdown-toc)
# NanoDroid
This lists features unique to NanoDroid.
This lists unique NanoDroid features.
## NanoDroid-Overlay
@ -80,13 +80,9 @@ The following init scripts are bundled with NanoDroid
When in Magisk Mode the init scripts create their log files in
`/magisk/NanoDroid/logs/${script}.log.${date}`
`/magisk/NanoDroid/logs/${script}.log.${date}`
When installed to /system your ROM needs to support running scripts in
`/system/etc/init.d`
or you can use **Kernel Adiutor's** init.d emulation.
When installed to /system your ROM needs to support running scripts in `/system/etc/init.d` or you can use **Kernel Adiutor's** init.d emulation.
## GNU Bash
@ -126,7 +122,7 @@ NanoDroid includes microG as follows
## F-Droid
F-Droid [> Website](http://www.fdroid.org) is an app store for OpenSource applications.
F-Droid [> Website](http://www.fdroid.org) is an app store for FOSS (Free and Open Source Software) applications only.
NanoDroid includes both F-Droid and it's Privileged Extension [> F-Droid](https://f-droid.org/repository/browse/?fdfilter=f-droid&fdid=org.fdroid.fdroid.privileged), so you don't need to enable `Unknown Sources`. Alternatively (or additionally) you can install Aurora Droid [> F-Droid](https://f-droid.org/de/packages/com.aurora.adroid/).

@ -1,22 +1,18 @@
Table of Contents
=================
* [GApps Removal](#gapps-removal)
* [List of removed GApps](#list-of-removed-gapps)
* [List of removed location services](#list-of-removed-location-services)
* [GApps Removal](#gapps-removal)
* [List of removed GApps](#list-of-removed-gapps)
* [List of removed location services](#list-of-removed-location-services)
Created by [gh-md-toc](https://github.com/ekalinin/github-markdown-toc)
# GApps Removal
GApps and several location services conflict with microG and unified Nlp. Thus they are removed during NanoDroid installation
* using [> NanoDroid-Overlay](NanoDroidOverlay.md)
the Uninstaller will restore them (or re-flash the ROM)
GApps and several location services conflict with **microG** and **unified Nlp**. Thus they are removed during NanoDroid installation
using **[NanoDroid-Overlay](NanoDroidOverlay.md)**. The Uninstaller will restore them (or re-flash the ROM)
List of applications by ale5000
List of applications by @ale5000
## List of removed GApps

@ -1,13 +1,13 @@
Table of Contents
=================
* [Installation](#installation)
* [Installation Setup](#installation-setup)
* [Parallel Installations](#parallel-installations)
* [Installation on Stock ROM without GApps, custom ROM with/without OpenGApps](#installation-on-stock-rom-without-gapps-custom-rom-withwithout-opengapps)
* [Installation on Stock ROM with GApps](#installation-on-stock-rom-with-gapps)
* [Upgrading NanoDroid](#upgrading-nanodroid)
* [Installation Logfiles](#installation-logfiles)
* [Installation](#installation)
* [Installation Setup](#installation-setup)
* [Parallel Installations](#parallel-installations)
* [Installation on Stock ROM without GApps, custom ROM with/without OpenGApps](#installation-on-stock-rom-without-gapps-custom-rom-withwithout-opengapps)
* [Installation on Stock ROM with GApps](#installation-on-stock-rom-with-gapps)
* [Upgrading NanoDroid](#upgrading-nanodroid)
* [Installation Logfiles](#installation-logfiles)
Created by [gh-md-toc](https://github.com/ekalinin/github-markdown-toc)
@ -33,13 +33,13 @@ Created by [gh-md-toc](https://github.com/ekalinin/github-markdown-toc)
## Parallel Installations
Since the microG and F-Droid packages are subsets of the Full NanoDroid package, they can't be installed alongside.
Given that **microG** and **F-Droid** packages are subsets of the **Full NanoDroid** package, they can't be installed alongside.
The microG and F-Droid packages however can be installed in parallel, as they complement each other.
The **microG** and **F-Droid** packages can however be installed in parallel, as they complement each other.
## Installation on Stock ROM without GApps, custom ROM with/without OpenGApps
## Installation on Stock/custom ROM without GApps/OpenGApps
OpenGApps and GApps-less ROMs don't need further measurements, the Installer takes care of required steps.
OpenGApps and GApps-less ROMs don't need further manual steps, the Installer takes care of required steps.
* perform full wipe (/system, /data, /cache, Dalvik/ART cache)
* recommended, but not required
@ -59,7 +59,7 @@ OpenGApps and GApps-less ROMs don't need further measurements, the Installer tak
## Installation on Stock ROM with GApps
Stock ROMs with GApps may not allow to switch from Google GmsCore to microG GmsCore in-place, thus the installation is slightly different.
Stock ROMs with GApps may not allow to switch from **Google GmsCore** to **microG GmsCore** in-place, thus the installation is slightly different.
* perform full wipe (/system, /data, /cache, Dalvik/ART cache)
* recommended, but not required
@ -100,11 +100,11 @@ When upgrading NanoDroid you may just:
## Installation Logfiles
The recovery log and installation configuration is stored after installation, regardless with it succeeded or failed.
The recovery log and installation configuration are stored after installation, regardless it succeeded or failed.
You'll find the files in
* `/data/media/0/nanodroid_logs/MODID_log_INSTALLDATE
* `/data/media/0/nanodroid_logs/MODID_log_INSTALLDATE`
* `/data/media/0/nanodroid_logs/MODID_twrp_INSTALLDATE`
where `MODID` is either
@ -118,4 +118,4 @@ where `MODID` is either
and `INSTALLDATE` is the date of installation in `%Y%m%D_%H.%M.%S` format (eg: `20180709_20.34.14`).
In case of installation errors, issues or questions provide these files in your report for easier debugging.
In case of installation errors, issues or questions, provide these files in your report for easier debugging.

@ -36,40 +36,51 @@ Created by [gh-md-toc](https://github.com/ekalinin/github-markdown-toc)
### Battery Drain
* microG fails to register applications to GCM/FCM (Cloud Messaging) if they were installed **before** microG, but the apps keep trying to register and that causes the battery drain, all apps installed **after** microG are properly registered, to fix the battery drain issue the following command as root on your device (or via adb shell):
* `find /data/data/*/shared_prefs -name com.google.android.gms.*.xml -delete`
* alternatively `nutl -r`
* this will force un-register all your applications from GCM/FCM and they'll re-register on next start
microG fails to register applications to GCM/FCM (Cloud Messaging) if they were installed **before** microG, but the apps keep trying to register and that causes the battery drain, all apps installed **after** microG are properly registered.
To fix the battery drain, issue the following shell command as root:
```bash
find /data/data/*/shared_prefs -name com.google.android.gms.*.xml -delete
```
Alternatively, use `nutl -r` to force un-register all your applications from GCM/FCM (they'll re-register on next start)
### microG lacks features
* if you use AppOps, PrivacyGuard or the like you have to grant microG GmsCore **all** permissions, if you prevent some permissions, some apps or features might not work as expected or not at all. Note: some APIs/features are stubs in microG GmsCore, meaning they exist that apps don't complain, but they do nothing - thus blocking microG GmsCore is pretty much of no benefit.
If you use `AppOps`, `PrivacyGuard` or the like you have to grant microG GmsCore **all** permissions. If you prevent some permissions, some apps or features might not work as expected or not at all.
**Note:** some APIs/features are stubs in microG GmsCore. They exist so that apps don't complain, but they do nothing so there is no benefit to block GmsCore.
### permissions not granted on Android 10+
### permissions not granted on Android 10 or newer
On some ROMs, It might happen that microG (Magisk mode) is not granted the `RECEIVE_SMS` and `ACCESS_BACKGROUND_LOCATION` permissions. The fix is to install microG as user-app addtionally to system-app. This is done automatically starting with version 23.0 of NanoDroid (and **not** required in System Mode installation).
* in Magisk Mode it might happen on some ROMs that microG is not granted the `RECEIVE_SMS` and `ACCESS_BACKGROUND_LOCATION` permissions, the fix is to install microG as user-app addtionally to system-app, this is done automatically starting with version 23.0 of NanoDroid (and **not** required in System Mode installation), to do so issue the following command on-device as root (via adb shell or Termux):
FYI, to do so, issue the following command on-device as root (via adb shell or Termux):
* Full package: `pm install -r /data/adb/modules/NanoDroid/system/priv-app/GmsCore/GmsCore.apk`
* microG package: `pm install -r /data/adb/modules/NanoDroid_microG/system/priv-app/GmsCore/GmsCore.apk`
* see [microG issue #1100](https://github.com/microg/android_packages_apps_GmsCore/issues/1100#issuecomment-711088518) and [microG issue #1100](https://github.com/microg/android_packages_apps_GmsCore/issues/1100#issuecomment-711141077) for background information
See [microG issue #1100](https://github.com/microg/android_packages_apps_GmsCore/issues/1100#issuecomment-711088518) and [microG issue #1100](https://github.com/microg/android_packages_apps_GmsCore/issues/1100#issuecomment-711141077) for background information
### can't login to Google account on KitKat
* updating microG to (at least) 0.2.7.17455 will fix the issue
Updating microG to (at least) 0.2.7.17455 will fix the issue
### can't login to Goggle account with version 74.x of Chrome/WebView
* updating microG to (at least) 0.2.7.17455 will fix the issue
Updating microG to (at least) 0.2.7.17455 will fix the issue
## Google Play Services are missing
* This misleading error message actually means 'Something is wrong with Play Store'
* ensure as mentioned above you properly [setup microG](#microg-setup) and reboot
* install either Fake Store or Play Store
* grant signature spoofing permission to Fake Store or Play Store
* go to System Settings > Apps > Permissions > Signature Spoofing for that
* on some ROMs you have to tap on the 3-dot-menu `Show System Apps` to see Fake Store
* or manually using `pm grant com.google.gms android.permission.FAKE_PACKAGE_SIGNATURE` as root on-device
* likewise `pm grant com.android.vending android.permission.FAKE_PACKAGE_SIGNATURE` for Phonesky
This misleading error message actually means *Something is wrong with Play Store*.
Ensure as mentioned above you properly [setup microG](#microg-setup) and reboot.
Then, install either **Fake Store** or **Play Store**
* Grant signature spoofing permission to Fake Store or Play Store
* go to System Settings > Apps > Permissions > Signature Spoofing for that
* on some ROMs you have to tap on the 3-dot-menu `Show System Apps` to see Fake Store
* or manually using `pm grant com.google.gms android.permission.FAKE_PACKAGE_SIGNATURE` as root on-device
* likewise `pm grant com.android.vending android.permission.FAKE_PACKAGE_SIGNATURE` for Phonesky
## SafetyNet
@ -97,8 +108,7 @@ Created by [gh-md-toc](https://github.com/ekalinin/github-markdown-toc)
### Updating Play support libraries#
* Play Store tries to update itself or the Play Services, both updates fail because you have microG and a modified Play Store installed
* you can disable the `GMSCoreUpdateService` service of the Play Store to prevent it from updating
Play Store tries to update itself or the Play Services, both updates fail because you have microG and a modified Play Store installed. You can disable the `GMSCoreUpdateService` service of the Play Store to prevent it from updating.
### Can't install split APKs / extra data
@ -108,7 +118,8 @@ Created by [gh-md-toc](https://github.com/ekalinin/github-markdown-toc)
### Play Store does not show bought apps as bought
If your Play Store doesn't show already bought apps as bought, you need to register the device ID to your Google Account, doing so will eliminate the "uncertified" status of Play Store and thus will allow you to re-download your already bought apps. Also remote installations using `https://play.google.com` will be working again afterwards.
If your Play Store doesn't show already bought apps as bought, you need to register the device ID to your Google Account. Doing so will eliminate the "uncertified" status of Play Store and thus will allow you to re-download your already bought apps. Also, remote installations using `https://play.google.com` will work again afterwards.
* Go to microG Settings > Google Device Registration and note the `Android ID`
* Navigate to `https://www.google.com/android/uncertified/` and login using your Google Account
* Enter the ID shown in microG settings into the `Android ID` box and tap register
@ -117,7 +128,7 @@ If your Play Store doesn't show already bought apps as bought, you need to regis
### Play Store web interface can't install apps on my device
See "Play Store does not show bought apps as bought" above, same fix.
See *Play Store does not show bought apps as bought* above, same fix.
## Push Messages
@ -132,7 +143,7 @@ See "Play Store does not show bought apps as bought" above, same fix.
## Unified Nlp
**Note:** unified Nlp has known issues on Android 10.
**Note:** unified Nlp has known issues on Android 10+.
* unified Nlp is not registered in the system
* some ROMs with native signature spoofing don't look for `com.google.android.gms` as location provider
@ -153,9 +164,8 @@ See "Play Store does not show bought apps as bought" above, same fix.
## F-Droid
* On some ROMs (most noticeably MIUI ROMs) F-Droid can't install applications
* this is because F-Droid's Priviledged Extension is not compatible with those ROMs, disable it from
* F-Droid > Settings > Expert Settings > Privileged Extension
On some ROMs (most noticeably MIUI ROMs), F-Droid can't install applications. This is because F-Droid's Priviledged Extension is not compatible with those ROMs:
* Disable it from F-Droid > Settings > Expert Settings > Privileged Extension
## Aurora Store / Aurora Droid
@ -204,8 +214,7 @@ See "Play Store does not show bought apps as bought" above, same fix.
### ROM lags after applying signature spoofing patch
* some ROMs already have the patch built-in, if you patch those ROMs (again), it results in heavy lags
* recent Patcher versions check whether the ROM has the patch already applied and disallow double-patching
Some ROMs already have the patch built-in. If you patch those ROMs (again), it results in heavy lags. Recent Patcher versions check whether the ROM has the patch already applied and disallow double-patching
### Applications can't access storage / permission issues

@ -16,26 +16,21 @@ Created by [gh-md-toc](https://github.com/ekalinin/github-markdown-toc)
## Purpose
The `nanodroid-overlay` Script, respectively it's shortcut `novl` is used by NanoDroid to handle the
The `nanodroid-overlay` Script (`novl` for short) is used by NanoDroid to handle the
* Pseudo Debloat Feature (Magisk Mode)
* Force Debloat Feature (System Mode)
### Pseudo Debloat Feature
Magisk allows for apps to be magically removed upon runtime, they don't get actually removed from `/system` but they are pseudo-removed during runtime.
Magisk allows apps to be magically removed upon runtime. They don't get actually removed from `/system` but they are pseudo-removed during runtime (replaced by a dummy file)
### Force Debloat Feature
In System Mode apps can are moved to `/data/media/0/nanodroid_backups/` or restored from there.
In **System Mode**, apps are moved to `/data/media/0/nanodroid_backups/` to be restored from there if necessary.
### Alter the list of pseudo-debloated applications
You can pseudo-debloat applications by adding them to configuration file
`.nanodroid-overlay`
on your device, in one of the following directories
You can pseudo-debloat applications by adding them to the `.nanodroid-overlay` configuration file on your device, in one of the following directories:
* `/data/media/0` (internal storage (TWRP))
* `/sdcard1` (internal storage (ORANGEFOX))
@ -62,17 +57,15 @@ The following paths are searched for matching apps:
After you've made your changes, issue the following command on your device, either using `adb shell` or **Termux** as root:
`nanodroid-overlay --update`
```bash
nanodroid-overlay --update
```
## Invocation
From within a terminal on your device, for example `adb shell` or `Termux` invoke the script using either
`nanodroid-overlay [switch] [parameter(s)]`
or
From a terminal on your device, for example `adb shell` or `Termux` invoke the script using either
`novl [switch] [parameter(s)]`
`nanodroid-overlay [switch] [parameter(s)]` or `novl [switch] [parameter(s)]`
## Overview
@ -112,25 +105,4 @@ remove existing Overlays
## Default Settings
The following applications are debloated by default
* Basic Dreams
* Calendar
* CM File Manager
* crDroid Filemanager and Music Player
* Eleven, Phonograph (Audio Player)
* E-Mail + Exchange2
* Browser, Gello, Slimperience, Via Browser, Jelly (Browser)
* PhotoTable
* Sound Recorder, Recorder
* messaging (SMS & MMS)
* Wallpaper, WallpaperPickerGoogle (Google Wallpaper application)
* Wallpaper Backup
* mGerrit
* FM Radio
* Gallery2
* OmniSwitch
* Screencast
* Snap, Snapdragon Camera (Camera)
* Resurrection Remix Statistics
* Sim Toolkit
The applications listed in `.nanodroid-overlay` are debloated by default.

@ -1,10 +1,10 @@
Table of Contents
=================
* [NanoDroid-Prop Script](#nanodroid-prop-script)
* [Purpose](#purpose)
* [Invocation](#invocation)
* [Overview](#overview)
* [NanoDroid-Prop Script](#nanodroid-prop-script)
* [Purpose](#purpose)
* [Invocation](#invocation)
* [Overview](#overview)
Created by [gh-md-toc](https://github.com/ekalinin/github-markdown-toc)
@ -12,17 +12,11 @@ Created by [gh-md-toc](https://github.com/ekalinin/github-markdown-toc)
## Purpose
The `nanodroid-prop` Script, respectively it's shortcut `nprp` is used by NanoDroid to utilize Magisk's `resetprop` feature for on-the-fly and permanently adjusting system properties. Properties set by this script survive NanoDroid updates
The `nanodroid-prop` Script (`nprp` in short) is used by NanoDroid to utilize Magisk's `resetprop` feature for on-the-fly and permanently adjusting system properties. Properties set by this script survive NanoDroid updates.
## Invocation
From within a terminal on your device, for example `adb shell` or `Termux` invoke the script using either
`nanodroid-prop [switch] [parameter(s)]`
or
`nprp [switch] [parameter(s)]`
From within a terminal on your device, for example `adb shell` or `Termux` invoke the script using either `nanodroid-prop [switch] [parameter(s)]` or `nprp [switch] [parameter(s)]`
## Overview

@ -17,24 +17,17 @@ Created by [gh-md-toc](https://github.com/ekalinin/github-markdown-toc)
## Purpose
The `nanodroid-util` Script, respectively it's shortcut `nutl` is used by NanoDroid to perform various actions:
The `nanodroid-util` Script (`nutl` in short) is used by NanoDroid to perform various actions:
* fix navigation bar, status bar or lock screen issues after OTA update
* change Airplane Mode radio settings
* prevent applications from stealing audio focus
* prevent applications from reading the clipboard
* display device's boot count
* requires Android 7.0 or newer
* display device's boot count (requires Android 7.0+)
## Invocation
From within a terminal on your device, for example `adb shell` or `Termux` invoke the script using either
`nanodroid-util [switch] [parameter(s)]`
or
`nutl [switch] [parameter(s)]`
From within a terminal on your device, for example `adb shell` or `Termux` invoke the script using either `nanodroid-util [switch] [parameter(s)]` or `nutl [switch] [parameter(s)]`
## Feature overview
@ -42,50 +35,46 @@ or
`-f`, `--fix-update`
fix issues with the navigation bar, status bar or lock screen after applying an OTA update; for a detailed description about this check [> XDA](https://www.xda-developers.com/broken-navigation-bar-lock-screen-ota-update/)
Fix issues with the navigation bar, status bar or lock screen after applying an OTA update.
For a detailed description about this, check [> XDA](https://www.xda-developers.com/broken-navigation-bar-lock-screen-ota-update/)
### Airplane Mode settings
`-a`, `--airplane-mode`
change Airplane Mode settings, this is interactive, user will be given instructions what to do. This allows to change which radios are disabled by Airplane Mode **and additionally** it instructs Android that it does **not** allow re-activation of **those** radios until Airplane Mode is switched off
Change Airplane Mode settings. This is interactive. User will be given instructions on what to do. This allows to change which radios are disabled by Airplane Mode. It also force Android to **not** allow re-activation of **those** radios until Airplane Mode is switched off.
### Prevent audio focus stealing
`-F`, `--audio-focus` [app]
some apps stop audio playback of other apps, when you bring them in foreground (or activate them in multi window mode), with this you can prevent Android from allowing this; [app] is the application name in `com.organisation.application` format, for example `com.xda.labs`
Some apps stop audio playback of other apps when you bring them in foreground (or activate them in multi window mode). With this, you can prevent Android from allowing this behaviour.
[app] is the package name (`com.organisation.application` format). For example: `com.xda.labs`
### Prevent clipboard reading
`-B`, `--read-clipboard` [app]
many apps have the permission to read the clipboard for no reason, with this you can prevent Android from allowing this; [app] is the application name in `com.organisation.application` format, for example `com.xda.labs`
Many apps have the permission to read the clipboard for no reason. You can prevent this behaviour with this.
[app] is the package name (`com.organisation.application` format). For example: `com.xda.labs`
**Note:** don't do this in applications like Browsers or the-like, as you'll disable the whole copy-paste feature for those app(s) with this feature
**Note:** do NOT do this in applications like Browsers or the-like as you'll disable the whole copy-paste feature for those app(s).
### Read boot count
`-b`, `--boot-count`
show how often the device was booted; requires Android 7.0 or newer
Show how often the device was booted; requires Android 7.0+
### Reset GCM Connection
You can reset GCM connection of all apps using
You can reset GCM connection of all apps using `-r`, `--reset-gms-data` or for a single app using `-r [appid]`, `--reset-gms-data [appid]`
`-r`, `--reset-gms-data`
or for a single app using
`-r [appid]`, `--reset-gms-data [appid]`
this is especially useful when the ROM in use previously had GApps installed and now you're not receving any push messages anymore.
This is especially useful when the ROM in use previously had GApps installed and now you're not receving any push messages anymore.
### Reset Permissions
In a rare corner case applications are not granted permission to access camera or storage, despite the user granted the corresponding permission, using
`-R`, `--reset-permissions`
followed by a reboot will fix this issue.
In a rare corner case, applications are not granted permission to access camera or storage, despite the user granted the corresponding permission. Using `-R`, `--reset-permissions` followed by a reboot will fix this issue.

@ -1,27 +1,27 @@
Table of Contents
=================
* [Modules](#modules)
* [Extra Packages](#extra-packages)
* [Modules](#modules)
* [Extra Packages](#extra-packages)
Created by [gh-md-toc](https://github.com/ekalinin/github-markdown-toc)
# Modules
Module packages, flash through TWRP or Magisk Manager
Module packages: flash through TWRP or Magisk Manager
**NanoDroid**: includes
* everything mentioned in the Summary
**NanoDroid-microG**: includes (only)
* microG and it's companions
* microG and its companions
* pseudo/force-debloat feature
* app store(s)
* GApps and location packages auto-removal
**NanoDroid-fdroid**: includes (only)
* F-Droid and it's privileged extension
* Auroa Droid and it's privileged extension
* F-Droid and its privileged extension
* Aurora Droid and it's privileged extension
**NanoDroid-BromiteWebView**: includes (only)
* [Bromite WebView](https://www.bromite.org/system_web_view)

@ -13,22 +13,20 @@ Created by [gh-md-toc](https://github.com/ekalinin/github-markdown-toc)
For **microG** to work, your ROM needs to have signature spoofing enabled (or a **deodexed** ROM to patch yourself).
If your ROM does **not** have signature spoofing support, you can manually patch it either
* flashing the on-device Patcher zip
* it also installs an addon.d script that auto re-patches the ROM upon update
If your ROM does **not** have signature spoofing support, you can manually patch it by flashing the on-device Patcher zip. It also installs an `addon.d script` that auto re-patches the ROM upon update.
If your ROM is **odexed** read [this instructions](DeodexServices.md) on how to deodex services.jar manually
If your ROM is **odexed**, read [this instructions](DeodexServices.md) on how to deodex services.jar manually.
The Patcher supports installing the patched `services.jar` into the following locations:
* NanoDroid Magisk Module
* NanoDroid-microG Magisk Module
* directly into `/system`
So you can use it regardless whether you're using NanoDroid or not.
So you can use it regardless you're using NanoDroid or not.
## microG Setup
Once your ROM supports signature spoofing, you need to setup microG like this
Once your ROM supports signature spoofing, you need to setup microG like this:
* go into **microG settings** and set up everything like:
* check results in **Self-Check**, grant missing permissions (by tapping on them)
* especially the **Battery Optimization** item

@ -12,8 +12,8 @@ detect_bootmode () {
}
ui_print() {
echo -n -e "ui_print $1\n" >> /proc/self/fd/$OUTFD
echo -n -e "ui_print\n" >> /proc/self/fd/$OUTFD
echo -e "ui_print $1" >> /proc/self/fd/$OUTFD
echo -e "ui_print" >> /proc/self/fd/$OUTFD
}
grep_prop() {
@ -102,13 +102,13 @@ toupper() {
}
find_block () {
local block tmp partname devname device
local block partname devname device
block=${1}${SLOT}
device=$(find /dev/block \( -type b -o -type c -o -type l \) -name ${block} | head -n 1)
if [ ! -z ${device} ]; then
readlink -f ${device}
if [ -n "$device" ]; then
readlink -f "$device"
return 0
fi
@ -122,8 +122,8 @@ find_block () {
done
device=$(find /dev \( -type b -o -type c -o -type l \) -maxdepth 1 -iname ${block} | head -n 1)
if [ ! -z ${device} ]; then
readlink -f ${device}
if [ -n "$device" ]; then
readlink -f "$device"
return 0
fi

Loading…
Cancel
Save