Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # 1. replace the variables values
- # 2. add the script in the root directory of your cordova project
- # Notes:
- # make sure that cordova installed globaly
- # make sure that adb is installed
- # variables
- PACKAGENAME='me.davenchy.myapp'
- ACTIVITYNAME='MainActivity'
- echo ">>>>>>>>>> starting the install script <<<<<<<<<<"
- echo ">> Package Name: $PACKAGENAME"
- echo ">> Activity Name: $ACTIVITYNAME"
- echo ">>>>>>>>>> build the app <<<<<<<<<<"
- # build using cordova
- cordova build android
- echo ">>>>>>>>>> uninstall the old app <<<<<<<<<<"
- # uninstall the package from device
- cd ./platforms/android/app/build/outputs/apk/debug/
- adb uninstall $PACKAGENAME
- echo ">>>>>>>>>> install the new app <<<<<<<<<<"
- # install the new package
- adb install app-debug.apk
- echo ">>>>>>>>>> starting the app <<<<<<<<<<"
- # start the activity
- adb shell am start -n $PACKAGENAME/$PACKAGENAME.$ACTIVITYNAME
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement