Skip to content

A simple bash script to be used while developing Android apps, to launch the application from the AndroidStudio project to a testing device.

Notifications You must be signed in to change notification settings

mahab339/kan3an

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 

Repository files navigation

roya

A simple bash script to be used while developing Android apps, to launch the application from the AndroidStudio project to a testing device.

###Requrements

  1. gradlw program
    Typically found on the Android Studio project directory. It may need to be run one time at first to set things up.

  2. adb program
    if it is found in the SDK folder, add it to the PATH variable. Otherwise install it to your system.

  3. A physical device connected to the computer and set up for debugging.

###Usage If you run the script for the first time, it will ask for the development package name:
~$ roya.sh
~$ No package has been specified yet
~$ Enter the package name i.e com.example.androidapp
~$ com.halv.androidapp
~$ PACKAGE has been set to com.halv.androidapp sccessfully...
~$

  • To launch ActivityName to the physical device: roya.sh ActivityName
  • To change the package name used in the script to com.example1.androidapp:
    roya.sh --set PACKAGE=com.example1.androidapp or roya.sh -s PACKAGE=com.example1.androidapp
  • To launch ActivityName activity without rebuilding the project:
    roya.sh -d ActivityName or roya.sh --no-rebuild ActivityName

###TODO For the sake of learning the powerful tool; shell scripting. I intend to add the following features to the script:

  • Support emulator, add option that launch the emulator instead of a physical device.
  • An option for the user to specify the launcher activity.
  • Set the default launcher activity from the terminal. finished on: Wed Jul 8 01:45:45 AST 2015
  • Set the package name from terminal globally (one time). added on Wed Jul 8 01:46:50 AST 2015 , Done on Fri Jul 17 16:38:52 AST 2015
  • Adding "launch without rebuilding" option. Done on Mon Jul 20 21:23:07 AST 2015
  • Support options --stacktrace and --info to be used with gradlew.

Currently reading this book about bash and bash scripting: Bash Guide for Beginners. Which I found very helpful for understanding the basic concepts behind bash.

About

A simple bash script to be used while developing Android apps, to launch the application from the AndroidStudio project to a testing device.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages