741g / android-emulator-m1-preview

A place to store preview versions of Android Emulator on Apple Silicon and provide instructions/support.
Apache License 2.0
405 stars 26 forks source link

Audio #10

Closed hannesa2 closed 2 years ago

hannesa2 commented 3 years ago

@741g Related to this change, does the audio should works now ? I observed neither audio-out, nor audio-in works. But I only tested with first version

741g commented 3 years ago

Yes, you'll need the latest preview.

hannesa2 commented 3 years ago

Hmm, I use your Emulater v2 and audio recorder https://github.com/hannesa2/AudioRecorder.git

When I start record (after apply all permissions manually)

image

I run into image

and I see a lot of

image

How do you make it work, or how should I test it ? Do you have any advice ?

741g commented 3 years ago

Does audio output work? This looks like an audio codec issue. You may want to try the Google APIs image: https://github.com/google/android-emulator-m1-preview/releases/tag/0.3

hannesa2 commented 3 years ago

I can confirm audio out on V3 works. I tested simply with youtube.

Unfortunately record (audio-in) was not successful. Even with lowest quality image

741g commented 3 years ago

Thanks for trying it out! We're aware of the audio-in issues and have been investigating fixes.

741g commented 3 years ago

We've just landed some fixes for audio; record should work now (provided you still go to the .. menu and go to Microphone > Virtual headset uses host audio and toggle it on each startup (This is for privacy reasons)) Can you try using the emulator from https://ci.android.com/builds/submitted/7123544/aarch64_sdk_tools_mac/latest/sdk-repo-darwin_aarch64-emulator-7123544.zip and creating an Android R arm64v8a AVD from Android Studio?

hannesa2 commented 3 years ago

@741g I need your help. I downloaded the zip and started extracted

./emulator

But I run into this

image

How to start it ?

741g commented 3 years ago

This could be due to Gatekeeper. You might want to curl or wget that url in the terminal.

741g commented 3 years ago

Hmm, those downloads require a cookie. Hold on

741g commented 3 years ago

Try wget https://github.com/741g/android-emulator-m1-preview/releases/download/7123544/sdk-repo-darwin_aarch64-emulator-7123544.zip

hannesa2 commented 3 years ago

Ok, it looks now better

image image

Is there a way to integrate it seamless ?

I guess this is the right one image

hannesa2 commented 3 years ago

I hope this is the right version

image

Anyway, now I can record and play the audio again with Emulator. This is a huge step forward, now even https://issuetracker.google.com/issues/157223337 is more or less obsolete 🍾 🌈

741g commented 3 years ago

Yes, that should be it! We're also working on better integration w/ Studio so you won't have to manually wget or export ANDROID_SDK_ROOT for the M1 version.

hannesa2 commented 3 years ago

I did

wget https://github.com/741g/android-emulator-m1-preview/releases/download/7123544/sdk-repo-darwin_aarch64-emulator-7123544.zip -P ~/Downloads
unzip ~/Downloads/sdk-repo-darwin_aarch64-emulator-7123544.zip -d ~/Downloads
mv ~/Library/Android/sdk/emulator ~/Library/Android/sdk/emulator.save
mv ~/Downloads/emulator ~/Library/Android/sdk

With it, it works in Android studio seamless

trickeyd commented 3 years ago

I've downloaded and moved to the location as described, but I get this whenever I try to use the executable. Screenshot 2021-02-18 at 23 15 38 That was from ./emulator -avd [name] -list-avds works fine actually

Any thought? Thanks

hannesa2 commented 3 years ago

@trickeyd I updated my 4 lines script. My installation was broken during IDE update and I run my script again and it's still working seamless in Android Studio. Even audio in/out works with my script

hannesa2 commented 3 years ago

Yes, that should be it! We're also working on better integration w/ Studio so you won't have to manually wget or export ANDROID_SDK_ROOT for the M1 version.

@741g Let me know, when here is an update. So I can test it for you

hannesa2 commented 3 years ago

My last working Emulator version was 30.7.4, some of new was working too but I don't know exactly. Currently I've blocking microphone issues with 30.8.4, that's why I want to downgrade my Emulator.

I already asked for 30.7.4 download link https://issuetracker.google.com/issues/157223337 but without response.

hannesa2 commented 2 years ago

It works super nice with 30.9.4

Splint3r7 commented 2 years ago

Try wget https://github.com/741g/android-emulator-m1-preview/releases/download/7123544/sdk-repo-darwin_aarch64-emulator-7123544.zip

Thanks this worked. I was getting the same error "emulator" is damaged.

🚀 🚀 🚀