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

(darcy) Device Does Not Boot After Patching Boot.img #8297

Open
znbaboy opened this issue Aug 8, 2024 · 27 comments · Fixed by #8337
Open

(darcy) Device Does Not Boot After Patching Boot.img #8297

znbaboy opened this issue Aug 8, 2024 · 27 comments · Fixed by #8337
Labels
confirmed Issue confirmed to exist and the reason is known core This issue is related to Magisk Core enhancement New feature request

Comments

@znbaboy
Copy link

znbaboy commented Aug 8, 2024

Device: Nvidia Shield TV 2017 (darcy)
Android version: lineage-21.0-20240805-nightly-foster (Android 14)
Magisk version name: Magisk Canary
Magisk version code: 27006

Trying to boot device after patching/flashing boot.img via fastboot/bootloader causes device to return to bootloader interface. Fails to boot.

Magisk Debug Logs + Patched Boot.img.zip

@znbaboy
Copy link
Author

znbaboy commented Aug 8, 2024

Old issue that was never reopened for some reason: #8285

@hamedsbt
Copy link

hamedsbt commented Aug 9, 2024

Same issue on Nvidia Shield TV 2019 Pro
OS: Lineage-21.0-20240805-nightly-foster (Android 14)
Magisk version name: Magisk Canary
Magisk version code: 27006

@StupidRepo

This comment was marked as off-topic.

@StupidRepo

This comment was marked as abuse.

@vvb2060
Copy link
Collaborator

vvb2060 commented Aug 13, 2024

You are using a custom ROM, please ask the ROM builder to contact us.
If anyone knows how to fix this, the issue will be reopened.

@vvb2060 vvb2060 closed this as not planned Won't fix, can't repro, duplicate, stale Aug 13, 2024
@znbaboy
Copy link
Author

znbaboy commented Aug 13, 2024

You are using a custom ROM, please ask the ROM builder to contact us. If anyone knows how to fix this, the issue will be reopened.

LineageOS Gitlab issue created: https://gitlab.com/LineageOS/issues/android/-/issues/7545

@znbaboy
Copy link
Author

znbaboy commented Aug 13, 2024

Looks like LOS team doesn't want anything to do with it either: https://gitlab.com/LineageOS/issues/android/-/issues/7545

Oh well...

@hamedsbt
Copy link

hamedsbt commented Aug 13, 2024

Looks like LOS team doesn't want anything to do with it either: https://gitlab.com/LineageOS/issues/android/-/issues/7545

Oh well...

I would say, their refusing is reasonable. Unless, we provide an evidence that prove the bug is related to LOS.

@znbaboy
Copy link
Author

znbaboy commented Aug 13, 2024

Looks like LOS team doesn't want anything to do with it either: https://gitlab.com/LineageOS/issues/android/-/issues/7545
Oh well...

I would say, their refusing is reasonable. Unless, we provide an evidence that prove the bug is related to LOS.

I agree. Unfortunately, we are at the mercy of the developers.

@znbaboy
Copy link
Author

znbaboy commented Aug 13, 2024

You are using a custom ROM, please ask the ROM builder to contact us. If anyone knows how to fix this, the issue will be reopened.

LineageOS is does not support root so we cannot get any support on their end. Is there any reason you believe it is an issue with the ROM? Something I can provide the devs there at-least? Right now we are at a dead end...

image

Also, I see another open issue with someone else using LineageOS and you tried providing support for their device? I don't understand why our issue is being dismissed when we are also on LOS..?

#7390

@vvb2060
Copy link
Collaborator

vvb2060 commented Aug 14, 2024

Without help from the ROM builder, troubleshooting the issue could be challenging. Can you get kmsg? #7390 uploaded kmsg so we know what happened.

@hamedsbt
Copy link

hamedsbt commented Aug 18, 2024

@vvb2060 Hi, thank you for your support.

This is Unsuccessful boot /sys/fs/pstore/console-ramoops file after install Magisk Canary v27006
console-ramoops-0-magisk.zip

And this is successful boot /sys/fs/pstore/console-ramoops file without Magisk:
console-ramoops-0.zip

I'm ready to be a volunteer to install any modified Magisk file(s) to overcome this issue.

Device: Nvidia Shield TV 2019 Pro
OS: Lineage-21.0-20240805-nightly-foster (Android 14)

Thank you!

@vvb2060 vvb2060 reopened this Aug 18, 2024
@vvb2060
Copy link
Collaborator

vvb2060 commented Aug 18, 2024

Don't use canary, install debug version and upload kmsg.

@hamedsbt
Copy link

hamedsbt commented Aug 18, 2024

