Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Applying multiple method for root #1621

Merged
merged 37 commits into from
Jul 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
9ad870d
Rename generateGappsLink.py to generateAddonsLink.py
YT-Advanced Jul 30, 2024
7a76d67
Update build.sh
YT-Advanced Jul 30, 2024
0623326
Create generateGappsLink.py
YT-Advanced Jul 30, 2024
50b3938
Create build_with_mount.sh
YT-Advanced Jul 30, 2024
e3feb5f
Rename build.sh to build_with_lspinit.sh
YT-Advanced Jul 30, 2024
1641971
Update build_with_mount.sh
YT-Advanced Jul 30, 2024
731797f
Update build_with_mount.sh
YT-Advanced Jul 30, 2024
b1f2b53
Update build_with_mount.sh
YT-Advanced Jul 30, 2024
ce94080
Update custom_build.yml
YT-Advanced Jul 30, 2024
1f1b956
Update custom_build.yml
YT-Advanced Jul 30, 2024
54842f1
Add files via upload
YT-Advanced Jul 30, 2024
0552520
Update custom_build.yml
YT-Advanced Jul 30, 2024
e5235ac
Dmcs
YT-Advanced Jul 30, 2024
8d00ab0
Update build_with_mount.sh
YT-Advanced Jul 30, 2024
1a4149f
Update build_with_mount.sh
YT-Advanced Jul 30, 2024
ba5143d
Update extractMagisk.py
YT-Advanced Jul 30, 2024
b69b00c
Update generateGappsLink.py
YT-Advanced Jul 31, 2024
2267ad2
Update generateGappsLink.py
YT-Advanced Jul 31, 2024
eaead6b
Delete scripts/fixGappsProp.py
YT-Advanced Jul 31, 2024
ec2e230
Update generateGappsLink.py
YT-Advanced Jul 31, 2024
c9c309e
'Add'
YT-Advanced Jul 31, 2024
ac1ccff
Update build_with_mount.sh
YT-Advanced Jul 31, 2024
cd27e07
Update custom_build.yml
YT-Advanced Jul 31, 2024
0e411cb
Update build_with_mount.sh
YT-Advanced Jul 31, 2024
6bdcdfb
Update build_with_lspinit.sh
YT-Advanced Jul 31, 2024
0d57e34
A
YT-Advanced Jul 31, 2024
e338649
Update build.yml
YT-Advanced Jul 31, 2024
2d2e4cd
Update comment_on_issues.yml
YT-Advanced Jul 31, 2024
76c03f8
Create fixGappsProp.py
YT-Advanced Jul 31, 2024
80c0c8d
Update build_with_mount.sh
YT-Advanced Jul 31, 2024
eddfd18
Update build_with_mount.sh
YT-Advanced Jul 31, 2024
2eaab77
Update build_with_mount.sh
YT-Advanced Jul 31, 2024
3c722d0
Update build_with_lspinit.sh
YT-Advanced Jul 31, 2024
f3552b5
Update build_with_mount.sh
YT-Advanced Jul 31, 2024
b3d44f8
Update MakePri.ps1
YT-Advanced Jul 31, 2024
2f19989
Update MakePri.ps1
YT-Advanced Jul 31, 2024
9e4987f
Update comment_on_issues.yml
YT-Advanced Jul 31, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,12 @@ jobs:
fi

mkdir -p download
./scripts/build.sh --arch ${{ inputs.arch }} --release-type $RLS_TYPE --magisk-branch topjohnwu --magisk-ver stable $WITH_GAPPS --root-sol ${{ inputs.root }} --remove-amazon --compress-format zip
env:
API_KEY: ${{ secrets.API_KEY }}

if [[ "${{ inputs.root_sol }}" == *Magisk* ]]; then
./scripts/build_with_lspinit.sh --arch ${{ inputs.arch }} --release-type $RLS_TYPE --magisk-branch topjohnwu --magisk-ver stable $WITH_GAPPS --root-sol ${{ inputs.root }} --remove-amazon --compress-format 7zip
else
./scripts/build_with_mount.sh --arch ${{ inputs.arch }} --release-type $RLS_TYPE --magisk-branch topjohnwu --magisk-ver stable $WITH_GAPPS --root-sol ${{ inputs.root }} --remove-amazon --compress-format 7zip
fi

- name: Pass to Windows 💸
uses: actions/upload-artifact@v4
Expand Down
15 changes: 10 additions & 5 deletions .github/workflows/comment_on_issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ jobs:
subprocess.call(["echo '{}={}' >> $GITHUB_ENV".format(name, value)], shell=True)
if __name__ == '__main__':
issues = 'false'
ismagisk = 'false'
iscustom = 'true'
errinfo = body = ''
try:
Expand All @@ -95,11 +96,14 @@ jobs:
else:
iscustom = 'false'
errinfo = 'Argument is invaild, please update the body of the Issues'
if re.match(".*arch.*64.*release-type.*root-sol\smagisk.*magisk-branch.*magisk-ver.*compress-format.*", body):
ismagisk = 'true'
except Exception as e:
iscustom = 'false'
errinfo = 'Issues Body error, {}.'.format(e)
set_output('issues', issues)
set_output('iscustom', iscustom)
set_output('ismagisk', ismagisk)
set_output('errinfo', errinfo)
set_output('body', body)
Expand Down Expand Up @@ -183,13 +187,14 @@ jobs:
- name: Build WSA
id: wsa
if: env.iscustom == 'true' && success()
if: env.iscustom == 'true' && env.ismagisk == 'true' && success()
run: |
mkdir -p download
./scripts/build.sh ${{ env.body }}
env:
API_KEY: ${{ secrets.API_KEY }}

