-
-
Notifications
You must be signed in to change notification settings - Fork 47
/
build_props.sh
413 lines (355 loc) · 15.7 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
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
#!/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
###
brand_for_attestation="$(grep_prop "ro.product.brand_for_attestation" "$EXT_PROP_CONTENT")"
[ -z "$brand_for_attestation" ] && brand_for_attestation="$(grep_prop "ro.product.vendor.brand" "$EXT_PROP_CONTENT")"
device_for_attestation="$(grep_prop "ro.product.device_for_attestation" "$EXT_PROP_CONTENT")"
[ -z "$device_for_attestation" ] && device_for_attestation="$(grep_prop "ro.product.vendor.device" "$EXT_PROP_CONTENT")"
manufacturer_for_attestation="$(grep_prop "ro.product.manufacturer_for_attestation" "$EXT_PROP_CONTENT")"
[ -z "$manufacturer_for_attestation" ] && manufacturer_for_attestation="$(grep_prop "ro.product.vendor.manufacturer" "$EXT_PROP_CONTENT")"
model_for_attestation="$(grep_prop "ro.product.model_for_attestation" "$EXT_PROP_CONTENT")"
[ -z "$model_for_attestation" ] && model_for_attestation="$(grep_prop "ro.product.vendor.model" "$EXT_PROP_CONTENT")"
name_for_attestation="$(grep_prop "ro.product.name_for_attestation" "$EXT_PROP_CONTENT")"
[ -z "$name_for_attestation" ] && name_for_attestation="$(grep_prop "ro.product.vendor.name" "$EXT_PROP_CONTENT")"
# 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" "$brand_for_attestation"
add_prop_as_ini to_system_prop "ro.product.device" "$device_for_attestation"
add_prop_as_ini to_system_prop "ro.product.manufacturer" "$manufacturer_for_attestation"
add_prop_as_ini to_system_prop "ro.product.model" "$model_for_attestation"
add_prop_as_ini to_system_prop "ro.product.name" "$name_for_attestation"
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.brand_for_attestation"
build_system_prop "ro.product.device_for_attestation"
build_system_prop "ro.product.manufacturer_for_attestation"
build_system_prop "ro.product.model_for_attestation"
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.opa.eligible_device"
build_system_prop "ro.com.google.clientidbase"
build_system_prop "ro.com.google.ime.theme_id"
build_system_prop "ro.com.google.ime.system_lm_dir"
build_system_prop "ro.support_one_handed_mode"
build_system_prop "ro.quick_start.oem_id"
build_system_prop "ro.quick_start.device_id"
to_system_prop "# end PRODUCT_PRODUCT_PROPERTIES
# begin PRODUCT_BOOTIMAGE_PROPERTIES"
add_prop_as_ini to_system_prop "ro.product.bootimage.brand" "$brand_for_attestation"
add_prop_as_ini to_system_prop "ro.product.bootimage.device" "$device_for_attestation"
add_prop_as_ini to_system_prop "ro.product.bootimage.manufacturer" "$manufacturer_for_attestation"
add_prop_as_ini to_system_prop "ro.product.bootimage.model" "$model_for_attestation"
add_prop_as_ini to_system_prop "ro.product.bootimage.name" "$name_for_attestation"
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"
build_system_prop "ro.soc.model"
build_system_prop "ro.soc.manufacturer"
# build_system_prop "ro.hardware.egl"
# build_system_prop "ro.hardware.vulkan"
to_system_prop "# end PRODUCT_VENDOR_PROPERTIES
# begin ADDITIONAL_VENDOR_PROPERTIES"
build_system_prop "ro.product.first_api_level"
build_system_prop "ro.vendor.build.security_patch"
# build_system_prop "ro.product.board"
# build_system_prop "ro.board.platform"
# add_prop_as_ini to_system_prop "ro.hardware" "$device_for_attestation"
to_system_prop "# end ADDITIONAL_VENDOR_PROPERTIES
# begin PRODUCT_PROPERTY_OVERRIDES"
build_system_prop "keyguard.no_require_sim"
build_system_prop "debug.sf.enable_sdr_dimming"
build_system_prop "debug.sf.dim_in_gamma_in_enhanced_screenshots"
build_system_prop "ro.hardware.keystore_desede"
build_system_prop "ro.hardware.keystore"
build_system_prop "ro.hardware.gatekeeper"
build_system_prop "persist.vendor.enable.thermal.genl"
build_system_prop "ro.incremental.enable"
build_system_prop "ro.build.device_family"
add_prop_as_ini to_system_prop "vendor.usb.product_string" "$model_for_attestation"
# add_prop_as_ini to_system_prop "bluetooth.device.default_name" "$model_for_attestation"
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 vendor/odm_dlkm/etc/build.prop
###
# begin common build properties"
build_system_prop "ro.product.odm_dlkm.brand"
build_system_prop "ro.product.odm_dlkm.device"
build_system_prop "ro.product.odm_dlkm.manufacturer"
build_system_prop "ro.product.odm_dlkm.model"
build_system_prop "ro.product.odm_dlkm.name"
build_system_prop "ro.odm_dlkm.build.date"
build_system_prop "ro.odm_dlkm.build.date.utc"
build_system_prop "ro.odm_dlkm.build.fingerprint"
build_system_prop "ro.odm_dlkm.build.id"
build_system_prop "ro.odm_dlkm.build.tags"
build_system_prop "ro.odm_dlkm.build.type"
build_system_prop "ro.odm_dlkm.build.version.incremental"
build_system_prop "ro.odm_dlkm.build.version.release"
build_system_prop "ro.odm_dlkm.build.version.release_or_codename"
build_system_prop "ro.odm_dlkm.build.version.sdk"
to_system_prop "# end common build properties
###
# end vendor/odm_dlkm/etc/build.prop
###
###
#-#
###
###
# begin vendor_dlkm/etc/build.prop
###
# begin common build properties"
build_system_prop "ro.product.vendor_dlkm.brand"
build_system_prop "ro.product.vendor_dlkm.device"
build_system_prop "ro.product.vendor_dlkm.manufacturer"
build_system_prop "ro.product.vendor_dlkm.model"
build_system_prop "ro.product.vendor_dlkm.name"
build_system_prop "ro.vendor_dlkm.build.date"
build_system_prop "ro.vendor_dlkm.build.date.utc"
build_system_prop "ro.vendor_dlkm.build.fingerprint"
build_system_prop "ro.vendor_dlkm.build.id"
build_system_prop "ro.vendor_dlkm.build.tags"
build_system_prop "ro.vendor_dlkm.build.type"
build_system_prop "ro.vendor_dlkm.build.version.incremental"
build_system_prop "ro.vendor_dlkm.build.version.release"
build_system_prop "ro.vendor_dlkm.build.version.release_or_codename"
build_system_prop "ro.vendor_dlkm.build.version.sdk"
to_system_prop "# end common build properties
###
# end vendor_dlkm/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"
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.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"
build_system_prop "ro.build.date"
build_system_prop "ro.build.date.utc"
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"
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
###
###
# begin system_dlkm/etc/build.prop
###
# begin common build properties"
build_system_prop "ro.product.system_dlkm.brand"
build_system_prop "ro.product.system_dlkm.device"
build_system_prop "ro.product.system_dlkm.manufacturer"
build_system_prop "ro.product.system_dlkm.model"
build_system_prop "ro.product.system_dlkm.name"
build_system_prop "ro.system_dlkm.build.date"
build_system_prop "ro.system_dlkm.build.date.utc"
build_system_prop "ro.system_dlkm.build.fingerprint"
build_system_prop "ro.system_dlkm.build.id"
build_system_prop "ro.system_dlkm.build.tags"
build_system_prop "ro.system_dlkm.build.type"
build_system_prop "ro.system_dlkm.build.version.incremental"
build_system_prop "ro.system_dlkm.build.version.release"
build_system_prop "ro.system_dlkm.build.version.release_or_codename"
build_system_prop "ro.system_dlkm.build.version.sdk"
to_system_prop "# end common build properties
###
# end system_dlkm/etc/build.prop
###
###
# begin of custom props
###
# begin common build properties"
add_prop_as_ini to_system_prop "ro.product.marketname" "$model_for_attestation"
add_prop_as_ini to_system_prop "ro.boot.hwname" "$device_for_attestation"
add_prop_as_ini to_system_prop "ro.product.hardware.sku" "$device_for_attestation"
add_prop_as_ini to_system_prop "ro.custom.device" "$device_for_attestation"
to_system_prop "# end common build properties
###
# end of custom props
###"
# Save the system.prop file
echo -n "${system_prop::-1}" >"$dir/system.prop"
###
# Module Props
###
device_name=$model_for_attestation
device_build_description=$(grep_prop "ro.build.description" "$EXT_PROP_CONTENT")
device_code_name=$name_for_attestation
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=$name_for_attestation
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