androidopencore

Android display OpenCore logs


I am trying to display opencore logs. I have already tried the ff. but still logs are not showing in the logcat.

1. created pvlogger.txt in sdcard and still no use.
# echo 8 > /sdcard/pvlogger.txt
2. Edited the PV_LOG_INST_LEVEL from 0 to 5 in the pvlogger.h file but it causes the compilation to fail.
"/android_log_appender.h:75: error:" format not a string literal and no format argument"
So I have just commented out Line 75, although it compiled successfully, opencore logs are still not showing in the logcat.

Is there anyone who were able to display the opencore logs?

Thanks in advance.

artsylar


Solution

  • After trial and errors, I was finally able to show the OpenCore log messages! Here's what I did although I do not know yet if steps 4 and make options are needed.

    1. Added #define PV_LOG_INST_LEVEL 5 to \android\external\opencore\android\thread_init.cpp file.
    2. To solve the "/android_log_appender.h:75: error:" format not a string literal and no format argument" error, just edit \external\opencore\android\android_log_appender.h line 75 from LOGE(stringbuf) to LOGE("%s", stringbuf)
    3. compile the code.
      make ENABLE_PV_LOGGING=1
    4. create pvlogger.txt in sdcard.
      # echo 8 > /sdcard/pvlogger.txt