pmt: Improvements for developers

- Android.bp was written to be included in ROMs/recoveries etc. in Android build system.
 - Macros have been added to simplify feature creation.
 - Some bug fixes (for JSON and pmt).
This commit is contained in:
2025-08-27 15:50:40 +03:00
parent 631c735a9a
commit e0f0b5b484
18 changed files with 200 additions and 109 deletions

View File

@@ -58,10 +58,18 @@ Logger::~Logger() {
fd != -1)
close(fd);
else {
#ifdef ANDROID_BUILD
LoggingProperties::setLogFile("/tmp/last_pmt_logs.log")
#else
LoggingProperties::setLogFile("last_logs.log");
#endif
LOGN(HELPER, INFO) << "Cannot create log file: " << _logFile << ": "
<< strerror(errno)
#ifdef ANDROID_BUILD
<< " New logging file: /tmp/last_pmt_logs.log (this file)."
#else
<< " New logging file: last_logs.log (this file)."
#endif
<< std::endl;
}
}

View File

@@ -19,7 +19,12 @@
#include <ctime>
#include <cutils/android_reboot.h>
#include <fcntl.h>
#ifndef ANDROID_BUILD
#include <generated/buildInfo.hpp>
#include <sys/_system_properties.h>
#else
#include <sys/system_properties.h>
#endif
#include <iostream>
#include <libgen.h>
#include <libhelper/lib.hpp>