mirror of
https://github.com/MustardChef/WSABuilds.git
synced 2024-11-23 03:39:16 +01:00
Merge branch 'LSPosed:main' into master
This commit is contained in:
commit
971dad6737
53
.github/workflows/magisk.yml
vendored
53
.github/workflows/magisk.yml
vendored
@ -11,6 +11,16 @@ on:
|
||||
- x64
|
||||
- arm64
|
||||
- x64 & arm64
|
||||
release_type:
|
||||
description: "WSA release type"
|
||||
required: true
|
||||
default: "retail"
|
||||
type: choice
|
||||
options:
|
||||
- retail
|
||||
- release preview
|
||||
- insider slow
|
||||
- insider fast
|
||||
magisk_apk:
|
||||
description: "Magisk version"
|
||||
required: true
|
||||
@ -80,9 +90,10 @@ jobs:
|
||||
- name: Dependencies
|
||||
run: |
|
||||
pip3 install beautifulsoup4 lxml
|
||||
sudo apt-get update && sudo apt-get install setools lzip qemu-utils wine winetricks
|
||||
wget -qO- "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/archive/$GITHUB_REF.tar.gz" | sudo tar --wildcards -zxvf- -C ~ --strip-component=2 '*/wine/*'
|
||||
sudo apt-get update && sudo apt-get install setools lzip wine winetricks patchelf
|
||||
wget -qO- "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/archive/$GITHUB_REF.tar.gz" | sudo tar --wildcards -zxvf- -C ~ --strip-component=2 '*/wine/*' '*/linker/*'
|
||||
winetricks msxml6
|
||||
echo "163.172.251.201 store.rg-adguard.net" | sudo tee -a /etc/hosts
|
||||
- name: Download WSA
|
||||
shell: python
|
||||
run: |
|
||||
@ -94,10 +105,12 @@ jobs:
|
||||
import urllib.request
|
||||
|
||||
arch = "${{ matrix.arch }}"
|
||||
release_type_map = {"retail": "Retail", "release preview": "RP", "insider slow": "WIS", "insider fast": "WIF"}
|
||||
release_type = release_type_map["${{ github.event.inputs.release_type }}"] if "${{ github.event.inputs.release_type }}" != "" else "Retail"
|
||||
|
||||
res = requests.post("https://store.rg-adguard.net/api/GetFiles", "type=CategoryId&url=858014f3-3934-4abe-8078-4aa193e74ca8&ring=WIS&lang=en-US", headers={
|
||||
res = requests.post("https://store.rg-adguard.net/api/GetFiles", f"type=CategoryId&url=858014f3-3934-4abe-8078-4aa193e74ca8&ring={release_type}&lang=en-US", headers={
|
||||
"content-type": "application/x-www-form-urlencoded"
|
||||
})
|
||||
}, verify=False) # source site has expired cert
|
||||
html = BeautifulSoup(res.content, "lxml")
|
||||
|
||||
a = html.find("a", string=re.compile(f"Microsoft\.UI\.Xaml\..*_{arch}_.*\.appx"))
|
||||
@ -258,13 +271,10 @@ jobs:
|
||||
- name: Mount images
|
||||
run: |
|
||||
sudo mkdir system
|
||||
sudo mkdir userdata
|
||||
sudo mount -o loop ${{ matrix.arch }}/system.img system
|
||||
sudo mount -o loop ${{ matrix.arch }}/vendor.img system/vendor
|
||||
sudo mount -o loop ${{ matrix.arch }}/product.img system/product
|
||||
sudo mount -o loop ${{ matrix.arch }}/system_ext.img system/system_ext
|
||||
qemu-img convert -O raw ${{ matrix.arch }}/userdata.vhdx userdata.img
|
||||
sudo mount -o loop userdata.img userdata
|
||||
- name: Integrate Magisk
|
||||
if: ${{ github.event.inputs.root_sol == 'magisk' || github.event.inputs.root_sol == '' }}
|
||||
run: |
|
||||
@ -273,13 +283,12 @@ jobs:
|
||||
sudo chown root:root system/sbin
|
||||
sudo chmod 0700 system/sbin
|
||||
sudo cp magisk/* system/sbin/
|
||||
sudo mkdir -p userdata/adb/magisk
|
||||
sudo chmod -R 700 userdata/adb
|
||||
sudo cp magisk/* userdata/adb/magisk/
|
||||
sudo find userdata/adb/magisk -type f -exec chmod 0755 {} \;
|
||||
sudo cp magisk.zip userdata/adb/magisk/magisk.apk
|
||||
sudo cp magisk.zip system/sbin/magisk.apk
|
||||
sudo tee -a system/sbin/loadpolicy.sh <<EOF
|
||||
#!/system/bin/sh
|
||||
mkdir -p /data/adb/magisk
|
||||
cp /sbin/* /data/adb/magisk/
|
||||
chmod -R 755 /data/adb/magisk
|
||||
restorecon -R /data/adb/magisk
|
||||
for module in \$(ls /data/adb/modules); do
|
||||
if ! [ -f "/data/adb/modules/\$module/disable" ] && [ -f "/data/adb/modules/\$module/sepolicy.rule" ]; then
|
||||
@ -290,6 +299,10 @@ jobs:
|
||||
sudo find system/sbin -type f -exec chmod 0755 {} \;
|
||||
sudo find system/sbin -type f -exec chown root:root {} \;
|
||||
sudo find system/sbin -type f -exec chcon --reference system/product {} \;
|
||||
sudo patchelf --replace-needed libc.so "${HOME}/libc.so" ./magiskpolicy || true
|
||||
sudo patchelf --replace-needed libm.so "${HOME}/libm.so" ./magiskpolicy || true
|
||||
sudo patchelf --replace-needed libdl.so "${HOME}/libdl.so" ./magiskpolicy || true
|
||||
sudo patchelf --set-interpreter "${HOME}/linker64" ./magiskpolicy || true
|
||||
chmod +x ./magiskpolicy
|
||||
echo '/dev/wsa-magisk(/.*)? u:object_r:magisk_file:s0' | sudo tee -a system/vendor/etc/selinux/vendor_file_contexts
|
||||
echo '/data/adb/magisk(/.*)? u:object_r:magisk_file:s0' | sudo tee -a system/vendor/etc/selinux/vendor_file_contexts
|
||||
@ -315,6 +328,7 @@ jobs:
|
||||
mkdir /dev/wsa-magisk/.magisk 700
|
||||
mkdir /dev/wsa-magisk/.magisk/mirror 700
|
||||
mkdir /dev/wsa-magisk/.magisk/block 700
|
||||
copy /sbin/magisk.apk /dev/wsa-magisk/stub.apk
|
||||
rm /dev/.magisk_unblock
|
||||
start IhhslLhHYfse
|
||||
start FAhW7H9G5sf
|
||||
@ -338,6 +352,8 @@ jobs:
|
||||
oneshot
|
||||
|
||||
on property:sys.boot_completed=1
|
||||
mkdir /data/adb/magisk 755
|
||||
copy /sbin/magisk.apk /data/adb/magisk/magisk.apk
|
||||
start YqCTLTppv3ML
|
||||
|
||||
service YqCTLTppv3ML /dev/wsa-magisk/magisk --boot-complete
|
||||
@ -391,6 +407,10 @@ jobs:
|
||||
sudo find system/system/{app,framework,priv-app} -type f -exec chcon --reference=system/system/framework/ext.jar {} \;
|
||||
ls gapps/etc/ | xargs -n 1 -I dir sudo find system/system/etc/dir -type f -exec chcon --reference=system/system/etc/permissions {} \;
|
||||
sudo find system/product/{app,etc,overlay,priv-app} -type f -exec chcon --reference=system/product/etc/permissions/privapp-permissions-venezia.xml {} \;
|
||||
sudo patchelf --replace-needed libc.so "${HOME}/libc.so" ./magiskpolicy || true
|
||||
sudo patchelf --replace-needed libm.so "${HOME}/libm.so" ./magiskpolicy || true
|
||||
sudo patchelf --replace-needed libdl.so "${HOME}/libdl.so" ./magiskpolicy || true
|
||||
sudo patchelf --set-interpreter "${HOME}/linker64" ./magiskpolicy || true
|
||||
chmod +x ./magiskpolicy
|
||||
sudo ./magiskpolicy --load system/vendor/etc/selinux/precompiled_sepolicy --save system/vendor/etc/selinux/precompiled_sepolicy "allow gmscore_app gmscore_app vsock_socket { create connect write read }" "allow gmscore_app device_config_runtime_native_boot_prop file read" "allow gmscore_app system_server_tmpfs dir search" "allow gmscore_app system_server_tmpfs file open"
|
||||
- name: Fix GApps prop
|
||||
@ -472,8 +492,6 @@ jobs:
|
||||
sudo umount system/product
|
||||
sudo umount system/system_ext
|
||||
sudo umount system
|
||||
sudo umount userdata
|
||||
qemu-img convert -o subformat=dynamic -f raw -O vhdx userdata.img ${{ matrix.arch }}/userdata.vhdx
|
||||
- name: Shrink images
|
||||
run: |
|
||||
e2fsck -yf ${{ matrix.arch }}/system.img
|
||||
@ -507,6 +525,7 @@ jobs:
|
||||
}
|
||||
|
||||
if (-not (Test-Administrator)) {
|
||||
Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Bypass -Force
|
||||
\$proc = Start-Process -PassThru -WindowStyle Hidden -Verb RunAs powershell.exe -Args "-executionpolicy bypass -command Set-Location '\$PSScriptRoot'; &'\$PSCommandPath' EVAL"
|
||||
\$proc.WaitForExit()
|
||||
if (\$proc.ExitCode -ne 0) {
|
||||
@ -521,6 +540,12 @@ jobs:
|
||||
exit
|
||||
}
|
||||
|
||||
if (((Test-Path -Path $(ls -Q ./${{ matrix.arch }} | paste -sd "," -)) -eq \$false).Count) {
|
||||
Write-Error "Some files are missing in the zip. Please try to download it again from the browser downloader, or try to run the workflow again. Press any key to exist"
|
||||
\$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"
|
||||
|
||||
\$VMP = Get-WindowsOptionalFeature -Online -FeatureName 'VirtualMachinePlatform'
|
||||
|
@ -7,6 +7,7 @@
|
||||
- Support both ARM64 and x64
|
||||
- Support all OpenGApps variants except for aroma (aroma does not support x86_64, please use super instead)
|
||||
- Fix external storage access of DocumentUI
|
||||
- Fix VPN dialog not showing (use our [VpnDialogs app](https://github.com/LSPosed/VpnDialogs))
|
||||
- Unattended installation
|
||||
- Automatically activates developers mode in Windows 11
|
||||
- Update to new version while preserving data with one-click script
|
||||
@ -25,9 +26,9 @@ https://user-images.githubusercontent.com/5022927/145696886-e13ebfc1-ff25-4410-8
|
||||
![Workflow](https://docs.github.com/assets/images/actions-select-workflow.png)
|
||||
1. Above the list of workflow runs, select **Run workflow**
|
||||
![Run Workflow](https://docs.github.com/assets/images/actions-workflow-dispatch.png)
|
||||
1. Input the download link of Magisk and select the [OpenGApps variant](https://github.com/opengapps/opengapps/wiki#variants) (none is no OpenGApps) you like, select the root solution (none means no root) and click **Run workflow**
|
||||
1. Select the version of Magisk and select the [OpenGApps variant](https://github.com/opengapps/opengapps/wiki#variants) (none is no OpenGApps) you like, select the root solution (none means no root), select WSA version and its architecture (mostly x64) and click **Run workflow**
|
||||
![Run Workflow](https://docs.github.com/assets/images/actions-manually-run-workflow.png)
|
||||
1. Wait for the action to complete and download the artifact
|
||||
1. Wait for the action to complete and download the artifact **DO NOT download it via multithread downloaders like IDM or ADM**
|
||||
![Download](https://docs.github.com/assets/images/help/repository/artifact-drop-down-updated.png)
|
||||
1. Unzip the artifact
|
||||
- The size shown in the webpage is uncompressed size and the zip you download will be compressed. So the size of the zip will be much less than the size shown in the webpage.
|
||||
|
BIN
arm64/system/system/priv-app/VpnDialogs/VpnDialogs.apk
Normal file
BIN
arm64/system/system/priv-app/VpnDialogs/VpnDialogs.apk
Normal file
Binary file not shown.
BIN
linker/libc.so
Normal file
BIN
linker/libc.so
Normal file
Binary file not shown.
BIN
linker/libdl.so
Normal file
BIN
linker/libdl.so
Normal file
Binary file not shown.
BIN
linker/libm.so
Normal file
BIN
linker/libm.so
Normal file
Binary file not shown.
BIN
linker/linker64
Executable file
BIN
linker/linker64
Executable file
Binary file not shown.
BIN
x64/system/system/priv-app/VpnDialogs/VpnDialogs.apk
Normal file
BIN
x64/system/system/priv-app/VpnDialogs/VpnDialogs.apk
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user