@vvb2060
I've installed Magisk app-debug.apk (canary-27006), but after that, I couldn't boot Android successfully. So, I went to recovery and pulled the /sys/fs/pstore/console-ramoops file.
console-ramoops-0.txt

Also the result of dmesg > /sdcard/dmesg.log is:
dmesg.log

Finally, the result of cat /dev/kmsg > /sdcard/kmsg.log is:
kmsg.log

Note: result cat /proc/kmsg > /sdcard/kmsg.log is empty!

Are these okey?

@vvb2060
Copy link
Collaborator

vvb2060 commented Aug 18, 2024

[    4.739385] magiskinit: Device config:
[    4.743489] magiskinit: skip_initramfs=[1]
[    4.747931] magiskinit: force_normal_boot=[0]
[    4.752632] magiskinit: rootwait=[1]
[    4.756555] magiskinit: slot=[]
[    4.760045] magiskinit: dt_dir=[/proc/device-tree/firmware/android]
[    4.766654] magiskinit: fstab_suffix=[]
[    4.770839] magiskinit: hardware=[darcy]
[    4.775107] magiskinit: hardware.platform=[]
[    4.779720] magiskinit: emulator=[0]
[    4.783641] magiskinit: LegacySARInit

Previously, bootloader used the skip_initramfs kernel command line parameter to decide which mode to boot into. For Android 10 devices, the bootloader MUST NOT pass skip_initramfs to the kernel command-line. Instead, bootloader should pass androidboot.force_normal_boot=1 to skip recovery and boot normal Android.

https://source.android.com/docs/core/ota/dynamic_partitions/implement#system-as-root-changes

@vvb2060 vvb2060 added enhancement New feature request confirmed Issue confirmed to exist and the reason is known core This issue is related to Magisk Core labels Aug 18, 2024
@hamedsbt
Copy link

@vvb2060 I unpacked the boot.img file (magiskboot -h boot.img) I want to apply the two kernel parameters you mentioned to the cmdline of the header file. Could you confirm if the format is correct.
cmdline=androidboot.boot_devices=sdhci-tegra.0,tegra-sata.0,sdhci-tegra.3 skip_initramfs=0 androidboot.force_normal_boot=1

Thank you.

@vvb2060
Copy link
Collaborator

vvb2060 commented Aug 20, 2024

LineageOS/android_kernel_samsung_sdm429@a3e0f79

@hamedsbt
Copy link

hamedsbt commented Aug 20, 2024

@vvb2060 Thank you for your reply.
I can't understand C or C++ code clearly. Could you confirm if the format is correct please?
cmdline=androidboot.boot_devices=sdhci-tegra.0,tegra-sata.0,sdhci-tegra.3 skip_initramf=0 want_initramf=1 androidboot.force_normal_boot=1
Or
Can I patch the kernel file directly via magiskboot --hexpatch kernel 736B69705F696E697472616D667300 77616E745F696E697472616D667300 ?
image

Thank you.

@aviraxp
Copy link
Contributor

aviraxp commented Aug 21, 2024

@hamedsbt
Copy link

@aviraxp Thank you for your help but I couldn't understand what you mean.

@vvb2060
Copy link
Collaborator

vvb2060 commented Aug 25, 2024

try https://install.appcenter.ms/users/vvb2060/apps/magisk/distribution_groups/public

@curiouslux408

This comment has been minimized.

@hamedsbt
Copy link

try https://install.appcenter.ms/users/vvb2060/apps/magisk/distribution_groups/public

Hi, It's working. Thank you! I also attached the console-ramoops-0 file:
console-ramoops-0

@vvb2060 vvb2060 linked a pull request Aug 26, 2024 that will close this issue
@hamedsbt
Copy link

hamedsbt commented Sep 8, 2024

I installed this version of com.topjohnwu.magisk package from canary channel, but the device doesn't boot again!
Screenshot_20240908-221419_Trebuchet

@aviraxp
Copy link
Contributor

aviraxp commented Oct 16, 2024

The fix has to be reverted because it breaks more legacy sar + 2si devices. Pleaseet maintainer pick LineageOS/android_kernel_lge_sdm845@026011c into kernel instead.

@hamedsbt
Copy link

But unfortunately the maintainer said that he wasn't interested in applying any changes to support Magisk!

@yujincheng08 yujincheng08 reopened this Dec 2, 2024
@hamedsbt
Copy link

hamedsbt commented Dec 2, 2024

@vvb2060 Do you update your version recently? Can I update magisk with your release? Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmed Issue confirmed to exist and the reason is known core This issue is related to Magisk Core enhancement New feature request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants