ponces/treble_aosp

Moto G8 Plus Bootloop after flashing

Closed this issue · 20 comments

Acknowledgements

  • I have chosen an appropriate title.
  • All requested information has been provided properly.
  • This is not a feature request.
  • This issue is not a duplicate of an existing issue.
  • The issue is solely related to this GSI.
  • This issue occurs with the latest available build.
  • I am not running a custom vendor on my device.
  • This issue is not kernel related.
  • This issue is not related to Magisk/KernelSU/APatch.

Info

  • Device: Moto G8 Plus
  • GSI version: aosp-arm64-ab-vanilla-14.0-20240414.img
  • Vendor: motorola/doha_retail/doha 10/QPIS30.28-Q3-28-26-4-1-6/9976a

Expected Behavior

Should boot into Ponces GSI build

Current Behavior

Boot looping after flashing.

Possible Solution

No response

Steps to Reproduce

  1. fastboot -w flash system aosp-arm64-ab-vanilla-14.0-20240414.img
  2. fastboot erase userdata
  3. fastboot reboot
  4. Reboots and continues to do so until it finally gives up

Logs

Device does not boot.
running adb pull /sys/fs/pstore returns
adb: error: failed to get feature set: no devices/emulators found

Additional context

I was able to sucessfully flash and run other ROMs such as AndyYan's builds (e.g. TD_lineage-20.0-20240317-UNOFFICIAL-arm64_bgN.img) using above commands.
I tried aosp-arm64-ab-gapps-14.0-20240414.img but it was too large for the storage of the Moto G8 Plus so I resorted to aosp-arm64-ab-vanilla-14.0-20240414.img instead. I have tried a previous stable version (Ponces AOSP 14.0 v2024.02.27) with the same result: boot loop.
Am I doing something wrong? Is there a way to supply meaningful logs?

fastboot erase userdata

That is the issue. Boot to your stock recovery then do a factory reset / format data from there then reboot. The GSI should start correctly.

After flashing via
fastboot -w flash system aosp-arm64-ab-vanilla-14.0-20240414.img
I try to boot into recovery using
fastboot reboot recovery
It tries to reboot, but I get a "No Command" screen instead of stock recovery.

ah got it: in the "No Command" screen, I pressed powerbutton + volume up and it shows the recovery menu. I select wipe data / factory reset and it sucessfully wipes. However, it still boot loops afterwards. Any further ideas?

Get vbmeta.img from https://dl.google.com/developers/android/qt/images/gsi/vbmeta.img

fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img

Also, do not need the -w when flashing system image:

fastboot flash system aosp-arm64-ab-vanilla-14.0-20240414.img

Brother first of all if you are clean flashing that is how you do it. SO he is doing it correct FYI. But yea, it doesnt boot anymore on older kernels i.e; 4.14, like my device isnt booting.

Okay, using the vbmeta as @JonnyTech suggested didnt help, it still boot loops. Here is what I did:

  1. fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img
  2. fastboot flash system aosp-arm64-ab-vanilla-14.0-20240414.img
  3. fastboot reboot recovery
  4. selected factory reset / wipe data
    Still boot loops.

Is there more information available on the compatibility to older devices with supposedly old kernels as @TechySkills suggestd?
What I do find odd is that I was able to install android 13 GSI from AndyYan (e.g. TD_lineage-20.0-20240317-UNOFFICIAL-arm64_bgN.img based on android 13) and versions based on android 14 don't seem to work, so @TechySkills might have a point. Can sombody explain that incompatibility a bit in detail (isnt the kernel "just software" as well and is flashed as well)?

@tobi-tobsen those exact steps coming from stock worked on my Moto but I do have a slightly newer model. I suggest to ask on the Telegram support group: https://t.me/phhtreble/ which is the official route for support.

Brother first of all if you are clean flashing that is how you do it. SO he is doing it correct FYI.

I beg to differ. On my device using fastboot -w would always cause a bootloop because it wiped too much additional stuff. After advice from PHH to go back to stock and to use the commands given above then it worked. But I guess that it is device specific so YMMV 🤷

