LSPosed / MagiskOnWSALocal

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

Error Occured #522

Closed MJ-Gamerz closed 1 year ago

MJ-Gamerz commented 1 year ago

Steps to reproduce/复现步骤

  1. by running the whole script 2.cd MagiskOnWSALocal
  2. scripts/run.sh

Expected behaviour/预期行为

it should intall correctly without giving any errors

Actual behaviour/实际行为

instead it gives any error and no output is given and the script closes

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

ad396d6

Linux distribution info/Linux 发行版信息

NAME STATE VERSION

Windows version/Windows 版本

10.0.19045.2846

Build Parameters/构建参数

COMMAND_LINE=--arch x64 --release-type retail --root-sol magisk --gapps-brand MindTheGapps --remove-amazon --magisk-ver stable INFO: Architecture: x64 INFO: Release Type: retail INFO: Magisk Version: stable INFO: GApps Brand: MindTheGapps INFO: GApps Variant: pico INFO: Root Solution: magisk Build: RELEASE_TYPE=Retail Generate Download Links Generating WSA download link: arch=x64 release_type=Retail

Version requirement/版本要求

Logs/日志

[//]: <> (Don't modify above) ``` Mount images mount: /tmp/wsa-build-d3WytZOg2j_/system_root: mount failed: Operation not permitted. Build: an error has occurred, exit Cleanup Work Directory Cleanup Mount Directory umount: /tmp/wsa-build-d3WytZOg2j_/system_root: not mounted. Cleanup Download Directory ``` [//]: <> (Don't modify below)
tosasitill commented 1 year ago

me too

MustardChef commented 1 year ago

me too

@tosasitill Have you tried running the script using sudo?

tosasitill commented 1 year ago

me too

@tosasitill Have you tried running the script using sudo?

I tried it but still not working :( I edited the build.sh script deleted some commands and it worked

YT-Advanced commented 1 year ago

me too

@tosasitill Have you tried running the script using sudo?

I tried it but still not working :( I edited the build.sh script deleted some commands and it worked

Can you tell me the command that you have deleted

MJ-Gamerz commented 1 year ago

i have tried runningit with sudo

MJ-Gamerz commented 1 year ago

me too

@tosasitill Have you tried running the script using sudo?

I tried it but still not working :( I edited the build.sh script deleted some commands and it worked

yes can you tell what you deleted it can solve the issue

tosasitill commented 1 year ago

me too

@tosasitill Have you tried running the script using sudo?

I tried it but still not working :( I edited the build.sh script deleted some commands and it worked

yes can you tell what you deleted it can solve the issue

@YT-Advanced @MJ-Gamerz stupidest method:( and it will let some options not working `echo "Mount images" sudo mkdir "$ROOT_MNT" || abort sudo mount -vo loop "$WORK_DIR/wsa/$ARCH/system.img" "$ROOT_MNT" || abort sudo mount -vo loop "$WORK_DIR/wsa/$ARCH/vendor.img" "$VENDOR_MNT" || abort sudo mount -vo loop "$WORK_DIR/wsa/$ARCH/product.img" "$PRODUCT_MNT" || abort sudo mount -vo loop "$WORK_DIR/wsa/$ARCH/system_ext.img" "$SYSTEM_EXT_MNT" || abort echo -e "done\n"

if [ "$REMOVE_AMAZON" ]; then echo "Remove Amazon Appstore" find "${PRODUCT_MNT:?}"/{etc/permissions,etc/sysconfig,framework,priv-app} 2>/dev/null | grep -e amazon -e venezia | sudo xargs rm -rf find "${SYSTEM_EXT_MNT:?}"/{etc/*permissions,framework,priv-app} 2>/dev/null | grep -e amazon -e venezia | sudo xargs rm -rf echo -e "done\n" fi

echo "Add device administration features" sudo sed -i -e '/cts/a \ \ \ \ ' -e '/print/i \ \ \ \ ' "$VENDOR_MNT/etc/permissions/windows.permissions.xml" sudo setfattr -n security.selinux -v "u:object_r:vendor_configs_file:s0" "$VENDOR_MNT/etc/permissions/windows.permissions.xml" || abort echo -e "done\n"

if [ "$ROOT_SOL" = 'magisk' ]; then echo "Integrate Magisk" sudo mkdir "$ROOT_MNT/sbin" sudo setfattr -n security.selinux -v "u:object_r:rootfs:s0" "$ROOT_MNT/sbin" || abort sudo chown root:root "$ROOT_MNT/sbin" sudo chmod 0700 "$ROOT_MNT/sbin" sudo cp "$WORK_DIR/magisk/magisk/"* "$ROOT_MNT/sbin/" sudo cp "$MAGISK_PATH" "$ROOT_MNT/sbin/magisk.apk" || abort sudo tee -a "$ROOT_MNT/sbin/loadpolicy.sh" </dev/null || abort

!/system/bin/sh

mkdir -p /data/adb/magisk cp /sbin/* /data/adb/magisk/ sync 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 /sbin/magiskpolicy --live --apply "/data/adb/modules/\$module/sepolicy.rule" fi done EOF

sudo find "$ROOT_MNT/sbin" -type f -exec chmod 0755 {} \;
sudo find "$ROOT_MNT/sbin" -type f -exec chown root:root {} \;
sudo find "$ROOT_MNT/sbin" -type f -exec setfattr -n security.selinux -v "u:object_r:system_file:s0" {} \; || abort

MAGISK_TMP_PATH=$(Gen_Rand_Str 14)
echo "/dev/$MAGISK_TMP_PATH(/.*)?    u:object_r:magisk_file:s0" | sudo tee -a "$VENDOR_MNT/etc/selinux/vendor_file_contexts"
echo '/data/adb/magisk(/.*)?   u:object_r:magisk_file:s0' | sudo tee -a "$VENDOR_MNT/etc/selinux/vendor_file_contexts"
sudo LD_LIBRARY_PATH="../linker/$HOST_ARCH" "$WORK_DIR/magisk/magiskpolicy" --load "$VENDOR_MNT/etc/selinux/precompiled_sepolicy" --save "$VENDOR_MNT/etc/selinux/precompiled_sepolicy" --magisk || abort
LOAD_POLICY_SVC_NAME=$(Gen_Rand_Str 12)
PFD_SVC_NAME=$(Gen_Rand_Str 12)
LS_SVC_NAME=$(Gen_Rand_Str 12)
sudo tee -a "$SYSTEM_MNT/etc/init/hw/init.rc" <<EOF >/dev/null

on post-fs-data start adbd mkdir /dev/$MAGISK_TMP_PATH mount tmpfs tmpfs /dev/$MAGISK_TMP_PATH mode=0755 copy /sbin/magisk64 /dev/$MAGISK_TMP_PATH/magisk64 chmod 0755 /dev/$MAGISK_TMP_PATH/magisk64 symlink ./magisk64 /dev/$MAGISK_TMP_PATH/magisk symlink ./magisk64 /dev/$MAGISK_TMP_PATH/su symlink ./magisk64 /dev/$MAGISK_TMP_PATH/resetprop copy /sbin/magisk32 /dev/$MAGISK_TMP_PATH/magisk32 chmod 0755 /dev/$MAGISK_TMP_PATH/magisk32 copy /sbin/magiskinit /dev/$MAGISK_TMP_PATH/magiskinit chmod 0755 /dev/$MAGISK_TMP_PATH/magiskinit copy /sbin/magiskpolicy /dev/$MAGISK_TMP_PATH/magiskpolicy chmod 0755 /dev/$MAGISK_TMP_PATH/magiskpolicy mkdir /dev/$MAGISK_TMP_PATH/.magisk 755 mkdir /dev/$MAGISK_TMP_PATH/.magisk/mirror 0 mkdir /dev/$MAGISK_TMP_PATH/.magisk/block 0 mkdir /dev/$MAGISK_TMP_PATH/.magisk/worker 0 copy /sbin/magisk.apk /dev/$MAGISK_TMP_PATH/stub.apk chmod 0644 /dev/$MAGISK_TMP_PATH/stub.apk rm /dev/.magisk_unblock exec_start $LOAD_POLICY_SVC_NAME start $PFD_SVC_NAME wait /dev/.magisk_unblock 40 rm /dev/.magisk_unblock exec u:r:magisk:s0 0 0 -- /system/bin/mknod -m 0600 /dev/$MAGISK_TMP_PATH/.magisk/block/preinit b 8 0

service $LOAD_POLICY_SVC_NAME /system/bin/sh /sbin/loadpolicy.sh user root seclabel u:r:magisk:s0 oneshot

service $PFD_SVC_NAME /dev/$MAGISK_TMP_PATH/magisk --post-fs-data user root seclabel u:r:magisk:s0 oneshot

service $LS_SVC_NAME /dev/$MAGISK_TMP_PATH/magisk --service class late_start user root seclabel u:r:magisk:s0 oneshot

on property:sys.boot_completed=1 mkdir /data/adb/magisk 755 copy /sbin/magisk.apk /data/adb/magisk/magisk.apk exec /dev/$MAGISK_TMP_PATH/magisk --boot-complete

on property:init.svc.zygote=restarting exec /dev/$MAGISK_TMP_PATH/magisk --zygote-restart

on property:init.svc.zygote=stopped exec /dev/$MAGISK_TMP_PATH/magisk --zygote-restart

EOF echo -e "Integrate Magisk done\n" elif [ "$ROOT_SOL" = "kernelsu" ]; then echo "Integrate KernelSU" mv "$WORK_DIR/wsa/$ARCH/Tools/kernel" "$WORK_DIR/wsa/$ARCH/Tools/kernel_origin" cp "$WORK_DIR/kernelsu/kernel" "$WORK_DIR/wsa/$ARCH/Tools/kernel" echo -e "Integrate KernelSU done\n" fi `

MJ-Gamerz commented 1 year ago

@tosasitill have too delete all this section???

MJ-Gamerz commented 1 year ago

i did it and now this error is occuring

cp: cannot create directory '/tmp/wsa-build-WCqNJlc8yZ_/system_root/system': No such file or directory
Build: an error has occurred, exit

and i ran the command with sudo

tosasitill commented 1 year ago

i did it and now this error is occuring

cp: cannot create directory '/tmp/wsa-build-WCqNJlc8yZ_/system_root/system': No such file or directory
Build: an error has occurred, exit

and i ran the command with sudo

hmm i dont know…. I solved this by that way Waiting for Official commits fix

Howard20181 commented 1 year ago

Please use WSL 2, WSL 1 is not supported.

tosasitill commented 1 year ago

Please use WSL 2, WSL 1 is not supported.

Oh thanks! I'm done! image

MJ-Gamerz commented 1 year ago

Please use WSL 2, WSL 1 is not supported.

Oh thanks! I'm done! image

how to install WSL2?