What?
adb devices and explicit targeting using adb -s <device_id>
Android scripts
Installation
- Download Android Studio or Android command line tools
- Add the absolute path to the platform-tools folder to PATH variable in .bashrc (or equivalent file)
- Clone this repository
- (Recommended) Use following commands in any directory by adding the absolute path to the cloned files to PATH variable in .bashrc (or equivalent file)
Capture device screen
ascreenshot
- Save screenshot to ~/Desktop
- Filename includes device model, system API level and current time and date
- Specify your own filename by passing it as argument
amultiscreenshot
- Take screenshot on all connected devices
- Filename includes device model, system API level and current time and date
- Specify your own filename by passing it as argument
arecord
- Record screen
- End recording using
ctrl + c - Save screen video footage to ~/Desktop.
- Specify your own filename by passing it as argument
Device control
apaste
apaste "john.doe@fakemail.com" password1 "5005 1002 3332 1112" "2/19" 5004
- Insert text passed as argument into currently focused text field
- Surround argument with "" if you want to insert multi-word text into one field or use some non-alphanumeric characters
- Every following argument will move focus into the next field
- You can quickly fill some form etc
abounds
- Toggle layout bounds visibility, on lower APIs, app restart may be necessary
aweb
- Open link passed as argument in web browser
aoptions
- Open system settings app
aemulator
- Start any of your installed Android emulators
aloremipsum
- Insert long text into focused field
- Useful for testing layouts
Application control
alaunch
alaunch
alaunch com.dummy.package.name.app
- List third party apps and run the chosen one
- Specify package name by passing it as argument
akill
- Restart foreground app
aerase
- Delete foreground app data and restart it
ainstall
adb_install some-app-file.apk
- Install and run .apk file
- Can overwrite existing app
auninstall
- Uninstall third party app
- Choose from the list, or pass package name as argument
acleanup
- Uninstall all third party packages
- Skips some essential apps
- Edit this script yourself or submit issue to customize the list of essential apps
- (Optional) Remove everything in /sdcard/Download directory
agoogleplay
- Search for app on Google Play
- Pass app name as argument
Device information
alog
- Print system log output
acrash
- Print log output containing application crashes only
- Set how many crash surrounding lines to print using argument
adeviceinfo
- Print device information
iOS scripts
Installation
- Install latest Xcode and iOS command line tools to control your iOS devices using terminal
- Install libimobiledevice (required for iscreenshot) using brew or apt-get
brew install libimobiledevice - Install ffmpeg (required for irecord), using brew or apt-get
brew install ffmpeg - Install ideviceinstaller (required for application management), using brew or apt-get
brew install ideviceinstaller - Mount developer image on your device -> connect iOS device to USB and run Xcode
- Clone this repository
- (Recommended) Use following commands in any directory by adding absolute path to the cloned files to PATH variable in .bashrc (or equivalent file)
Capture device screen
iscreenshot
- Save screenshot to ~/Desktop
- Filename includes device model, system API level and current time and date
- Specify your own filename by passing it as argument
irecord
- Record screen (take as many screenshots per second as possible) to ~/Desktop
- End recording using
ctrl + c - Compose .mp4 from screenshots and save it to ~/Desktop
- (Optional) Delete screenshots
- Specify your own filename by passing it as argument
Device control
iinstall (experimental)
iinstall some-app-file.ipa
- Install .ipa file
- Can overwrite existing app