android-things-decompile

How to unpack iot_rpi3.img

  1. use parted to get partition offset.
auxor@test3:~/Downloads$ parted iot_rpi3.img
WARNING: You are not superuser.  Watch out for permissions.
GNU Parted 2.3
Using /home/auxor/Downloads/iot_rpi3.img
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) u                                                                
Unit?  [compact]? B                                                       
(parted) print                                                            
Model:  (file)
Disk /home/auxor/Downloads/iot_rpi3.img: 4563402752B
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start        End          Size         File system  Name                Flags
 1      20480B       67129343B    67108864B    fat16        rpiboot
 2      67129344B    68177919B    1048576B                  uboot_a
 3      68177920B    69226495B    1048576B                  uboot_b
 4      69226496B    102780927B   33554432B                 boot_a
 5      102780928B   136335359B   33554432B                 boot_b
 6      136335360B   673206271B   536870912B   ext4         system_a
 7      673206272B   1210077183B  536870912B                system_b
 8      1210077184B  1210142719B  65536B                    vbmeta_a
 9      1210142720B  1210208255B  65536B                    vbmeta_b
10      1210208256B  1211256831B  1048576B                  misc
11      1211256832B  1278365695B  67108864B    ext4         vendor_a
12      1278365696B  1345474559B  67108864B                 vendor_b
13      1345474560B  1588744191B  243269632B   ext4         oem_a
14      1588744192B  1832013823B  243269632B                oem_b
15      1832013824B  1836208127B  4194304B                  oem_bootloader_a
16      1836208128B  1840402431B  4194304B                  oem_bootloader_b
17      1840402432B  1873956863B  33554432B                 factory
18      1873956864B  1890734079B  16777216B                 factory_bootloader
19      1890734080B  4563378175B  2672644096B               userdata
20      4563378176B  4563382271B  4096B                     gapps
  1. mount system_a
sudo mount -o loop,offset=136335360 iot_rpi3.img /tmp/iot