Difference between revisions of "IMG4 File Format"

From The iPhone Wiki
Jump to: navigation, search
(Adding Apple Watch.)
m
Line 2: Line 2:
   
 
==Header==
 
==Header==
  +
30 - type tag indicating SEQUENCE
 
  +
8 - ?
<pre>
 
  +
3 - 2,3,4 length in octets of value that follows (length of next value; size of file)
30 - type tag indicating SEQUENCE
 
  +
x octets - size of file from here
8 - ?
 
  +
16 - indicating an [http://en.wikipedia.org/wiki/IA5String IA5String] to follow
3 - 2,3,4 length in octets of value that follows (length of next value; size of file)
 
  +
04 - length in octets of IA5String that follows
x octets - size of file from here
 
  +
49 4D 47 34 - IA5String, the magic "IMG4"
16 - indicating an [http://en.wikipedia.org/wiki/IA5String IA5String] to follow
 
  +
... - sequential data
04 - length in octets of IA5String that follows
 
49 4D 47 34 - IA5String, the magic "IMG4"
 
... - sequential data
 
</pre>
 
   
   

Revision as of 00:47, 10 October 2015

There is an img4 file (sep-firmware.img4) found in /usr/standalone/firmware on iOS 7.0.1 for the iPhone 5s. The IPSWFILE/Firmware/all_flash/all_flash.DEVICEIDENTIFIER.production for any A7 (64 bit) device and newer as well as Apple Watch, contains an IM4P version of the same file. The file is an DER encoded ASN.1 object and structured as follows:

Header

30 - type tag indicating SEQUENCE
8  - ?
3  - 2,3,4 length in octets of value that follows (length of next value; size of file)
x octets - size of file from here
16 - indicating an IA5String to follow
04 - length in octets of IA5String that follows
49 4D 47 34 - IA5String, the magic "IMG4"
... - sequential data


Tango Media-cdrom.png This software article is a "stub", an incomplete page. Please add more content to this article and remove this tag.