• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Keine Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

system/core


Commit MetaInfo

Revision444bcc573987248ec49fddfd624f05cdbf998de6 (tree)
Zeit2018-09-11 12:50:10
AutorEthan Yonker <dees_troy@team...>
CommiterSam Mortimer

Log Message

init: add install_keyring for TWRP FBE decrypt

Change-Id: Id7652763ec79bb8679aeb85793f1a748e0d67ff9

Ändern Zusammenfassung

Diff

--- a/init/builtins.cpp
+++ b/init/builtins.cpp
@@ -643,6 +643,16 @@ static int queue_fs_event(int code) {
643643 return ret;
644644 }
645645
646+static int do_install_keyring(const std::vector<std::string>& args) {
647+ if (e4crypt_install_keyring()) {
648+ ERROR("failed to install keyring\n");
649+ return -1;
650+ }
651+ property_set("ro.crypto.state", "encrypted");
652+ property_set("ro.crypto.type", "file");
653+ return 0;
654+}
655+
646656 /* mount_all <fstab> [ <path> ]* [--<options>]*
647657 *
648658 * This function might request a reboot, in which case it will
@@ -1185,6 +1195,7 @@ BuiltinFunctionMap::Map& BuiltinFunctionMap::map() const {
11851195 {"ifup", {1, 1, do_ifup}},
11861196 {"init_user0", {0, 0, do_init_user0}},
11871197 {"insmod", {1, kMax, do_insmod}},
1198+ {"install_keyring", {0, 0, do_install_keyring}},
11881199 {"installkey", {1, 1, do_installkey}},
11891200 {"load_persist_props", {0, 0, do_load_persist_props}},
11901201 {"load_system_props", {0, 0, do_load_system_props}},