开发者

Android list process

I was wondering how can I check the last application executed by the user in Android Phone 开发者_运维问答(in terminal). I was checking with ps command but no timestamp is shown. What I want to get is the PID of the last application executed by the user.

Any suggestion?

Best regards


I would just use

adb logcat 

and check for the last user application which was executed (the pid is in the brackets). I doubt there's an more reliable way to retrieve this information as there might a lot of background process (own pid, own user) involved or running without connection to the last user process.


You should also note that for fetching such info you'll probably have to have a rooted phone

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