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

Kernel 5.10 Mediatek GKI 2.0 Platform Issue (Dimensity 8100 - MT6895Z) #105

Closed
v4lkyr opened this issue Nov 1, 2022 · 10 comments
Closed

Comments

@v4lkyr
Copy link

v4lkyr commented Nov 1, 2022

Hello there.

I unpacked my original boot.img with your tool, switched the "kernel" part with the GKI I built with latest android12-5.10 build environment. I used gki_defconfig. But it doesn't boot. Is there maybe something different with MTK GKI 2.0 platform? What might be the problem here?

Here are my original images and the GKI Image I built.

https://drive.google.com/drive/folders/1VPC6lM7kWc0wTaxTcZFCwBbvRxCnvbQ9?usp=share_link

@cfig
Copy link
Owner

cfig commented Nov 7, 2022

Hi,
I've no idea about kernel stuff, as I don't work in kernel space.
I unpacked the boot.img you shared, from the kernel signature we see the image is GKI based, so most probably you may get hints here?

https://source.android.com/docs/core/architecture/kernel/gki-android12-5_10-release-builds

Sorry I cannot do more to help on this. Good luck ~

@v4lkyr
Copy link
Author

v4lkyr commented Nov 8, 2022

I understand.

My phone still doesn't boot when I unpack, swap the stock kernel with the GKI one from the link you provided, repack and flash.

I want to make sure that this tool performs the packing/unpacking correctly without any problem, specifically on this platform. Can you confirm?

If yes, then the problem is most probably due to my kernel configuration.

@cfig
Copy link
Owner

cfig commented Nov 11, 2022

Known working platforms are recorded here:

https://github.com/cfig/Android_boot_image_editor#compatible-devices

These platforms have been verified by me and other volunteers, and they work fine with this tool.

Regarding kernel replacement, in rare cases I also compile kernels by myself and replace kernel in boot.img, it works fine.

Do you have access to serial console logs? That should provide you more info about the failure reason.

@v4lkyr
Copy link
Author

v4lkyr commented Nov 12, 2022

The reason I started this issue is, the unpack_bootimg.py script in Google's mkbootimg tool and your tool produces different results, so I was wondering if one of them is the correct way for me. Being on a MTK platform and the way MTK handles everything in a different manner than qcom is challenging.

To make things even more funny, Google's monthly gki builds fail booting on my device too. :) (what's the point of GKI then?) Unpacking, getting the kernel inside them and repacking with my stock boot image using your tool or mkbootimg also failes.

So at this point I'm starting to think if there is a special key MTK/oplus used to sign the stock boot image. I've came across a file called "oplus_avb.pubkey" on my phone, in vendor/etc. Is this it?

Currently I am building an USB to UART debug cable, I hope I can see the UART logs if my type-c port is physically wired for UART.

@v4lkyr
Copy link
Author

v4lkyr commented Nov 14, 2022

Okay I got the UART cable working, got the logs and all. So far I can say that this tool works correctly.

The problem for me is the GKI architecture. If I change something in gki_defconfig, prebuilt modules doesn't like this change and won't load. And the phone won't boot. So I need to build all the modules and somehow transfer them to the phone too (I don't know much about this part yet. And there are around 250+ modules!!)

UART logs save lifes! :)

Thank you for your attention.

@cfig
Copy link
Owner

cfig commented Nov 14, 2022

Good news :)
And thanks for sharing ~

@cfig
Copy link
Owner

cfig commented Nov 14, 2022

Let me record this device model in the incompatible device list, which may help others. What's the device model (if it's not confidential)?

@v4lkyr
Copy link
Author

v4lkyr commented Nov 14, 2022

I think it's compatible, not really "incompatible"

The device is realme GT Neo 3, it uses Mediatek Dimensity 8100 processor.

@hamjin
Copy link
Contributor

hamjin commented Dec 16, 2022

Let me record this device model in the incompatible device list, which may help others. What's the device model (if it's not confidential)?

It seems his kernel's problem, not the editor.

@cfig
Copy link
Owner

cfig commented Apr 1, 2023

Thank you ~
Hope you like this tool, Any comments are welcome ~

@cfig cfig closed this as completed Apr 1, 2023
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

3 participants