if [[ ${{ env.ismagisk }} == 'true' ]]; then
./scripts/build_with_lspinit.sh ${{ env.body }}
else
./scripts/build_with_mount.sh ${{ env.body }}
- name: Pass to Windows
if: env.iscustom == 'true' && success()
uses: actions/cache/save@v4
Expand Down
17 changes: 6 additions & 11 deletions .github/workflows/custom_build.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Custom Build (for testing purpose)
run-name: WSA ${{ inputs.release_type }} ${{ inputs.arch }} with ${{ inputs.root_sol }} and ${{ inputs.gapps_brand }} as ${{ inputs.custom_model }}
run-name: WSA ${{ inputs.release_type }} ${{ inputs.arch }} with ${{ inputs.root_sol }} and ${{ inputs.gapps_brand }}
on:
workflow_dispatch:
inputs:
Expand Down Expand Up @@ -38,12 +38,6 @@ on:
required: true
options: ["Magisk Stable","Magisk Beta","Magisk Canary","Magisk Debug"]
default: "Magisk Stable"
custom_model:
type: choice
description: Custom model
required: true
options: ["WSA Default", "Pixel 4a", "Pixel 4a (5G)", "Pixel 5", "Pixel 5a", "Pixel 6", "Pixel 6 Pro", "Pixel 6a", "Pixel 7", "Pixel 7 Pro", "Pixel 7a", "Pixel Tablet", "Pixel Fold"]
default: "Pixel 5"
compression:
type: choice
description: Compression format.
Expand Down Expand Up @@ -98,18 +92,19 @@ jobs:
run: |
declare -A opts=( ["RELEASE_TYPE,Retail"]="retail" ["RELEASE_TYPE,Release Preview"]="RP" ["RELEASE_TYPE,Insider Slow"]="WIS" ["RELEASE_TYPE,Insider Fast"]="WIF" ["RELEASE_TYPE,Insider Private"]="latest" ["ROOT_SOL,Magisk Official"]="topjohnwu" ["ROOT_SOL,Magisk Delta (HuskyDG)"]="HuskyDG" ["ROOT_SOL,Magisk Alpha (vvb2060)"]="vvb2060" ["ROOT_SOL,KernelSU"]="kernelsu" ["ROOT_SOL,Non-root"]="none" ["MAGISK_TYPE,Magisk Stable"]="stable" ["MAGISK_TYPE,Magisk Beta"]="beta" ["MAGISK_TYPE,Magisk Canary"]="canary" ["MAGISK_TYPE,Magisk Debug"]="debug" ["CUSTOM_MODEL,WSA Default"]="none" ["CUSTOM_MODEL,Pixel 4a"]="sunfish" ["CUSTOM_MODEL,Pixel 4a (5G)"]="bramble" ["CUSTOM_MODEL,Pixel 5"]="redfin" ["CUSTOM_MODEL,Pixel 5a"]="barbet" ["CUSTOM_MODEL,Pixel 6 Pro"]="raven" ["CUSTOM_MODEL,Pixel 6"]="oriole" ["CUSTOM_MODEL,Pixel 6a"]="bluejay" ["CUSTOM_MODEL,Pixel 7"]="panther" ["CUSTOM_MODEL,Pixel 7 Pro"]="cheetah" ["CUSTOM_MODEL,Pixel 7a"]="lynx" ["CUSTOM_MODEL,Pixel Tablet"]="tangorpro" ["CUSTOM_MODEL,Pixel Fold"]="felix" ["GAPPS_BRAND,MindTheGapps v13.0"]="--install-gapps" )
mkdir -p download
echo -e "user_code=$(cat $GITHUB_EVENT_PATH | jq -r '.inputs.user_code')" > download/.ms_account
if [[ "${{ inputs.root_sol }}" == *Magisk* ]]; then
MAGISK_BRANCH="${opts[ROOT_SOL,${{ inputs.root_sol }}]}"
ROOT_SOL="magisk"
./scripts/build_with_lspinit.sh --arch ${{ inputs.arch }} --release-type ${opts[RELEASE_TYPE,${{ inputs.release_type }}]} --magisk-branch "$MAGISK_BRANCH" --magisk-ver "${opts[MAGISK_TYPE,${{ inputs.magisk_channel }}]}" --root-sol $ROOT_SOL ${opts[GAPPS_BRAND,${{ inputs.gapps_brand }}]} ${opts[REMOVE_AMAZON,${{ inputs.remove_amazon }}]}
else
MAGISK_BRANCH="topjohnwu"
ROOT_SOL="${opts[ROOT_SOL,${{ inputs.root_sol }}]}"
./scripts/build_with_mount.sh --arch ${{ inputs.arch }} --release-type ${opts[RELEASE_TYPE,${{ inputs.release_type }}]} --magisk-branch "$MAGISK_BRANCH" --magisk-ver "${opts[MAGISK_TYPE,${{ inputs.magisk_channel }}]}" --root-sol $ROOT_SOL ${opts[GAPPS_BRAND,${{ inputs.gapps_brand }}]} ${opts[REMOVE_AMAZON,${{ inputs.remove_amazon }}]}
fi
mkdir -p download
echo -e "user_code=$(cat $GITHUB_EVENT_PATH | jq -r '.inputs.user_code')" > download/.ms_account
./scripts/build.sh --arch ${{ inputs.arch }} --release-type ${opts[RELEASE_TYPE,${{ inputs.release_type }}]} --magisk-branch "$MAGISK_BRANCH" --magisk-ver "${opts[MAGISK_TYPE,${{ inputs.magisk_channel }}]}" --root-sol $ROOT_SOL ${opts[GAPPS_BRAND,${{ inputs.gapps_brand }}]} ${opts[REMOVE_AMAZON,${{ inputs.remove_amazon }}]}
#--custom-model ${opts[CUSTOM_MODEL,${{ inputs.custom_model }}]}
- name: Pass to Windows 💸
uses: actions/cache/save@v4
with:
Expand Down
Binary file added bin/EROFS/fuse.erofs
Binary file not shown.
Binary file added bin/EROFS/mkfs.erofs
Binary file not shown.
2 changes: 2 additions & 0 deletions installer/arm64/MakePri.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ if (((Test-Path -Path $(Get-Content -Path .\filelist-pri.txt)) -eq $false).Count
}
}
$ProjectXml.Save($AppxManifestFile)
Remove-Item 'pri' -Recurse -Force
Remove-Item 'xml' -Recurse -Force
Remove-Item 'makepri.exe' -Force
Remove-Item 'filelist-pri.txt' -Force
Remove-Item $PSCommandPath -Force
Expand Down
2 changes: 2 additions & 0 deletions installer/x64/MakePri.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ $(Get-Item .\xml\* -Exclude "priconfig.xml" -Include "*.xml") | ForEach-Object {
}
$ProjectXml.Save($AppxManifestFile)

