Open sourcing bootloader unpacker and imgdata tools for Nexus 4, 5 and 7

NVISO is proud to open source in collaboration with Christophe Beauval a tool suite to unpack the Nexus 4, 5 and 7 factory bootloader.img as well as code to work with Nexus 5’s imgdata.img and scripts to dump what’s in the flash of the Nexus 5 and write back to it. We are not aware of any more feature rich open source project that is able to dump information from the Nexus 5 and upload modified partitions to the Nexus 5.

The source code can be found on our GitHub page:
https://github.com/NVISO-BE/nexus_5_bootloader_unpacker

Unpacking the Nexus 4, 5 and 7 bootloader.img found in Google’s factory images and making changes to it is not an easy task. Freely available code to unpack, modify and upload the parts of the bootloader.img is already non existent, much less that code can be found to handle the imgdata partition. This open source package gives you all the building blocks to do all of this together with sample scripts on how to do it.

As can be seen in the illustration, the solution works on the bootloader.img from a Google Factory Image for the Nexus 4, 5 and 7. The bootloader is unpacked into images of partitions also present on those Nexus models and modifications can be made to it through external tools. Those images can then be uploaded to the real phone. In addition, the solution can also handle the imgdata.img and imgdata partition present in the Nexus 5 and can cope with any usage including listing info, unpack, pack, update and repack the partition.

We would like to hear about any feedback you might have on this project, you can reach us at research@nviso.be. Collaborations and pull requests on GitHub are welcome!

We are excited to open source our first project and are planning on open sourcing more of our research in the future!

 

Leave a Reply