-
Notifications
You must be signed in to change notification settings - Fork 2
/
service.sh
32 lines (26 loc) · 1.05 KB
/
service.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
export MODPATH="/data/adb/modules/ezme-nodebug"
# Remove LineageOS props
# This should only confuse the OTA updater
resetprop --delete ro.lineage.build.version
resetprop --delete ro.lineage.build.version.plat.rev
resetprop --delete ro.lineage.build.version.plat.sdk
resetprop --delete ro.lineage.device
resetprop --delete ro.lineage.display.version
resetprop --delete ro.lineage.releasetype
resetprop --delete ro.lineage.version
resetprop --delete ro.lineagelegal.url
# Create a personalized system.prop
getprop | grep "userdebug" >> "$MODPATH/tmp.prop"
getprop | grep "test-keys" >> "$MODPATH/tmp.prop"
getprop | grep "lineage_" >> "$MODPATH/tmp.prop"
sed -i 's/\[//g' "$MODPATH/tmp.prop"
sed -i 's/\]//g' "$MODPATH/tmp.prop"
sed -i 's/: /=/g' "$MODPATH/tmp.prop"
sed -i 's/userdebug/user/g' "$MODPATH/tmp.prop"
sed -i 's/test-keys/release-keys/g' "$MODPATH/tmp.prop"
sed -i 's/lineage_//g' "$MODPATH/tmp.prop"
sort -u "$MODPATH/tmp.prop" > "$MODPATH/system.prop"
rm "$MODPATH/tmp.prop"
# Make sure we set those props
sleep 30
resetprop -n --file "$MODPATH/system.prop"