mirror of
https://github.com/MustardChef/WSABuilds.git
synced 2024-12-26 03:11:49 +01:00
Prepare for LTS Build 5
This commit is contained in:
parent
585e9df757
commit
722e7031e9
12
.github/workflows/build.yml
vendored
12
.github/workflows/build.yml
vendored
@ -20,6 +20,8 @@ on:
|
|||||||
type: string
|
type: string
|
||||||
wsa_ver:
|
wsa_ver:
|
||||||
type: string
|
type: string
|
||||||
|
gappsver:
|
||||||
|
type: string
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@ -69,6 +71,7 @@ jobs:
|
|||||||
echo ${{ inputs.compressformat }}
|
echo ${{ inputs.compressformat }}
|
||||||
echo ${{ inputs.release_type }}
|
echo ${{ inputs.release_type }}
|
||||||
echo ${{ inputs.wsa_ver }}
|
echo ${{ inputs.wsa_ver }}
|
||||||
|
echo ${{ inputs.gappsver }}
|
||||||
|
|
||||||
- name: Build WSA ${{ inputs.arch }} with GApps ${{ inputs.root }} 🏗️
|
- name: Build WSA ${{ inputs.arch }} with GApps ${{ inputs.root }} 🏗️
|
||||||
id: wsa
|
id: wsa
|
||||||
@ -76,7 +79,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
chmod -R 777 ./
|
chmod -R 777 ./
|
||||||
mkdir -p download
|
mkdir -p download
|
||||||
./scripts/build.sh --arch ${{ inputs.arch }} --release-type latest --magisk-ver ${{ inputs.magiskver }} ${{ inputs.gapps }} --root-sol ${{ inputs.root }} ${{ inputs.amazonflag }} --compress-format none
|
./scripts/build.sh --arch ${{ inputs.arch }} --release-type WIF --magisk-ver ${{ inputs.magiskver }} ${{ inputs.gapps }} --root-sol ${{ inputs.root }} ${{ inputs.amazonflag }} --compress-format none
|
||||||
|
|
||||||
- name: Check Subdirectories and Directories
|
- name: Check Subdirectories and Directories
|
||||||
working-directory: MagiskOnWSA
|
working-directory: MagiskOnWSA
|
||||||
@ -89,7 +92,7 @@ jobs:
|
|||||||
7z a -t7z -mx=6 -m0=LZMA2 -ms=on -mmt=8 -- "${{ steps.wsa.outputs.artifact }}.7z" ./output/*
|
7z a -t7z -mx=6 -m0=LZMA2 -ms=on -mmt=8 -- "${{ steps.wsa.outputs.artifact }}.7z" ./output/*
|
||||||
|
|
||||||
- name: Run WSA Windows 10 Python Patch Script
|
- name: Run WSA Windows 10 Python Patch Script
|
||||||
working-directory: MagiskOnWSA/output/WSA_${{ inputs.wsa_ver }}_x64
|
working-directory: MagiskOnWSA/output/${{ steps.wsa.outputs.artifact_folder }}
|
||||||
run: |
|
run: |
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
@ -150,6 +153,11 @@ jobs:
|
|||||||
echo "${{ env.WSA_VER }}"
|
echo "${{ env.WSA_VER }}"
|
||||||
echo "${{ env.DRIVE_FOLDER_PATH }}"
|
echo "${{ env.DRIVE_FOLDER_PATH }}"
|
||||||
|
|
||||||
|
- name: Check Subdirectories and Directories
|
||||||
|
working-directory: MagiskOnWSA
|
||||||
|
run: |
|
||||||
|
ls -lR
|
||||||
|
|
||||||
- name: Upload Windows 11 x64 build to release 🤌
|
- name: Upload Windows 11 x64 build to release 🤌
|
||||||
uses: softprops/action-gh-release@v2
|
uses: softprops/action-gh-release@v2
|
||||||
with:
|
with:
|
||||||
|
6
.github/workflows/build_arm64_old.yml
vendored
6
.github/workflows/build_arm64_old.yml
vendored
@ -20,6 +20,8 @@ on:
|
|||||||
type: string
|
type: string
|
||||||
wsa_ver:
|
wsa_ver:
|
||||||
type: string
|
type: string
|
||||||
|
gappsver:
|
||||||
|
type: string
|
||||||
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@ -69,6 +71,8 @@ jobs:
|
|||||||
echo ${{ inputs.amazonflag }}
|
echo ${{ inputs.amazonflag }}
|
||||||
echo ${{ inputs.compressformat }}
|
echo ${{ inputs.compressformat }}
|
||||||
echo ${{ inputs.release_type }}
|
echo ${{ inputs.release_type }}
|
||||||
|
echo ${{ inputs.wsa_ver }}
|
||||||
|
echo ${{ inputs.gappsver }}
|
||||||
|
|
||||||
- name: Build WSA ${{ inputs.arch }} with GApps ${{ inputs.root }} 🏗️
|
- name: Build WSA ${{ inputs.arch }} with GApps ${{ inputs.root }} 🏗️
|
||||||
id: wsa
|
id: wsa
|
||||||
@ -81,7 +85,7 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
chmod -R 777 ./
|
chmod -R 777 ./
|
||||||
mkdir -p download
|
mkdir -p download
|
||||||
./scripts/build.sh --arch ${{ inputs.arch }} --release-type latest --magisk-ver ${{ inputs.magiskver }} --gapps-brand ${{ inputs.gapps }} --root-sol ${{ inputs.root }} --custom-model ${{ inputs.devicemodel }} ${{ inputs.amazonflag }} --compress-format ${{ inputs.compressformat }}
|
./scripts/build.sh --arch ${{ inputs.arch }} --release-type latest --magisk-ver ${{ inputs.magiskver }} --gapps-brand ${{ inputs.gappsver }} --root-sol ${{ inputs.root }} --custom-model ${{ inputs.devicemodel }} ${{ inputs.amazonflag }} --compress-format ${{ inputs.compressformat }}
|
||||||
|
|
||||||
- name: Prepare release tag 🏷️
|
- name: Prepare release tag 🏷️
|
||||||
id: releasetag
|
id: releasetag
|
||||||
|
6
.github/workflows/build_old.yml
vendored
6
.github/workflows/build_old.yml
vendored
@ -20,6 +20,8 @@ on:
|
|||||||
type: string
|
type: string
|
||||||
wsa_ver:
|
wsa_ver:
|
||||||
type: string
|
type: string
|
||||||
|
gappsver:
|
||||||
|
type: string
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@ -68,6 +70,8 @@ jobs:
|
|||||||
echo ${{ inputs.amazonflag }}
|
echo ${{ inputs.amazonflag }}
|
||||||
echo ${{ inputs.compressformat }}
|
echo ${{ inputs.compressformat }}
|
||||||
echo ${{ inputs.release_type }}
|
echo ${{ inputs.release_type }}
|
||||||
|
echo ${{ inputs.wsa_ver }}
|
||||||
|
echo ${{ inputs.gappsver }}
|
||||||
|
|
||||||
- name: Build WSA ${{ inputs.arch }} with GApps ${{ inputs.root }} 🏗️
|
- name: Build WSA ${{ inputs.arch }} with GApps ${{ inputs.root }} 🏗️
|
||||||
id: wsa
|
id: wsa
|
||||||
@ -80,7 +84,7 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
chmod -R 777 ./
|
chmod -R 777 ./
|
||||||
mkdir -p download
|
mkdir -p download
|
||||||
./scripts/build.sh --arch ${{ inputs.arch }} --release-type latest --magisk-ver ${{ inputs.magiskver }} --gapps-brand ${{ inputs.gapps }} --root-sol ${{ inputs.root }} --custom-model ${{ inputs.devicemodel }} ${{ inputs.amazonflag }} --compress-format ${{ inputs.compressformat }}
|
./scripts/build.sh --arch ${{ inputs.arch }} --release-type latest --magisk-ver ${{ inputs.magiskver }} --gapps-brand ${{ inputs.gappsver }} --root-sol ${{ inputs.root }} --custom-model ${{ inputs.devicemodel }} ${{ inputs.amazonflag }} --compress-format ${{ inputs.compressformat }}
|
||||||
|
|
||||||
- name: Prepare release tag 🏷️
|
- name: Prepare release tag 🏷️
|
||||||
id: releasetag
|
id: releasetag
|
||||||
|
10
.github/workflows/buildarm64.yml
vendored
10
.github/workflows/buildarm64.yml
vendored
@ -20,6 +20,8 @@ on:
|
|||||||
type: string
|
type: string
|
||||||
wsa_ver:
|
wsa_ver:
|
||||||
type: string
|
type: string
|
||||||
|
gappsver:
|
||||||
|
type: string
|
||||||
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@ -69,6 +71,7 @@ jobs:
|
|||||||
echo ${{ inputs.amazonflag }}
|
echo ${{ inputs.amazonflag }}
|
||||||
echo ${{ inputs.compressformat }}
|
echo ${{ inputs.compressformat }}
|
||||||
echo ${{ inputs.release_type }}
|
echo ${{ inputs.release_type }}
|
||||||
|
echo ${{ inputs.gappsver }}
|
||||||
|
|
||||||
- name: Build WSA ${{ inputs.arch }} with GApps ${{ inputs.root }} 🏗️
|
- name: Build WSA ${{ inputs.arch }} with GApps ${{ inputs.root }} 🏗️
|
||||||
id: wsa
|
id: wsa
|
||||||
@ -81,7 +84,7 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
chmod -R 777 ./
|
chmod -R 777 ./
|
||||||
mkdir -p download
|
mkdir -p download
|
||||||
./scripts/build.sh --arch ${{ inputs.arch }} --release-type latest --magisk-ver ${{ inputs.magiskver }} ${{ inputs.gapps }} --root-sol ${{ inputs.root }} ${{ inputs.amazonflag }} --compress-format zip
|
./scripts/build.sh --arch ${{ inputs.arch }} --release-type WIF --magisk-ver ${{ inputs.magiskver }} ${{ inputs.gapps }} --root-sol ${{ inputs.root }} ${{ inputs.amazonflag }} --compress-format zip
|
||||||
|
|
||||||
- name: Check Subdirectories and Directories
|
- name: Check Subdirectories and Directories
|
||||||
working-directory: MagiskOnWSA
|
working-directory: MagiskOnWSA
|
||||||
@ -112,6 +115,11 @@ jobs:
|
|||||||
echo "${{ env.WSA_VER }}"
|
echo "${{ env.WSA_VER }}"
|
||||||
echo "${{ env.DRIVE_FOLDER_PATH }}"
|
echo "${{ env.DRIVE_FOLDER_PATH }}"
|
||||||
|
|
||||||
|
- name: Check Subdirectories and Directories
|
||||||
|
working-directory: MagiskOnWSA
|
||||||
|
run: |
|
||||||
|
ls -lR
|
||||||
|
|
||||||
- name: Upload Windows 11 arm64 build to release 🤌
|
- name: Upload Windows 11 arm64 build to release 🤌
|
||||||
uses: softprops/action-gh-release@v2
|
uses: softprops/action-gh-release@v2
|
||||||
with:
|
with:
|
||||||
|
275
.github/workflows/update.yml
vendored
275
.github/workflows/update.yml
vendored
@ -10,6 +10,13 @@ on:
|
|||||||
type: string
|
type: string
|
||||||
description: WSA Update Message.
|
description: WSA Update Message.
|
||||||
required: true
|
required: true
|
||||||
|
release_type:
|
||||||
|
type: choice
|
||||||
|
options:
|
||||||
|
- WIF
|
||||||
|
- retail
|
||||||
|
description: Release Type
|
||||||
|
required: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
check:
|
check:
|
||||||
@ -138,6 +145,7 @@ jobs:
|
|||||||
echo "LATEST_VER_RETAIL=$LATEST_VER"
|
echo "LATEST_VER_RETAIL=$LATEST_VER"
|
||||||
|
|
||||||
- name: Replace Link in README.md for Download Links Table for the WSA ${{ env.LATEST_VER }} update
|
- name: Replace Link in README.md for Download Links Table for the WSA ${{ env.LATEST_VER }} update
|
||||||
|
if: inputs.release_type == 'WIF'
|
||||||
run: python "./MagiskOnWSA/Update Check/update-downloadlinks.py"
|
run: python "./MagiskOnWSA/Update Check/update-downloadlinks.py"
|
||||||
env:
|
env:
|
||||||
LINK_FOR_W11X64: ${{ env.LINK_FOR_W11X64 }}
|
LINK_FOR_W11X64: ${{ env.LINK_FOR_W11X64 }}
|
||||||
@ -146,14 +154,15 @@ jobs:
|
|||||||
RELEASE_TYPE: "WIF"
|
RELEASE_TYPE: "WIF"
|
||||||
LATEST_VER: ${{ env.LATEST_VER }}
|
LATEST_VER: ${{ env.LATEST_VER }}
|
||||||
|
|
||||||
# - name: Replace Link in README.md for Download Links Table for the WSA ${{ env.LATEST_VER }} update
|
- name: Replace Link in README.md for Download Links Table for the WSA ${{ env.LATEST_VER }} update
|
||||||
# run: python "./MagiskOnWSA/Update Check/update-downloadlinks.py"
|
if: inputs.release_type == 'retail'
|
||||||
# env:
|
run: python "./MagiskOnWSA/Update Check/update-downloadlinks.py"
|
||||||
# LINK_FOR_W11X64: ${{ env.LINK_FOR_W11X64_RETAIL }}
|
env:
|
||||||
# LINK_FOR_W11ARM64: ${{ env.LINK_FOR_W11ARM64_RETAIL }}
|
LINK_FOR_W11X64: ${{ env.LINK_FOR_W11X64_RETAIL }}
|
||||||
# LINK_FOR_W10X64: ${{ env.LINK_FOR_W10X64_RETAIL }}
|
LINK_FOR_W11ARM64: ${{ env.LINK_FOR_W11ARM64_RETAIL }}
|
||||||
# RELEASE_TYPE: "retail"
|
LINK_FOR_W10X64: ${{ env.LINK_FOR_W10X64_RETAIL }}
|
||||||
# LATEST_VER: ${{ env.LATEST_VER }}
|
RELEASE_TYPE: "retail"
|
||||||
|
LATEST_VER: ${{ env.LATEST_VER }}
|
||||||
|
|
||||||
- name: Commit and push if it changed
|
- name: Commit and push if it changed
|
||||||
run: |
|
run: |
|
||||||
@ -318,6 +327,7 @@ jobs:
|
|||||||
KERNEL_SU_MSG: ${{ needs.check.outputs.KERNEL_SU_MSG }}
|
KERNEL_SU_MSG: ${{ needs.check.outputs.KERNEL_SU_MSG }}
|
||||||
|
|
||||||
- name: Create Tag and Release for Windows 11 arm64 release ✍🏼
|
- name: Create Tag and Release for Windows 11 arm64 release ✍🏼
|
||||||
|
if: inputs.release_type == 'WIF'
|
||||||
uses: softprops/action-gh-release@v2
|
uses: softprops/action-gh-release@v2
|
||||||
with:
|
with:
|
||||||
tag_name: ${{ env.WIN11ARM64_TAG }}
|
tag_name: ${{ env.WIN11ARM64_TAG }}
|
||||||
@ -328,6 +338,7 @@ jobs:
|
|||||||
GITHUB_WORKSPACE: ${{ github.workspace }}
|
GITHUB_WORKSPACE: ${{ github.workspace }}
|
||||||
|
|
||||||
- name: Create Tag and Release for Windows 10 x64 release ✍🏼
|
- name: Create Tag and Release for Windows 10 x64 release ✍🏼
|
||||||
|
if: inputs.release_type == 'WIF'
|
||||||
uses: softprops/action-gh-release@v2
|
uses: softprops/action-gh-release@v2
|
||||||
with:
|
with:
|
||||||
tag_name: ${{ env.WIN10X64_TAG }}
|
tag_name: ${{ env.WIN10X64_TAG }}
|
||||||
@ -338,6 +349,7 @@ jobs:
|
|||||||
GITHUB_WORKSPACE: ${{ github.workspace }}
|
GITHUB_WORKSPACE: ${{ github.workspace }}
|
||||||
|
|
||||||
- name: Create Tag and Release for Windows 11 x64 release ✍🏼
|
- name: Create Tag and Release for Windows 11 x64 release ✍🏼
|
||||||
|
if: inputs.release_type == 'WIF'
|
||||||
uses: softprops/action-gh-release@v2
|
uses: softprops/action-gh-release@v2
|
||||||
with:
|
with:
|
||||||
tag_name: ${{ env.WIN11X64_TAG }}
|
tag_name: ${{ env.WIN11X64_TAG }}
|
||||||
@ -347,8 +359,42 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
GITHUB_WORKSPACE: ${{ github.workspace }}
|
GITHUB_WORKSPACE: ${{ github.workspace }}
|
||||||
|
|
||||||
|
- name: Create Tag and Release for Windows 11 arm64 release ✍🏼
|
||||||
|
if: inputs.release_type == 'retail'
|
||||||
|
uses: softprops/action-gh-release@v2
|
||||||
|
with:
|
||||||
|
tag_name: ${{ env.WIN11ARM64_TAG }}
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
body_path: ${{github.workspace}}/Windows11arm64.md
|
||||||
|
name: Windows Subsystem For Android ${{ inputs.wsa_message }} for Windows 11 arm64
|
||||||
|
env:
|
||||||
|
GITHUB_WORKSPACE: ${{ github.workspace }}
|
||||||
|
|
||||||
|
- name: Create Tag and Release for Windows 10 x64 release ✍🏼
|
||||||
|
if: inputs.release_type == 'retail'
|
||||||
|
uses: softprops/action-gh-release@v2
|
||||||
|
with:
|
||||||
|
tag_name: ${{ env.WIN10X64_TAG }}
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
body_path: ${{github.workspace}}/Windows10x64.md
|
||||||
|
name: Windows Subsystem For Android ${{ inputs.wsa_message }} for Windows 10 x64
|
||||||
|
env:
|
||||||
|
GITHUB_WORKSPACE: ${{ github.workspace }}
|
||||||
|
|
||||||
|
- name: Create Tag and Release for Windows 11 x64 release ✍🏼
|
||||||
|
if: inputs.release_type == 'retail'
|
||||||
|
uses: softprops/action-gh-release@v2
|
||||||
|
with:
|
||||||
|
tag_name: ${{ env.WIN11X64_TAG }}
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
body_path: ${{github.workspace}}/Windows11x64.md
|
||||||
|
name: Windows Subsystem For Android ${{ inputs.wsa_message }} for Windows 11 x64
|
||||||
|
env:
|
||||||
|
GITHUB_WORKSPACE: ${{ github.workspace }}
|
||||||
|
|
||||||
build_x64_no_root_gapps_remove_amazon_redfin:
|
build_x64_no_root_gapps_remove_amazon_redfin:
|
||||||
name: Build for x64 as Redfin with No Root, GApps and No Amazon Appstore
|
name: Build for x64 as Redfin with No Root, GApps and No Amazon Appstore
|
||||||
|
if: inputs.release_type == 'WIF'
|
||||||
permissions: write-all
|
permissions: write-all
|
||||||
needs: [check, check-and-create-tag, update-downloadlinks]
|
needs: [check, check-and-create-tag, update-downloadlinks]
|
||||||
uses: ./.github/workflows/build.yml
|
uses: ./.github/workflows/build.yml
|
||||||
@ -356,6 +402,7 @@ jobs:
|
|||||||
arch: x64
|
arch: x64
|
||||||
root: none
|
root: none
|
||||||
gapps: --install-gapps
|
gapps: --install-gapps
|
||||||
|
gappsver: MindTheGapps
|
||||||
amazonflag: --remove-amazon
|
amazonflag: --remove-amazon
|
||||||
magiskver: stable
|
magiskver: stable
|
||||||
devicemodel: redfin
|
devicemodel: redfin
|
||||||
@ -365,6 +412,7 @@ jobs:
|
|||||||
|
|
||||||
build_x64_no_root_gapps_redfin:
|
build_x64_no_root_gapps_redfin:
|
||||||
name: Build for x64 as Redfin with No Root, GApps
|
name: Build for x64 as Redfin with No Root, GApps
|
||||||
|
if: inputs.release_type == 'WIF'
|
||||||
permissions: write-all
|
permissions: write-all
|
||||||
needs: [check, check-and-create-tag, update-downloadlinks]
|
needs: [check, check-and-create-tag, update-downloadlinks]
|
||||||
uses: ./.github/workflows/build.yml
|
uses: ./.github/workflows/build.yml
|
||||||
@ -372,6 +420,7 @@ jobs:
|
|||||||
arch: x64
|
arch: x64
|
||||||
root: none
|
root: none
|
||||||
gapps: --install-gapps
|
gapps: --install-gapps
|
||||||
|
gappsver: MindTheGapps
|
||||||
amazonflag: ""
|
amazonflag: ""
|
||||||
magiskver: stable
|
magiskver: stable
|
||||||
devicemodel: redfin
|
devicemodel: redfin
|
||||||
@ -381,6 +430,7 @@ jobs:
|
|||||||
|
|
||||||
build_x64_no_root_no_gapps_remove_amazon_redfin:
|
build_x64_no_root_no_gapps_remove_amazon_redfin:
|
||||||
name: Build for x64 as Redfin with No Root, No GApps and No Amazon Appstore
|
name: Build for x64 as Redfin with No Root, No GApps and No Amazon Appstore
|
||||||
|
if: inputs.release_type == 'WIF'
|
||||||
permissions: write-all
|
permissions: write-all
|
||||||
needs: [check, check-and-create-tag, update-downloadlinks]
|
needs: [check, check-and-create-tag, update-downloadlinks]
|
||||||
uses: ./.github/workflows/build.yml
|
uses: ./.github/workflows/build.yml
|
||||||
@ -388,6 +438,7 @@ jobs:
|
|||||||
arch: x64
|
arch: x64
|
||||||
root: none
|
root: none
|
||||||
gapps: ""
|
gapps: ""
|
||||||
|
gappsver: none
|
||||||
amazonflag: --remove-amazon
|
amazonflag: --remove-amazon
|
||||||
magiskver: stable
|
magiskver: stable
|
||||||
devicemodel: redfin
|
devicemodel: redfin
|
||||||
@ -397,6 +448,7 @@ jobs:
|
|||||||
|
|
||||||
build_x64_no_root_no_gapps_redfin:
|
build_x64_no_root_no_gapps_redfin:
|
||||||
name: Build for x64 as Redfin with No Root, No GApps
|
name: Build for x64 as Redfin with No Root, No GApps
|
||||||
|
if: inputs.release_type == 'WIF'
|
||||||
permissions: write-all
|
permissions: write-all
|
||||||
needs: [check, check-and-create-tag, update-downloadlinks]
|
needs: [check, check-and-create-tag, update-downloadlinks]
|
||||||
uses: ./.github/workflows/build.yml
|
uses: ./.github/workflows/build.yml
|
||||||
@ -404,6 +456,7 @@ jobs:
|
|||||||
arch: x64
|
arch: x64
|
||||||
root: none
|
root: none
|
||||||
gapps: ""
|
gapps: ""
|
||||||
|
gappsver: none
|
||||||
amazonflag: ""
|
amazonflag: ""
|
||||||
magiskver: stable
|
magiskver: stable
|
||||||
devicemodel: redfin
|
devicemodel: redfin
|
||||||
@ -413,13 +466,15 @@ jobs:
|
|||||||
|
|
||||||
build_x64_kernelsu_gapps_remove_amazon_redfin:
|
build_x64_kernelsu_gapps_remove_amazon_redfin:
|
||||||
name: Build for x64 as Redfin with KernelSU, GApps and No Amazon Appstore
|
name: Build for x64 as Redfin with KernelSU, GApps and No Amazon Appstore
|
||||||
|
if: inputs.release_type == 'WIF'
|
||||||
permissions: write-all
|
permissions: write-all
|
||||||
needs: [check, check-and-create-tag, update-downloadlinks]
|
needs: [check, check-and-create-tag, update-downloadlinks]
|
||||||
uses: ./.github/workflows/build_old.yml
|
uses: ./.github/workflows/build_old.yml
|
||||||
with:
|
with:
|
||||||
arch: x64
|
arch: x64
|
||||||
root: kernelsu
|
root: kernelsu
|
||||||
gapps: MindTheGapps
|
gapps: --install-gapps
|
||||||
|
gappsver: MindTheGapps
|
||||||
amazonflag: --remove-amazon
|
amazonflag: --remove-amazon
|
||||||
magiskver: stable
|
magiskver: stable
|
||||||
devicemodel: redfin
|
devicemodel: redfin
|
||||||
@ -429,6 +484,7 @@ jobs:
|
|||||||
|
|
||||||
build_x64_magisk_gapps_redfin:
|
build_x64_magisk_gapps_redfin:
|
||||||
name: Build for x64 as Redfin with Magisk, GApps
|
name: Build for x64 as Redfin with Magisk, GApps
|
||||||
|
if: inputs.release_type == 'WIF'
|
||||||
permissions: write-all
|
permissions: write-all
|
||||||
needs: [check, check-and-create-tag, update-downloadlinks]
|
needs: [check, check-and-create-tag, update-downloadlinks]
|
||||||
uses: ./.github/workflows/build.yml
|
uses: ./.github/workflows/build.yml
|
||||||
@ -436,6 +492,7 @@ jobs:
|
|||||||
arch: x64
|
arch: x64
|
||||||
root: magisk
|
root: magisk
|
||||||
gapps: --install-gapps
|
gapps: --install-gapps
|
||||||
|
gappsver: MindTheGapps
|
||||||
amazonflag: ""
|
amazonflag: ""
|
||||||
magiskver: stable
|
magiskver: stable
|
||||||
devicemodel: redfin
|
devicemodel: redfin
|
||||||
@ -445,6 +502,7 @@ jobs:
|
|||||||
|
|
||||||
build_x64_magisk_no_gapps_remove_amazon_redfin:
|
build_x64_magisk_no_gapps_remove_amazon_redfin:
|
||||||
name: Build for x64 as Redfin with Magisk, No GApps and No Amazon Appstore
|
name: Build for x64 as Redfin with Magisk, No GApps and No Amazon Appstore
|
||||||
|
if: inputs.release_type == 'WIF'
|
||||||
permissions: write-all
|
permissions: write-all
|
||||||
needs: [check, check-and-create-tag, update-downloadlinks]
|
needs: [check, check-and-create-tag, update-downloadlinks]
|
||||||
uses: ./.github/workflows/build.yml
|
uses: ./.github/workflows/build.yml
|
||||||
@ -452,6 +510,7 @@ jobs:
|
|||||||
arch: x64
|
arch: x64
|
||||||
root: magisk
|
root: magisk
|
||||||
gapps: ""
|
gapps: ""
|
||||||
|
gappsver: none
|
||||||
amazonflag: --remove-amazon
|
amazonflag: --remove-amazon
|
||||||
magiskver: stable
|
magiskver: stable
|
||||||
devicemodel: redfin
|
devicemodel: redfin
|
||||||
@ -461,6 +520,7 @@ jobs:
|
|||||||
|
|
||||||
build_x64_magisk_canary_gapps_remove_amazon_redfin:
|
build_x64_magisk_canary_gapps_remove_amazon_redfin:
|
||||||
name: Build for x64 as Redfin with Magisk Canary, GApps and No Amazon Appstore
|
name: Build for x64 as Redfin with Magisk Canary, GApps and No Amazon Appstore
|
||||||
|
if: inputs.release_type == 'WIF'
|
||||||
permissions: write-all
|
permissions: write-all
|
||||||
needs: [check, check-and-create-tag, update-downloadlinks]
|
needs: [check, check-and-create-tag, update-downloadlinks]
|
||||||
uses: ./.github/workflows/build.yml
|
uses: ./.github/workflows/build.yml
|
||||||
@ -468,6 +528,7 @@ jobs:
|
|||||||
arch: x64
|
arch: x64
|
||||||
root: magisk
|
root: magisk
|
||||||
gapps: --install-gapps
|
gapps: --install-gapps
|
||||||
|
gappsver: MindTheGapps
|
||||||
amazonflag: --remove-amazon
|
amazonflag: --remove-amazon
|
||||||
magiskver: canary
|
magiskver: canary
|
||||||
devicemodel: redfin
|
devicemodel: redfin
|
||||||
@ -477,6 +538,7 @@ jobs:
|
|||||||
|
|
||||||
build_arm64_no_root_gapps_remove_amazon_redfin:
|
build_arm64_no_root_gapps_remove_amazon_redfin:
|
||||||
name: Build for arm64 as Redfin with No Root, GApps and No Amazon Appstore
|
name: Build for arm64 as Redfin with No Root, GApps and No Amazon Appstore
|
||||||
|
if: inputs.release_type == 'WIF'
|
||||||
permissions: write-all
|
permissions: write-all
|
||||||
needs: [check, check-and-create-tag, update-downloadlinks]
|
needs: [check, check-and-create-tag, update-downloadlinks]
|
||||||
uses: ./.github/workflows/buildarm64.yml
|
uses: ./.github/workflows/buildarm64.yml
|
||||||
@ -484,6 +546,7 @@ jobs:
|
|||||||
arch: arm64
|
arch: arm64
|
||||||
root: none
|
root: none
|
||||||
gapps: --install-gapps
|
gapps: --install-gapps
|
||||||
|
gappsver: MindTheGapps
|
||||||
amazonflag: --remove-amazon
|
amazonflag: --remove-amazon
|
||||||
magiskver: stable
|
magiskver: stable
|
||||||
devicemodel: redfin
|
devicemodel: redfin
|
||||||
@ -493,6 +556,7 @@ jobs:
|
|||||||
|
|
||||||
build_arm64_no_root_gapps_redfin:
|
build_arm64_no_root_gapps_redfin:
|
||||||
name: Build for arm64 as Redfin with No Root, GApps
|
name: Build for arm64 as Redfin with No Root, GApps
|
||||||
|
if: inputs.release_type == 'WIF'
|
||||||
permissions: write-all
|
permissions: write-all
|
||||||
needs: [check, check-and-create-tag, update-downloadlinks]
|
needs: [check, check-and-create-tag, update-downloadlinks]
|
||||||
uses: ./.github/workflows/buildarm64.yml
|
uses: ./.github/workflows/buildarm64.yml
|
||||||
@ -500,6 +564,7 @@ jobs:
|
|||||||
arch: arm64
|
arch: arm64
|
||||||
root: none
|
root: none
|
||||||
gapps: --install-gapps
|
gapps: --install-gapps
|
||||||
|
gappsver: MindTheGapps
|
||||||
amazonflag: ""
|
amazonflag: ""
|
||||||
magiskver: stable
|
magiskver: stable
|
||||||
devicemodel: redfin
|
devicemodel: redfin
|
||||||
@ -509,6 +574,7 @@ jobs:
|
|||||||
|
|
||||||
build_arm64_no_root_no_gapps_remove_amazon_redfin:
|
build_arm64_no_root_no_gapps_remove_amazon_redfin:
|
||||||
name: Build for arm64 as Redfin with No Root, No GApps and No Amazon Appstore
|
name: Build for arm64 as Redfin with No Root, No GApps and No Amazon Appstore
|
||||||
|
if: inputs.release_type == 'WIF'
|
||||||
permissions: write-all
|
permissions: write-all
|
||||||
needs: [check, check-and-create-tag, update-downloadlinks]
|
needs: [check, check-and-create-tag, update-downloadlinks]
|
||||||
uses: ./.github/workflows/buildarm64.yml
|
uses: ./.github/workflows/buildarm64.yml
|
||||||
@ -516,6 +582,7 @@ jobs:
|
|||||||
arch: arm64
|
arch: arm64
|
||||||
root: none
|
root: none
|
||||||
gapps: ""
|
gapps: ""
|
||||||
|
gappsver: none
|
||||||
amazonflag: --remove-amazon
|
amazonflag: --remove-amazon
|
||||||
magiskver: stable
|
magiskver: stable
|
||||||
devicemodel: redfin
|
devicemodel: redfin
|
||||||
@ -525,6 +592,7 @@ jobs:
|
|||||||
|
|
||||||
build_arm64_no_root_no_gapps_redfin:
|
build_arm64_no_root_no_gapps_redfin:
|
||||||
name: Build for arm64 as Redfin with No Root, No GApps
|
name: Build for arm64 as Redfin with No Root, No GApps
|
||||||
|
if: inputs.release_type == 'WIF'
|
||||||
permissions: write-all
|
permissions: write-all
|
||||||
needs: [check, check-and-create-tag, update-downloadlinks]
|
needs: [check, check-and-create-tag, update-downloadlinks]
|
||||||
uses: ./.github/workflows/buildarm64.yml
|
uses: ./.github/workflows/buildarm64.yml
|
||||||
@ -532,6 +600,7 @@ jobs:
|
|||||||
arch: arm64
|
arch: arm64
|
||||||
root: none
|
root: none
|
||||||
gapps: ""
|
gapps: ""
|
||||||
|
gappsver: none
|
||||||
amazonflag: ""
|
amazonflag: ""
|
||||||
magiskver: stable
|
magiskver: stable
|
||||||
devicemodel: redfin
|
devicemodel: redfin
|
||||||
@ -541,13 +610,15 @@ jobs:
|
|||||||
|
|
||||||
build_arm64_kernelsu_gapps_remove_amazon_redfin:
|
build_arm64_kernelsu_gapps_remove_amazon_redfin:
|
||||||
name: Build for arm64 as Redfin with KernelSU, GApps and No Amazon Appstore
|
name: Build for arm64 as Redfin with KernelSU, GApps and No Amazon Appstore
|
||||||
|
if: inputs.release_type == 'WIF'
|
||||||
permissions: write-all
|
permissions: write-all
|
||||||
needs: [check, check-and-create-tag, update-downloadlinks]
|
needs: [check, check-and-create-tag, update-downloadlinks]
|
||||||
uses: ./.github/workflows/build_arm64_old.yml
|
uses: ./.github/workflows/build_arm64_old.yml
|
||||||
with:
|
with:
|
||||||
arch: arm64
|
arch: arm64
|
||||||
root: kernelsu
|
root: kernelsu
|
||||||
gapps: MindTheGapps
|
gapps: --install-gapps
|
||||||
|
gappsver: MindTheGapps
|
||||||
amazonflag: --remove-amazon
|
amazonflag: --remove-amazon
|
||||||
magiskver: stable
|
magiskver: stable
|
||||||
devicemodel: redfin
|
devicemodel: redfin
|
||||||
@ -557,6 +628,7 @@ jobs:
|
|||||||
|
|
||||||
build_arm64_magisk_gapps_redfin:
|
build_arm64_magisk_gapps_redfin:
|
||||||
name: Build for arm64 as Redfin with Magisk, GApps
|
name: Build for arm64 as Redfin with Magisk, GApps
|
||||||
|
if: inputs.release_type == 'WIF'
|
||||||
permissions: write-all
|
permissions: write-all
|
||||||
needs: [check, check-and-create-tag, update-downloadlinks]
|
needs: [check, check-and-create-tag, update-downloadlinks]
|
||||||
uses: ./.github/workflows/buildarm64.yml
|
uses: ./.github/workflows/buildarm64.yml
|
||||||
@ -564,6 +636,7 @@ jobs:
|
|||||||
arch: arm64
|
arch: arm64
|
||||||
root: magisk
|
root: magisk
|
||||||
gapps: --install-gapps
|
gapps: --install-gapps
|
||||||
|
gappsver: MindTheGapps
|
||||||
amazonflag: ""
|
amazonflag: ""
|
||||||
magiskver: stable
|
magiskver: stable
|
||||||
devicemodel: redfin
|
devicemodel: redfin
|
||||||
@ -573,6 +646,7 @@ jobs:
|
|||||||
|
|
||||||
build_arm64_magisk_no_gapps_remove_amazon_redfin:
|
build_arm64_magisk_no_gapps_remove_amazon_redfin:
|
||||||
name: Build for arm64 as Redfin with Magisk, No GApps and No Amazon Appstore
|
name: Build for arm64 as Redfin with Magisk, No GApps and No Amazon Appstore
|
||||||
|
if: inputs.release_type == 'WIF'
|
||||||
permissions: write-all
|
permissions: write-all
|
||||||
needs: [check, check-and-create-tag, update-downloadlinks]
|
needs: [check, check-and-create-tag, update-downloadlinks]
|
||||||
uses: ./.github/workflows/buildarm64.yml
|
uses: ./.github/workflows/buildarm64.yml
|
||||||
@ -580,6 +654,7 @@ jobs:
|
|||||||
arch: arm64
|
arch: arm64
|
||||||
root: magisk
|
root: magisk
|
||||||
gapps: ""
|
gapps: ""
|
||||||
|
gappsver: none
|
||||||
amazonflag: --remove-amazon
|
amazonflag: --remove-amazon
|
||||||
magiskver: stable
|
magiskver: stable
|
||||||
devicemodel: redfin
|
devicemodel: redfin
|
||||||
@ -589,6 +664,7 @@ jobs:
|
|||||||
|
|
||||||
build_arm64_magisk_canary_gapps_remove_amazon_redfin:
|
build_arm64_magisk_canary_gapps_remove_amazon_redfin:
|
||||||
name: Build for arm64 as Redfin with Magisk Canary, GApps and No Amazon Appstore
|
name: Build for arm64 as Redfin with Magisk Canary, GApps and No Amazon Appstore
|
||||||
|
if: inputs.release_type == 'WIF'
|
||||||
permissions: write-all
|
permissions: write-all
|
||||||
needs: [check, check-and-create-tag, update-downloadlinks]
|
needs: [check, check-and-create-tag, update-downloadlinks]
|
||||||
uses: ./.github/workflows/buildarm64.yml
|
uses: ./.github/workflows/buildarm64.yml
|
||||||
@ -596,6 +672,7 @@ jobs:
|
|||||||
arch: arm64
|
arch: arm64
|
||||||
root: magisk
|
root: magisk
|
||||||
gapps: --install-gapps
|
gapps: --install-gapps
|
||||||
|
gappsver: MindTheGapps
|
||||||
amazonflag: --remove-amazon
|
amazonflag: --remove-amazon
|
||||||
magiskver: canary
|
magiskver: canary
|
||||||
devicemodel: redfin
|
devicemodel: redfin
|
||||||
@ -603,5 +680,183 @@ jobs:
|
|||||||
wsa_ver: ${{ inputs.wsa_ver }}
|
wsa_ver: ${{ inputs.wsa_ver }}
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|
||||||
|
build_x64_no_root_gapps_remove_amazon_redfin_retail:
|
||||||
|
name: Build for x64 as Redfin with No Root, GApps and No Amazon Appstore
|
||||||
|
if: inputs.release_type == 'retail'
|
||||||
|
permissions: write-all
|
||||||
|
needs: [check, check-and-create-tag, update-downloadlinks]
|
||||||
|
uses: ./.github/workflows/build_old.yml
|
||||||
|
with:
|
||||||
|
arch: x64
|
||||||
|
root: none
|
||||||
|
gapps: --install-gapps
|
||||||
|
gappsver: MindTheGapps
|
||||||
|
amazonflag: --remove-amazon
|
||||||
|
magiskver: stable
|
||||||
|
devicemodel: redfin
|
||||||
|
compressformat: zip
|
||||||
|
wsa_ver: ${{ inputs.wsa_ver }}
|
||||||
|
secrets: inherit
|
||||||
|
|
||||||
|
build_x64_no_root_gapps_redfin_retail:
|
||||||
|
name: Build for x64 as Redfin with No Root, GApps
|
||||||
|
if: inputs.release_type == 'retail'
|
||||||
|
permissions: write-all
|
||||||
|
needs: [check, check-and-create-tag, update-downloadlinks]
|
||||||
|
uses: ./.github/workflows/build_old.yml
|
||||||
|
with:
|
||||||
|
arch: x64
|
||||||
|
root: none
|
||||||
|
gapps: --install-gapps
|
||||||
|
gappsver: MindTheGapps
|
||||||
|
amazonflag: ""
|
||||||
|
magiskver: stable
|
||||||
|
devicemodel: redfin
|
||||||
|
compressformat: zip
|
||||||
|
wsa_ver: ${{ inputs.wsa_ver }}
|
||||||
|
secrets: inherit
|
||||||
|
|
||||||
|
build_x64_no_root_no_gapps_remove_amazon_redfin_retail:
|
||||||
|
name: Build for x64 as Redfin with No Root, No GApps and No Amazon Appstore
|
||||||
|
if: inputs.release_type == 'retail'
|
||||||
|
permissions: write-all
|
||||||
|
needs: [check, check-and-create-tag, update-downloadlinks]
|
||||||
|
uses: ./.github/workflows/build_old.yml
|
||||||
|
with:
|
||||||
|
arch: x64
|
||||||
|
root: none
|
||||||
|
gapps: ""
|
||||||
|
gappsver: none
|
||||||
|
amazonflag: --remove-amazon
|
||||||
|
magiskver: stable
|
||||||
|
devicemodel: redfin
|
||||||
|
compressformat: zip
|
||||||
|
wsa_ver: ${{ inputs.wsa_ver }}
|
||||||
|
secrets: inherit
|
||||||
|
|
||||||
|
build_x64_no_root_no_gapps_redfin_retail:
|
||||||
|
name: Build for x64 as Redfin with No Root, No GApps
|
||||||
|
if: inputs.release_type == 'retail'
|
||||||
|
permissions: write-all
|
||||||
|
needs: [check, check-and-create-tag, update-downloadlinks]
|
||||||
|
uses: ./.github/workflows/build_old.yml
|
||||||
|
with:
|
||||||
|
arch: x64
|
||||||
|
root: none
|
||||||
|
gapps: ""
|
||||||
|
gappsver: none
|
||||||
|
amazonflag: ""
|
||||||
|
magiskver: stable
|
||||||
|
devicemodel: redfin
|
||||||
|
compressformat: zip
|
||||||
|
wsa_ver: ${{ inputs.wsa_ver }}
|
||||||
|
secrets: inherit
|
||||||
|
|
||||||
|
build_x64_kernelsu_gapps_remove_amazon_redfin_retail:
|
||||||
|
name: Build for x64 as Redfin with KernelSU, GApps and No Amazon Appstore
|
||||||
|
if: inputs.release_type == 'retail'
|
||||||
|
permissions: write-all
|
||||||
|
needs: [check, check-and-create-tag, update-downloadlinks]
|
||||||
|
uses: ./.github/workflows/build_old.yml
|
||||||
|
with:
|
||||||
|
arch: x64
|
||||||
|
root: kernelsu
|
||||||
|
gapps: --install-gapps
|
||||||
|
gappsver: MindTheGapps
|
||||||
|
amazonflag: --remove-amazon
|
||||||
|
magiskver: stable
|
||||||
|
devicemodel: redfin
|
||||||
|
compressformat: zip
|
||||||
|
wsa_ver: ${{ inputs.wsa_ver }}
|
||||||
|
secrets: inherit
|
||||||
|
|
||||||
|
build_arm64_no_root_gapps_remove_amazon_redfin_retail:
|
||||||
|
name: Build for arm64 as Redfin with No Root, GApps and No Amazon Appstore
|
||||||
|
if: inputs.release_type == 'retail'
|
||||||
|
permissions: write-all
|
||||||
|
needs: [check, check-and-create-tag, update-downloadlinks]
|
||||||
|
uses: ./.github/workflows/build_arm64_old.yml
|
||||||
|
with:
|
||||||
|
arch: arm64
|
||||||
|
root: none
|
||||||
|
gapps: --install-gapps
|
||||||
|
gappsver: MindTheGapps
|
||||||
|
amazonflag: --remove-amazon
|
||||||
|
magiskver: stable
|
||||||
|
devicemodel: redfin
|
||||||
|
compressformat: zip
|
||||||
|
wsa_ver: ${{ inputs.wsa_ver }}
|
||||||
|
secrets: inherit
|
||||||
|
|
||||||
|
build_arm64_no_root_gapps_redfin_retail:
|
||||||
|
name: Build for arm64 as Redfin with No Root, GApps
|
||||||
|
if: inputs.release_type == 'retail'
|
||||||
|
permissions: write-all
|
||||||
|
needs: [check, check-and-create-tag, update-downloadlinks]
|
||||||
|
uses: ./.github/workflows/build_arm64_old.yml
|
||||||
|
with:
|
||||||
|
arch: arm64
|
||||||
|
root: none
|
||||||
|
gapps: --install-gapps
|
||||||
|
gappsver: MindTheGapps
|
||||||
|
amazonflag: ""
|
||||||
|
magiskver: stable
|
||||||
|
devicemodel: redfin
|
||||||
|
compressformat: zip
|
||||||
|
wsa_ver: ${{ inputs.wsa_ver }}
|
||||||
|
secrets: inherit
|
||||||
|
|
||||||
|
build_arm64_no_root_no_gapps_remove_amazon_redfin_retail:
|
||||||
|
name: Build for arm64 as Redfin with No Root, No GApps and No Amazon Appstore
|
||||||
|
if: inputs.release_type == 'retail'
|
||||||
|
permissions: write-all
|
||||||
|
needs: [check, check-and-create-tag, update-downloadlinks]
|
||||||
|
uses: ./.github/workflows/build_arm64_old.yml
|
||||||
|
with:
|
||||||
|
arch: arm64
|
||||||
|
root: none
|
||||||
|
gapps: ""
|
||||||
|
gappsver: none
|
||||||
|
amazonflag: --remove-amazon
|
||||||
|
magiskver: stable
|
||||||
|
devicemodel: redfin
|
||||||
|
compressformat: zip
|
||||||
|
wsa_ver: ${{ inputs.wsa_ver }}
|
||||||
|
secrets: inherit
|
||||||
|
|
||||||
|
build_arm64_no_root_no_gapps_redfin_retail:
|
||||||
|
name: Build for arm64 as Redfin with No Root, No GApps
|
||||||
|
if: inputs.release_type == 'retail'
|
||||||
|
permissions: write-all
|
||||||
|
needs: [check, check-and-create-tag, update-downloadlinks]
|
||||||
|
uses: ./.github/workflows/build_arm64_old.yml
|
||||||
|
with:
|
||||||
|
arch: arm64
|
||||||
|
root: none
|
||||||
|
gapps: ""
|
||||||
|
gappsver: none
|
||||||
|
amazonflag: ""
|
||||||
|
magiskver: stable
|
||||||
|
devicemodel: redfin
|
||||||
|
compressformat: zip
|
||||||
|
wsa_ver: ${{ inputs.wsa_ver }}
|
||||||
|
secrets: inherit
|
||||||
|
|
||||||
|
build_arm64_kernelsu_gapps_remove_amazon_redfin_retail:
|
||||||
|
name: Build for arm64 as Redfin with KernelSU, GApps and No Amazon Appstore
|
||||||
|
if: inputs.release_type == 'retail'
|
||||||
|
permissions: write-all
|
||||||
|
needs: [check, check-and-create-tag, update-downloadlinks]
|
||||||
|
uses: ./.github/workflows/build_arm64_old.yml
|
||||||
|
with:
|
||||||
|
arch: arm64
|
||||||
|
root: kernelsu
|
||||||
|
gapps: --install-gapps
|
||||||
|
gappsver: MindTheGapps
|
||||||
|
amazonflag: --remove-amazon
|
||||||
|
magiskver: stable
|
||||||
|
devicemodel: redfin
|
||||||
|
compressformat: zip
|
||||||
|
wsa_ver: ${{ inputs.wsa_ver }}
|
||||||
|
secrets: inherit
|
||||||
|
|
||||||
|
Binary file not shown.
Binary file not shown.
@ -1,461 +1,181 @@
|
|||||||
# WSA-Script
|
# Magisk on WSA (with Google Apps)
|
||||||
## MagiskOnWSA (For Windows™ 10 and 11) by [@YT-Advanced](https://github.com/YT-Advanced/)
|
|
||||||
### Windows Subsystem For Android™ (WSA) with Google Play Services and Magisk
|
|
||||||
|
|
||||||
<details>
|
:warning: Magisk on WSA will no longer be available after March 5, 2025. [Learn more](https://learn.microsoft.com/en-us/windows/android/wsa/).
|
||||||
<summary><h3> ❓Want to build your custom build❓ <h3></summary>
|
|
||||||
|
|
||||||
|
:warning: For fork developers: Please don't build using GitHub Actions, as GitHub will count your forked GitHub Actions usage against this upstream repository, which may cause this upstream repository gets disabled by GitHub staff like [MagiskOnWSA](https://github.com/LSPosed/MagiskOnWSA) because of numerous forks building GitHub Actions, and counting the forks' Action usage against this upstream repository.
|
||||||
|
|
||||||
| :exclamation: **Important:** `⚠️DO NOT FORK⚠️` |
|
## Support for generating from these systems
|
||||||
|------------------------------------------------------------------------|
|
|
||||||
|**This repository is designed specifically not to be forked. MagiskOnWSA and some of the various forks and clones that have sprung up on the platform (***potentially***) violate GitHub's Terms of Service due to abuse of GitHub Actions and have been ultimately warned, disabled or banned.**|
|
|
||||||
|**Therefore, don't fork this repository unless you're a developer and want to modify the code itself and/or want to contribute to this Github repository.**|
|
|
||||||
|**If you want to create your Custom Build, please follow the instructions set out clearly, to avoid the repo from being taken down as a result of a misuse of Github Actions due to the large number of forks. AND ALSO if you want to build with Latest Insider version, please skip the first 7 steps**|
|
|
||||||
|
|
||||||
#### **1. Star this repos (I will happy if you do that)**
|
- Linux (x86_64 or arm64)
|
||||||
|
|
||||||
#### **2. Check the version from [Releases](https://github.com/YT-Advanced/WSA-Script/releases/) first. If it does not have the version you want, continue to follow this guide. If it does, then feel free to use those prebuild WSA builds**
|
The following dependencies are required:
|
||||||
|
|
||||||
#### **3. Open [this page directly](https://YT-Advanced.github.io/WSA-Script) then choose the option that you want to build**
|
| DistrOS | | | | | |
|
||||||
|
|:-------------------:|----------------------------|------------|--------------------|---------------|---------------|
|
||||||
|
| Debian | `python3 aria2 unzip sudo` | `whiptail` | `python3-venv` | `python3-pip` | `p7zip-full` |
|
||||||
|
| openSUSE Tumbleweed | Same as above | `dialog` | `python3-venvctrl` | Same as above | Same as above |
|
||||||
|
| Arch | Same as Debian | `libnewt` | Same as Debian | `python-pip` | `p7zip` |
|
||||||
|
|
||||||
![](https://user-images.githubusercontent.com/70064328/236150011-191bf3a8-2efb-44a1-af44-202c6ea9fe66.png)
|
The python3 library `requests` is used.
|
||||||
|
|
||||||
#### **4. Click "Create Issues" Button, the issues page will be generated and open. Then you click "Submit New Issues" (green button) and wait.**
|
Python version ≥ **3.7.2**.
|
||||||
![](https://user-images.githubusercontent.com/70064328/236150320-65fdd492-9fc4-4176-b3bd-a3cee8b7753d.png)
|
|
||||||
|
|
||||||
#### **5. After about 10 minutes, the bot will reply that the workflow have built successfully (like the picture below), OPEN THE LINK BELOW THE BOT COMMENT**
|
- Recommended use
|
||||||
![](https://user-images.githubusercontent.com/70064328/236154819-75dd1997-1999-43fd-a482-050f21e34b72.png)
|
|
||||||
|
|
||||||
#### **6. Download the package as artifact**
|
- Ubuntu (You can use [WSL2](https://apps.microsoft.com/store/search?publisher=Canonical%20Group%20Limited))
|
||||||
**DO NOT download it via multithread downloaders like IDM**
|
|
||||||
![](https://user-images.githubusercontent.com/68516357/222224469-5748b78a-158e-46ff-9f65-317dbb519aac.png)
|
|
||||||
|
|
||||||
#### **7. Install like normal using [the instructions](https://github.com/YT-Advanced/WSA-Script#--installation) in this repository** and most important of all....
|
Ready to use right out of the box.
|
||||||
|
|
||||||
</details>
|
- Debian (You can use [WSL2](https://apps.microsoft.com/store/detail/debian/9MSVKQC78PK6))
|
||||||
|
|
||||||
## Downloads
|
Ready to use right out of the box.
|
||||||
|
|
||||||
<table>
|
- openSUSE Tumbleweed (You can use [WSL2](https://apps.microsoft.com/store/detail/opensuse-tumbleweed/9MSSK2ZXXN11))
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>Click to Download</th>
|
|
||||||
<th>Differences</th>
|
|
||||||
<th>Current Version</th>
|
|
||||||
<th>Date</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td><a href=https://github.com/YT-Advanced/WSA-Script/releases/tag/WSA-Insider-Version><img src="https://img.shields.io/badge/Pre--Release%20Builds-orange?style=for-the-badge" height="28"></a></td>
|
|
||||||
<td>Follows the "WSA Preview Program Channel" </br> </br> Builds are generally newer than the "WSA Retail" and "Insider Fast Channel"</td>
|
|
||||||
<td>2311.40000.5.0<br></td>
|
|
||||||
<td>Builds Released: 05/01/2024</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td><a href=https://github.com/YT-Advanced/WSA-Script/releases/latest><img src="https://img.shields.io/badge/Stable%20Builds-blue?style=for-the-badge" alt="Image" height="28"></a></td>
|
|
||||||
<td>Follows the "WSA Retail Channel" <br><br> Builds are generally more stable than the builds in the "WSA Preview Program Channel" </td>
|
|
||||||
<td>2311.40000.5.0<br></td>
|
|
||||||
<td>Builds Released: 05/01/2024</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td colspan="4"><h4>It is recommend to check this table regularly to see if there is a newer update avaliable for WSA for the Stable Builds and Pre-Release Builds<h4></td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
## Requirements
|
Ready to use right out of the box.
|
||||||
|
|
||||||
<center><table>
|
`run.sh` will handle all dependencies automatically.
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th></th>
|
|
||||||
<th><img src="https://upload.wikimedia.org/wikipedia/commons/e/e6/Windows_11_logo.svg" style="width: 200px;"/></th>
|
|
||||||
<th><img src="https://upload.wikimedia.org/wikipedia/commons/0/05/Windows_10_Logo.svg" style="width: 200px;"/></th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td><img style="float: right;" src="https://img.icons8.com/fluency/96/null/windows-update--v1.png" width="60" height="60"/><h4>Windows Build Number<h4></td>
|
|
||||||
<td>Windows™ 11: Build 22000.526 or higher.</td>
|
|
||||||
<td>Windows™ 10: 22H2 10.0.19042.2604 or higher. <br /><br /><b>To use WSA, you must install <a href="https://www.catalog.update.microsoft.com/Search.aspx?q=KB5014032" target="_blank" rel="noopener noreferrer">KB5014032</a> then install <a href="https://www.catalog.update.microsoft.com/Search.aspx?q=KB5022834" target="_blank" rel="noopener noreferrer">KB5022834</a> to use WSA on these Windows 10 builds<b><br /><br /><b></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td><img style="float: right;" src="https://img.icons8.com/external-smashingstocks-flat-smashing-stocks/66/null/external-RAM-technology-and-devices-smashingstocks-flat-smashing-stocks.png" width="60" height="60"/><h4>RAM<h4></td>
|
|
||||||
<td colspan="2"><ul><li>4 to 6 GB (Not Recommended)</li><li>8 GB (Minimum)</li><li>16 GB (Recommended)</li></ul></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td><img style="float: right;" src="https://img.icons8.com/3d-fluency/94/null/electronics.png" width="60" height="60"/><h4>Processor<h4></td>
|
|
||||||
<td>Your PC should meet the basic Windows™ 11 requirements i.e Core i3 8th Gen, Ryzen 3000, Snapdragon 8c, or above</td>
|
|
||||||
<td>N/A </br></br> This is a bit of a hit or miss, but it is highly recommended that your processor is listed in the <a href="https://learn.microsoft.com/en-gb/windows-hardware/design/minimum/windows-processor-requirements" target="_blank" rel="noopener noreferrer">supported CPU lists for Windows 11 requirements</a></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td><img style="float: right;" src="https://img.icons8.com/3d-fluency/94/null/video-card.png" width="60" height="60"/><h4>GPU<h4></td>
|
|
||||||
<td colspan="2">Any compatible Intel, AMD or Nvidia GPU. <br /> GPU Performance may vary depending on its compatibility with Windows Subsystem For Android™ <br /</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td rowspan="2"><img style="float: right;" src="https://img.icons8.com/3d-fluency/94/null/ssd.png" width="60" height="60"/><h4>Storage<h4></td>
|
|
||||||
<td colspan="2">Solid-state drive (SSD) (RECOMMENDED) <br />OR</br> Hard Disk Drive (HDD) (NOT RECOMMENDED)</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td colspan="2"><b><i>Minimum Storage Requirements: You must have at least 10GB free on the system drive (C:\)<b><i></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td><img style="float: right;" src="https://img.icons8.com/stickers/100/null/storage.png" width="60" height="60"/><h4>Partition<h4></td>
|
|
||||||
<td colspan="2"><b><i>NTFS ONLY<b><i> <br /><br /> Windows Subsystem For Android™ can only be installed on a NTFS partition, not on an exFAT partition</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td rowspan="5"><img style="float: left;" src="https://user-images.githubusercontent.com/68516357/230764789-ad8f7361-4a3b-49a8-a8e9-24fdc87d5781.png" width="66" height="58"/><h4>Windows Features Needed<h4></td>
|
|
||||||
<td colspan="2">Virtual Machine Platform Enabled : <b>Require!!</b></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td colspan="2">Windows Hypervisor Platform Enabled (Optional)</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td colspan="2">Windows Subsystem For Linux™ Enabled (Optional)</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td colspan="2">Hyper-V Enabled (Optional)</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td colspan="2"><b><i>These optional settings are for virtualization and provide components that are needed to run WSA. You can enable these settings by pressing the Windows Key + R on your keyboard and typing "OptionalFeatures.exe" into the box, pressing enter and selecting the features above followed by pressing apply<b><i></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td><img style="float: right;" src="https://user-images.githubusercontent.com/68516357/230759907-5d11950e-1b17-4811-8f4e-a0f82e598079.png" width="60" height="60"/><h4>Virtualization<h4></td>
|
|
||||||
<td colspan="2">The Computer must support virtualization and be enabled in BIOS/UEFI and Optional Features. </br> <h3><a href="https://support.microsoft.com/en-us/windows/enable-virtualization-on-windows-11-pcs-c5578302-6e43-4b4b-a449-8ced115f58e1" target="_blank" rel="noopener noreferrer">Guide on how to enable</a><h3></td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
|
No need to type any commands.
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
<details>
|
- Integrate Magisk and GApps in a few clicks within minutes
|
||||||
<summary><picture><img style="float: right;" src="https://img.icons8.com/color/96/null/software-installer.png" width="60" height="60"/></picture><h1> Installation<h1></summary>
|
- Keep each build up to date
|
||||||
|
- Support both ARM64 and x64
|
||||||
|
- Support MindTheGapps
|
||||||
|
- Remove Amazon Appstore
|
||||||
|
- Fix VPN dialog not showing (use our [VpnDialogs app](https://github.com/LSPosed/VpnDialogs))
|
||||||
|
- Add device administration feature
|
||||||
|
- Unattended installation
|
||||||
|
- Automatically activates developers mode in Windows 11
|
||||||
|
- Update to the new version while preserving data with a one-click script
|
||||||
|
- Merged all language packs
|
||||||
|
|
||||||
|
## Text Guide
|
||||||
|
|
||||||
> **Note** :
|
1. Star (if you like).
|
||||||
> If you have the official Windows Subsystem For Android™ installed, you must [completely uninstall](#uninstallation) it to use MagiskOnWSA.
|
2. Clone the repo to local:
|
||||||
|
|
||||||
> In case you want to preserve your data from the previous installation (official or MagiskOnWSA), you can backup `%LOCALAPPDATA%\Packages\MicrosoftCorporationII.WindowsSubsystemForAndroid_8wekyb3d8bbwe\LocalCache\userdata.vhdx` before uninstallation and restore it after installation. For a more comprehensive and detailed guide, take a look at the **Backup and Restore section** in this README markdown
|
```bash
|
||||||
|
git clone https://github.com/LSPosed/MagiskOnWSALocal.git --depth 1
|
||||||
1. Go to the [Releases page](https://github.com/YT-Advanced/WSA-Script/releases/latest)
|
|
||||||
2. In the latest release, go to the Assets section and download the Windows Subsystem For Android™ version of your choosing (do not download "Source code")
|
|
||||||
|
|
||||||
> **Note** :
|
|
||||||
> If you want to download WSA with Magisk Delta, please go to [![Action Tab](https://github.com/YT-Advanced/WSA-Script/actions/workflows/custom_build.yml/badge.svg)](https://github.com/YT-Advanced/WSA-Script/actions/workflows/custom_build.yml) and download the package from the Action.
|
|
||||||
|
|
||||||
3. Check integrity of downloaded file by [Follow this guide](Guides/Checksum.md)
|
|
||||||
4. Extract the zip file
|
|
||||||
5. Delete the zip file
|
|
||||||
6. Move the newly extracted folder to a suitable location (Documents folder is a good choice), as you will need to keep the folder on your PC to use MagiskOnWSA
|
|
||||||
|
|
||||||
> **Note** :
|
|
||||||
> If you're updating WSA, merge the folders and replace the files for all items when asked
|
|
||||||
|
|
||||||
7. Open the Windows Subsystem For Android™ folder: Search for and double-click `Run.bat`
|
|
||||||
- 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.
|
|
||||||
- If the popup windows disappear without asking administrative permission and Windows Subsystem For Android™ is not installed successfully, you should manually run Install.ps1 as administrator:
|
|
||||||
|
|
||||||
- Press `Win+X` and select **Windows™ Terminal (Admin)**
|
|
||||||
|
|
||||||
- Input the command below and press enter, replacing {X:\path\to\your\extracted\folder} including the {} with the path of the extracted folder
|
|
||||||
```Powershell
|
|
||||||
cd "{X:\path\to\your\extracted\folder}"
|
|
||||||
```
|
|
||||||
|
|
||||||
- Input the command below and press enter
|
|
||||||
```Powershell
|
|
||||||
PowerShell.exe -ExecutionPolicy Bypass -File .\Install.ps1
|
|
||||||
```
|
|
||||||
|
|
||||||
- The script will run and Windows Subsystem For Android™ will be installed
|
|
||||||
- If this workaround does not work, your PC is not supported for WSA
|
|
||||||
|
|
||||||
8. Once the installation process completes, Windows Subsystem For Android™ will launch (if this is a first-time install, a window asking for consent to diagnositic information will be shown instead. Sometimes two identical windows will show, this is fine and nothing bad happens if you click OK in both windows)
|
|
||||||
9. Click on the PowerShell window, then press any key on the keyboard, the PowerShell window should close
|
|
||||||
10. Close File Explorer
|
|
||||||
11. **Enjoy**
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Notice (Applicable for both Windows 10 and 11):
|
|
||||||
|
|
||||||
1. You can NOT delete the Windows Subsystem For Android™ installation folder.
|
|
||||||
What `Add-AppxPackage -Register .\AppxManifest.xml` does is to register an appx package with some existing unpackaged files,
|
|
||||||
so you need to keep them as long as you want to use Windows Subsystem For Android™.
|
|
||||||
Check https://learn.microsoft.com/en-us/powershell/module/appx/add-appxpackage?view=windowsserver2022-ps for more details.
|
|
||||||
2. You need to register your Windows Subsystem For Android™ appx package before you can run Windows Subsystem For Android™.
|
|
||||||
For [WSA-Script](https://github.com/YT-Advanced/WSA-Script) and [MagiskOnWSALocal](https://github.com/LSPosed/MagiskOnWSALocal) users, you need to run `Run.bat` in the extracted dir.
|
|
||||||
If the script fails, you can take the following steps for diagnosis (admin privilege required):
|
|
||||||
1. Open a PowerShell window and change working directory to your Windows Subsystem For Android™ directory.
|
|
||||||
|
|
||||||
2. Run the command below in PowerShell. This should fail with an ActivityID, which is a UUID required for the next step.
|
|
||||||
```Powershell
|
|
||||||
Add-AppxPackage -ForceApplicationShutdown -ForceUpdateFromAnyVersion -Register .\AppxManifest.xml
|
|
||||||
```
|
|
||||||
|
|
||||||
3. Run the command below in PowerShell. This should print the log of the failed operation.
|
|
||||||
```Powershell
|
|
||||||
Get-AppPackageLog -ActivityID <UUID>
|
|
||||||
```
|
|
||||||
4. Check the log for the reason of failure and fix it.
|
|
||||||
|
|
||||||
</details>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary><picture><img style="float: right;" src="https://img.icons8.com/external-flaticons-flat-flat-icons/64/null/external-updating-tools-and-material-ecommerce-flaticons-flat-flat-icons.png" width="60" height="60"/></picture><h1> Updating<h1></summary>
|
|
||||||
|
|
||||||
### How do I update without losing any of my apps and data on Windows Subsystem for Android (WSA)
|
|
||||||
|
|
||||||
1. [Download the latest build](https://github.com/YT-Advanced/WSA-Script/releases/latest) (that you want to update to)
|
|
||||||
2. Make sure Windows Subsystem For Android is not running (Click on "Turn off" in the WSA Settings and wait for the spinning loader to disappear)
|
|
||||||
2. Using 7-Zip, WinRAR or any other tool of choice, open the .zip file
|
|
||||||
3. Within the .zip archive open the subfolder (Example: WSA_2xxx.xxxxx.xx.x_x64_Release-Nightly-with-magisk-xxxxxxx-MindTheGapps-13.0-as-Pixel-5-RemovedAmazon)
|
|
||||||
4. Select all the files that are within this subfolder and extract them to the current folder where the file for Windows Subsystem For Android are (the folder you extracted, and installed WSA from)
|
|
||||||
5. When prompted to replace folders, select "Do this for all current items" and click on "Yes"
|
|
||||||
6. When prompted to replace files, click on "Replace the files in the destination"
|
|
||||||
7. Run the ``Run.bat`` file
|
|
||||||
8. Launch Windows Subsystem For Android Settings app and go to the ``About`` tab using the sidebar
|
|
||||||
9. Check if the WSA version matches the latest version/ the version number that you want to update to
|
|
||||||
|
|
||||||
|
|
||||||
</details>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary><picture><img style="float: right;" src="https://img.icons8.com/color/96/null/uninstall-programs.png" width="60" height="60"/></picture><h1> Uninstallation<h1></summary>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
> **Note**:
|
|
||||||
>
|
|
||||||
> If you want to preseve your data, make a backup of the `%LOCALAPPDATA%\Packages\MicrosoftCorporationII.WindowsSubsystemForAndroid_8wekyb3d8bbwe\LocalCache\userdata.vhdx` file. After uninstalling, copy the VHDX file back to the `%LOCALAPPDATA%\Package\MicrosoftCorporationII.WindowsSubsystemForAndroid_8wekyb3d8bbwe\LocalCache` folder. For a more comprehensive and detailed guide, take a look at the **Backup and Restore section** in this README markdown
|
|
||||||
|
|
||||||
- To remove WSA installed:
|
|
||||||
|
|
||||||
- **1.)** Make sure that Windows Subsystem For Android™ is not running
|
|
||||||
- **2.)** Search for ``Windows Subsystem For Android™ Settings`` using the built-in Windows Search, or through Add and Remove Programs and press uninstall
|
|
||||||
- **3.)** Delete the WSA folder that extracted you extracted and Run.bat was run from to install WSA (MagiskOnWSA folder)
|
|
||||||
- **4.)** Go to ``%LOCALAPPDATA%/Packages/`` and delete the folder named ``MicrosoftCorporationII.WindowsSubsystemForAndroid_8wekyb3d8bbwe``
|
|
||||||
|
|
||||||
- If you get an error that states that the file(s) could not be deleted, make sure that WSA is turned off
|
|
||||||
|
|
||||||
- To remove WSA installed from the Microsoft Store:
|
|
||||||
|
|
||||||
- **1.)** Search for ``Windows Subsystem For Android™ Settings`` using the built-in Windows Search, or through Add and Remove Programs and press uninstall
|
|
||||||
|
|
||||||
</details>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary><picture><img style="float: right;" src="https://img.icons8.com/fluency/96/cloud-backup-restore.png" width="60" height="60"/></picture><h1> Backup and Restore Userdata<h1></summary>
|
|
||||||
|
|
||||||
## Backing Up Your Userdata
|
|
||||||
|
|
||||||
In order to make a backup of your WSA data you must copy the Userdata.vhdx (which includes, but is not limited Android Apps and their data, settings etc.), located at `%LOCALAPPDATA%\Packages\MicrosoftCorporationII.WindowsSubsystemForAndroid_8wekyb3d8bbwe\LocalCache\userdata.vhdx`, to a safe location
|
|
||||||
|
|
||||||
## Restoring Your Backup
|
|
||||||
|
|
||||||
Before attempting to restore your backup, you must remove WSA if installed. Then before you run the "Run.bat" script (to reinstall WSA after removing it), you need to remove these lines from Install.ps1:
|
|
||||||
|
|
||||||
Official Magisk:
|
|
||||||
```pwsh
|
|
||||||
Start-Process "wsa://com.topjohnwu.magisk"
|
|
||||||
```
|
|
||||||
Magisk Alpha:
|
|
||||||
```pwsh
|
|
||||||
Start-Process "wsa://io.github.vvb2060.magisk"
|
|
||||||
```
|
|
||||||
Magisk Delta:
|
|
||||||
```pwsh
|
|
||||||
Start-Process "wsa://io.github.huskydg.magisk"
|
|
||||||
```
|
|
||||||
Google Play Store:
|
|
||||||
```pwsh
|
|
||||||
Start-Process "wsa://com.android.vending"
|
|
||||||
```
|
|
||||||
Amazon Appstore:
|
|
||||||
```pwsh
|
|
||||||
Start-Process "wsa://com.amazon.venezia"
|
|
||||||
```
|
|
||||||
After running the script, do not run WSA at all, and go to %localappdata%\Packages and (if the folders do not exist, create them) in MicrosoftCorporationII.WindowsSubsystemForAndroid_8wekyb3d8bbwe\LocalCache\ paste the userdata.vhdx
|
|
||||||
|
|
||||||
Now run WSA and your serdata should hopefully be restored
|
|
||||||
</details>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary><picture><img style="float: right;" src="https://img.icons8.com/3d-fluency/94/null/help.png" width="60" height="60"/></picture><h1> FAQ<h1></summary>
|
|
||||||
|
|
||||||
|
|
||||||
**Help me, I am having problems with the MagiskOnWSA Builds**
|
|
||||||
|
|
||||||
- Open an [issue in Github](https://github.com/YT-Advanced/WSA-Script/issues) and describe the issue with sufficent detail
|
|
||||||
|
|
||||||
**Help me, I am having problems with installing Windows Subsystem For Android™ on Windows™ 10**
|
|
||||||
|
|
||||||
- I am not working on the patch, and nor claim to. Open an issue in Github, and I will try to assist you with the problem if possible. For full support visit the project homepage and open an issue there: https://github.com/cinit/WSAPatch/issues/
|
|
||||||
|
|
||||||
**How do I get a logcat?**
|
|
||||||
- There are two ways:
|
|
||||||
```
|
|
||||||
adb logcat
|
|
||||||
```
|
|
||||||
or
|
|
||||||
|
|
||||||
- Location in Windows ---> <br/> `%LOCALAPPDATA%\Packages\MicrosoftCorporationII.WindowsSubsystemForAndroid_8wekyb3d8bbwe\LocalState\diagnostics\logcat`
|
|
||||||
|
|
||||||
**Can I delete the installed folder?**
|
|
||||||
|
|
||||||
- No.
|
|
||||||
|
|
||||||
**How can I update Windows Subsystem For Android™ to a new version?**
|
|
||||||
|
|
||||||
- As Explained [Installation instructions](#installation). Download the [latest Windows Subsystem For Android™ Version](#downloads) and replace the content of your previous installation and rerun Install.ps1. Don't worry, your data will be preserved
|
|
||||||
|
|
||||||
**How do I update Magisk?**
|
|
||||||
|
|
||||||
- Do the same as updating Windows Subsystem For Android™. Wait for a new MagiskOnWSA release that includes the newer Magisk version, then follow the [Installation instructions](#installation) to update
|
|
||||||
|
|
||||||
**Can I pass SafetyNet/Play Integrity?**
|
|
||||||
|
|
||||||
- No. Virtual machines like Windows Subsystem For Android™ cannot pass these mechanisms on their own due to the lack of signing by Google. Passing requires more exotic (and untested) solutions like: <https://github.com/kdrag0n/safetynet-fix/discussions/145#discussioncomment-2170917>
|
|
||||||
|
|
||||||
**What is virtualization?**
|
|
||||||
|
|
||||||
- Virtualization is required to run virtual machines like Windows Subsystem For Android™. `Run.bat` helps you enable it. After rebooting, re-run `Run.bat` to install Windows Subsystem For Android™. If it's still not working, you have to enable virtualization in your BIOS/UEFI. Instructions vary by PC vendor, look for help online
|
|
||||||
|
|
||||||
**Can I remount system partition as read-write?**
|
|
||||||
|
|
||||||
- No. Windows Subsystem For Android™ is mounted as read-only by Hyper-V. You can, however, modify the system partition by creating a Magisk module, or by directly modifying the system.img file
|
|
||||||
|
|
||||||
**I cannot adb connect localhost:58526**
|
|
||||||
|
|
||||||
- Make sure developer mode is enabled. If the issue persists, check the IP address of Windows Subsystem For Android™ on the Settings ---> Developer page and try
|
|
||||||
|
|
||||||
```
|
|
||||||
adb connect ip:5555
|
|
||||||
```
|
```
|
||||||
|
|
||||||
**Magisk online module list is empty?**
|
3. Run `cd MagiskOnWSALocal`.
|
||||||
|
4. Run `./scripts/run.sh`.
|
||||||
|
5. Select the WSA version and its architecture (mostly x64).
|
||||||
|
6. Select the version of Magisk.
|
||||||
|
7. Choose which brand of GApps you want to install:
|
||||||
|
- MindTheGapps
|
||||||
|
|
||||||
- Magisk actively removes the online module repository. You can install the module locally or by
|
There is no other variant we can choose.
|
||||||
|
8. Select the root solution (none means no root).
|
||||||
|
9. If you are running the script for the first time, it will take some time to complete. After the script completes, two new folders named `output` and `download` will be generated in the `MagiskOnWSALocal` folder. Go to the `output` folder. While running the `./run.sh` script in the step 3, if you selected `Yes` for `Do you want to compress the output?` then in `output` folder you will see a compressed file called `WSA-with-magisk-stable-MindTheGapps_2207.40000.8.0_x64_Release-Nightly`or else there will be folder with the `WSA-with-magisk-stable-MindTheGapps_2207.40000.8.0_x64_Release-Nightly`. If there is a folder open it and skip to step 10. NOTE: The name of compressed file or the folder generated in the `output` folder may be different for you. It will be dependent on the choices made when executing `./run.sh`.
|
||||||
|
10. Extract the compressed file and open the folder created after the extraction of the file.
|
||||||
|
11. Here look for file `Run.bat` and run it.
|
||||||
|
- 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.
|
||||||
|
- If you have an official WSA installation, you should uninstall it first. (In case you want to preserve your data, you can backup `%LOCALAPPDATA%\Packages\MicrosoftCorporationII.WindowsSubsystemForAndroid_8wekyb3d8bbwe\LocalCache\userdata.vhdx` before uninstallation and restore it after installation.)
|
||||||
|
- If the popup windows disappear **without asking administrative permission** and WSA is not installed successfully, you should manually run `Install.ps1` as Administrator:
|
||||||
|
1. Press `Win+x` and select `Windows Terminal (Admin)`.
|
||||||
|
2. Input `cd "{X:\path\to\your\extracted\folder}"` and press `enter`, and remember to replace `{X:\path\to\your\extracted\folder}` including the `{}`, for example `cd "D:\wsa"`
|
||||||
|
3. Input `PowerShell.exe -ExecutionPolicy Bypass -File .\Install.ps1` and press `Enter`.
|
||||||
|
4. The script will run and WSA will be installed.
|
||||||
|
5. If this workaround does not work, your PC is not supported for WSA.
|
||||||
|
12. Magisk/Play Store will be launched. Enjoy by installing LSPosed-Zygisk with Zygisk enabled or Riru and LSPosed-Riru.
|
||||||
|
|
||||||
**Step 1**
|
---
|
||||||
|
|
||||||
adb push module.zip /data/local/tmp
|
## FAQ
|
||||||
|
|
||||||
**Step 2**
|
<details open>
|
||||||
|
|
||||||
adb shell su -c magisk --install-module /data/local/tmp/module.zip
|
- Can I delete the installed folder?
|
||||||
|
|
||||||
|
No.
|
||||||
|
|
||||||
**How do I uninstall Magisk?**
|
- How can I update WSA to a newer version?
|
||||||
|
|
||||||
- Request, using [Issues](https://github.com/YT-Advanced/WSA-Script/issues), a Windows Subsystem For Android™ version that doesn't include Magisk from the [Releases page](https://github.com/YT-Advanced/WSA-Script/releases/latest). Then follow the [Installation instructions](#installation)
|
1. Update build scripts:
|
||||||
</details>
|
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git pull
|
||||||
|
```
|
||||||
|
|
||||||
<details>
|
For more usage of git, referred to <https://git-scm.com/book>
|
||||||
<summary><picture><img style="float: right;" src="https://img.icons8.com/external-xnimrodx-lineal-color-xnimrodx/96/null/external-guide-education-xnimrodx-lineal-color-xnimrodx.png" width="60" height="60"/></picture><h1> Usage Guides<h1></summary>
|
|
||||||
|
|
||||||
|
2. Rerun the script, replace the content of your previous installation and rerun `Install.ps1`. Don't worry, your data will be preserved.
|
||||||
|
|
||||||
### Install KernelSU Manager:
|
- How can I get the logcat from WSA?
|
||||||
[<img src="https://img.shields.io/badge/-How%20to%20install%20KernelSU%20Manager-474154?style=for-the-badge&logoColor=white&logo=github" />](Guides/KernelSU.md)
|
|
||||||
|
|
||||||
### Install BusyBox:
|
`%LOCALAPPDATA%\Packages\MicrosoftCorporationII.WindowsSubsystemForAndroid_8wekyb3d8bbwe\LocalState\diagnostics\logcat`
|
||||||
[<img src="https://img.shields.io/badge/-How%20to%20install%20BusyBox-474154?style=for-the-badge&logoColor=white&logo=github" />](Guides/BusyBox.md)
|
|
||||||
|
|
||||||
### Check Integrity Guide:
|
- How can I update Magisk to a newer version?
|
||||||
[<img src="https://img.shields.io/badge/-HOW%20TO%20CHECK%20INTEGRITY%20OF%20DOWNLOAD%20PACKAGES-474154?style=for-the-badge&logoColor=white&logo=github" />](Guides/Checksum.md)
|
|
||||||
|
|
||||||
### GPU Guide:
|
Do the same as updating WSA.
|
||||||
[<img src="https://img.shields.io/badge/-How%20to%20Change%20the%20GPU%20Used-474154?style=for-the-badge&logoColor=white&logo=github" />](Guides/ChangingGPU.md)
|
|
||||||
|
|
||||||
### Sideload Guide:
|
- How to pass Play Integrity (formerly known as SafetyNet)?
|
||||||
[<img src="https://img.shields.io/badge/-How%20to%20Sideload%20apps-474154?style=for-the-badge&logoColor=white&logo=github" />](Guides/Sideloading.md)
|
|
||||||
|
|
||||||
### Moving WSA to another drive or partition:
|
Like all the other emulators, no way.
|
||||||
[<img src="https://img.shields.io/badge/-How%20to%20Move%20WSA%20to%20another%20drive%20or%20partition-474154?style=for-the-badge&logoColor=white&logo=github" />](Guides/MoveToExtDrive.md)
|
|
||||||
|
|
||||||
### LocalHost Loopback Guide:
|
- Virtualization is not enabled?
|
||||||
[<img src="https://img.shields.io/badge/-How%20to%20connect%20WSA%20to%20the%20localhost-474154?style=for-the-badge&logoColor=white&logo=github" />](Guides/LocalHostLoopback.md)
|
|
||||||
|
`Install.ps1` helps you enable it if not enabled. After rebooting, rerun `Install.ps1` to install WSA. If it's still not working, you have to enable virtualization in BIOS. That's a long story so ask Google for help.
|
||||||
|
|
||||||
|
- How to remount the system as read-write?
|
||||||
|
|
||||||
|
No way in WSA since it's mounted as read-only by Hyper-V. You can modify the system by making a Magisk module. Or directly modify the system.img. Ask Google for help.
|
||||||
|
|
||||||
|
- I cannot `adb connect localhost:58526`, what to do?
|
||||||
|
|
||||||
|
Make sure developer mode is enabled. If the issue persists, check the IP address of WSA on the setting page and try `adb connect ip:5555`.
|
||||||
|
|
||||||
|
- Why the Magisk online module is empty?
|
||||||
|
|
||||||
|
Magisk actively removes the online module repository. You can install the module locally or by `adb push module.zip /data/local/tmp` and `adb shell su -c magisk --install-module /data/local/tmp/module.zip`.
|
||||||
|
|
||||||
|
- Can I use Magisk v23.0 stable or a lower version?
|
||||||
|
|
||||||
|
No. Magisk has bugs preventing itself from running on WSA. Magisk v24+ has fixed them. So you must use Magisk v24 or later.
|
||||||
|
|
||||||
|
- How can I get rid of Magisk?
|
||||||
|
|
||||||
|
Choose `none` as the root solution.
|
||||||
|
|
||||||
|
- How to install custom GApps?
|
||||||
|
|
||||||
|
[Tutorial](Custom-GApps.md)
|
||||||
|
|
||||||
|
- Where can I download MindTheGapps?
|
||||||
|
|
||||||
|
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 ([Repository](https://gitlab.com/MindTheGapps/vendor_gapps)).
|
||||||
|
|
||||||
|
Or you can download the built package for 12.1 and 13 for x86_64 from [this page](https://sourceforge.net/projects/wsa-mtg/files/x86_64/).
|
||||||
|
|
||||||
|
- Is it possible to migrate data from a lower version like 2305 to a newer version?
|
||||||
|
|
||||||
|
This is certainly available, Microsoft's change of read-only partition from 2305's EROFS to read-only EXT4 only affects the read-only system partition.
|
||||||
|
|
||||||
|
It has no effect on the user data partition. Check the logs if there is a failure to boot.
|
||||||
|
|
||||||
|
- How to install KernelSU?
|
||||||
|
|
||||||
|
[Tutorial](KernelSU.md)
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
<details>
|
## Credits
|
||||||
<summary><picture><img style="float: right;" src="https://img.icons8.com/external-soft-fill-juicy-fish/96/null/external-bug-coding-and-development-soft-fill-soft-fill-juicy-fish-2.png" width="60" height="60"/></picture><h1> Having Issues?<h1></summary>
|
|
||||||
|
|
||||||
### Common Issues:
|
|
||||||
|
|
||||||
[<img src="https://img.shields.io/badge/-Fix%20Install.ps1%20Issue-%23EF2D5E?style=for-the-badge&logoColor=white&logo=Github" />](Fixes/FixInstallps1.md)
|
|
||||||
|
|
||||||
[<img src="https://img.shields.io/badge/-Fix%20Install.ps1%20Failed%20to%20update-%23EF2D5E?style=for-the-badge&logoColor=white&logo=Github" />](Fixes/nstallPs1FailedToUpdate.md)
|
|
||||||
|
|
||||||
[<img src="https://img.shields.io/badge/-Fix Virtualization and Virtual Machine Platform Error-%23EF2D5E?style=for-the-badge&logoColor=white&logo=github" />](Fixes/FixVirtError.md)
|
|
||||||
|
|
||||||
[<img src="https://img.shields.io/badge/-Fix%20Internet%20Issues-%23EF2D5E?style=for-the-badge&logoColor=white&logo=Github" />](Fixes/FixInternet.md)
|
|
||||||
|
|
||||||
[<img src="https://img.shields.io/badge/-Fix%20Error%200x80073CF0-%23EF2D5E?style=for-the-badge&logoColor=white&logo=Github" />](Fixes/Fix%20Error%200x80073CF0.md)
|
|
||||||
|
|
||||||
[<img src="https://img.shields.io/badge/-Fix%20Error%200x80073CFD-%23EF2D5E?style=for-the-badge&logoColor=white&logo=Github" />](Fixes/Fix%20Error%200x80073CFD.md)
|
|
||||||
|
|
||||||
[<img src="https://img.shields.io/badge/-Fix%20Error%200x80073CF6-%23EF2D5E?style=for-the-badge&logoColor=white&logo=Github" />](Fixes/Fix%20Error%200x80073CF6.md)
|
|
||||||
|
|
||||||
[<img src="https://img.shields.io/badge/-Fix%20Error%200x80073CF9-%23EF2D5E?style=for-the-badge&logoColor=white&logo=Github" />](Fixes/Fix%20Error%200x80073CF9.md)
|
|
||||||
|
|
||||||
[<img src="https://img.shields.io/badge/-Fix%20Error%200x80073D10-%23EF2D5E?style=for-the-badge&logoColor=white&logo=Github" />](Fixes/Fix%20Error%200x80073D10.md)
|
|
||||||
|
|
||||||
[<img src="https://img.shields.io/badge/-Fix%20Error%200x80073CFB-%23EF2D5E?style=for-the-badge&logoColor=white&logo=Github" />](Fixes/Fix%20Error%200x80073CFB.md)
|
|
||||||
|
|
||||||
[<img src="https://img.shields.io/badge/-Fix%20Path%20Too%20Long-%23EF2D5E?style=for-the-badge&logoColor=white&logo=Github" />](Fixes/FixPathTooLong.md)
|
|
||||||
|
|
||||||
[<img src="https://img.shields.io/badge/-Fix%20Missing%20Icons%20Issue-%23EF2D5E?style=for-the-badge&logoColor=white&logo=Github" />](Fixes/MissingIcons.md)
|
|
||||||
|
|
||||||
[<img src="https://img.shields.io/badge/-Fix%20Target%20Machine%20Actively%20Refused%20Connection-%23EF2D5E?style=for-the-badge&logoColor=white&logo=Github" />](Fixes/TargetMachineActivelyRefusedConnection.md)
|
|
||||||
|
|
||||||
[<img src="https://img.shields.io/badge/-Fix%20Target%20Machine%20Actively%20Refused%20Connection-%23EF2D5E?style=for-the-badge&logoColor=white&logo=Github" />](Fixes/TargetMachineActivelyRefusedConnection.md)
|
|
||||||
|
|
||||||
[<img src="https://img.shields.io/badge/-Fix%20Internet%20security%20settings%20blocked%20from%20opening-%23EF2D5E?style=for-the-badge&logoColor=white&logo=Github" />](Fixes/InternetSecuritySettingsBlock.md)
|
|
||||||
|
|
||||||
[<img src="https://img.shields.io/badge/-Cannot%20sign%20in%20to%20Google%20Account-%23EF2D5E?style=for-the-badge&logoColor=white&logo=Github" />](Fixes/Google%20Play%20Issues.md)
|
|
||||||
|
|
||||||
[<img src="https://img.shields.io/badge/-WSA%20Settings%20App%20Crashes%20%2B%20Android%20Apps%20Do%20Not%20Load%20After%20Installation-%23EF2D5E?style=for-the-badge&logoColor=white&logo=Github" />](Fixes/WSA%20Settings%20App%20Crashes%20%2B%20Android%20Apps%20Do%20Not%20Load%20After%20Installation.md
|
|
||||||
)
|
|
||||||
|
|
||||||
[<img src="https://img.shields.io/badge/-WSA Does Not Load After Install %2B No Splashscreen-%23EF2D5E?style=for-the-badge&logoColor=white&logo=Github" />](Fixes/WSA%20Does%20Not%20Load%20After%20Install%20%2B%20No%20Splashscreen.md)
|
|
||||||
|
|
||||||
[<img src="https://img.shields.io/badge/-Keyboard%20Is%20Not%20Working-%23EF2D5E?style=for-the-badge&logoColor=white&logo=Github" />](Fixes/Keyboard%20Is%20Not%20Working.md)
|
|
||||||
|
|
||||||
</details>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary><picture><img style="float: right;" src="https://img.icons8.com/external-flaticons-lineal-color-flat-icons/64/null/external-credits-movie-theater-flaticons-lineal-color-flat-icons.png" width="60" height="60"/></picture><h1> Credits<h1></summary>
|
|
||||||
|
|
||||||
- [Microsoft](https://apps.microsoft.com/store/detail/windows-subsystem-for-android%E2%84%A2-with-amazon-appstore/9P3395VX91NR): For providing Windows Subsystem For Android™ and related files. Windows Subsystem For Android™, Windows Subsystem For Android™ Logo, Windows™ 10 and Windows™ 11 Logos are trademarks of Microsoft Corporation. Microsoft Corporation reserves all rights to these trademarks. By downloading and installing Windows Subsystem For Android™, you agree to the [Terms and Conditions](https://support.microsoft.com/en-gb/windows/microsoft-software-license-terms-microsoft-windows-subsystem-for-android-cf8dfb03-ba62-4daa-b7f3-e2cb18f968ad) and [Privacy Policy](https://privacy.microsoft.com/en-gb/privacystatement)
|
|
||||||
- [Cinit and the WSAPatch Guide](https://github.com/cinit/WSAPatch): Many thanks for the comprehensive guide, files and support provided by Cinit and the contributers at the WSAPatch repository. Windows™ 10 Builds in this repo rely on the hard work of this project and hence credit is given where due
|
|
||||||
- [StoreLib](https://github.com/StoreDev/StoreLib): API for downloading WSA
|
- [StoreLib](https://github.com/StoreDev/StoreLib): API for downloading WSA
|
||||||
- [Magisk](https://github.com/topjohnwu/Magisk): The Magic Mask for Android
|
- [Magisk](https://github.com/topjohnwu/Magisk): The most famous root solution on Android
|
||||||
- [KernelSU](https://github.com/tiann/KernelSU): A Kernel based root solution for Android
|
- ~~[The Open GApps Project](https://opengapps.org): One of the most famous Google Apps packages solution~~
|
||||||
- [MagiskOnWSALocal](https://github.com/LSPosed/MagiskOnWSALocal): Integrate Magisk root and Google Apps into WSA
|
- [WSA-Kernel-SU](https://github.com/LSPosed/WSA-Kernel-SU) and [kernel-assisted-superuser](https://git.zx2c4.com/kernel-assisted-superuser/): The kernel `su` for debugging Magisk Integration
|
||||||
- [WSAOnWin10](https://github.com/A-JiuA/WSAOnWin10): Integrate Magisk root and Google Apps into WSA (Windows Subsystem for Android) and make it run on **Windows 10** with GitHub Actions
|
- ~~[WSAGAScript](https://github.com/ADeltaX/WSAGAScript): The first GApps integration script for WSA~~
|
||||||
|
- ~~[erofs-utils](https://github.com/sekaiacg/erofs-utils): Pre-build `erofs-utils` with erofsfuse enabled~~
|
||||||
|
|
||||||
***The repository is provided as a utility.***
|
_The repository is provided as a utility._
|
||||||
|
|
||||||
***Android is a trademark of Google LLC. Windows™ is a trademark of Microsoft LLC.***
|
_Android is a trademark of Google LLC. Windows is a trademark of Microsoft Corporation._
|
||||||
|
|
||||||
</details>
|
|
||||||
|
@ -18,7 +18,15 @@
|
|||||||
# Copyright (C) 2024 LSPosed Contributors
|
# Copyright (C) 2024 LSPosed Contributors
|
||||||
#
|
#
|
||||||
|
|
||||||
# shellcheck disable=SC2034
|
if [ ! "$BASH_VERSION" ]; then
|
||||||
|
echo "Please do not use sh to run this script, just execute it directly" 1>&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
HOST_ARCH=$(uname -m)
|
||||||
|
if [ "$HOST_ARCH" != "x86_64" ] && [ "$HOST_ARCH" != "aarch64" ]; then
|
||||||
|
echo "Unsupported architectures: $HOST_ARCH"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
cd "$(dirname "$0")" || exit 1
|
cd "$(dirname "$0")" || exit 1
|
||||||
# export TMPDIR=$HOME/.cache/wsa
|
# export TMPDIR=$HOME/.cache/wsa
|
||||||
if [ "$TMPDIR" ] && [ ! -d "$TMPDIR" ]; then
|
if [ "$TMPDIR" ] && [ ! -d "$TMPDIR" ]; then
|
||||||
@ -27,31 +35,73 @@ fi
|
|||||||
WORK_DIR=$(mktemp -d -t wsa-build-XXXXXXXXXX_) || exit 1
|
WORK_DIR=$(mktemp -d -t wsa-build-XXXXXXXXXX_) || exit 1
|
||||||
|
|
||||||
DOWNLOAD_DIR=../download
|
DOWNLOAD_DIR=../download
|
||||||
DOWNLOAD_WSA_CONF_NAME=wsa.list
|
|
||||||
DOWNLOAD_CONF_NAME=download.list
|
DOWNLOAD_CONF_NAME=download.list
|
||||||
PYTHON_VENV_DIR="$(dirname "$PWD")/python3-env"
|
PYTHON_VENV_DIR="$(dirname "$PWD")/python3-env"
|
||||||
|
|
||||||
|
dir_clean() {
|
||||||
|
rm -rf "${WORK_DIR:?}"
|
||||||
|
if [ "$TMPDIR" ] && [ -d "$TMPDIR" ]; then
|
||||||
|
echo "Cleanup Temp Directory"
|
||||||
|
rm -rf "${TMPDIR:?}"
|
||||||
|
unset TMPDIR
|
||||||
|
fi
|
||||||
|
rm -f "${DOWNLOAD_DIR:?}/$DOWNLOAD_CONF_NAME"
|
||||||
|
if [ "$(python3 -c 'import sys ; print( 1 if sys.prefix != sys.base_prefix else 0 )')" = "1" ]; then
|
||||||
|
echo "deactivate python3 venv"
|
||||||
|
deactivate
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
trap dir_clean EXIT
|
||||||
OUTPUT_DIR=../output
|
OUTPUT_DIR=../output
|
||||||
WSA_WORK_ENV="${WORK_DIR:?}/ENV"
|
WSA_WORK_ENV="${WORK_DIR:?}/ENV"
|
||||||
|
if [ -f "$WSA_WORK_ENV" ]; then rm -f "${WSA_WORK_ENV:?}"; fi
|
||||||
touch "$WSA_WORK_ENV"
|
touch "$WSA_WORK_ENV"
|
||||||
export WSA_WORK_ENV
|
export WSA_WORK_ENV
|
||||||
|
clean_download() {
|
||||||
|
if [ -d "$DOWNLOAD_DIR" ]; then
|
||||||
|
echo "Cleanup Download Directory"
|
||||||
|
if [ "$CLEAN_DOWNLOAD_WSA" ]; then
|
||||||
|
rm -f "${WSA_ZIP_PATH:?}"
|
||||||
|
fi
|
||||||
|
if [ "$CLEAN_DOWNLOAD_MAGISK" ]; then
|
||||||
|
rm -f "${MAGISK_PATH:?}"
|
||||||
|
fi
|
||||||
|
if [ "$CLEAN_DOWNLOAD_GAPPS" ]; then
|
||||||
|
rm -f "${GAPPS_IMAGE_PATH:?}"
|
||||||
|
rm -f "${GAPPS_RC_PATH:?}"
|
||||||
|
fi
|
||||||
|
if [ "$CLEAN_DOWNLOAD_KERNELSU" ]; then
|
||||||
|
rm -f "${KERNELSU_PATH:?}"
|
||||||
|
rm -f "${KERNELSU_INFO:?}"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
abort() {
|
abort() {
|
||||||
[ "$1" ] && echo -e "ERROR: $1"
|
[ "$1" ] && echo -e "ERROR: $1"
|
||||||
echo "Build: an error has occurred, exit"
|
echo "Build: an error has occurred, exit"
|
||||||
|
if [ -d "$WORK_DIR" ]; then
|
||||||
|
echo -e "\nCleanup Work Directory"
|
||||||
|
dir_clean
|
||||||
|
fi
|
||||||
|
clean_download
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
trap abort INT TERM
|
trap abort INT TERM
|
||||||
|
|
||||||
default() {
|
default() {
|
||||||
ARCH=x64
|
ARCH=x64
|
||||||
# CUSTOM_MODEL=redfin
|
|
||||||
RELEASE_TYPE=retail
|
RELEASE_TYPE=retail
|
||||||
MAGISK_BRANCH=topjohnwu
|
|
||||||
MAGISK_VER=stable
|
MAGISK_VER=stable
|
||||||
ROOT_SOL=magisk
|
ROOT_SOL=magisk
|
||||||
COMPRESS_FORMAT=none
|
COMPRESS_FORMAT=none
|
||||||
}
|
}
|
||||||
|
|
||||||
|
exit_with_message() {
|
||||||
|
echo "ERROR: $1"
|
||||||
|
usage
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
ARCH_MAP=(
|
ARCH_MAP=(
|
||||||
"x64"
|
"x64"
|
||||||
"arm64"
|
"arm64"
|
||||||
@ -62,13 +112,6 @@ RELEASE_TYPE_MAP=(
|
|||||||
"RP"
|
"RP"
|
||||||
"WIS"
|
"WIS"
|
||||||
"WIF"
|
"WIF"
|
||||||
"latest"
|
|
||||||
)
|
|
||||||
|
|
||||||
MAGISK_BRANCH_MAP=(
|
|
||||||
"topjohnwu"
|
|
||||||
"HuskyDG"
|
|
||||||
"vvb2060"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
MAGISK_VER_MAP=(
|
MAGISK_VER_MAP=(
|
||||||
@ -77,26 +120,8 @@ MAGISK_VER_MAP=(
|
|||||||
"canary"
|
"canary"
|
||||||
"debug"
|
"debug"
|
||||||
"release"
|
"release"
|
||||||
"delta"
|
|
||||||
"alpha"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# CUSTOM_MODEL_MAP=(
|
|
||||||
# "none"
|
|
||||||
# "sunfish"
|
|
||||||
# "bramble"
|
|
||||||
# "redfin"
|
|
||||||
# "barbet"
|
|
||||||
# "raven"
|
|
||||||
# "oriole"
|
|
||||||
# "bluejay"
|
|
||||||
# "panther"
|
|
||||||
# "cheetah"
|
|
||||||
# "lynx"
|
|
||||||
# "tangorpro"
|
|
||||||
# "felix"
|
|
||||||
# )
|
|
||||||
|
|
||||||
ROOT_SOL_MAP=(
|
ROOT_SOL_MAP=(
|
||||||
"magisk"
|
"magisk"
|
||||||
"kernelsu"
|
"kernelsu"
|
||||||
@ -109,15 +134,72 @@ COMPRESS_FORMAT_MAP=(
|
|||||||
"none"
|
"none"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
ARR_TO_STR() {
|
||||||
|
local arr=("$@")
|
||||||
|
local joined
|
||||||
|
printf -v joined "%s, " "${arr[@]}"
|
||||||
|
echo "${joined%, }"
|
||||||
|
}
|
||||||
|
|
||||||
|
usage() {
|
||||||
|
default
|
||||||
|
echo -e "
|
||||||
|
Usage:
|
||||||
|
--arch Architecture of WSA.
|
||||||
|
|
||||||
|
Possible values: $(ARR_TO_STR "${ARCH_MAP[@]}")
|
||||||
|
Default: $ARCH
|
||||||
|
|
||||||
|
--release-type Release type of WSA.
|
||||||
|
RP means Release Preview, WIS means Insider Slow, WIF means Insider Fast.
|
||||||
|
|
||||||
|
Possible values: $(ARR_TO_STR "${RELEASE_TYPE_MAP[@]}")
|
||||||
|
Default: $RELEASE_TYPE
|
||||||
|
|
||||||
|
--magisk-ver Magisk version.
|
||||||
|
|
||||||
|
Possible values: $(ARR_TO_STR "${MAGISK_VER_MAP[@]}")
|
||||||
|
Default: $MAGISK_VER
|
||||||
|
|
||||||
|
--root-sol Root solution.
|
||||||
|
\"none\" means no root.
|
||||||
|
|
||||||
|
Possible values: $(ARR_TO_STR "${ROOT_SOL_MAP[@]}")
|
||||||
|
Default: $ROOT_SOL
|
||||||
|
|
||||||
|
--compress-format Compress format of output file.
|
||||||
|
|
||||||
|
Possible values: $(ARR_TO_STR "${COMPRESS_FORMAT_MAP[@]}")
|
||||||
|
Default: $COMPRESS_FORMAT
|
||||||
|
|
||||||
|
Additional Options:
|
||||||
|
--offline Build WSA offline
|
||||||
|
--magisk-custom Install custom Magisk
|
||||||
|
--skip-download-wsa Skip download WSA
|
||||||
|
--help Show this help message and exit
|
||||||
|
|
||||||
|
Example:
|
||||||
|
./build.sh --release-type RP --magisk-ver beta
|
||||||
|
./build.sh --arch arm64 --release-type WIF
|
||||||
|
./build.sh --release-type WIS
|
||||||
|
./build.sh --offline --magisk-custom
|
||||||
|
./build.sh --release-type WIF --magisk-custom --magisk-ver release
|
||||||
|
"
|
||||||
|
}
|
||||||
|
|
||||||
ARGUMENT_LIST=(
|
ARGUMENT_LIST=(
|
||||||
"compress-format:"
|
"compress-format:"
|
||||||
"arch:"
|
"arch:"
|
||||||
"release-type:"
|
"release-type:"
|
||||||
"root-sol:"
|
"root-sol:"
|
||||||
"magisk-branch:"
|
|
||||||
"magisk-ver:"
|
"magisk-ver:"
|
||||||
|
"magisk-custom"
|
||||||
"install-gapps"
|
"install-gapps"
|
||||||
"remove-amazon"
|
"remove-amazon"
|
||||||
|
"offline"
|
||||||
|
"skip-download-wsa"
|
||||||
|
"help"
|
||||||
|
"debug"
|
||||||
)
|
)
|
||||||
|
|
||||||
default
|
default
|
||||||
@ -128,7 +210,7 @@ opts=$(
|
|||||||
--name "$(basename "$0")" \
|
--name "$(basename "$0")" \
|
||||||
--options "" \
|
--options "" \
|
||||||
-- "$@"
|
-- "$@"
|
||||||
) || abort "Failed to parse options, please check your input"
|
) || exit_with_message "Failed to parse options, please check your input"
|
||||||
|
|
||||||
eval set --"$opts"
|
eval set --"$opts"
|
||||||
while [[ $# -gt 0 ]]; do
|
while [[ $# -gt 0 ]]; do
|
||||||
@ -149,14 +231,14 @@ while [[ $# -gt 0 ]]; do
|
|||||||
ROOT_SOL="$2"
|
ROOT_SOL="$2"
|
||||||
shift 2
|
shift 2
|
||||||
;;
|
;;
|
||||||
--magisk-branch)
|
|
||||||
MAGISK_BRANCH="$2"
|
|
||||||
shift 2
|
|
||||||
;;
|
|
||||||
--magisk-ver)
|
--magisk-ver)
|
||||||
MAGISK_VER="$2"
|
MAGISK_VER="$2"
|
||||||
shift 2
|
shift 2
|
||||||
;;
|
;;
|
||||||
|
--magisk-custom)
|
||||||
|
CUSTOM_MAGISK=1
|
||||||
|
shift
|
||||||
|
;;
|
||||||
--install-gapps)
|
--install-gapps)
|
||||||
HAS_GAPPS=1
|
HAS_GAPPS=1
|
||||||
shift
|
shift
|
||||||
@ -165,6 +247,22 @@ while [[ $# -gt 0 ]]; do
|
|||||||
REMOVE_AMAZON=1
|
REMOVE_AMAZON=1
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
|
--offline)
|
||||||
|
OFFLINE=1
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
--skip-download-wsa)
|
||||||
|
SKIP_DOWN_WSA=1
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
--help)
|
||||||
|
usage
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
--debug)
|
||||||
|
DEBUG=1
|
||||||
|
shift
|
||||||
|
;;
|
||||||
--)
|
--)
|
||||||
shift
|
shift
|
||||||
break
|
break
|
||||||
@ -186,7 +284,7 @@ check_list() {
|
|||||||
fi
|
fi
|
||||||
((list_count--))
|
((list_count--))
|
||||||
if (("$list_count" <= 0)); then
|
if (("$list_count" <= 0)); then
|
||||||
abort "Invalid $name: $input"
|
exit_with_message "Invalid $name: $input"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
@ -194,18 +292,44 @@ check_list() {
|
|||||||
|
|
||||||
check_list "$ARCH" "Architecture" "${ARCH_MAP[@]}"
|
check_list "$ARCH" "Architecture" "${ARCH_MAP[@]}"
|
||||||
check_list "$RELEASE_TYPE" "Release Type" "${RELEASE_TYPE_MAP[@]}"
|
check_list "$RELEASE_TYPE" "Release Type" "${RELEASE_TYPE_MAP[@]}"
|
||||||
check_list "$MAGISK_BRANCH" "Magisk Branch" "${MAGISK_BRANCH_MAP[@]}"
|
|
||||||
check_list "$MAGISK_VER" "Magisk Version" "${MAGISK_VER_MAP[@]}"
|
check_list "$MAGISK_VER" "Magisk Version" "${MAGISK_VER_MAP[@]}"
|
||||||
check_list "$ROOT_SOL" "Root Solution" "${ROOT_SOL_MAP[@]}"
|
check_list "$ROOT_SOL" "Root Solution" "${ROOT_SOL_MAP[@]}"
|
||||||
# check_list "$CUSTOM_MODEL" "Custom Model" "${CUSTOM_MODEL_MAP[@]}"
|
|
||||||
check_list "$COMPRESS_FORMAT" "Compress Format" "${COMPRESS_FORMAT_MAP[@]}"
|
check_list "$COMPRESS_FORMAT" "Compress Format" "${COMPRESS_FORMAT_MAP[@]}"
|
||||||
|
|
||||||
|
if [ "$DEBUG" ]; then
|
||||||
|
set -x
|
||||||
|
fi
|
||||||
|
|
||||||
|
ROOT_SEL=""
|
||||||
|
|
||||||
|
if [ "$ROOT_SOL" = "none" ]; then
|
||||||
|
ROOT_SEL="none"
|
||||||
|
elif [ "$ROOT_SOL" = "magisk" ]; then
|
||||||
|
ROOT_SEL="magisk"
|
||||||
|
elif [ "$ROOT_SOL" = "kernelsu" ]; then
|
||||||
|
ROOT_SEL="kernelsu"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$HAS_GAPPS" ]; then
|
||||||
|
case "$ROOT_SOL" in
|
||||||
|
"none")
|
||||||
|
ROOT_SOL="magisk"
|
||||||
|
echo "WARN: Force install Magisk since GApps needs it to mount the file"
|
||||||
|
;;
|
||||||
|
"kernelsu")
|
||||||
|
abort "Unsupported combination: Install GApps and KernelSU"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
# shellcheck disable=SC1091
|
# shellcheck disable=SC1091
|
||||||
[ -f "$PYTHON_VENV_DIR/bin/activate" ] && {
|
[ -f "$PYTHON_VENV_DIR/bin/activate" ] && {
|
||||||
source "$PYTHON_VENV_DIR/bin/activate" || abort "Failed to activate virtual environment"
|
source "$PYTHON_VENV_DIR/bin/activate" || abort "Failed to activate virtual environment, please re-run install_deps.sh"
|
||||||
}
|
}
|
||||||
declare -A RELEASE_NAME_MAP=(["retail"]="Retail" ["latest"]="Insider Private" ["RP"]="Release Preview" ["WIS"]="Insider Slow" ["WIF"]="Insider Fast")
|
declare -A RELEASE_NAME_MAP=(["retail"]="Retail" ["RP"]="Release Preview" ["WIS"]="Insider Slow" ["WIF"]="Insider Fast")
|
||||||
declare -A ANDROID_API_MAP=(["33"]="13.0" ["34"]="14.0")
|
declare -A ANDROID_API_MAP=(["30"]="11.0" ["32"]="12.1" ["33"]="13.0")
|
||||||
declare -A ARCH_NAME_MAP=(["x64"]="x86_64" ["arm64"]="arm64")
|
declare -A ARCH_NAME_MAP=(["x64"]="x86_64" ["arm64"]="arm64")
|
||||||
RELEASE_NAME=${RELEASE_NAME_MAP[$RELEASE_TYPE]} || abort
|
RELEASE_NAME=${RELEASE_NAME_MAP[$RELEASE_TYPE]} || abort
|
||||||
echo -e "INFO: Release Name: $RELEASE_NAME\n"
|
echo -e "INFO: Release Name: $RELEASE_NAME\n"
|
||||||
@ -216,6 +340,17 @@ xaml_PATH="$DOWNLOAD_DIR/Microsoft.UI.Xaml.2.8_$ARCH.appx"
|
|||||||
MAGISK_ZIP=magisk-$MAGISK_VER.zip
|
MAGISK_ZIP=magisk-$MAGISK_VER.zip
|
||||||
MAGISK_PATH=$DOWNLOAD_DIR/$MAGISK_ZIP
|
MAGISK_PATH=$DOWNLOAD_DIR/$MAGISK_ZIP
|
||||||
CUST_PATH="$DOWNLOAD_DIR/cust.img"
|
CUST_PATH="$DOWNLOAD_DIR/cust.img"
|
||||||
|
if [ "$CUSTOM_MAGISK" ]; then
|
||||||
|
if [ ! -f "$MAGISK_PATH" ]; then
|
||||||
|
echo "Custom Magisk $MAGISK_ZIP not found"
|
||||||
|
MAGISK_ZIP=app-$MAGISK_VER.apk
|
||||||
|
echo -e "Fallback to $MAGISK_ZIP\n"
|
||||||
|
MAGISK_PATH=$DOWNLOAD_DIR/$MAGISK_ZIP
|
||||||
|
if [ ! -f "$MAGISK_PATH" ]; then
|
||||||
|
abort "Custom Magisk $MAGISK_ZIP not found\nPlease put custom Magisk in $DOWNLOAD_DIR"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
ANDROID_API=33
|
ANDROID_API=33
|
||||||
update_gapps_files_name() {
|
update_gapps_files_name() {
|
||||||
GAPPS_IMAGE_NAME=gapps-${ANDROID_API_MAP[$ANDROID_API]}-${ARCH_NAME_MAP[$ARCH]}.img
|
GAPPS_IMAGE_NAME=gapps-${ANDROID_API_MAP[$ANDROID_API]}-${ARCH_NAME_MAP[$ARCH]}.img
|
||||||
@ -250,33 +385,30 @@ update_ksu_zip_name() {
|
|||||||
fi
|
fi
|
||||||
KERNELSU_ZIP_NAME=kernelsu-$ARCH-$KERNEL_VER.zip
|
KERNELSU_ZIP_NAME=kernelsu-$ARCH-$KERNEL_VER.zip
|
||||||
KERNELSU_PATH=$DOWNLOAD_DIR/$KERNELSU_ZIP_NAME
|
KERNELSU_PATH=$DOWNLOAD_DIR/$KERNELSU_ZIP_NAME
|
||||||
KERNELSU_APK_PATH=$DOWNLOAD_DIR/KernelSU.apk
|
|
||||||
KERNELSU_INFO="$KERNELSU_PATH.info"
|
KERNELSU_INFO="$KERNELSU_PATH.info"
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "Generating WSA Download Links"
|
if [ -z ${OFFLINE+x} ]; then
|
||||||
python3 generateWSALinks.py "$ARCH" "$RELEASE_TYPE" "$DOWNLOAD_DIR" "$DOWNLOAD_WSA_CONF_NAME" || abort
|
echo "Generating WSA Download Links"
|
||||||
|
if [ -z ${SKIP_DOWN_WSA+x} ]; then
|
||||||
if [ "$RELEASE_TYPE" == "latest" ]; then
|
python3 generateWSALinks.py "$ARCH" "$RELEASE_TYPE" "$DOWNLOAD_DIR" "$DOWNLOAD_CONF_NAME" || abort
|
||||||
printf "%s\n" "$(curl -sL https://api.github.com/repos/bubbles-wow/WSA-Archive/releases/latest | jq -r '.assets[] | .browser_download_url')" >> "$DOWNLOAD_DIR/$DOWNLOAD_WSA_CONF_NAME" || abort
|
echo "Downloading WSA"
|
||||||
printf " dir=%s\n" "$DOWNLOAD_DIR" >> "$DOWNLOAD_DIR/$DOWNLOAD_WSA_CONF_NAME" || abort
|
else
|
||||||
printf " out=wsa-latest.zip\n" >> "$DOWNLOAD_DIR/$DOWNLOAD_WSA_CONF_NAME" || abort
|
python3 generateWSALinks.py "$ARCH" "$RELEASE_TYPE" "$DOWNLOAD_DIR" "$DOWNLOAD_CONF_NAME" "$SKIP_DOWN_WSA" || abort
|
||||||
WSA_VER=$(curl -sL https://api.github.com/repos/bubbles-wow/WSA-Archive/releases/latest | jq -r '.tag_name')
|
echo "Skip download WSA, downloading WSA depends"
|
||||||
WSA_MAJOR_VER=${WSA_VER:0:4}
|
fi
|
||||||
else
|
if ! aria2c --no-conf --log-level=info --log="$DOWNLOAD_DIR/aria2_download.log" -x16 -s16 -j5 -c -R -m0 \
|
||||||
# shellcheck disable=SC1090
|
--async-dns=false --check-integrity=true --continue=true --allow-overwrite=true --conditional-get=true \
|
||||||
source "$WSA_WORK_ENV" || abort
|
-d"$DOWNLOAD_DIR" -i"$DOWNLOAD_DIR/$DOWNLOAD_CONF_NAME"; then
|
||||||
fi
|
abort "We have encountered an error while downloading files."
|
||||||
|
fi
|
||||||
if ! aria2c --no-conf --log-level=info --log="$DOWNLOAD_DIR/aria2_download.log" -x16 -s16 -j7 -m0 \
|
rm -f "${DOWNLOAD_DIR:?}/$DOWNLOAD_CONF_NAME"
|
||||||
--async-dns=false --check-integrity=true \
|
|
||||||
-d"$DOWNLOAD_DIR" -i"$DOWNLOAD_DIR/$DOWNLOAD_WSA_CONF_NAME"; then
|
|
||||||
abort "We have encountered an error while downloading files."
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Extracting WSA"
|
echo "Extracting WSA"
|
||||||
if [ -f "$WSA_ZIP_PATH" ]; then
|
if [ -f "$WSA_ZIP_PATH" ]; then
|
||||||
if ! python3 extractWSA.py "$ARCH" "$WSA_ZIP_PATH" "$WORK_DIR" "$WSA_WORK_ENV"; then
|
if ! python3 extractWSA.py "$ARCH" "$WSA_ZIP_PATH" "$WORK_DIR" "$WSA_WORK_ENV"; then
|
||||||
|
CLEAN_DOWNLOAD_WSA=1
|
||||||
abort "Unzip WSA failed"
|
abort "Unzip WSA failed"
|
||||||
fi
|
fi
|
||||||
echo -e "done\n"
|
echo -e "done\n"
|
||||||
@ -285,35 +417,39 @@ if [ -f "$WSA_ZIP_PATH" ]; then
|
|||||||
else
|
else
|
||||||
abort "The WSA zip package does not exist"
|
abort "The WSA zip package does not exist"
|
||||||
fi
|
fi
|
||||||
|
if [[ "$WSA_MAJOR_VER" -lt 2211 ]]; then
|
||||||
echo "Generating Download Links"
|
ANDROID_API=32
|
||||||
if [ "$HAS_GAPPS" ] || [ "$ROOT_SOL" = "magisk" ]; then
|
|
||||||
python3 generateMagiskLink.py "$MAGISK_BRANCH" "$MAGISK_VER" "$DOWNLOAD_DIR" "$DOWNLOAD_CONF_NAME" || abort
|
|
||||||
fi
|
fi
|
||||||
|
if [ -z ${OFFLINE+x} ]; then
|
||||||
if [ "$ROOT_SOL" = "kernelsu" ]; then
|
echo "Generating Download Links"
|
||||||
update_ksu_zip_name
|
if [ "$ROOT_SOL" = "magisk" ]; then
|
||||||
python3 generateKernelSULink.py "$ARCH" "$DOWNLOAD_DIR" "$DOWNLOAD_CONF_NAME" "$KERNEL_VER" "$KERNELSU_ZIP_NAME" || abort
|
if [ -z ${CUSTOM_MAGISK+x} ]; then
|
||||||
# shellcheck disable=SC1090
|
python3 generateMagiskLink.py "$MAGISK_VER" "$DOWNLOAD_DIR" "$DOWNLOAD_CONF_NAME" || abort
|
||||||
source "$WSA_WORK_ENV" || abort
|
fi
|
||||||
# shellcheck disable=SC2153
|
fi
|
||||||
echo "KERNELSU_VER=$KERNELSU_VER" >"$KERNELSU_INFO"
|
if [ "$ROOT_SOL" = "kernelsu" ]; then
|
||||||
fi
|
update_ksu_zip_name
|
||||||
if [ "$HAS_GAPPS" ]; then
|
python3 generateKernelSULink.py "$ARCH" "$DOWNLOAD_DIR" "$DOWNLOAD_CONF_NAME" "$KERNEL_VER" "$KERNELSU_ZIP_NAME" || abort
|
||||||
update_gapps_files_name
|
# shellcheck disable=SC1090
|
||||||
python3 generateGappsLink.py "$ARCH" "$DOWNLOAD_DIR" "$DOWNLOAD_CONF_NAME" "$ANDROID_API" "$GAPPS_IMAGE_NAME" || abort
|
source "$WSA_WORK_ENV" || abort
|
||||||
fi
|
# shellcheck disable=SC2153
|
||||||
if [ -f "$DOWNLOAD_DIR/$DOWNLOAD_CONF_NAME" ]; then
|
echo "KERNELSU_VER=$KERNELSU_VER" >"$KERNELSU_INFO"
|
||||||
echo "Downloading Artifacts"
|
fi
|
||||||
if ! aria2c --no-conf --log-level=info --log="$DOWNLOAD_DIR/aria2_download.log" -x16 -s16 -j7 -m0 \
|
if [ "$HAS_GAPPS" ]; then
|
||||||
--async-dns=false --check-integrity=true \
|
update_gapps_files_name
|
||||||
-d"$DOWNLOAD_DIR" -i"$DOWNLOAD_DIR/$DOWNLOAD_CONF_NAME"; then
|
python3 generateGappsLink.py "$ARCH" "$DOWNLOAD_DIR" "$DOWNLOAD_CONF_NAME" "$ANDROID_API" "$GAPPS_IMAGE_NAME" || abort
|
||||||
abort "We have encountered an error while downloading files."
|
fi
|
||||||
|
if [ -f "$DOWNLOAD_DIR/$DOWNLOAD_CONF_NAME" ]; then
|
||||||
|
echo "Downloading Artifacts"
|
||||||
|
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
|
||||||
|
abort "We have encountered an error while downloading files."
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
declare -A FILES_CHECK_LIST=([xaml_PATH]="$xaml_PATH" [vclibs_PATH]="$vclibs_PATH" [UWPVCLibs_PATH]="$UWPVCLibs_PATH")
|
declare -A FILES_CHECK_LIST=([xaml_PATH]="$xaml_PATH" [vclibs_PATH]="$vclibs_PATH" [UWPVCLibs_PATH]="$UWPVCLibs_PATH")
|
||||||
if [ "$HAS_GAPPS" ] || [ "$ROOT_SOL" = "magisk" ]; then
|
if [ "$ROOT_SOL" = "magisk" ]; then
|
||||||
FILES_CHECK_LIST+=(["MAGISK_PATH"]="$MAGISK_PATH" ["CUST_PATH"]="$CUST_PATH")
|
FILES_CHECK_LIST+=(["MAGISK_PATH"]="$MAGISK_PATH" ["CUST_PATH"]="$CUST_PATH")
|
||||||
fi
|
fi
|
||||||
if [ "$ROOT_SOL" = "kernelsu" ]; then
|
if [ "$ROOT_SOL" = "kernelsu" ]; then
|
||||||
@ -333,27 +469,46 @@ done
|
|||||||
if [ "$FILE_MISSING" ]; then
|
if [ "$FILE_MISSING" ]; then
|
||||||
abort "Some files are missing"
|
abort "Some files are missing"
|
||||||
fi
|
fi
|
||||||
if [ "$HAS_GAPPS" ] || [ "$ROOT_SOL" = "magisk" ]; then
|
if [ "$ROOT_SOL" = "magisk" ]; then
|
||||||
echo "Extracting Magisk"
|
echo "Extracting Magisk"
|
||||||
if [ -f "$MAGISK_PATH" ]; then
|
if [ -f "$MAGISK_PATH" ]; then
|
||||||
MAGISK_VERSION_NAME=""
|
MAGISK_VERSION_NAME=""
|
||||||
MAGISK_VERSION_CODE=0
|
MAGISK_VERSION_CODE=0
|
||||||
if ! python3 extractMagisk.py "$ARCH" "$MAGISK_PATH" "$WORK_DIR"; then
|
if ! python3 extractMagisk.py "$ARCH" "$MAGISK_PATH" "$WORK_DIR"; then
|
||||||
|
CLEAN_DOWNLOAD_MAGISK=1
|
||||||
abort "Unzip Magisk failed, is the download incomplete?"
|
abort "Unzip Magisk failed, is the download incomplete?"
|
||||||
fi
|
fi
|
||||||
# shellcheck disable=SC1090
|
# shellcheck disable=SC1090
|
||||||
source "$WSA_WORK_ENV" || abort
|
source "$WSA_WORK_ENV" || abort
|
||||||
|
if [ "$MAGISK_VERSION_CODE" -lt 26000 ] && [ "$MAGISK_VER" != "stable" ] && [ -z ${CUSTOM_MAGISK+x} ]; then
|
||||||
|
abort "Please install Magisk 26.0+"
|
||||||
|
fi
|
||||||
chmod +x "$WORK_DIR/magisk/magiskboot" || abort
|
chmod +x "$WORK_DIR/magisk/magiskboot" || abort
|
||||||
|
elif [ -z "${CUSTOM_MAGISK+x}" ]; then
|
||||||
|
abort "The Magisk zip package does not exist, is the download incomplete?"
|
||||||
else
|
else
|
||||||
abort "The Magisk zip package does not exist, rename it to magisk-debug.zip and put it in the download folder."
|
abort "The Magisk zip package does not exist, rename it to magisk-debug.zip and put it in the download folder."
|
||||||
fi
|
fi
|
||||||
echo -e "done\n"
|
echo -e "done\n"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$HAS_GAPPS" ] || [ "$ROOT_SOL" = "magisk" ]; then
|
if [ "$ROOT_SOL" = "magisk" ]; then
|
||||||
echo "Integrating Magisk"
|
echo "Integrating Magisk"
|
||||||
"$WORK_DIR/magisk/magiskboot" compress=xz "$WORK_DIR/magisk/magisk64" "$WORK_DIR/magisk/magisk64.xz"
|
SKIP="#"
|
||||||
"$WORK_DIR/magisk/magiskboot" compress=xz "$WORK_DIR/magisk/magisk32" "$WORK_DIR/magisk/magisk32.xz"
|
SINGLEABI="#"
|
||||||
|
SKIPINITLD="#"
|
||||||
|
if [ -f "$WORK_DIR/magisk/magisk64" ]; then
|
||||||
|
"$WORK_DIR/magisk/magiskboot" compress=xz "$WORK_DIR/magisk/magisk64" "$WORK_DIR/magisk/magisk64.xz"
|
||||||
|
"$WORK_DIR/magisk/magiskboot" compress=xz "$WORK_DIR/magisk/magisk32" "$WORK_DIR/magisk/magisk32.xz"
|
||||||
|
unset SINGLEABI
|
||||||
|
else
|
||||||
|
"$WORK_DIR/magisk/magiskboot" compress=xz "$WORK_DIR/magisk/magisk" "$WORK_DIR/magisk/magisk.xz"
|
||||||
|
unset SKIP
|
||||||
|
fi
|
||||||
|
if [ -f "$WORK_DIR/magisk/init-ld" ]; then
|
||||||
|
"$WORK_DIR/magisk/magiskboot" compress=xz "$WORK_DIR/magisk/init-ld" "$WORK_DIR/magisk/init-ld.xz"
|
||||||
|
unset SKIPINITLD
|
||||||
|
fi
|
||||||
"$WORK_DIR/magisk/magiskboot" compress=xz "$MAGISK_PATH" "$WORK_DIR/magisk/stub.xz"
|
"$WORK_DIR/magisk/magiskboot" compress=xz "$MAGISK_PATH" "$WORK_DIR/magisk/stub.xz"
|
||||||
"$WORK_DIR/magisk/magiskboot" cpio "$WORK_DIR/wsa/$ARCH/Tools/initrd.img" \
|
"$WORK_DIR/magisk/magiskboot" cpio "$WORK_DIR/wsa/$ARCH/Tools/initrd.img" \
|
||||||
"mv /init /wsainit" \
|
"mv /init /wsainit" \
|
||||||
@ -362,8 +517,10 @@ if [ "$HAS_GAPPS" ] || [ "$ROOT_SOL" = "magisk" ]; then
|
|||||||
"add 0750 /magiskinit $WORK_DIR/magisk/magiskinit" \
|
"add 0750 /magiskinit $WORK_DIR/magisk/magiskinit" \
|
||||||
"mkdir 0750 overlay.d" \
|
"mkdir 0750 overlay.d" \
|
||||||
"mkdir 0750 overlay.d/sbin" \
|
"mkdir 0750 overlay.d/sbin" \
|
||||||
"add 0644 overlay.d/sbin/magisk64.xz $WORK_DIR/magisk/magisk64.xz" \
|
"$SINGLEABI add 0644 overlay.d/sbin/magisk64.xz $WORK_DIR/magisk/magisk64.xz" \
|
||||||
"add 0644 overlay.d/sbin/magisk32.xz $WORK_DIR/magisk/magisk32.xz" \
|
"$SINGLEABI add 0644 overlay.d/sbin/magisk32.xz $WORK_DIR/magisk/magisk32.xz" \
|
||||||
|
"$SKIP add 0644 overlay.d/sbin/magisk.xz $WORK_DIR/magisk/magisk.xz" \
|
||||||
|
"$SKIPINITLD add 0644 overlay.d/sbin/init-ld.xz $WORK_DIR/magisk/init-ld.xz" \
|
||||||
"add 0644 overlay.d/sbin/stub.xz $WORK_DIR/magisk/stub.xz" \
|
"add 0644 overlay.d/sbin/stub.xz $WORK_DIR/magisk/stub.xz" \
|
||||||
"mkdir 000 .backup" \
|
"mkdir 000 .backup" \
|
||||||
"add 000 overlay.d/init.lsp.magisk.rc init.lsp.magisk.rc" \
|
"add 000 overlay.d/init.lsp.magisk.rc init.lsp.magisk.rc" \
|
||||||
@ -377,6 +534,7 @@ elif [ "$ROOT_SOL" = "kernelsu" ]; then
|
|||||||
echo "WSA Kernel Version: $KERNEL_VER"
|
echo "WSA Kernel Version: $KERNEL_VER"
|
||||||
echo "KernelSU Version: $KERNELSU_VER"
|
echo "KernelSU Version: $KERNELSU_VER"
|
||||||
if ! unzip "$KERNELSU_PATH" -d "$WORK_DIR/kernelsu"; then
|
if ! unzip "$KERNELSU_PATH" -d "$WORK_DIR/kernelsu"; then
|
||||||
|
CLEAN_DOWNLOAD_KERNELSU=1
|
||||||
abort "Unzip KernelSU failed, package is corrupted?"
|
abort "Unzip KernelSU failed, package is corrupted?"
|
||||||
fi
|
fi
|
||||||
if [ "$ARCH" = "x64" ]; then
|
if [ "$ARCH" = "x64" ]; then
|
||||||
@ -394,7 +552,6 @@ if [ "$HAS_GAPPS" ]; then
|
|||||||
if [ -f "$GAPPS_IMAGE_PATH" ] && [ -f "$GAPPS_RC_PATH" ]; then
|
if [ -f "$GAPPS_IMAGE_PATH" ] && [ -f "$GAPPS_RC_PATH" ]; then
|
||||||
echo "Integrating GApps"
|
echo "Integrating GApps"
|
||||||
"$WORK_DIR/magisk/magiskboot" cpio "$WORK_DIR/wsa/$ARCH/Tools/initrd.img" \
|
"$WORK_DIR/magisk/magiskboot" cpio "$WORK_DIR/wsa/$ARCH/Tools/initrd.img" \
|
||||||
"add 000 /lspolicy.rule sepolicy.rule" \
|
|
||||||
"add 000 overlay.d/gapps.rc $GAPPS_RC_PATH" \
|
"add 000 overlay.d/gapps.rc $GAPPS_RC_PATH" \
|
||||||
"add 000 overlay.d/sbin/lsp_gapps.img $GAPPS_IMAGE_PATH" \
|
"add 000 overlay.d/sbin/lsp_gapps.img $GAPPS_IMAGE_PATH" \
|
||||||
|| abort "Unable to patch initrd"
|
|| abort "Unable to patch initrd"
|
||||||
@ -414,35 +571,34 @@ cp "$vclibs_PATH" "$xaml_PATH" "$WORK_DIR/wsa/$ARCH" || abort
|
|||||||
cp "$UWPVCLibs_PATH" "$xaml_PATH" "$WORK_DIR/wsa/$ARCH" || abort
|
cp "$UWPVCLibs_PATH" "$xaml_PATH" "$WORK_DIR/wsa/$ARCH" || abort
|
||||||
cp "../bin/$ARCH/makepri.exe" "$WORK_DIR/wsa/$ARCH" || abort
|
cp "../bin/$ARCH/makepri.exe" "$WORK_DIR/wsa/$ARCH" || abort
|
||||||
cp "../xml/priconfig.xml" "$WORK_DIR/wsa/$ARCH/xml/" || abort
|
cp "../xml/priconfig.xml" "$WORK_DIR/wsa/$ARCH/xml/" || abort
|
||||||
cp "../installer/$ARCH/MakePri.ps1" "$WORK_DIR/wsa/$ARCH" || abort
|
cp ../installer/MakePri.ps1 "$WORK_DIR/wsa/$ARCH" || abort
|
||||||
cp "../installer/$ARCH/Install.ps1" "$WORK_DIR/wsa/$ARCH" || abort
|
cp ../installer/Install.ps1 "$WORK_DIR/wsa/$ARCH" || abort
|
||||||
cp "../installer/Run.bat" "$WORK_DIR/wsa/$ARCH" || abort
|
cp ../installer/Run.bat "$WORK_DIR/wsa/$ARCH" || abort
|
||||||
find "$WORK_DIR/wsa/$ARCH" -maxdepth 1 -mindepth 1 -printf "%P\n" >"$WORK_DIR/wsa/$ARCH/filelist.txt" || abort
|
find "$WORK_DIR/wsa/$ARCH" -maxdepth 1 -mindepth 1 -printf "%P\n" >"$WORK_DIR/wsa/$ARCH/filelist.txt" || abort
|
||||||
echo -e "done\n"
|
echo -e "done\n"
|
||||||
|
|
||||||
if [[ "$ROOT_SOL" = "none" ]]; then
|
if [[ "$ROOT_SEL" = "none" ]]; then
|
||||||
name1=""
|
name1=""
|
||||||
elif [ "$ROOT_SOL" = "magisk" ]; then
|
elif [ "$ROOT_SEL" = "magisk" ]; then
|
||||||
name1="-with-magisk-$MAGISK_VERSION_NAME($MAGISK_VERSION_CODE)-$MAGISK_VER"
|
name1="-with-magisk-$MAGISK_VERSION_NAME($MAGISK_VERSION_CODE)-$MAGISK_VER"
|
||||||
elif [ "$ROOT_SOL" = "kernelsu" ]; then
|
elif [ "$ROOT_SEL" = "kernelsu" ]; then
|
||||||
name1="-with-$ROOT_SOL-$KERNELSU_VER"
|
name1="-with-$ROOT_SEL-$KERNELSU_VER"
|
||||||
fi
|
fi
|
||||||
if [ -z "$HAS_GAPPS" ]; then
|
if [ -z "$HAS_GAPPS" ]; then
|
||||||
name2="-NoGApps"
|
name2="-NoGApps"
|
||||||
else
|
else
|
||||||
name2=-GApps-${ANDROID_API_MAP[$ANDROID_API]}
|
name2=-GApps-${ANDROID_API_MAP[$ANDROID_API]}
|
||||||
fi
|
fi
|
||||||
#if [[ "$MODEL_NAME" != "default" ]]; then
|
|
||||||
# name3="-as-$MODEL_NAME"
|
|
||||||
#fi
|
|
||||||
artifact_name=WSA_${WSA_VER}_${ARCH}_${WSA_REL}${name1}${name2}
|
artifact_name=WSA_${WSA_VER}_${ARCH}_${WSA_REL}${name1}${name2}
|
||||||
#${name3}
|
|
||||||
short_artifact_name=WSA_${WSA_VER}_${ARCH}
|
|
||||||
[ "$REMOVE_AMAZON" ] && artifact_name+=-NoAmazon
|
[ "$REMOVE_AMAZON" ] && artifact_name+=-NoAmazon
|
||||||
|
|
||||||
|
short_artifact_name=WSA_${WSA_VER}_${ARCH}
|
||||||
|
|
||||||
if [ ! -d "$OUTPUT_DIR" ]; then
|
if [ ! -d "$OUTPUT_DIR" ]; then
|
||||||
mkdir -p "$OUTPUT_DIR"
|
mkdir -p "$OUTPUT_DIR"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
OUTPUT_PATH="${OUTPUT_DIR:?}/$short_artifact_name"
|
OUTPUT_PATH="${OUTPUT_DIR:?}/$short_artifact_name"
|
||||||
mv "$WORK_DIR/wsa/$ARCH" "$OUTPUT_PATH"
|
mv "$WORK_DIR/wsa/$ARCH" "$OUTPUT_PATH"
|
||||||
{
|
{
|
||||||
|
@ -52,6 +52,7 @@ workdir.mkdir(parents=True, exist_ok=True)
|
|||||||
|
|
||||||
abi_map = {"x64": ["x86_64", "x86"], "arm64": ["arm64-v8a", "armeabi-v7a"]}
|
abi_map = {"x64": ["x86_64", "x86"], "arm64": ["arm64-v8a", "armeabi-v7a"]}
|
||||||
|
|
||||||
|
|
||||||
def extract_as(zip, name, as_name, dir):
|
def extract_as(zip, name, as_name, dir):
|
||||||
info = zip.getinfo(name)
|
info = zip.getinfo(name)
|
||||||
info.filename = as_name
|
info.filename = as_name
|
||||||
@ -60,6 +61,7 @@ def extract_as(zip, name, as_name, dir):
|
|||||||
|
|
||||||
with zipfile.ZipFile(magisk_zip) as zip:
|
with zipfile.ZipFile(magisk_zip) as zip:
|
||||||
props = Prop(zip.comment.decode().replace('\000', '\n'))
|
props = Prop(zip.comment.decode().replace('\000', '\n'))
|
||||||
|
namelist = zip.namelist()
|
||||||
versionName = props.get("version")
|
versionName = props.get("version")
|
||||||
versionCode = props.get("versionCode")
|
versionCode = props.get("versionCode")
|
||||||
print(f"Magisk version: {versionName} ({versionCode})", flush=True)
|
print(f"Magisk version: {versionName} ({versionCode})", flush=True)
|
||||||
@ -70,11 +72,12 @@ with zipfile.ZipFile(magisk_zip) as zip:
|
|||||||
env.MAGISK_VERSION_CODE = versionCode
|
env.MAGISK_VERSION_CODE = versionCode
|
||||||
with open(os.environ['WSA_WORK_ENV'], 'w') as environ_file:
|
with open(os.environ['WSA_WORK_ENV'], 'w') as environ_file:
|
||||||
environ_file.write(str(env))
|
environ_file.write(str(env))
|
||||||
try:
|
if f"lib/{ abi_map[arch][0] }/libmagisk64.so" in namelist:
|
||||||
extract_as(zip, f"lib/{ abi_map[arch][0] }/libmagisk64.so", "magisk64", "magisk")
|
extract_as(zip, f"lib/{ abi_map[arch][0] }/libmagisk64.so", "magisk64", "magisk")
|
||||||
extract_as(zip, f"lib/{ abi_map[arch][1] }/libmagisk32.so", "magisk32", "magisk")
|
extract_as(zip, f"lib/{ abi_map[arch][1] }/libmagisk32.so", "magisk32", "magisk")
|
||||||
except:
|
else:
|
||||||
extract_as(zip, f"lib/{ abi_map[arch][0] }/libmagisk.so", "magisk64", "magisk")
|
extract_as(zip, f"lib/{ abi_map[arch][0] }/libmagisk.so", "magisk", "magisk")
|
||||||
extract_as(zip, f"lib/{ abi_map[arch][1] }/libmagisk.so", "magisk32", "magisk")
|
if f"lib/{ abi_map[arch][0] }/libinit-ld.so" in namelist:
|
||||||
|
extract_as(zip, f"lib/{ abi_map[arch][0] }/libinit-ld.so", "init-ld", "magisk")
|
||||||
extract_as(zip, f"lib/{ abi_map[arch][0] }/libmagiskinit.so", "magiskinit", "magisk")
|
extract_as(zip, f"lib/{ abi_map[arch][0] }/libmagiskinit.so", "magiskinit", "magisk")
|
||||||
extract_as(zip, f"lib/{ abi_map[host_abi][0] }/libmagiskboot.so", "magiskboot", "magisk")
|
extract_as(zip, f"lib/{ abi_map[host_abi][0] }/libmagiskboot.so", "magiskboot", "magisk")
|
||||||
|
@ -86,11 +86,14 @@ with zipfile.ZipFile(wsa_zip_path) as zip:
|
|||||||
wsa_zip.extractall(archdir)
|
wsa_zip.extractall(archdir)
|
||||||
ver_no = zip_name.split("_")
|
ver_no = zip_name.split("_")
|
||||||
long_ver = ver_no[1]
|
long_ver = ver_no[1]
|
||||||
|
ver = long_ver.split(".")
|
||||||
|
major_ver = ver[0]
|
||||||
rel = ver_no[3].split(".")
|
rel = ver_no[3].split(".")
|
||||||
rel_long = str(rel[0])
|
rel_long = str(rel[0])
|
||||||
with open(env_file, 'r') as environ_file:
|
with open(env_file, 'r') as environ_file:
|
||||||
env = Prop(environ_file.read())
|
env = Prop(environ_file.read())
|
||||||
env.WSA_VER = long_ver
|
env.WSA_VER = long_ver
|
||||||
|
env.WSA_MAJOR_VER = major_ver
|
||||||
env.WSA_REL = rel_long
|
env.WSA_REL = rel_long
|
||||||
with open(env_file, 'w') as environ_file:
|
with open(env_file, 'w') as environ_file:
|
||||||
environ_file.write(str(env))
|
environ_file.write(str(env))
|
||||||
@ -105,5 +108,5 @@ with zipfile.ZipFile(wsa_zip_path) as zip:
|
|||||||
elif g.filename == 'AppxManifest.xml':
|
elif g.filename == 'AppxManifest.xml':
|
||||||
g.filename = f'resources.{name}.xml'
|
g.filename = f'resources.{name}.xml'
|
||||||
l.extract(g, xmldir)
|
l.extract(g, xmldir)
|
||||||
elif re.search(u'Images/.+.png', g.filename):
|
elif re.search(r'Images/.+\.png', g.filename):
|
||||||
l.extract(g, archdir)
|
l.extract(g, archdir)
|
||||||
|
@ -49,7 +49,7 @@ android_api = sys.argv[4]
|
|||||||
file_name = sys.argv[5]
|
file_name = sys.argv[5]
|
||||||
print(f"Generating GApps download link: arch={arch}", flush=True)
|
print(f"Generating GApps download link: arch={arch}", flush=True)
|
||||||
abi_map = {"x64": "x86_64", "arm64": "arm64"}
|
abi_map = {"x64": "x86_64", "arm64": "arm64"}
|
||||||
android_api_map = {"33": "13.0", "34": "14.0"}
|
android_api_map = {"30": "11.0", "32": "12.1", "33": "13.0"}
|
||||||
release = android_api_map[android_api]
|
release = android_api_map[android_api]
|
||||||
res = requests.get(f"https://api.github.com/repos/LSPosed/WSA-Addon/releases/latest", auth=github_auth)
|
res = requests.get(f"https://api.github.com/repos/LSPosed/WSA-Addon/releases/latest", auth=github_auth)
|
||||||
json_data = json.loads(res.content)
|
json_data = json.loads(res.content)
|
||||||
@ -59,9 +59,9 @@ if res.status_code == 200:
|
|||||||
download_files = {}
|
download_files = {}
|
||||||
assets = json_data["assets"]
|
assets = json_data["assets"]
|
||||||
for asset in assets:
|
for asset in assets:
|
||||||
if re.match(f'gapps.*{release}.*\.rc$', asset["name"]):
|
if re.match(rf'gapps.*{release}.*\.rc$', asset["name"]):
|
||||||
download_files[asset["name"]] = asset["browser_download_url"]
|
download_files[asset["name"]] = asset["browser_download_url"]
|
||||||
elif re.match(f'gapps.*{release}.*{abi_map[arch]}.*\.img$', asset["name"]):
|
elif re.match(rf'gapps.*{release}.*{abi_map[arch]}.*\.img$', asset["name"]):
|
||||||
download_files[asset["name"]] = asset["browser_download_url"]
|
download_files[asset["name"]] = asset["browser_download_url"]
|
||||||
with open(download_dir/tempScript, 'a') as f:
|
with open(download_dir/tempScript, 'a') as f:
|
||||||
for key, value in download_files.items():
|
for key, value in download_files.items():
|
||||||
|
@ -67,7 +67,7 @@ if res.status_code == 200:
|
|||||||
assets = json_data["assets"]
|
assets = json_data["assets"]
|
||||||
for asset in assets:
|
for asset in assets:
|
||||||
asset_name = asset["name"]
|
asset_name = asset["name"]
|
||||||
if re.match(f'kernel-WSA-{abi_map[arch]}-{kernelVersion}.*\.zip$', asset_name) and asset["content_type"] == "application/zip":
|
if re.match(rf'kernel-WSA-{abi_map[arch]}-{kernelVersion}.*\.zip$', asset_name) and asset["content_type"] == "application/zip":
|
||||||
tmp_kernel_ver = re.search(
|
tmp_kernel_ver = re.search(
|
||||||
u'\d{1}.\d{1,}.\d{1,}.\d{1,}', asset_name.split("-")[3]).group()
|
u'\d{1}.\d{1,}.\d{1,}.\d{1,}', asset_name.split("-")[3]).group()
|
||||||
if (kernel_ver == 0):
|
if (kernel_ver == 0):
|
||||||
@ -76,7 +76,7 @@ if res.status_code == 200:
|
|||||||
kernel_ver = tmp_kernel_ver
|
kernel_ver = tmp_kernel_ver
|
||||||
print(f"Kernel version: {kernel_ver}", flush=True)
|
print(f"Kernel version: {kernel_ver}", flush=True)
|
||||||
for asset in assets:
|
for asset in assets:
|
||||||
if re.match(f'kernel-WSA-{abi_map[arch]}-{kernel_ver}.*\.zip$', asset["name"]) and asset["content_type"] == "application/zip":
|
if re.match(rf'kernel-WSA-{abi_map[arch]}-{kernel_ver}.*\.zip$', asset["name"]) and asset["content_type"] == "application/zip":
|
||||||
link = asset["browser_download_url"]
|
link = asset["browser_download_url"]
|
||||||
break
|
break
|
||||||
if link == "":
|
if link == "":
|
||||||
@ -104,6 +104,3 @@ with open(download_dir/tempScript, 'a') as f:
|
|||||||
f.writelines(f'{link}\n')
|
f.writelines(f'{link}\n')
|
||||||
f.writelines(f' dir={download_dir}\n')
|
f.writelines(f' dir={download_dir}\n')
|
||||||
f.writelines(f' out={file_name}\n')
|
f.writelines(f' out={file_name}\n')
|
||||||
# f.writelines(f'{apk}\n')
|
|
||||||
# f.writelines(f' dir={download_dir}\n')
|
|
||||||
# f.writelines(f' out=KernelSU.apk\n')
|
|
||||||
|
@ -26,10 +26,6 @@ import json
|
|||||||
import requests
|
import requests
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
#Android header
|
|
||||||
headers = {
|
|
||||||
'User-Agent': 'Mozilla/5.0 (Linux; Android 13; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.6045.163 Mobile Safari/537.36',
|
|
||||||
}
|
|
||||||
|
|
||||||
class BearerAuth(requests.auth.AuthBase):
|
class BearerAuth(requests.auth.AuthBase):
|
||||||
def __init__(self, token):
|
def __init__(self, token):
|
||||||
@ -46,33 +42,24 @@ if Path.cwd().joinpath('token').exists():
|
|||||||
github_auth = BearerAuth(token_file.read())
|
github_auth = BearerAuth(token_file.read())
|
||||||
print("Using token file for authentication", flush=True)
|
print("Using token file for authentication", flush=True)
|
||||||
|
|
||||||
magisk_branch = sys.argv[1]
|
magisk_ver = sys.argv[1]
|
||||||
magisk_ver = sys.argv[2]
|
|
||||||
download_dir = Path.cwd().parent / \
|
download_dir = Path.cwd().parent / \
|
||||||
"download" if sys.argv[3] == "" else Path(sys.argv[3])
|
"download" if sys.argv[2] == "" else Path(sys.argv[2])
|
||||||
tempScript = sys.argv[4]
|
tempScript = sys.argv[3]
|
||||||
download_files = {}
|
download_files = {}
|
||||||
print(
|
print(
|
||||||
f"Generating Magisk download link: release type={magisk_ver}", flush=True)
|
f"Generating Magisk download link: release type={magisk_ver}", flush=True)
|
||||||
if not magisk_ver:
|
if not magisk_ver:
|
||||||
magisk_ver = "stable"
|
magisk_ver = "stable"
|
||||||
|
if magisk_ver == "stable" or magisk_ver == "beta" or magisk_ver == "canary" or magisk_ver == "debug":
|
||||||
if magisk_branch == "vvb2060":
|
|
||||||
try:
|
try:
|
||||||
magisk_link = json.loads(requests.get(
|
magisk_link = json.loads(requests.get(
|
||||||
f"https://install.appcenter.ms/api/v0.1/apps/vvb2060/magisk/distribution_groups/public/releases/latest?is_install_page=true", headers=headers).content)['download_url']
|
f"https://github.com/topjohnwu/magisk-files/raw/master/{magisk_ver}.json").content)['magisk']['link']
|
||||||
download_files[f"magisk-{magisk_ver}.zip"] = magisk_link
|
|
||||||
except Exception:
|
|
||||||
print("Failed to fetch from AppCenter API...")
|
|
||||||
else:
|
|
||||||
try:
|
|
||||||
magisk_link = json.loads(requests.get(
|
|
||||||
f"https://raw.githubusercontent.com/{magisk_branch}/magisk-files/master/{magisk_ver}.json").content)['magisk']['link']
|
|
||||||
download_files[f"magisk-{magisk_ver}.zip"] = magisk_link
|
download_files[f"magisk-{magisk_ver}.zip"] = magisk_link
|
||||||
except Exception:
|
except Exception:
|
||||||
print("Failed to fetch from GitHub API, fallbacking to jsdelivr...")
|
print("Failed to fetch from GitHub API, fallbacking to jsdelivr...")
|
||||||
magisk_link = json.loads(requests.get(
|
magisk_link = json.loads(requests.get(
|
||||||
f"https://fastly.jsdelivr.net/gh/{magisk_branch}/magisk-files@master/{magisk_ver}.json").content)['magisk']['link']
|
f"https://fastly.jsdelivr.net/gh/topjohnwu/magisk-files@master/{magisk_ver}.json").content)['magisk']['link']
|
||||||
download_files[f"magisk-{magisk_ver}.zip"] = magisk_link
|
download_files[f"magisk-{magisk_ver}.zip"] = magisk_link
|
||||||
res = requests.get(
|
res = requests.get(
|
||||||
f"https://api.github.com/repos/LSPosed/WSA-Addon/releases/latest", auth=github_auth)
|
f"https://api.github.com/repos/LSPosed/WSA-Addon/releases/latest", auth=github_auth)
|
||||||
|
@ -53,13 +53,14 @@ logging.captureWarnings(True)
|
|||||||
arch = sys.argv[1]
|
arch = sys.argv[1]
|
||||||
|
|
||||||
release_name_map = {"retail": "Retail", "RP": "Release Preview",
|
release_name_map = {"retail": "Retail", "RP": "Release Preview",
|
||||||
"WIS": "Insider Slow", "WIF": "Insider Fast", "latest": "Insider Private"}
|
"WIS": "Insider Slow", "WIF": "Insider Fast"}
|
||||||
release_type = sys.argv[2] if sys.argv[2] != "" else "Retail"
|
release_type = sys.argv[2] if sys.argv[2] != "" else "Retail"
|
||||||
release_name = release_name_map[release_type]
|
release_name = release_name_map[release_type]
|
||||||
download_dir = Path.cwd().parent / \
|
download_dir = Path.cwd().parent / \
|
||||||
"download" if sys.argv[3] == "" else Path(sys.argv[3])
|
"download" if sys.argv[3] == "" else Path(sys.argv[3])
|
||||||
ms_account_conf = download_dir/".ms_account"
|
ms_account_conf = download_dir/".ms_account"
|
||||||
tempScript = sys.argv[4]
|
tempScript = sys.argv[4]
|
||||||
|
skip_wsa_download = sys.argv[5] == "1" if len(sys.argv) >= 6 else False
|
||||||
cat_id = '858014f3-3934-4abe-8078-4aa193e74ca8'
|
cat_id = '858014f3-3934-4abe-8078-4aa193e74ca8'
|
||||||
user = ''
|
user = ''
|
||||||
session = Session()
|
session = Session()
|
||||||
@ -144,26 +145,26 @@ def send_req(i, v, out_file_name):
|
|||||||
threads = []
|
threads = []
|
||||||
wsa_build_ver = 0
|
wsa_build_ver = 0
|
||||||
for filename, values in identities.items():
|
for filename, values in identities.items():
|
||||||
if re.match(f"MicrosoftCorporationII\.WindowsSubsystemForAndroid_.*\.msixbundle", filename):
|
if re.match(rf"MicrosoftCorporationII\.WindowsSubsystemForAndroid_.*\.msixbundle", filename):
|
||||||
tmp_wsa_build_ver = re.search(
|
tmp_wsa_build_ver = re.search(
|
||||||
u'\d{4}.\d{5}.\d{1,}.\d{1,}', filename).group()
|
r'\d{4}.\d{5}.\d{1,}.\d{1,}', filename).group()
|
||||||
if (wsa_build_ver == 0):
|
if (wsa_build_ver == 0):
|
||||||
wsa_build_ver = tmp_wsa_build_ver
|
wsa_build_ver = tmp_wsa_build_ver
|
||||||
elif version.parse(wsa_build_ver) < version.parse(tmp_wsa_build_ver):
|
elif version.parse(wsa_build_ver) < version.parse(tmp_wsa_build_ver):
|
||||||
wsa_build_ver = tmp_wsa_build_ver
|
wsa_build_ver = tmp_wsa_build_ver
|
||||||
for filename, values in identities.items():
|
for filename, values in identities.items():
|
||||||
if re.match(f"Microsoft\.UI\.Xaml\..*_{arch}_.*\.appx", filename):
|
if re.match(rf"Microsoft\.UI\.Xaml\..*_{arch}_.*\.appx", filename):
|
||||||
out_file_name = f"{values[1]}_{arch}.appx"
|
out_file_name = f"{values[1]}_{arch}.appx"
|
||||||
out_file = download_dir / out_file_name
|
out_file = download_dir / out_file_name
|
||||||
elif re.match(f"Microsoft\.VCLibs\..+\.UWPDesktop_.*_{arch}_.*\.appx", filename):
|
elif re.match(rf"Microsoft\.VCLibs\..+\.UWPDesktop_.*_{arch}_.*\.appx", filename):
|
||||||
out_file_name = f"{values[1]}_{arch}.appx"
|
out_file_name = f"{values[1]}_{arch}.appx"
|
||||||
out_file = download_dir / out_file_name
|
out_file = download_dir / out_file_name
|
||||||
elif re.match(f"Microsoft\.VCLibs\..+_.*_{arch}_.*\.appx", filename):
|
elif re.match(rf"Microsoft\.VCLibs\..+_.*_{arch}_.*\.appx", filename):
|
||||||
out_file_name = f"{values[1]}_{arch}.appx"
|
out_file_name = f"{values[1]}_{arch}.appx"
|
||||||
out_file = download_dir / out_file_name
|
out_file = download_dir / out_file_name
|
||||||
elif not release_name == 'latest' and re.match(f"MicrosoftCorporationII\.WindowsSubsystemForAndroid_.*\.msixbundle", filename):
|
elif not skip_wsa_download and re.match(rf"MicrosoftCorporationII\.WindowsSubsystemForAndroid_.*\.msixbundle", filename):
|
||||||
tmp_wsa_build_ver = re.search(
|
tmp_wsa_build_ver = re.search(
|
||||||
u'\d{4}.\d{5}.\d{1,}.\d{1,}', filename).group()
|
r'\d{4}.\d{5}.\d{1,}.\d{1,}', filename).group()
|
||||||
if (wsa_build_ver != tmp_wsa_build_ver):
|
if (wsa_build_ver != tmp_wsa_build_ver):
|
||||||
continue
|
continue
|
||||||
version_splitted = wsa_build_ver.split(".")
|
version_splitted = wsa_build_ver.split(".")
|
||||||
|
121
MagiskOnWSA/scripts/magisk_debug.sh
Normal file
121
MagiskOnWSA/scripts/magisk_debug.sh
Normal file
@ -0,0 +1,121 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# This file is part of MagiskOnWSALocal.
|
||||||
|
#
|
||||||
|
# MagiskOnWSALocal is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU Affero General Public License as
|
||||||
|
# published by the Free Software Foundation, either version 3 of the
|
||||||
|
# License, or (at your option) any later version.
|
||||||
|
#
|
||||||
|
# MagiskOnWSALocal is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU Affero General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU Affero General Public License
|
||||||
|
# along with MagiskOnWSALocal. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
# Copyright (C) 2024 LSPosed Contributors
|
||||||
|
#
|
||||||
|
|
||||||
|
if [ ! "$BASH_VERSION" ]; then
|
||||||
|
echo "Please do not use sh to run this script, just execute it directly" 1>&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
HOST_ARCH=$(uname -m)
|
||||||
|
if [ "$HOST_ARCH" != "x86_64" ] && [ "$HOST_ARCH" != "aarch64" ]; then
|
||||||
|
echo "Unsupported architectures: $HOST_ARCH"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
cd "$(dirname "$0")" || exit 1
|
||||||
|
# export TMPDIR=$HOME/.cache/wsa
|
||||||
|
if [ "$TMPDIR" ] && [ ! -d "$TMPDIR" ]; then
|
||||||
|
mkdir -p "$TMPDIR"
|
||||||
|
fi
|
||||||
|
WORK_DIR=$(mktemp -d -t wsa-build-XXXXXXXXXX_) || exit 1
|
||||||
|
|
||||||
|
DOWNLOAD_DIR=../download
|
||||||
|
PYTHON_VENV_DIR="$(dirname "$PWD")/python3-env"
|
||||||
|
dir_clean() {
|
||||||
|
rm -rf "${WORK_DIR:?}"
|
||||||
|
if [ "$TMPDIR" ] && [ -d "$TMPDIR" ]; then
|
||||||
|
echo "Cleanup Temp Directory"
|
||||||
|
rm -rf "${TMPDIR:?}"
|
||||||
|
unset TMPDIR
|
||||||
|
fi
|
||||||
|
if [ "$(python3 -c 'import sys ; print( 1 if sys.prefix != sys.base_prefix else 0 )')" = "1" ]; then
|
||||||
|
echo "deactivate python3 venv"
|
||||||
|
deactivate
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
trap dir_clean EXIT
|
||||||
|
abort() {
|
||||||
|
[ "$1" ] && echo -e "ERROR: $1"
|
||||||
|
echo "Build: an error has occurred, exit"
|
||||||
|
if [ -d "$WORK_DIR" ]; then
|
||||||
|
echo -e "\nCleanup Work Directory"
|
||||||
|
dir_clean
|
||||||
|
fi
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
trap abort INT TERM
|
||||||
|
# shellcheck disable=SC1091
|
||||||
|
[ -f "$PYTHON_VENV_DIR/bin/activate" ] && {
|
||||||
|
source "$PYTHON_VENV_DIR/bin/activate" || abort "Failed to activate virtual environment, please re-run install_deps.sh"
|
||||||
|
}
|
||||||
|
MAGISK_VER=$1
|
||||||
|
ARCH=$2
|
||||||
|
TARGET=$3
|
||||||
|
if [ -z "$MAGISK_VER" ] || [ -z "$ARCH" ] || [ -z "$TARGET" ]; then
|
||||||
|
echo "Usage: $0 <release|debug> <x64|arm64> <initrd>"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
MAGISK_ZIP=magisk-$MAGISK_VER.zip
|
||||||
|
MAGISK_PATH=$DOWNLOAD_DIR/$MAGISK_ZIP
|
||||||
|
if [ ! -f "$MAGISK_PATH" ]; then
|
||||||
|
echo "Custom Magisk $MAGISK_ZIP not found"
|
||||||
|
MAGISK_ZIP=app-$MAGISK_VER.apk
|
||||||
|
echo -e "Fallback to $MAGISK_ZIP\n"
|
||||||
|
MAGISK_PATH=$DOWNLOAD_DIR/$MAGISK_ZIP
|
||||||
|
if [ ! -f "$MAGISK_PATH" ]; then
|
||||||
|
abort "Custom Magisk $MAGISK_ZIP not found\nPlease put custom Magisk in $DOWNLOAD_DIR"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
echo "Extracting Magisk"
|
||||||
|
if [ -f "$MAGISK_PATH" ]; then
|
||||||
|
if ! python3 extractMagisk.py "$ARCH" "$MAGISK_PATH" "$WORK_DIR"; then
|
||||||
|
abort "Unzip Magisk failed, is the download incomplete?"
|
||||||
|
fi
|
||||||
|
chmod +x "$WORK_DIR/magisk/magiskboot" || abort
|
||||||
|
elif [ -z "${CUSTOM_MAGISK+x}" ]; then
|
||||||
|
abort "The Magisk zip package does not exist, is the download incomplete?"
|
||||||
|
else
|
||||||
|
abort "The Magisk zip package does not exist, rename it to magisk-debug.zip and put it in the download folder."
|
||||||
|
fi
|
||||||
|
echo -e "done\n"
|
||||||
|
echo "Integrating Magisk"
|
||||||
|
SKIP="#"
|
||||||
|
SINGLEABI="#"
|
||||||
|
SKIPINITLD="#"
|
||||||
|
if [ -f "$WORK_DIR/magisk/magisk64" ]; then
|
||||||
|
"$WORK_DIR/magisk/magiskboot" compress=xz "$WORK_DIR/magisk/magisk64" "$WORK_DIR/magisk/magisk64.xz"
|
||||||
|
"$WORK_DIR/magisk/magiskboot" compress=xz "$WORK_DIR/magisk/magisk32" "$WORK_DIR/magisk/magisk32.xz"
|
||||||
|
unset SINGLEABI
|
||||||
|
else
|
||||||
|
"$WORK_DIR/magisk/magiskboot" compress=xz "$WORK_DIR/magisk/magisk" "$WORK_DIR/magisk/magisk.xz"
|
||||||
|
unset SKIP
|
||||||
|
fi
|
||||||
|
if [ -f "$WORK_DIR/magisk/init-ld" ]; then
|
||||||
|
"$WORK_DIR/magisk/magiskboot" compress=xz "$WORK_DIR/magisk/init-ld" "$WORK_DIR/magisk/init-ld.xz"
|
||||||
|
unset SKIPINITLD
|
||||||
|
fi
|
||||||
|
"$WORK_DIR/magisk/magiskboot" compress=xz "$MAGISK_PATH" "$WORK_DIR/magisk/stub.xz"
|
||||||
|
"$WORK_DIR/magisk/magiskboot" cpio "$TARGET" \
|
||||||
|
"add 0750 /lspinit ../bin/$ARCH/lspinit" \
|
||||||
|
"add 0750 /magiskinit $WORK_DIR/magisk/magiskinit" \
|
||||||
|
"$SINGLEABI add 0644 overlay.d/sbin/magisk64.xz $WORK_DIR/magisk/magisk64.xz" \
|
||||||
|
"$SINGLEABI add 0644 overlay.d/sbin/magisk32.xz $WORK_DIR/magisk/magisk32.xz" \
|
||||||
|
"$SKIP add 0644 overlay.d/sbin/magisk.xz $WORK_DIR/magisk/magisk.xz" \
|
||||||
|
"$SKIPINITLD add 0644 overlay.d/sbin/init-ld.xz $WORK_DIR/magisk/init-ld.xz" \
|
||||||
|
"add 0644 overlay.d/sbin/stub.xz $WORK_DIR/magisk/stub.xz" \
|
||||||
|
|| abort "Unable to patch initrd"
|
Binary file not shown.
@ -49,13 +49,6 @@ if ((New-Object Security.Principal.WindowsPrincipal([Security.Principal.WindowsI
|
|||||||
exit
|
exit
|
||||||
}
|
}
|
||||||
|
|
||||||
$FileList = Get-Content -Path .\filelist.txt
|
|
||||||
if (((Test-Path -Path $FileList) -eq $false).Count) {
|
|
||||||
Write-Error "`r`nSome files are missing in the folder.`r`nPlease try to build again.`r`n`r`nPress any key to exit"
|
|
||||||
$null = $Host.UI.RawUI.ReadKey('NoEcho,IncludeKeyDown')
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock" /t REG_DWORD /f /v "AllowDevelopmentWithoutDevLicense" /d "1"
|
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock" /t REG_DWORD /f /v "AllowDevelopmentWithoutDevLicense" /d "1"
|
||||||
|
|
||||||
if ($(Get-WindowsOptionalFeature -Online -FeatureName 'VirtualMachinePlatform').State -ne "Enabled") {
|
if ($(Get-WindowsOptionalFeature -Online -FeatureName 'VirtualMachinePlatform').State -ne "Enabled") {
|
||||||
|
@ -596,37 +596,6 @@ elif [ "$ROOT_SOL" = "kernelsu" ]; then
|
|||||||
echo "Copy KernelSU kernel"
|
echo "Copy KernelSU kernel"
|
||||||
cp "$WORK_DIR/kernelsu/kernel" "$WORK_DIR/wsa/$ARCH/Tools/kernel"
|
cp "$WORK_DIR/kernelsu/kernel" "$WORK_DIR/wsa/$ARCH/Tools/kernel"
|
||||||
echo -e "Copy KernelSU kernel done\n"
|
echo -e "Copy KernelSU kernel done\n"
|
||||||
echo "Add auto-install script for KernelSU Manager"
|
|
||||||
# Copy APK
|
|
||||||
DAT_APP="$SYSTEM_MNT/data-app"
|
|
||||||
sudo mkdir "$DAT_APP"
|
|
||||||
sudo cp -f "$KERNELSU_APK_PATH" "$DAT_APP/"
|
|
||||||
sudo chmod 0755 "$DAT_APP/"
|
|
||||||
sudo chmod 0644 "$DAT_APP/KernelSU.apk"
|
|
||||||
sudo find "$DAT_APP/" -exec chown root:root {} \;
|
|
||||||
sudo find "$DAT_APP/" -exec setfattr -n security.selinux -v "u:object_r:system_file:s0" {} \; || abort
|
|
||||||
# Setup script
|
|
||||||
KSU_PRE="$SYSTEM_MNT/bin/ksuinstall"
|
|
||||||
sudo tee -a "$KSU_PRE" <<EOF >/dev/null || abort
|
|
||||||
#!/system/bin/sh
|
|
||||||
umask 022
|
|
||||||
echo "\nKernelSU Install Manager"
|
|
||||||
if [ ! -e "/storage/emulated/0/.ksu_completed_$KERNELSU_VER" ]; then
|
|
||||||
echo "\nInstalling KernelSU APK"
|
|
||||||
pm install -i android -r /system/data-app/KernelSU.apk
|
|
||||||
touch "/storage/emulated/0/.ksu_completed_$KERNELSU_VER"
|
|
||||||
echo "\nDone!\n"
|
|
||||||
else
|
|
||||||
echo "\nLatest KernelSU Manager is installed.\n"
|
|
||||||
fi
|
|
||||||
echo "\nLaunching KernelSU App\n"
|
|
||||||
am start -n me.weishu.kernelsu/.ui.MainActivity
|
|
||||||
EOF
|
|
||||||
# Grant access
|
|
||||||
sudo chmod 0755 "$KSU_PRE"
|
|
||||||
sudo chown 0:2000 "$KSU_PRE"
|
|
||||||
sudo setfattr -n security.selinux -v "u:object_r:system_file:s0" "$KSU_PRE" || abort
|
|
||||||
echo -e "Add KernelSU Manager done\n"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Add extra packages"
|
echo "Add extra packages"
|
||||||
@ -637,14 +606,6 @@ find "../$ARCH/system/priv-app/" -maxdepth 1 -mindepth 1 -printf '%P\n' | xargs
|
|||||||
find "../$ARCH/system/priv-app/" -maxdepth 1 -mindepth 1 -printf '%P\n' | xargs -I placeholder sudo find "$SYSTEM_MNT/priv-app/placeholder" -exec setfattr -n security.selinux -v "u:object_r:system_file:s0" {} \; || abort
|
find "../$ARCH/system/priv-app/" -maxdepth 1 -mindepth 1 -printf '%P\n' | xargs -I placeholder sudo find "$SYSTEM_MNT/priv-app/placeholder" -exec setfattr -n security.selinux -v "u:object_r:system_file:s0" {} \; || abort
|
||||||
echo -e "Add extra packages done\n"
|
echo -e "Add extra packages done\n"
|
||||||
|
|
||||||
echo "Permissions management Netfree and Netspark security certificates"
|
|
||||||
sudo cp -r "../cacerts/"* "$SYSTEM_MNT/etc/security/cacerts/" || abort
|
|
||||||
sudo chmod 0755 "$SYSTEM_MNT/etc/security/cacerts/"
|
|
||||||
find "../cacerts/" -maxdepth 1 -mindepth 1 -printf '%P\n' | xargs -I placeholder sudo find "$SYSTEM_MNT/etc/security/cacerts/placeholder" -type f -exec chmod 0644 {} \;
|
|
||||||
find "../cacerts/" -maxdepth 1 -mindepth 1 -printf '%P\n' | xargs -I placeholder sudo find "$SYSTEM_MNT/etc/security/cacerts/placeholder" -exec chown root:root {} \;
|
|
||||||
find "../cacerts/" -maxdepth 1 -mindepth 1 -printf '%P\n' | xargs -I placeholder sudo find "$SYSTEM_MNT/etc/security/cacerts/placeholder" -exec setfattr -n security.selinux -v "u:object_r:system_file:s0" {} \; || abort
|
|
||||||
echo -e "Permissions management Netfree and Netspark security certificates done\n"
|
|
||||||
|
|
||||||
if [ "$GAPPS_BRAND" != 'none' ]; then
|
if [ "$GAPPS_BRAND" != 'none' ]; then
|
||||||
echo "Integrate MindTheGapps"
|
echo "Integrate MindTheGapps"
|
||||||
find "$WORK_DIR/gapps/" -mindepth 1 -type d -exec sudo chmod 0755 {} \;
|
find "$WORK_DIR/gapps/" -mindepth 1 -type d -exec sudo chmod 0755 {} \;
|
||||||
@ -790,28 +751,11 @@ fi
|
|||||||
if [[ "$ROOT_SOL" = "none" ]] && [[ "$GAPPS_BRAND" = "none" ]] && [[ "$REMOVE_AMAZON" == "yes" ]]; then
|
if [[ "$ROOT_SOL" = "none" ]] && [[ "$GAPPS_BRAND" = "none" ]] && [[ "$REMOVE_AMAZON" == "yes" ]]; then
|
||||||
sudo sed -i -e 's@Start-Process\ "wsa://com.topjohnwu.magisk"@@g' ../installer/Install.ps1
|
sudo sed -i -e 's@Start-Process\ "wsa://com.topjohnwu.magisk"@@g' ../installer/Install.ps1
|
||||||
sudo sed -i -e 's@Start-Process\ "wsa://com.android.vending"@@g' ../installer/Install.ps1
|
sudo sed -i -e 's@Start-Process\ "wsa://com.android.vending"@@g' ../installer/Install.ps1
|
||||||
readmeUrl="https://github.com/MustardChef/WSABuilds/blob/master/Documentation/Usage%20Guides/Post-Installation%20Guides/No%20Root/No%20Gapps%20and%20Removed%20AMZ/No%20Gapps%20and%20Removed%20Amazon.md"
|
|
||||||
sudo sed -i "/Start-Process \"shell:AppsFolder\\\\MicrosoftCorporationII.WindowsSubsystemForAndroid_8wekyb3d8bbwe!SettingsApp\"/a\ \ \ \ Start-Process \"$readmeUrl\"" ../installer/Install.ps1
|
|
||||||
elif [[ "$ROOT_SOL" = "none" ]] && [[ "$GAPPS_BRAND" = "MindTheGapps" ]] && [[ "$REMOVE_AMAZON" == "yes" ]]; then
|
|
||||||
readmeUrl="https://github.com/MustardChef/WSABuilds/blob/master/Documentation/Usage%20Guides/Post-Installation%20Guides/No%20Root/MindTheGapps%20and%20Removed%20AMZ/MindTheGapps%20and%20Removed%20Amazon.md"
|
|
||||||
sudo sed -i "/Start-Process \"shell:AppsFolder\\\\MicrosoftCorporationII.WindowsSubsystemForAndroid_8wekyb3d8bbwe!SettingsApp\"/a\ \ \ \ Start-Process \"$readmeUrl\"" ../installer/Install.ps1
|
|
||||||
elif [[ "$ROOT_SOL" = "none" ]] && [[ "$GAPPS_BRAND" = "none" ]] && [[ "$REMOVE_AMAZON" != "yes" ]]; then
|
|
||||||
readmeUrl="https://github.com/MustardChef/WSABuilds/blob/master/Documentation/Usage%20Guides/Post-Installation%20Guides/No%20Root/No%20Gapps%20and%20AMZ/No%20Gapps%20and%20Amazon%20Appstore.md"
|
|
||||||
sudo sed -i "/Start-Process \"shell:AppsFolder\\\\MicrosoftCorporationII.WindowsSubsystemForAndroid_8wekyb3d8bbwe!SettingsApp\"/a\ \ \ \ Start-Process \"$readmeUrl\"" ../installer/Install.ps1
|
|
||||||
elif [[ "$ROOT_SOL" = "none" ]] && [[ "$GAPPS_BRAND" = "MindTheGapps" ]] && [[ "$REMOVE_AMAZON" != "yes" ]]; then
|
|
||||||
readmeUrl="https://github.com/MustardChef/WSABuilds/blob/master/Documentation/Usage%20Guides/Post-Installation%20Guides/No%20Root/MindTheGapps%20and%20AMZ/MindTheGapps%20and%20Amazon%20Appstore.md"
|
|
||||||
sudo sed -i "/Start-Process \"shell:AppsFolder\\\\MicrosoftCorporationII.WindowsSubsystemForAndroid_8wekyb3d8bbwe!SettingsApp\"/a\ \ \ \ Start-Process \"$readmeUrl\"" ../installer/Install.ps1
|
|
||||||
elif [[ "$ROOT_SOL" = "kernelsu" ]] && [[ "$GAPPS_BRAND" = "none" ]] && [[ "$REMOVE_AMAZON" == "yes" ]]; then
|
|
||||||
sudo sed -i -e 's@wsa://com.topjohnwu.magisk@https://github.com/MustardChef/WSABuilds/blob/master/Documentation/Usage%20Guides/Post-Installation%20Guides/KernelSU/No%20Gapps%20and%20Removed%20AMZ/No%20Gapps%20and%20Removed%20AMZ.md@g' ../installer/Install.ps1
|
|
||||||
elif [[ "$ROOT_SOL" = "kernelsu" ]] && [[ "$GAPPS_BRAND" = "none" ]] && [[ "$REMOVE_AMAZON" != "yes" ]]; then
|
|
||||||
sudo sed -i -e 's@wsa://com.topjohnwu.magisk@https://github.com/MustardChef/WSABuilds/blob/master/Documentation/Usage%20Guides/Post-Installation%20Guides/KernelSU/No%20Gapps%20and%20AMZ/No%20Gapps%20and%20AMZ.md@g' ../installer/Install.ps1
|
|
||||||
elif [[ "$ROOT_SOL" = "kernelsu" ]] && [[ "$GAPPS_BRAND" = "MindTheGapps" ]] && [[ "$REMOVE_AMAZON" == "yes" ]]; then
|
|
||||||
sudo sed -i -e 's@wsa://com.topjohnwu.magisk@https://github.com/MustardChef/WSABuilds/blob/master/Documentation/Usage%20Guides/Post-Installation%20Guides/KernelSU/MindTheGapps%20and%20Removed%20AMZ/MindTheGapps%20and%20Removed%20AMZ.md@g' ../installer/Install.ps1
|
|
||||||
elif [[ "$ROOT_SOL" = "kernelsu" ]] && [[ "$GAPPS_BRAND" = "MindTheGapps" ]] && [[ "$REMOVE_AMAZON" != "yes" ]]; then
|
|
||||||
sudo sed -i -e 's@wsa://com.topjohnwu.magisk@https://github.com/MustardChef/WSABuilds/blob/master/Documentation/Usage%20Guides/Post-Installation%20Guides/KernelSU/MindTheGapps%20and%20AMZ/MindTheGapps%20and%20AMZ.md@g' ../installer/Install.ps1
|
|
||||||
else
|
else
|
||||||
if [[ "$ROOT_SOL" == "none" ]]; then
|
if [[ "$ROOT_SOL" == "none" ]]; then
|
||||||
sed -i -e 's@Start-Process "wsa://com.topjohnwu.magisk"@@g' ../installer/Install.ps1
|
sed -i -e 's@Start-Process "wsa://com.topjohnwu.magisk"@@g' ../installer/Install.ps1
|
||||||
|
elif [[ "$ROOT_SOL" = "kernelsu" ]]; then
|
||||||
|
sed -i -e 's@wsa://com.topjohnwu.magisk@https://github.com/MustardChef/WSABuilds/blob/585e9df757ed135dce504725c9e386a6ce6419ce/Documentation/Usage%20Guides/General%20Usage%20Guides/KernelSU.md@g' "../installer/$ARCH/Install.ps1"
|
||||||
elif [[ "$MAGISK_VER" = "delta" ]]; then
|
elif [[ "$MAGISK_VER" = "delta" ]]; then
|
||||||
sed -i -e 's@com.topjohnwu.magisk@io.github.huskydg.magisk@g' ../installer/Install.ps1
|
sed -i -e 's@com.topjohnwu.magisk@io.github.huskydg.magisk@g' ../installer/Install.ps1
|
||||||
elif [[ "$MAGISK_VER" = "alpha" ]]; then
|
elif [[ "$MAGISK_VER" = "alpha" ]]; then
|
||||||
@ -822,94 +766,6 @@ else
|
|||||||
elif [[ "$GAPPS_BRAND" = "none" ]]; then
|
elif [[ "$GAPPS_BRAND" = "none" ]]; then
|
||||||
sed -i -e 's@Start-Process\ "wsa://com.android.vending"@@g' ../installer/Install.ps1
|
sed -i -e 's@Start-Process\ "wsa://com.android.vending"@@g' ../installer/Install.ps1
|
||||||
fi
|
fi
|
||||||
if [[ "$ROOT_SOL" = "magisk" ]] && [[ "$GAPPS_BRAND" = "none" ]] && [[ "$REMOVE_AMAZON" == "yes" ]]; then
|
|
||||||
if [ "$MAGISK_VER" = "canary" ]; then
|
|
||||||
# Open GitHub readme page for Magisk Canary and NoGappsNoAMZ
|
|
||||||
readmeUrl="https://github.com/MustardChef/WSABuilds/blob/master/Documentation/Usage%20Guides/Post-Installation%20Guides/Magisk/No%20Gapps%20and%20Removed%20AMZ/Canary.md"
|
|
||||||
elif [ "$MAGISK_VER" = "stable" ]; then
|
|
||||||
# Open GitHub readme page for Magisk Stable and NoGappsNoAMZ
|
|
||||||
readmeUrl="https://github.com/MustardChef/WSABuilds/blob/master/Documentation/Usage%20Guides/Post-Installation%20Guides/Magisk/No%20Gapps%20and%20Removed%20AMZ/Stable.md"
|
|
||||||
elif [ "$MAGISK_VER" = "beta" ]; then
|
|
||||||
# Open GitHub readme page for Magisk Beta and NoGappsNoAMZ
|
|
||||||
readmeUrl="https://github.com/MustardChef/WSABuilds/blob/master/Documentation/Usage%20Guides/Post-Installation%20Guides/Magisk/No%20Gapps%20and%20Removed%20AMZ/Beta.md"
|
|
||||||
elif [ "$MAGISK_VER" = "debug" ]; then
|
|
||||||
# Open GitHub readme page for Magisk Debug and NoGappsNoAMZ
|
|
||||||
readmeUrl="https://github.com/MustardChef/WSABuilds/blob/master/Documentation/Usage%20Guides/Post-Installation%20Guides/Magisk/No%20Gapps%20and%20Removed%20AMZ/Debug.md"
|
|
||||||
elif [ "$MAGISK_VER" = "alpha" ]; then
|
|
||||||
# Open GitHub readme page for Magisk Alpha and NoGappsNoAMZ
|
|
||||||
readmeUrl="https://github.com/MustardChef/WSABuilds/blob/master/Documentation/Usage%20Guides/Post-Installation%20Guides/Magisk/No%20Gapps%20and%20Removed%20AMZ/Alpha.md"
|
|
||||||
elif [ "$MAGISK_VER" = "delta" ]; then
|
|
||||||
# Open GitHub readme page for Magisk Delta and NoGappsNoAMZ
|
|
||||||
readmeUrl="https://github.com/MustardChef/WSABuilds/blob/master/Documentation/Usage%20Guides/Post-Installation%20Guides/Magisk/No%20Gapps%20and%20Removed%20AMZ/Delta.md"
|
|
||||||
fi
|
|
||||||
sudo sed -i "/Start-Process \"shell:AppsFolder\\\\MicrosoftCorporationII.WindowsSubsystemForAndroid_8wekyb3d8bbwe!SettingsApp\"/a\ \ \ \ Start-Process \"$readmeUrl\"" ../installer/Install.ps1
|
|
||||||
fi
|
|
||||||
if [[ "$ROOT_SOL" = "magisk" ]] && [[ "$GAPPS_BRAND" = "none" ]] && [[ "$REMOVE_AMAZON" != "yes" ]]; then
|
|
||||||
if [ "$MAGISK_VER" = "canary" ]; then
|
|
||||||
# Open GitHub readme page for Magisk Canary and NoGappsAMZ
|
|
||||||
readmeUrl="https://github.com/MustardChef/WSABuilds/blob/master/Documentation/Usage%20Guides/Post-Installation%20Guides/Magisk/No%20Gapps%20and%20AMZ/Canary.md"
|
|
||||||
elif [ "$MAGISK_VER" = "stable" ]; then
|
|
||||||
# Open GitHub readme page for Magisk Stable and NoGappsAMZ
|
|
||||||
readmeUrl="https://github.com/MustardChef/WSABuilds/blob/master/Documentation/Usage%20Guides/Post-Installation%20Guides/Magisk/No%20Gapps%20and%20AMZ/Stable.md"
|
|
||||||
elif [ "$MAGISK_VER" = "beta" ]; then
|
|
||||||
# Open GitHub readme page for Magisk Beta and NoGappsAMZ
|
|
||||||
readmeUrl="https://github.com/MustardChef/WSABuilds/blob/master/Documentation/Usage%20Guides/Post-Installation%20Guides/Magisk/No%20Gapps%20and%20AMZ/Beta.md"
|
|
||||||
elif [ "$MAGISK_VER" = "debug" ]; then
|
|
||||||
# Open GitHub readme page for Magisk Debug and NoGappsAMZ
|
|
||||||
readmeUrl="https://github.com/MustardChef/WSABuilds/blob/master/Documentation/Usage%20Guides/Post-Installation%20Guides/Magisk/No%20Gapps%20and%20AMZ/Debug.md"
|
|
||||||
elif [ "$MAGISK_VER" = "alpha" ]; then
|
|
||||||
# Open GitHub readme page for Magisk Alpha and NoGappsAMZ
|
|
||||||
readmeUrl="https://github.com/MustardChef/WSABuilds/blob/master/Documentation/Usage%20Guides/Post-Installation%20Guides/Magisk/No%20Gapps%20and%20AMZ/Alpha.md"
|
|
||||||
elif [ "$MAGISK_VER" = "delta" ]; then
|
|
||||||
# Open GitHub readme page for Magisk Delta and NoGappsAMZ
|
|
||||||
readmeUrl="https://github.com/MustardChef/WSABuilds/blob/master/Documentation/Usage%20Guides/Post-Installation%20Guides/Magisk/No%20Gapps%20and%20AMZ/Delta.md"
|
|
||||||
fi
|
|
||||||
sudo sed -i "/Start-Process \"shell:AppsFolder\\\\MicrosoftCorporationII.WindowsSubsystemForAndroid_8wekyb3d8bbwe!SettingsApp\"/a\ \ \ \ Start-Process \"$readmeUrl\"" ../installer/Install.ps1
|
|
||||||
fi
|
|
||||||
if [[ "$ROOT_SOL" = "magisk" ]] && [[ "$GAPPS_BRAND" = "MindTheGapps" ]] && [[ "$REMOVE_AMAZON" == "yes" ]]; then
|
|
||||||
if [ "$MAGISK_VER" = "canary" ]; then
|
|
||||||
# Open GitHub readme page for Magisk Canary and GappsNoAMZ
|
|
||||||
readmeUrl="https://github.com/MustardChef/WSABuilds/blob/master/Documentation/Usage%20Guides/Post-Installation%20Guides/Magisk/MindTheGapps%20and%20Removed%20AMZ/Canary.md"
|
|
||||||
elif [ "$MAGISK_VER" = "stable" ]; then
|
|
||||||
# Open GitHub readme page for Magisk Stable and GappsNoAMZ
|
|
||||||
readmeUrl="https://github.com/MustardChef/WSABuilds/blob/master/Documentation/Usage%20Guides/Post-Installation%20Guides/Magisk/MindTheGapps%20and%20Removed%20AMZ/Stable.md"
|
|
||||||
elif [ "$MAGISK_VER" = "beta" ]; then
|
|
||||||
# Open GitHub readme page for Magisk Beta and GappsNoAMZ
|
|
||||||
readmeUrl="https://github.com/MustardChef/WSABuilds/blob/master/Documentation/Usage%20Guides/Post-Installation%20Guides/Magisk/MindTheGapps%20and%20Removed%20AMZ/Beta.md"
|
|
||||||
elif [ "$MAGISK_VER" = "debug" ]; then
|
|
||||||
# Open GitHub readme page for Magisk Debug and GappsNoAMZ
|
|
||||||
readmeUrl="https://github.com/MustardChef/WSABuilds/blob/master/Documentation/Usage%20Guides/Post-Installation%20Guides/Magisk/MindTheGapps%20and%20Removed%20AMZ/Debug.md"
|
|
||||||
elif [ "$MAGISK_VER" = "alpha" ]; then
|
|
||||||
# Open GitHub readme page for Magisk Alpha and GappsNoAMZ
|
|
||||||
readmeUrl="https://github.com/MustardChef/WSABuilds/blob/master/Documentation/Usage%20Guides/Post-Installation%20Guides/Magisk/MindTheGapps%20and%20Removed%20AMZ/Alpha.md"
|
|
||||||
elif [ "$MAGISK_VER" = "delta" ]; then
|
|
||||||
# Open GitHub readme page for Magisk Delta and GappsNoAMZ
|
|
||||||
readmeUrl="https://github.com/MustardChef/WSABuilds/blob/master/Documentation/Usage%20Guides/Post-Installation%20Guides/Magisk/MindTheGapps%20and%20Removed%20AMZ/Delta.md"
|
|
||||||
fi
|
|
||||||
sudo sed -i "/Start-Process \"shell:AppsFolder\\\\MicrosoftCorporationII.WindowsSubsystemForAndroid_8wekyb3d8bbwe!SettingsApp\"/a\ \ \ \ Start-Process \"$readmeUrl\"" ../installer/Install.ps1
|
|
||||||
fi
|
|
||||||
if [[ "$ROOT_SOL" = "magisk" ]] && [[ "$GAPPS_BRAND" = "MindTheGapps" ]] && [[ "$REMOVE_AMAZON" != "yes" ]]; then
|
|
||||||
if [ "$MAGISK_VER" = "canary" ]; then
|
|
||||||
# Open GitHub readme page for Magisk Canary and GappsAMZ
|
|
||||||
readmeUrl="https://github.com/MustardChef/WSABuilds/blob/master/Documentation/Usage%20Guides/Post-Installation%20Guides/Magisk/MindTheGapps%20and%20AMZ/Canary.md"
|
|
||||||
elif [ "$MAGISK_VER" = "stable" ]; then
|
|
||||||
# Open GitHub readme page for Magisk Stable and GappsAMZ
|
|
||||||
readmeUrl="https://github.com/MustardChef/WSABuilds/blob/master/Documentation/Usage%20Guides/Post-Installation%20Guides/Magisk/MindTheGapps%20and%20AMZ/Stable.md"
|
|
||||||
elif [ "$MAGISK_VER" = "beta" ]; then
|
|
||||||
# Open GitHub readme page for Magisk Beta and GappsAMZ
|
|
||||||
readmeUrl="https://github.com/MustardChef/WSABuilds/blob/master/Documentation/Usage%20Guides/Post-Installation%20Guides/Magisk/MindTheGapps%20and%20AMZ/Beta.md"
|
|
||||||
elif [ "$MAGISK_VER" = "debug" ]; then
|
|
||||||
# Open GitHub readme page for Magisk Debug and GappsAMZ
|
|
||||||
readmeUrl="https://github.com/MustardChef/WSABuilds/blob/master/Documentation/Usage%20Guides/Post-Installation%20Guides/Magisk/MindTheGapps%20and%20AMZ/Debug.md"
|
|
||||||
elif [ "$MAGISK_VER" = "alpha" ]; then
|
|
||||||
# Open GitHub readme page for Magisk Alpha and GappsAMZ
|
|
||||||
readmeUrl="https://github.com/MustardChef/WSABuilds/blob/master/Documentation/Usage%20Guides/Post-Installation%20Guides/Magisk/MindTheGapps%20and%20AMZ/Alpha.md"
|
|
||||||
elif [ "$MAGISK_VER" = "delta" ]; then
|
|
||||||
# Open GitHub readme page for Magisk Delta and GappsAMZ
|
|
||||||
readmeUrl="https://github.com/MustardChef/WSABuilds/blob/master/Documentation/Usage%20Guides/Post-Installation%20Guides/Magisk/MindTheGapps%20and%20AMZ/Delta.md"
|
|
||||||
fi
|
|
||||||
sudo sed -i "/Start-Process \"shell:AppsFolder\\\\MicrosoftCorporationII.WindowsSubsystemForAndroid_8wekyb3d8bbwe!SettingsApp\"/a\ \ \ \ Start-Process \"$readmeUrl\"" ../installer/Install.ps1
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
cp "../installer/$ARCH/Install.ps1" "$WORK_DIR/wsa/$ARCH" || abort
|
cp "../installer/$ARCH/Install.ps1" "$WORK_DIR/wsa/$ARCH" || abort
|
||||||
find "$WORK_DIR/wsa/$ARCH" -not -path "*/uwp*" -not -path "*/pri*" -not -path "*/xml*" -printf "%P\n" | sed -e 's@/@\\@g' -e '/^$/d' > "$WORK_DIR/wsa/$ARCH/filelist.txt" || abort
|
find "$WORK_DIR/wsa/$ARCH" -not -path "*/uwp*" -not -path "*/pri*" -not -path "*/xml*" -printf "%P\n" | sed -e 's@/@\\@g' -e '/^$/d' > "$WORK_DIR/wsa/$ARCH/filelist.txt" || abort
|
||||||
|
@ -1,23 +1,3 @@
|
|||||||
#!/usr/bin/python3
|
|
||||||
#
|
|
||||||
# This file is part of MagiskOnWSALocal.
|
|
||||||
#
|
|
||||||
# MagiskOnWSALocal is free software: you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU Affero General Public License as
|
|
||||||
# published by the Free Software Foundation, either version 3 of the
|
|
||||||
# License, or (at your option) any later version.
|
|
||||||
#
|
|
||||||
# MagiskOnWSALocal is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU Affero General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU Affero General Public License
|
|
||||||
# along with MagiskOnWSALocal. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
#
|
|
||||||
# Copyright (C) 2023 LSPosed Contributors
|
|
||||||
#
|
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
import zipfile
|
import zipfile
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
@ -25,7 +5,6 @@ import platform
|
|||||||
import os
|
import os
|
||||||
from typing import Any, OrderedDict
|
from typing import Any, OrderedDict
|
||||||
|
|
||||||
|
|
||||||
class Prop(OrderedDict):
|
class Prop(OrderedDict):
|
||||||
def __init__(self, props: str = ...) -> None:
|
def __init__(self, props: str = ...) -> None:
|
||||||
super().__init__()
|
super().__init__()
|
||||||
@ -42,63 +21,61 @@ class Prop(OrderedDict):
|
|||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return '\n'.join(f'{item}={self[item]}' for item in self)
|
return '\n'.join(f'{item}={self[item]}' for item in self)
|
||||||
|
|
||||||
|
|
||||||
is_x86_64 = platform.machine() in ("AMD64", "x86_64")
|
is_x86_64 = platform.machine() in ("AMD64", "x86_64")
|
||||||
host_abi = "x64" if is_x86_64 else "arm64"
|
host_abi = "x64" if is_x86_64 else "arm64"
|
||||||
arch = sys.argv[1]
|
arch = sys.argv[1]
|
||||||
magisk_zip = sys.argv[2]
|
magisk_zip = sys.argv[2]
|
||||||
workdir = Path(sys.argv[3]) / "magisk"
|
workdir = Path(sys.argv[3]) / "magisk"
|
||||||
if not Path(workdir).is_dir():
|
if not Path(workdir).is_dir():
|
||||||
workdir.mkdir()
|
workdir.mkdir(parents=True, exist_ok=True)
|
||||||
|
|
||||||
abi_map = {"x64": ["x86_64", "x86"], "arm64": ["arm64-v8a", "armeabi-v7a"]}
|
abi_map = {"x64": ["x86_64", "x86"], "arm64": ["arm64-v8a", "armeabi-v7a"]}
|
||||||
|
|
||||||
|
|
||||||
def extract_as(zip, name, as_name, dir):
|
def extract_as(zip, name, as_name, dir):
|
||||||
info = zip.getinfo(name)
|
info = zip.getinfo(name)
|
||||||
info.filename = as_name
|
info.filename = as_name
|
||||||
zip.extract(info, workdir / dir)
|
zip.extract(info, workdir / dir)
|
||||||
|
|
||||||
|
|
||||||
with zipfile.ZipFile(magisk_zip) as zip:
|
with zipfile.ZipFile(magisk_zip) as zip:
|
||||||
props = Prop(zip.comment.decode().replace('\000', '\n'))
|
props = Prop(zip.comment.decode().replace('\000', '\n'))
|
||||||
versionName = props.get("version")
|
versionName = props.get("version")
|
||||||
versionCode = props.get("versionCode")
|
versionCode = props.get("versionCode")
|
||||||
print(f"Magisk version: {versionName} ({versionCode})", flush=True)
|
print(f"Magisk version: {versionName} ({versionCode})", flush=True)
|
||||||
with open(os.environ['WSA_WORK_ENV'], 'r') as environ_file:
|
if 'WSA_WORK_ENV' in os.environ and Path(os.environ['WSA_WORK_ENV']).is_file():
|
||||||
env = Prop(environ_file.read())
|
with open(os.environ['WSA_WORK_ENV'], 'r') as environ_file:
|
||||||
env.MAGISK_VERSION_NAME = versionName
|
env = Prop(environ_file.read())
|
||||||
env.MAGISK_VERSION_CODE = versionCode
|
env.MAGISK_VERSION_NAME = versionName
|
||||||
with open(os.environ['WSA_WORK_ENV'], 'w') as environ_file:
|
env.MAGISK_VERSION_CODE = versionCode
|
||||||
environ_file.write(str(env))
|
with open(os.environ['WSA_WORK_ENV'], 'w') as environ_file:
|
||||||
extract_as(
|
environ_file.write(str(env))
|
||||||
zip, f"lib/{ abi_map[arch][0] }/libmagisk64.so", "magisk64", "magisk")
|
if f"lib/{ abi_map[arch][0] }/libmagisk64.so" in zip.namelist():
|
||||||
extract_as(
|
extract_as(zip, f"lib/{ abi_map[arch][0] }/libmagisk64.so", "magisk64", "magisk")
|
||||||
zip, f"lib/{ abi_map[arch][1] }/libmagisk32.so", "magisk32", "magisk")
|
extract_as(zip, f"lib/{ abi_map[arch][1] }/libmagisk32.so", "magisk32", "magisk")
|
||||||
|
else:
|
||||||
|
extract_as(zip, f"lib/{ abi_map[arch][0] }/libmagisk.so", "magisk", "magisk")
|
||||||
|
if f"lib/{ abi_map[arch][0] }/libinit-ld.so" in zip.namelist():
|
||||||
|
extract_as(zip, f"lib/{ abi_map[arch][0] }/libinit-ld.so", "init-ld", "magisk")
|
||||||
|
extract_as(zip, f"lib/{ abi_map[arch][0] }/libmagiskinit.so", "magiskinit", "magisk")
|
||||||
|
extract_as(zip, f"lib/{ abi_map[host_abi][0] }/libmagiskboot.so", "magiskboot", "magisk")
|
||||||
|
|
||||||
standalone_policy = False
|
standalone_policy = False
|
||||||
try:
|
try:
|
||||||
zip.getinfo(f"lib/{ abi_map[arch][0] }/libmagiskpolicy.so")
|
zip.getinfo(f"lib/{ abi_map[arch][0] }/libmagiskpolicy.so")
|
||||||
standalone_policy = True
|
standalone_policy = True
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
extract_as(
|
|
||||||
zip, f"lib/{ abi_map[arch][0] }/libmagiskinit.so", "magiskinit", "magisk")
|
|
||||||
if standalone_policy:
|
if standalone_policy:
|
||||||
extract_as(
|
extract_as(zip, f"lib/{ abi_map[arch][0] }/libmagiskpolicy.so", "magiskpolicy", "magisk")
|
||||||
zip, f"lib/{ abi_map[arch][0] }/libmagiskpolicy.so", "magiskpolicy", "magisk")
|
|
||||||
else:
|
else:
|
||||||
extract_as(
|
extract_as(zip, f"lib/{ abi_map[arch][0] }/libmagiskinit.so", "magiskpolicy", "magisk")
|
||||||
zip, f"lib/{ abi_map[arch][0] }/libmagiskinit.so", "magiskpolicy", "magisk")
|
|
||||||
extract_as(
|
extract_as(zip, f"lib/{ abi_map[arch][0] }/libbusybox.so", "busybox", "magisk")
|
||||||
zip, f"lib/{ abi_map[arch][0] }/libmagiskboot.so", "magiskboot", "magisk")
|
|
||||||
extract_as(
|
|
||||||
zip, f"lib/{ abi_map[arch][0] }/libbusybox.so", "busybox", "magisk")
|
|
||||||
if standalone_policy:
|
if standalone_policy:
|
||||||
extract_as(
|
extract_as(zip, f"lib/{ abi_map[host_abi][0] }/libmagiskpolicy.so", "magiskpolicy", ".")
|
||||||
zip, f"lib/{ abi_map[host_abi][0] }/libmagiskpolicy.so", "magiskpolicy", ".")
|
|
||||||
else:
|
else:
|
||||||
extract_as(
|
extract_as(zip, f"lib/{ abi_map[host_abi][0] }/libmagiskinit.so", "magiskpolicy", ".")
|
||||||
zip, f"lib/{ abi_map[host_abi][0] }/libmagiskinit.so", "magiskpolicy", ".")
|
|
||||||
extract_as(zip, f"assets/boot_patch.sh", "boot_patch.sh", "magisk")
|
extract_as(zip, f"assets/boot_patch.sh", "boot_patch.sh", "magisk")
|
||||||
extract_as(zip, f"assets/util_functions.sh",
|
extract_as(zip, f"assets/util_functions.sh", "util_functions.sh", "magisk")
|
||||||
"util_functions.sh", "magisk")
|
|
@ -15,7 +15,7 @@
|
|||||||
# You should have received a copy of the GNU Affero General Public License
|
# You should have received a copy of the GNU Affero General Public License
|
||||||
# along with MagiskOnWSALocal. If not, see <https://www.gnu.org/licenses/>.
|
# along with MagiskOnWSALocal. If not, see <https://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
# Copyright (C) 2023 LSPosed Contributors
|
# Copyright (C) 2024 LSPosed Contributors
|
||||||
#
|
#
|
||||||
|
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
@ -33,7 +33,7 @@ tempScript = sys.argv[3]
|
|||||||
file_name = sys.argv[4]
|
file_name = sys.argv[4]
|
||||||
print(f"Generating MindTheGapps download link: arch={arch}", flush=True)
|
print(f"Generating MindTheGapps download link: arch={arch}", flush=True)
|
||||||
abi_map = {"x64": "x86_64", "arm64": "arm64"}
|
abi_map = {"x64": "x86_64", "arm64": "arm64"}
|
||||||
res = requests.get(f"https://api.github.com/repos/MustardChef/MindTheGappsArchived/releases/latest")
|
res = requests.get(f"https://api.github.com/repos/YT-Advanced/MindTheGappsBuilder/releases/latest")
|
||||||
json_data = json.loads(res.content)
|
json_data = json.loads(res.content)
|
||||||
headers = res.headers
|
headers = res.headers
|
||||||
x_ratelimit_remaining = headers["x-ratelimit-remaining"]
|
x_ratelimit_remaining = headers["x-ratelimit-remaining"]
|
||||||
|
Binary file not shown.
@ -7,8 +7,8 @@
|
|||||||
---
|
---
|
||||||
|
|
||||||
## Next LTS Release Date:
|
## Next LTS Release Date:
|
||||||
### WSABuilds LTS 5 (v2407.40000.0.0):
|
### WSABuilds LTS 5 (v2407.40000.0.0) && Non-LTS Build Update for v2407.40000.0.0:
|
||||||
``TBD``
|
``Thursday 5th December 2024``
|
||||||
### WSABuilds LTS 4 (v2407.40000.0.0):
|
### WSABuilds LTS 4 (v2407.40000.0.0):
|
||||||
~~``Monday 15th July 2024``~~ **Available Now (via the Pre-release buttons in [Downloads](https://github.com/MustardChef/WSABuilds#downloads))**
|
~~``Monday 15th July 2024``~~ **Available Now (via the Pre-release buttons in [Downloads](https://github.com/MustardChef/WSABuilds#downloads))**
|
||||||
### WSABuilds LTS 3 (v2311.40000.5.0):
|
### WSABuilds LTS 3 (v2311.40000.5.0):
|
||||||
|
Loading…
Reference in New Issue
Block a user