Remove-Item 'pri' -Recurse -Force
Remove-Item 'xml' -Recurse -Force
Remove-Item 'filelist-pri.txt' -Force
Remove-Item $PSCommandPath -Force
exit 0
Binary file added linker/libc.so
Binary file not shown.
Binary file added linker/libdl.so
Binary file not shown.
Binary file added linker/libm.so
Binary file not shown.
Binary file added linker/linker64
Binary file not shown.
63 changes: 35 additions & 28 deletions scripts/build.sh → scripts/build_with_lspinit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,22 +81,6 @@ MAGISK_VER_MAP=(
"alpha"
)

# CUSTOM_MODEL_MAP=(
# "none"
# "sunfish"
# "bramble"
# "redfin"
# "barbet"
# "raven"
# "oriole"
# "bluejay"
# "panther"
# "cheetah"
# "lynx"
# "tangorpro"
# "felix"
# )

ROOT_SOL_MAP=(
"magisk"
"kernelsu"
Expand Down Expand Up @@ -197,7 +181,6 @@ 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 "$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[@]}"

# shellcheck disable=SC1091
Expand Down Expand Up @@ -257,7 +240,7 @@ update_ksu_zip_name() {
echo "Generating WSA Download Links"
python3 generateWSALinks.py "$ARCH" "$RELEASE_TYPE" "$DOWNLOAD_DIR" "$DOWNLOAD_WSA_CONF_NAME" || abort

if [ "$RELEASE_TYPE" == "latest" ]; then
if [ "$RELEASE_TYPE" = "latest" ]; then
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
printf " dir=%s\n" "$DOWNLOAD_DIR" >> "$DOWNLOAD_DIR/$DOWNLOAD_WSA_CONF_NAME" || abort
printf " out=wsa-latest.zip\n" >> "$DOWNLOAD_DIR/$DOWNLOAD_WSA_CONF_NAME" || abort
Expand Down Expand Up @@ -301,7 +284,7 @@ if [ "$ROOT_SOL" = "kernelsu" ]; then
fi
if [ "$HAS_GAPPS" ]; then
update_gapps_files_name
python3 generateGappsLink.py "$ARCH" "$DOWNLOAD_DIR" "$DOWNLOAD_CONF_NAME" "$ANDROID_API" "$GAPPS_IMAGE_NAME" || abort
python3 generateAddonsLink.py "$ARCH" "$DOWNLOAD_DIR" "$DOWNLOAD_CONF_NAME" "$ANDROID_API" "$GAPPS_IMAGE_NAME" || abort
fi
if [ -f "$DOWNLOAD_DIR/$DOWNLOAD_CONF_NAME" ]; then
echo "Downloading Artifacts"
Expand Down Expand Up @@ -424,18 +407,42 @@ if [ "$REMOVE_AMAZON" ]; then
fi

echo "Removing signature and add scripts"
rm -rf "${WORK_DIR:?}"/wsa/"$ARCH"/\[Content_Types\].xml "$WORK_DIR/wsa/$ARCH/AppxBlockMap.xml" "$WORK_DIR/wsa/$ARCH/AppxSignature.p7x" "$WORK_DIR/wsa/$ARCH/AppxMetadata" || abort
cp "$vclibs_PATH" "$xaml_PATH" "$WORK_DIR/wsa/$ARCH" || abort
cp "$UWPVCLibs_PATH" "$xaml_PATH" "$WORK_DIR/wsa/$ARCH" || abort
cp "../installer/$ARCH/Install.ps1" "$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

sudo rm -rf "${WORK_DIR:?}"/wsa/"$ARCH"/\[Content_Types\].xml "$WORK_DIR/wsa/$ARCH/AppxBlockMap.xml" "$WORK_DIR/wsa/$ARCH/AppxSignature.p7x" "$WORK_DIR/wsa/$ARCH/AppxMetadata" || abort
if [ "$ARCH" = "x64" ]; then
sudo rm -rf "$WORK_DIR/wsa/$ARCH/arm64/" || abort
else
sudo rm -rf "$WORK_DIR/wsa/$ARCH/amd64/" || abort
fi
mkdir "$WORK_DIR/wsa/$ARCH/uwp"
cp "$vclibs_PATH" "$xaml_PATH" "$WORK_DIR/wsa/$ARCH/uwp/" || abort
cp "$UWPVCLibs_PATH" "$xaml_PATH" "$WORK_DIR/wsa/$ARCH/uwp/" || abort
cp "../xml/priconfig.xml" "$WORK_DIR/wsa/$ARCH/xml/" || abort
cp "../installer/$ARCH/MakePri.ps1" "$WORK_DIR/wsa/$ARCH" || abort
if [[ "$ROOT_SOL" = "none" ]] && [[ "$HAS_GAPPS" ]] && [[ "$REMOVE_AMAZON" ]]; then
sed -i -e 's@Start-Process\ "wsa://com.topjohnwu.magisk"@@g' "../installer/$ARCH/Install.ps1"
sed -i -e 's@Start-Process\ "wsa://com.android.vending"@@g' "../installer/$ARCH/Install.ps1"
else
if [[ "$ROOT_SOL" == "none" ]]; then
sed -i -e 's@Start-Process "wsa://com.topjohnwu.magisk"@@g' "../installer/$ARCH/Install.ps1"
elif [[ "$ROOT_SOL" = "kernelsu" ]]; then
sed -i -e 's@wsa://com.topjohnwu.magisk@https://github.com/YT-Advanced/WSA-Script/blob/HEAD/docs/Guides/KernelSU.md@g' "../installer/$ARCH/Install.ps1"
elif [[ "$MAGISK_BRANCH" = "HuskyDG" ]]; then
sed -i -e 's@com.topjohnwu.magisk@io.github.huskydg.magisk@g' "../installer/$ARCH/Install.ps1"
elif [[ "$MAGISK_BRANCH" = "vvb2060" ]]; then
sed -i -e 's@com.topjohnwu.magisk@io.github.vvb2060.magisk@g' "../installer/$ARCH/Install.ps1"
fi
if [[ -z "$HAS_GAPPS" ]] && [[ -z "$REMOVE_AMAZON" ]]; then
sed -i -e 's@com.android.vending@com.amazon.venezia@g' "../installer/$ARCH/Install.ps1"
elif [[ -z "$HAS_GAPPS" ]]; then
sed -i -e 's@Start-Process\ "wsa://com.android.vending"@@g' "../installer/$ARCH/Install.ps1"
fi
fi
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/pri" -printf "%P\n" | sed -e 's/^/pri\\/' -e '/^$/d' > "$WORK_DIR/wsa/$ARCH/filelist-pri.txt" || abort
find "$WORK_DIR/wsa/$ARCH/xml" -printf "%P\n" | sed -e 's/^/xml\\/' -e '/^$/d' >> "$WORK_DIR/wsa/$ARCH/filelist-pri.txt" || abort
echo -e "Done\n"
cp "../installer/$ARCH/MakePri.ps1" "$WORK_DIR/wsa/$ARCH" || abort
cp ../installer/Run.bat "$WORK_DIR/wsa/$ARCH" || abort
echo -e "Remove signature and Add scripts done\n"

if [[ "$ROOT_SOL" = "none" ]]; then
name1=""
Expand Down
Loading