How can I drag and drop an APK file into a running Android Emulation Image which was launched from Android Device Manager from Visual Studio 2022?

Honorly2 5 Reputation points
2023-06-23T04:17:11.4+00:00

((EDIT)) I suggest you guys don't waste your time and just use Android Studio. Check back with VS 2022 android emulator in 2026.


TOPIC: Visual Studio 2022, Android Emulation, Android Device Manager, ADB Command Prompt

From Visual Studio 2022, I launched an android emulation:

TOOLS -> ANDROID -> ANDROID DEVICE MANAGER -> START

The android emulation is open and running.

How can I copy an APK quickly? I should be able to drag and drop an APK to the phone emulation, to quickly install it, similar to Android Studio. Unfortunately that doesn't work.

Now I have to use a very archaic method to copy files. I tried using the following commands to manual copy a file:

adb push "C:\1.apk" /sdcard/Download/1.apk
adb push "C:\1.apk" /storage/emulated/0/Download/1.apk

But the files don't show up in the phone when I check those directories; by tapping Download; looking through various folders or the recent tab.

So using adb, I manually checked to see if my file exists in those folders:

adb shell ls -lrta /sdcard/Download
adb shell ls -lrta /storage/emulated/0/Download

I also downloaded an APK from the web in the android emulation, and I can see that APK file in the download folder, next to my APK that I pushed via adb:

-rw-rw----  1 root sdcard_rw  44764251 2023-06-22 20:03 1.apk
-rw-rw----  1 root sdcard_rw  22375332 2023-06-22 20:18 from_web.apk

1.apk is my file that I adb pushed. The file: from_web.apk is what I downloaded from the web; in the emulation's chrome browser.

The problem is I can't see my file that I pushed, even though it's in the same directory!

I spent all day trying to get the android emulator to work, but now finally I get to the most important part, which is being able to actually drag an APK over to install it, and that doesn't work. Copy files doesn't work either because they won't show up in the emulation so they can be run.

Can you help me figure out how to simply drag and drop an APK, or tell me why my APK file, that I manually copied to the emulation, won't show up in the emulation's explorer?

Thanks ahead of time, I could really use your help. I'm exhausted.

Developer technologies | Visual Studio | Other
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Honorly2 5 Reputation points
    2023-06-24T00:54:01.6033333+00:00

    [ACCEPTED ANSWER]

    I ended up using Android Studio. I suggest anyone who reads this thread do the same. Check back with VS2022 Android Emulator in 2026. The existing state of VS2022 Android Emulation feels like a late alpha testing, and I don't have time for that.

    (If I could accept my own answer, as an answer, I would.)

    1 person found this answer helpful.
    0 comments No comments

  2. Tianyu Sun-MSFT 34,441 Reputation points Microsoft External Staff
    2023-06-23T08:40:30.04+00:00

    Hello @Honorly2 ,

    Welcome to Microsoft Q&A forum.

    Did you run Visual Studio or the emulator with elevated permissions? If so, please try to run VS or emulator not as administrator and test again.

    If possible, you can also try to download and install Visual Studio Emulator for Android separately, drag and drop the APK file to test.

    Best Regards,

    Tianyu


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.