Add monospace markdown

gf-arm64
FriendlyNeighborhoodShane 3 years ago
parent 6ad032968b
commit 3811525c3f

@ -78,7 +78,7 @@ Just rename it and flash it again for the intended effect. For example, `MinMicr
NOTE: If you have made a system install but have Magisk installed as well, you will have to use both `system` and `uninstall` keywords in the name for an uninstall flash.
The zip debloats three specific Google apps from your phone (GmsCore, GoogleServicesFramework, Phonesky and their MicroG counterparts) and 4 NLP providers when the pack contents conflicts with them. In Magisk mode, they won't be removed from system, and if you uninstall the pack, they'll come back. If you install in system, the debloated stuff will be stored in internal-storage/MinMicroG/Backup.
The zip debloats three specific Google apps from your phone (GmsCore, GoogleServicesFramework, Phonesky and their MicroG counterparts) and 4 NLP providers when the pack contents conflicts with them. In Magisk mode, they won't be removed from system, and if you uninstall the pack, they'll come back. If you install in system, the debloated stuff will be stored in `internal-storage/MinMicroG/Backup`.
WARNING: This zip does not and never will debloat anything else because that is the minimum coming in MicroG's way. I have had my own share of PTSD with debloating. I believe (through instinct) that it should work even on flashes over GApped ROMs, but don't take my word for it. Debloat before you flash.
For support with flashing:
@ -93,28 +93,28 @@ List of hard dependencies:
- `unzip` (update.sh)
- `zip` (build.sh)
cd to this directory and run:
`cd` to this directory and run:
```
> ./update.sh
```
To download all the assets to resdl directory.
To download all the assets to `resdl` directory.
```
> ./build.sh all
```
To build all the packs and place them in the releases directory.
To build all the packs and place them in the `releases` directory.
That's it! If it tells you that some dependency is missing, install it.
You can pass `update.sh` several perl-style regexes as arguments to only download specific files.
You can pass `update.sh` several extended regexes as arguments to only download specific files.
You can pass `build.sh` some specific pack's conf names instead of all to build only the specific packs.
If you have the Java SDK and `openssl` installed, the update script will dump the signing certificates of all downloaded APKs and repo jars to resdl/util/certs. It will compare all future downloads with those certs, and in case of any signature errors or mismatches, will warn you.
If you have the Java SDK and `openssl` installed, the update script will dump the signing certificates of all downloaded APKs and repo jars to `resdl/util/certs`. It will compare all future downloads with those certs, and in case of any signature errors or mismatches, will warn you.
If you have `aapt` installed, the update script will download the permission docs from the Android website, check the priv-apps for any new privileged permissions and tell you to add them to the whitelist in res/system/etc/permissions/[package].xml files.
If you have `aapt` installed, the update script will download the permission docs from the Android website, check the priv-apps for any new privileged permissions and tell you to add them to the whitelist in `res/system/etc/permissions/[package].xml` files.
To build your own custom pack, refer to custom-pack.md in the conf directory.
To build your own custom pack, refer to `conf/custom-conf.md`.
Any changes made to the code should ideally be tested with `test.sh`, which runs the shellcheck linter program on every script.
Any changes made to the code should ideally be tested with `test.sh`, which runs the `shellcheck` linter program on every script.
### Credits
- Thanks to @osm0sis for the base magisk/recovery code and inspiration and guidance on the majority of the stuff in here.

@ -4,26 +4,26 @@ All the config files for packs.
Every pack is built and installed according to a config file. A config file is supposed to be a simple shell script setting some variables and functions. It's not supposed to execute any command, which is important, as it is executed by both the building process on the building device and the flashing process on the flashing device.
All the config files are named as defconf-[name].txt where [name] is the argument you'll pass to `build.sh` to build a pack using that config file.
The resdl-download.txt file is a special config that is read by `update.sh` to download all the relevant dynamic assets.
All the config files are named as `defconf-[name].txt` where `[name]` is the argument you'll pass to `build.sh` to build a pack using that config file.
The `resdl-download.txt` file is a special config that is read by `update.sh` to download all the relevant dynamic assets.
The rest of the files here are code snippets you might find useful to put in install actions.
For making your own pack and config file, check custom-pack.md
For making your own pack and config file, check `conf/custom-conf.md`.
## Variables in defconf files
- `variant`: The name that will be in the filename of the released zip as well as will be shown on installation. It does not have to be related to the name of the defconf file (for example the defconf-unlp.txt file has variant "Backend" and creates the MinMicroG-Backend-*-*.zip package). Any string without whitespace will do.
- `variant`: The name that will be in the filename of the released zip as well as will be shown on installation. It does not have to be related to the name of the defconf file (for example the `defconf-unlp.txt` file has variant "Backend" and creates the `MinMicroG-Backend-*-*.zip` package). Any string without whitespace will do.
- `ver`: The version number of the package, which is shown in the release filename and during installation. It can be anything except whitespace, but for convenience is integers along with decimals.
- `verc`: The version code for the package. It's only really used in Magisk installations's mod.prop, where Magisk compares it to decide if a version of the module is newer than the installed version. It strictly has to be an integer.
- `verc`: The version code for the package. It's only really used in Magisk installations's `mod.prop`, where Magisk compares it to decide if a version of the module is newer than the installed version. It strictly has to be an integer.
- `date`: The date of releasing the specific pack version, shown on installation.
- `minsdk`: The minimum Android SDK version the pack supports fully. It'll still install below that, but will show a warning to the user.
- `modprop`: The variable containing the entirety of Magisk's mod.prop, which will appear in your installed modules. Nothing really important here except verc, which is described above, and id, which has to be the same as modname variable from update-binary.
- `stuff`, `stuff_arch`, `stuff_sdk`, `stuff_arch_sdk`: Stuff variables are really space/tab-separated lists of all the objects (Relative to the root of the zip during flashing, or relative to either res or resdl directories in the build process) that are installed to be installed to device. It is going to be put through a for loop, so no whitespace is to be used in a single entry. Luckily, android system files aren't supposed to have spaces in their names/paths. For files in `stuff`, the file with that path is grabbed directly from res or resdl (in ascending priority), while for the other arrays, the files are grabbed from $(dirname [path])/-*-/$(basename [path]) (further clarification in build-your-pack.md).
- `stuff_util`: Same whitespace-separated list as above, but for things that should be grabbed from res or resdl during building, but not placed during installation. Could be used for extra tools used in the hook funcs.
- `stuff_other`, `stuff_old`: Just lists of stuff from other packs and stuff that used to be in any of the packs that I made for organisation. They have no purpose other than to be merged in stuff_uninstall.
- `modprop`: The variable containing the entirety of Magisk's `mod.prop`, which will appear in your installed modules. Nothing really important here except `verc`, which is described above, and `id`, which has to be the same as `modname` variable from `update-binary`.
- `stuff`, `stuff_arch`, `stuff_sdk`, `stuff_arch_sdk`: Stuff variables are really space/tab-separated lists of all the objects (Relative to the root of the zip during flashing, or relative to either `res` or `resdl` directories in the build process) that are installed to be installed to device. It is going to be put through a for loop, so no whitespace is to be used in a single entry. Luckily, android system files aren't supposed to have spaces in their names/paths. For files in `stuff`, the file with that path is grabbed directly from `res` or `resdl` (in ascending priority), while for the other arrays, the files are grabbed from `$(dirname [path])/-*-/$(basename [path])`.
- `stuff_util`: Same whitespace-separated list as above, but for things that should be grabbed from `res` or `resdl` during building, but not placed during installation. Could be used for extra tools used in the hook funcs.
- `stuff_other`, `stuff_old`: Just lists of stuff from other packs and stuff that used to be in any of the packs that I made for organisation. They have no purpose other than to be merged in `stuff_uninstall`.
- `stuff_uninstall`: Everything in this list is removed from system during a system installation and uninstallation. Should include everything in the pack, along with anything that used to be in it and anything that might be from alternative conflicting packs.
- `stuff_debloat`: Anything not from these packs that might conflict with it. For example GApps, other location providers, etc. They are removed (and backed up) during a system install and pseudo-debloated during a Magisk install.
- `stuff_perm`: Subdirectories of /system on which permission are to be applied in case of a system installation. This variable exists because perming the whole system takes too long.
- `stuff_perm`: Subdirectories of `/system` on which permission are to be applied in case of a system installation. This variable exists because perming the whole system takes too long.
## Functions in defconf files
@ -34,12 +34,12 @@ For making your own pack and config file, check custom-pack.md
- `pre_uninstall_actions()`
- `post_uninstall_actions()`
Pretty self explanatory. Leave them blank with a return 0 if there's no use for them, not having them at all will cause errors.
Pretty self explanatory. Leave them blank with a `return 0` if there's no use for them, not having them at all will cause errors.
## Variables in resdl-conf file
## Variables in `resdl-conf.txt`
- `stuff_repos`: List of FDroid format app repositories that are to be downloaded and their contents used by update.sh. First column has their names, which are to be unique and are the key to access them in stuff_download. Second column is the URL, to which appending '/index-v1.jar' should result in an object downloadable by wget.
- `stuff_download`: List of actual objects that are put into resdl by `update.sh`. First column is the filepath inside resdl that it should be put in. Second column is the source that it comes from, which is one of local, direct, github, gitlab, or repo. Other columns depend upon the source and any extra columns are ignored. For local, third column is a path resolved against the repo directory from which the file is cp'd to the destination. For direct, the third column is a URL that must be downloadable using wget. For github and gitlab, the third column is [repo owner]/[repo name] from which the newest file is grabbed from the releases page, optionally filtering only for the regex-enabled suffix in the fourth column if provided. For repo, it's the [repo key]/[package name] of which the latest APK is grabbed, optionally filtering for the arch and minimum SDK if provided in the third column in the format ARCH:SDK (one of these variables can be ommitted but not the colon).
- `stuff_repos`: List of FDroid format app repositories that are to be downloaded and their contents used by `update.sh`. First column has their names, which are to be unique and are the key to access them in `stuff_download`. Second column is the URL, to which appending "/index-v1.jar" should result in an object downloadable by `curl`.
- `stuff_download`: List of actual objects that are put into `resdl` by `update.sh`. First column is the filepath inside `resdl` that it should be put in. Second column is the source that it comes from, which is one of `local`, `direct`, `github`, `gitlab`, or `repo`. Other columns depend upon the source and any extra columns are ignored. For `local`, third column is a path resolved against the repo directory from which the file is `cp`'d to the destination. For `direct`, the third column is a URL that must be downloadable using `curl`. For `github` and `gitlab`, the third column is `[repo owner]/[repo name]` from which the newest file is grabbed from the releases page, optionally filtering only for the regex-enabled suffix in the fourth column if provided. For repo, it's the `[repo key]/[package name]` of which the latest APK is grabbed, optionally filtering for the arch and minimum SDK if provided in the third column in the format `ARCH:SDK` (one of these variables can be ommitted but not the colon).
## Functions in resdl-conf file

@ -4,56 +4,56 @@ The MinMicrog update, build, and install scripts were written with one primary g
To prove this, we're gonna write a new config and resdl-download file for an entirely new and relatively simple pack: the AuroraServices package containing just AuroraServices along with a perm file.
If you've read through this document (or perhaps want to play Russian roulette with `rm` and your device), there is a blank config file in defconf-dummy.txt that you can fill in.
If you've read through this document (or perhaps want to play Russian roulette with `rm` and your device), there is a blank config file in `defconf-dummy.txt` that you can fill in.
### `update.sh` and resdl-download.txt
First, before making a pack, we gotta get the Aurora APK files from somewhere. We could've just downloaded and put them in the res directory, but they'd need to be updated and I'm lazy, so no.
### `update.sh` and `resdl-download.txt`
First, before making a pack, we gotta get the Aurora APK files from somewhere. We could've just downloaded and put them in the `res` directory, but they'd need to be updated and I'm lazy, so no.
What `update.sh` does for me is get everything I would need for a pack itself from a list of predefined sources and puts them in their proper places in the resdl directory so the build script picks them up. Now, `update.sh` knows what to get by executing and getting the variables from resdl-download.txt (open it and see) in the conf directory, so we're gonna add a few lines to it to get the Aurora APKs downloaded automatically when we run the script.
What `update.sh` does for me is get everything I would need for a pack itself from a list of predefined sources and puts them in their proper places in the `resdl` directory so the build script picks them up. Now, `update.sh` knows what to get by executing and getting the variables from `conf/resdl-download.txt` (open it and see), so we're gonna add a few lines to it to get the Aurora APKs downloaded automatically when we run the script.
We could get them from FDroid, but their releases are usually out of date and I trust Whyorean so we're gonna grab them from his GitLab page. Fortunately, he has precompiled binaries on his releases page.
Now, we don't need any new FDroid repo for this, so we leave the stuff_repos list untouched. But we're gonna change stuff_download.
Now, we don't need any new FDroid repo for this, so we leave the `stuff_repos` list untouched. But we're gonna change `stuff_download`.
For AuroraServices, we'll be keeping the file at path /system/priv-app/AuroraServices/AuroraServices.apk (inside resdl). The URL for the project is https://gitlab.com/AuroraOSS/AuroraServices at the official gitlab server, so our source type is 'gitlab' and source path is 'AuroraOSS/AuroraServices'. So we add the line:
For AuroraServices, we'll be keeping the file at path `/system/priv-app/AuroraServices/AuroraServices.apk` (inside `resdl`). The URL for the project is `https://gitlab.com/AuroraOSS/AuroraServices` at the official gitlab server, so our source type is `gitlab` and source path is `AuroraOSS/AuroraServices`. So we add the line:
```
/system/priv-app/AuroraServices/AuroraServices.apk gitlab AuroraOSS/AuroraServices
```
To stuff_download.
To `stuff_download`.
But ding-ding! When you run the script, you may or may not notice that you may or may not get a valid APK file as the result. Why is that? open AuroraServices's GitLab releases page for yourself and see. The problem is that Whyorean provides a Flashable zip with each release too! How considerate. But that's a problem for the script, because as you may or may not have seen, our poor `update.sh` can get confused between different files in a release, and we can't exactly blame it; It has no way to know what we wanted and what we got are different, it's simply grabbing the latest file from a release's attachments.
Fortunately, I am wise. I foresaw this situation, and so I added a way to filter through the release files from a GitLab page. All we have to do is add a '.apk' in the fourth column, so that `update.sh` will first filter all the release attachments into only those having .apk at the end, and then grab the latest of them. So what we have to change that entry into is:
Fortunately, I am wise. I foresaw this situation, and so I added a way to filter through the release files from a GitLab page. All we have to do is add a `.apk` in the fourth column, so that `update.sh` will first filter all the release attachments into only those having .apk at the end, and then grab the latest of them. So what we have to change that entry into is:
```
/system/priv-app/AuroraServices/AuroraServices.apk gitlab AuroraOSS/AuroraServices .apk
```
Note that while here I am using a simple suffix for this filtering since there are no other APKs to be confused by, you can also use a more complicated perl-style regex like 'AuroraServices-v[.1-9]*.apk' to protect against future additional APKs in the releases.
Also note that exact same behaviour applies to the fourth column for the 'github' source type.
Additionally note that the fourth column for the 'repo' source type has a different function but similar purpose; It is the architecture and minimum SDK level to filter all the available APKs by.
Note that while here I am using a simple suffix for this filtering since there are no other APKs to be confused by, you can also use a more complicated extended regex like `AuroraServices-v[.1-9]*.apk` to protect against future additional APKs in the releases.
Also note that exact same behaviour applies to the fourth column for the `github` source type.
Additionally note that the fourth column for the `repo` source type has a different function but similar purpose; It is the architecture and minimum SDK level to filter all the available APKs by.
Now, when we run `update.sh`, as long as the internet is still up, we will get a correct AuroraServices.apk where we wanted.
### `build.sh` and defconf-aurora.txt
### `build.sh` and `defconf-aurora.txt`
For a new pack, we make a new defconf file. Note that the name in the defconf file is only used to execute the build command, the name of the zip in releases will be using the variant variable in the defconf. Open the defconf-aurora.txt file and see what the final result is.
For a new pack, we make a new defconf file. Note that the name in the defconf file is only used to execute the build command, the name of the zip in releases will be using the `variant` variable in the defconf. Open the `defconf-aurora.txt` file and see what the final result is.
NOTE: I only reccomend doing this if you're familiar with shell scripts. DO NOT execute anything directly in the file; it is executed at both build time and flash time, so I hope it's obvious that's a bad idea.
- First, we set the variant variable to AuroraServices.
- First, we set the `variant` variable to "AuroraServices".
- Then, we set ver, verc, and date to the correct values, considering that verc has to be an integer.
- Then, we set `ver`, `verc`, and `date` to the correct values, considering that `verc` has to be an integer.
- Since Services only supports lollipop and above, we set minsdk to 21.
- Since Services only supports lollipop and above, we set `minsdk` to `21`.
- Then we fill up the empty values in modprop, seeing as id has to be the modname defined in update-binary, and the Magisk module template is at 1900.
- Then we fill up the empty values in `modprop`, seeing as `id` has to be the `modname` defined in `update-binary`, and the Magisk module template is at `1900`.
- Since we have only two files (I wrote up the perm file) to be installed and they both are the same for various architectures and SDKs, we just add them to stuff.
(To understand how the others like stuff_arch and stuff_sdk work, I'd reccomend running `update.sh` and looking at the keyboard swipe and contact sync files.)
- Since we have only two files (I wrote up the perm file) to be installed and they both are the same for various architectures and SDKs, we just add them to `stuff`.
(To understand how the others like `stuff_arch` and `stuff_sdk` work, I'd recommend running `update.sh` and looking at the keyboard swipe and contact sync files.)
- They don't have anything they conflict with, so nothing to add to stuff_debloat.
- They don't have anything they conflict with, so nothing to add to `stuff_debloat`.
- We need to add permissions to the two files, so we add their respective directories to stuff_perm.
- We need to add permissions to the two files, so we add their respective directories to `stuff_perm`.
- We don't have anything special to do with this package, so nothing in the build or install functions. But we don't remove the functions completely, that would cause an error.
@ -66,4 +66,4 @@ Execute
> ./build.sh aurora
```
And you should find a AuroraServices pack in the releases directory.
And you should find a AuroraServices pack in the `releases` directory.

@ -1,6 +1,7 @@
# Install Guide
**Where I force my opinions on you**
**Kanged from the NoGoolag Telegram group and microG subreddit**
### Instructions for installation
@ -31,13 +32,13 @@ Most of your self-check should be checked by now. If the last one or two are not
##### [microG] Signature spoofing
Sigspoofing is a feature that is required by several core features of MicroG, namely those that require pretending to be the real Google Play Services.
All apps basically call Play Services like, "Yo, package com.google.android.gms with signature x, I need this done". So for microg to receive that message, microg needs to have the same signature.
All apps basically call Play Services like, "Yo, package `com.google.android.gms` with signature `x`, I need this done". So for microg to receive that message, microg needs to have the same signature.
But since we don't have google's keys to sign the microg apk with the same signature as gapps, we add an extra feature in Android that makes microg look like it has the play services signature. The app asks, "Hey Android, is this really play services?" Android responds <crossing its fingers>, "Yeah, sure".
Of course, this is only a simplified explanation. To be more technically accurate, it patches Android's signature checking mechanism at the core. Because of that, apps can misuse the permission and compromise your device by allowing APKs from different (possibly malicious) creators to be installed over the current one.
ROMs with a source sigspoof patch are much less dangerous in this regard because they have sigspoofing as a part of the Android runtime permissions GUI, as opposed to dexpatched ROMs, which grant it universally without any user consent. Regardless, you should carefully watch who you grant sigspoof to, and how you update that app. I am not aware of any app that legitimately requires sigspoof other than microG and fakestore.
ROMs with a source sigspoof patch are much less dangerous in this regard because they have sigspoofing as a part of the Android runtime permissions GUI, as opposed to dexpatched ROMs, which grant it universally without any user consent. Regardless, you should carefully watch who you grant sigspoof to, and how you update that app. I am not aware of any app that legitimately requires sigspoof other than microG, fakestore, and patched Playstore.
Because the permission has the possibility to be misused, several ROM maintainers (including LOS) have rejected putting sigspoof in the official code. But most of them have rejected it just because they are averse to trying to leave Google. Some ROMs that do include sigspoof in official builds are:
* LOS for µG
@ -71,11 +72,11 @@ What is network location? It's a quick and rough estimate of your location, seve
It technically should not be needed for the functioning of most apps, but poorly coded ones that depend on Google Play Services often crash without it.
Most ROMs should support it, but some OnePlus's and Xaiomi's have other providers (like com.qualcomm.location) that do not allow other providers to bind with system.
Most ROMs should support it, but some OnePlus's and Xaiomi's have other providers (like `com.qualcomm.location`) that do not allow other providers to bind with system.
If UNLP doesn't bind on your N+ ROM:
- Ask maintainer to apply this [patch](https://github.com/microg/android_packages_apps_UnifiedNlp/blob/master/patches/android_frameworks_base-N.patch)
- Make sure your the ROM looks for com.google.android.gms as a location provider
- Make sure your the ROM looks for `com.google.android.gms` as a location provider
##### No preinstalled GApps, obviously
MinMicroG does a little debloating that may even make it work on GApps-infected ROMs, but I've never tested and give no guarantees. (Well I don't give guarantees for clean ROMs either, but that'a a different thing)
@ -96,7 +97,7 @@ Or if you're a masochist, there are several ways to clean those kinds of ROMs:
### Troubleshooting
##### Not registered as system location provider
If multiple reboots do not solve this, some other provider might be overriding it, like com.qualcomm.location. Debloat them. If that doesn't solve it, your ROM may require source-level patches, detailed in the prerequisites section.
If multiple reboots do not solve this, some other provider might be overriding it, like `com.qualcomm.location`. Debloat them. If that doesn't solve it, your ROM may require source-level patches, detailed in the prerequisites section.
##### Misc network location problems
I should take these two paragraphs to clarify that Network location is NOT GPS. microG has nothing to do with your GPS. Network Location is that hugely approximated wide-circle that appears before you get a GPS Lock.
@ -127,8 +128,7 @@ if no:
- Before restoring a backup, first restore the app only (without data) and start it to register the app. After that you can restore the data.
If yes:
- Ensure you don't have an adblocker blocking the domain, whitelist it in adaway and similar:
mtalk.google.com
- Ensure you don't have an adblocker blocking the domain, whitelist it in adaway and similar: `mtalk.google.com`
If you can't get any app to register for Google Cloud Messaging, try dialing this:
@ -166,9 +166,9 @@ You can retieve your contacts directly from your Google account in a vcf file:
You should also be able to sync contacts with Google without proprietary apps or microG using the open-source CardDAV client DAVdroid (available on F-Droid or Play)
- First of all, go to Google dashboard's [less secure apps setting](https://www.google.com/settings/security/lesssecureapps) with your account and enable the setting
- When logging in with DAVDroid, Use "Login with URL and user name"
- Base URL: https://www.google.com/calendar/dav/your_gmail_id@gmail.com/events
- User name: your_gmail_id@gmail.com
- Password: Your Google account password
- Base URL: `https://www.google.com/calendar/dav/[your_gmail_id]@gmail.com/events`
- User name: `[your_gmail_id]@gmail.com`
- Password: `[your_google_password]`
##### Android Wear companion apps
- GatgetBridge companion app on F-Droid

@ -1,3 +1,3 @@
Put all static or manually updated binary assets in the system or util folder here.
Put all static or manually updated binary assets in the `system` or `util` folder here.
Automagically updated assets go in resdl instead.
Automagically updated assets go in `resdl` instead.

@ -1,3 +1,3 @@
Script downloads all updateable assets in system or util here.
Script downloads all updateable assets in `system` or `util` here.
All static or manually updated assets go in res instead.
All static or manually updated assets go in `res` instead.

@ -1,3 +1,3 @@
The main scripts for MinMicroG installer.
The recovery or Magisk Manager execute update-binary, which unzips and executes defconf from the zip's root directory, and... does stuff. I hope to have better docs about it someday, but for now, I've made sure you won't have to deal with it even if you want to make a new pack. I've also tried to keep it simple and readable, even if I failed miserably in several places.
The recovery or Magisk Manager execute `update-binary`, which unzips and executes defconf from the zip's root directory, and... does stuff. I hope to have better docs about it someday, but for now, I've made sure you won't have to deal with it even if you want to make a new pack. I've also tried to keep it simple and readable, even if I failed miserably in several places.

Loading…
Cancel
Save