A vagrant box provisioned with the phonegap development environment for the android platform. All you have to do is to clone the repository, fire vagrant up
and add your android device to VirtualBox. After that you are ready to begin your phonegap project.
- install vagrant http://docs.vagrantup.com/v2/installation/index.html
- run
git clone [email protected]:vasconcelloslf/phonegap-box.git
- run
cd phonegap-box
- run
vagrant up
The box doesn't have an UI, so there is no emulator, you can only install on the device. In order to do so, you need to configure the VirtualBox to see your device through a USB port:
- Plug the device
- VirtualBox -> phonegap-box -> Settings -> Ports -> USB -> Add Filter -> (Select your android device)
- (your device) Settings -> Developer Options -> USB Debugging (remark if it alreday marked)
- (your device) A prompt to allow the virtual machine will appear. Click ok.
- Plug and unplug the USB device.
- (vagrant) run
adb devices
. You now should see your device on the list.
In order to resolve the ?????? no permissions
problem:
- sudo -s
- adb kill-server
- adb start-server
- adb devices
- run
vagrant ssh
- run
cd /vagrant
- run
phonegap create folder-name -n ProjectName
- run
cd folder-name
- run
phonegap run android
That's it.
This box will install and configure the following:
- Vim
- Git
- Node.js
- Npm
- Java JRE
- Java SDK
- Android ADT