0

I think the answer is No but I’m not 100% sure as I’m a newbie with Android SDK.

So, I downloaded adt-bundle-linux-x86-20140702 to my CentOS 6.5 machine. Following the documentation, I was able to create an AVD using ‘AVD Manager’ interface (using the eclipse binary).

I’m able to view my AVD that I created by running emulator -avd <name>. I have a .apk file which I didn’t build but downloaded from a website (I don’t have the source code). If I would like to load this .apk into my emulator to see how it works, is it something that’s doable? If yes, may I know the steps please?

Many thanks in advance.

Update:

Following this link, I tried:

adb install /path/to/my.apk

which returns,

“failed to copy ‘/path/to/my.apk’ to ‘/data/local/tmp/my.apk’: No such file or directory”

I also tried copying /path/to/my.apk to the directory where adb is located. I created a /data/local/tmp directory as well with the same result. Perhaps, it’s looking for /data/local/tmp on the AVD (?). Not even sure if it is a compatible issue with the device/target/cpu configured on my AVD ..

Appreciate any help.

Community
  • 1
  • 1
Keshav
  • 33
  • 1
  • 1
  • 6
  • Yes, it is possible to install an APK to a compatible, fully functional emulator. But your error message makes it seem like your emulator is broken - a not uncommon problem. Are you authorized to install this on an emulator? Is it huge? – Chris Stratton Nov 13 '14 at 21:55
  • 1
    why not just install it via the emulator, in other words, copy it over, then use the emulator, navigate to the apk directory and tap to install. – Janpan Nov 13 '14 at 21:56
  • Not a bad idea - probably necessary to either add an SD card image, put it on a web server with the proper MIME type, or email it to an account on the device. – Chris Stratton Nov 13 '14 at 21:57
  • @ChrisStratton yes, an SD card image sounds like a great idea or even somewhere on a webserver where you can download it from. – Janpan Nov 13 '14 at 21:58
  • @ChrisStratton, It's a public website so I believe I'm authorized. File size is about 7.4 MB. I don't know if it is 'huge'. – Keshav Nov 13 '14 at 22:17
  • @Janpan, Thanks! I'm able to view my instance running (finally!). I used `./emulator -avd test0` as you suggested. When you say, 'navigate to the apk directory', are you refering to 'navigate on the device'? If yes, how? @ChrisStratton, I see my 'SD Card' is empty (navigated from 'MENU button -> Manage Apps -> SD Card'). Looks like I should be able to install from here if I can copy the .apk to this location? Many thanks to you both for the help here. – Keshav Nov 13 '14 at 22:41
  • I see I have an SD card image (sdcard.img) under ~/.android/avd/test0.avd/. Documentation says I should be able to copy using `adb push `. I guess I have to mount sdcard.img as the ? – Keshav Nov 13 '14 at 23:05
  • Looks like `adb push /sdcard/` worked. I can confirm that the file is copied on `adb shell` followed by `ls /sdcard/`. Many thanks for the help! – Keshav Nov 13 '14 at 23:40

0 Answers0