exist in the `data` directory of the repository, if so, those files are used when creating packages instead of the default ones from the `doc` directory.
The recovery log and installation configuration is stored after installation, regardless with it succeeded or failed.
You'll find the files in
* /data/adb/.recovery_MODID
* /data/adb/.nanodroid_MODID
where MODID is either NanoDroid, NanoDroid_microG or NanoDroid_FDroid. In case of installation errors, issues or questions provide theese files in your report for easier debugging.
* choose between official **Play Store** [> APK Mirror](https://www.apkmirror.com/apk/google-inc/google-play-store/) or unofficial **Yalp Store** [> F-Droid](https://f-droid.org/repository/browse/?fdfilter=yalp&fdid=com.github.yeriomin.yalpstore)
F-Droid [> Website](http://www.fdroid.org) is an app store for Open Source applications.
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`.
Additionally NanoDroid includes a variety of applications, check full details [> GitHub](doc/Applications.md)
### The Legend of Zelda ringtones and sounds
NanoDroid includes **The Legend of Zelda** [> Nintendo](http://www.zelda.com/) ringtones and sounds, because it's dangerous to root alone.
Full [> Details](doc/AlterInstallation.md) on altering installation manually, or use the Setup Wizard (if you've got an arm/arm64 device).
### Installation Process
#### NanoDroid
* Use Setup Wizard to create configuration files (if you've got an arm/arm64 device), or create manually (see above)
* Download pre-built zip or create one from this repository
* perform full wipe (/system, /data, /cache, Dalvik/ART cache)
* recommended, but not required
* install desired ROM
* make sure it does **not** include GApps if you want to use microG
* either pre-patched with signature spoofing support or **deoxeded** so you can patch yourself (instructions follow)
* install **Magisk**
* recommended, but not required
* if **Magisk** is installed, NanoDroid will be installed as Magisk-Module, else it will install into `/system` directly
* install desired Kernel (if any)
* install **NanoDroid**
* reboot into ROM
#### microG
##### Signature Spoofing Support
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
* running the `framework-patcher` script
* use from your PC or laptop while your device is in TWRP. This shell script for GNU Bash (and compatible shells) works on unixoid operating systems like GNU/Linux, BSD or MacOS. It automizes the process of downloading Haystack [> GitHub](https://github.com/Lanchon/haystack), pulling files from phone, patching and installing the modified `services.jar` on the device.
Both patchers support installing the patched `services.jar` into the following locations:
* NanoDroid Magisk Module
* NanoDroid-microG Magisk Module
* directly into `/system`
So you can use them regardless whether you're using NanoDroid or not.
##### microG Setup
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
* enable **Google device registration**
* enable **Google Cloud Messaging** (only if you want to receive push messages from your applications)
* enable **Google SafetyNet** (required for applications that utilize SafetyNet, for example Pokémon GO, ...)
* SafetyNet check fails with `Google Play Services not available`
* you did not setup microG (or did not reboot afterwards)
* Battery Drain
* microG fails to register applications to GCM (Google 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 either
* do a clean flash of your ROM (, Magisk) and NanoDroid and install your apps after microG setup
* uninstall and re-install all your applications (backup application data if required)
* 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.
Additional helpful information in the microG [> Wiki](https://github.com/microg/android_packages_apps_GmsCore/wiki/Helpful-Information).
## TODO
* better error handling in **on-pc** framework-patcher