mirror of
https://github.com/MustardChef/WSABuilds.git
synced 2024-11-26 13:14:16 +01:00
Remove adb and monkey
This commit is contained in:
parent
04d75adf33
commit
d6324a2ab1
60
.github/workflows/magisk.yml
vendored
60
.github/workflows/magisk.yml
vendored
@ -360,7 +360,7 @@ jobs:
|
||||
sudo umount system/system_ext
|
||||
sudo umount system
|
||||
sudo umount userdata
|
||||
qemu-img convert -p -o subformat=dynamic -f raw -O vhdx userdata.img ${{ matrix.arch }}/userdata.vhdx
|
||||
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
|
||||
@ -371,14 +371,6 @@ jobs:
|
||||
resize2fs -M ${{ matrix.arch }}/product.img
|
||||
e2fsck -yf ${{ matrix.arch }}/system_ext.img
|
||||
resize2fs -M ${{ matrix.arch }}/system_ext.img
|
||||
- name: add ADB
|
||||
if: ${{ github.event.inputs.root_sol == 'magisk' || github.event.inputs.root_sol == '' }}
|
||||
run: |
|
||||
wget https://dl.google.com/android/repository/platform-tools-latest-windows.zip -Oadb.zip
|
||||
unzip adb.zip platform-tools/?db*
|
||||
cp platform-tools/?db* ${{ matrix.arch }}/.
|
||||
rm -r platform-tools
|
||||
rm adb.zip
|
||||
- name: Remove signature and add scripts
|
||||
run: |
|
||||
rm -rf ${{ matrix.arch }}/\[Content_Types\].xml ${{ matrix.arch }}/AppxBlockMap.xml ${{ matrix.arch }}/AppxSignature.p7x ${{ matrix.arch }}/AppxMetadata
|
||||
@ -403,54 +395,6 @@ jobs:
|
||||
\$ErrorActionPreference = "Stop"
|
||||
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock" /t REG_DWORD /f /v "AllowDevelopmentWithoutDevLicense" /d "1"
|
||||
Add-AppxPackage -Register .\AppxManifest.xml
|
||||
if (Test-Path "./Magisk.apk") {
|
||||
Write-Output "Magisk detected, installing..."
|
||||
\$i = 20
|
||||
do{
|
||||
start-sleep -s 0.5
|
||||
\$i--
|
||||
}until( (\$i -eq 0) -or ((get-process).Name -contains "wsaclient") )
|
||||
if ((get-process).Name -contains "wsaclient") {
|
||||
Stop-Process -Name WsaClient
|
||||
}
|
||||
\$regHive = "\$env:LOCALAPPDATA/Packages/MicrosoftCorporationII.WindowsSubsystemForAndroid_8wekyb3d8bbwe/Settings/settings.dat"
|
||||
\$regMountPoint = "HKLM\WSA"
|
||||
Write-Output "Mounting WSA registry hive"
|
||||
reg load \$regMountPoint \$regHive
|
||||
\$develbit = "1"
|
||||
\$reg = "Windows Registry Editor Version 5.00\`n\`n"
|
||||
\$reg += "[HKEY_LOCAL_MACHINE\WSA]\`n\`n"
|
||||
\$reg += "[HKEY_LOCAL_MACHINE\WSA\LocalState]\`n"
|
||||
\$reg += "\`"DeveloperModeEnabled\`"=hex(5f5e10b):0"+ \$develbit + ",07,b9,6f,f3,d3,dc,d7,01\`n"
|
||||
\$reg += "\`"OptionalDiagnosticDataEnabled\`"=hex(5f5e10b):00,dc,38,ba,75,ec,dc,d7,01\`n"
|
||||
\$reg | Out-File "./wsa.reg"
|
||||
Write-Output "Patching WSA registry..."
|
||||
reg import "./wsa.reg"
|
||||
rm -force wsa*.reg
|
||||
[gc]::collect()
|
||||
start-sleep -s 3
|
||||
Write-Output "Unmounting patched WSA registry hive."
|
||||
reg unload \$regMountPoint
|
||||
Write-Output "starting an App to force the creation of the rw sdcard"
|
||||
start-process "\$env:LOCALAPPDATA/Microsoft/WindowsApps/MicrosoftCorporationII.WindowsSubsystemForAndroid_8wekyb3d8bbwe/WsaClient.exe" -Args "/launch wsa://com.android.shell"
|
||||
Write-Output "Waiting for the Android system to boot for the first time..."
|
||||
./adb kill-server
|
||||
do{}until((./adb connect localhost:58526).Contains("connected"))
|
||||
do{
|
||||
\$output=(./adb devices)
|
||||
foreach(\$line in \$output){
|
||||
if(\$line.Contains("localhost")){
|
||||
\$connection=\$line
|
||||
}
|
||||
}
|
||||
}until(\$connection.Contains("device"))
|
||||
Write-Output "WSA loaded and Developer mode is ON."
|
||||
do{start-sleep -s 0.5}until(./adb shell "ps -d | grep 'com.amazon.venezia'")
|
||||
./adb shell am force-stop com.amazon.venezia
|
||||
Write-Output "Installing Magisk App..."
|
||||
./adb install Magisk.apk
|
||||
./adb shell monkey -p com.topjohnwu.magisk -c android.intent.category.LAUNCHER 1
|
||||
}
|
||||
EOF
|
||||
- name: Generate artifact name
|
||||
run: |
|
||||
@ -460,6 +404,7 @@ jobs:
|
||||
name1=""
|
||||
elif [[ "$root" = "" ]]; then
|
||||
name1="-with-magisk"
|
||||
echo 'Start-Process "wsa://com.topjohnwu.magisk"' >> ${{ matrix.arch }}/Install.ps1
|
||||
else
|
||||
name1="-with-${root}"
|
||||
fi
|
||||
@ -467,6 +412,7 @@ jobs:
|
||||
name2="-NoGApps"
|
||||
else
|
||||
name2="-GApps-${variant}"
|
||||
echo 'Start-Process "wsa://com.android.vending"' >> ${{ matrix.arch }}/Install.ps1
|
||||
fi
|
||||
echo "artifact_name=WSA${name1}${name2}_${{ env.WSA_VER }}_${{ matrix.arch }}_${{ env.WSA_REL }}" >> $GITHUB_ENV
|
||||
- name: Upload WSA
|
||||
|
Loading…
Reference in New Issue
Block a user