fastbootd: Check for and run startup script if script exists
Signed-off-by: MD Raza <raza231198@gmail.com>
Change-Id: Id2eeb59ca9161a997b239e8b58619d197dcd2093
diff --git a/twrp.cpp b/twrp.cpp
index 4a7a337..564454a 100644
--- a/twrp.cpp
+++ b/twrp.cpp
@@ -122,6 +122,9 @@
#endif
gui_msg(Msg("fastboot_console_msg=Entered Fastboot mode..."));
+ // Check for and run startup script if script exists
+ TWFunc::check_and_run_script("/system/bin/runatboot.sh", "boot");
+ TWFunc::check_and_run_script("/system/bin/postfastboot.sh", "fastboot");
if (gui_startPage("fastboot", 1, 1) != 0) {
LOGERR("Failed to start fastbootd page.\n");
}