Hi my friends, this time i will share the most common commands I use on a daily basis working as an Android Developer. If you want to add some more commands feel free to comment and we can extend this list.
Android>
Update android sdk in silent mode
- Mac ./android update sdk --no-ui
List available packages for installation
- Mac ./android list sdk
Android Debug Bridge (ADB)>
Execute commands on device.
- Install application (apk) adb install /pathToApk
- Replace existing application installation (apk) adb install -r /pathToApk
- Start main activity (apk) adb shell am start -a android.intent.action.MAIN -n applicationPackage/.MainActivity
- List applications installed by package name adb shell pm list packages
- Uninstall application by package name adb shell pm uninstall mx.com.app
- List files on sdcard adb shell ls sdcard/
- List files on sdcard adb shell ls sdcard/
- Get a file from device sdcard adb pull /sdcard/directory/file.extension
- Send a file to the device sdcard adb push /pathToFile/file.extension /sdcard/directory/
- Run adb as root on device. This allow to install an aplicacion as preinstalled in the device. adb root
- Mount file system with read-write permissions adb remount
Gradle>
- Show graph of dependencies for the project gradle :app:dependencies
- Show available tasks gradle tasks
- Package application gradle assembleDebug
- Test application gradle assembleDebug
- Refresh dependencies gradle --refresh-dependencies
- Offline mode gradle assembleDebug -offline
- Debug mode gradle assembleDebug -debug
No hay comentarios:
Publicar un comentario