From 6d9f1e875410cc0cc0bd0c56a9b1af3e48b4fa28 Mon Sep 17 00:00:00 2001 From: Howard Wu <40033067+Howard20181@users.noreply.github.com> Date: Tue, 6 Sep 2022 16:14:54 +0800 Subject: [PATCH 01/12] close #76 --- scripts/run.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/run.sh b/scripts/run.sh index 1be6535..61c7087 100755 --- a/scripts/run.sh +++ b/scripts/run.sh @@ -86,9 +86,9 @@ check_package_manager if [ -n "${NEED_INSTALL[*]}" ]; then if [ -z "$PM" ]; then echo "Unable to determine package manager: unknown distribution" - exit 1 + abort else - if ! sudo "$PM" "${UPDATE_OPTION[@]}" && sudo "$PM" "${INSTALL_OPTION[@]}" "${NEED_INSTALL[@]}"; then abort; fi + if ! (sudo "$PM" "${UPDATE_OPTION[@]}" && sudo "$PM" "${INSTALL_OPTION[@]}" "${NEED_INSTALL[@]}") then abort; fi fi fi pip list --disable-pip-version-check | grep -E "^requests " >/dev/null 2>&1 || python3 -m pip install requests From 13b99d485f2cb0cb22191f8ad56cf488a8492680 Mon Sep 17 00:00:00 2001 From: Howard Wu <40033067+Howard20181@users.noreply.github.com> Date: Wed, 7 Sep 2022 15:13:23 +0800 Subject: [PATCH 02/12] Add tutorial for how to install Mindthegapps (#82) --- README.md | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b7f50cb..a2d72e4 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ ## Features -- Integrate Magisk and OpenGApps in a few clicks within minutes +- Integrate Magisk and GApps in a few clicks within minutes - Keep each build up to date - Support both ARM64 and x64 - Support all OpenGApps variants except for aroma (aroma does not support x86_64, please use super instead) @@ -24,8 +24,18 @@ 1. Star (if you like) 1. Clone the repo to local + - If you want to install MindtheGapps, place `MindtheGapps-{arch}.zip` in the `download` folder. {arch} can be `x64` or `arm64`. + - Run `build.sh --help` to get the usage if you want to use CLI. 1. Run `scripts/run.sh` -1. Select the version of Magisk and select the [OpenGApps variant](https://github.com/opengapps/opengapps/wiki#variants) you like, select the root solution (none means no root), select the WSA version and its architecture (mostly x64) +1. Select the version of Magisk +1. Choose which brand of GApps you want to install (If the package of Mindthegapps does not exist, you will not be asking for this). + - OpenGApps + + Select the [OpenGApps variant](https://github.com/opengapps/opengapps/wiki#variants) you like, select the root solution (none means no root), select the WSA version and its architecture (mostly x64) + + - MindtheGapps + + There is no other variant we can choose. 1. Wait for the script to complete and the artifact will be in the `output` folder 1. Move the artifact to a place you like @@ -79,7 +89,14 @@ - How to install custom OpenGApps? [Tutorial](./Custom-OpenGApps.md) +- Where can I download MindtheGapps? + You can download in here [MindtheGapps](https://androidfilehost.com/?w=files&flid=322935) ([mirror](http://downloads.codefi.re/jdcteam/javelinanddart/gapps)) + + Note that there is no x86_64 pre-build, so you need to build it by yourself ([Repo](https://gitlab.com/MindTheGapps)). +- Can I switch OpenGApps to MindTheGapps and keep user data in a previous build? + + No, you shoud wipe data after change GApps brand. Or you will find there no GApps have been recognized. ## Credits - [StoreLib](https://github.com/StoreDev/StoreLib): API for downloading WSA From fe71d1a129ebeb8da545cea5fcca8d87332cf13c Mon Sep 17 00:00:00 2001 From: Howard Wu <40033067+Howard20181@users.noreply.github.com> Date: Wed, 7 Sep 2022 15:23:14 +0800 Subject: [PATCH 03/12] Minor chang --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a2d72e4..d1299c3 100644 --- a/README.md +++ b/README.md @@ -31,11 +31,11 @@ 1. Choose which brand of GApps you want to install (If the package of Mindthegapps does not exist, you will not be asking for this). - OpenGApps - Select the [OpenGApps variant](https://github.com/opengapps/opengapps/wiki#variants) you like, select the root solution (none means no root), select the WSA version and its architecture (mostly x64) + Select the [OpenGApps variant](https://github.com/opengapps/opengapps/wiki#variants) you like, select the root solution (none means no root), select the WSA version and its architecture (mostly x64) - MindtheGapps - There is no other variant we can choose. + There is no other variant we can choose. 1. Wait for the script to complete and the artifact will be in the `output` folder 1. Move the artifact to a place you like @@ -96,7 +96,7 @@ Note that there is no x86_64 pre-build, so you need to build it by yourself ([Repo](https://gitlab.com/MindTheGapps)). - Can I switch OpenGApps to MindTheGapps and keep user data in a previous build? - No, you shoud wipe data after change GApps brand. Or you will find there no GApps have been recognized. + No. you shoud wipe data after change GApps brand. Or you will find there no GApps have been recognized. ## Credits - [StoreLib](https://github.com/StoreDev/StoreLib): API for downloading WSA From 3b525ca8a64798f57f0c3b6de69dfeb4369f817e Mon Sep 17 00:00:00 2001 From: Howard Wu <40033067+Howard20181@users.noreply.github.com> Date: Wed, 7 Sep 2022 15:27:06 +0800 Subject: [PATCH 04/12] Minor changes --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d1299c3..a43e45c 100644 --- a/README.md +++ b/README.md @@ -27,17 +27,17 @@ - If you want to install MindtheGapps, place `MindtheGapps-{arch}.zip` in the `download` folder. {arch} can be `x64` or `arm64`. - Run `build.sh --help` to get the usage if you want to use CLI. 1. Run `scripts/run.sh` +1. Select the WSA version and its architecture (mostly x64) 1. Select the version of Magisk 1. Choose which brand of GApps you want to install (If the package of Mindthegapps does not exist, you will not be asking for this). - OpenGApps - Select the [OpenGApps variant](https://github.com/opengapps/opengapps/wiki#variants) you like, select the root solution (none means no root), select the WSA version and its architecture (mostly x64) - + Select the [OpenGApps variant](https://github.com/opengapps/opengapps/wiki#variants) you like. - MindtheGapps There is no other variant we can choose. +1. Select the root solution (none means no root) 1. Wait for the script to complete and the artifact will be in the `output` folder - 1. Move the artifact to a place you like 1. Right-click `Install.ps1` and select `Run with PowerShell` - If you previously have a MagiskOnWSA installation, it will automatically uninstall the previous one while **preserving all user data** and install the new one, so don't worry about your data. From 58fc35c483c2009318053f000aa1f3d61937d898 Mon Sep 17 00:00:00 2001 From: Howard Wu <40033067+Howard20181@users.noreply.github.com> Date: Wed, 7 Sep 2022 19:03:13 +0800 Subject: [PATCH 05/12] Minor change --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a43e45c..df5a055 100644 --- a/README.md +++ b/README.md @@ -96,7 +96,7 @@ Note that there is no x86_64 pre-build, so you need to build it by yourself ([Repo](https://gitlab.com/MindTheGapps)). - Can I switch OpenGApps to MindTheGapps and keep user data in a previous build? - No. you shoud wipe data after change GApps brand. Or you will find there no GApps have been recognized. + No. You shoud wipe data after change GApps brand. Or you will find there no GApps have been recognized. ## Credits - [StoreLib](https://github.com/StoreDev/StoreLib): API for downloading WSA From 1921175da6f6e4f7a836e257018fd2ba00e55e39 Mon Sep 17 00:00:00 2001 From: Howard Wu <40033067+Howard20181@users.noreply.github.com> Date: Wed, 7 Sep 2022 19:07:06 +0800 Subject: [PATCH 06/12] Fix spelling errors --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index df5a055..7319fa5 100644 --- a/README.md +++ b/README.md @@ -96,7 +96,7 @@ Note that there is no x86_64 pre-build, so you need to build it by yourself ([Repo](https://gitlab.com/MindTheGapps)). - Can I switch OpenGApps to MindTheGapps and keep user data in a previous build? - No. You shoud wipe data after change GApps brand. Or you will find there no GApps have been recognized. + No. You should wipe data after changing GApps brand. Or you will find there no GApps have been recognized. ## Credits - [StoreLib](https://github.com/StoreDev/StoreLib): API for downloading WSA From a93e299f91a2692292a83bf3ac6215368b5253c7 Mon Sep 17 00:00:00 2001 From: Howard Wu <40033067+Howard20181@users.noreply.github.com> Date: Wed, 7 Sep 2022 19:53:36 +0800 Subject: [PATCH 07/12] Selectable temporary directory locations Uncomment `export TMPDIR=$PARENT_DIR/WORK_DIR_` to use the source directory as the working directory This allows the script to work on devices with low `/tmp` storage space close #31 --- scripts/build.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scripts/build.sh b/scripts/build.sh index 58dbf4d..d428c45 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -29,6 +29,11 @@ if [ "$HOST_ARCH" != "x86_64" ] && [ "$HOST_ARCH" != "aarch64" ]; then fi cd "$(dirname "$0")" || exit 1 trap umount_clean EXIT +PARENT_DIR="$(dirname "$PWD")" +# export TMPDIR=$PARENT_DIR/WORK_DIR_ +if [ "$TMPDIR" ] && [ ! -d "$TMPDIR" ]; then + mkdir -p "$TMPDIR" +fi WORK_DIR=$(mktemp -d -t wsa-build-XXXXXXXXXX_) || exit 1 DOWNLOAD_DIR=../download DOWNLOAD_CONF_NAME=download.list @@ -51,6 +56,10 @@ umount_clean() { else rm -rf "${WORK_DIR:?}" fi + if [ "$TMPDIR" ] && [ -d "$TMPDIR" ]; then + rm -rf "${TMPDIR:?}" + unset TMPDIR + fi } clean_download() { if [ -d "$DOWNLOAD_DIR" ]; then From 0af74b6a4a79cf940cceeee6ba6fd7e302375e79 Mon Sep 17 00:00:00 2001 From: Howard Wu <40033067+Howard20181@users.noreply.github.com> Date: Wed, 7 Sep 2022 20:07:29 +0800 Subject: [PATCH 08/12] Update README.md --- README.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 7319fa5..361cf9c 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ Select the [OpenGApps variant](https://github.com/opengapps/opengapps/wiki#variants) you like. - MindtheGapps - There is no other variant we can choose. + There is no other variant we can choose. 1. Select the root solution (none means no root) 1. Wait for the script to complete and the artifact will be in the `output` folder 1. Move the artifact to a place you like @@ -91,12 +91,13 @@ [Tutorial](./Custom-OpenGApps.md) - Where can I download MindtheGapps? - You can download in here [MindtheGapps](https://androidfilehost.com/?w=files&flid=322935) ([mirror](http://downloads.codefi.re/jdcteam/javelinanddart/gapps)) + You can download from here [MindtheGapps](https://androidfilehost.com/?w=files&flid=322935) ([mirror](http://downloads.codefi.re/jdcteam/javelinanddart/gapps)) - Note that there is no x86_64 pre-build, so you need to build it by yourself ([Repo](https://gitlab.com/MindTheGapps)). + Note that there is no x86_64 pre-build, so you need to build it by yourself ([Repository](https://gitlab.com/MindTheGapps/vendor_gapps)). - Can I switch OpenGApps to MindTheGapps and keep user data in a previous build? - No. You should wipe data after changing GApps brand. Or you will find there no GApps have been recognized. + No. You should wipe data after changing GApps the brand. Otherwise, you will find that the installed GApps are not recognized. + ## Credits - [StoreLib](https://github.com/StoreDev/StoreLib): API for downloading WSA From 57f242487ab9750b1c37aebae309fa35aa3db008 Mon Sep 17 00:00:00 2001 From: Howard Wu <40033067+Howard20181@users.noreply.github.com> Date: Wed, 7 Sep 2022 20:09:48 +0800 Subject: [PATCH 09/12] Fix spelling error --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 361cf9c..e755811 100644 --- a/README.md +++ b/README.md @@ -96,7 +96,7 @@ Note that there is no x86_64 pre-build, so you need to build it by yourself ([Repository](https://gitlab.com/MindTheGapps/vendor_gapps)). - Can I switch OpenGApps to MindTheGapps and keep user data in a previous build? - No. You should wipe data after changing GApps the brand. Otherwise, you will find that the installed GApps are not recognized. + No. You should wipe data after changing the GApps brand. Otherwise, you will find that the installed GApps are not recognized. ## Credits From 5f10ebcd2998319dce69fb8623990ef0da14e965 Mon Sep 17 00:00:00 2001 From: Howard Wu <40033067+Howard20181@users.noreply.github.com> Date: Thu, 8 Sep 2022 10:21:50 +0800 Subject: [PATCH 10/12] close #85 --- scripts/run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/run.sh b/scripts/run.sh index 61c7087..7f4cfd8 100755 --- a/scripts/run.sh +++ b/scripts/run.sh @@ -95,7 +95,7 @@ pip list --disable-pip-version-check | grep -E "^requests " >/dev/null 2>&1 || p winetricks list-installed | grep -E "^msxml6" >/dev/null 2>&1 || { cp -r ../wine/.cache/* ~/.cache - winetricks -q msxml6 || abort + winetricks msxml6 || abort } function Radiolist { From a7456ac7fbefd260e599b2f7fd883355f67e90eb Mon Sep 17 00:00:00 2001 From: Howard Wu <40033067+Howard20181@users.noreply.github.com> Date: Thu, 8 Sep 2022 10:30:25 +0800 Subject: [PATCH 11/12] Update README.md --- README.md | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index e755811..26d30e2 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,23 @@ # Magisk on WSA (with Google Apps) -## Pre-request +## Support for generating from these systems -- Ubuntu (you can use WSL2) - - [Search page](https://apps.microsoft.com/store/search?publisher=Canonical%20Group%20Limited) +- Linux (x86_64 or arm64) + + The following dependencies are required: `setools lzip wine patchelf e2fsprogs aria2 python3` + + The following components need to be installed using `winetricks`: `msxml6` + + The python3 library `requests` is used. + - Recommended Use + - Ubuntu (You can use [WSL2](https://apps.microsoft.com/store/search?publisher=Canonical%20Group%20Limited)) + + `run.sh` will handle all dependencies automatically. + No need to type any commands. + - Other Distributions + + Install the dependencies manually. + Use the command-line program `build.sh`. ## Features From 2d831522cf0c568db16b5deadc97594bc63f6099 Mon Sep 17 00:00:00 2001 From: Howard Wu <40033067+Howard20181@users.noreply.github.com> Date: Thu, 8 Sep 2022 17:36:09 +0800 Subject: [PATCH 12/12] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 26d30e2..c859538 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,8 @@ The following components need to be installed using `winetricks`: `msxml6` The python3 library `requests` is used. + + Python version ≥ 3.7. - Recommended Use - Ubuntu (You can use [WSL2](https://apps.microsoft.com/store/search?publisher=Canonical%20Group%20Limited))