LSPosed / MagiskOnWSALocal

Integrate Magisk root and Google Apps into WSA (Windows Subsystem for Android)
GNU Affero General Public License v3.0
9.47k stars 22.94k forks source link

[Bug] Build Error - Create system images #717

Closed tymondouglas closed 6 months ago

tymondouglas commented 10 months ago

Steps to reproduce/复现步骤

  1. Clone repository
  2. Attempt to build an image
  3. Error during build

Expected behaviour/预期行为

Successfully build

Actual behaviour/实际行为

No /output

MagiskOnWSALocal commit full SHA/MagiskOnWSALocal 提交的完整哈希

8548114d793c8aee7ccdb7038c355f44c713834a

Linux distribution info/Linux 发行版信息

WSL2 - Ubuntu 22.04 LTS Also tried in an actual baremetal Ubuntu 22.04 LTS

Windows version/Windows 版本

10.0.22621.2428

Build Parameters/构建参数

COMMAND_LINE=--arch x64 --release-type WIF --root-sol none --gapps-brand MindTheGapps --remove-amazon INFO: Architecture: x64 INFO: Release Type: WIF INFO: Magisk Version: stable INFO: GApps Brand: MindTheGapps INFO: GApps Variant: pico INFO: Root Solution: none Build: RELEASE_TYPE=Insider Fast

Version requirement/版本要求

Logs/日志

