0

Android images (e.g. those for nexus) ship with a radio-(version).img file. I wanted to unpack this file to look at its contents.

I tried using simg2img, as is done with system.img, but that approach didn't work for this file. I know that for boot.img, separate tools are available. I wanted to ask if anyone has tried unpacking this img file ?

2

radio.img is the radio firmware. It's a binary, not any kind of archive; you can't unpack it.

You could, of course, attempt to de-compile it — but manufacturers generally don't release the source code so you are not likely to get very far with that without extreme effort.

| improve this answer | |
0

I know that this is an extremely old question, but if I came across this thread then there's bound to be others to come across this as well. I actually have a pretty consistent and universal way of extracting the data from radio images.

You'll need to know your device's partition layout, and of course, you'll need to be rooted to do any of this.

  1. The easiest way to do this I've found is to just adb shell and then su to get a root shell. Then you'll need to traverse the /dev directory, since each device is different you'll need to navigate your way through to find how to implement this next command.
  2. For my Nexus 6P the directory is /dev/block/platform/soc.0/f9824900.sdhci/by-name, though your device will be different from .../platform/... to .../by-name, so just navigate to .../by-name and issue a ls -la command to display your specific partition layout. Take note of the mmcblk# block device number for "modem". (Ex. - the 6P has modem -> /dev/block/mmcblk0p1)
  3. Reboot to bootloader (which will need to have been unlocked, though if you're reading this I'll assume you know how to), fastboot flash radio [radio_you_want_extracted].img, and boot back into Android.
  4. Give yourself another root shell and then cp [your_modem_mmcblk#] /sdcard/Download, then open another cmd or terminal and adb pull /sdcard/Download/[your_modem_mmcblk#] . to pull the block device to your computer.
  5. Now its as simple as extracting the contents with 7zip (surprisngly it opens the block file without issue!)

Cheers

| improve this answer | |
  • That won't do anything useful. – iBug Jan 23 '18 at 11:38
  • Right, I just made all of this up because I like wasting everybody's time. This is the exact method I used myself to decompile the engineering radio found online for my Nexus 6p. Works great, and doing the same for the stock radio.img produced an entirely different directory structure with entirely different files. Keep your incorrect assumptions to yourself. – therealjayvi Jan 29 '18 at 5:10
  • is "fastboot flash radio [radio_you_want_extracted].img" correct for extracting contents of radio partition to an img file? looks more like the way to flash an img file onto a partition. – philcolbourn Aug 27 '18 at 6:13
  • It is for flashing a radio onto a device. Since the radio images are basically proprietary binaries that you cannot extract or decompress, by flashing a radio onto the device, then pulling the block device pertaining to that partition, you can then mount that block device as if it were an .img or .iso file directly within Windows or elsewhere. Try it using different radios on a device that you have rooted, and you'll find that the files contained within are drastically different between two radio images. – therealjayvi Sep 3 '18 at 7:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.