mobile-toolkit
Why should I care?
š Control Android & iOS devices: Capture screen, manage apps, simulate input, examine system logs etc.
ā”ļø Speed++ Are you an app developer or a tester? Boost your effectivity, discover new tools!
All features
š² Control Android and iOS devices or Emulators/Simulators using terminal commands
š Take screeshots, change device settings, gather app & device information
āļø Manage mobile applications ā install, restart, wipe data and much more
š Handle multiple devices effortlessly ā select from list or target all connected devices
ā³ Save your precious time ā stop doing repetitive tasks manually
š Automatic update ā get new features and fixes ASAP
Table of contents
š© Maybe you just want to skip to Installation?
š Do you want to share Feedback or Contribute?
š» Installation
Click here to reveal step by step guide ā
Note: This tool targets macOS for compatibility, but most interactions should work on any Unix system.
- Open terminal
-
Clone this repository
git clone https://github.com/IntergalacticPenguin/mobile-toolkit.git
-
Setup Android tools
- Download and install Android Studio and Android command line tools (using Android Studio SDK manager)
-
Edit .zshrc (or .bash_profile if you have bash shell)
open -e ~/.zshrc
-
Insert this line at the end
PATH=$PATH:/Users/dummyuser/Library/Android/sdk/platform-tools export PATH
- Don’t forget to replace “dummyuser” with your account username
- Use full path to the “platform-tools” directory
-
Insert this line at the end
<li> <strong><a rel="nofollow noopener" target="_blank" href="https://developer.android.com/studio/debug/dev-options">Allow USB debugging</a> on your device, connect it and authorize your computer</strong> (click OK on the device screen) </li> </ul>
-
Setup iOS tools
- Install latest Xcode and iOS command line tools using App Store
- Install Homebrew package manager
- Run Xcode, connect iOS device to USB and authorize your computer (click “Trust” on the device screen)
-
Run any script i.e.
iscreenshot
, installation of all required tools will be initiated automatically (jq and go-ios)
-
Add Mobile Toolkit to $PATH, it is mandatory for iOS scripts and it will let you run scripts in any directory
-
Edit .zshrc (or .bash_profile if you have bash shell)
open -e ~/.zshrc
-
Insert the following lines at the end
PATH=$PATH:/Users/dummyuser/mobile-toolkit/android
PATH=$PATH:/Users/dummyuser/mobile-toolkit/ios
- Don’t forget to replace “dummyuser” with your account username
- Use full path to the “mobile-toolkit” directory (where you cloned this repository)
-
Add
export PATH
to the end of the file
-
Insert the following lines at the end
-
Edit .zshrc (or .bash_profile if you have bash shell)
š¤ Android Commands
Capture screen
šø ascreenshot
-
ascreenshot
Save screenshot to ~/Desktop -
ascreenshot -a
Take screenshot on all connected devices
š„ arecord
-
arecord
Record screen -
End recording using
ctrl + c
- Save screen video footage to ~/Desktop
-
arecord <custom-name>
Specify your own filename by passing it as argument
Control device
āļø apaste
apaste "john.doe@fakemail.com" password1 "5005 1002 3332 1112" "2/19" 5004
-
apaste <text>
Insert text into currently focused field -
apaste "john.doe@fakemail.com" password1
Every additional argument will be inserted into subsequent field -
apaste "This is sample multi-word text."
use “” to insert multi-word text into one field -
apaste -l
Insert “Lorem Ipsum paragraph” -
apaste -a <input-text>
Insert any text input (options displayed above) on all connected devices -
apaste -a -l
Insert “Lorem Ipsum paragraph” on all connected devices
š aurl
-
aurl "google.com"
Open link in web browser or corresponding application -
aurl -a "google.com"
Open link in web browser or corresponding application on all connected devices
š“ adarkmode
-
adarkmode
Toggle system dark mode
š atalkback
-
atalkback
Toggle TalkBack screen reader accessiblity option
š abounds
-
abounds
Toggle UI layout bounds - App restart may be necessary on lower APIs
š aanimationspeed
-
aanimationspeed
set slower animation speed or restore default -
aanimationspeed <speed>
set animation speed multiplier
š afontscale
-
afontscale
set large font scale (1.3x bigger than default) or restore default -
afontscale <scale>
set font scale multiplier
š¹ acontrol
-
acontrol
start scrcpy session - Provides realtime device screen mirroring and keyboard+mouse control
š· acamera
- Start the default camera application
ā”ļø awireless
- Enable or disable wireless ADB connection
- Use ADB and toolkit without having USB cable attached
Manage packages
š alaunch
-
alaunch
List third-party apps and choose one to run it -
alaunch -s
List all available apps (including os pre-installed) and choose one to run it -
alaunch com.dummy.package.name.app
Run app by package name
šµļø aappinfo
-
aappinfo
List foreground app information- Package name
- Version
- Last update
- minSdk and targetSdk
- Permissions
- (Optional) Open application settings
-
aappinfo com.dummy.package.name.app
Target specific app by passing package name as argument
šŖ akill
-
akill
Restart the foreground app -
akill com.dummy.package.name.app
Target specific app by passing package name as argument
š§½ aerase
-
aerase
Delete all local data of the foreground app and restart it -
aerase com.dummy.package.name.app
Target specific app by passing package name as argument
š ainstall
-
ainstall some-app-file.apk
Install and run .apk -
ainstall -a some-app-file.apk
Install and run .apk on all connected devices
š auninstall
-
auninstall
Uninstall third-party app, choose from the list -
auninstall com.dummy.package.name.app
pass package name as argument -
auninstall -w
Uninstall all-third party packages- Skips some essential apps, edit IGNORED_PACKAGES in this script to customize the list to your needs
š„ awipe
- Wipe internal storage and delete all third-party apps
š apermissionreset
-
Revoke ALL GRANTED runtime permissions for ALL apps
- You’ll have to handle permission requests upon opening almost any app
š agoogleplay
-
agoogleplay "Dummy App"
Search for “Dummy App” on Google Play -
agoogleplay
Search for currently foreground app on Google Play
š abuildproject
-
abuildproject
Build, install and run Android project located in current directory -
abuildproject <relative-path>
Build, install and run Android project located in
Manage device
āļø aoptions
-
aoptions
Open system settings on a specific activity -
You can choose from quick presets
- Developer settings
- Locale settings
- Date & time
- Wifi settings
- Storage management
- Power usage
- Root settings activity
-
aoptions A
Choose from exhaustive list of all available options -
aoptions 1,2,3... | dev | locale | date | wifi | storage | power
Use a preset, choose one
š alog
-
alog
Print system log output -
alog -f <package-name>
Filter log by package name
š acheckdevice
- Print genereal device information
-
Perform basic safety-checks and toggle “testing firendly” settings
- 10 minutes screen timeout
- Highest brightness
- Automatic date
- Disabled notification sounds
- Internet connectivity and WIFI name
- Font scale
- enUS locale
- (Optional) Search for the device on GSMArena
š aservices
- Print running background services
- Search for more information via Google
ā» areboot
- Reboot the device