From 238a4fa658fc2d6dbc86412bda3c0cf237fa63dd Mon Sep 17 00:00:00 2001 From: Imre Deak Date: Fri, 30 Mar 2012 15:45:38 +0300 Subject: [PATCH] Android: hard code the trace file path to be under /data MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit On Android for Dalvik applications cwd is preset to that of the zygote (app_process) process and it's the root directory. Since root is r/o mounted by default it's more convenient to have the trace file in /data which is writeable at least by root by default. Signed-off-by: Imre Deak Signed-off-by: José Fonseca --- common/trace_writer_local.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/common/trace_writer_local.cpp b/common/trace_writer_local.cpp index a3ab720..5aeedac 100644 --- a/common/trace_writer_local.cpp +++ b/common/trace_writer_local.cpp @@ -89,7 +89,11 @@ LocalWriter::open(void) { #endif process.trimDirectory(); - os::String prefix = os::getCurrentDir(); +#ifdef ANDROID + os::String prefix = "/data"; +#else + os::String prefix = os::getCurrentDir(); +#endif prefix.join(process); for (;;) { -- 2.7.4