We can install an APK onto an Android device by connecting the device to a PC with a USB cord and then connecting to the device using the Android Debug Bridge (ADB).
Android Debug Bridge (adb) is a versatile command line tool that lets you communicate with an emulator instance or connected Android-powered device. It is a client-server program that includes three components: A client, which runs on your development machine.
- Enabled usb debuginh on your device
- Connect the device to the developer desktop environment with a USB cable.
- Open a Cygwin bash shell or Windows Command Line and execute:adb devicesThe output should show the attached device:
List of devices attached
- To install the application, navigate to the folder containing the downloaded APK. In our exampleC:\Temp and install APK using adb.
adb install thisIsTheAPKName.apk
- If the device list is empty, or a given device is not listed, kill the ADB server by executing:
- Execute adb devices again to restart the server, re-detect devices, and try again.