I want to log all the system calls of an Android app. When I run the command adb shell strace
I get /system/bin/sh: strace: not found
I am on windows 10 and I have installed the Android platform tools 28.0.1. I have tried to use the command make
on adb shell but it was not found.
Asked
Active
Viewed 1,241 times
-2

pfx
- 20,323
- 43
- 37
- 57
-
It has nothing to do with Windows. Android runs a limited version of linux, so not all linux commands can operate in Android. Google for "busybox"' it might help you. – TDG Sep 01 '18 at 19:14
-
@TDG the 'strace' command should run on Android https://source.android.com/devices/tech/debug/strace – francesco fornasieri Sep 02 '18 at 01:01
2 Answers
2
download strace from this site: http://benno.id.au/blog/2007/11/18/android-runtime-strace (click hyperlink "strace for Android")
type adb shell to enter in adb shell use /system/xbin/su -c "system/bin/sh -" (to get to root) then place the file in system/bin (downloaded from above link), while being in root. ps to see processes. run strace!
command: strace -p

Umar Zahid
- 27
- 5
0
in order to use the strace shell it is necessary to have a device with an x86 system image