-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmove_keymint.sh
More file actions
executable file
·22 lines (22 loc) · 876 Bytes
/
Copy pathmove_keymint.sh
File metadata and controls
executable file
·22 lines (22 loc) · 876 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash
move_keymint() {
if [ ! -f keymint/android.hardware.gatekeeper-service.trusty ] || [ ! -f keymint/android.hardware.keymaster@4.0-service.rc ] || [ ! -f keymint/android.hardware.gatekeeper-service.trusty ]; then
echo "Files missing!"
exit 255
fi
for i in android.hardware.gatekeeper-service.trusty android.hardware.keymaster@4.0-service.rc android.hardware.security.keymint-service.rc; do
if [ $i = "android.hardware.gatekeeper-service.trusty" ]; then
cp $i comet/vendor/bin/hw
elif [ $i = "android.hardware.keymaster@4.0-service.rc" ] || [ $i = "android.hardware.security.keymint-service.rc" ]; then
cp $i comet/vendor/init
else
echo "Error copying files!"
exit 255
fi
done
echo "Files copied!"
}
# If the script is not sourced from the main script still can be executed as an individual file
if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
move_keymint
fi