-
-
Notifications
You must be signed in to change notification settings - Fork 45
/
build_props.sh
287 lines (247 loc) · 11.2 KB
/
build_props.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
#!/bin/bash
# Using util_functions.sh
[ -f "util_functions.sh" ] && . ./util_functions.sh || { echo "util_functions.sh not found" && exit 1; }
# Start processing directories (default to ./extracted_images)
process_directories "${BASH_SOURCE[0]}" "$1"
# Define the props path
declare EXT_PROP_FILES=$(find_prop_files "$dir")
# Store the content of all prop files in a variable
declare EXT_PROP_CONTENT=$(cat $EXT_PROP_FILES)
# Building props config from there
system_prop=""
module_prop=""
###
# System Props
###
# Build our system.prop
to_system_prop "##
# Beautiful Pixel Props https://t.me/PixelProps
# By @T3SL4
##
###
#-#
###
###
# begin product/etc/build.prop
###
# begin common build properties"
add_prop_as_ini to_system_prop "ro.product.brand" "$(grep_prop "ro.product.vendor.brand" "$EXT_PROP_CONTENT")"
add_prop_as_ini to_system_prop "ro.product.device" "$(grep_prop "ro.product.vendor.device" "$EXT_PROP_CONTENT")"
add_prop_as_ini to_system_prop "ro.product.manufacturer" "$(grep_prop "ro.product.vendor.manufacturer" "$EXT_PROP_CONTENT")"
add_prop_as_ini to_system_prop "ro.product.model" "$(grep_prop "ro.product.vendor.model" "$EXT_PROP_CONTENT")"
add_prop_as_ini to_system_prop "ro.product.name" "$(grep_prop "ro.product.vendor.name" "$EXT_PROP_CONTENT")"
build_system_prop "ro.product.product.brand"
build_system_prop "ro.product.product.device"
build_system_prop "ro.product.product.manufacturer"
build_system_prop "ro.product.product.model"
build_system_prop "ro.product.product.name"
build_system_prop "ro.product.name_for_attestation"
build_system_prop "ro.product.build.date"
build_system_prop "ro.product.build.date.utc"
build_system_prop "ro.product.build.fingerprint"
build_system_prop "ro.product.build.id"
build_system_prop "ro.product.build.tags"
build_system_prop "ro.product.build.type"
build_system_prop "ro.product.build.version.incremental"
build_system_prop "ro.product.build.version.release"
build_system_prop "ro.product.build.version.release_or_codename"
build_system_prop "ro.product.build.version.sdk"
to_system_prop "# end common build properties
# begin PRODUCT_PRODUCT_PROPERTIES"
build_system_prop "ro.support_one_handed_mode"
build_system_prop "ro.opa.eligible_device"
build_system_prop "ro.com.google.ime.theme_id"
build_system_prop "ro.com.google.ime.system_lm_dir"
to_system_prop "# end PRODUCT_PRODUCT_PROPERTIES
# begin PRODUCT_BOOTIMAGE_PROPERTIES"
add_prop_as_ini to_system_prop "ro.product.bootimage.brand" "$(grep_prop "ro.product.vendor.brand" "$EXT_PROP_CONTENT")"
add_prop_as_ini to_system_prop "ro.product.bootimage.device" "$(grep_prop "ro.product.vendor.device" "$EXT_PROP_CONTENT")"
add_prop_as_ini to_system_prop "ro.product.bootimage.manufacturer" "$(grep_prop "ro.product.vendor.manufacturer" "$EXT_PROP_CONTENT")"
add_prop_as_ini to_system_prop "ro.product.bootimage.model" "$(grep_prop "ro.product.vendor.model" "$EXT_PROP_CONTENT")"
add_prop_as_ini to_system_prop "ro.product.bootimage.name" "$(grep_prop "ro.product.vendor.name" "$EXT_PROP_CONTENT")"
add_prop_as_ini to_system_prop "ro.bootimage.build.date" "$(grep_prop "ro.vendor.build.date" "$EXT_PROP_CONTENT")"
add_prop_as_ini to_system_prop "ro.bootimage.build.date.utc" "$(grep_prop "ro.vendor.build.date.utc" "$EXT_PROP_CONTENT")"
add_prop_as_ini to_system_prop "ro.bootimage.build.fingerprint" "$(grep_prop "ro.vendor.build.fingerprint" "$EXT_PROP_CONTENT")"
add_prop_as_ini to_system_prop "ro.bootimage.build.id" "$(grep_prop "ro.vendor.build.id" "$EXT_PROP_CONTENT")"
add_prop_as_ini to_system_prop "ro.bootimage.build.tags" "$(grep_prop "ro.vendor.build.tags" "$EXT_PROP_CONTENT")"
add_prop_as_ini to_system_prop "ro.bootimage.build.type" "$(grep_prop "ro.vendor.build.type" "$EXT_PROP_CONTENT")"
add_prop_as_ini to_system_prop "ro.bootimage.build.version.incremental" "$(grep_prop "ro.vendor.build.version.incremental" "$EXT_PROP_CONTENT")"
add_prop_as_ini to_system_prop "ro.bootimage.build.version.release" "$(grep_prop "ro.vendor.build.version.release" "$EXT_PROP_CONTENT")"
add_prop_as_ini to_system_prop "ro.bootimage.build.version.release_or_codename" "$(grep_prop "ro.vendor.build.version.release_or_codename" "$EXT_PROP_CONTENT")"
add_prop_as_ini to_system_prop "ro.bootimage.build.version.sdk" "$(grep_prop "ro.vendor.build.version.sdk" "$EXT_PROP_CONTENT")"
to_system_prop "# end PRODUCT_BOOTIMAGE_PROPERTIES
###
# end product/etc/build.prop
###
###
#-#
###
###
# begin vendor/build.prop
###
# begin common build properties"
build_system_prop "ro.product.vendor.brand"
build_system_prop "ro.product.vendor.device"
build_system_prop "ro.product.vendor.manufacturer"
build_system_prop "ro.product.vendor.model"
build_system_prop "ro.product.vendor.name"
build_system_prop "ro.vendor.build.date"
build_system_prop "ro.vendor.build.date.utc"
build_system_prop "ro.vendor.build.fingerprint"
build_system_prop "ro.vendor.build.id"
build_system_prop "ro.vendor.build.tags"
build_system_prop "ro.vendor.build.type"
build_system_prop "ro.vendor.build.version.incremental"
build_system_prop "ro.vendor.build.version.release"
build_system_prop "ro.vendor.build.version.release_or_codename"
build_system_prop "ro.vendor.build.version.sdk"
to_system_prop "# end common build properties
# begin PRODUCT_VENDOR_PROPERTIES"
# add_prop_as_ini to_system_prop "ro.hardware" "$(grep_prop "ro.product.vendor.device" "$EXT_PROP_CONTENT")"
# build_system_prop "ro.hardware.egl"
# build_system_prop "ro.hardware.vulkan"
build_system_prop "ro.soc.model"
build_system_prop "ro.soc.manufacturer"
to_system_prop "# end PRODUCT_VENDOR_PROPERTIES
# begin ADDITIONAL_VENDOR_PROPERTIES"
# build_system_prop "ro.product.board"
build_system_prop "ro.product.first_api_level"
build_system_prop "ro.vendor.build.security_patch"
# build_system_prop "ro.board.platform"
to_system_prop "# end ADDITIONAL_VENDOR_PROPERTIES
# begin PRODUCT_PROPERTY_OVERRIDES"
build_system_prop "debug.sf.enable_sdr_dimming"
build_system_prop "debug.sf.dim_in_gamma_in_enhanced_screenshots"
build_system_prop "persist.vendor.enable.thermal.genl"
build_system_prop "ro.incremental.enable"
to_system_prop "# end PRODUCT_PROPERTY_OVERRIDES
###
# end vendor/build.prop
###
###
#-#
###
###
# begin vendor/odm/etc/build.prop
###
# begin common build properties"
build_system_prop "ro.product.odm.brand"
build_system_prop "ro.product.odm.device"
build_system_prop "ro.product.odm.manufacturer"
build_system_prop "ro.product.odm.model"
build_system_prop "ro.product.odm.name"
build_system_prop "ro.odm.build.date"
build_system_prop "ro.odm.build.date.utc"
build_system_prop "ro.odm.build.fingerprint"
build_system_prop "ro.odm.build.id"
build_system_prop "ro.odm.build.tags"
build_system_prop "ro.odm.build.type"
build_system_prop "ro.odm.build.version.incremental"
build_system_prop "ro.odm.build.version.release"
build_system_prop "ro.odm.build.version.release_or_codename"
build_system_prop "ro.odm.build.version.sdk"
to_system_prop "# end common build properties
###
# end vendor/odm/etc/build.prop
###
###
#-#
###
###
# begin system/system/build.prop
###
# begin common build properties"
build_system_prop "ro.product.system.brand"
build_system_prop "ro.product.system.device"
build_system_prop "ro.product.system.manufacturer"
build_system_prop "ro.product.system.model"
build_system_prop "ro.product.system.name"
build_system_prop "ro.system.build.date"
build_system_prop "ro.system.build.date.utc"
build_system_prop "ro.system.build.fingerprint"
build_system_prop "ro.system.build.id"
build_system_prop "ro.system.build.tags"
build_system_prop "ro.system.build.type"
build_system_prop "ro.system.build.version.incremental"
build_system_prop "ro.system.build.version.release"
build_system_prop "ro.system.build.version.release_or_codename"
build_system_prop "ro.system.build.version.sdk"
to_system_prop "# end common build properties
# begin build properties"
build_system_prop "ro.build.date"
build_system_prop "ro.build.date.utc"
add_prop_as_ini to_system_prop "ro.build.fingerprint" "$(grep_prop "ro.system.build.fingerprint" "$EXT_PROP_CONTENT")"
build_system_prop "ro.build.id"
build_system_prop "ro.build.display.id"
build_system_prop "ro.build.type"
build_system_prop "ro.build.user"
build_system_prop "ro.build.host"
build_system_prop "ro.build.tags"
build_system_prop "ro.build.flavor"
build_system_prop "ro.build.product"
build_system_prop "ro.build.description"
build_system_prop "ro.build.version.incremental"
build_system_prop "ro.build.version.sdk"
build_system_prop "ro.build.version.release"
build_system_prop "ro.build.version.release_or_codename"
build_system_prop "ro.build.version.security_patch"
to_system_prop "# end build properties
# begin PRODUCT_SYSTEM_PROPERTIES"
build_system_prop "ro.hotword.detection_service_required"
to_system_prop "#end PRODUCT_SYSTEM_PROPERTIES
###
# end system/system/build.prop
###
###
#-#
###
###
# begin system_ext/etc/build.prop
###
# begin common build properties"
build_system_prop "ro.product.system_ext.brand"
build_system_prop "ro.product.system_ext.device"
build_system_prop "ro.product.system_ext.manufacturer"
build_system_prop "ro.product.system_ext.model"
build_system_prop "ro.product.system_ext.name"
build_system_prop "ro.system_ext.build.date"
build_system_prop "ro.system_ext.build.date.utc"
build_system_prop "ro.system_ext.build.fingerprint"
build_system_prop "ro.system_ext.build.id"
build_system_prop "ro.system_ext.build.tags"
build_system_prop "ro.system_ext.build.type"
build_system_prop "ro.system_ext.build.version.incremental"
build_system_prop "ro.system_ext.build.version.release"
build_system_prop "ro.system_ext.build.version.release_or_codename"
build_system_prop "ro.system_ext.build.version.sdk"
to_system_prop "# end common build properties
###
# end system_ext/etc/build.prop
###"
# Save the system.prop file
echo -n "${system_prop::-1}" >"$dir/system.prop"
###
# Module Props
###
device_name=$(grep_prop "ro.product.vendor.model" "$EXT_PROP_CONTENT")
device_build_description=$(grep_prop "ro.build.description" "$EXT_PROP_CONTENT")
device_code_name=$(grep_prop "ro.product.vendor.name" "$EXT_PROP_CONTENT")
device_build_security_patch=$(grep_prop "ro.vendor.build.security_patch" "$EXT_PROP_CONTENT")
device_build_fingerprint=$(grep_prop "ro.product.build.id" "$EXT_PROP_CONTENT")
device_build_id=$(grep_prop "ro.build.id" "$EXT_PROP_CONTENT")
device_codename=$(grep_prop "ro.product.vendor.name" "$EXT_PROP_CONTENT")
base_name="${device_codename}_$device_build_id"
add_prop_as_ini to_module_prop "id" "${device_code_name^}_Props"
add_prop_as_ini to_module_prop "name" "$device_name (${device_code_name^^}) Props"
add_prop_as_ini to_module_prop "version" "$device_build_security_patch"
add_prop_as_ini to_module_prop "versionCode" "$(echo "$device_build_security_patch" | tr -d - | cut -c3-)"
add_prop_as_ini to_module_prop "author" "Tesla"
add_prop_as_ini to_module_prop "description" "Spoof your device props to ${device_code_name^^} [$device_build_fingerprint] ($(date --date="$device_build_security_patch" +%b) $(date --date="$device_build_security_patch" +%Y))"
add_prop_as_ini to_module_prop "donate" "https://wannabe1337.page.link/4xK6"
add_prop_as_ini to_module_prop "support" "https://t.me/PixelProps"
# Save the module.prop file
echo -n "${module_prop::-1}" >"$dir/module.prop"
# Display information about prop
print_message "Built props for $device_name [$device_build_description]!" info
# Display saving location
print_message "Props saved to \"${dir}\"" debug