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

Magisk install fails #12

Open
arun54321 opened this issue Nov 21, 2021 · 14 comments
Open

Magisk install fails #12

arun54321 opened this issue Nov 21, 2021 · 14 comments
Labels
bug Something isn't working

Comments

@arun54321
Copy link

Traceback (most recent call last):
File "/home/arun/waydroid_script/waydroid_extras.py", line 566, in
main()
File "/home/arun/waydroid_script/waydroid_extras.py", line 561, in main
install_magisk()
File "/home/arun/waydroid_script/waydroid_extras.py", line 478, in install_magisk
shutil.copyfile(os.path.join(extract_to, arch_dir, "magiskinit{arch}".format(arch=arch)),
File "/usr/lib/python3.9/shutil.py", line 265, in copyfile
with open(src, 'rb') as fsrc, open(dst, 'wb') as fdst:
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/waydroidimage/sbin/magiskinit'

@casualsnek
Copy link
Owner

what android version system image are you using ?

@arun54321
Copy link
Author

arun54321 commented Nov 21, 2021

android 11
image

@casualsnek
Copy link
Owner

the magisk used in this script does not work with android 11 images, this is a known issue and i am trying to get it work without any success :(

@casualsnek casualsnek added the bug Something isn't working label Nov 29, 2021
@youling257
Copy link

@youling257
Copy link

my init.rc for waydroid android 11.

on post-fs-data
mkdir /dev/waydroid-magisk
mount tmpfs tmpfs /dev/waydroid-magisk mode=0755
copy /data/adb/magisk/magisk64 /dev/waydroid-magisk/magisk64
chmod 0755 /dev/waydroid-magisk/magisk64
symlink ./magisk64 /dev/waydroid-magisk/magisk
symlink ./magisk64 /dev/waydroid-magisk/su
symlink ./magisk64 /dev/waydroid-magisk/resetprop
copy /data/adb/magisk/magisk32 /dev/waydroid-magisk/magisk32
chmod 0755 /dev/waydroid-magisk/magisk32
copy /data/adb/magisk/magiskinit /dev/waydroid-magisk/magiskinit
chmod 0755 /dev/waydroid-magisk/magiskinit
symlink ./magiskinit /dev/waydroid-magisk/magiskpolicy
mkdir /dev/waydroid-magisk/.magisk 700
mkdir /dev/waydroid-magisk/.magisk/mirror 700
mkdir /dev/waydroid-magisk/.magisk/mirror/data 700
mkdir /dev/waydroid-magisk/.magisk/block 700
mount none /data /dev/waydroid-magisk/.magisk/mirror/data bind rec
start FAhW7H9G5sf

service FAhW7H9G5sf /dev/waydroid-magisk/magisk --post-fs-data
user root
oneshot

service HLiFsR1HtIXVN6 /dev/waydroid-magisk/magisk --service
class late_start
user root
oneshot

on property:sys.boot_completed=1
start YqCTLTppv3ML

service YqCTLTppv3ML /dev/waydroid-magisk/magisk --boot-complete
user root
oneshot

@youling257
Copy link

extract Magisk-v23.0.apk as zip, lib/x86/libbusybox.so libmagisk32.so libmagisk64.so libmagiskboot libmagiskinit.so is binary, rename them.

@casualsnek
Copy link
Owner

extract Magisk-v23.0.apk as zip, lib/x86/libbusybox.so libmagisk32.so libmagisk64.so libmagiskboot libmagiskinit.so is binary, rename them.

Thanks, i will check it out :)

@casualsnek
Copy link
Owner

i have a few questions about your magisk instructions, if you are on matrix can you reach out to me ? ( @casualsnek:matrix.org )

@essasetic
Copy link

my init.rc for waydroid android 11.

on post-fs-data mkdir /dev/waydroid-magisk mount tmpfs tmpfs /dev/waydroid-magisk mode=0755 copy /data/adb/magisk/magisk64 /dev/waydroid-magisk/magisk64 chmod 0755 /dev/waydroid-magisk/magisk64 symlink ./magisk64 /dev/waydroid-magisk/magisk symlink ./magisk64 /dev/waydroid-magisk/su symlink ./magisk64 /dev/waydroid-magisk/resetprop copy /data/adb/magisk/magisk32 /dev/waydroid-magisk/magisk32 chmod 0755 /dev/waydroid-magisk/magisk32 copy /data/adb/magisk/magiskinit /dev/waydroid-magisk/magiskinit chmod 0755 /dev/waydroid-magisk/magiskinit symlink ./magiskinit /dev/waydroid-magisk/magiskpolicy mkdir /dev/waydroid-magisk/.magisk 700 mkdir /dev/waydroid-magisk/.magisk/mirror 700 mkdir /dev/waydroid-magisk/.magisk/mirror/data 700 mkdir /dev/waydroid-magisk/.magisk/block 700 mount none /data /dev/waydroid-magisk/.magisk/mirror/data bind rec start FAhW7H9G5sf

service FAhW7H9G5sf /dev/waydroid-magisk/magisk --post-fs-data user root oneshot

service HLiFsR1HtIXVN6 /dev/waydroid-magisk/magisk --service class late_start user root oneshot

on property:sys.boot_completed=1 start YqCTLTppv3ML

service YqCTLTppv3ML /dev/waydroid-magisk/magisk --boot-complete user root oneshot

Hey, can I ask for some clarification on these instructions and what parts of the python script I'm meant to modify for this? Trying to get a controller overlay working and rooting has become an absolute necessity (and I'm stumped on how to do it) @youling257 thanks!

