Bootloader unlock
The stock Android 10 boot loader on the XP8800 has no fastboot flashing commands. It also does
not keep its lock state in the devinfo partition (devinfo is 4 KiB of zeros on stock). The
unlock method uses two items together: a userdebug boot loader and a flag byte in the frp
partition.
WARNING: Make a verified full backup before you unlock the boot loader. The unlock wipes
userdataand permanently changes the trust model of the device. If you write the incorrect partitions, the phone can hard-brick. Do this only on a device that you own. The behavior can change between builds. See NV partitions and backup.
Why the obvious path is blocked
| Blocker | Why it does not stop this method |
|---|---|
Developer Options “OEM unlocking” is grey (sys.oem_unlock_allowed=0) |
You do the unlock from EDL and fastboot, not from Android |
Stock Android 10 ABL has no fastboot flashing commands |
The AT&T 8.1 userdebug ABL has them and also boots stock Android 10 |
| Carrier SIM lock or activation lock | This lock is in the encrypted modem NV. The bootloader lock is a different lock |
| Profile-owner or supervised account restrictions | These restrictions do not apply to the EDL and fastboot path |
The two ingredients
- An ABL that can unlock. The AT&T Android 8.1 userdebug
abl.elf(110,592 bytes) hasfastboot flashing get_unlock_abilityandunlock. It boots the stock Android 10 system. It has the same root certificate andHW_ID(3007…) as stock. ItsSW_IDimage type is0x1Cand its anti-rollback version is0. Secure boot is expected to accept it. - The
frpunlock flag.fastboot flashing get_unlock_abilityreads the last byte of thefrppartition (offset 524287). When you set this byte to0x01, the check passes.
The mechanism
flowchart TB
EDL["EDL session"] --> W1["Write userdebug ABL into abl_a"]
EDL --> W2["Set frp byte 524287 = 0x01"]
W2 --> CK{"Magic 0x19901873<br/>at frp bytes 32..36?"}
CK -->|yes| SUM["Recompute frp[0:32] = sha256(0x00*32 ++ frp[32:])"]
CK -->|no| READY
SUM --> READY["Reboot"]
W1 --> READY
READY --> FASTBOOT["fastboot flashing get_unlock_ability → 1"]
FASTBOOT --> UNLOCK["fastboot flashing unlock"]
UNLOCK --> WIPE["ABL writes recovery --wipe_data to misc,<br/>wipes userdata, sets unlocked state"]
WARNING: Make sure that you have a verified full backup before you do these steps. Steps 1, 3, and 5 write partitions. Incorrect writes can hard-brick the phone. Step 8 wipes all user data.
-
In one EDL session, write the userdebug ABL into
abl_a. Zero-pad the ABL to 1 MiB first.WARNING: Write only to
abl_a. A write to a different partition can hard-brick the phone. -
Read
abl_aback to verify the write. -
Set
frp[524287] = 0x01.WARNING: Write only to
frp. Do not write tomodemst1,modemst2,fsg,fsc, orpersist. These partitions hold per-unit data that you cannot recover. -
If the big-endian magic
0x19901873is at bytes32..36offrp, recompute thefrpSHA-256 checksum over0x00 × 32 || frp[32:]. -
Write the checksum to
frp[0:32]. -
Reboot the phone.
-
Make sure that
fastboot flashing get_unlock_abilitygives1. -
Use
fastboot flashing unlock.WARNING: Do not use this command if you did not make a backup. The command wipes
userdata.The ABL writes
recovery --wipe_data --reason=MasterClearConfirm --locale=en_UStomisc. Then it does theuserdatawipe. -
Let the one-time stock recovery format finish.
-
Boot the phone cleanly one time. Then the active slot stays marked
successful.
The procedure writes only abl_a and frp. abl_b stays unchanged as a stock fallback for the
boot loader.
What the decompiled ABL shows
Static analysis of the userdebug ABL (an AArch64 UEFI LinuxLoader) confirms the mechanism:
| Function | Role |
|---|---|
| Unlock setter | Writes the persistent unlock flag (param 0 = normal, 1 = critical). Emits the recovery --wipe_data command |
| Unlock gate | Allows a state change only if param_2 == 0 (lock) or IsAllowUnlock != 0 |
| Fastboot init | Finds the partition named frp, reads it, and sets IsAllowUnlock = frp[partitionsize-1] & 1 |
| State getters | unlocked, unlock_critical, and verity mode. oem device-info prints all of them |
| Boot verify | “Device is unlocked, Skipping boot verification”. Sets the verified-boot state |
Strings in the payload include “By unlocking the bootloader…”, “Creating unlock keys detect event”, “Device unlocked”, and “flashing get_unlock_ability”.
Risks and gotchas
- Anti-rollback fuse. The userdebug ABL has rollback version 0. A subsequent OTA can make the vendor
ARB fuse higher. Then secure boot rejects
abl_aand the phone shows a black screen. XBL does not useabl_bas a fallback. To recover, write stockabl_aback over EDL. You can get to EDL with the keys from any software state, unless the early boot firmware or the hardware is damaged. userdatawipe. The unlock always wipes the user data.- Slot
_bis a trap for custom images. The stockabl_bhas noflashorset_active. - Hard-brick profile. Do not write
keymaster*,xbl*,tz*,rpm*,hyp*,pmic*,keystore,devcfg*,cmnlib*, ordevinfo. - Carrier lock stays. The unlock of the boot loader does not remove a carrier SIM lock. The carrier SIM lock is in the encrypted modem NV.
Re-locking
WARNING: Do not re-lock the boot loader without a reviewed procedure for your device. An incompatible re-lock can prevent the phone from booting.
A re-lock is a high-risk task. Treat the re-lock as a different restoration procedure for one device only. The procedure has these steps:
- Make sure that the userdebug ABL stays in
abl_a. - Use
fastboot flashing lock. - Over EDL, write stock
abl_aandabl_b, afrpof zeros, and amiscrecovery-wipe request.