Giter Site home page Giter Site logo

sndcpy's Introduction

sndcpy (v1.1)

This tool forwards audio from an Android 10 device to the computer. It does not require any root access. It works on GNU/Linux, Windows and macOS.

The purpose is to enable audio forwarding while mirroring with scrcpy. However, it can be used independently.

Update: scrcpy 2.0 now supports audio forwarding natively.

Note

This application is a proof-of-concept. But as explained below, many apps are restricted and could not forward the audio.

Requirements

  • The Android device requires at least Android 10.
  • VLC must be installed on the computer.

Get the app

Download the latest release:

On Windows, for simplicity, take the second archive, which also contains adb.

Alternatively, you could build the app.

Run the app

Plug an Android 10 device with USB debugging enabled, and execute:

./sndcpy

If several devices are connected (listed by adb devices):

./sndcpy <serial>  # replace <serial> by the device serial

(omit ./ on Windows)

It will install the app on the device and start forwarding audio.

Press Ctrl+c in the terminal to stop (except on Windows, just disconnect the device or stop capture from the device notifications).

VLC may print this error message once:

main stream error: connection error: Connection refused

It is "expected", just ignore it.

The sound continues to be played on the device. The volume can be adjusted independently on the device and on the computer.

Uninstall

To uninstall the app from the device:

adb uninstall com.rom1v.sndcpy

Apps restrictions

sndcpy may only forward audio from apps which do not prevent audio capture. The rules are detailed in §capture policy:

  • By default, apps that target versions up to and including to Android 9.0 do not permit playback capture. To enable it, include android:allowAudioPlaybackCapture="true" in the app's manifest.xml file.
  • By default, apps that target Android 10 (API level 29) or higher allow their audio to be captured. To disable playback capture, include android:allowAudioPlaybackCapture="false" in the app's manifest.xml file.

So some apps might need to be updated to support audio capture.

Audio delay

This is just a proof-of-concept, so it's far from perfect.

For example, jitter may cause VLC to automatically increase its buffering, causing an unacceptable delay:

main input error: ES_OUT_SET_(GROUP_)PCR  is called too late (pts_delay increased to 377 ms)

In that case, just restart it.

Environment variables

The scripts sndcpy and sndcpy.bat use some default values which can be overridden by environment variables.

  • ADB: the full path to the adb executable
  • VLC: the full path to the vlc executable
  • SNDCPY_APK: the full path to sndcpy.apk
  • SNDCPY_PORT: the local port to forward to communicate with the device

Blog post

sndcpy's People

Contributors

practicalbutterfly5 avatar rom1v avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sndcpy's Issues

I need help

how to forward voice chat or external audio to pc using sndcpy? can you help me ?

Press Enter once audio capture is authorized on the device to start playing... But closes when I press Enter

Waiting for device...
Performing Streamed Install
Success
Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.rom1v.sndcpy/.MainActivity }
Press Enter once audio capture is authorized on the device to start playing...

But after pressing Enter the CMD closes and nothing is playing. I'm not very fond of coding but I really like scrcpy and have been eagerly waiting for the audio version. Can you tell me what's wrong and what to do? Thank you.

Use ffplay instead of VLC

Instead of having VLC as a peer dependency you could distribute this package with a slimmed down version of ffplay and use the following command to play the audio:

$ ffplay -autoexit -nodisp -probesize 32 -f s16le -ar 48k -ac 2 -sync ext tcp://localhost:28200

Latency is still pretty bad, but better than VLC at least.

Audio not playing in specific games

Hi, thanks for developing this, very useful!

I successfully played audio from sources like youtube, spotify and subway surfers.
But for some games, the audio doesn't play at all. Not working in: Dragonball Legends, Score Hero.

Any idea why? My phone is a Xiaomi Mi A2 with Android 10.

Major bug/issue.

So first time i tried your program it was working fine, but after some time it uninstalled itself, i don't know why its happen, now after that i tried to install it it again by running the bat file by cmd it gives this error(see screenshot.1),
Capture4

now after revoking usb debugging auth and deleting the ".android" folder i tried once and then i gave me this error( see screen shot.2).
Capture5

please help me with this.

Requires newer sdk version

I received this issue when trying to run the bat file

