app-info 2.6.5 → 2.7.0.beta1

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.
@@ -212,13 +212,13 @@ module AppInfo
212
212
  end
213
213
 
214
214
  def method_missing(method_name, *args, &block)
215
- mobileprovision.try(:[], Util.format_key(method_name)) ||
215
+ mobileprovision.try(:[], method_name.to_s.camelcase) ||
216
216
  mobileprovision.send(method_name) ||
217
217
  super
218
218
  end
219
219
 
220
220
  def respond_to_missing?(method_name, *args)
221
- mobileprovision.key?(Util.format_key(method_name)) ||
221
+ mobileprovision.key?(method_name.to_s.camelcase) ||
222
222
  mobileprovision.respond_to?(method_name) ||
223
223
  super
224
224
  end
@@ -133,7 +133,7 @@ module AppInfo
133
133
  new_png = String.new(@io.header)
134
134
  sections.map do |(type, length, data, crc, width, height)|
135
135
  if type == 'IDAT'
136
- buff_size = width * height * 4 + height
136
+ buff_size = (width * height * 4) + height
137
137
  data = inflate(data[0, buff_size])
138
138
  # duplicate the content of old data at first to avoid creating too many string objects
139
139
  newdata = String.new(data)
@@ -6,6 +6,8 @@ require 'rexml/document'
6
6
  module AppInfo
7
7
  # Proguard parser
8
8
  class Proguard
9
+ include Helper::Archive
10
+
9
11
  NAMESPACE = UUIDTools::UUID.sha1_create(UUIDTools::UUID_DNS_NAMESPACE, 'icyleaf.com')
10
12
 
11
13
  attr_reader :file
@@ -15,7 +17,7 @@ module AppInfo
15
17
  end
16
18
 
17
19
  def file_type
18
- AppInfo::Platform::PROGUARD
20
+ Platform::PROGUARD
19
21
  end
20
22
 
21
23
  def uuid
@@ -83,7 +85,7 @@ module AppInfo
83
85
  alias resource_path symbol_path
84
86
 
85
87
  def contents
86
- @contents ||= Util.unarchive(@file, path: 'proguard')
88
+ @contents ||= unarchive(@file, path: 'proguard')
87
89
  end
88
90
 
89
91
  def clear!