@tobi-tobsen those exact steps coming from stock worked on my Moto but I do have a slightly newer model. I suggest to ask on the Telegram support group: https://t.me/phhtreble/ which is the official route for support.

Brother first of all if you are clean flashing that is how you do it. SO he is doing it correct FYI.

I beg to differ. On my device using fastboot -w would always cause a bootloop because it wiped too much additional stuff. After advice from PHH to go back to stock and to use the commands given above then it worked. But I guess that it is device specific so YMMV 🤷

Brother fastboot -w just erases userdata, metadata and cache, which is vital to erase if you are doing a clean flash (acc to my experience, otherwise device bootloops because of incompatible cache and old data based on older system)

so fastboot -w is not something that should cause bootloop. As ponces made a note that the new "Trunk Stable release" is a kinda a major release before the A15, and in which january Google also left support for 4.14 kernel, due to which many old devices would stop working, unless a workaround is found... So... On my 4.14 device, I am just using the february verison....

On my 4.14 device, I am just using the february verison....

I tried these february versions out:

For reference, I used these commands sucessfully:

fastboot --disable-verity --disable-verification flash vbmeta "vbmeta.img"
fastboot reboot-bootloader
fastboot -w flash system "aosp-arm64-ab-vanilla-14.0-20240227.img"
fastboot erase userdata
fastboot reboot

I also tried https://github.com/ponces/treble_aosp/releases/tag/v2024.03.28 (aosp-arm64-ab-vanilla-14.0-20240328.img.xz) because in the changelog it supposedly should work:

Add back support for <4.14 kernels

However it does not boot but is stuck in the "M powered by android" screen.

So it seems the latest one working is version https://github.com/ponces/treble_aosp/releases/tag/v2024.02.27 (aosp-arm64-ab-vanilla-14.0-20240227.img) on Moto G8 Plus for now, since the the gapps bundled version is too large to flash unfortunatley:

ending sparse 'system_b' 1/5 (786336 KB) OKAY [ 18.198s]
Writing 'system_b' (bootloader) Image size exceeds partition limits
(bootloader) Preflash validation failed

If I am using the vanilla version, how can I add the play store services / playstore via fastboot?

Please, check latest release which should fix your issues.

@ponces I tried your version aosp-arm64-ab-vanilla-14.0-20240509.img but unfortunatley it still boot loops.
Any idea of how I can provide logs / more info requried to solve this?

Can you get boot to reach adb?

Can you get boot to reach adb?

Yo brother uh I am also not able to boot on my Infinix Note 7 with 4.14 kernel, But i have these logs; (after it bootlooped in oem logo, I rebooted to recovery and using adb pull i pulled these)

Logs.zip
(These logs are in a zip because for some reason github does not allow the files with no extensions...) Phh sent me a gsi link to try and i am yet to try it...

PHH: @TechySkills try with https://phh.freeboxos.fr:56061/share/yK-5j7Hv0HIhUpUh/s-nocapex-unshared.img

@tobi-tobsen Try this and see if it works.... :/ I will also try, But please Ponces take a look at my logs also :)

Can you get boot to reach adb?

@ponces Unfortunatly not ( adb logcat is "waiting for device" during these bootloops). Also there is no TWRP recovery to do what @TechySkills did, afaik. Happy to follow along, f you have ideas what to try next.

I also tried the "s-nocapex-unshared.img" without success: it boot loops too.

Can you get boot to reach adb?

@ponces Unfortunatly not ( adb logcat is "waiting for device" during these bootloops). Also there is no TWRP recovery to do what @TechySkills did, afaik. Happy to follow along, f you have ideas what to try next.

I also tried the "s-nocapex-unshared.img" without success: it boot loops too.

Yes... I also tried it also bootlooped. But this time, It was a little better, the stock image took like 5 second to reboot again, and was giving a "boring-ssl" error in the logs, But now it took like 20 seconds to boot; and was giving a "bpfloader failed" or smthn like that error. If @ponces wants to take a look at these newer logs taken from the phh customized gsi, here they are.

