Advertisement
Guest User

Untitled

a guest
Apr 22nd, 2019
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. # 1. replace the variables values
  2. # 2. add the script in the root directory of your cordova project
  3.  
  4. # Notes:
  5. # make sure that cordova installed globaly
  6. # make sure that adb is installed
  7.  
  8. # variables
  9. PACKAGENAME='me.davenchy.myapp'
  10. ACTIVITYNAME='MainActivity'
  11.  
  12. echo ">>>>>>>>>> starting the install script <<<<<<<<<<"
  13. echo ">> Package Name: $PACKAGENAME"
  14. echo ">> Activity Name: $ACTIVITYNAME"
  15.  
  16. echo ">>>>>>>>>> build the app <<<<<<<<<<"
  17. # build using cordova
  18. cordova build android
  19.  
  20. echo ">>>>>>>>>> uninstall the old app <<<<<<<<<<"
  21. # uninstall the package from device
  22. cd ./platforms/android/app/build/outputs/apk/debug/
  23. adb uninstall $PACKAGENAME
  24.  
  25. echo ">>>>>>>>>> install the new app <<<<<<<<<<"
  26. # install the new package
  27. adb install app-debug.apk
  28.  
  29. echo ">>>>>>>>>> starting the app <<<<<<<<<<"
  30. # start the activity
  31. adb shell am start -n $PACKAGENAME/$PACKAGENAME.$ACTIVITYNAME
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement