Update docs and add dummy pack

gf-arm64
ShaneTheAwesome 5 years ago
parent 0250e57e24
commit 9e6659f555

@ -1,64 +1,91 @@
# Minimal MicroG Installer
# MinMicroG
### By MOVZX and FatherJony and FriendlyNeighborhoodShane
*A simple, flexible MicroG Installer*
*A simple, flexible MicroG/gang Installer*
### Links
* [GitHub](https://github.com/FriendlyNeighborhoodShane/MinMicroG)
* [Support](https://t.me/joinchat/FyFlS0X2D7f6YNvdxhEsfw)
### Description
This is a simple MicroG installer. It can install MicroG into your system partition or as a Magisk module. It supports virtually all mobile architectures (arm/64, x86/64, mips/64) and fully supports KitKat and above. It can also (mostly) support much older versions, but sync adapters and some location providers won't work. It can even uninstall itself from your device, just rename it and flash it again.
* [Support in TeleGram group](https://t.me/joinchat/FyFlS0X2D7f6YNvdxhEsfw) (Ping me at @shanetheawesome)
It contains an unofficial fork of MicroG (GMSCore, GSFProxy, Droidguard) (Compiled by MOVZX) with bumped version numbers so that apps don't complain about updating playstore.
### What is this?
This is a simple MicroG installer. It can install MicroG and othe stuff into your system partition or as a Magisk module. It supports virtually all mobile architectures (arm/64, x86/64, mips/64) and fully supports KitKat and above. It can also (mostly) support much older versions, but sync adapters and some location providers won't work. It can even uninstall itself from your device, just rename it and flash it again.
The things included in the Standard Edition zip are:
- MicroG (GMSCore, GSFProxy, Droidguard, Maps APIv1)
- Google Play store (modded for IAPs by Setialpha)
- UNLP backends (Dejá vu, LocalGSM, LocalWiFi, Mozilla, Nominatim)
- AuroraDroid
- AuroraServices
- Swype libs for AOSP keyboard
- Some Google DRM jars
- Google Sync adapters for KK to O
- Permission files for all of this
- An addon.d file to backup/restore everything on a rom flash
- MicroG (GMSCore, GSFProxy, Droidguard, Maps APIv1) (from MicroG FDroid repo)
- Google Play store (modded for IAPs by Setialpha)
- UNLP backends (Dejá vu, LocalGSM, LocalWiFi, Mozilla, Nominatim, RadioCells) (From FDroid repo)
- AuroraDroid (From Whyorean's GitLab)
- AuroraServices (From Whyorean's GitLab)
- Swype libs for AOSP keyboard (From OpenGApps GitHub repo)
- Some Google DRM jars (From OpenGApps GitHub repo)
- Google Sync adapters for KK to O (From OpenGApps GitHub repo)
- Permission files for all of this
- An addon.d file to backup/restore everything on a rom flash
The things included in the NoGoolag Edition zip are:
- MicroG (GMSCore, GSFProxy, Droidguard, Maps APIv1)
- FakeStore
- AuroraStore
- AuroraDroid
- AuroraServices
- UNLP backends (Dejá vu, LocalGSM, LocalWiFi, Mozilla, Nominatim)
- Permission files for all of this
- An addon.d file to backup/restore everything on a rom flash
- MicroG (GMSCore, GSFProxy, Droidguard, Maps APIv1) (from MicroG FDroid repo)
- FakeStore (from MicroG FDroid repo)
- AuroraStore (From Whyorean's GitLab)
- AuroraDroid (From Whyorean's GitLab)
- AuroraServices (From Whyorean's GitLab)
- UNLP backends (Dejá vu, LocalGSM, LocalWiFi, Mozilla, Nominatim, RadioCells) (From FDroid repo)
- Permission files for all of this
- An addon.d file to backup/restore everything on a rom flash
The things included in the UNLP Edition zip are:
- UNLP
- UNLP backends (Dejá vu, LocalGSM, LocalWiFi, Mozilla, Nominatim)
- Permission files for all of this
- An addon.d file to backup/restore everything on a rom flash
- UNLP (From FDroid repo)
- Maps APIv1
- UNLP backends (Dejá vu, LocalGSM, LocalWiFi, Mozilla, Nominatim, RadioCells) (From FDroid repo)
- Permission files for all of this
- An addon.d file to backup/restore everything on a rom flash
The zip debloats 3 Google apps from your phone (GmsCore, GoogleServicesFramework, Phonesky and their MicroG counterparts) and 4 NLP providers. 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 guesswork) that it should work even on flashes over gapped ROMs, but don't take my word for it. Debloat before you flash.
### How do I build these packs myself?
First, get the AOSP zipsigner or TopJohnWu's rewrite of it and place it as zipsigner.jar in this repo's parent directory.
cd to this directory and run:
```
> ./update.sh
```
To download all the assets to resdl directory.
```
> ./build.sh all
```
To build all the packs and place them in the releases directory.
For support:
If you flashed through recovery, provide its logs.
If you used Magisk Manager, provide its logs.
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 build.sh a specific pack's conf name instead of all to build only the specif pack.
To build your own custom pack, refer to custom-pack.md in the conf directory.
### Notes
How to control the zip by changing its name:
NOTE: Control by name is not possible in magisk manager, since it copies the zip to a cache directory and renames it install.zip. This is unavoidable behaviour.
- Add 'system' to its filename to force it to install/uninstall from system. Otherwise, it looks for magisk, and if not found, installs to system. Obviously, if you flash it through Magisk manager, you want to install it to Magisk. If not, you have to flash it through recovery.
- Add 'system' to its filename to force it to install/uninstall from system. Otherwise, it looks for magisk, and if not found, installs to system. Obviously, if you flash it through Magisk manager, you want to install it to Magisk. If not, you have to flash it through recovery.
- Add 'uninstall' to its filename to uninstall it from your device, whether in magisk mode or system mode. If you use Magisk Manager, your preffered method of uninstallation is from there.
- Add 'uninstall' to its filename to uninstall it from your device, whether in magisk mode or system mode. If you use Magisk Manager, your preffered method of uninstallation is from there.
Just rename it and flash it again for the intended effect.
NOTE:
The zip debloats the 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:
If you flashed through recovery, provide its logs.
If you used Magisk Manager, provide its logs.
### Common problems:
- MicroG showing wrong signature for Phonesky? Lemme guess... System mode? Dirty flashed? Go to shell and type (ofcourse with su):
pm grant com.android.vending android.permission.FAKE_PACKAGE_SIGNATURE
- Dirty flashing not recommended. you'll mess up all your permissions and may even cause conflicts in app data, leading to crashes.
The maker does not support or endorse dirty flashing. It will harm you and your loved ones. Don't come complaining to me.
Thanks to @osm0sis for the base magisk/recovery code and inspiration and guidance on the majority of the stuff in here. You're awesome.
Thanks to @Setialpha, the creator of NanoDroid, and ale5000 for the lib installation code and permissions code.
### Credits
- Thanks to @osm0sis for the base magisk/recovery code and inspiration and guidance on the majority of the stuff in here.
- Thanks to @Setialpha, the creator of NanoDroid, and ale5000 for the lib installation code, permissions code, and patched play.
- Thanks to FDroid and the MicroG project for actively resisting monopoly and control so we can actually use our devices without fear.
- Thanks to Whyorean for his amazing works in the form of the Aurora Apps.
- Thanks to my friends over at NoGoolag for their help and patience over however long it took me to learn to do shit without "rm -rf /"-ing devices.
And most of all, thank you Google & gang for being so shitty to people and thus giving us a mission.

@ -54,7 +54,7 @@ mkdir -p "$tmpdir";
# Config
cp -Rf "$workdir/conf/defconf-$confvar.txt" "$tmpdir/defconf";
eval "$(cat "$tmpdir/defconf")";
eval "$(cat "$tmpdir/defconf")" || { echo "ERROR: Config for $confvar cannot be executed"; return 1; };
echo " ";
echo " - Config says variant $variant";

@ -1 +1,41 @@
All the config files
# conf
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.
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
## 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.
- 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.
- 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 apear 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-separeted 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. in every device, regardless of architecture or SDK version. 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_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.
- service (optional): The contents of what should be in service.sh in magisk installations and init.d scripts in system installations.
- addond (optional): The contents of what should be in the addon.d scripts in system installations. No need for this on Magsisk, since modules are already stored in data.
## Functions in defconf files
- pre_install_actions()
- post_install_actions()
- 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.
## Variables in resdl-conf file
- 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 if provided in the third column (arch is usually one of arm64-v8a, armeabi, armeabi-v7a, mips, mips64, x86, x86_64).

@ -0,0 +1,73 @@
# Custom pack guide
The MinMicrog update, build, and install scripts were written with one primary goal in mind: To be completely abstracted from any files being processed using it (of course, along with being fast and widely supported), which is its primary advantage in use cases over any other similar Android flashable mods (besides helping me in staying lazy). What is being installed doesn't matter to the installer; All it needs are a few variables in a text file telling it what files to do stuff to and it'll do its job (as smartly as I could think of). What all this means, my dear fellow, is that you can whip up a quick conf file to make MinMicroG build any kind of flashable zip within minutes.
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.
### 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 three 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.
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.
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 pag 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:
```
/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 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
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.
- 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.
- 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.)
- They don't have anything they conflict with, so nothing to add to stuff_perm.
- We need to add permissions to the two files, so we add their respective directories to stuff_perm.
- A service/init.d script is not really useful to us for this package, so we leave it blank.
- While an addon.d script might be useful, I ommitted it for simplicity in this file.
- We don't have anything special to do with this package, so nothing in the install functions. But we don't remove the functions completely, that would cause an error.
There, we have the config file for our brand new AuroraServices pack!
### Build it
Execute
```
> ./build.sh aurora
```
And you should find a AuroraServices pack in the releases directory.

@ -0,0 +1,68 @@
# Config
variant=""
ver="";
verc=""
date="";
minsdk=;
modprop="id=MinMicroG
name=
version=$ver
versionCode=$verc
author=
description=
support=
donate=
minMagisk=
";
stuff="
";
stuff_arch="
";
stuff_sdk="
";
stuff_arch_sdk="
";
stuff_uninstall="$stuff $stuff_arch $stuff_sdk $stuff_arch_sdk $initdfile $addondfile";
stuff_debloat="
";
stuff_perm="
";
addond="
";
service="
";
pre_install_actions() {
return 0;
}
post_install_actions() {
return 0;
}
pre_uninstall_actions() {
return 0;
}
post_uninstall_actions() {
return 0;
}

@ -251,6 +251,7 @@ pre_install_actions() {
user_conf;
microg_cleanup;
return 0;
}
post_install_actions() {

@ -253,6 +253,7 @@ pre_install_actions() {
user_conf;
microg_cleanup;
return 0;
}
post_install_actions() {

@ -212,6 +212,7 @@ pre_install_actions() {
user_conf;
microg_cleanup;
return 0;
}
post_install_actions() {

@ -1 +1,3 @@
The main scripts
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.

@ -26,10 +26,8 @@ mkdir -p "$tmpdir" "$tmpdir/repos";
# Config
[ -f "$confdir/resdl-download.txt" ] || { echo " "; echo "FATAL: No resdl-download.txt found"; return 1; }
cp "$confdir/resdl-download.txt" "$tmpdir/resdl";
chmod 777 "$tmpdir/resdl";
. "$tmpdir/resdl";
[ -f "$confdir/resdl-download.txt" ] || { echo " "; echo "F: No resdl-download.txt found"; return 1; }
eval "$(cat "$confdir/resdl-download.txt")" || { echo "FATAL: resdl-download.txt cannot be executed"; return 1; };
if [ $@ ]; then
echo " ";

Loading…
Cancel
Save