-
Notifications
You must be signed in to change notification settings - Fork 11.1k
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
Direct Install fails on some MediaTek/Unisoc devices due to empty init_boot partition #7231
Comments
How did you initially root it? It's got an MTK Dimensity 9000 SoC, so likely they've done something weird, as usual. Going to need the list of files from: |
I did initial root by flashing patched boot.img which I patched on other device. Also I had to fastboot flash it, because fastboot boot boot.img showed invalid command on the Pad... Damn OnePlus. Here is the that
|
I assume you mean that you patched and flashed init_boot.img? You would need to patch and fastboot boot that, not boot.img. Interestingly looks like it found the partition correctly:
Can you dump it manually and upload it?
|
To be honest, I was following xda guide on rooting this device and they assumed dumping boot.img (which I did via fastboot enhance) and then patched it in magisk, then flashed it. I assume this could be the case? But even if I patched and flash boot.img and not init_boot.img, I am rooted without issues currently. Here is the init_boot.img (uploaded to my Google drive because I couldn't upload it here) https://drive.google.com/file/d/1APrJUoivzH0ivS-BU0D5ETUmuKUA92DY/view?usp=drive_link Also this device has vendor_boot and vbmeta so I am not sure know what should be the proper way to root it then. |
I can't download it because it says it's in your Trash. |
Oh, sorry, my mistake... Try it once again please, I updated the link. |
What was the output from the dump command? That .img is empty (all zeros). 🤔 |
This was the output
|
If you dump init_boot from "fastboot enhanced" or whatever does that produce a normal non-zeroed .img? |
Can you give me a dump while booted of boot.img?
|
I guess you mean dump of that boot.img file? Because if I dump that boot.img and try to boot it via fastboot, I get the error below. The same one as if I try to temporary boot the patched one. This fastboot boot command is normally working on other devices for me if send from the same PC (for example if I try to boot corresponding boot.img of my OnePlus 10 Pro to my OnePlus 10 Pro).
Here is the output from the DD command: (output just to compare it):
And here is the drive link |
Perfect, so yeah presumably the bootloader just doesn't allow the Okay, so that dd dump of the boot partition is completely normal, so one of 2 weird things is going on here: Either the init_boot partition specifically can't be dumped while booted for some reason, or, it's intentionally a fake empty init_boot partition and the device is only using the boot partition. 😯 |
By the contents of the hdr4 boot.img ramdisk, I'm guessing it's the latter, but not sure how Magisk can accommodate such fuckery from MTK/OnePlus (to I guess falsely pass CTS/VTS by mimicking a modern setup?) 🤔🫤 |
I can confirm the same issue also happens on Doogee T10 and Teclast P40HD which use Unisoc T606/616 instead of MTK SoCs 🤔 |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
@pndwal Please don't derail. His init_boot partition is 8mb of literally all zeros, and as I said there's an actual ramdisk in boot partition, not just Magisk's added entries. |
Mhm, that's some weird stuff going on on this MTK CPU it seems. THe question is if we or you can do something about it. 🤔 |
Only thing I can think of is if init_boot seems invalid fallback to using boot, but it'll really mess up the script/code and that's frustrating because it shouldn't be something that should ever have to be added in the first place. |
Well, MTK & OnePlus, good job, it seems... :/ |
Another idea would need a larger rewrite/refactor and involve Magisk be aware of what partition it's installed into and have Direct Install maintain that. (So not sure anyone would ever go for it.) |
Mhm, It would be great, yeah, but as long as this device can be rooted at least by flashing the boot.img via ADB, it is not critical, I think. |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
I'm also facing this problem on Oneplus Nord 3 5G. I initially rooted the phone with a dumped and patched boot.img and fastboot flash boot boot.img @osm0sis do you need more information? |
No I think we've got this diagnosed, just not sure what the best solution would be, so I'll leave that to others. |
The question is if we can fix it somehow, or Magisk will fix somehow later. 😇 🤔 |
Magisk cannot be installed directly on the OnePlus Pad.
Device: OnePlus Pad
Android version: 13
Magisk version name: ee34f77
Magisk version code: 26105
magisk_install_log_2023-08-13T17.05.25.log
The text was updated successfully, but these errors were encountered: