apktools 0.7.0 → 0.7.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: '083dd99c7ce0853801d49f4eba60a55286494c024170c0a6653b15a3876efb74'
4
+ data.tar.gz: 21d19d9d422bbb521da8921e1467a7c1bf3317056a36ccd3718eff11ceb1a9bd
5
+ SHA512:
6
+ metadata.gz: 49b4283ad15199ea96d70b4c2eac209fd68ad88fb288e990e9ab3b86bbb68205e6de52ecefb14205638d775db0391e28ea792d667783e82ccafceb1b3f07a11d
7
+ data.tar.gz: cfdc0d50dcaf6e3510a60dbc359a6eb4d864d87b925607fd8542927dc043961329897b41299ae53766ac9d2c0a5966785cb67e79fda210af753784b0c8c0c341
@@ -131,13 +131,14 @@ class ApkResources
131
131
  # Create a new ApkResources instance from the specified +apk_file+
132
132
  #
133
133
  # This opens and parses the contents of the APK's resources.arsc file.
134
-
135
134
  def initialize(apk_file)
136
135
  data = nil
136
+ Zip.warn_invalid_date = false
137
+
137
138
  # Get resources.arsc from the APK file
138
139
  Zip::File.foreach(apk_file) do |f|
139
140
  if f.name.match(/resources.arsc/)
140
- data = f.get_input_stream.read
141
+ data = f.get_input_stream.read.force_encoding('BINARY')
141
142
  end
142
143
  end
143
144
 
@@ -114,6 +114,7 @@ class ApkXml
114
114
  # This opens and parses the contents of the APK's resources.arsc file.
115
115
  def initialize(apk_file)
116
116
  @current_apk = apk_file
117
+ Zip.warn_invalid_date = false
117
118
  @apk_resources = ApkResources.new(apk_file)
118
119
  end #initialize
119
120
 
@@ -129,17 +130,18 @@ class ApkXml
129
130
  def parse_xml(xml_file, pretty = false, resolve_resources = false)
130
131
  # Reset variables
131
132
  @xml_elements = Array.new()
132
- xml_output = ""
133
+ xml_output = ''
133
134
  indent = 0
134
135
  data = nil
135
136
 
136
- # Get the XML from the APK file
137
+ Zip.warn_invalid_date = false
137
138
  Zip::File.foreach(@current_apk) do |f|
138
139
  if f.name.match(xml_file)
139
- data = f.get_input_stream.read
140
+ data = f.get_input_stream.read.force_encoding('BINARY')
140
141
  end
141
142
  end
142
143
 
144
+
143
145
  # Parse the Header Chunk
144
146
  header = ChunkHeader.new( read_short(data, HEADER_START),
145
147
  read_short(data, HEADER_START+2),
metadata CHANGED
@@ -1,32 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: apktools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
5
- prerelease:
4
+ version: 0.7.4
6
5
  platform: ruby
7
6
  authors:
8
7
  - Dave Smith
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2016-02-17 00:00:00.000000000 Z
11
+ date: 2020-07-13 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: rubyzip
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ~>
17
+ - - "~>"
20
18
  - !ruby/object:Gem::Version
21
- version: '1.1'
19
+ version: '2.0'
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ~>
24
+ - - "~>"
28
25
  - !ruby/object:Gem::Version
29
- version: '1.1'
26
+ version: '2.0'
30
27
  description: Library to assist reading resource data out of Android APKs
31
28
  email: smith@wiresareobsolete.com
32
29
  executables:
@@ -35,34 +32,32 @@ executables:
35
32
  extensions: []
36
33
  extra_rdoc_files: []
37
34
  files:
35
+ - bin/get_app_version.rb
36
+ - bin/read_manifest.rb
38
37
  - lib/apktools/apkresources.rb
39
38
  - lib/apktools/apkxml.rb
40
39
  - lib/apktools/resconfiguration.rb
41
- - bin/get_app_version.rb
42
- - bin/read_manifest.rb
43
40
  homepage: http://github.com/devunwired/apktools
44
41
  licenses:
45
42
  - MIT
43
+ metadata: {}
46
44
  post_install_message:
47
45
  rdoc_options: []
48
46
  require_paths:
49
47
  - lib
50
48
  required_ruby_version: !ruby/object:Gem::Requirement
51
- none: false
52
49
  requirements:
53
- - - ! '>='
50
+ - - ">="
54
51
  - !ruby/object:Gem::Version
55
52
  version: '0'
56
53
  required_rubygems_version: !ruby/object:Gem::Requirement
57
- none: false
58
54
  requirements:
59
- - - ! '>='
55
+ - - ">="
60
56
  - !ruby/object:Gem::Version
61
57
  version: '0'
62
58
  requirements: []
63
- rubyforge_project:
64
- rubygems_version: 1.8.23.2
59
+ rubygems_version: 3.0.3
65
60
  signing_key:
66
- specification_version: 3
61
+ specification_version: 4
67
62
  summary: APKTools
68
63
  test_files: []