topjohnwu / Magisk

The Magic Mask for Android
GNU General Public License v3.0
48.27k stars 12.33k forks source link

Bootloop with patched boot.img - Nvidia Shield TV Pie Update #1750

Closed MrNobody206 closed 5 years ago

MrNobody206 commented 5 years ago

Hey. Since the update from Oreo to Pie, it is no longer possible to use Magisk on Nvidia Shield TV 2017. When I flash the patched image in fastboot and restart, I hang in the bootloop. If I flash the normal boot.img it works again.

I haven't found a way to create a log yet. If you know one I will try.

topjohnwu commented 5 years ago

I'm pretty sure it is caused by incompatible modules installed....

MrNobody206 commented 5 years ago

i dont have any module installed. I already flashed clean. A lot of nvidia shield user reported this problem now.

tam1m commented 5 years ago

This issue should be reopened. Magisk does not work on the latest Nvidia Shield system update. It has nothing to do with modules. Flashing a Magisk patched boot image onto a clean Shield TV, gets it stuck at the Nvidia bootlogo.

TheyCallMeZ commented 5 years ago

I'm having the same issue on the pixel 3a after the August update. Did a full factory reset and even tried getting the full rom update from Google directly to get to as stock as possible.

eromatiya commented 5 years ago

Same issue for me on Samsung J810f. I followed the instruction on patching the AP_[XXX].tar.md5. Bootloops after updating the binary in magisk manager.

elliwigy commented 5 years ago

the firmware only contains system vendor boot and recovery.. no vbmeta or other partitions..

magisk shows it patches both boot and recovery but when flashing or attempting to boot from fastboot to either one it just sits on the nvidia logo and never does anything..

further more i tried using magiskboot to unpack the boot and recovery images. when it unpacks in the dir is kernel, ramdisk.cpio, header... in the details it says it contains ramdisk in gzip format.. when trying to decompress ramdisk it says its not a valid gzip format..

long story short magisk app shows successful but then doesnt work and manually it gives errors trying to decompress or modify boot or recovery.

I dont have logs bcuz of course magisk app reports no errors when patching..

when running fastboot getvar all i only see bootloader, blob, boot, recovery, cache, userdata, dtb, and i think rp4.. using magiskboot to unpack boot and recovery shows header, kernel, ramdisk.cpio and i believe thats it.. trying to decompress ramdisk from boot says not a valid ramdisk and for recovery it says its not a valid gzip and is unable to decompress despite the details for recovery saying ramdisk is gzip..

flashing a system.img gsi works.. i am not sure if its a verity issue or signature issue or what but these are my findings so far..

elliwigy commented 5 years ago

to add i see original poster says his is bootlooping.. mine does not bootloop.. it shows the orange warning about bl unlock then nvidia logo then sits/hangs there until i pull power n restart forcefully.. if i just did fastboot boot itll start to os with stock boot.. if i flashed it i have to manually boot to fastboot and reflash stock boot/recovery to get it back.

elliwigy commented 5 years ago

To test some stuff i used sukernel to manually edit recovery.img.. i remove /verity_key and the verityid from cmdline.. i edit prop.default in cpio/ramdisk and also added some androidboot props to cmdline.. i am able to boot with it just fine.. in OS I can see the cmdline props i set but not the prop.default settings... however when i reboot to recovery after flashing both boot and recovery partitions with my modified one i can connect to adb in recovery and it sees all my changes including prop.default.. of course and commands or attempts to go into shell gives me an error about /system/bin/sh not found..

im new to this stuff but hopefully this info is helping someone figure this out..

i tried to use sukernel to fix the magisk patched recovery.img but i dunno whats causing it to break but was unsuccessful..

elliwigy commented 5 years ago

so the ramdisk is actually in system.img.. i mounted system.img and it has all the ramdisk files for runtime.. recovery.img ramdisk is actually for recovery and boot.img has no ramdisk.

topjohnwu commented 5 years ago

If the case is A-only system-as-root, #1674 If the case is NVIDIA providing incorrect images, then it is not Magisk's fault

elliwigy commented 5 years ago

I dont see how that is tied to the issue at hand. The images that the other user said were wrong is not 100% accurate.

Nvidia posted stock user images and listed them as "dev" images.

This does not change the fact that Magisk does not properly patch the STOCK non dev firmware released by Nvidia.

Of course dev images have a root shell by default making it easier to root but what if someone doesmt want to use developer firmware and simply wants stock rooted? Stock rooted typically runs smoother than debug/eng firmware especially if the standard Shield gets bogged down.

I know this isnt a top priority and doesnt have any demand compared to other devices but it would be nice to have a solution and a working alternative on stock firmware.

I suppose there isnt much to do if you decide to keep it closed. It will give me something to do but I wanted to be clear the issue is still not resolved.

jinx10000 commented 5 years ago

I agree, I don't use the dev pre-rooted images and Magisk has always worked. They posted the wrong device image at one point for a short time and I bricked my Shield (actual brick - no power) so I don't like to use them... Now they basically did the same thing by posting the wrong (user) image again.

I don't know if A-only System as Root is the problem or if this was added by the update.

jeffbeckerimp81 commented 5 years ago

By gym

On Tue, Aug 13, 2019, 7:54 PM TheyCallMeZ notifications@github.com wrote: I'm having the same issue on the pixel 3a. Did a full factory reset and even tried getting the full tom update from Google directly to get to as stock as possible.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

elliwigy commented 5 years ago

Yea, even if they release the dev images anytime soon we will still most likely not be able to magisk patch either stock or eng firmware and will likely only have a root shell.. might end up having to do some sort of system root instead of systemless..

The ramdisk appears to be on/in system.img and is separate from the recovery ramdisk and boot.img appears to just be a kernel. To avoid issues modifying the system ramdisk one would need to get a bit clever if we are going to have a "systemless" root.. My guess is somehow patch it into vendor..

So far I am missing somethin as im still having trouble booting with anything outside of boot and recovery images being modified

elliwigy commented 5 years ago

seems it was inadvertently fixed with latest update.. ramdisk is merged into system.img on latest shield update which latest magisk now supports.

thekiefs commented 5 years ago

@elliwigy I tried patching Nvidia Shield 8.0 with Magisk 20 but got the boot loop. Are you sure this is fixed?

s3phir0th115 commented 4 years ago

I've tried installing Magisk by patching the boot.img both with the stock and the dev rooted images' respective boot.img, and every time it hangs on the Nvidia logo and doesn't fully boot. This is with the 8.0.0 version and Magisk 20.1, and also the latest canary build made earlier today.