Skip to content
This repository has been archived by the owner on Dec 27, 2023. It is now read-only.

Commit

Permalink
Reconfigure services about decryption.
Browse files Browse the repository at this point in the history
  • Loading branch information
cd-Crypton committed Dec 12, 2022
1 parent 586490a commit 1d9bbb5
Show file tree
Hide file tree
Showing 12 changed files with 60 additions and 47 deletions.
2 changes: 1 addition & 1 deletion recovery/root/init.recovery.microtrust.rc
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ service teei_daemon /vendor/bin/teei_daemon \
-t 09010000000000000000000000000000
user root
group root
setenv LD_LIBRARY_PATH /vendor/lib64:/vendor/lib:/system/lib64:/system/lib:/sbin
setenv LD_LIBRARY_PATH /vendor/thh/ta:/vendor/thh:/vendor
disabled
seclabel u:r:recovery:s0

Expand Down
78 changes: 33 additions & 45 deletions recovery/root/init.recovery.mt6853.rc
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,27 @@ on boot
setprop sys.usb.config adb

on property:ro.crypto.state=encrypted && property:ro.crypto.type=file
start keymaster-4-1-beanpod
start gatekeeper-1-0
install_keyring
start teei_daemon
setprop crypto.ready 1

on property:sys.listeners.registered=true && property:vendor.sys.listeners.registered=true
start teei_daemon
start keymaster-4-1-beanpo
start keymaster_attestation-1-1
start vendor.gatekeeper-1-0
start thh-2-0
start soter-1-0
start vendor.secure_element

on property:crypto.ready=1 && property:hwservicemanager.ready=true
on property:hwservicemanager.ready=true && property:crypto.ready=1
start teei_daemon

on property:sys.listeners.registered=true && property:vendor.sys.listeners.registered=true
start keymaster-4-1-beanpod
start gatekeeper-1-0
start keymaster-4-1-beanpo
start keymaster_attestation-1-1
start vendor.gatekeeper-1-0
start thh-2-0
start soter-1-0
start vendor.secure_element

service keystore_auth /system/bin/keystore_auth
oneshot
Expand All @@ -48,56 +56,36 @@ service keystore /system/bin/keystore /tmp/misc/keystore
seclabel u:r:recovery:s0

service keymaster-4-1-beanpod /system/bin/android.hardware.keymaster@4.1-service.beanpod
interface android.hardware.keymaster@4.0::IKeymasterDevice default
interface android.hardware.keymaster@4.1::IKeymasterDevice default
user root
group root drmrpc
setenv LD_LIBRARY_PATH /vendor/lib64:/vendor/lib:/system/lib64:/system/lib:/sbin
disabled
seclabel u:r:recovery:s0

service gatekeeper-1-0 /system/bin/android.hardware.gatekeeper@1.0-service
interface android.hardware.gatekeeper@1.0::IGatekeeper default
user root
group root
setenv LD_LIBRARY_PATH /vendor/lib64:/vendor/lib:/system/lib64:/system/lib:/sbin
disabled
seclabel u:r:recovery:s0

service keymaster_attestation-1-1 /vendor/bin/hw/vendor.mediatek.hardware.keymaster_attestation@1.1-service
user root
group root
setenv LD_LIBRARY_PATH /vendor/lib64:/vendor/lib:/system/lib64:/system/lib:/sbin
disabled
seclabel u:r:recovery:s0

service thh-2-0 /vendor/bin/hw/vendor.microtrust.hardware.thh@2.0-service
user root
group root
setenv LD_LIBRARY_PATH /vendor/lib64:/vendor/lib:/system/lib64:/system/lib:/sbin
disabled
seclabel u:r:recovery:s0

on property:hwservicemanager.ready=true
start keymaster-4-1-beanpod
start gatekeeper-1-0
start keymaster_attestation-1-1
start thh-2-0

on property:ro.crypto.state=unsupported
on property:enable.fbe.service=0
stop teei_daemon
stop keymaster-4-1-beanpod
stop gatekeeper-1-0
stop servicemanager
stop hwservicemanager

on property:ro.crypto.state=unencrypted
stop teei_daemon
stop keymaster-4-1-beanpod
stop gatekeeper-1-0
stop servicemanager
stop hwservicemanager

on property:twrp.decrypt.done=true
stop keymaster-4-1-beanpo
stop keymaster_attestation-1-1
stop vendor.gatekeeper-1-0
stop thh-2-0
stop soter-1-0
stop vendor.secure_element

on property:twrp.all.users.decrypted=true
stop teei_daemon
stop keymaster-4-1-beanpod
stop gatekeeper-1-0
stop servicemanager
stop hwservicemanager
stop keymaster-4-1-beanpo
stop keymaster_attestation-1-1
stop vendor.gatekeeper-1-0
stop thh-2-0
stop soter-1-0
stop vendor.secure_element
Binary file removed recovery/root/system/bin/keystore2
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
service vibrator-1-3 /system/bin/android.hardware.vibrator@1.3-service.mediatek
class hal
user root
group root
setenv LD_LIBRARY_PATH /vendor/lib64:/vendor/lib:/system/lib64:/system/lib:/sbin
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
service keymaster_attestation-1-1 /system/bin/vendor.mediatek.hardware.keymaster_attestation@1.1-service
interface vendor.mediatek.hardware.keymaster_attestation@1.0::IKeymasterDevice default
interface vendor.mediatek.hardware.keymaster_attestation@1.1::IKeymasterDevice default
user root
group root
setenv LD_LIBRARY_PATH /vendor/lib64:/vendor/lib:/system/lib64:/system/lib:/sbin
disabled
seclabel u:r:recovery:s0
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
service vendor.secure_element /system/bin/vendor.microtrust.hardware.se@1.0-service
user root
group root
setenv LD_LIBRARY_PATH /vendor/lib64:/vendor/lib:/system/lib64:/system/lib:/sbin
disabled
seclabel u:r:recovery:s0
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
service soter-1-0 /system/bin/vendor.microtrust.hardware.soter@1.0-service
user root
group root
setenv LD_LIBRARY_PATH /vendor/lib64:/vendor/lib:/system/lib64:/system/lib:/sbin
disabled
seclabel u:r:recovery:s0
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
service thh-2-0 /system/bin/vendor.microtrust.hardware.thh@2.0-service
user root
group root
setenv LD_LIBRARY_PATH /vendor/lib64:/vendor/lib:/system/lib64:/system/lib:/sbin
disabled
seclabel u:r:recovery:s0
Binary file not shown.
Binary file added recovery/root/vendor/lib64/secure_element-impl.so
Binary file not shown.

0 comments on commit 1d9bbb5

Please sign in to comment.