Sometimes you would need to install third party application on your emulator. Since Android Market is not working by default on emulator and you cannot simply download files from Market, you need to install application there manually. For example in my case, I needed to install PDF viewer to the emulator in order to run it from my application. For this purpose Android Debug Bridge (adb.exe) application from Android SDK is used. After installation it is placed in folder tools under Android SDK.
Following simple procedure will install application on emulator using adb.exe:
-
Download Apk file you want to install there, in my case it was AndroidPdfViewer_1_0_0b.apk from source forge server (http://sourceforge.net/projects/andpdf/files/ )
-
Run Android virtual device in emulator (if it is not yet running) with command:
> emulator @MyAAndroidDevice
-
Go to Android SDK directory where you have installed adb command and run installation command:
> adb install AndroidPdfViewer_1_0_0b.apk
This will install application to running emulator, and you should get message about successfull installation:
> 1628 KB/s (1432940 bytes in 0.859s)
> pkg: /data/local/tmp/AndroidPdfViewer_1_0_0b.apk
> Success
So the application is installed, in my example with PDF Viewer I also needed to transfer some files to the emulator SDCARD. This was done also with adb command:
> adb push pdf\maraton.pdf /sdcard
> 1258 KB/s (120777 bytes in 0.093s)
If you want also to copy files from emulator adb pull is used:
> adb pull /sdcard/maraton.pdf a.pdf
> 1509 KB/s (120777 bytes in 0.078s)
So these few options for adb command did the job. For information, complete adb command list is here for example – adb.txt.
- Log in to post comments
