This is my way of extracting hidden fastboot oem
commands using ghidra
- May or may not work for various SoCs, i have tested this on Xiaomi Redmi Note 12 4G (Qualcomm sdm685)
- Download a firmware archive containing a ABL image.
- Extract the archive, change directory to where the image is located, and run:
# If not installed already
pip install uefi_firmware
# Check the output for "PE32 image selection", try a different image if it's not there
uefi-firmware-parser -b abl.img
uefi-firmware-parser --superbrute -e abl.img
-
If the
superbrute
command was succesful, you will be met with a list of files. Search for a file with the.pe
extension, and import it to Ghidra. -
Analyze it with the default selection, and then in the ghidra menu, select this in such order:
Search > For Strings > Confirm > and Filter "oem"
-
Extarct the
oem <option>
strings that look interesting, and then boom, you're done.