Python scripts to help work with Android device
STEP-1: Download or Clone the repo in your local machine
- Download: https://github.com/sujaydavalgi/android-python-scripts/archive/refs/heads/master.zip
- Extract it to your setup folder
- Clone: https://github.com/sujaydavalgi/android-python-scripts.git
- Create a setup folder and initialize that folder
- Clone the repo in that folder
STEP-2:
Edit the PATH variables
-
Open the environment variables file
-
For Linux/Mac (Unix based), edit the bash profile file
-- In Linux:vi ~/.bashrc
-- In Mac OSX:vi ~/.bash_profile -
For Windows, edit the environment variables based
-- ClickStart(Orb) menu button
-- Right click on Computer icon
-- Click onProperties. This will bring up System window in Control Panel
-- Click onAdvanced System Settingson the left. This will bring up theSystem Propertieswindow withAdvancedtab selected
-- Click onEnvironment Variablesbutton on the bottom of the dialog. This brings up theEnvironment Variablesdialog
-- In theSystem Variablessection (orUser variablesifSystem Variablesis uneditable), scroll down till you seePath
-- Click onPathto select it, then theEditbutton. This will bring up theEdit System Variabledialog
-- While theVariable valuefield is selected, press theEndkey on your keyboard to go to the right end of the line, or use the arrow keys to move the marker to the end
-
-
Add/append the following adb paths ( Make sure to use your sdk path for
ANDROID_HOMEbelow )
-- For Linux / Mac (Unix based)export ANDROID_HOME=~/Setup/android/sdk # <- Enter the Android sdk path in your machine</br> export ANDROID_TOOLS=${ANDROID_HOME}/tools export ANDROID_PTOOLS=${ANDROID_HOME}/platform-tools export ANDROID_BTOOLS=${ANDROID_HOME}/build-tools/26.0.0 # <- Check and add the actual builds-tools subfolder</br> export PATH=${PATH}:$ANDROID_HOME:$ANDROID_TOOLS:$ANDROID_PTOOLS:$ANDROID_BTOOLS:$ANDROID_TOOLS/bin-- For Windows
Add these variables: Variable name: ANDROID_HOME Variable value: %USERPROFILE%\AppData\Local\Android\Sdk # <- Enter the Android sdk path in your machine Variable name: ANDROID_TOOLS Variable value: %ANDROID_HOME%\tools Variable name: ANDROID_PTOOLS Variable value: %ANDROID_HOME%\platform-tools Variable name: ANDROID_BTOOLS Variable value: %ANDROID_HOME%\build-tools\26.0.1 # <- Check and add the actual builds-tools subfolder Edit the `PATH` variable and add: %ANDROID_HOME% %ANDROID_TOOLS% %ANDROID_PTOOLS% %ANDROID_BTOOLS% -
Save and close
-
Then run
- In Linux:
source ~/.bashrc - In MaxOSX:
source ~/.bash_profile - In Windows: May be restart the system
- In Linux:
-
Close all the existing terminals and reopen
STEP-3: Setup your test environments:
- Open the
mySetup.txtunder "library" folder - Search for
myShellScriptsvariable and set it with the path that the scripts are present - Search for
myProjDirvariable and set it with your system test folder path (include the complet path inside quotes)