Giter Club home page Giter Club logo

mobile-toolkit's Introduction

What?

๐Ÿ’ฅ Execute powerful mobile device control scripts using easy terminal commands

๐Ÿ›  Quick screen capturing, app management and much more

๐Ÿ“ฑ Useful for mobile application testing or clearing device memory

๐Ÿ“‹ Target specific device easily, no more id copying from adb devices and explicit using adb -s <device_id>

โณ Save your precious time

โ‰๏ธ Submit issue if you want to ask something or improve the scripts

๐Ÿค Feel free to contribute via pull request

โญ๏ธ If you love it, hit the star button at the top right corner

Installation

  1. Clone this repository git clone https://github.com/IntergalacticPenguin/mobile-toolkit.git
  2. Setup Android tools
    • Download and install Android Studio or Android command line tools
    • Add the absolute path to the platform-tools folder to PATH variable in .bash_profile PATH=$PATH:/Users/dummyuser/Library/Android/sdk/platform-tools export PATH
    • Allow USB debugging on your device, connect it and authorize your computer (click OK on device screen)
  3. Setup iOS tools
    • Install latest Xcode and iOS command line tools using App Store
    • Install Homebrew package manager
    • Install usbmuxd, libimobiledevice and ideviceinstaller brew install --HEAD usbmuxd && brew install --HEAD libimobiledevice && brew install --HEAD ideviceinstaller
    • Mount developer image on your device -> connect iOS device to USB, authorize your computer (click "Trust" on device screen) and run Xcode
  4. (Optional) Use following commands in any directory by adding the absolute path to the cloned folder to PATH variable in .bash_profile (or equivalent file) PATH=$PATH:/Users/dummyuser/Library/Android/sdk/platform-tools PATH=$PATH:/Users/dummyuser/mobile-toolkit export PATH

Android scripts

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

  1. Record screen
  2. End recording using ctrl + c
  3. Save screen video footage to ~/Desktop.
  • Specify your own filename by passing it as argument

Device control

apaste

apaste "[email protected]" 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
  • App restart may be necessary on lower APIs

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 management

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

akill

akill com.dummy.package.name.app

  • Restart foreground app
  • Target specific app by passing package name as argument

aerase

aerase

aerase com.dummy.package.name.app

  • Delete foreground app data and restart it
  • Target specific app by passing package name as argument

ainstall

adb_install some-app-file.apk

  • Install and run .apk file
  • Can overwrite existing app

auninstall

auninstall

auninstall com.dummy.package.name.app

  • 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 to customize the list of essential apps
  • (Optional) Remove everything in /sdcard/Download directory

agoogleplay

agoogleplay "Dummy App"

  • Search for app on Google Play
  • Pass app name as argument

Device management

alog

  • Print system log output

acrash

  • Print log output containing application crashes only
  • Set how many crash surrounding lines to print using argument

adevice

  • Print device information
  • (Optional) Search for the device on GSMArena

iOS scripts

Capture device screen

iscreenshot

  • Save screenshot to ~/Desktop
  • Filename includes device model, system version and current time and date
    • Specify your own filename by passing it as argument

irecord

  • Run QuickTime and open video source picker (so you can choose device right away)
    • You may have to allow some system permission, so the script can access the picker

igif

Required: Install ffmpeg brew install ffmpeg

  1. Record screen (take as many screenshots per second as possible) to ~/Desktop
  2. End recording using ctrl + c
  3. Compose .mp4 from screenshots and save it to ~/Desktop
  4. (Optional) Delete screenshots
  • Filename includes device model, system version and current time and date
    • Specify your own filename by passing it as argument

Application management

iinstall

iinstall some-app-file.ipa

  • Install .ipa file
  • Can overwrite existing app

iuninstall

iuninstall

iuninstall com.dummy.package.name.app

  • Uninstall third party app
  • Choose from the list, or pass package name as argument

icleanup

  • Uninstall all third party packages
    • Skips some essential apps
    • Edit this script yourself to customize the list of essential apps

Device management

icrashlogs

  • Gathers crash logs from the device to ~/Desktop (be patient ๐Ÿ˜…)
  • You can import logs to Xcode to make them more readable
    • Open relevant project in Xcode
    • Click on Window > Devices and Simulators > View Device Logs
    • Drag the .crash file onto the log list
    • The readable crash log should appear in the list

idevice

  • Print device information
  • (Optional) Search for the device on GSMArena

ireboot

  • Reboot device

mobile-toolkit's People

Contributors

igpenguin avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.