Skip to content

Commit

Permalink
Merge remote-tracking branch 'source/main' into source
Browse files Browse the repository at this point in the history
  • Loading branch information
wxy1343 committed Sep 3, 2022
2 parents d52ab9e + 0d08462 commit c58d802
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 32 deletions.
13 changes: 5 additions & 8 deletions .github/workflows/wsa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,22 +134,19 @@ jobs:
draft: false
prerelease: false

- uses: juliangruber/sleep-action@v1
- id: release_info
uses: pdamianik/release-tag-to-upload-url-action@v1.0.1
with:
time: 10s

- id: latest_release_info
uses: jossef/action-latest-release-info@v1.1.0
env:
GITHUB_TOKEN: ${{ github.token }}
tag: ${{ steps.vars.outputs.sha_short }}
token: ${{ github.token }}

- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.latest_release_info.outputs.upload_url }}
upload_url: ${{ steps.release_info.outputs.uploadUrl }}
asset_path: ${{ steps.run.outputs.path }}
asset_name: ${{ steps.run.outputs.name }}
asset_content_type: application/x-7z-compressed
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@
## Pre-request

- Ubuntu (you can use WSL2)
- [Search page](https://apps.microsoft.com/store/search?publisher=Canonical%20Group%20Limited)

## Features

- Integrate Magisk and OpenGApps 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)
- Remove Amazon AppStore
- Remove Amazon Appstore
- Fix VPN dialog not showing (use our [VpnDialogs app](https://github.com/LSPosed/VpnDialogs))
- Add device management feature
- Unattended installation
Expand Down
43 changes: 20 additions & 23 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -99,18 +99,18 @@ exit_with_message(){
usage(){
default
echo "Usage:
--arch Architecture of WSA, x64 or arm64, default: $ARCH
--release-type Release type of WSA, retail, RP (Release Preview), WIS (Insider Slow) or WIF (Insider Fast), default: $RELEASE_TYPE
--arch Architecture of WSA. x64 or arm64. default: $ARCH
--release-type Release type of WSA. retail, RP (Release Preview), WIS (Insider Slow) or WIF (Insider Fast). default: $RELEASE_TYPE
--magisk-ver Magisk version, stable or canary, default: $MAGISK_VER
--gapps-brand GApps brand, OpenGApps or MindTheGApps, default: $GAPPS_BRAND
--gapps-variant GApps variant, pico or full, etc...., default: $GAPPS_VARIANT
--root-sol Root solution, magisk or none, default: $ROOT_SOL
--remove-amazon Remove Amazon from the system, default: false
--compress Compress the WSA, default: false
--offline Build WSA offline, default: false
--magisk-custom Install custom Magisk, default: false
--debug Debug build mode, default: false
--help Show this help message and exit
--gapps-brand GApps brand. OpenGApps, MindTheGapps or none for no integration of GApps. default: $GAPPS_BRAND
--gapps-variant GApps variant. pico or full, etc...., default: $GAPPS_VARIANT
--root-sol Root solution. magisk or none, default: $ROOT_SOL
--remove-amazon Remove Amazon Appstore from the system. default: false
--compress Compress the WSA. default: false
--offline Build WSA offline. default: false
--magisk-custom Install custom Magisk. default: false
--debug Debug build mode. default: false
--help Show this help message and exit.
Example:
./build.sh --arch x64 --release-type retail --magisk-ver stable --gapps-brand OpenGApps --gapps-variant pico --remove-amazon
Expand Down Expand Up @@ -183,7 +183,7 @@ MAGISK_VER_MAP=(

GAPPS_BRAND_MAP=(
"OpenGApps"
"MindTheGApps"
"MindTheGapps"
"none"
)

Expand All @@ -197,7 +197,6 @@ GAPPS_VARIANT_MAP=(
"pico"
"tvstock"
"tvmini"
"none"
)

ROOT_SOL_MAP=(
Expand Down Expand Up @@ -264,14 +263,12 @@ if [ -z "${OFFLINE+x}" ]; then
if [ -z "${CUSTOM_MAGISK+x}" ]; then
python3 generateMagiskLink.py "$MAGISK_VER" "$DOWNLOAD_DIR" "$DOWNLOAD_CONF_NAME" || abort
fi
if [ "$GAPPS_VARIANT" != 'none' ] && [ "$GAPPS_VARIANT" != '' ]; then
if [ "$GAPPS_BRAND" = "OpenGApps" ]; then
python3 generateGappsLink.py "$ARCH" "$GAPPS_VARIANT" "$DOWNLOAD_DIR" "$DOWNLOAD_CONF_NAME" || abort
fi
if [ "$GAPPS_BRAND" = "OpenGApps" ]; then
python3 generateGappsLink.py "$ARCH" "$GAPPS_VARIANT" "$DOWNLOAD_DIR" "$DOWNLOAD_CONF_NAME" || abort
fi

echo "Download Artifacts"
if ! aria2c --no-conf --log-level=info --log="$DOWNLOAD_DIR/aria2_download.log" -x16 -s16 -j5 -c -R -m0 --allow-overwrite=true --conditional-get=true -d"$DOWNLOAD_DIR" -i"$DOWNLOAD_DIR"/"$DOWNLOAD_CONF_NAME"; then
if ! aria2c --no-conf --log-level=info --log="$DOWNLOAD_DIR/aria2_download.log" -x16 -s16 -j5 -c -R -m0 --async-dns=false --check-integrity=true --continue=true --allow-overwrite=true --conditional-get=true -d"$DOWNLOAD_DIR" -i"$DOWNLOAD_DIR"/"$DOWNLOAD_CONF_NAME"; then
echo "We have encountered an error while downloading files."
exit 1
fi
Expand All @@ -283,7 +280,7 @@ else
OFFLINE_ERR="1"
fi
done
if [ "$GAPPS_VARIANT" != 'none' ] && [ "$GAPPS_VARIANT" != '' ] && [ "$GAPPS_BRAND" != 'none' ]; then
if [ "$GAPPS_BRAND" != 'none' ]; then
if [ ! -f "$GAPPS_PATH" ]; then
echo "Offline mode: missing [$GAPPS_PATH]."
OFFLINE_ERR="1"
Expand Down Expand Up @@ -329,7 +326,7 @@ else
fi
echo -e "done\n"

if [ "$GAPPS_VARIANT" != 'none' ] && [ "$GAPPS_VARIANT" != '' ] && [ "$GAPPS_BRAND" != 'none' ]; then
if [ "$GAPPS_BRAND" != 'none' ]; then
echo "Extract GApps"
mkdir -p "$WORK_DIR"/gapps || abort
if [ -f "$GAPPS_PATH" ]; then
Expand Down Expand Up @@ -532,7 +529,7 @@ find ../"$ARCH"/system/system/etc/permissions/ -maxdepth 1 -mindepth 1 -printf '
find ../"$ARCH"/system/system/etc/permissions/ -maxdepth 1 -mindepth 1 -printf '%P\n' | xargs -I file sudo find "$MOUNT_DIR"/system/etc/permissions/file -type f -exec chcon --reference="$MOUNT_DIR"/system/etc/permissions/platform.xml {} \;
echo -e "Add extra packages done\n"

if [ "$GAPPS_VARIANT" != 'none' ] && [ "$GAPPS_VARIANT" != '' ] && [ "$GAPPS_BRAND" != 'none' ]; then
if [ "$GAPPS_BRAND" != 'none' ]; then
echo "Integrate GApps"

find "$WORK_DIR/gapps/" -mindepth 1 -type d -exec sudo chmod 0755 {} \;
Expand Down Expand Up @@ -593,7 +590,7 @@ if [ "$GAPPS_VARIANT" != 'none' ] && [ "$GAPPS_VARIANT" != '' ] && [ "$GAPPS_BRA
echo -e "Integrate GApps done\n"
fi

if [ "$GAPPS_VARIANT" != 'none' ] && [ "$GAPPS_VARIANT" != '' ] && [ "$GAPPS_BRAND" != 'none' ]; then
if [ "$GAPPS_BRAND" != 'none' ]; then
echo "Fix GApps prop"
sudo python3 fixGappsProp.py "$MOUNT_DIR" || abort
echo -e "done\n"
Expand Down Expand Up @@ -724,7 +721,7 @@ elif [[ "$ROOT_SOL" = "" ]]; then
else
name1="-with-$ROOT_SOL-$MAGISK_VER"
fi
if [[ "$GAPPS_VARIANT" = "none" || "$GAPPS_VARIANT" = "" || "$GAPPS_BRAND" = "none" ]]; then
if [ "$GAPPS_BRAND" = "none" ]; then
name2="-NoGApps"
else
if [ "$GAPPS_BRAND" = "OpenGApps" ]; then
Expand Down
2 changes: 2 additions & 0 deletions scripts/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
# DEBUG=--debug
# CUSTOM_MAGISK=--magisk-custom

DOWNLOAD_DIR=../download

if [ ! "$BASH_VERSION" ] ; then
echo "Please do not use sh to run this script, just execute it directly" 1>&2
exit 1
Expand Down

1 comment on commit c58d802

@Howard20181
Copy link

@Howard20181 Howard20181 commented on c58d802 Sep 26, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.