phhusson / treble_experimentations

Notes about tinkering with Android Project Treble
3.31k stars 655 forks source link

Huawei Enjoy Max ( EMUI 8) unable to boot any GSI ROMS #1623

Open rocwellg opened 3 years ago

rocwellg commented 3 years ago

Hello team,

This is my first attempt to flash GSI roms when I decided to update my Huawei Enjoy Max ( latest version on EMUI8, with qualcomm cpu ). I've been playing around for a few days now and tested quite a lot of GSI Aonly or AB roms. Almost all of them failed to reach boot animation step( please correct me if I'm wrong). I've tried fastboot flash with stock recovery, and TWRP. I can only see the Huawei logo, then it will restart.

The only GSI rom that I can get to boot animation ( with the android logo flashing) is with AOSP 8.1 phhusson (system-arm64-aonly-vanilla-nosu.img . However, it's still a bootloop. phone will restart in 30secs. After countless trials, I managed to get into the OS once, with AOSP 8.1 phhusson (system-arm64-aonly-vanilla-nosu.) and Magisk flashed via TWRP. This was the only successful attempt, I've immediately reflash it and got bootloop.

I have been reading a lot of posts and seems 8xMax/ Enjoy Max should work with a number of GSI rom which is apparently not like my case.

I was wondering if any of you could give me some guidance on it.

Thank you !!!

JonnyTech commented 3 years ago

I would start by flashing the stock ROM - all files, especially boot.img and vendor.img - to get it to a good booting state. Then flash the GSI to the system partition using either fastboot or TWRP. Wipe data then boot the phone. Your issue is either patched boot (because of magisk) or dirty flashing (ie not wiping data/storage).

AndyCGYan commented 3 years ago

Just update to EMUI9 as base. Yes, I've owned the device and used GSIs on it. You might not like the experience however, esp. with the revert of a fix made for it.

rocwellg commented 3 years ago

I would start by flashing the stock ROM - all files, especially boot.img and vendor.img - to get it to a good booting state. Then flash the GSI to the system partition using either fastboot or TWRP. Wipe data then boot the phone. Your issue is either patched boot (because of magisk) or dirty flashing (ie not wiping data/storage).

eRecovery has the option to recover the system. Does it mean boot.img and vendor.img will be flashed to normal state? After that, I assume I have to backup both .img using TWRP. I also notice that using fastboot to format userdata cause corruption. Is that I can only use wiping data from TWRP? ( Formating data using TWRP fails with error 255)

rocwellg commented 3 years ago

Just update to EMUI9 as base. Yes, I've owned the device and used GSIs on it. You might not like the experience however, esp. with the revert of a fix made for it.

Strangely my device only has EMUI8 available. Maybe because I bought this phone from China , different variant. Is it possible that I could locate a EMUI9 stock ROM to flash on it as base ?

JonnyTech commented 3 years ago

Does it mean boot.img and vendor.img will be flashed to normal state?

Who knows. Just flash full stock yourself manually - don't trust anything else to do it for you. eRecovery may only wipe data for all we know.

Formating data using TWRP fails with error 255

If data has been encrypted then sometimes you have to perform format more than once, or else change filesystem to something else then back again, ie ext4 >> f2fs >> ext4.

rocwellg commented 3 years ago

I've managed to update to EMUI 9 as base via official OTA, and flashed different GSI rom and boot without any issue. However, access to internal storage does not work. The system can recognize 64GB free space internal storage, but I'm unable to perform operations e.g. install apps from Playstore, create a folder using built-in file explorer, take photos.

Is it something related to /data encryption ? As formatting data using TWRP stills fail with error 255. Change filesystem also fail and it corrupts the data partition. On reboot, eRecovery will show and says data corrupted and requires formatting, and that's the only tool that can format data at this stage.

phhusson commented 3 years ago

Format with stock unmodified recovery.

Le lun. 14 déc. 2020 à 13:30, rocwellg notifications@github.com a écrit :

I've managed to update to EMUI 9 as base via official OTA, and flashed different GSI rom and boot without any issue. However, access to internal storage does not work. The system can recognize 64GB free space internal storage, but I'm unable to perform operations e.g. install apps from Playstore, create a folder using built-in file explorer, take photos.

Is it something related to /data encryption ? As formatting data using TWRP stills fail with error 255. Change filesystem also fail and it corrupts the data partition. On reboot, eRecovery will show and says data corrupted and requires formatting, and that's the only tool that can format data at this stage.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/phhusson/treble_experimentations/issues/1623#issuecomment-744387669, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAA4OWSWXH6MQMEJ64HPQLSUX3QZANCNFSM4UWLPYZA .

rocwellg commented 3 years ago

Finally managed to get GSI ROMs working on this phone. Wipe data with stock recovery and fastboot flash is the key. My main goal is to make this patch this phone for gaming as I noticed there's touchscreen deadzone during FPS gaming like PUBG. It failed to recognize tiny movements until a longer drag on the screen.

That's why I started to think about Magisk as google search comes up with a touch improvement module. Patching the recovery_ramdisk is the only option on Huawei as it does not have ramdisk/boot .img anymore. However, my device won't be able to boot with the patched recovery as described on the Internet. Is there any tricks to make this phone Magisk bootable ? Or if you are aware of a different way to improve the touch experience ?

Micoder-dev commented 2 years ago

Same problem for me bro how did you solve this my device is honor 7c