mirror of
https://github.com/thead-yocto-mirror/meta-openembedded
synced 2026-09-16 12:12:16 +02:00
Note: the adbd makefile can't be upstreamed to debian, because there is already an open PR upstream: https://salsa.debian.org/android-tools-team/android-platform-tools/-/merge_requests/4/diffs Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
19 lines
613 B
Diff
19 lines
613 B
Diff
Description: Update log file directory.
|
|
Author: Umang Parmar <umangjparmar@gmail.com>
|
|
Last Updated: 2018-05-17
|
|
|
|
--- a/system/core/adb/adb_utils.cpp
|
|
+++ b/system/core/adb/adb_utils.cpp
|
|
@@ -339,6 +339,11 @@
|
|
|
|
return temp_path_utf8 + log_name;
|
|
#else
|
|
+ std::string log_dir = android::base::StringPrintf("/run/user/%u/adb.log", getuid());
|
|
+ struct stat st = {0};
|
|
+ if (stat(log_dir.c_str(), &st) == 0) {
|
|
+ return log_dir;
|
|
+ }
|
|
const char* tmp_dir = getenv("TMPDIR");
|
|
if (tmp_dir == nullptr) tmp_dir = "/tmp";
|
|
return android::base::StringPrintf("%s/adb.%u.log", tmp_dir, getuid());
|