Skip to content

Commit 1b2cdb1

Browse files
freak07Gerrit Code Review
authored andcommitted
Merge "ime: update CPU_VARIANT to kryo" into android-8.1
2 parents ee5f959 + 740466e commit 1b2cdb1

8 files changed

Lines changed: 53 additions & 5606 deletions

File tree

BoardConfig.mk

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@ TARGET_ARCH := arm64
3030
TARGET_ARCH_VARIANT := armv8-a
3131
TARGET_CPU_ABI := arm64-v8a
3232
TARGET_CPU_ABI2 :=
33-
TARGET_CPU_VARIANT := generic
33+
TARGET_CPU_VARIANT := kryo
3434

3535
TARGET_2ND_ARCH := arm
3636
TARGET_2ND_ARCH_VARIANT := armv7-a-neon
3737
TARGET_2ND_CPU_ABI := armeabi-v7a
3838
TARGET_2ND_CPU_ABI2 := armeabi
39-
TARGET_2ND_CPU_VARIANT := cortex-a9
39+
TARGET_2ND_CPU_VARIANT := kryo
4040

4141
ENABLE_CPUSETS := true
4242
ENABLE_SCHEDBOOST := true
@@ -85,6 +85,7 @@ TW_BRIGHTNESS_PATH := "/sys/devices/platform/soc/a88000.i2c/i2c-0/0-002c/backlig
8585
TW_EXCLUDE_DEFAULT_USB_INIT := true
8686
TW_EXTRA_LANGUAGES := true
8787
TW_INCLUDE_NTFS_3G := true
88+
TW_INCLUDE_REPACKTOOLS := true
8889
TW_INPUT_BLACKLIST := "hbtp_vm"
8990
TW_HAS_DOWNLOAD_MODE := true
9091
TW_THEME := portrait_hdpi
@@ -95,7 +96,7 @@ TW_RECOVERY_ADDITIONAL_RELINK_FILES := $(OUT)/system/lib64/android.hardware.boot
9596
TARGET_RECOVERY_PIXEL_FORMAT := BGRA_8888
9697
TARGET_RECOVERY_QCOM_RTC_FIX := true
9798
TW_NO_SCREEN_BLANK := true
98-
TW_USE_TOOLBOX := true
99+
#TW_USE_TOOLBOX := true
99100

100101
# Custom Platform Version and Security Patch
101102
# TWRP Defaults

recovery/root/sbin/mounts.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/sbin/sh
22

33
# Remove /system bind mount
4-
umount $ANDROID_ROOT
4+
umount "$ANDROID_ROOT"
55
rm -f /system
66

77
# Symlink tzdata

recovery/root/sbin/patchlevel.sh

Lines changed: 27 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,24 @@ log_error()
2626
echo "E:$SCRIPTNAME:$1" >> "$LOGFILE"
2727
}
2828

29+
temp_mount()
30+
{
31+
mkdir "$1"
32+
if [ -d "$1" ]; then
33+
log_info "Temporary $2 folder created at $1."
34+
else
35+
log_error "Unable to create temporary $2 folder."
36+
finish_error
37+
fi
38+
mount -t ext4 -o ro "$3" "$1"
39+
if [ -n "$(ls -A "$1" 2>/dev/null)" ]; then
40+
log_info "$2 mounted at $1."
41+
else
42+
log_error "Unable to mount $2 to temporary folder."
43+
finish_error
44+
fi
45+
}
46+
2947
finish()
3048
{
3149
umount "$TEMPVEN"
@@ -57,36 +75,8 @@ fingerprint=$(getprop ro.build.fingerprint)
5775
product=$(getprop ro.build.product)
5876

5977
log_info "Running patchlevel pre-decrypt script for TWRP..."
60-
61-
mkdir "$TEMPVEN"
62-
if [ -d "$TEMPVEN" ]; then
63-
log_info "Temporary vendor folder created at $TEMPVEN."
64-
else
65-
log_error "Unable to create temporary vendor folder."
66-
finish_error
67-
fi
68-
mount -t ext4 -o ro "$venpath" "$TEMPVEN"
69-
if [ -n "$(ls -A "$TEMPVEN" 2>/dev/null)" ]; then
70-
log_info "Vendor mounted at $TEMPVEN."
71-
else
72-
log_error "Unable to mount vendor to temporary folder."
73-
finish_error
74-
fi
75-
76-
mkdir "$TEMPSYS"
77-
if [ -d "$TEMPSYS" ]; then
78-
log_info "Temporary system folder created at $TEMPSYS."
79-
else
80-
log_error "Unable to create temporary system folder."
81-
finish_error
82-
fi
83-
mount -t ext4 -o ro "$syspath" "$TEMPSYS"
84-
if [ -n "$(ls -A "$TEMPSYS" 2>/dev/null)" ]; then
85-
log_info "System mounted at $TEMPSYS."
86-
else
87-
log_error "Unable to mount system to temporary folder."
88-
finish_error
89-
fi
78+
temp_mount "$TEMPVEN" "vendor" "$venpath"
79+
temp_mount "$TEMPSYS" "system" "$syspath"
9080

9181
if [ -f "$TEMPSYS/$BUILDPROP" ]; then
9282
log_info "Build.prop exists! Setting system properties from build.prop"
@@ -95,14 +85,14 @@ if [ -f "$TEMPSYS/$BUILDPROP" ]; then
9585
osver=$(grep -i 'ro.build.version.release' "$TEMPSYS/$BUILDPROP" | cut -f2 -d'=' -s)
9686
if [ -n "$osver" ]; then
9787
resetprop ro.build.version.release "$osver"
98-
sed -i "s/ro.build.version.release=.*/ro.build.version.release="$osver"/g" "/$DEFAULTPROP" ;
88+
sed -i "s/ro.build.version.release=.*/ro.build.version.release=""$osver""/g" "/$DEFAULTPROP" ;
9989
log_info "New OS Version: $osver"
10090
fi
10191
log_info "Current security patch level: $patchlevel"
10292
patchlevel=$(grep -i 'ro.build.version.security_patch' "$TEMPSYS/$BUILDPROP" | cut -f2 -d'=' -s)
10393
if [ -n "$patchlevel" ]; then
10494
resetprop ro.build.version.security_patch "$patchlevel"
105-
sed -i "s/ro.build.version.security_patch=.*/ro.build.version.security_patch="$patchlevel"/g" "/$DEFAULTPROP" ;
95+
sed -i "s/ro.build.version.security_patch=.*/ro.build.version.security_patch=""$patchlevel""/g" "/$DEFAULTPROP" ;
10696
log_info "New security patch level: $patchlevel"
10797
fi
10898
# Set additional props from build.prop
@@ -111,21 +101,21 @@ if [ -f "$TEMPSYS/$BUILDPROP" ]; then
111101
device=$(grep -i 'ro.product.device' "$TEMPSYS/$BUILDPROP" | cut -f2 -d'=' -s)
112102
if [ -n "$device" ]; then
113103
resetprop ro.product.device "$device"
114-
sed -i "s/ro.product.device=.*/ro.product.device="$device"/g" "/$DEFAULTPROP" ;
104+
sed -i "s/ro.product.device=.*/ro.product.device=""$device""/g" "/$DEFAULTPROP" ;
115105
log_info "New device: $device"
116106
fi
117107
log_info "Current fingerprint: $fingerprint"
118108
fingerprint=$(grep -i 'ro.build.fingerprint' "$TEMPSYS/$BUILDPROP" | cut -f2 -d'=' -s)
119109
if [ -n "$fingerprint" ]; then
120110
resetprop ro.build.fingerprint "$fingerprint"
121-
sed -i "s/ro.build.fingerprint=.*/ro.build.fingerprint="$fingerprint"/g" "/$DEFAULTPROP" ;
111+
sed -i "s/ro.build.fingerprint=.*/ro.build.fingerprint=""$fingerprint""/g" "/$DEFAULTPROP" ;
122112
log_info "New fingerprint: $fingerprint"
123113
fi
124114
log_info "Current product: $product"
125115
product=$(grep -i 'ro.build.product' "$TEMPSYS/$BUILDPROP" | cut -f2 -d'=' -s)
126116
if [ -n "$product" ]; then
127117
resetprop ro.build.product "$product"
128-
sed -i "s/ro.build.product=.*/ro.build.product="$product"/g" "/$DEFAULTPROP" ;
118+
sed -i "s/ro.build.product=.*/ro.build.product=""$product""/g" "/$DEFAULTPROP" ;
129119
log_info "New product: $product"
130120
fi
131121
# Load Tuxera exfat module
@@ -142,7 +132,7 @@ else
142132
log_info "Setting OS Version to $osver_orig"
143133
osver=$osver_orig
144134
resetprop ro.build.version.release "$osver"
145-
sed -i "s/ro.build.version.release=.*/ro.build.version.release="$osver"/g" "/$DEFAULTPROP" ;
135+
sed -i "s/ro.build.version.release=.*/ro.build.version.release=""$osver""/g" "/$DEFAULTPROP" ;
146136
else
147137
log_info "No Original OS Version found. Proceeding with existing value."
148138
log_info "Current OS version: $osver"
@@ -153,7 +143,7 @@ else
153143
log_info "Setting security patch level to $patchlevel_orig"
154144
patchlevel=$patchlevel_orig
155145
resetprop ro.build.version.security_patch "$patchlevel"
156-
sed -i "s/ro.build.version.security_patch=.*/ro.build.version.security_patch="$patchlevel"/g" "/$DEFAULTPROP" ;
146+
sed -i "s/ro.build.version.security_patch=.*/ro.build.version.security_patch=""$patchlevel""/g" "/$DEFAULTPROP" ;
157147
else
158148
log_info "No Original security patch level found. Proceeding with existing value."
159149
log_info "Current security patch level: $patchlevel"

recovery/root/sbin/runatboot.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ log_info "CID Found: $bootcid"
5757
case $bootmid in
5858
"2Q5510000")
5959
## EMEA/Aisa TW/RUS/SEA India Dual-SIM ##
60-
if [ $hardware == 'htc_exo' ]; then
60+
if [ "$hardware" = 'htc_exo' ]; then
6161
update_product_device "htc_exodugl";
6262
update_model "EXODUS 1";
6363
else
@@ -67,7 +67,7 @@ case $bootmid in
6767
;;
6868
"2Q5520000")
6969
## EMEA/US Unlocked, Single-SIM ##
70-
if [ $hardware == 'htc_exo' ]; then
70+
if [ "$hardware" = 'htc_exo' ]; then
7171
update_product_device "htc_exouhl";
7272
update_model "EXODUS 1";
7373
else
@@ -77,7 +77,7 @@ case $bootmid in
7777
;;
7878
"2Q5530000")
7979
## CHINA, Dual-SIM ##
80-
if [ $hardware == 'htc_exo' ]; then
80+
if [ "$hardware" = 'htc_exo' ]; then
8181
update_product_device "htc_exodtwl";
8282
update_model "EXODUS 1";
8383
else
@@ -87,7 +87,7 @@ case $bootmid in
8787
;;
8888
*)
8989
log_error "MID device parameters unknown. Setting default values."
90-
if [ $hardware == 'htc_exo' ]; then
90+
if [ "$hardware" = 'htc_exo' ]; then
9191
update_product_device "htc_exodugl";
9292
update_model "EXODUS 1";
9393
else

0 commit comments

Comments
 (0)