Search code examples
androideclipsedebuggingsd-cardtrace

Android - Eclipse: Trace Files


I have two issues--but first thing's first:
Dell Inspiron M5030: AMD Athlon II P360
Windows 7 Ultimate 32bit SP 1
Android ADT 21.0.1-543035
org.eclipse.platform.ide 3.8.0-I20120608-1200
EMULATOR:
4.0" WVGA (480x800:hdpi)
Android 4.2 (API 17)
armeabi-v7a
RAM:512, VM Heap:16
Internal Storage: 600MB
SDCard Size 128MB, Use Host GPU

In the onCreate of my activity i have these lines:

super.onCreate(savedInstanceState);
if (BuildConfig.DEBUG) {
        Log.i(Constants.TAG_ACTSPLASH, "onCreate() Method called.");
        Debug.startMethodTracing("actsplash");
}

In the onDestroy of my activity i have these lines:

super.onDestroy();
    if (BuildConfig.DEBUG) {
            Log.i(Constants.TAG_ACTSPLASH, "onDestroy()");
            Debug.stopMethodTracing();
    }

PROBLEM NUMBER ONE: In debug mode, after onCreate is called, Logcat says:

davlikvm: Unable to open trace file '/mnt/sdcard/actsplash.trace': Permission denied

NOTE: when running the apk on my Epic4G (Android 4.2) the trace file is created.

PROBLEM NUMBER TWO: The tracefile extracted from the Epic4G can't be processed. (1) When running traceview I get the error:

The standalone version of traceview is deprecated. Please use Android Device Monitor (tools/monitor) instead. trace file './actsplash.trace' not found

(2) When running ADM ('%SDK%/tools/monitor.bat') and loading the trace file i get:

Failed to read the stack trace.

This article says something about a key file...is that what's missing? Any help would be appreciated!


Solution

  • The problem seems to be with the 4.2 emulator; the 4.1 emulator processed the trace file and (unlike the 4.2 emulator) allowed me to pull the file and load it in ADM (Android Debug Monitor).