From 71a33a59fe2c36c092effb35aceb2ba7930cf90b Mon Sep 17 00:00:00 2001 From: Jose Fonseca Date: Thu, 7 Jan 2016 16:11:38 +0000 Subject: docs: Rename Dalvik -> Android. As it seems Dalvik use has been discontinued. [ci skip] --- docs/Android.markdown | 45 +++++++++++++++++++++++++++++++++++++++++++++ docs/Dalvik.markdown | 45 --------------------------------------------- docs/NEWS.markdown | 2 +- docs/USAGE.markdown | 2 +- 4 files changed, 47 insertions(+), 47 deletions(-) create mode 100644 docs/Android.markdown delete mode 100644 docs/Dalvik.markdown (limited to 'docs') diff --git a/docs/Android.markdown b/docs/Android.markdown new file mode 100644 index 00000000..23064b83 --- /dev/null +++ b/docs/Android.markdown @@ -0,0 +1,45 @@ +# Tracing Java applications on Android # + +Android's Java virtual machine, 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/libs/[arch]/egltrace.so /data + + +## Tracing on Android 4.0 and newer ## + +Starting from Android 4.0 (Ice Cream Sandwich) release, the system supports +running designated processes with wrappers, in which case a new Java VM is +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 root + adb shell ln -s /data/data/apitrace.github.io.eglretrace/libgnustl.so /data/libgnustl.so + adb shell setprop wrap.$PROCNAME LD_PRELOAD="/data/libgnustl_shared.so:/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 +globally to specify which process should be traced). Elevating privileges +via `adb root` is required to set the first property. + +If the `wrap.$PROCNAME` property name is longer than 31 characters [you'll need +to truncate it](https://github.com/apitrace/apitrace/issues/296). + +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 + +Use `adb logcat \*:S apitrace` to examine apitrace debug output. Trace files +are saved into `/data/data/$PROCNAME` directory by default: + + adb pull /data/data/$PROCNAME/$PROCNAME.trace + adb shell rm /data/data/$PROCNAME/$PROCNAME.trace diff --git a/docs/Dalvik.markdown b/docs/Dalvik.markdown deleted file mode 100644 index 6f3bb244..00000000 --- a/docs/Dalvik.markdown +++ /dev/null @@ -1,45 +0,0 @@ -# Tracing Dalvik VM (Java) applications on Android # - -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/libs/[arch]/egltrace.so /data - - -## Tracing on Android 4.0 and newer ## - -Starting from Android 4.0 (Ice Cream Sandwich) release, Dalvik supports -running designated processes with wrappers, in which case a new Java VM is -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 root - adb shell ln -s /data/data/apitrace.github.io.eglretrace/libgnustl.so /data/libgnustl.so - adb shell setprop wrap.$PROCNAME LD_PRELOAD="/data/libgnustl_shared.so:/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 -globally to specify which process should be traced). Elevating privileges -via `adb root` is required to set the first property. - -If the `wrap.$PROCNAME` property name is longer than 31 characters [you'll need -to truncate it](https://github.com/apitrace/apitrace/issues/296). - -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 - -Use `adb logcat \*:S apitrace` to examine apitrace debug output. Trace files -are saved into `/data/data/$PROCNAME` directory by default: - - adb pull /data/data/$PROCNAME/$PROCNAME.trace - adb shell rm /data/data/$PROCNAME/$PROCNAME.trace diff --git a/docs/NEWS.markdown b/docs/NEWS.markdown index 0eacda3c..003eb3d1 100644 --- a/docs/NEWS.markdown +++ b/docs/NEWS.markdown @@ -39,7 +39,7 @@ and their authors see the git history. # Version 4 # -* Support tracing in Android, both native and Dalvik applications +* Support tracing in Android, both native and Java applications * Show frame thumbnails in the GUI diff --git a/docs/USAGE.markdown b/docs/USAGE.markdown index eb4a8729..4edb6565 100644 --- a/docs/USAGE.markdown +++ b/docs/USAGE.markdown @@ -141,7 +141,7 @@ See the `ld.so` man page for more information about `LD_PRELOAD` and To trace standalone native OpenGL ES applications, use `LD_PRELOAD=/path/to/egltrace.so /path/to/application` as described in the -previous section. To trace Java applications, refer to Dalvik.markdown. +previous section. To trace Java applications, refer to Android.markdown. ### Mac OS X ### -- cgit v1.2.3