Terminal Emulator

From Android Open Pwn Project
Jump to: navigation, search

Terminal Emulator


With multiple one touch apps (or scripts) running in Terminal Emulator, it can get a little confusing. Luckily the window management of terminal emulator is very similar to Android's multitasking.

You can:

  • Change shells via the drop down at the top of the Terminal Emulator window
  • Swipe left/right to change between shells

Imagine having two scrips open: Notice there is only one terminal emulator window but two apps open. Tapping the app will bring you to the Terminal Emulator shell.

Two one touch apps open

You can change between shells easily inside Terminal emulator by selecting one from the drop down or by swiping left/right:

Terminal Emulator dropdown Next Step Swiped between terminal emulator pages

Using Wake and WiFi Locks

In order to prevent the OS from sleeping the radio / CPU to save battery life, Terminal Emulator gives the user the option to take both Wakelocks and Wifilocks. These basically tell the android framework "Hey, I am using the CPU and radio - don't put me to sleep".

This is especially useful when connecting to the device via SSH. On a device like the Nexus 7, taking these locks turns a laggy nearly unusable shell into a smooth responsive and reliable one. It is a good idea to take these locks for any important long running tasks / services you start on device.

Why is this a user option? Until we have a responsible and clean way to manage these locks for you programmatically, it will remain a user option. We will not set this as a default or attempt to take/drop them for you. Remember, these are battery powered devices - these locks affect battery life.


  1. Launch Terminal Emulator,Root Shell or any Pwnie one touch app
  2. Tap the three-dot options menu in the top right corner of Terminal Emulator
  3. Tap 'Take Wakelock'
  4. Repeat step 2 - then tap 'Take Wifilock'

Open options Next Step Tap Take Wakelock Next Step Tap Take Wifilock

To drop the locks repeat this process - the options should now say 'Drop Wakelock' and 'Drop Wifilock'

We suggest locking the orientation of your device (turning auto rotate off in the notification shade) as Terminal Emulator does not carry Wake or Wifi locks through orientation change (or any Android life cycle)

Closing Scripts in Terminal Emulator

Closing the Terminal Emulator app like any other android app (by swiping it closed) will not work. You will notice the Terminal Emulator icon remains in the status bar and you can still open it after closing it. This is intentional so that scrips can run in the background without getting killed. To correctly shut down terminal emulator you must first script that is running in the app with:

    VOL-DOWN + C

Next you can close Terminal Emulator by tapping the X in the top right:

Killing and closing a script

Closing a window without killing the script that was running in it may result in services/logs left in a running/non-cleaned up state.

Special Keys

In order to get full functionality of the shell on device you will probably want to use some special keys like tab, up arrow, etc. To accomplish this with the AOSP Keyboard you need to use special shortcuts. See the figure below. You can also find this reference on device inside the Terminal Emulator app's via the settings drop down > special keys:

Special keys

Alternatively you can install a third party keyboard. See: Recommended Apps.