3

I have came across Boot flow and when there is based on boot state of a device, it shows different colot screen.

YELLOW: Warning screen for LOCKED devices with custom root of trust set
ORANGE: Warning screen for UNLOCKED devices
RED (eio): Warning screen for dm-verity corruption
RED (no os found): No valid OS found

Let me know where or from which path those screens are displaying?

Eg:Yellow Screen

Abracadabra
  • 151
  • 2

1 Answers1

4

This is all happen in OEM bootloader (proprietary) before android is started. This screen is displayed before splash screen only in yellow/orange/red state

alecxs
  • 4,034
  • 3
  • 16
  • 34
  • Let me know the path from aosp please. http://androidxref.com/9.0.0_r3/ – Abracadabra Sep 08 '21 at 06:53
  • 1
    @Abracadabra Bootloaders aren't part of AOSP. They are OEM-specific thing. AOSP contains just a basic reference implementation of final bootloader (which loads kernel); check AVB documentation and code. Final bootloader in the device may or may not be based on it. It's entirely up to the OEM. – Irfan Latif Sep 08 '21 at 07:08
  • So correct me if I am wrong. OEM specific will be available in device and not in aosp code? – Abracadabra Sep 08 '21 at 07:14
  • @IrfanLatif then how it communicates with aosp and oem specific? – Abracadabra Sep 08 '21 at 07:51
  • once chain of trust is broken android will not boot at all, that is what boot flow is designed for. are you mixing up with your other question "how can i trace whether avb is running normally or not?" – alecxs Sep 08 '21 at 08:06
  • @alecxs no. Very simple. I just need to know from which path those different screens are displaying? Eg: Orange Screen https://source.android.com/security/verifiedboot/boot-flow#unlocked-devices. In aosp souce code, which folder? – Abracadabra Sep 08 '21 at 12:05
  • 2
    don't know what you mean. bootloader is proprietary. do you have source code of aboot or lk for your device? – alecxs Sep 08 '21 at 12:20
  • no source code but usually where this will be available? @alecxs please let me know what is 1k or aboot. Sorry I am not aware of this. – Abracadabra Sep 09 '21 at 05:15
  • 2
    @Abracadabra please spend time to learn the basics. It'll help you self answer many of your questions. You can start with https://forum.xda-developers.com/t/info-android-device-partitions-and-filesystems.3586565/ and https://forum.xda-developers.com/t/info-boot-process-android-vs-linux.3785254/ and https://android.stackexchange.com/a/220678/218526. Do check the AOSP links in the last link. – Irfan Latif Sep 09 '21 at 05:31
  • 1
    IrfanLatif has linked source code of aboot but I am not even sure this is the stage where OEMs implement boot state warning screen. After reading source code I believe it is happen earlier in OEM bootloader which is what I should have called SBL (which is proprietary closed source). AVB/dm-verity on the other hand is implemented in aboot. google documentation is bit confusing because bootloader check (yellow screen) is actually predecessor to verifiedboot http://newandroidbook.com/Articles/aboot.html – alecxs Sep 09 '21 at 11:01
  • 1
    for mediatek devices it is in lk (little kernel, aka fastboot) which is bit different to qualcomm devices. XopmoH97 has written hex patch for disable yellow screen on mediatek devices orange_state_disabler_v0.3.zip – alecxs Sep 09 '21 at 11:14
  • I analysed the hint message text of boot state warning screen in code but I am not able to find where those message comes from. – Abracadabra Sep 09 '21 at 11:36
  • I am not able to download the zip. @alecxs – Abracadabra Sep 09 '21 at 12:30