adb: failed to install sndcpy.apk: Failure [INSTALL_FAILED_OLDER_SDK: Failed parse during installPackageLI: /data/app/vmdl1780591467.tmp/base.apk (at Binary XML file line #7): Requires newer sdk version #29 (current version is #28)]

What must I do to sort this issue out?

java.lang.SecurityException: You need the android.permission.INSTALL_GRANT_RUNTIME_PERMISSIONS

Hi. I couldn't work on My K20 pro and windows 10 pc. Please help

Waiting for device...
Performing Streamed Install
adb: failed to install sndcpy.apk: Security exception: You need the android.permission.INSTALL_GRANT_RUNTIME_PERMISSIONS permission to use the PackageManager.INSTALL_GRANT_RUNTIME_PERMISSIONS flag

java.lang.SecurityException: You need the android.permission.INSTALL_GRANT_RUNTIME_PERMISSIONS permission to use the PackageManager.INSTALL_GRANT_RUNTIME_PERMISSIONS flag
at com.android.server.pm.PackageInstallerService.createSessionInternal(PackageInstallerService.java:542)
at com.android.server.pm.PackageInstallerService.createSession(PackageUninstalling existing version first...
Failure [DELETE_FAILED_INTERNAL_ERROR]
Failed with error #1.
Press any key to continue . . .

Screenshot (4)
This is the error i get. Can You please help me out with this?

Requires newer sdk version #29 (current version is #24)

Waiting for device...
Performing Streamed Install
adb: failed to install sndcpy.apk: Failure [INSTALL_FAILED_OLDER_SDK: Failed parse during installPackageLI: /data/app/vmdl33316899.tmp/base.apk (at Binary XML file line #7): Requires newer sdk version #29 (current version is #24)]
Uninstalling existing version first...
Failure [DELETE_FAILED_INTERNAL_ERROR]
Performing Streamed Install
adb: failed to install sndcpy.apk: Failure [INSTALL_FAILED_OLDER_SDK: Failed parse during installPackageLI: /data/app/vmdl1606743385.tmp/base.apk (at Binary XML file line #7): Requires newer sdk version #29 (current version is #24)]
Failed with error #1.
Press any key to continue . . .

Can't run in linux

Exception occurred while executing:
java.lang.IllegalArgumentException: Unknown package: com.rom1v.sndcpy
	at com.android.server.pm.Settings.isOrphaned(Settings.java:4307)
	at com.android.server.pm.PackageManagerService.isOrphaned(PackageManagerService.java:21714)
	at com.android.server.pm.PackageManagerService.deletePackageVersioned(PackageManagerService.java:18476)
	at com.android.server.pm.PackageInstallerService.uninstall(PackageInstallerService.java:738)
	at com.android.server.pm.PackageManagerShellCommand.runUninstall(PackageManagerShellCommand.java:1486)
	at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:193)
	at android.os.ShellCommand.exec(ShellCommand.java:103)
	at com.android.server.pm.PackageManagerService.onShellCommand(PackageManagerService.java:21957)
	at android.os.Binder.shellCommand(Binder.java:629)
	at android.os.Binder.onTransact(Binder.java:527)
	at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:2834)
	at com.android.server.pm.PackageManagerService.onTransact(PackageManagerService.java:4020)
	at android.os.Binder.execTransact(Binder.java:726)

Failed to install sndcpy.apk

I tried running sndcpy on Windows 10 but what I get is this error:

❯ .\sndcpy
Waiting for device...
Performing Streamed Install
adb: failed to install sndcpy.apk: Failure [INSTALL_FAILED_OLDER_SDK: Failed parse during installPackageLI: /data/app/vmdl20906841.tmp/base.apk (at Binary XML file line #7): Requires newer sdk version #29 (current version is #25)]
Uninstalling existing version first...

Exception occurred while dumping:
java.lang.IllegalArgumentException: Unknown package: com.rom1v.sndcpy
        at com.android.server.pm.Settings.isOrphaned(Settings.java:4280)
        at com.android.server.pm.PackageManagerService.isOrphaned(PackageManagerService.java:18294)
        at com.android.server.pm.PackageManagerService.deletePackage(PackageManagerService.java:15670)
        at com.android.server.pm.PackageInstallerService.uninstall(PackageInstallerService.java:888)
        at com.android.server.pm.PackageManagerShellCommand.runUninstall(PackageManagerShellCommand.java:799)
        at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:118)
        at android.os.ShellCommand.exec(ShellCommand.java:94)
        at com.android.server.pm.PackageManagerService.onShellCommand(PackageManagerService.java:18554)
        at android.os.Binder.shellCommand(Binder.java:468)
        at android.os.Binder.onTransact(Binder.java:367)
        at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:2408)
        at com.android.server.pm.PackageManagerService.onTransact(PackageManagerService.java:3078)
        at android.os.Binder.execTransact(Binder.java:565)
Performing Streamed Install
adb: failed to install sndcpy.apk: Failure [INSTALL_FAILED_OLDER_SDK: Failed parse during installPackageLI: /data/app/vmdl322574919.tmp/base.apk (at Binary XML file line #7): Requires newer sdk version #29 (current version is #25)]
Failed with error #1.
Press any key to continue . . .

I also tried copying the apk to the device and then tried installing from there but the message I got was: "There was a problem parsing the package."

Can't Install Sndcpy [Mac OS Catalina]

Whenever I run the .sndcpy program
these errors pop up

Waiting for device...
Performing Streamed Install
adb: failed to stat sndcpy.apk: No such file or directory
Uninstalling existing version first...
Failure [DELETE_FAILED_INTERNAL_ERROR]

[Process completed]

Thank you so much for helping me out

Support scrcpy

Good!
As the title says. This project works together with scrcpy.
My idea is to send my screen to the pc and the audio using this project.

If you tell me that if you can, could you tell me how?
Should I open 2 cmd separately? or from just one.
And if I must have both projects in a separate folder or can I be in the same folder (the files)

Sndcpy keeps crashing every time I run it with Windows 10

Log:
Waiting for device...
Performing Streamed Install
Success
28200
Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.rom1v.sndcpy/.MainActivity }
Press Enter once audio capture is authorized on the device to start playing...
Playing audio...

Screenshot_20200715-151408_Settings

I am currently running this on S8 plus with custom ROM LineageOS 17.1 installed. May I know if this works with custom ROMs and if so, which ones? Scrcpy works perfectly. After pressing Start Now, the app crashes and is displayed in the screenshot. There is nothing else in the log after pressing Enter.

command to stop audio playback

As the title says.
I don't want to disconnect the usb cable.
And closing the cmd window is not an option, since it still listens.
Neither closing vlc. Since the same, it continues listening.

vlc can not run

I’m using huawei‘s EMUI 10.1 and Notification bar shows forwarding (Microphone permission has been given).But nothing happened after “playing audio” has occurred.

I have changed the vlc to the correct path on my win10 without changing other configs.
Mybe I need to install VLC to the default path ?

Error with APK? Can't install (Windows and redmi note 7)

Waiting for device...
Performing Streamed Install
adb: failed to install sndcpy.apk: Failure [INSTALL_FAILED_USER_RESTRICTED: Invalid apk]
Uninstalling existing version first...
Exception occurred while executing:
java.lang.IllegalArgumentException: Unknown package: com.rom1v.sndcpy
    at com.android.server.pm.Settings.isOrphaned(Settings.java:4307)
    at com.android.server.pm.PackageManagerService.isOrphaned(PackageManagerService.java:21723)
    at com.android.server.pm.PackageManagerService.deletePackageVersioned(PackageManagerService.java:18460)
    at com.android.server.pm.PackageInstallerService.uninstall(PackageInstallerService.java:751)
    at com.android.server.pm.PackageManagerShellCommand.runUninstall(PackageManagerShellCommand.java:1486)
    at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:193)
    at android.os.ShellCommand.exec(ShellCommand.java:103)
    at com.android.server.pm.PackageManagerService.onShellCommand(PackageManagerService.java:21980)
    at android.os.Binder.shellCommand(Binder.java:634)
    at android.os.Binder.onTransact(Binder.java:532)
    at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:2809)
    at com.android.server.pm.PackageManagerService.onTransact(PackageManagerService.java:4023)
    at android.os.Binder.execTransact(Binder.java:735)
Failed with error #255.
Press any key to continue . . .

android < 10 support

I know that earlier android versions dont support capturing system audio so i would like to know if any of the following allows capturing it anyway:

  • sndcpy installed as system app
  • giving special permissions to sndcpy through adb
  • root
  • xposed/magik

Computer as source of microphone

Can sndcpy be used as a source for microphone output? It looks like it can(theoratically) forward call audio but can it be used for audio source. For reference Android 11 beta 2 allows both internal sound and microphone to be used as source of audio all together while recording. I haven't tried the app yet but just a curious question.

Lag when using sndcpy

Thanks to @rom1v :)
Testing on macos with Pixel 2XL and the feature works fine.
But the lag is quite obvious , around 3-5 seconds.
Just want to know any suggestion to decrease the lag, or any plan to improve it?

Can't play audio from Netflix

Hi, I can listen the audio from youtube and other music app but can't listen Netflix audio.
Please let me know if this is blocked by Netflix or something else is wrong.

Request To Make SoundCopy (sndcpy) work with Android 9 or older versions of Android

I love using Scrcpy for the video. I use it with the highest quality, bitrate and other settings. It would be even better if it had an option to transmit sound via USB. But, It fortunatly doesn't have one 😥. I have a Samsung Galaxy S8+ with android version 9 which is not supported by SoundCopy or sndcpy. I tried building the app, changing sdk version and other stuff but couldn't make it work with Android 9. I thought about upgrading to Android 10( which might kill my phone slowly). I request Github to make sndcpy available for Android 9 or older. Please, Do it for the sake of poor guys like me 😥

Not able to stream the audio neither with VLC nor with scrcpy

Hello can you please help, I cloned the repo and ran the executable everything went fine but I wasn't able to hear anything when I played music on my phone.

❯ ./sndcpy
Waiting for device...
Performing Streamed Install
Success
Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.rom1v.sndcpy/.MainActivity }
Press Enter once audio capture is authorized on the device to start playing...

VLC media player 3.0.11 Vetinari (revision 3.0.11-0-gdc0c5ced72)
[00007fe1c911e6c0] dummy interface: using the dummy interface module...

I also opened scrcpy but nothing happened

I am using Xiaomi Poco F1 running Android 10

Thanks!

more details below

LOG:

./sndcpy
Waiting for device...
Performing Streamed Install
Success
Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.rom1v.sndcpy/.MainActivity }
Press Enter once audio capture is authorized on the device to start playing...

VLC media player 3.0.8 Vetinari (revision 3.0.8-0-gf350b6b5a7)
shared memfd open() failed: Function not implemented
[00007fffb96d76d0] vlcpulse audio output error: PulseAudio server connection failure: Connection refused
[00007fffb96eea90] dbus interface error: Failed to connect to the D-Bus session daemon: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
[00007fffb96eea90] main interface error: no suitable interface module
[00007fffb960e2a0] main libvlc error: interface "dbus,none" initialization failed
[00007fffb96fff10] main interface error: no suitable interface module
[00007fffb960e2a0] main libvlc error: interface "globalhotkeys,none" initialization failed
[00007fffb96fff10] dummy interface: using the dummy interface module...
ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM default
[00007fffb96d76d0] alsa audio output error: cannot open ALSA device "default": No such file or directory
[00007fffb96d76d0] main audio output error: Audio output failed
[00007fffb96d76d0] main audio output error: The audio device "default" could not be used:
No such file or directory.
[00007fffb96d76d0] main audio output error: module not functional
[00007f9078008050] main decoder error: failed to create audio output
ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM default
[00007fffb96d76d0] alsa audio output error: cannot open ALSA device "default": No such file or directory
[00007fffb96d76d0] main audio output error: Audio output failed
[00007fffb96d76d0] main audio output error: The audio device "default" could not be used:
No such file or directory.
[00007fffb96d76d0] main audio output error: module not functional
[00007f9078008050] main decoder error: failed to create audio output
[00007f9078008050] main decoder error: buffer deadlock prevented
ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM default
[00007fffb96d76d0] alsa audio output error: cannot open ALSA device "default": No such file or directory
[00007fffb96d76d0] main audio output error: Audio output failed
[00007fffb96d76d0] main audio output error: The audio device "default" could not be used:
No such file or directory.

Running on WSL cause the windows verision didnt even show anything after saying playing Audio.

Android: 10

Adb Version:41

I can't play any sound.

Removed -Idummy, VLC opened but when Ctrl + M, it always appear the message :
main error: connection error: Connection refused by peer
main error: connection error: Connection refused by peer
main error: connection error: Connection refused by peer
main error: connection error: Connection refused by peer
main error: connection error: Connection refused by peer
main error: connection error: Connection refused by peer
main error: connection error: Connection refused by peer
main error: connection error: Connection refused by peer

My device is MI A2 Lite - Android 10 Stock ROM.

No sound on the computer

CMD seems to be nomal:
Waiting for device...
Performing Streamed Install
Success
Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.rom1v.sndcpy/.MainActivity }
Press Enter once audio capture is authorized on the device to start playing...
Playing audio...

But when I play audio on the phone, my computer didn't receive it. I mean, the computer didn't play the sound on the phone.

And the app "sndcpy" on my phone displays "Waiting for connect".
Waiting for connection
I don't know if it is correct.

Audio can't be played

Hello, thanks for your amazing work, i use scrcpy for streaming in Twitch!
Sir, i have a question, is there any way to force apps mirroring audio with sndcpy? The game that i want to mirror it's audio doesn't allows it, i know that there are this policy but is there any way to force it? Thanks!!

Can't install sndcpy.apk on a phone

My phone is on Android 9, my pc is on Windows 7
Scrcpy woks fine.

I have extracted sndcpy-with-adb-windows-v1.0.zip into a folder and run sndcpy.bat, typed in "sndcpy" and the output was following:

Waiting for device...
Performing Streamed Install
adb: failed to install sndcpy.apk: Failure [INSTALL_FAILED_USER_RESTRICTED: Inva
lid apk]
Uninstalling existing version first...

Exception occurred while executing:
java.lang.IllegalArgumentException: Unknown package: com.rom1v.sndcpy
        at com.android.server.pm.Settings.isOrphaned(Settings.java:4306)
        at com.android.server.pm.PackageManagerService.isOrphaned(PackageManager
Service.java:21620)
        at com.android.server.pm.PackageManagerService.deletePackageVersioned(Pa
ckageManagerService.java:18379)
        at com.android.server.pm.PackageInstallerService.uninstall(PackageInstal
lerService.java:738)
        at com.android.server.pm.PackageManagerShellCommand.runUninstall(Package
ManagerShellCommand.java:1486)
        at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageMan
