app-info 3.2.0.beta1 → 3.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +1 -3
- data/CHANGELOG.md +15 -1
- data/README.md +29 -1
- data/app_info.gemspec +3 -13
- data/lib/app_info/aab.rb +13 -3
- data/lib/app_info/android.rb +5 -0
- data/lib/app_info/apk.rb +8 -0
- data/lib/app_info/const.rb +50 -0
- data/lib/app_info/version.rb +1 -1
- metadata +9 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 86293b5c7a18cc4acd04c091ca25cc6b09cb52a73f69733713fd48e64b967429
|
4
|
+
data.tar.gz: 1e66c39ada9c58553364bb96c36791e285886f5ecb235ec0f051e712afa26517
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 432e0afb55cd37c79938a4fbbfcc31df8d0f37c674018e467282e037dd2f1ad3a2e40639433aa1fb577d4da7d32aebf8d14dd9f05f02a9e050de638ea482dd6b
|
7
|
+
data.tar.gz: 453aeefda0e657cec97fc01527e3b796dffebbfd9f1760b3bfc7afd88b2f0596fe4d146c0c870fd3c9752d32577518c3a85dc1c8c77a6046a99e0f4439daa19d
|
data/.github/workflows/ci.yml
CHANGED
@@ -31,12 +31,10 @@ jobs:
|
|
31
31
|
fail-fast: false
|
32
32
|
matrix:
|
33
33
|
ruby: [ ruby-3.1, ruby-3.2, ruby-3.3 ]
|
34
|
-
experimental: [false]
|
34
|
+
experimental: [ false ]
|
35
35
|
include:
|
36
36
|
- ruby: head
|
37
37
|
experimental: true
|
38
|
-
- ruby: truffleruby-head
|
39
|
-
experimental: true
|
40
38
|
steps:
|
41
39
|
- uses: actions/checkout@v4
|
42
40
|
|
data/CHANGELOG.md
CHANGED
@@ -9,6 +9,18 @@ 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
|
+
## [3.3.0] (2024-11-27)
|
13
|
+
|
14
|
+
### Added
|
15
|
+
|
16
|
+
- Add `.native_codes` method for Android. #[79](https://github.com/icyleaf/app-info/pull/79)
|
17
|
+
|
18
|
+
## [3.2.0] (2024-09-09)
|
19
|
+
|
20
|
+
### Added
|
21
|
+
|
22
|
+
- Add HarmonyOS app support (basic). #[76](https://github.com/icyleaf/app-info/pull/76) Many thanks to @[InjoyDeng](https://github.com/InjoyDeng)
|
23
|
+
|
12
24
|
## [3.1.4] (2024-06-27)
|
13
25
|
|
14
26
|
### Added
|
@@ -355,7 +367,9 @@ Dropped Ruby 2.5 ~ 3.0 support (no changes required.).
|
|
355
367
|
|
356
368
|
- Updated dependency of CFPropertly list be a range between 2.3.4. (thanks @[cschroed](https://github.com/cschroed))
|
357
369
|
|
358
|
-
[Unreleased]: https://github.com/icyleaf/app-info/compare/v3.
|
370
|
+
[Unreleased]: https://github.com/icyleaf/app-info/compare/v3.3.0..HEAD
|
371
|
+
[3.3.0]: https://github.com/icyleaf/app-info/compare/v3.2.0...v3.3.0
|
372
|
+
[3.2.0]: https://github.com/icyleaf/app-info/compare/v3.1.4...v3.2.0
|
359
373
|
[3.1.4]: https://github.com/icyleaf/app-info/compare/v3.1.2...v3.1.4
|
360
374
|
[3.1.2]: https://github.com/icyleaf/app-info/compare/v3.1.0...v3.1.2
|
361
375
|
[3.1.0]: https://github.com/icyleaf/app-info/compare/v3.0.0...v3.1.0
|
data/README.md
CHANGED
@@ -5,7 +5,8 @@
|
|
5
5
|
[![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)
|
6
6
|
[![License](https://img.shields.io/github/license/icyleaf/app-info)](LICENSE)
|
7
7
|
|
8
|
-
Teardown tool for mobile app (ipa, apk
|
8
|
+
Teardown tool for mobile app (iOS: ipa, Android: apk/aab, HarmonyOS: .hap/.app file), macOS app, dSYM.zip file and Windows PE file.
|
9
|
+
|
9
10
|
Analysis metedata like version, name, icon etc.
|
10
11
|
|
11
12
|
## Support
|
@@ -17,6 +18,9 @@ Analysis metedata like version, name, icon etc.
|
|
17
18
|
- `.ipa`
|
18
19
|
- `Info.plist` file
|
19
20
|
- `.mobileprovision`/`.provisionprofile` file
|
21
|
+
- HarmonyOS file (basic)
|
22
|
+
- `.hap`
|
23
|
+
- `.app`
|
20
24
|
- macOS App file (archived by starnd pkzip format)
|
21
25
|
- `.app.zip`
|
22
26
|
- dSYMs file (archived by starnd pkzip format)
|
@@ -246,6 +250,30 @@ android.signatures
|
|
246
250
|
# => [...]
|
247
251
|
```
|
248
252
|
|
253
|
+
### HarmonyOS
|
254
|
+
|
255
|
+
Accept `.hap` and `.app` HarmonyOS file. Only metabase, except resources mapping.
|
256
|
+
|
257
|
+
```ruby
|
258
|
+
hap = AppInfo.parse('app.hap')
|
259
|
+
|
260
|
+
# get app file size
|
261
|
+
android.size
|
262
|
+
# => 2013213
|
263
|
+
|
264
|
+
# get app file size in human reable.
|
265
|
+
android.size(human_size: true)
|
266
|
+
# => 21 MB
|
267
|
+
|
268
|
+
# get app release version
|
269
|
+
android.release_version
|
270
|
+
# => 1.0
|
271
|
+
|
272
|
+
# get app package name
|
273
|
+
android.bundle_id
|
274
|
+
# => com.icyleaf.AppInfoDemo
|
275
|
+
```
|
276
|
+
|
249
277
|
### macOS
|
250
278
|
|
251
279
|
Only accept zipped macOS file.
|
data/app_info.gemspec
CHANGED
@@ -10,8 +10,8 @@ Gem::Specification.new do |spec|
|
|
10
10
|
spec.authors = ['icyleaf']
|
11
11
|
spec.email = ['icyleaf.cn@gmail.com']
|
12
12
|
|
13
|
-
spec.summary = 'Teardown tool for
|
14
|
-
spec.description = 'Teardown tool for ipa
|
13
|
+
spec.summary = 'Teardown tool for all most app, analysis metedata like version, name, icon'
|
14
|
+
spec.description = 'Teardown tool for ipa, apk, aab, hap mobile files and Windows, macOS and dSYM file, even support for info.plist and .mobileprovision files'
|
15
15
|
spec.homepage = 'http://github.com/icyleaf/app-info'
|
16
16
|
spec.license = 'MIT'
|
17
17
|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
@@ -30,18 +30,8 @@ Gem::Specification.new do |spec|
|
|
30
30
|
spec.add_dependency 'uuidtools', '>= 2.1.5', '< 2.3.0'
|
31
31
|
spec.add_dependency 'icns', '~> 0.2.0'
|
32
32
|
spec.add_dependency 'pedump', '~> 0.6.2'
|
33
|
-
spec.add_dependency 'google-protobuf', '>= 4.27.
|
33
|
+
spec.add_dependency 'google-protobuf', '>= 4.27.5', '< 5.0.0'
|
34
34
|
|
35
35
|
spec.add_development_dependency 'bundler', '>= 1.12'
|
36
36
|
spec.add_development_dependency 'rake', '>= 10.0'
|
37
|
-
|
38
|
-
spec.post_install_message = <<~ENDBANNER
|
39
|
-
AppInfo 3.0 was out!
|
40
|
-
**********************
|
41
|
-
The public API of some AppInfo classes has been changed.
|
42
|
-
|
43
|
-
Please ensure that your Gemfiles and .gemspecs are suitably restrictive
|
44
|
-
to avoid an unexpected breakage when 3.0 is released (e.g. ~> 2.8.5).
|
45
|
-
See https://github.com/icyleaf/app_info for details.
|
46
|
-
ENDBANNER
|
47
37
|
end
|
data/lib/app_info/aab.rb
CHANGED
@@ -80,23 +80,33 @@ module AppInfo
|
|
80
80
|
@components ||= manifest.components.transform_values
|
81
81
|
end
|
82
82
|
|
83
|
+
# @param [String] base_path
|
84
|
+
# @return [Array<String>]
|
85
|
+
def native_codes(base_path: BASE_PATH)
|
86
|
+
@native_codes ||= zip.glob(::File.join(base_path, 'lib/**/*'))
|
87
|
+
.each_with_object([]) do |entry, obj|
|
88
|
+
lib = entry.name.split('/')[2]
|
89
|
+
obj << lib unless obj.include?(lib)
|
90
|
+
end
|
91
|
+
end
|
92
|
+
|
83
93
|
def each_file
|
84
94
|
zip.each do |entry|
|
85
95
|
next unless entry.file?
|
86
96
|
|
87
|
-
yield entry.name,
|
97
|
+
yield entry.name, zip.read(entry)
|
88
98
|
end
|
89
99
|
end
|
90
100
|
|
91
101
|
def read_file(name, base_path: BASE_PATH)
|
92
|
-
content =
|
102
|
+
content = zip.read(entry(name, base_path: base_path))
|
93
103
|
return parse_binary_xml(content) if xml_file?(name)
|
94
104
|
|
95
105
|
content
|
96
106
|
end
|
97
107
|
|
98
108
|
def entry(name, base_path: BASE_PATH)
|
99
|
-
entry =
|
109
|
+
entry = zip.find_entry(::File.join(base_path, name))
|
100
110
|
raise NotFoundError, "'#{name}'" if entry.nil?
|
101
111
|
|
102
112
|
entry
|
data/lib/app_info/android.rb
CHANGED
@@ -136,6 +136,11 @@ module AppInfo
|
|
136
136
|
not_implemented_error!(__method__)
|
137
137
|
end
|
138
138
|
|
139
|
+
# @abstract Subclass and override {#native_codes} to implement.
|
140
|
+
def native_codes
|
141
|
+
not_implemented_error!(__method__)
|
142
|
+
end
|
143
|
+
|
139
144
|
# @abstract Subclass and override {#zip} to implement.
|
140
145
|
def zip
|
141
146
|
not_implemented_error!(__method__)
|
data/lib/app_info/apk.rb
CHANGED
@@ -59,6 +59,14 @@ module AppInfo
|
|
59
59
|
components.select { |c| c.type == 'activity' }
|
60
60
|
end
|
61
61
|
|
62
|
+
# @return [Array<String>]
|
63
|
+
def native_codes
|
64
|
+
@native_codes ||= zip.glob('lib/**/*').each_with_object([]) do |entry, obj|
|
65
|
+
lib = entry.name.split('/')[1]
|
66
|
+
obj << lib unless obj.include?(lib)
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
62
70
|
# @return [::Android::Apk]
|
63
71
|
def apk
|
64
72
|
@apk ||= ::Android::Apk.new(@file)
|
data/lib/app_info/const.rb
CHANGED
@@ -105,5 +105,55 @@ module AppInfo
|
|
105
105
|
# Windows
|
106
106
|
WINDOWS = :windows
|
107
107
|
end
|
108
|
+
|
109
|
+
# legacy consts
|
110
|
+
|
111
|
+
# macOS
|
112
|
+
# @deprecated Use {Device::Apple#MACOS} instead, this method will remove in 3.3.0.
|
113
|
+
MACOS = :macos
|
114
|
+
|
115
|
+
# Apple iPhone
|
116
|
+
# @deprecated Use {Device::Apple#IPHONE} instead, this method will remove in 3.3.0.
|
117
|
+
IPHONE = :iphone
|
118
|
+
|
119
|
+
# Apple iPad
|
120
|
+
# @deprecated Use {Device::Apple#IPAD} instead, this method will remove in 3.3.0.
|
121
|
+
IPAD = :ipad
|
122
|
+
|
123
|
+
# Apple Universal (iPhone and iPad)
|
124
|
+
# @deprecated Use {Device::Apple#UNIVERSAL} instead, this method will remove in 3.3.0.
|
125
|
+
UNIVERSAL = :universal
|
126
|
+
|
127
|
+
# Apple TV
|
128
|
+
# @deprecated Use {Device::Apple#APPLETV} instead, this method will remove in 3.3.0.
|
129
|
+
APPLETV = :appletv
|
130
|
+
|
131
|
+
# Apple Watch (TODO: not implemented yet)
|
132
|
+
# @deprecated Use {Device::Apple#IWATCH} instead, this method will remove in 3.3.0.
|
133
|
+
IWATCH = :iwatch
|
134
|
+
|
135
|
+
# Android Phone
|
136
|
+
# @deprecated Use {Device::Google#PHONE} instead, this method will remove in 3.3.0.
|
137
|
+
PHONE = :phone
|
138
|
+
|
139
|
+
# Android Tablet (TODO: not implemented yet)
|
140
|
+
# @deprecated Use {Device::Google#TABLET} instead, this method will remove in 3.3.0.
|
141
|
+
TABLET = :tablet
|
142
|
+
|
143
|
+
# Android Watch
|
144
|
+
# @deprecated Use {Device::Google#WATCH} instead, this method will remove in 3.3.0.
|
145
|
+
WATCH = :watch
|
146
|
+
|
147
|
+
# Android TV
|
148
|
+
# @deprecated Use {Device::Google#TELEVISION} instead, this method will remove in 3.3.0.
|
149
|
+
TELEVISION = :television
|
150
|
+
|
151
|
+
# Android Car Automotive
|
152
|
+
# @deprecated Use {Device::Google#AUTOMOTIVE} instead, this method will remove in 3.3.0.
|
153
|
+
AUTOMOTIVE = :automotive
|
154
|
+
|
155
|
+
# Windows
|
156
|
+
# @deprecated Use {Device::Microsoft#WINDOWS} instead, this method will remove in 3.3.0.
|
157
|
+
WINDOWS = :windows
|
108
158
|
end
|
109
159
|
end
|
data/lib/app_info/version.rb
CHANGED
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: 3.
|
4
|
+
version: 3.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- icyleaf
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-11-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: CFPropertyList
|
@@ -192,7 +192,7 @@ dependencies:
|
|
192
192
|
requirements:
|
193
193
|
- - ">="
|
194
194
|
- !ruby/object:Gem::Version
|
195
|
-
version: 4.27.
|
195
|
+
version: 4.27.5
|
196
196
|
- - "<"
|
197
197
|
- !ruby/object:Gem::Version
|
198
198
|
version: 5.0.0
|
@@ -202,7 +202,7 @@ dependencies:
|
|
202
202
|
requirements:
|
203
203
|
- - ">="
|
204
204
|
- !ruby/object:Gem::Version
|
205
|
-
version: 4.27.
|
205
|
+
version: 4.27.5
|
206
206
|
- - "<"
|
207
207
|
- !ruby/object:Gem::Version
|
208
208
|
version: 5.0.0
|
@@ -234,8 +234,8 @@ dependencies:
|
|
234
234
|
- - ">="
|
235
235
|
- !ruby/object:Gem::Version
|
236
236
|
version: '10.0'
|
237
|
-
description: Teardown tool for ipa
|
238
|
-
and .mobileprovision files
|
237
|
+
description: Teardown tool for ipa, apk, aab, hap mobile files and Windows, macOS
|
238
|
+
and dSYM file, even support for info.plist and .mobileprovision files
|
239
239
|
email:
|
240
240
|
- icyleaf.cn@gmail.com
|
241
241
|
executables:
|
@@ -313,14 +313,7 @@ homepage: http://github.com/icyleaf/app-info
|
|
313
313
|
licenses:
|
314
314
|
- MIT
|
315
315
|
metadata: {}
|
316
|
-
post_install_message:
|
317
|
-
AppInfo 3.0 was out!
|
318
|
-
**********************
|
319
|
-
The public API of some AppInfo classes has been changed.
|
320
|
-
|
321
|
-
Please ensure that your Gemfiles and .gemspecs are suitably restrictive
|
322
|
-
to avoid an unexpected breakage when 3.0 is released (e.g. ~> 2.8.5).
|
323
|
-
See https://github.com/icyleaf/app_info for details.
|
316
|
+
post_install_message:
|
324
317
|
rdoc_options: []
|
325
318
|
require_paths:
|
326
319
|
- lib
|
@@ -335,9 +328,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
335
328
|
- !ruby/object:Gem::Version
|
336
329
|
version: '0'
|
337
330
|
requirements: []
|
338
|
-
rubygems_version: 3.5.
|
331
|
+
rubygems_version: 3.5.16
|
339
332
|
signing_key:
|
340
333
|
specification_version: 4
|
341
|
-
summary: Teardown tool for
|
342
|
-
version, name, icon
|
334
|
+
summary: Teardown tool for all most app, analysis metedata like version, name, icon
|
343
335
|
test_files: []
|