diff options
author | José Fonseca <jose.r.fonseca@gmail.com> | 2013-04-11 22:49:35 +0100 |
---|---|---|
committer | José Fonseca <jose.r.fonseca@gmail.com> | 2013-04-11 22:50:53 +0100 |
commit | 646cb5061d6d7383fe8857facd3bd1a8723e5fc4 (patch) | |
tree | 708a2ceb78efac884e256f24329b17c591f5feec | |
parent | 644352f611d0a09018e762b10e07d0e153430116 (diff) |
Rename Android.markdown to Dalvik.markdown.
As README still contains Android information.
Minor tweaks.
-rw-r--r-- | Dalvik.markdown (renamed from Android.markdown) | 30 | ||||
-rw-r--r-- | README.markdown | 2 |
2 files changed, 16 insertions, 16 deletions
diff --git a/Android.markdown b/Dalvik.markdown index 0cbf4de4..add48607 100644 --- a/Android.markdown +++ b/Dalvik.markdown @@ -1,14 +1,14 @@ Tracing Dalvik VM (Java) applications on Android ================================================ -Android's Java machine, DalvikVM, runs as a system service (started at bootup -by `init`) and Java applications are run by forks of the initial resident -process. Thus, injecting apitrace's tracing library is different from other -operating systems. +Android's Java virtual machine, Dalvik, runs as a system service (started at +bootup by `init`) and Java applications are run by forks of the initial +resident process. Thus, injecting apitrace's tracing library is different from +other operating systems. The following discussion assumes that tracing library is copied to '/data': - adb push /path/to/apitrace/build/wrappers/egltrace.so /data + adb push /path/to/apitrace/build/wrappers/egltrace.so /data Tracing on Android 4.0 and newer -------------------------------- @@ -20,9 +20,9 @@ started with 'system()' library call for that process. Obtain the process name of the application to be traced (the one reported in `ps` output, such as `com.android.settings`), and set two system properties: - PROCNAME=com.android.settings - adb shell setprop wrap.$PROCNAME LD_PRELOAD=/data/egltrace.so - adb shell setprop debug.apitrace.procname $PROCNAME + PROCNAME=com.android.settings + adb shell setprop wrap.$PROCNAME LD_PRELOAD=/data/egltrace.so + adb shell setprop debug.apitrace.procname $PROCNAME (the former is read by Dalvik and specifies wrapping prefix, the latter is read by apitrace itself and used in case apitrace is preloaded into Java VM @@ -31,13 +31,13 @@ globally to specify which process should be traced). Make sure the process is not loaded before starting to trace it, for example use `-S` flag to `am start`: - adb shell am start -S $PROCNAME + adb shell am start -S $PROCNAME Use `adb logcat \*:S apitrace` to examine apitrace debug output. Trace files are saved into '/data/' directory by default: - adb pull /data/$PROCNAME.trace - adb shell rm /data/$PROCNAME.trace + adb pull /data/$PROCNAME.trace + adb shell rm /data/$PROCNAME.trace (you need to `chmod 0777 /data` beforehand). @@ -60,10 +60,10 @@ the service with modified environment. Put `adjust-child-env` and a script with the following contents into `/data`: - stop zygote - /data/adjust-child-env 1 /system/bin/app_process LD_PRELOAD=/data/egltrace.so & - sleep 1 - start zygote + stop zygote + /data/adjust-child-env 1 /system/bin/app_process LD_PRELOAD=/data/egltrace.so & + sleep 1 + start zygote The scripts restarts the Java VM ('zygote') with modified environment. diff --git a/README.markdown b/README.markdown index eeaaee78..d7e0d534 100644 --- a/README.markdown +++ b/README.markdown @@ -153,7 +153,7 @@ To trace the application inside gdb, invoke gdb as: To trace standalone native OpenGL ES applications, use `LD_PRELOAD=/path/to/egltrace.so /path/to/application` like described in the -previous section. To trace Java applications, refer to Android.markdown. +previous section. To trace Java applications, refer to Dalvik.markdown. ### Mac OS X ### |