drozer icon indicating copy to clipboard operation
drozer copied to clipboard

Backgrounding of shells

Open metall0id opened this issue 12 years ago • 0 comments

Sometimes you would like to keep a specific shell instance but need to do something else quickly, especially after obtaining a privileged context.

If you could type background when inside a shell, then you should exit the shell prompt but not destroy it. When another shell is opened, a new shell is not made and the backgrounded one is used instead. This is because it is natural that when you obtain a privileged shell using some exploit that you want to keep this shell context. Or if you would like to place a binary that permanently allows you access to root on demand then you do the following workflow:

mercury> run exploit.root.whatever
# background
mercury> run tools.setup.minimalsu
[+] Uploaded minimal-su
[+] Uploaded install-minimal-su.sh
[+] chmod 770 /data/data/com.mwr.droidhg.agent/install-minimal-su.sh
[+] Ready! Execute /data/data/com.mwr.droidhg.agent/install-minimal-su.sh from root context to install minimal-su
mercury> run shell.start
# /data/data/com.mwr.droidhg.agent/install-minimal-su.sh
Done. You can now use `su` from a shell.
# exit
$ su
# exit
$ exit
mercury> 

The above workflow seems smooth in my mind but any suggestions/alterations are very welcome. You will see that the above workflow includes the changes from Issue #67 as well

metall0id avatar Apr 24 '13 08:04 metall0id