@@ -50,10 +50,10 @@ TAB="`echo | tr '\n' '\t'`"
50
50
ESCAPE=" ` echo | tr ' \n' ' \033' ` "
51
51
# A _real_ embedded carriage return character
52
52
CR=" ` echo | tr ' \n' ' \r' ` "
53
- GREEN=" ${ESCAPE} [38;5;40m "
54
- RED=" ${ESCAPE} [38;5;196m "
55
- ORANGE =" ${ESCAPE} [38;5;255:165:0m "
56
- BLUE=" ${ESCAPE} [35m "
53
+ GREEN=" ${ESCAPE} [32m "
54
+ RED=" ${ESCAPE} [31m "
55
+ YELLOW =" ${ESCAPE} [33m "
56
+ BLUE=" ${ESCAPE} [34m "
57
57
NORMAL=" ${ESCAPE} [0m"
58
58
TMPDIR=${TMPDIR:-/ tmp}
59
59
print_time=false
@@ -164,7 +164,7 @@ avc_check() {
164
164
if [ -z " ${L} " ]; then
165
165
return
166
166
fi
167
- echo " ${ORANGE } [ WARNING ]${NORMAL} unlabeled sepolicy violations:" >&2
167
+ echo " ${YELLOW } [ WARNING ]${NORMAL} unlabeled sepolicy violations:" >&2
168
168
echo " ${L} " | sed " s/^/${INDENT} /" >&2
169
169
}
170
170
@@ -303,7 +303,7 @@ adb_wait() {
303
303
if [ 0 = ${ret} -a -n " ${ACTIVE_SLOT} " ]; then
304
304
local active_slot=` get_active_slot`
305
305
if [ X" ${ACTIVE_SLOT} " != X" ${active_slot} " ]; then
306
- echo " ${ORANGE } [ WARNING ]${NORMAL} Active slot changed from ${ACTIVE_SLOT} to ${active_slot} " >&2
306
+ echo " ${YELLOW } [ WARNING ]${NORMAL} Active slot changed from ${ACTIVE_SLOT} to ${active_slot} " >&2
307
307
fi
308
308
fi
309
309
local end=` date +%s`
@@ -406,7 +406,7 @@ fastboot_wait() {
406
406
if [ 0 = ${ret} -a -n " ${ACTIVE_SLOT} " ]; then
407
407
local active_slot=` get_active_slot`
408
408
if [ X" ${ACTIVE_SLOT} " != X" ${active_slot} " ]; then
409
- echo " ${ORANGE } [ WARNING ]${NORMAL} Active slot changed from ${ACTIVE_SLOT} to ${active_slot} "
409
+ echo " ${YELLOW } [ WARNING ]${NORMAL} Active slot changed from ${ACTIVE_SLOT} to ${active_slot} "
410
410
fi >&2
411
411
fi
412
412
return ${ret}
@@ -431,7 +431,7 @@ recovery_wait() {
431
431
if [ 0 = ${ret} -a -n " ${ACTIVE_SLOT} " ]; then
432
432
local active_slot=` get_active_slot`
433
433
if [ X" ${ACTIVE_SLOT} " != X" ${active_slot} " ]; then
434
- echo " ${ORANGE } [ WARNING ]${NORMAL} Active slot changed from ${ACTIVE_SLOT} to ${active_slot} "
434
+ echo " ${YELLOW } [ WARNING ]${NORMAL} Active slot changed from ${ACTIVE_SLOT} to ${active_slot} "
435
435
fi >&2
436
436
fi
437
437
return ${ret}
839
839
if ! ${color} ; then
840
840
GREEN=" "
841
841
RED=" "
842
- ORANGE =" "
842
+ YELLOW =" "
843
843
BLUE=" "
844
844
NORMAL=" "
845
845
fi
851
851
inFastboot && die " device in fastboot mode"
852
852
inRecovery && die " device in recovery mode"
853
853
if ! inAdb; then
854
- echo " ${ORANGE } [ WARNING ]${NORMAL} device not in adb mode" >&2
854
+ echo " ${YELLOW } [ WARNING ]${NORMAL} device not in adb mode" >&2
855
855
adb_wait ${ADB_WAIT}
856
856
fi
857
857
inAdb || die " specified device not in adb mode"
858
858
isDebuggable || die " device not a debug build"
859
859
enforcing=true
860
860
if ! adb_su getenforce < /dev/null | grep ' Enforcing' > /dev/null; then
861
- echo " ${ORANGE } [ WARNING ]${NORMAL} device does not have sepolicy in enforcing mode" >&2
861
+ echo " ${YELLOW } [ WARNING ]${NORMAL} device does not have sepolicy in enforcing mode" >&2
862
862
enforcing=false
863
863
fi
864
864
@@ -935,11 +935,11 @@ adb_sh ls -l /dev/block/by-name/ /dev/block/mapper/ </dev/null 2>/dev/null |
935
935
936
936
# If reboot too soon after fresh flash, could trip device update failure logic
937
937
if ${screen_wait} ; then
938
- echo " ${ORANGE } [ WARNING ]${NORMAL} waiting for screen to come up. Consider --no-wait-screen option" >&2
938
+ echo " ${YELLOW } [ WARNING ]${NORMAL} waiting for screen to come up. Consider --no-wait-screen option" >&2
939
939
fi
940
940
if ! wait_for_screen && ${screen_wait} ; then
941
941
screen_wait=false
942
- echo " ${ORANGE } [ WARNING ]${NORMAL} not healthy, no launcher, skipping wait for screen" >&2
942
+ echo " ${YELLOW } [ WARNING ]${NORMAL} not healthy, no launcher, skipping wait for screen" >&2
943
943
fi
944
944
945
945
# Can we test remount -R command?
988
988
adb_su remount -R system < /dev/null
989
989
err=${?}
990
990
if [ " ${err} " != 0 ]; then
991
- echo " ${ORANGE } [ WARNING ]${NORMAL} adb shell su root remount -R system = ${err} , likely did not reboot!" >&2
991
+ echo " ${YELLOW } [ WARNING ]${NORMAL} adb shell su root remount -R system = ${err} , likely did not reboot!" >&2
992
992
T=" -t ${T} "
993
993
else
994
994
# Rebooted, logcat will be meaningless, and last logcat will likely be clear
@@ -1014,7 +1014,7 @@ adb_sh ls -d /sys/module/overlay </dev/null >/dev/null 2>/dev/null ||
1014
1014
adb_sh grep " nodev${TAB} overlay" /proc/filesystems < /dev/null > /dev/null 2> /dev/null &&
1015
1015
echo " ${GREEN} [ OK ]${NORMAL} overlay module present" >&2 ||
1016
1016
(
1017
- echo " ${ORANGE } [ WARNING ]${NORMAL} overlay module not present" >&2 &&
1017
+ echo " ${YELLOW } [ WARNING ]${NORMAL} overlay module not present" >&2 &&
1018
1018
false
1019
1019
) ||
1020
1020
overlayfs_supported=false
@@ -1023,7 +1023,7 @@ if ${overlayfs_supported}; then
1023
1023
echo " ${GREEN} [ OK ]${NORMAL} overlay module supports override_creds" >&2 ||
1024
1024
case ` adb_sh uname -r < /dev/null` in
1025
1025
4.[456789].* | 4.[1-9][0-9]* | [56789].* )
1026
- echo " ${ORANGE } [ WARNING ]${NORMAL} overlay module does not support override_creds" >&2 &&
1026
+ echo " ${YELLOW } [ WARNING ]${NORMAL} overlay module does not support override_creds" >&2 &&
1027
1027
overlayfs_supported=false
1028
1028
;;
1029
1029
* )
@@ -1045,14 +1045,14 @@ echo "${GREEN}[ RUN ]${NORMAL} Checking current overlayfs status" >&2
1045
1045
reboot=false
1046
1046
for d in ${OVERLAYFS_BACKING} ; do
1047
1047
if adb_sh ls -d /${d} /overlay < /dev/null > /dev/null 2> /dev/null; then
1048
- echo " ${ORANGE } [ WARNING ]${NORMAL} /${d} /overlay is setup, surgically wiping" >&2
1048
+ echo " ${YELLOW } [ WARNING ]${NORMAL} /${d} /overlay is setup, surgically wiping" >&2
1049
1049
adb_sh rm -rf /${d} /overlay < /dev/null ||
1050
1050
die " /${d} /overlay wipe"
1051
1051
reboot=true
1052
1052
fi
1053
1053
done
1054
1054
if ${reboot} ; then
1055
- echo " ${ORANGE } [ WARNING ]${NORMAL} rebooting before test" >&2
1055
+ echo " ${YELLOW } [ WARNING ]${NORMAL} rebooting before test" >&2
1056
1056
adb_reboot &&
1057
1057
adb_wait ${ADB_WAIT} ||
1058
1058
die " lost device after reboot after wipe ` usb_status` "
@@ -1064,7 +1064,7 @@ D=`adb_sh df -k </dev/null` &&
1064
1064
D=` echo " ${D} " | grep -v " /vendor/..*$" | grep " ^overlay " ` &&
1065
1065
echo " ${H} " &&
1066
1066
echo " ${D} " &&
1067
- echo " ${ORANGE } [ WARNING ]${NORMAL} overlays present before setup" >&2 ||
1067
+ echo " ${YELLOW } [ WARNING ]${NORMAL} overlays present before setup" >&2 ||
1068
1068
echo " ${GREEN} [ OK ]${NORMAL} no overlay present before setup" >&2
1069
1069
overlayfs_needed=true
1070
1070
D=` adb_sh cat /proc/mounts < /dev/null |
@@ -1117,7 +1117,7 @@ rebooted=false
1117
1117
if [ X" ${D} " != X" ${H} " ]; then
1118
1118
echo " ${H} "
1119
1119
if [ X" ${D} " != X" ${D##* setup failed} " ]; then
1120
- echo " ${ORANGE } [ WARNING ]${NORMAL} overlayfs setup whined" >&2
1120
+ echo " ${YELLOW } [ WARNING ]${NORMAL} overlayfs setup whined" >&2
1121
1121
fi
1122
1122
D=` adb_sh df -k < /dev/null` &&
1123
1123
H=` echo " ${D} " | head -1` &&
@@ -1164,7 +1164,7 @@ if [ X"${D}" != X"${D##*Successfully disabled verity}" ]; then
1164
1164
elif ${rebooted} ; then
1165
1165
echo " ${GREEN} [ OK ]${NORMAL} verity already disabled" >&2
1166
1166
else
1167
- echo " ${ORANGE } [ WARNING ]${NORMAL} verity already disabled" >&2
1167
+ echo " ${YELLOW } [ WARNING ]${NORMAL} verity already disabled" >&2
1168
1168
fi
1169
1169
1170
1170
echo " ${GREEN} [ RUN ]${NORMAL} remount" >&2
@@ -1194,7 +1194,7 @@ if ${overlayfs_needed}; then
1194
1194
die -t ${T} " overlay takeover failed"
1195
1195
fi
1196
1196
echo " ${D} " | grep " ^overlay .* /system\$ " > /dev/null ||
1197
- echo " ${ORANGE } [ WARNING ]${NORMAL} overlay takeover not complete" >&2
1197
+ echo " ${YELLOW } [ WARNING ]${NORMAL} overlay takeover not complete" >&2
1198
1198
if [ -z " ${virtual_ab} " ]; then
1199
1199
scratch_partition=scratch
1200
1200
fi
@@ -1326,7 +1326,7 @@ echo "${GREEN}[ RUN ]${NORMAL} reboot to confirm content persistent" >&2
1326
1326
1327
1327
fixup_from_recovery () {
1328
1328
inRecovery || return 1
1329
- echo " ${ORANGE } [ ERROR ]${NORMAL} Device in recovery" >&2
1329
+ echo " ${YELLOW } [ ERROR ]${NORMAL} Device in recovery" >&2
1330
1330
adb reboot < /dev/null
1331
1331
adb_wait ${ADB_WAIT}
1332
1332
}
@@ -1346,7 +1346,7 @@ if ${overlayfs_needed}; then
1346
1346
adb_su sed -n ' 1,/overlay \/system/p' /proc/mounts < /dev/null |
1347
1347
skip_administrative_mounts |
1348
1348
grep -v ' \(erofs\|squashfs\|ext4\|f2fs\|vfat\) ' &&
1349
- echo " ${ORANGE } [ WARNING ]${NORMAL} overlay takeover after first stage init" >&2 ||
1349
+ echo " ${YELLOW } [ WARNING ]${NORMAL} overlay takeover after first stage init" >&2 ||
1350
1350
echo " ${GREEN} [ OK ]${NORMAL} overlay takeover in first stage init" >&2
1351
1351
fi
1352
1352
@@ -1407,20 +1407,20 @@ is_bootloader_fastboot=false
1407
1407
is_userspace_fastboot=false
1408
1408
1409
1409
if ! ${is_bootloader_fastboot} ; then
1410
- echo " ${ORANGE } [ WARNING ]${NORMAL} does not support fastboot, skipping"
1410
+ echo " ${YELLOW } [ WARNING ]${NORMAL} does not support fastboot, skipping"
1411
1411
elif [ -z " ${ANDROID_PRODUCT_OUT} " ]; then
1412
- echo " ${ORANGE } [ WARNING ]${NORMAL} build tree not setup, skipping"
1412
+ echo " ${YELLOW } [ WARNING ]${NORMAL} build tree not setup, skipping"
1413
1413
elif [ ! -s " ${ANDROID_PRODUCT_OUT} /vendor.img" ]; then
1414
- echo " ${ORANGE } [ WARNING ]${NORMAL} vendor image missing, skipping"
1414
+ echo " ${YELLOW } [ WARNING ]${NORMAL} vendor image missing, skipping"
1415
1415
elif [ " ${ANDROID_PRODUCT_OUT} " = " ${ANDROID_PRODUCT_OUT%*/ ${H} } " ]; then
1416
- echo " ${ORANGE } [ WARNING ]${NORMAL} wrong vendor image, skipping"
1416
+ echo " ${YELLOW } [ WARNING ]${NORMAL} wrong vendor image, skipping"
1417
1417
elif [ -z " ${ANDROID_HOST_OUT} " ]; then
1418
- echo " ${ORANGE } [ WARNING ]${NORMAL} please run lunch, skipping"
1418
+ echo " ${YELLOW } [ WARNING ]${NORMAL} please run lunch, skipping"
1419
1419
elif ! (
1420
1420
adb_cat /vendor/build.prop |
1421
1421
cmp -s ${ANDROID_PRODUCT_OUT} /vendor/build.prop
1422
1422
) > /dev/null 2> /dev/null; then
1423
- echo " ${ORANGE } [ WARNING ]${NORMAL} vendor image signature mismatch, skipping"
1423
+ echo " ${YELLOW } [ WARNING ]${NORMAL} vendor image signature mismatch, skipping"
1424
1424
else
1425
1425
wait_for_screen
1426
1426
avc_check
@@ -1466,7 +1466,7 @@ else
1466
1466
fi
1467
1467
fastboot reboot ||
1468
1468
die " can not reboot out of fastboot"
1469
- echo " ${ORANGE } [ WARNING ]${NORMAL} adb after fastboot"
1469
+ echo " ${YELLOW } [ WARNING ]${NORMAL} adb after fastboot"
1470
1470
adb_wait ${ADB_WAIT} ||
1471
1471
fixup_from_recovery ||
1472
1472
die " did not reboot after formatting ${scratch_partition} ` usb_status` "
@@ -1483,8 +1483,8 @@ else
1483
1483
if ${is_userspace_fastboot} ; then
1484
1484
die " overlay supposed to be minus /vendor takeover after flash vendor"
1485
1485
else
1486
- echo " ${ORANGE } [ WARNING ]${NORMAL} user fastboot missing required to invalidate, ignoring a failure" >&2
1487
- echo " ${ORANGE } [ WARNING ]${NORMAL} overlay supposed to be minus /vendor takeover after flash vendor" >&2
1486
+ echo " ${YELLOW } [ WARNING ]${NORMAL} user fastboot missing required to invalidate, ignoring a failure" >&2
1487
+ echo " ${YELLOW } [ WARNING ]${NORMAL} overlay supposed to be minus /vendor takeover after flash vendor" >&2
1488
1488
fi
1489
1489
fi
1490
1490
B=" ` adb_cat /system/hello` "
@@ -1502,7 +1502,7 @@ else
1502
1502
check_eq " cat: /vendor/hello: No such file or directory" " ${B} " \
1503
1503
vendor content after flash vendor
1504
1504
else
1505
- echo " ${ORANGE } [ WARNING ]${NORMAL} user fastboot missing required to invalidate, ignoring a failure" >&2
1505
+ echo " ${YELLOW } [ WARNING ]${NORMAL} user fastboot missing required to invalidate, ignoring a failure" >&2
1506
1506
check_eq " cat: /vendor/hello: No such file or directory" " ${B} " \
1507
1507
--warning vendor content after flash vendor
1508
1508
fi
@@ -1523,7 +1523,7 @@ err=${?}
1523
1523
L=
1524
1524
D=" ${H% ?Now reboot your device for settings to take effect* } "
1525
1525
if [ X" ${H} " != X" ${D} " ]; then
1526
- echo " ${ORANGE } [ WARNING ]${NORMAL} adb remount requires a reboot after partial flash (legacy avb)"
1526
+ echo " ${YELLOW } [ WARNING ]${NORMAL} adb remount requires a reboot after partial flash (legacy avb)"
1527
1527
L=` adb_logcat -b all -v nsec -t ${T} 2>&1 `
1528
1528
adb_reboot &&
1529
1529
adb_wait ${ADB_WAIT} &&
@@ -1581,7 +1581,7 @@ if ${is_bootloader_fastboot} && [ -n "${scratch_partition}" ]; then
1581
1581
err=${?}
1582
1582
if [ X" ${D} " != " ${D% ?Now reboot your device for settings to take effect* } " ]
1583
1583
then
1584
- echo " ${ORANGE } [ WARNING ]${NORMAL} adb disable-verity requires a reboot after partial flash"
1584
+ echo " ${YELLOW } [ WARNING ]${NORMAL} adb disable-verity requires a reboot after partial flash"
1585
1585
adb_reboot &&
1586
1586
adb_wait ${ADB_WAIT} &&
1587
1587
adb_root ||
@@ -1614,9 +1614,9 @@ fixup_from_fastboot() {
1614
1614
if [ -n " ${ACTIVE_SLOT} " ]; then
1615
1615
local active_slot=` get_active_slot`
1616
1616
if [ X" ${ACTIVE_SLOT} " != X" ${active_slot} " ]; then
1617
- echo " ${ORANGE } [ ERROR ]${NORMAL} Active slot changed from ${ACTIVE_SLOT} to ${active_slot} "
1617
+ echo " ${YELLOW } [ ERROR ]${NORMAL} Active slot changed from ${ACTIVE_SLOT} to ${active_slot} "
1618
1618
else
1619
- echo " ${ORANGE } [ ERROR ]${NORMAL} Active slot to be set to ${ACTIVE_SLOT} "
1619
+ echo " ${YELLOW } [ ERROR ]${NORMAL} Active slot to be set to ${ACTIVE_SLOT} "
1620
1620
fi >&2
1621
1621
fastboot --set-active=${ACTIVE_SLOT}
1622
1622
fi
0 commit comments