Logs-PHH.zip

Interesting... Was this based on latest TD CI @phhusson?

[   33.552551]  (7)[1:init]init: starting service 'bpfloader'...
[   33.554738]  (7)[1:init]libprocessgroup: SetCgroup::ExecuteForProcess: failed to open /dev/blkio//cgroup.procs: No such file or directory
[   33.554804]  (7)[1:init]libprocessgroup: Failed to apply NormalIoPriority process profile
[   33.556016]  (0)[1:init]init: ... started service 'bpfloader' has pid 993
[   33.556076]  (0)[1:init]init: SVC_EXEC service 'bpfloader' pid 993 (uid 0 gid 0+7 context default) started; waiting...
[   33.574719]  (6)[993:netbpfload]NetBpfLoad: Android U QPR2 requires kernel 4.19.
[   33.574916]  (6)[993:netbpfload]NetBpfLoad: write('/proc/sys/kernel/unprivileged_bpf_disabled', '0
[   33.574926]  (6)[993:netbpfload]NetBpfLoad: ', 2) -> Invalid argument
[   33.574961]  (6)[993:netbpfload]NetBpfLoad: open('/proc/sys/net/core/bpf_jit_enable', O_WRONLY | O_CLOEXEC) -> No such file or directory
[   33.575473]  (0)[1:init]init: Service 'bpfloader' (pid 993) exited with status 1 waiting took 0.021000 seconds
[   33.575507]  (0)[1:init]init: Service bpfloader has 'reboot_on_failure' option and failed, shutting down system.

Interesting... Was this based on latest TD CI @phhusson?

[   33.552551]  (7)[1:init]init: starting service 'bpfloader'...
[   33.554738]  (7)[1:init]libprocessgroup: SetCgroup::ExecuteForProcess: failed to open /dev/blkio//cgroup.procs: No such file or directory
[   33.554804]  (7)[1:init]libprocessgroup: Failed to apply NormalIoPriority process profile
[   33.556016]  (0)[1:init]init: ... started service 'bpfloader' has pid 993
[   33.556076]  (0)[1:init]init: SVC_EXEC service 'bpfloader' pid 993 (uid 0 gid 0+7 context default) started; waiting...
[   33.574719]  (6)[993:netbpfload]NetBpfLoad: Android U QPR2 requires kernel 4.19.
[   33.574916]  (6)[993:netbpfload]NetBpfLoad: write('/proc/sys/kernel/unprivileged_bpf_disabled', '0
[   33.574926]  (6)[993:netbpfload]NetBpfLoad: ', 2) -> Invalid argument
[   33.574961]  (6)[993:netbpfload]NetBpfLoad: open('/proc/sys/net/core/bpf_jit_enable', O_WRONLY | O_CLOEXEC) -> No such file or directory
[   33.575473]  (0)[1:init]init: Service 'bpfloader' (pid 993) exited with status 1 waiting took 0.021000 seconds
[   33.575507]  (0)[1:init]init: Service bpfloader has 'reboot_on_failure' option and failed, shutting down system.

Yes brother, When the lastest TD GSI didn't work for me and gave these "boring-ssl" errors (the logs are below:)

Logs.zip (These logs are in a zip because for some reason github does not allow the files with no extensions...) Phh sent me a gsi link to try and i am yet to try it...

He sent me another GSI, https://phh.freeboxos.fr:56061/share/yK-5j7Hv0HIhUpUh/s-nocapex-unshared.img

And in that GSI the bpf-loader is the issue... So that is like SUS hehe. I also msged PHH himself and sent him the logs, but maybe he couldn't get enough time yet to look at the logs

Check latest release, please.

Any news? I'll close this if I have no response.

Sorry @ponces for my lack of repsonse, but I currently don't have access to the Moto G8 Plus since I giftet it to sombody running it a with your aosp-arm64-ab-vanilla-14.0-20240227.img as a "daily driver" (last version which worked for me).

Is there a convient way to update this without loosing all apps installed / configuration etc applied?
Please note there is currently no custom recovery rom available.