Friday, November 4, 2011

Easy way to install an apk on Windows

If you are a developer, you would frequently generate an apk on a remote machine and copy to your Windows PC and then install it on your phone. Or an apk sent by your team member.
Here is a quick and convenient way to install the apk on your phone with a double-click!

1. Copy the below code to a text file, and rename it install_apk.bat. Save the .bat file somewhere on PC
adb install -r %1
PAUSE

(if you adb.exe is not on classpath, you can also specify the complete path to the exe. Ex C:\android-sdk-windows\platform-tools\adb.exe)

2. In windows explorer, select your apk -> Right click -> Open With -> Choose Program -> Browse -> Select the above .bat file
Also, check "Always use selected program..." option.
Click OK

Thats it, now you can install any apk with a double click (provided a device is connected to the PC via usb)

No comments:

Post a Comment