@Mega-MU
Copy link

Mega-MU commented Nov 22, 2022

same problem even i umount all the /dev/loopxxx

❯ sudo python3 waydroid_extras.py -m     
/home/megamu/.cache/waydroid_script/downloads
==> Found system image: /var/lib/waydroid/images/system.img
==> Resizing system image....
==> Failed to resize image '/var/lib/waydroid/images/system.img' .. !  e2fsck 1.46.5 (30-Dec-2021)
/var/lib/waydroid/images/system.img is mounted.
e2fsck: Cannot continue, aborting.



==> You can exit and retry with sudo or force continue (May fail installation !), Continue ? [y/N]: y
==> Unmounting .. 
==> Extracting archive...
==> Installing magisk now ...
Traceback (most recent call last):
  File "/home/megamu/waydroid_script/waydroid_extras.py", line 594, in <module>
    main()
  File "/home/megamu/waydroid_script/waydroid_extras.py", line 589, in main
    install_magisk()
  File "/home/megamu/waydroid_script/waydroid_extras.py", line 506, in install_magisk
    shutil.copyfile(os.path.join(extract_to, arch_dir, "magiskinit{arch}".format(arch=arch)),
  File "/usr/lib/python3.10/shutil.py", line 256, in copyfile
    with open(dst, 'wb') as fdst:
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/waydroidimage/sbin/magiskinit'

@bitstuffing
Copy link

I don't understand why it happens, the same case for me.

Why this script is seeking for /tmp/waydroidimage/sbin/magiskinit?

@RusticBard
Copy link

RusticBard commented Dec 13, 2022

well IDK if its late to reply or not but I found a solution,

I copied the init.rc posted by @youling257 as /tmp/waydroidimage/init.rc

then I downloaded the magisk v23 apk file and extrated it as zip and copied the lib/x86/libbusybox.so, libmagisk32.so libmagisk64.so libmagiskboot libmagiskinit.so files to /tmp/waydroidimage/sbin ( I had to create the sbin directory)

and that is all, hope it helps anyone looking for it :) @bitstuffing

@Aman9das
Copy link

the magisk used in this script does not work with android 11 images, this is a known issue and i am trying to get it work without any success :(

Please add this to the readme too

@WesleyVanNeck
Copy link
Contributor

the magisk used in this script does not work with android 11 images, this is a known issue and i am trying to get it work without any success :(

Please add this to the readme too

It got updated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

9 participants