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

Modules are not loading in PhoenixOS PC #3760

Closed
HemanthJabalpuri opened this issue Jan 24, 2021 · 26 comments
Closed

Modules are not loading in PhoenixOS PC #3760

HemanthJabalpuri opened this issue Jan 24, 2021 · 26 comments

Comments

@HemanthJabalpuri
Copy link
Contributor

HemanthJabalpuri commented Jan 24, 2021

@topjohnwu
I have installed 21.4 in Phoenix OS 3.6.1 official for PC x86_64 with the help of https://github.com/shakalaca/MagiskOnEmulator.
Root is working fine, but modules are not loading.

Magisk log and bootlog are attached.

magisk_log_2021-01-24T21:06:48Z.log
bootlog.log

Logs with 22001
magisk_log_2021-02-27T19:28:03Z.log
magisk_log_2021-02-27T19:16:51Z.log

@JonyWinner
Copy link

Maybe try to flash older version

@HemanthJabalpuri
Copy link
Contributor Author

HemanthJabalpuri commented Jan 27, 2021

Also sometimes I get 'Not a Magisk module error', even it is a working one in 21.4. In 21405 Canary it shows 'Unzip error'. This may be Internet issue to download module_installer.sh? Since I am offline every time, it may be because of it.

If someone want to reproduce this, then simply install PheonixOS in PC and patch ramdisk.img and inird.img with https://github.com/shakalaca/MagiskOnEmulator and see result.

initrd.img, ramdisk.img are available at C:\PhoenixOS in Windows or the same C drive is available in Phoenix OS as /storage/disk0/PhoenixOS.

@HemanthJabalpuri
Copy link
Contributor Author

Use bliss os instead

But PhoenixOS is newbie(like me) friendly. It does not have to partition for installation, pain with uninstalling etc., It is like Wubi for Ubuntu. So many choose PhoenixOS among others.

Thanks

@hmtheboy154
Copy link

hmtheboy154 commented Feb 24, 2021

you may wanna try this

https://github.com/AXIM0S/rusty-magisk

@ghost
Copy link

ghost commented Feb 24, 2021

have you tried the patch "Install Magisk On Android x86 Project on VirtualBox"? I had the same issue, with patch scripts developed by shakalaca for Android x86, it's works.

@HemanthJabalpuri
Copy link
Contributor Author

have you tried the patch "Install Magisk On Android x86 Project on VirtualBox"? I had the same issue, with patch scripts developed by shakalaca for Android x86, it's works.

Since I have directly installed PhoenixOS to harddisk instead in VirtualBox, I have to do some process manually.

I think PhoenixOS is somewhat different than Android-x86 even though it is based on it.

Thanks

@ghost
Copy link

ghost commented Feb 26, 2021

The UI is different but the core is equal.
Virtualbox or PC are the same. Take inirt.img and ramdisk.img execute patch scrits on android and you got new and patched inirt.img and ramdisk.img so you can replace it.

@HemanthJabalpuri
Copy link
Contributor Author

HemanthJabalpuri commented Feb 26, 2021

The UI is different but the core is equal.
Virtualbox or PC are the same. Take inirt.img and ramdisk.img execute patch scrits on android and you got new and patched inirt.img and ramdisk.img so you can replace it.

That is what I did! If you are free, have a look at PhoenixOS. So that it can be fixed easily. Tell me if you have any thing to know when installing.

Thanks

@ghost
Copy link

ghost commented Feb 27, 2021

I tried to install PhoenixOS 3.6.1 from exe on Windows 10 (VirtualBox). I tested Magisk 21.4 last with zip and I used my instructions here as reported by shakalaca.
Module loading works. I installed riru core and after reboot rirud start and I can see in the list of magisk modules.
Xposed doesn't work because doesn't support x86_64, EdXposed doesn't work because support from android 8.0 and we have an android 7.1.1.
I installed MagiskFrida and works, I can debug applications from my client.

@HemanthJabalpuri
Copy link
Contributor Author

HemanthJabalpuri commented Feb 27, 2021

Module loading works.

May be harddisk installation is problem? See my logs I attached above.

Thanks for testing.

Edit:- @etmatrix Xposed is available for x86_64 API 25. See this for more info. Sorry for off-topic.

@ghost
Copy link

ghost commented Feb 27, 2021

My PC (virtual) has only one disk of 30GB. Windows 10 standard installation. Disk of Phoenix are in images system.img etc...
Could you post you patched ramdisk.img and initrd.img so I compare with mine?
In your logs I can't see errors.

@HemanthJabalpuri
Copy link
Contributor Author

Could you post you patched ramdisk.img and initrd.img

Will be available later today.

Thanks

@HemanthJabalpuri
Copy link
Contributor Author

HemanthJabalpuri commented Feb 27, 2021

@etmatrix

Now I installed Magisk 22001. Installed Busybox, Terminal Mods, Energised modules. None of them loaded after boot.

Here are the patched images.
Magisk-files.zip

@ghost
Copy link

ghost commented Feb 27, 2021

No diff in patching, there are some differences in binary because you use magisk 22 and my is 21.4.
In your log there is this part. Seem the modules are loaded.

02-27 19:24:48.376  1291  1292 D : bind_mnt: /sbin/.magisk/modules <- /sbin/.magisk/mirror/data/adb/modules
02-27 19:24:48.416  1291  1292 I : * Running module post-fs-data scripts
02-27 19:24:48.417  1291  1292 I : * Loading modules
02-27 19:24:48.417  1291  1292 I : energizedprotection: loading mount files
02-27 19:24:48.417  1291  1292 I : terminalmods: loading mount files
02-27 19:24:48.417  1291  1292 I : busybox-ndk: loading mount files

