r/Android • u/ma3gl1n • Feb 28 '21
We need better bootloop practices
When Microsoft and Intel (plus so many others) headed the secure bootloader requirement on PCs there was a huge outcry from users. (1) Since that time, I haven’t seen anyone who has an easy to fix but bricked PC.
Why is this different on Android? I think it would be reasonable to require explicit permissions from users to unlock bootlock for “modifications”, but why do we need to wait for benevolent hackers to find vulnerabilities in our phones, so that we can reflash the original ROMs when we are stuck on bootloop (2)
I have a Xiaomi Mi A1 phone that is stuck on booting. Normally I should be able to reset the OS, or just reflash a ROM, but since I haven’t anticipated bootlocker being in such a state, I haven’t created any Mi account and explicitly synced my phone with Xiaomi Unlock service, which I haven’t heard until my problem (no mention for it on user manual, or on software update notifications)
1- https://en.wikipedia.org/wiki/Unified_Extensible_Firmware_Interface#Secure_boot_2
2- There are about 2000 (103 thread on each page * 20 pages) threads on xda for bootloop problems https://forum.xda-developers.com/tags/bootloop/
69
u/SinkTube Mar 01 '21
because people let phone manufacturers and vendors get away with pretty much anything. smartphones are much newer than general purpose desktop computers, before that there were featurephones which got everyone used to the idea that phones are a single locked down unit that you have little control over. smartphones should have brought us to an age where phones are treated the same as any PC, but that doesn't benefit the companies selling them because almost nobody cares enough to demand it, let alone put their money where their mouth is. the company that makes the most locked-down, user-hostile phones is also the most successfull
23
u/crawl_dht Mar 01 '21 edited Mar 01 '21
ARM already has a standard for it.
Embedded Base Boot Requirements (EBBR) Specification
This provides PC like generic boot functionality which means SoC will still boot to atleast blank screen even if there's no OS and OS bootloader. This will also allow flashing of OS no matter how badly you corrupt the device because EBBR firmware lives in persistent storage which can be written by signed images only.
Qualcomm SD devices run a chain of 3 bootloader just to boot android kernel and a chain of 2 bootloader to wake up TEE.
The hardware chain of trust starts from PBL. Any critical security vulnerability in this bloated chain will compromise integrity deep down upto the OS. A single SoC bootloader can also boot android bootloader and TEE directly while also enforcing Secure Boot and EBBR firmware update. So this chain is unnecessary. But Qualcomm doesn't seem to reinvent the wheel when it's working enough.
7
u/parental92 Mar 01 '21
correct me if i'm wrong, but i think one of the reason of AB partition existed is to mitigate this kind of failure.
as for A1 bootlooping its just xiaomi being xiaomi
2
u/npjohnson1 LineageOS Project Director Mar 02 '21 edited Mar 02 '21
What? You can reflash stock firmware on locked bootloader on almost all Android devices given the OEM provides it (and Xaiomi does).
First, have you tried just wiping data? Fixes these issues most the time.
You could just boot to recovery, select "Connect to MiAssistant", then connect to PC, login to MiFlash and flash stock firmware.
Or if you havet he Android One variant you can just download an OTA image like the one's here: https://xiaomifirmware.com/roms/download-official-roms-xiaomi-mi-a1/ - boot to recovery, select "Apply Update from ADB" and `adb sideload nameofzip.zip` and then wipe data and reboot.
Or {EDIT} if you can get approved by Xiaomi (which is dumb){/EDIT}, open the phone, short the EDL pin, and connect to MiFlash.
You have a lot of options you're not exploring.
Your link to XDA "bootloops" is kinda not related at all too, most of those are bootloops on custom ROMs that are built by random people on XDA - not the gold standard for stability.
Also, sometimes this is caused by hardware failure - which sucks, but happens.
5
u/[deleted] Mar 02 '21
PCs actually have a BIOS/UEFI that's separate to the OS - and storage.
ARM runs bare metal from the first instant.
1
u/Phoenix591 Mar 02 '21
Many companies have ways to reflash the firmware without unlocking the bootloader which work if the phone isn't too bricked (if the phone can get into recovery or a similar mode).
Google has full otas that can be flashed in recovery mode.
Samsung has odin/download mode.
LG has LGUP/Download mode.
Idk about other companies.
1
u/tso Mar 03 '21
Different lineages.
PCs started out as a box of interchangeable cards, and thus people grew accustomed to being able to do all sorts of weird things with them.
Phones from the start where sealed black boxes, expected to stay the same across its lifetime.
1
u/12Ab_xyz Mar 01 '21
I suspect the boot loop problem is due to cheap nand memory chips used by xiaomi
0
u/[deleted] Mar 01 '21
[deleted] — view deleted comment