Class: IPSW

Inherits:
Object
  • Object
show all
Defined in:
lib/apple_data/ipsw.rb

Overview

Represents an IPSW on disk and provides helper access

Instance Method Summary collapse

Constructor Details

#initialize(path) ⇒ IPSW

Returns a new instance of IPSW.



8
9
10
11
12
# File 'lib/apple_data/ipsw.rb', line 8

def initialize(path)
  @path = path
  @zip = Zip::File.open(@path)
  @manifest = CFPropertyList.guess(@zip.get_entry('BuildManifest.plist').get_input_stream.read)
end

Instance Method Details

#baseband_filesObject



14
15
16
17
18
19
20
21
22
# File 'lib/apple_data/ipsw.rb', line 14

def baseband_files
  result = []
  @manifest['BuildIdentities'].each do |identity|
    identity['Manifest'].each do |key, value|
      result << value if key == 'BasebandFirmware'
    end
  end
  result
end

#img4_filesObject



24
# File 'lib/apple_data/ipsw.rb', line 24

def img4_files; end