agerShellCommand.java:193)
        at android.os.ShellCommand.exec(ShellCommand.java:103)
        at com.android.server.pm.PackageManagerService.onShellCommand(PackageMan
agerService.java:21877)
        at android.os.Binder.shellCommand(Binder.java:634)
        at android.os.Binder.onTransact(Binder.java:532)
        at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.ja
va:2809)
        at com.android.server.pm.PackageManagerService.onTransact(PackageManager
Service.java:4021)
        at android.os.Binder.execTransact(Binder.java:731)
Failed with error #255.

I'm not very experienced in coding/programming but as far as i can understand it says that sndcpy.apk is invalid. I have tried connecting my phone via usb and wirelessly trough adb but outcome was the exact same in both cases. Also i tried moving sndcpy.apk on my Google Drive so that i could install it on my phone but it says "Error parsing package" or something similar.
As i've mentioned before i'm not very experienced in coding/programming so i am not able to build the apk using Gradle or in any other way.

Lower SDK target

Can the SDK target be lowered to include earlier android versions?

Problems encountered during use

Unfortunately, on my mobile phone, only the internal audio of YouTube can be transmitted to windows 10 using sndcpy, and the sound collected by the microphone of my mobile phone cannot be transmitted. If possible, I hope it can collect all the sounds inside the mobile phone.
Model: Mi 10Pro
Android version: 10
MIUI version: MIUI 12
(T_T)
QQ图片20200713013131

Doesn't work on Xiaomi Mi 9t (MIUI Global 12.0.3) and Windows 10 (2004)

Hey.
I followed the guide.
Mi phone is connected via USB with debug mode enabled. I then start sndcpy.bat either by itself or by cmd.
It's always stuck on "Waiting for device..."

I tried every option when connecting the phone to the computer. Enabling all debugging options in the developer menu. Disabling MIUI optimizations. Changing cable and usb ports. Makes no difference.

VLC is correctly installed but I had to change the folder in the bat file as it pointed to the 64bit variant but I have the 32bit one.

Can't install sndcpy.apk

First, I try install from adb,it show
Snipaste_2020-08-11_22-03-25

Then,i cry copy this apk to Android,also failed

Snipaste_2020-08-11_22-06-15
my phone sdk version is Android 7.1 25 Nougat

No audio played in PC

I followed every step, but nothing played in PC, and it shows 'Waiting for connection' at the phone. But the Android system told that the app is recoding voice.
At Pc, system show the VLC is runing but not voice played.

Android version:10
OS:MIUI 12
windows 10

C:\cprojects\scrcpy-win64-v1.13>adb connect 192.168.1.5
connected to 192.168.1.5:5555

C:\cprojects\scrcpy-win64-v1.13>sndcpy
Waiting for device...
Performing Streamed Install
Success
5555
Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.rom1v.sndcpy/.MainActivity }
Press Enter once audio capture is authorized on the device to start playing...
Playing audio...

EDIT:
While it seems works only for several APPs, I still haven't figured out the reson and which APPs worked for it ....

Restricted Access

The app runs fine but it has only access to some apps. Like if i play a song through Google play no audio is forwarded. But if i play a video on Youtube app audio is forwarded. please fix this issue and it would be great.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.