@@ -0,0 +1,144 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'app_info/protobuf/models/Resources_pb'
4
+ require 'app_info/protobuf/resources'
5
+ require 'app_info/core_ext'
6
+
7
+ module AppInfo
8
+ module Protobuf
9
+ class Base
10
+ include Helper::Defines
11
+
12
+ def initialize(doc, resources = nil)
13
+ @resources = resources
14
+ parse(doc)
15
+ end
16
+
17
+ private
18
+
19
+ def parse(_)
20
+ raise 'not implemented'
21
+ end
22
+ end
23
+
24
+ class Attribute < Base
25
+ attr_reader :namespace, :name, :value, :resource_id
26
+
27
+ private
28
+
29
+ def parse(doc)
30
+ @namespace = doc.namespace_uri
31
+ @name = doc.name
32
+ @value = parsed_value(doc)
33
+ @resource_id = doc&.resource_id
34
+ end
35
+
36
+ def parsed_value(doc)
37
+ if prim = doc&.compiled_item&.prim
38
+ return prim.send(prim.oneof_value)
39
+ end
40
+
41
+ if ref = doc&.compiled_item&.ref
42
+ return ref
43
+ # return "resourceId:0x#{ref.id.to_s(16)}"
44
+ end
45
+
46
+ doc.value
47
+ end
48
+ end
49
+
50
+ class Node < Base
51
+ attr_reader :name, :attributes, :children
52
+
53
+ private
54
+
55
+ def parse(doc)
56
+ define_name(doc)
57
+ define_attributes(doc)
58
+ define_children(doc)
59
+ end
60
+
61
+ def define_name(doc)
62
+ return unless element = doc.element
63
+
64
+ @name = element.name
65
+ end
66
+
67
+ def define_attributes(doc)
68
+ @attributes = {}
69
+
70
+ return unless element = doc.element
71
+
72
+ @attributes = element.attribute.each_with_object({}).each do |item, obj|
73
+ node = Attribute.new(item)
74
+
75
+ method_name = node.name.snakecase
76
+ obj[method_name] = node
77
+ define_instance_method(method_name, node.value)
78
+ end
79
+ end
80
+
81
+ UNIQUE_KEY = %w[uses_sdk application].freeze
82
+
83
+ def define_children(doc)
84
+ @children = {}
85
+ return unless element = doc.element
86
+
87
+ @children = element.child.each_with_object({}) do |item, obj|
88
+ next unless item_element = item.element
89
+
90
+ class_name = item_element.name.camelcase
91
+ klass = create_class(class_name, Protobuf::Node, namespace: 'AppInfo::Protobuf::Manifest')
92
+ node = klass.new(item)
93
+
94
+ method_name = item_element.name.snakecase
95
+ if UNIQUE_KEY.include?(method_name)
96
+ obj[method_name] = node
97
+ else
98
+ obj[method_name] ||= []
99
+ obj[method_name] << node
100
+ end
101
+ end
102
+
103
+ @children.each do |name, value|
104
+ define_instance_method(name, value)
105
+ end
106
+ end
107
+ end
108
+
109
+ class Manifest < Node
110
+ def self.parse(io, resources = nil)
111
+ doc = Aapt::Pb::XmlNode.decode(io)
112
+ new(doc, resources)
113
+ end
114
+
115
+ COMPONENTS = %w[activity activity-alias service receiver provider application].freeze
116
+
117
+ def package_name
118
+ @package_name ||= package
119
+ end
120
+
121
+ def label(locale: '')
122
+ @resources.find(application.label, locale: locale).value || application.label
123
+ end
124
+
125
+ def components
126
+ application.children.select do |name, _|
127
+ COMPONENTS.include?(name.downcase)
128
+ end
129
+ end
130
+
131
+ def activities
132
+ application.activity
133
+ end
134
+
135
+ def services
136
+ application.service
137
+ end
138
+
139
+ def icons
140
+ @resources.find(application.icon)
141
+ end
142
+ end
143
+ end
144
+ end
@@ -0,0 +1,206 @@
1
+ /*
2
+ * Copyright (C) 2017 The Android Open Source Project
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ syntax = "proto3";
18
+
19
+ package aapt.pb;
20
+
21
+ option java_package = "com.android.aapt";
22
+
23
+ // A description of the requirements a device must have in order for a
24
+ // resource to be matched and selected.
25
+ message Configuration {
26
+ enum LayoutDirection {
27
+ LAYOUT_DIRECTION_UNSET = 0;
28
+ LAYOUT_DIRECTION_LTR = 1;
29
+ LAYOUT_DIRECTION_RTL = 2;
30
+ }
31
+
32
+ enum ScreenLayoutSize {
33
+ SCREEN_LAYOUT_SIZE_UNSET = 0;
34
+ SCREEN_LAYOUT_SIZE_SMALL = 1;
35
+ SCREEN_LAYOUT_SIZE_NORMAL = 2;
36
+ SCREEN_LAYOUT_SIZE_LARGE = 3;
37
+ SCREEN_LAYOUT_SIZE_XLARGE = 4;
38
+ }
39
+
40
+ enum ScreenLayoutLong {
41
+ SCREEN_LAYOUT_LONG_UNSET = 0;
42
+ SCREEN_LAYOUT_LONG_LONG = 1;
43
+ SCREEN_LAYOUT_LONG_NOTLONG = 2;
44
+ }
45
+
46
+ enum ScreenRound {
47
+ SCREEN_ROUND_UNSET = 0;
48
+ SCREEN_ROUND_ROUND = 1;
49
+ SCREEN_ROUND_NOTROUND = 2;
50
+ }
51
+
52
+ enum WideColorGamut {
53
+ WIDE_COLOR_GAMUT_UNSET = 0;
54
+ WIDE_COLOR_GAMUT_WIDECG = 1;
55
+ WIDE_COLOR_GAMUT_NOWIDECG = 2;
56
+ }
57
+
58
+ enum Hdr {
59
+ HDR_UNSET = 0;
60
+ HDR_HIGHDR = 1;
61
+ HDR_LOWDR = 2;
62
+ }
63
+
64
+ enum Orientation {
65
+ ORIENTATION_UNSET = 0;
66
+ ORIENTATION_PORT = 1;
67
+ ORIENTATION_LAND = 2;
68
+ ORIENTATION_SQUARE = 3;
69
+ }
70
+
71
+ enum UiModeType {
72
+ UI_MODE_TYPE_UNSET = 0;
73
+ UI_MODE_TYPE_NORMAL = 1;
74
+ UI_MODE_TYPE_DESK = 2;
75
+ UI_MODE_TYPE_CAR = 3;
76
+ UI_MODE_TYPE_TELEVISION = 4;
77
+ UI_MODE_TYPE_APPLIANCE = 5;
78
+ UI_MODE_TYPE_WATCH = 6;
79
+ UI_MODE_TYPE_VRHEADSET = 7;
80
+ }
81
+
82
+ enum UiModeNight {
83
+ UI_MODE_NIGHT_UNSET = 0;
84
+ UI_MODE_NIGHT_NIGHT = 1;
85
+ UI_MODE_NIGHT_NOTNIGHT = 2;
86
+ }
87
+
88
+ enum Touchscreen {
89
+ TOUCHSCREEN_UNSET = 0;
90
+ TOUCHSCREEN_NOTOUCH = 1;
91
+ TOUCHSCREEN_STYLUS = 2;
92
+ TOUCHSCREEN_FINGER = 3;
93
+ }
94
+
95
+ enum KeysHidden {
96
+ KEYS_HIDDEN_UNSET = 0;
97
+ KEYS_HIDDEN_KEYSEXPOSED = 1;
98
+ KEYS_HIDDEN_KEYSHIDDEN = 2;
99
+ KEYS_HIDDEN_KEYSSOFT = 3;
100
+ }
101
+
102
+ enum Keyboard {
103
+ KEYBOARD_UNSET = 0;
104
+ KEYBOARD_NOKEYS = 1;
105
+ KEYBOARD_QWERTY = 2;
106
+ KEYBOARD_TWELVEKEY = 3;
107
+ }
108
+
109
+ enum NavHidden {
110
+ NAV_HIDDEN_UNSET = 0;
111
+ NAV_HIDDEN_NAVEXPOSED = 1;
112
+ NAV_HIDDEN_NAVHIDDEN = 2;
113
+ }
114
+
115
+ enum Navigation {
116
+ NAVIGATION_UNSET = 0;
117
+ NAVIGATION_NONAV = 1;
118
+ NAVIGATION_DPAD = 2;
119
+ NAVIGATION_TRACKBALL = 3;
120
+ NAVIGATION_WHEEL = 4;
121
+ }
122
+
123
+ //
124
+ // Axis/dimensions that are understood by the runtime.
125
+ //
126
+
127
+ // Mobile country code.
128
+ uint32 mcc = 1;
129
+
130
+ // Mobile network code.
131
+ uint32 mnc = 2;
132
+
133
+ // BCP-47 locale tag.
134
+ string locale = 3;
135
+
136
+ // Left-to-right, right-to-left...
137
+ LayoutDirection layout_direction = 4;
138
+
139
+ // Screen width in pixels. Prefer screen_width_dp.
140
+ uint32 screen_width = 5;
141
+
142
+ // Screen height in pixels. Prefer screen_height_dp.
143
+ uint32 screen_height = 6;
144
+
145
+ // Screen width in density independent pixels (dp).
146
+ uint32 screen_width_dp = 7;
147
+
148
+ // Screen height in density independent pixels (dp).
149
+ uint32 screen_height_dp = 8;
150
+
151
+ // The smallest screen dimension, regardless of orientation, in dp.
152
+ uint32 smallest_screen_width_dp = 9;
153
+
154
+ // Whether the device screen is classified as small, normal, large, xlarge.
155
+ ScreenLayoutSize screen_layout_size = 10;
156
+
157
+ // Whether the device screen is long.
158
+ ScreenLayoutLong screen_layout_long = 11;
159
+
160
+ // Whether the screen is round (Android Wear).
161
+ ScreenRound screen_round = 12;
162
+
163
+ // Whether the screen supports wide color gamut.
164
+ WideColorGamut wide_color_gamut = 13;
165
+
166
+ // Whether the screen has high dynamic range.
167
+ Hdr hdr = 14;
168
+
169
+ // Which orientation the device is in (portrait, landscape).
170
+ Orientation orientation = 15;
171
+
172
+ // Which type of UI mode the device is in (television, car, etc.).
173
+ UiModeType ui_mode_type = 16;
174
+
175
+ // Whether the device is in night mode.
176
+ UiModeNight ui_mode_night = 17;
177
+
178
+ // The device's screen density in dots-per-inch (dpi).
179
+ uint32 density = 18;
180
+
181
+ // Whether a touchscreen exists, supports a stylus, or finger.
182
+ Touchscreen touchscreen = 19;
183
+
184
+ // Whether the keyboard hardware keys are currently hidden, exposed, or
185
+ // if the keyboard is a software keyboard.
186
+ KeysHidden keys_hidden = 20;
187
+
188
+ // The type of keyboard present (none, QWERTY, 12-key).
189
+ Keyboard keyboard = 21;
190
+
191
+ // Whether the navigation is exposed or hidden.
192
+ NavHidden nav_hidden = 22;
193
+
194
+ // The type of navigation present on the device
195
+ // (trackball, wheel, dpad, etc.).
196
+ Navigation navigation = 23;
197
+
198
+ // The minimum SDK version of the device.
199
+ uint32 sdk_version = 24;
200
+
201
+ //
202
+ // Build-time only dimensions.
203
+ //
204
+
205
+ string product = 25;
206
+ }
@@ -0,0 +1,139 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: Configuration.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ Google::Protobuf::DescriptorPool.generated_pool.build do
7
+ add_file("Configuration.proto", :syntax => :proto3) do
8
+ add_message "aapt.pb.Configuration" do
9
+ optional :mcc, :uint32, 1
10
+ optional :mnc, :uint32, 2
11
+ optional :locale, :string, 3
12
+ optional :layout_direction, :enum, 4, "aapt.pb.Configuration.LayoutDirection"
13
+ optional :screen_width, :uint32, 5
14
+ optional :screen_height, :uint32, 6
15
+ optional :screen_width_dp, :uint32, 7
16
+ optional :screen_height_dp, :uint32, 8
17
+ optional :smallest_screen_width_dp, :uint32, 9
18
+ optional :screen_layout_size, :enum, 10, "aapt.pb.Configuration.ScreenLayoutSize"
19
+ optional :screen_layout_long, :enum, 11, "aapt.pb.Configuration.ScreenLayoutLong"
20
+ optional :screen_round, :enum, 12, "aapt.pb.Configuration.ScreenRound"
21
+ optional :wide_color_gamut, :enum, 13, "aapt.pb.Configuration.WideColorGamut"
22
+ optional :hdr, :enum, 14, "aapt.pb.Configuration.Hdr"
23
+ optional :orientation, :enum, 15, "aapt.pb.Configuration.Orientation"
24
+ optional :ui_mode_type, :enum, 16, "aapt.pb.Configuration.UiModeType"
25
+ optional :ui_mode_night, :enum, 17, "aapt.pb.Configuration.UiModeNight"
26
+ optional :density, :uint32, 18
27
+ optional :touchscreen, :enum, 19, "aapt.pb.Configuration.Touchscreen"
28
+ optional :keys_hidden, :enum, 20, "aapt.pb.Configuration.KeysHidden"
29
+ optional :keyboard, :enum, 21, "aapt.pb.Configuration.Keyboard"
30
+ optional :nav_hidden, :enum, 22, "aapt.pb.Configuration.NavHidden"
31
+ optional :navigation, :enum, 23, "aapt.pb.Configuration.Navigation"
32
+ optional :sdk_version, :uint32, 24
33
+ optional :product, :string, 25
34
+ end
35
+ add_enum "aapt.pb.Configuration.LayoutDirection" do
36
+ value :LAYOUT_DIRECTION_UNSET, 0
37
+ value :LAYOUT_DIRECTION_LTR, 1
38
+ value :LAYOUT_DIRECTION_RTL, 2
39
+ end
40
+ add_enum "aapt.pb.Configuration.ScreenLayoutSize" do
41
+ value :SCREEN_LAYOUT_SIZE_UNSET, 0
42
+ value :SCREEN_LAYOUT_SIZE_SMALL, 1
43
+ value :SCREEN_LAYOUT_SIZE_NORMAL, 2
44
+ value :SCREEN_LAYOUT_SIZE_LARGE, 3
45
+ value :SCREEN_LAYOUT_SIZE_XLARGE, 4
46
+ end
47
+ add_enum "aapt.pb.Configuration.ScreenLayoutLong" do
48
+ value :SCREEN_LAYOUT_LONG_UNSET, 0
49
+ value :SCREEN_LAYOUT_LONG_LONG, 1
50
+ value :SCREEN_LAYOUT_LONG_NOTLONG, 2
51
+ end
52
+ add_enum "aapt.pb.Configuration.ScreenRound" do
53
+ value :SCREEN_ROUND_UNSET, 0
54
+ value :SCREEN_ROUND_ROUND, 1
55
+ value :SCREEN_ROUND_NOTROUND, 2
56
+ end
57
+ add_enum "aapt.pb.Configuration.WideColorGamut" do
58
+ value :WIDE_COLOR_GAMUT_UNSET, 0
59
+ value :WIDE_COLOR_GAMUT_WIDECG, 1
60
+ value :WIDE_COLOR_GAMUT_NOWIDECG, 2
61
+ end
62
+ add_enum "aapt.pb.Configuration.Hdr" do
63
+ value :HDR_UNSET, 0
64
+ value :HDR_HIGHDR, 1
65
+ value :HDR_LOWDR, 2
66
+ end
67
+ add_enum "aapt.pb.Configuration.Orientation" do
68
+ value :ORIENTATION_UNSET, 0
69
+ value :ORIENTATION_PORT, 1
70
+ value :ORIENTATION_LAND, 2
71
+ value :ORIENTATION_SQUARE, 3
72
+ end
73
+ add_enum "aapt.pb.Configuration.UiModeType" do
74
+ value :UI_MODE_TYPE_UNSET, 0
75
+ value :UI_MODE_TYPE_NORMAL, 1
76
+ value :UI_MODE_TYPE_DESK, 2
77
+ value :UI_MODE_TYPE_CAR, 3
78
+ value :UI_MODE_TYPE_TELEVISION, 4
79
+ value :UI_MODE_TYPE_APPLIANCE, 5
80
+ value :UI_MODE_TYPE_WATCH, 6
81
+ value :UI_MODE_TYPE_VRHEADSET, 7
82
+ end
83
+ add_enum "aapt.pb.Configuration.UiModeNight" do
84
+ value :UI_MODE_NIGHT_UNSET, 0
85
+ value :UI_MODE_NIGHT_NIGHT, 1
86
+ value :UI_MODE_NIGHT_NOTNIGHT, 2
87
+ end
88
+ add_enum "aapt.pb.Configuration.Touchscreen" do
89
+ value :TOUCHSCREEN_UNSET, 0
90
+ value :TOUCHSCREEN_NOTOUCH, 1
91
+ value :TOUCHSCREEN_STYLUS, 2
92
+ value :TOUCHSCREEN_FINGER, 3
93
+ end
94
+ add_enum "aapt.pb.Configuration.KeysHidden" do
95
+ value :KEYS_HIDDEN_UNSET, 0
96
+ value :KEYS_HIDDEN_KEYSEXPOSED, 1
97
+ value :KEYS_HIDDEN_KEYSHIDDEN, 2
98
+ value :KEYS_HIDDEN_KEYSSOFT, 3
99
+ end
100
+ add_enum "aapt.pb.Configuration.Keyboard" do
101
+ value :KEYBOARD_UNSET, 0
102
+ value :KEYBOARD_NOKEYS, 1
103
+ value :KEYBOARD_QWERTY, 2
104
+ value :KEYBOARD_TWELVEKEY, 3
105
+ end
106
+ add_enum "aapt.pb.Configuration.NavHidden" do
107
+ value :NAV_HIDDEN_UNSET, 0
108
+ value :NAV_HIDDEN_NAVEXPOSED, 1
109
+ value :NAV_HIDDEN_NAVHIDDEN, 2
110
+ end
111
+ add_enum "aapt.pb.Configuration.Navigation" do
112
+ value :NAVIGATION_UNSET, 0
113
+ value :NAVIGATION_NONAV, 1
114
+ value :NAVIGATION_DPAD, 2
115
+ value :NAVIGATION_TRACKBALL, 3
116
+ value :NAVIGATION_WHEEL, 4
117
+ end
118
+ end
119
+ end
120
+
121
+ module Aapt
122
+ module Pb
123
+ Configuration = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("aapt.pb.Configuration").msgclass
124
+ Configuration::LayoutDirection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("aapt.pb.Configuration.LayoutDirection").enummodule
125
+ Configuration::ScreenLayoutSize = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("aapt.pb.Configuration.ScreenLayoutSize").enummodule
126
+ Configuration::ScreenLayoutLong = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("aapt.pb.Configuration.ScreenLayoutLong").enummodule
127
+ Configuration::ScreenRound = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("aapt.pb.Configuration.ScreenRound").enummodule
128
+ Configuration::WideColorGamut = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("aapt.pb.Configuration.WideColorGamut").enummodule
129
+ Configuration::Hdr = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("aapt.pb.Configuration.Hdr").enummodule
130
+ Configuration::Orientation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("aapt.pb.Configuration.Orientation").enummodule
131
+ Configuration::UiModeType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("aapt.pb.Configuration.UiModeType").enummodule
132
+ Configuration::UiModeNight = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("aapt.pb.Configuration.UiModeNight").enummodule
133
+ Configuration::Touchscreen = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("aapt.pb.Configuration.Touchscreen").enummodule
134
+ Configuration::KeysHidden = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("aapt.pb.Configuration.KeysHidden").enummodule
135
+ Configuration::Keyboard = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("aapt.pb.Configuration.Keyboard").enummodule
136
+ Configuration::NavHidden = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("aapt.pb.Configuration.NavHidden").enummodule
137
+ Configuration::Navigation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("aapt.pb.Configuration.Navigation").enummodule
138
+ end
139
+ end
@@ -0,0 +1,19 @@
1
+ # Protobuf binary manifest
2
+
3
+ ## Convert to ruby model
4
+
5
+ ```bash
6
+ cd app_info/lib/app_info/abb/proto
7
+
8
+ protoc --ruby_out=. Resources.proto
9
+ protoc --ruby_out=. Configuration.proto
10
+ ```
11
+
12
+ ## Resouces
13
+
14
+ `Configuration.proto` and `Resources.proto` can be found in aapt2's github:
15
+
16
+ - https://github.com/aosp-mirror/platform_frameworks_base/tree/master/tools/aapt2/Configuration.proto
17
+ - https://github.com/aosp-mirror/platform_frameworks_base/tree/master/tools/aapt2/Resources.proto
18
+
19
+ Source: https://gist.github.com/Farious/e841ef85a8f4280e4f248ba8037ea2c0#file-rollback_aab-sh-L51