mirror of
https://github.com/MustardChef/WSABuilds.git
synced 2024-12-26 11:21:49 +01:00
Merge branch 'main' of https://github.com/LSPosed/MagiskOnWSA
This commit is contained in:
commit
739c36d442
25
.github/workflows/magisk.yml
vendored
25
.github/workflows/magisk.yml
vendored
@ -55,6 +55,14 @@ on:
|
|||||||
options:
|
options:
|
||||||
- 11.0
|
- 11.0
|
||||||
- 12.1
|
- 12.1
|
||||||
|
remove_amazon:
|
||||||
|
description: "Remove Amazon AppStore"
|
||||||
|
required: true
|
||||||
|
default: "keep"
|
||||||
|
type: choice
|
||||||
|
options:
|
||||||
|
- keep
|
||||||
|
- remove
|
||||||
root_sol:
|
root_sol:
|
||||||
description: "Root solution"
|
description: "Root solution"
|
||||||
required: true
|
required: true
|
||||||
@ -280,16 +288,20 @@ jobs:
|
|||||||
unzip -p gapps.zip {Core,GApps}/'*.lz' | tar --lzip -C gapps -xvf - -i --strip-components=2 --exclude='setupwizardtablet-x86_64' --exclude='packageinstallergoogle-all' --exclude='speech-common' --exclude='markup-lib-arm' --exclude='markup-lib-arm64' --exclude='markup-all' --exclude='setupwizarddefault-x86_64' --exclude='pixellauncher-all' --exclude='pixellauncher-common'
|
unzip -p gapps.zip {Core,GApps}/'*.lz' | tar --lzip -C gapps -xvf - -i --strip-components=2 --exclude='setupwizardtablet-x86_64' --exclude='packageinstallergoogle-all' --exclude='speech-common' --exclude='markup-lib-arm' --exclude='markup-lib-arm64' --exclude='markup-all' --exclude='setupwizarddefault-x86_64' --exclude='pixellauncher-all' --exclude='pixellauncher-common'
|
||||||
|
|
||||||
# TODO: calculate the size dynamically for better compatibility
|
# TODO: calculate the size dynamically for better compatibility
|
||||||
e2fsck -yf ${{ matrix.arch }}/product.img
|
|
||||||
resize2fs ${{ matrix.arch }}/product.img 1024M
|
|
||||||
e2fsck -yf ${{ matrix.arch }}/system_ext.img
|
e2fsck -yf ${{ matrix.arch }}/system_ext.img
|
||||||
resize2fs ${{ matrix.arch }}/system_ext.img 200M
|
resize2fs ${{ matrix.arch }}/system_ext.img 200M
|
||||||
- name: Expand vendor and system
|
- name: Expand vendor and system
|
||||||
run: |
|
run: |
|
||||||
|
e2fsck -yf ${{ matrix.arch }}/product.img
|
||||||
|
product_size=$(( $(du -sB512 ${{ matrix.arch }}/product.img | cut -f1) + 20000 ))
|
||||||
|
if [ -d gapps/product ]; then
|
||||||
|
product_size=$(( $product_size + $(du -sB512 gapps/product | cut -f1) ))
|
||||||
|
fi
|
||||||
|
resize2fs ${{ matrix.arch }}/product.img "$product_size"s
|
||||||
e2fsck -yf ${{ matrix.arch }}/system.img
|
e2fsck -yf ${{ matrix.arch }}/system.img
|
||||||
system_size=$(( $(du -sB512 ${{ matrix.arch }}/system.img | cut -f1) + 20000 ))
|
system_size=$(( $(du -sB512 ${{ matrix.arch }}/system.img | cut -f1) + 20000 ))
|
||||||
if [ -d gapps ]; then
|
if [ -d gapps ]; then
|
||||||
system_size=$(( $system_size + $(du -sB512 gapps | cut -f1) ))
|
system_size=$(( $system_size + $(du -sB512 gapps | cut -f1) - $(du -sB512 gapps/product | cut -f1) ))
|
||||||
fi
|
fi
|
||||||
if [ -d magisk ]; then
|
if [ -d magisk ]; then
|
||||||
system_size=$(( $system_size +$(du -sB512 magisk | cut -f1) ))
|
system_size=$(( $system_size +$(du -sB512 magisk | cut -f1) ))
|
||||||
@ -307,6 +319,10 @@ jobs:
|
|||||||
sudo mount -o loop ${{ matrix.arch }}/vendor.img system/vendor
|
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 }}/product.img system/product
|
||||||
sudo mount -o loop ${{ matrix.arch }}/system_ext.img system/system_ext
|
sudo mount -o loop ${{ matrix.arch }}/system_ext.img system/system_ext
|
||||||
|
- name: Remove Amazon AppStore
|
||||||
|
if: ${{ github.event.inputs.remove_amazon == 'remove' }}
|
||||||
|
run: |
|
||||||
|
find system/product/{etc/permissions,etc/sysconfig,framework,priv-app} | grep -e amazon -e venezia | sudo xargs rm -rf
|
||||||
- name: Integrate Magisk
|
- name: Integrate Magisk
|
||||||
if: ${{ github.event.inputs.root_sol == 'magisk' || github.event.inputs.root_sol == '' }}
|
if: ${{ github.event.inputs.root_sol == 'magisk' || github.event.inputs.root_sol == '' }}
|
||||||
run: |
|
run: |
|
||||||
@ -438,7 +454,7 @@ jobs:
|
|||||||
|
|
||||||
sudo find system/system/{app,framework,priv-app} -type f -exec chcon --reference=system/system/framework/ext.jar {} \;
|
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 {} \;
|
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 find system/product/{app,etc,overlay,priv-app} -type f -exec chcon --reference=system/product/etc/permissions/com.android.settings.intelligence.xml {} \;
|
||||||
sudo patchelf --replace-needed libc.so "${HOME}/libc.so" ./magiskpolicy || true
|
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 libm.so "${HOME}/libm.so" ./magiskpolicy || true
|
||||||
sudo patchelf --replace-needed libdl.so "${HOME}/libdl.so" ./magiskpolicy || true
|
sudo patchelf --replace-needed libdl.so "${HOME}/libdl.so" ./magiskpolicy || true
|
||||||
@ -523,6 +539,7 @@ jobs:
|
|||||||
fix_prop(sec, prop)
|
fix_prop(sec, prop)
|
||||||
- name: Umount images
|
- name: Umount images
|
||||||
run: |
|
run: |
|
||||||
|
sudo find system -exec touch -amt 200901010000.00 {} \;> /dev/null 2>&1
|
||||||
sudo umount system/vendor
|
sudo umount system/vendor
|
||||||
sudo umount system/product
|
sudo umount system/product
|
||||||
sudo umount system/system_ext
|
sudo umount system/system_ext
|
||||||
|
Loading…
Reference in New Issue
Block a user