New updates are being added at the bottom of this story…….

Bootloop, brick, thermonuclear war!

Fear not, as the last one is taken from the (in)famous LineageOS (formerly CyanogenMod) disclaimer:

#include <std_disclaimer.h>

/*
* Your warranty is now void.
*
* We are not responsible for bricked devices, dead SD cards,
* thermonuclear war, or you getting fired because the alarm app failed. Please
* do some research if you have any concerns about features included in this ROM
* before flashing it! YOU are choosing to make these modifications, and if
* you point the finger at us for messing up your device, we will laugh at you.
*
*/

Kidding apart, facing bootloop or being ended up with a bricked phone after applying a wrong mod indeed feels like a thermonuclear war victim. You are probably unable to access the factory reset option, though typical factory reset might be ineffective in this scenario.

google_nexus_5x_bootloop_fastboot
Bootlooping Nexus 5X due to faulty thermal design (Image source: reddit)

It is possible to restore the phones by flashing the factory firmware using a special protocol called fastboot. However, there are some important factors.

The name ‘fastboot’ is pretty much ambiguous, as it actually defines three separate things:

  • a component in the bootloader of the phone which can communicate with a host (such as a PC)
  • an executable inside the host capable to talk with the phone
  • a special boot mode in the phone (or any device running Android) to initiate the communication

The above architecture was originally designed by Google and supported by their hardware partners. The lack of standardization is still at large, as different OEMs came up with similar in-house implementations.

Samsung’s proprietary Download (ODIN/LOKI) mode or LG’s LAF (Download) mode are some of the prime examples of fastboot-esque interface for firmware flashing.

samsung_download_mode_odin
Samsung Download mode (Image source: XDA forums)

Nevertheless, mainstream phone makers like Google, Essential, Motorola, Xiaomi and OnePlus support the fastboot protocol. Except OnePlus, remaining OEMs also provide factory ROM packages for flashing via fastboot.

google_pixel_3a_xl_signed_zip_download
Google factory images download page

Don’t get me wrong: OnePlus is one of those few Android OEMs providing regular software updates as well as ROM downloads via official channel. But the firmware packages can only be flashed using the built-in ‘Local upgrade’ option of OxygenOS.

OnePlus even removed the option to sideload/flash them from recovery environment, thus affected users can not use them if their OS is not booting properly.

oneplus_6t_tmobile_recovery
No option to flash update zip in OnePlus stock recovery

Thanks to the open source nature of Android, the active modding community quickly found a way to decompress the OxygenOS update zip and extract individual partition images out of it.

Reader, who are interested to know the technical insight, head over to this repo. You can now extract the payload.bin from any update zip package for a recent phone running A/B partitioning scheme (also known as seamless update).

$ python extract_android_ota_payload.py OnePlus7ProOxygen_21.O.07_GLO_007_1905120542/OnePlus7ProOxygen_21.O.07_OTA_007_all_1905120542_aa37bad.zip /tmp/

Extracting ‘boot.img’
Extracting ‘system.img’
Extracting ‘vendor.img’

Extracting ‘modem.img’

Developer mauronofrio has stepped in and started a repo of unpacked OxygenOS 9.5 series firmware so that users can readily download the appropriate image and flash using fastboot interface.

PiunikaWeb readers should recognize the name, as we have worked together to bring TWRP for the OnePlus 7 Pro.

To use these packages, you have to unlock the bootloader of your phone. You can find the details in this article.

oneplus_7_pro_bootloader_download_mode
OnePlus 7 Pro with unlocked bootloader in download/fastboot mode

To access the download/fastboot mode, you should press Volume Up, Volume Down and Power buttons of your OnePlus 7 Pro altogether. Afterwards, connect the phone with a PC/Mac and flash the individual partitions:

fastboot flash aop_a aop.img
fastboot flash aop_b aop.img
fastboot flash bluetooth_a bluetooth.img
fastboot flash bluetooth_b bluetooth.img
fastboot flash boot_a boot.img
fastboot flash boot_b boot.img
fastboot flash dsp_a dsp.img
fastboot flash dsp_b dsp.img
fastboot flash dtbo_a dtbo.img
fastboot flash dtbo_b dtbo.img
fastboot flash modem_a modem.img
fastboot flash modem_b modem.img
fastboot flash oem_stanvbk oem_stanvbk.img
fastboot flash qupfw_a qupfw.img
fastboot flash qupfw_b qupfw.img
fastboot flash storsec_a storsec.img
fastboot flash storsec_b storsec.img
fastboot flash system_a system.img
fastboot flash system_b system.img
fastboot flash vbmeta_a vbmeta.img
fastboot flash vbmeta_b vbmeta.img
fastboot flash vendor_a vendor.img
fastboot flash vendor_b vendor.img
fastboot flash LOGO_a LOGO.img
fastboot flash LOGO_b LOGO.img

mauronofrio has also added easy-to-use flashing scripts which can be beneficial under certain circumstances.

  • flash-all-partitions-fastboot.bat : this .bat will flash all possible partitions through fastboot (Except persist) , there are some criticals partitions that can’t be flashed through fastboot;
  • flash-only-persist.bat : this .bat will flash only persist partition in fastboot mode (This is good for people that have problems with sensor);
  • flash-all-partitions-recovery-criticals.bat : this .bat will boot the twrp and will flash criticals partitions, use this carefully;
  • flash-system-boot-vendor.bat : this .bat is the same of older flash-all.bat and so it will flash only vendor, system and boot;
  • flash-all-partitions.bat : this .bat will run flash-all-partitions-fastboot.bat , then flash-only-persist.bat and then flash-all-partitions-recovery-criticals.bat .

AndroidFileHost link for pre-created packages: https://androidfilehost.com/?w=files&flid=294300

Remember, the packages are useless if the bootloader is locked and the phone is bricked. We are going to publish another article soon to cover those scenarios – no more fear of bricking. ?

Update (May 29)

The low level (EDL) flashing tools for OnePlus 7 Pro has been publicly available now. This article explains how to unbrick the phone using MSMDownloadTool.

PiunikaWeb is a unique initiative that mainly focuses on investigative journalism. This means we do a lot of hard work to come up with news stories that are either ‘exclusive,’ ‘breaking,’ or ‘curated’ in nature. Perhaps that’s the reason our work has been picked by the likes of Forbes, Foxnews, Gizmodo, TechCrunch, Engadget, The Verge, Macrumors, and more. Do take a tour of our website to get a feel of our work. And if you like what we do, stay connected with us on Twitter (@PiunikaWeb) and other social media channels to receive timely updates on stories we publish.

Kingshuk De
896 Posts

I came from a mixed background of Statistics and Computer Science. My research domains included embedded computer systems, mobile computing and delay tolerant networks in post-disaster scenarios. Apart from tinkering with gadgets or building hackintosh, I like to hop on various subreddits and forums like MyDigitalLife and XDA.

Next article View Article

[April 10: Official acknowledgement for recommended videos bug] YouTube Library tab broken and sidebar missing, users say

This story is being continuously updated…. New updates are being added at the bottom….. Original story (from 2019) follows: Incoming are reports related to two separate YouTube-related issues. The...
Apr 10, 2020 0 Min Read