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
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.