diff options
Diffstat (limited to 'twrp-functions.cpp')
-rw-r--r-- | twrp-functions.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/twrp-functions.cpp b/twrp-functions.cpp index cbf473016..72674ae69 100644 --- a/twrp-functions.cpp +++ b/twrp-functions.cpp @@ -1070,4 +1070,14 @@ unsigned long long TWFunc::IOCTL_Get_Block_Size(const char* block_device) { return 0; } +void TWFunc::copy_kernel_log(string curr_storage) { + std::string dmesgDst = curr_storage + "/dmesg.log"; + std::string dmesgCmd = "/sbin/dmesg"; + + std::string result; + Exec_Cmd(dmesgCmd, result); + write_file(dmesgDst, result); + gui_msg(Msg("copy_kernel_log=Copied kernel log to {1}")(dmesgDst)); + tw_set_default_metadata(dmesgDst.c_str()); +} #endif // ndef BUILD_TWRPTAR_MAIN |