[//]: <> (Don't modify above) ``` COMMAND_LINE=--arch x64 --release-type WIF --root-sol none --gapps-brand MindTheGapps --remove-amazon INFO: Architecture: x64 INFO: Release Type: WIF INFO: Magisk Version: stable INFO: GApps Brand: MindTheGapps INFO: GApps Variant: pico INFO: Root Solution: none Build: RELEASE_TYPE=Insider Fast Generate Download Links Generating WSA download link: arch=x64 release_type=Insider Fast WSA Build Version=2309.40000.10.0 download link: http://tlu.dl.delivery.mp.microsoft.com/filestreamingservice/files/28edaebf-8019-4844-ba32-8ab019bc9391?P1=1698187558&P2=404&P3=2&P4=YsmHaAn9n8B2%2fcDWUfXa7jAD3DgIOAS294Bm2Lyp5I6P74qYmSEKnWDh9ZJPA1pBu6SkURoViPrBzY3BA9tmEw%3d%3d path: ../download/Microsoft.VCLibs.140.00_x64.appx download link: http://tlu.dl.delivery.mp.microsoft.com/filestreamingservice/files/986a8270-404c-4470-871d-5c4090dcaa79?P1=1698187681&P2=404&P3=2&P4=BTPuGo0cTaRPZclicjZR8OwqyNdbDXra84PEKxxlrPNZ%2ffvSxWO%2fJrW8xyPRj4kTKaJERduhRZmaVgOyu6HaWA%3d%3d path: ../download/Microsoft.VCLibs.140.00.UWPDesktop_x64.appx download link: http://tlu.dl.delivery.mp.microsoft.com/filestreamingservice/files/21a6f30d-0ec0-46da-92cf-04e35cf18efc?P1=1698187688&P2=404&P3=2&P4=Zr7fLMjHgciuy4OhtDFoW9IUDimfBRkMzvuTUJ5YIauwqVQ0hGqOr0ceKYmtws4xdPLH8ugp6NhbRxHNuNQZhA%3d%3dpath: ../download/Microsoft.UI.Xaml.2.8_x64.appx download link: http://tlu.dl.delivery.mp.microsoft.com/filestreamingservice/files/865c8919-3247-45e3-95ee-323261875078?P1=1698215728&P2=404&P3=2&P4=DmTSbNc4oa8xtJHj7ChICaLDGWP1uyYUXJeuWBm1fU3z4OVJCp5sjraL2K%2bXLBYo93rmVbMGjOkWXuykxG%2bsqg%3d%3d path: ../download/wsa-WIF.zip Generating Magisk download link: release type=stable download link: https://cdn.jsdelivr.net/gh/topjohnwu/magisk-files@26.3/app-release.apk Generating MindTheGapps download link: arch=x64 variant=pico download link: https://downloads.sourceforge.net/project/wsa-mtg/x86_64/20230920/MindTheGapps-13.0.0-x86_64-20230920.zipDownload Artifacts 10/24 19:36:26 [NOTICE] Downloading 6 item(s) 10/24 19:36:27 [NOTICE] Download complete: ../download/Microsoft.VCLibs.140.00_x64.appx 10/24 19:36:27 [NOTICE] Download complete: ../download/Microsoft.UI.Xaml.2.8_x64.appx 10/24 19:36:27 [NOTICE] Download complete: ../download/Microsoft.VCLibs.140.00.UWPDesktop_x64.appx [DL:50MiB][#8ff45a 29MiB/1.3GiB(2%)][#564a0d 3.7MiB/11MiB(31%)][#b02a17 0B/0B] 10/24 19:36:28 [NOTICE] CUID#35 - Redirecting to https://razaoinfo.dl.sourceforge.net/project/wsa-mtg/x86_64/20230920/MindTheGapps-13.0.0-x86_64-20230920.zip [DL:41MiB][#8ff45a 104MiB/1.3GiB(7%)][#564a0d 4.2MiB/11MiB(35%)][#b02a17 80KiB/188MiB(0%)] 10/24 19:36:29 [NOTICE] CUID#53 - Redirecting to https://razaoinfo.dl.sourceforge.net/project/wsa-mtg/x86_64/20230920/MindTheGapps-13.0.0-x86_64-20230920.zip [DL:40MiB][#8ff45a 178MiB/1.3GiB(12%)][#564a0d 4.3MiB/11MiB(36%)][#b02a17 640KiB/188MiB(0%)] 10/24 19:36:31 [NOTICE] CUID#59 - Redirecting to https://razaoinfo.dl.sourceforge.net/project/wsa-mtg/x86_64/20230920/MindTheGapps-13.0.0-x86_64-20230920.zip [DL:39MiB][#8ff45a 252MiB/1.3GiB(17%)][#564a0d 4.6MiB/11MiB(38%)][#b02a17 1.2MiB/188MiB(0%)] 10/24 19:36:33 [NOTICE] CUID#54 - Redirecting to https://razaoinfo.dl.sourceforge.net/project/wsa-mtg/x86_64/20230920/MindTheGapps-13.0.0-x86_64-20230920.zip [DL:39MiB][#8ff45a 327MiB/1.3GiB(23%)][#564a0d 4.7MiB/11MiB(39%)][#b02a17 1.9MiB/188MiB(1%)] 10/24 19:36:35 [NOTICE] CUID#58 - Redirecting to https://razaoinfo.dl.sourceforge.net/project/wsa-mtg/x86_64/20230920/MindTheGapps-13.0.0-x86_64-20230920.zip [DL:37MiB][#8ff45a 400MiB/1.3GiB(28%)][#564a0d 4.9MiB/11MiB(41%)][#b02a17 3.1MiB/188MiB(1%)] 10/24 19:36:37 [NOTICE] CUID#57 - Redirecting to https://razaoinfo.dl.sourceforge.net/project/wsa-mtg/x86_64/20230920/MindTheGapps-13.0.0-x86_64-20230920.zip [DL:37MiB][#8ff45a 474MiB/1.3GiB(33%)][#564a0d 5.1MiB/11MiB(42%)][#b02a17 4.0MiB/188MiB(2%)] 10/24 19:36:39 [NOTICE] CUID#56 - Redirecting to https://razaoinfo.dl.sourceforge.net/project/wsa-mtg/x86_64/20230920/MindTheGapps-13.0.0-x86_64-20230920.zip [DL:37MiB][#8ff45a 548MiB/1.3GiB(38%)][#564a0d 5.2MiB/11MiB(44%)][#b02a17 5.4MiB/188MiB(2%)] 10/24 19:36:41 [NOTICE] CUID#55 - Redirecting to https://razaoinfo.dl.sourceforge.net/project/wsa-mtg/x86_64/20230920/MindTheGapps-13.0.0-x86_64-20230920.zip [DL:37MiB][#8ff45a 1.3GiB/1.3GiB(99%)][#564a0d 8.1MiB/11MiB(67%)][#b02a17 43MiB/188MiB(23%)] 10/24 19:37:06 [NOTICE] Download complete: ../download/wsa-WIF.zip [DL:37MiB][#564a0d 10MiB/11MiB(90%)][#b02a17 117MiB/188MiB(62%)] 10/24 19:37:08 [NOTICE] Download complete: ../download/magisk-stable.zip [#b02a17 184MiB/188MiB(97%) CN:5 DL:17MiB] 10/24 19:37:10 [NOTICE] Download complete: ../download/MindTheGapps-x64-13.0.zip Download Results: gid |stat|avg speed |path/URI ======+====+===========+======================================================= 736dd9|OK | 9.4MiB/s|../download/Microsoft.VCLibs.140.00_x64.appx 7e30f9|OK | 21MiB/s|../download/Microsoft.UI.Xaml.2.8_x64.appx c52c1b|OK | 28MiB/s|../download/Microsoft.VCLibs.140.00.UWPDesktop_x64.appx 8ff45a|OK | 36MiB/s|../download/wsa-WIF.zip 564a0d|OK | 297KiB/s|../download/magisk-stable.zip b02a17|OK | 4.6MiB/s|../download/MindTheGapps-x64-13.0.zip Status Legend: (OK):download completed. Extract WSA unzipping WsaPackage_2309.40000.10.0_x64_Release-Nightly.msix to /tmp/wsa-build-e3GKGe6ynJ_/wsa unzipping from /tmp/wsa-build-e3GKGe6ynJ_/wsa/WsaPackage_2309.40000.10.0_x64_Release-Nightly.msix Extract done Extract Magisk Magisk version: 26.3 (26300) done Extract MindTheGapps Archive: ../download/MindTheGapps-x64-13.0.zip inflating: /tmp/wsa-build-e3GKGe6ynJ_/gapps/system/product/lib/libjni_latinimegoogle.so inflating: /tmp/wsa-build-e3GKGe6ynJ_/gapps/system/product/overlay/GmsSettingsProviderOverlay.apk inflating: /tmp/wsa-build-e3GKGe6ynJ_/gapps/system/product/overlay/GmsOverlay.apk inflating: /tmp/wsa-build-e3GKGe6ynJ_/gapps/system/product/etc/security/fsverity/gms_fsverity_cert.der inflating: /tmp/wsa-build-e3GKGe6ynJ_/gapps/system/product/etc/permissions/privapp-permissions-google-product.xml inflating: /tmp/wsa-build-e3GKGe6ynJ_/gapps/system/product/etc/permissions/com.google.android.dialer.support.xml extracting: /tmp/wsa-build-e3GKGe6ynJ_/gapps/system/product/etc/init/gapps.rc inflating: /tmp/wsa-build-e3GKGe6ynJ_/gapps/system/product/etc/default-permissions/default-permissions-mtg.xml inflating: /tmp/wsa-build-e3GKGe6ynJ_/gapps/system/product/etc/default-permissions/default-permissions-google.xml inflating: /tmp/wsa-build-e3GKGe6ynJ_/gapps/system/product/etc/sysconfig/google_build.xml inflating: /tmp/wsa-build-e3GKGe6ynJ_/gapps/system/product/etc/sysconfig/google.xml inflating: /tmp/wsa-build-e3GKGe6ynJ_/gapps/system/product/etc/sysconfig/d2d_cable_migration_feature.xml inflating: /tmp/wsa-build-e3GKGe6ynJ_/gapps/system/product/etc/sysconfig/google-hiddenapi-package-allowlist.xml inflating: /tmp/wsa-build-e3GKGe6ynJ_/gapps/system/product/lib64/libjni_latinimegoogle.so inflating: /tmp/wsa-build-e3GKGe6ynJ_/gapps/system/product/app/GoogleCalendarSyncAdapter/GoogleCalendarSyncAdapter.apk inflating: /tmp/wsa-build-e3GKGe6ynJ_/gapps/system/product/app/PrebuiltExchange3Google/PrebuiltExchange3Google.apk inflating: /tmp/wsa-build-e3GKGe6ynJ_/gapps/system/product/app/GoogleContactsSyncAdapter/GoogleContactsSyncAdapter.apk inflating: /tmp/wsa-build-e3GKGe6ynJ_/gapps/system/product/priv-app/AndroidAutoStub/AndroidAutoStub.apk inflating: /tmp/wsa-build-e3GKGe6ynJ_/gapps/system/product/priv-app/GooglePartnerSetup/GooglePartnerSetup.apk inflating: /tmp/wsa-build-e3GKGe6ynJ_/gapps/system/product/priv-app/Phonesky/Phonesky.apk inflating: /tmp/wsa-build-e3GKGe6ynJ_/gapps/system/product/priv-app/GmsCore/GmsCore.apk inflating: /tmp/wsa-build-e3GKGe6ynJ_/gapps/system/product/priv-app/Velvet/Velvet.apk inflating: /tmp/wsa-build-e3GKGe6ynJ_/gapps/system/product/priv-app/GoogleRestore/GoogleRestore.apk inflating: /tmp/wsa-build-e3GKGe6ynJ_/gapps/system/product/framework/com.google.android.dialer.support.jar inflating: /tmp/wsa-build-e3GKGe6ynJ_/gapps/system/system_ext/etc/permissions/privapp-permissions-google-system-ext.xml inflating: /tmp/wsa-build-e3GKGe6ynJ_/gapps/system/system_ext/priv-app/GoogleFeedback/GoogleFeedback.apk inflating: /tmp/wsa-build-e3GKGe6ynJ_/gapps/system/system_ext/priv-app/GoogleServicesFramework/GoogleServicesFramework.apk caution: excluded filename not matched: system/product/priv-app/VelvetTitan/* Extract done Convert vhdx to RAW image Convert vhdx to RAW image done Mount images mount: /dev/loop0 mounted on /tmp/wsa-build-e3GKGe6ynJ_/erofs. mount: /dev/loop1 mounted on /tmp/wsa-build-e3GKGe6ynJ_/erofs/vendor. mount: /dev/loop2 mounted on /tmp/wsa-build-e3GKGe6ynJ_/erofs/product. mount: /dev/loop3 mounted on /tmp/wsa-build-e3GKGe6ynJ_/erofs/system_ext. done Create overlayfs mk_overlayfs: label system lowerdir=/tmp/wsa-build-e3GKGe6ynJ_/erofs upperdir=/tmp/wsa-build-e3GKGe6ynJ_/upper/system workdir=/tmp/wsa-build-e3GKGe6ynJ_/worker/system merged=/tmp/wsa-build-e3GKGe6ynJ_/system_root_merged mount: overlay mounted on /tmp/wsa-build-e3GKGe6ynJ_/system_root_merged. mk_overlayfs: label vendor lowerdir=/tmp/wsa-build-e3GKGe6ynJ_/erofs/vendor upperdir=/tmp/wsa-build-e3GKGe6ynJ_/upper/vendor workdir=/tmp/wsa-build-e3GKGe6ynJ_/worker/vendor merged=/tmp/wsa-build-e3GKGe6ynJ_/system_root_merged/vendor mount: overlay mounted on /tmp/wsa-build-e3GKGe6ynJ_/system_root_merged/vendor. mk_overlayfs: label product lowerdir=/tmp/wsa-build-e3GKGe6ynJ_/erofs/product upperdir=/tmp/wsa-build-e3GKGe6ynJ_/upper/product workdir=/tmp/wsa-build-e3GKGe6ynJ_/worker/product merged=/tmp/wsa-build-e3GKGe6ynJ_/system_root_merged/product mount: overlay mounted on /tmp/wsa-build-e3GKGe6ynJ_/system_root_merged/product. mk_overlayfs: label system_ext lowerdir=/tmp/wsa-build-e3GKGe6ynJ_/erofs/system_ext upperdir=/tmp/wsa-build-e3GKGe6ynJ_/upper/system_ext workdir=/tmp/wsa-build-e3GKGe6ynJ_/worker/system_ext merged=/tmp/wsa-build-e3GKGe6ynJ_/system_root_merged/system_ext mount: overlay mounted on /tmp/wsa-build-e3GKGe6ynJ_/system_root_merged/system_ext. Create overlayfs done Remove Amazon Appstore done Add device administration features sed: can't read /cts/a \ : No such file or directory done Add extra packages Add extra packages done Integrate MindTheGapps Integrate MindTheGapps done Fix MindTheGapps prop fixing /tmp/wsa-build-e3GKGe6ynJ_/system_root_merged/system/build.prop fixing /tmp/wsa-build-e3GKGe6ynJ_/system_root_merged/vendor/build.prop fixing /tmp/wsa-build-e3GKGe6ynJ_/system_root_merged/vendor/odm/etc/build.prop done Create system images mk_image_umount: /tmp/wsa-build-e3GKGe6ynJ_/system_root_merged/vendor /tmp/wsa-build-e3GKGe6ynJ_/wsa/x64/vendor.img /tmp/wsa-build-e3GKGe6ynJ_/upper/vendor ext4 ERROR: Not yet implemented Build: an error has occurred, exit Cleanup Work Directory Cleanup Mount Directory umount: /tmp/wsa-build-e3GKGe6ynJ_/erofs/vendor unmounted umount: /tmp/wsa-build-e3GKGe6ynJ_/erofs/system_ext unmounted umount: /tmp/wsa-build-e3GKGe6ynJ_/erofs/product unmounted umount: /tmp/wsa-build-e3GKGe6ynJ_/erofs unmounted umount: /tmp/wsa-build-e3GKGe6ynJ_/system_root_merged/vendor (overlay) unmounted umount: /tmp/wsa-build-e3GKGe6ynJ_/system_root_merged/system_ext (overlay) unmounted umount: /tmp/wsa-build-e3GKGe6ynJ_/system_root_merged/product (overlay) unmounted umount: /tmp/wsa-build-e3GKGe6ynJ_/system_root_merged (overlay) unmounted Cleanup Download Directory ``` [//]: <> (Don't modify below)
Skorpion96 commented 8 months ago

https://raw.githubusercontent.com/sn-o-w/MagiskOnWSALocal/main/scripts/build.sh

Replace everything in your build.sh with the contents in the above URL, then try building again.

I've reverted some code and added the changes I did in a PR that was declined.

Until the upstream code is fixed, this should work.

runned thhe script and got this:COMMAND_LINE=--arch x64 --release-type retail --root-sol magisk --gapps-brand MindTheGapps --remove-amazon --compress --magisk-ver stable --compress-format zip ./build.sh: line 20: $'\r': command not found ./build.sh: line 64: syntax error near unexpected token $'{\r'' '/build.sh: line 64:umount_clean() { user@user-PC:~/MagiskOnWSALocal$

ZHLONG-CN commented 8 months ago

https://raw.githubusercontent.com/sn-o-w/MagiskOnWSALocal/main/scripts/build.sh Replace everything in your build.sh with the contents in the above URL, then try building again. I've reverted some code and added the changes I did in a PR that was declined. Until the upstream code is fixed, this should work.

runned thhe script and got this:COMMAND_LINE=--arch x64 --release-type retail --root-sol magisk --gapps-brand MindTheGapps --remove-amazon --compress --magisk-ver stable --compress-format zip ./build.sh: line 20: $'\r': command not found ./build.sh: line 64: syntax error near unexpected token $'{\r'' '/build.sh: line 64:umount_clean() { user@user-PC:~/MagiskOnWSALocal$

Work for me. You need to download the script directly in linux enviroment, such as wget in wsl. Or replace all "\r\n" with "\n" by text editor or tool after copy in windows.

StefanCraft commented 8 months ago

@sn-o-w Thanks! It Worked!

MKWheezyG commented 7 months ago

https://raw.githubusercontent.com/sn-o-w/MagiskOnWSALocal/main/scripts/build.sh

Replace everything in your build.sh with the contents in the above URL, then try building again.

I've reverted some code and added the changes I did in a PR that was declined.

Until the upstream code is fixed, this should work.

Works 1-27-24

coloboxp commented 7 months ago

It worked

for those lost, go at the top, see https://github.com/LSPosed/MagiskOnWSALocal/issues/717#issuecomment-1779576833

valfrid-ly commented 7 months ago

https://raw.githubusercontent.com/sn-o-w/MagiskOnWSALocal/main/scripts/build.sh

Replace everything in your build.sh with the contents in the above URL, then try building again.

I've reverted some code and added the changes I did in a PR that was declined.

Until the upstream code is fixed, this should work.

I didn't analyze your changes but it worked for me.

Supuax commented 7 months ago

https://raw.githubusercontent.com/sn-o-w/MagiskOnWSALocal/main/scripts/build.sh

Replace everything in your build.sh with the contents in the above URL, then try building again.

I've reverted some code and added the changes I did in a PR that was declined.

Until the upstream code is fixed, this should work.

Thank you so much. This method will remain available until 2024.