Android: How to strace an app using ADB shell am start

后端 未结 7 1239
予麋鹿
予麋鹿 2020-12-13 11:37

I need help on stracing Android apps in the SDK emulator.

Here is my setup:

I have an Android SDK emulator running the Android API 4.03 ADB shell connected t

7条回答
  •  鱼传尺愫
    2020-12-13 12:06

    Here's a one-liner that grabs the process id and pipes it to strace right after am launches the app. You won't get the first few instructions executed, but it kicks in early enough for my needs.

    am start -n com.packagename.here\.ActivityName && set `ps | grep com.packagename.here` && strace -p $2

提交回复
热议问题