@HemanthJabalpuri
Copy link
Contributor Author

In your log there is this part. Seem the modules are loaded.

It seems loaded but not actually. I ran busybox, ep, cdn to test those.

I think this is where is actual issue comes

02-25 01:26:54.358  1285  1286 E : mount /sbin/.magisk/block/system->/sbin/.magisk/mirror/system failed with 16: Device or resource busy

Thanks

@ghost
Copy link

ghost commented Feb 27, 2021

Also in my logs I have

E : mount /sbin/.magisk/block/system->/sbin/.magisk/mirror/system failed with 16: Device or resource busy

@HemanthJabalpuri
Copy link
Contributor Author

Also in my logs I have

Then I have to wait for @topjohnwu to see my logs.

@justneedhelp
Copy link

I don't know about PhoenixOS, but I use Android x86_64 8.1.0 on top of VirtualBox and I can confirm that Error 16: Device or resource busy is present here. I don't know how to fix it. Tried installing Android x86 with both /system read-write and read-only.
All versions of Magisk started from 20.4 to 22.0 have these Errors in log:
MagiskError

And moreover... it seems I found the reason of this problem (assuming I use Android x86 8.1.0 VirtualBox):
Output cat /proc/mounts shows me the following output:
bug
So, the devices are becoming busy after Android has booted so Magisk cannot remount them. I think we should somehow avoid /dev/loop0 (system.sfs image) and /dev/block/sda1 from mounting as Magisk mirrors in order to allow Magisk to mount mirrors from /sbin/.magisk/block/. I don't think topjohnwu is going to solve our issue because he thinks this is a Android x86 architecture issue, not Magisk itself. But somehow we need to find a way to solve this issue. Either modifying Magisk init script or Android x86 init ramdisk?

@HemanthJabalpuri
Copy link
Contributor Author

I can confirm that Error 16: Device or resource busy is present here.

Ok, what about modules? Are they loading?

I saw you issue in shakalaca's tool. I also have v22 not detecting root problem.

Thanks

@justneedhelp
Copy link

justneedhelp commented Mar 1, 2021

Ok, what about modules? Are they loading?

No, they are not installing and loading at all. I tried to install MagiskHide Conf Props and when I tried to flash it I got an Error: Please install Magisk 20.4+ although I already installed it.

@HemanthJabalpuri
Copy link
Contributor Author

Error: Please install Magisk 20.4+ although I already installed it.

It may be because of Internet issue(?) Or Additional Setup problem(?).

I also have these issue before in Phoenix, I don't what I did to fix. But they are fixed😅

Thanks

@justneedhelp
Copy link

justneedhelp commented Mar 1, 2021

It may be because of Internet issue(?)

No, I successfully configured VirtWifi interface and the Internet works fine.

Or Additional Setup problem(?).

Yes, I have this issue. Once I installed Android 8.1.0 I just taped 'Yes' and everything set up. But all other times, after reinstalling Android x86 on VirtualBox, I tap 'Yes' on Additional setup dialog and it reboots and appears again and again. Any way to fix it?

@HemanthJabalpuri
Copy link
Contributor Author

Any way to fix it?

I have this issue when I used rusty-magisk which is not resolved. See axonasif/rusty-magisk#1

Thanks

@justneedhelp
Copy link

justneedhelp commented Mar 1, 2021

Whoa! I installed last canary version of Magisk and somehow modules worked! Tested on MagiskHide Props Config module.
Steps I did:

  1. Assuming I use Android x86_64 (AOSP) 8.1.0 on top of VirtualBox. Installed a system from ISO with /system read-write
  2. Enabled ADB debugging through developer options (5 tap click on build number in Android Settings)
  3. Established ADB connection with PC via adb connect Android-x86 IP address
  4. Download latest canary Magisk build from https://github.com/topjohnwu/magisk_files/tree/canary (app-debug.apk)
  5. Git clone shakalaca scripts https://github.com/shakalaca/MagiskOnEmulator and follow steps described in https://github.com/shakalaca/MagiskOnEmulator#install-magisk-on-android-x86-project-on-virtualbox (don't forget to rename app-debug.apk to magisk.zip)
  6. If you have previously Magisk version installed, then after installation Magisk Canary with steps described in 4. while opening Magisk app after reboot you will see this error:
    abnormal
    But don't worry! You can always use Command Line Interface instead of GUI, just open Terminal Emulator or adb shell and type su and then check that magisk was successfully installed by typing # magisk -c
  7. Then, install module ZIP by typing # magisk --install-module /path/to/your-module.zip
  8. Reboot.

Notice: first time I installed ZIP module through CLI, I didn't see any output and module was not installed. But after second reboot somehow I repeated the operation and now module (for example: MagiskHide Props Config) worked well!
You can start module just by typing props from Terminal Emulator or find it in /data/adb/modules/MagiskHidePropsConf/system/(x)bin folder. I don't guarantee this solution will work on your Android x86 distribution but this is the only solution I found after weeks of nightmare!

I still see
E : mount /sbin/.magisk/block/system->/sbin/.magisk/mirror/system failed with 16: Device or resource busy
Error in my Magisk logs but this is the only Error message and Magisk environment initialization was done successfully!

@ghost
Copy link

ghost commented Mar 5, 2021

For me installation and loading of modules always worked after the work of shakalaca on MagiskOnEmulator for Android 8.1 X86. I tried many modules riru core, edxposed, magisk hide prop config and others. Today I tried also LSPosed for a test and I installed from gui without issue. It's work with R4 and R5.
The error "Device or resource busy" is irrilevant for me.

@topjohnwu
Copy link
Owner

Running Magisk through an emulator is not officially supported, but PRs are welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants