-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
VIVO/iQOO kernel restictions: "Operation not permitted" when executing su
or mounting to /system
, or bootloops if rooted
#5148
Comments
|
Kernel sources of some vivo devices, but unfortunately, there are no ones of relative devices |
Update: Kernel source code of iQOO Z1 is currently available! |
su
and magic mounting
Here are my Device Vivo V5 mt6750 kernel sources which can be helpful for you to fix my problem |
Found something (Chinese) about Vivo's unqine behavior: https://bbs.pediy.com/thread-268165.htm This points out adding |
Can you make a build, to fix this? |
consider Magisk is systemless-root method (and probably will stay) |
please Guide which Tools we use for unpack or modify System.img to grant root Access |
I have though about it a bit, the problem of this issue is Magisk is not marked as a "system process" because it register itself as a service. Maybe the
Maybe a solution would be to make This is to avoid using |
According these tests, I think the kernel:
If so, there must be some weird restrictions in their kernel. |
As magisk is directly in the init process it can mount according to theses 3 rules. Making magisk daemon handle mount/unmount could be a workaround. Also hex-patching the kernel could also be a viable solution, like what's already done with Samsung defex. |
Yes but we still have another issue (apps cannot execute any binary named "su") so I tend to patch the kernel, but I cannot find anything about this weird behavior in their kernel source code. I will upload the source code to github. |
Well, making |
does it affect symlinks? |
@aIecxs actually |
Uploaded the kernel source code to https://github.com/canyie/iQOO-Z1-kernel |
This comment was marked as spam.
This comment was marked as spam.
Trying to execute any binary named "su" in Twoyi (an android container that interprets syscalls and run another Android system on an android device) or even in TWRP will also throw an operation not permitted error. So this may be a hardware restriction, wanna know why they did strange things to their devices 🤔 |
@canyie it's really common for most TWRP recoveries to use stock kernel to work properly on a device. |
The "Prevent mounting to /system if the program path is not in allowlist", maybe it's possible to get magisk daemon to be in the allow list by using |
@Fox2Code you got a vivo device? are you sure but the mount issue can be easily bypassed. i hv done one. the core issue is |
@yujincheng08 nah, I'm just theorizing, if I didn't had so many problems in my life and the money I would probably just buy one to try to fix the bug, unfortunately I need to take care of my life first. |
actually there are requirements for unblocking su execution read fs/vrr.c in https://github.com/vivo-source-mirror/Y53s no blocking SU on LOS20 pre rooted userdebug gsi (vivo y31 2021), but it's become blocked after renaming /system/xbin/su from source: noused notrace void set_rs_s_u(void) There'are also list of files yo search to unblock SU it's should be enough to have some files in firmware or find how to patch kernel here |
I Rebuild kernel Vivo Y21s su Can exec And mount Working but |
Patch for su (if only execution blocked). Both compare two symbols with s and u Search for ( . - any symbol, I used radare2 /x command) For mount (see above universal patch for /system ). do_mount –> vrr_do_mount_check_before_mount –> do_mount_check patch vrr_do_mount_check_before_mount make it always immediately return 1 You should do it manually. |
ok! |
did you able to do it before? |
so my patches worked on stock rom, but bootloops on gsi, right? magisk SUU worked on gsi? |
just flash gsi into system partition xD |
for tests you should
In my case it's ldr w8, [x0, #0x50] replace 'cbz w8' with 'b' convert it back 085040B97300001408A04039 Final patch for me |
Thank you very much this helped a noob like me to get magisk-26.4 with su working on my Vivo v15
My Notes:
|
@AarifZ actually it's possible to patch kernel with radare2, I'm just too lazzy to write how to and to lazzy to write script for automation
then it's become possible to write |
@romanovj ah seems good maybe someone can fuse the magisk tools and radare2 and some script to make a Boot.img patcher for these devices and throw exception for unsupported kernels. only automation I know is tasker unfortunately possible but not feasible here. |
Thank you everyone, can you please easy way to access su after rooting samsung galaxy via magisk? |
Is this still for devices with released kernel source, or can be used with closed source? |
you don't need sources for hexpatching |
|
If done hexpatch installing selinux permissiver in magisk help fix many module issues which aren't executing or having issues. |
I have Y81,android 8.1 on hand. I faced the same situation. |
Have you tried mtksu? @depesh1977 |
|
Vivo Y52s 5G (PD2057C) FuntouchOS 10 MTK6853 Only applicable to kernels with compilation time less than September 17, 2024 (tutorial release time) and kernel version 4. x. If the device has a 5. x kernel, please directly flash GKI.0x73 > 0x77 (su > wu)
There should be several hits. For example:
Write down the hexadecimal digits in the first column. Third, run Then, run Finally, Perform the same operation on the other hexadecimal addresses noted above, then enter q to exit. Bug: Magisk Daemon still cannot boot up and can only be manually started using the |
Device: iQOO Z1/VIVO X70 PRO/iQOO NEO3, and more
Android version: N/A
Magisk version name: N/A
Magisk version code: N/A, but more serious since 24302
Magisk fails to mount /system on some Vivo/iQOO devices.
According to a bug report from a "Vivo internal staff" who has a device running userdebug build,
adb root
and manually mount /system works but fails when mounting in Magisk superuser environment. After debugging with him/her/them, we found that the device only allows programs in /system to mount the system partition (move binary that will mount /system to other partitions, and it fails even in adb root environment). I believe that the device has an allowlist and refuses to mount key partitions for programs if their partition is not in the allowlist.I think the following two solutions may fix it:
I'm unsure when this problem will be solved, so I opened an issue to track the relevant information.
Edit: even successfully mount
su
to/system/bin/su
, executingsu
will throw an operation not permitted error.The text was updated successfully, but these errors were encountered: