app-info 2.8.2 → 2.8.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a3da34af686efd6aacd4b80fbb8b49a9c1dd38f101075a4950214ef3bc83314b
4
- data.tar.gz: 0c0359085eca517924e26b89e649ce6ae42683532676dc0f14613daccab3686b
3
+ metadata.gz: eaf82a6d1506255b1273449d8780190beb43d82000a8307a8bdb2f7d26db9b5f
4
+ data.tar.gz: bd2a591c4586eec718b991a7a8ee9c51b42311da1c5b7d6c8c9ff47df017d6e8
5
5
  SHA512:
6
- metadata.gz: d9fa46b089aae06843662fd5f5780012f34b0913a231183e18a7a8bdec227012069c1e0d11ae613460f7b5b73cd76c7039e46e85215b6d103360be9d05391bd6
7
- data.tar.gz: a2f9e51a8180b6baac585fd5f5e02528ddd46063477e1fcb3738967e0738b56aab902096694483c834473f17cf3e229d4241a62351297c76243383979b61da4b
6
+ metadata.gz: f386060b89ea25bea1b1e41d2d8e355143f109304206e57a130d4ea93769085787c712a6f0ae8dddbc8b06cb82c63802af707b6cd04f0342b98effe557e31e22
7
+ data.tar.gz: 9181a83795f635f2c88f52889a9b7399cbfa62979ae7f2dabff23d2fb877287de24952d0c2fe53e41651e9c4f0ff01a5b1f7a5f6e0324b2e57684814e438d057
@@ -12,11 +12,11 @@ jobs:
12
12
  strategy:
13
13
  fail-fast: false
14
14
  matrix:
15
- ruby: [ ruby-2.5, ruby-2.6, ruby-2.7, ruby-3.0 ]
15
+ ruby: [ ruby-2.5, ruby-2.6, ruby-2.7, ruby-3.0, ruby-3.1, ruby-3.2 ]
16
16
  os: [ ubuntu-latest ]
17
17
 
18
18
  steps:
19
- - uses: actions/checkout@v2
19
+ - uses: actions/checkout@v3
20
20
 
21
21
  - uses: ruby/setup-ruby@v1
22
22
  with:
@@ -30,11 +30,11 @@ jobs:
30
30
  runs-on: ubuntu-latest
31
31
 
32
32
  steps:
33
- - uses: actions/checkout@v2
33
+ - uses: actions/checkout@v3
34
34
 
35
35
  - uses: ruby/setup-ruby@v1
36
36
  with:
37
- ruby-version: 2.7
37
+ ruby-version: 3.0
38
38
  bundler-cache: true
39
39
 
40
40
  - name: bundle exec rubocop
@@ -0,0 +1,15 @@
1
+ name: Create Release
2
+ on:
3
+ push:
4
+ tags:
5
+ - "v*"
6
+
7
+ jobs:
8
+ create:
9
+ runs-on: ubuntu-latest
10
+ steps:
11
+ - name: Create Release
12
+ uses: softprops/action-gh-release@v1
13
+ if: startsWith(github.ref, 'refs/tags/')
14
+ with:
15
+ files: CHANGELOG.md
data/CHANGELOG.md CHANGED
@@ -9,6 +9,20 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
9
9
 
10
10
  > List all changes before release a new version.
11
11
 
12
+ ## [2.8.4] (2023-03-09)
13
+
14
+ ### Fixed
15
+
16
+ - Sync the latest appt2 proto files to parse Android SDK 31+ for aab parser. [#51](https://github.com/icyleaf/app_info/issues/51) (thanks @[UpBra](https://github.com/UpBra))
17
+ - Force android device return as boolean for aab parser.
18
+ - Handle string resources referencing other resources for apk parser.
19
+
20
+ ## [2.8.3] (2022-06-27)
21
+
22
+ ### Fixed
23
+
24
+ - Fix properties in `AndroidManifest.xml` of aab file with null state prediction.
25
+
12
26
  ## [2.8.2] (2022-02-13)
13
27
 
14
28
  ### Fixed
@@ -228,7 +242,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
228
242
 
229
243
  - Updated dependency of CFPropertly list be a range between 2.3.4. (thanks @[cschroed](https://github.com/cschroed))
230
244
 
231
- [Unreleased]: https://github.com/icyleaf/app-info/compare/v2.8.2..HEAD
245
+ [Unreleased]: https://github.com/icyleaf/app-info/compare/v2.8.4..HEAD
246
+ [2.8.4]: https://github.com/icyleaf/app-info/compare/v2.8.3...v2.8.4
247
+ [2.8.3]: https://github.com/icyleaf/app-info/compare/v2.8.2...v2.8.3
232
248
  [2.8.2]: https://github.com/icyleaf/app-info/compare/v2.8.1...v2.8.2
233
249
  [2.8.1]: https://github.com/icyleaf/app-info/compare/v2.8.0...v2.8.1
234
250
  [2.8.0]: https://github.com/icyleaf/app-info/compare/v2.7.0...v2.8.0
data/Gemfile CHANGED
@@ -5,8 +5,7 @@ source 'https://rubygems.org'
5
5
  # Specify your gem's dependencies in app-info.gemspec
6
6
  gemspec
7
7
 
8
- # group :development do
9
- # gem 'awesome_print'
10
- # gem 'debase'
11
- # gem 'ruby-debug-ide'
12
- # end
8
+ group :development do
9
+ gem 'awesome_print'
10
+ gem 'debug' # For ruby 3.0+
11
+ end
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # app_info
2
2
 
3
3
  [![Language](https://img.shields.io/badge/ruby-2.5+-701516.svg)](.github/workflows/ci.yml)
4
- [![Build Status](https://img.shields.io/github/workflow/status/icyleaf/app_info/CI)](https://github.com/icyleaf/app_info/actions/workflows/ci.yml)
4
+ [![Build Status](https://img.shields.io/github/actions/workflow/status/icyleaf/app_info/ci.yml)](https://github.com/icyleaf/app_info/actions/workflows/ci.yml)
5
5
  [![Gem version](https://img.shields.io/gem/v/app-info.svg?style=flat)](https://rubygems.org/gems/app_info)
6
6
  [![License](https://img.shields.io/badge/license-MIT-red.svg?style=flat)](LICENSE)
7
7
 
@@ -12,12 +12,14 @@ Teardown tool for mobile app (ipa, apk and aab file), macOS app and dSYM.zip fil
12
12
  - Android file
13
13
  - `.apk`
14
14
  - `.aab` (Androld App Bundle)
15
- - iOS ipa file
15
+ - iOS file
16
+ - `.ipa`
16
17
  - `Info.plist` file
17
18
  - `.mobileprovision`/`.provisionprofile` file
18
19
  - Zipped macOS App file
20
+ - `.app.zip`
19
21
  - Zipped dSYMs file
20
-
22
+ - `.dSYM.zip`
21
23
  ## Installation
22
24
 
23
25
  Add this line to your application's Gemfile:
data/app_info.gemspec CHANGED
@@ -21,13 +21,13 @@ Gem::Specification.new do |spec|
21
21
  spec.required_ruby_version = '>= 2.5'
22
22
 
23
23
  spec.add_dependency 'CFPropertyList', '< 3.1.0', '>= 2.3.4'
24
- spec.add_dependency 'image_size', '>= 1.5', '< 3.1'
24
+ spec.add_dependency 'image_size', '>= 1.5', '< 3.3'
25
25
  spec.add_dependency 'ruby-macho', '>= 1.4', '< 4'
26
- spec.add_dependency 'android_parser', '~> 2.5.0'
26
+ spec.add_dependency 'android_parser', '~> 2.5.1'
27
27
  spec.add_dependency 'rubyzip', '>= 1.2', '< 3.0'
28
28
  spec.add_dependency 'uuidtools', '>= 2.1.5', '< 2.3.0'
29
29
  spec.add_dependency 'icns', '~> 0.2.0'
30
- spec.add_dependency 'google-protobuf', '~> 3.19.4'
30
+ spec.add_dependency 'google-protobuf', '>= 3.19.4', '< 3.23.0'
31
31
 
32
32
  spec.add_development_dependency 'bundler', '>= 1.12'
33
33
  spec.add_development_dependency 'rake', '>= 10.0'
data/lib/app_info/aab.rb CHANGED
@@ -79,15 +79,15 @@ module AppInfo
79
79
  # end
80
80
 
81
81
  def wear?
82
- use_features.include?('android.hardware.type.watch')
82
+ !!use_features&.include?('android.hardware.type.watch')
83
83
  end
84
84
 
85
85
  def tv?
86
- use_features.include?('android.software.leanback')
86
+ !!use_features&.include?('android.software.leanback')
87
87
  end
88
88
 
89
89
  def automotive?
90
- use_features.include?('android.hardware.type.automotive')
90
+ !!use_features&.include?('android.hardware.type.automotive')
91
91
  end
92
92
 
93
93
  def min_sdk_version
@@ -100,10 +100,14 @@ module AppInfo
100
100
  end
101
101
 
102
102
  def use_features
103
+ return [] unless manifest.respond_to?(:uses_feature)
104
+
103
105
  @use_features ||= manifest&.uses_feature&.map(&:name)
104
106
  end
105
107
 
106
108
  def use_permissions
109
+ return [] unless manifest.respond_to?(:uses_permission)
110
+
107
111
  @use_permissions ||= manifest&.uses_permission&.map(&:name)
108
112
  end
109
113
 
@@ -85,9 +85,7 @@ module AppInfo
85
85
  def tempdir(file, prefix:)
86
86
  dest_path ||= File.join(File.dirname(file), prefix)
87
87
  dest_file = File.join(dest_path, File.basename(file))
88
-
89
- Dir.mkdir(dest_path, 0_700) unless Dir.exist?(dest_path)
90
-
88
+ FileUtils.mkdir_p(dest_path, mode: 0_700)
91
89
  dest_file
92
90
  end
93
91
  end
@@ -44,7 +44,7 @@ module AppInfo
44
44
  end
45
45
 
46
46
  def png?
47
- PNG_HEADER == header.bytes
47
+ header.bytes == PNG_HEADER
48
48
  end
49
49
 
50
50
  def [](offset, length)
@@ -153,7 +153,7 @@ module AppInfo
153
153
  def intent_filters(search: nil)
154
154
  activities.each_with_object([]) do |activity, obj|
155
155
  intent_filters = activity.intent_filter
156
- next if intent_filters&.empty?
156
+ next if intent_filters.nil? || intent_filters&.empty?
157
157
 
158
158
  if search.nil? || search.empty?
159
159
  obj << intent_filters
@@ -3,7 +3,7 @@
3
3
  ## Convert to ruby model
4
4
 
5
5
  ```bash
6
- cd app_info/lib/app_info/abb/proto
6
+ cd lib/app_info/protobuf/models
7
7
 
8
8
  protoc --ruby_out=. Resources.proto
9
9
  protoc --ruby_out=. Configuration.proto
@@ -132,6 +132,11 @@ message Visibility {
132
132
 
133
133
  // The comment associated with the <public> tag.
134
134
  string comment = 3;
135
+
136
+ // Indicates that the resource id may change across builds and that the public R.java identifier
137
+ // for this resource should not be final. This is set to `true` for resources in `staging-group`
138
+ // tags.
139
+ bool staged_api = 4;
135
140
  }
136
141
 
137
142
  // Whether a resource comes from a compile-time overlay and is explicitly allowed to not overlay an
@@ -185,6 +190,12 @@ message OverlayableItem {
185
190
  uint32 overlayable_idx = 4;
186
191
  }
187
192
 
193
+ // The staged resource ID definition of a finalized resource.
194
+ message StagedId {
195
+ Source source = 1;
196
+ uint32 staged_id = 2;
197
+ }
198
+
188
199
  // An entry ID in the range [0x0000, 0xffff].
189
200
  message EntryId {
190
201
  uint32 id = 1;
@@ -217,6 +228,9 @@ message Entry {
217
228
  // The set of values defined for this entry, each corresponding to a different
218
229
  // configuration/variant.
219
230
  repeated ConfigValue config_value = 6;
231
+
232
+ // The staged resource ID of this finalized resource.
233
+ StagedId staged_id = 7;
220
234
  }
221
235
 
222
236
  // A Configuration/Value pair.
@@ -268,6 +282,7 @@ message CompoundValue {
268
282
  Styleable styleable = 3;
269
283
  Array array = 4;
270
284
  Plural plural = 5;
285
+ MacroBody macro = 6;
271
286
  }
272
287
  }
273
288
 
@@ -299,6 +314,13 @@ message Reference {
299
314
 
300
315
  // Whether this reference is dynamic.
301
316
  Boolean is_dynamic = 5;
317
+
318
+ // The type flags used when compiling the reference. Used for substituting the contents of macros.
319
+ uint32 type_flags = 6;
320
+
321
+ // Whether raw string values would have been accepted in place of this reference definition. Used
322
+ // for substituting the contents of macros.
323
+ bool allow_raw = 7;
302
324
  }
303
325
 
304
326
  // A value that represents an ID. This is just a placeholder, as ID values are used to occupy a
@@ -586,3 +608,32 @@ message XmlAttribute {
586
608
  // The optional interpreted/compiled version of the `value` string.
587
609
  Item compiled_item = 6;
588
610
  }
611
+
612
+ message MacroBody {
613
+ string raw_string = 1;
614
+ StyleString style_string = 2;
615
+ repeated UntranslatableSection untranslatable_sections = 3;
616
+ repeated NamespaceAlias namespace_stack = 4;
617
+ SourcePosition source = 5;
618
+ }
619
+
620
+ message NamespaceAlias {
621
+ string prefix = 1;
622
+ string package_name = 2;
623
+ bool is_private = 3;
624
+ }
625
+
626
+ message StyleString {
627
+ message Span {
628
+ string name = 1;
629
+ uint32 start_index = 2;
630
+ uint32 end_index = 3;
631
+ }
632
+ string str = 1;
633
+ repeated Span spans = 2;
634
+ }
635
+
636
+ message UntranslatableSection {
637
+ uint64 start_index = 1;
638
+ uint64 end_index = 2;
639
+ }
@@ -47,6 +47,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
47
47
  optional :level, :enum, 1, "aapt.pb.Visibility.Level"
48
48
  optional :source, :message, 2, "aapt.pb.Source"
49
49
  optional :comment, :string, 3
50
+ optional :staged_api, :bool, 4
50
51
  end
51
52
  add_enum "aapt.pb.Visibility.Level" do
52
53
  value :UNKNOWN, 0
@@ -80,6 +81,10 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
80
81
  value :ACTOR, 8
81
82
  value :CONFIG_SIGNATURE, 9
82
83
  end
84
+ add_message "aapt.pb.StagedId" do
85
+ optional :source, :message, 1, "aapt.pb.Source"
86
+ optional :staged_id, :uint32, 2
87
+ end
83
88
  add_message "aapt.pb.EntryId" do
84
89
  optional :id, :uint32, 1
85
90
  end
@@ -90,6 +95,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
90
95
  optional :allow_new, :message, 4, "aapt.pb.AllowNew"
91
96
  optional :overlayable_item, :message, 5, "aapt.pb.OverlayableItem"
92
97
  repeated :config_value, :message, 6, "aapt.pb.ConfigValue"
98
+ optional :staged_id, :message, 7, "aapt.pb.StagedId"
93
99
  end
94
100
  add_message "aapt.pb.ConfigValue" do
95
101
  optional :config, :message, 1, "aapt.pb.Configuration"
@@ -122,6 +128,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
122
128
  optional :styleable, :message, 3, "aapt.pb.Styleable"
123
129
  optional :array, :message, 4, "aapt.pb.Array"
124
130
  optional :plural, :message, 5, "aapt.pb.Plural"
131
+ optional :macro, :message, 6, "aapt.pb.MacroBody"
125
132
  end
126
133
  end
127
134
  add_message "aapt.pb.Boolean" do
@@ -133,6 +140,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
133
140
  optional :name, :string, 3
134
141
  optional :private, :bool, 4
135
142
  optional :is_dynamic, :message, 5, "aapt.pb.Boolean"
143
+ optional :type_flags, :uint32, 6
144
+ optional :allow_raw, :bool, 7
136
145
  end
137
146
  add_enum "aapt.pb.Reference.Type" do
138
147
  value :REFERENCE, 0
@@ -285,6 +294,31 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
285
294
  optional :resource_id, :uint32, 5
286
295
  optional :compiled_item, :message, 6, "aapt.pb.Item"
287
296
  end
297
+ add_message "aapt.pb.MacroBody" do
298
+ optional :raw_string, :string, 1
299
+ optional :style_string, :message, 2, "aapt.pb.StyleString"
300
+ repeated :untranslatable_sections, :message, 3, "aapt.pb.UntranslatableSection"
301
+ repeated :namespace_stack, :message, 4, "aapt.pb.NamespaceAlias"
302
+ optional :source, :message, 5, "aapt.pb.SourcePosition"
303
+ end
304
+ add_message "aapt.pb.NamespaceAlias" do
305
+ optional :prefix, :string, 1
306
+ optional :package_name, :string, 2
307
+ optional :is_private, :bool, 3
308
+ end
309
+ add_message "aapt.pb.StyleString" do
310
+ optional :str, :string, 1
311
+ repeated :spans, :message, 2, "aapt.pb.StyleString.Span"
312
+ end
313
+ add_message "aapt.pb.StyleString.Span" do
314
+ optional :name, :string, 1
315
+ optional :start_index, :uint32, 2
316
+ optional :end_index, :uint32, 3
317
+ end
318
+ add_message "aapt.pb.UntranslatableSection" do
319
+ optional :start_index, :uint64, 1
320
+ optional :end_index, :uint64, 2
321
+ end
288
322
  end
289
323
  end
290
324
 
@@ -305,6 +339,7 @@ module Aapt
305
339
  Overlayable = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("aapt.pb.Overlayable").msgclass
306
340
  OverlayableItem = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("aapt.pb.OverlayableItem").msgclass
307
341
  OverlayableItem::Policy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("aapt.pb.OverlayableItem.Policy").enummodule
342
+ StagedId = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("aapt.pb.StagedId").msgclass
308
343
  EntryId = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("aapt.pb.EntryId").msgclass
309
344
  Entry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("aapt.pb.Entry").msgclass
310
345
  ConfigValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("aapt.pb.ConfigValue").msgclass
@@ -340,5 +375,10 @@ module Aapt
340
375
  XmlElement = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("aapt.pb.XmlElement").msgclass
341
376
  XmlNamespace = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("aapt.pb.XmlNamespace").msgclass
342
377
  XmlAttribute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("aapt.pb.XmlAttribute").msgclass
378
+ MacroBody = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("aapt.pb.MacroBody").msgclass
379
+ NamespaceAlias = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("aapt.pb.NamespaceAlias").msgclass
380
+ StyleString = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("aapt.pb.StyleString").msgclass
381
+ StyleString::Span = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("aapt.pb.StyleString.Span").msgclass
382
+ UntranslatableSection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("aapt.pb.UntranslatableSection").msgclass
343
383
  end
344
384
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AppInfo
4
- VERSION = '2.8.2'
4
+ VERSION = '2.8.4'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: app-info
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.8.2
4
+ version: 2.8.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - icyleaf
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-02-13 00:00:00.000000000 Z
11
+ date: 2023-03-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: CFPropertyList
@@ -39,7 +39,7 @@ dependencies:
39
39
  version: '1.5'
40
40
  - - "<"
41
41
  - !ruby/object:Gem::Version
42
- version: '3.1'
42
+ version: '3.3'
43
43
  type: :runtime
44
44
  prerelease: false
45
45
  version_requirements: !ruby/object:Gem::Requirement
@@ -49,7 +49,7 @@ dependencies:
49
49
  version: '1.5'
50
50
  - - "<"
51
51
  - !ruby/object:Gem::Version
52
- version: '3.1'
52
+ version: '3.3'
53
53
  - !ruby/object:Gem::Dependency
54
54
  name: ruby-macho
55
55
  requirement: !ruby/object:Gem::Requirement
@@ -76,14 +76,14 @@ dependencies:
76
76
  requirements:
77
77
  - - "~>"
78
78
  - !ruby/object:Gem::Version
79
- version: 2.5.0
79
+ version: 2.5.1
80
80
  type: :runtime
81
81
  prerelease: false
82
82
  version_requirements: !ruby/object:Gem::Requirement
83
83
  requirements:
84
84
  - - "~>"
85
85
  - !ruby/object:Gem::Version
86
- version: 2.5.0
86
+ version: 2.5.1
87
87
  - !ruby/object:Gem::Dependency
88
88
  name: rubyzip
89
89
  requirement: !ruby/object:Gem::Requirement
@@ -142,16 +142,22 @@ dependencies:
142
142
  name: google-protobuf
143
143
  requirement: !ruby/object:Gem::Requirement
144
144
  requirements:
145
- - - "~>"
145
+ - - ">="
146
146
  - !ruby/object:Gem::Version
147
147
  version: 3.19.4
148
+ - - "<"
149
+ - !ruby/object:Gem::Version
150
+ version: 3.23.0
148
151
  type: :runtime
149
152
  prerelease: false
150
153
  version_requirements: !ruby/object:Gem::Requirement
151
154
  requirements:
152
- - - "~>"
155
+ - - ">="
153
156
  - !ruby/object:Gem::Version
154
157
  version: 3.19.4
158
+ - - "<"
159
+ - !ruby/object:Gem::Version
160
+ version: 3.23.0
155
161
  - !ruby/object:Gem::Dependency
156
162
  name: bundler
157
163
  requirement: !ruby/object:Gem::Requirement
@@ -219,6 +225,7 @@ extra_rdoc_files: []
219
225
  files:
220
226
  - ".github/dependabot.yml"
221
227
  - ".github/workflows/ci.yml"
228
+ - ".github/workflows/create_release.yml"
222
229
  - ".gitignore"
223
230
  - ".rspec"
224
231
  - ".rubocop.yml"
@@ -276,7 +283,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
276
283
  - !ruby/object:Gem::Version
277
284
  version: '0'
278
285
  requirements: []
279
- rubygems_version: 3.1.4
286
+ rubygems_version: 3.4.1
280
287
  signing_key:
281
288
  specification_version: 4
282
289
  summary: Teardown tool for mobile app(ipa/apk) and dSYM file, analysis metedata like