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
精彩评论