From: Imre Deak Date: Fri, 30 Mar 2012 12:45:38 +0000 (+0300) Subject: Android: hard code the trace file path to be under /data X-Git-Tag: 2.0_alpha^2~148 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=238a4fa658fc2d6dbc86412bda3c0cf237fa63dd;p=tools%2Fapitrace.git Android: hard code the trace file path to be under /data 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 --- 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 (;;) {