rom1v / sndcpy

Android audio forwarding (scrcpy, but for audio)
MIT License
3.27k stars 300 forks source link

Dunnos #176

Open inukaze opened 2 years ago

inukaze commented 2 years ago

Hi there trying to use « sndcpy » under GNU/Linux (64 Bits) :

Downloading https://services.gradle.org/distributions/gradle-5.6.4-all.zip ..................

No left space on device

Where is making that download ? because on / i just had left 20 MB but on another partition like where i put sndcpy i had 10 GB free

Under Microsoft Windows 7 (64 Bits) :

Waiting for device...
Performing Push Install
sndcpy.apk: 1 file pushed, 0 skipped. 4.2 MB/s (91689 bytes in 0.021s)
        pkg: /data/local/tmp/sndcpy.apk
Failure [INSTALL_FAILED_OLDER_SDK]
28200
Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.rom1v.sndcpy/.MainActivity }
Error type 3
Error: Activity class {com.rom1v.sndcpy/com.rom1v.sndcpy.MainActivity} does not exist.
Press Enter once audio capture is authorized on the device to start playing...

I am using "Doogee Voyager 2" (DG310), Android 5.0

inukaze commented 2 years ago

Well i had free space on /

and try again :

./run 0123456789ABCDEF
Downloading https://services.gradle.org/distributions/gradle-5.6.4-all.zip
.....................................................................................................................................
Unzipping /home/inukaze/.gradle/wrapper/dists/gradle-5.6.4-all/ankdp27end7byghfw1q2sw75f/gradle-5.6.4-all.zip to /home/inukaze/.gradle/wrapper/dists/gradle-5.6.4-all/ankdp27end7byghfw1q2sw75f

Welcome to Gradle 5.6.4!

Here are the highlights of this release:
 - Incremental Groovy compilation
 - Groovy compile avoidance
 - Test fixtures for Java projects
 - Manage plugin versions via settings script

For more details see https://docs.gradle.org/5.6.4/release-notes.html

Starting a Gradle Daemon (subsequent builds will be faster)

> Starting Daemon

> IDLE

Starting a Gradle Daemon (subsequent builds will be faster)

<-------------> 0% CONFIGURING [2m 22s]

> root project > Resolve files of :classpath > builder-3.6.2.jar > 3,15 MB

> root project > Resolve files of :classpath > gradle-3.6.2.jar > 4,08 MB

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
> SDK location not found. Define location with an ANDROID_SDK_ROOT environment variable or by setting the sdk.dir path in your project's local properties file at '/tmp/sndcpy/local.properties'.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 49m 4s

with release.sh :

./release.sh 
Downloading https://services.gradle.org/distributions/gradle-5.6.4-all.zip
.....................................................................................................................................
Unzipping /home/inukaze/.gradle/wrapper/dists/gradle-5.6.4-all/ankdp27end7byghfw1q2sw75f/gradle-5.6.4-all.zip to /home/inukaze/.gradle/wrapper/dists/gradle-5.6.4-all/ankdp27end7byghfw1q2sw75f
Set executable permissions for: /home/inukaze/.gradle/wrapper/dists/gradle-5.6.4-all/ankdp27end7byghfw1q2sw75f/gradle-5.6.4/bin/gradle

Welcome to Gradle 5.6.4!

Here are the highlights of this release:
 - Incremental Groovy compilation
 - Groovy compile avoidance
 - Test fixtures for Java projects
 - Manage plugin versions via settings script

For more details see https://docs.gradle.org/5.6.4/release-notes.html

Starting a Gradle Daemon, 1 stopped Daemon could not be reused, use --status for details

<-------------> 0% CONFIGURING [5m 07s]

> root project > Resolve files of :classpath > sdk-common-26.6.2.jar > 777
> root project > Resolve files of :classpath > builder-3.6.2.jar > 2,57 MB

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':app:compileReleaseJavaWithJavac'.
> SDK location not found. Define location with an ANDROID_SDK_ROOT environment variable or by setting the sdk.dir path in your project's local properties file at '/media/Compartido/tmp/sndcpy/local.properties'.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 1h 14m 54s
cp: no se puede efectuar `stat' sobre '../app/build/outputs/apk/release/app-release.apk': No existe el fichero o el directorio
    zip warning: name not matched: sndcpy.apk
  adding: sndcpy (deflated 46%)
  adding: sndcpy.bat (deflated 52%)
rom1v commented 2 years ago

I am using "Doogee Voyager 2" (DG310), Android 5.0

sndcpy requires Android 10.

Where is making that download ?

Gradle (the buildsystem used by Android).

inukaze commented 2 years ago

I am using "Doogee Voyager 2" (DG310), Android 5.0

sndcpy requires Android 10.

Ok thank you for the answer, a friend show me the project "USBAudio" i had try to compile it, but requiere the optional componente "PulseAudio", well i ask on that proyect how compile without pulseaudio. Here that issue

Where is making that download ?

Gradle (the buildsystem used by Android).

Well that don't answer the question, but i found where is download the path is :

cd ~/.gradle/wrapper/dists/gradle-5.6.4-all/

On my case inside that path exist a folder called "ankdp27end7byghfw1q2sw75f" inside it are the zip file has been downloaded by the script.

[ankdp27end7byghfw1q2sw75f]$ ls

gradle-5.6.4/ gradle-5.6.4-all.zip.lck gradle-5.6.4-all.zip gradle-5.6.4-all.zip.ok

there are the files XD well i don't know if the folder had a ramdom generate name.

Well finally i had resume the process for Download & Compile de sndcpy.apk with the follow commands :

First the Android SDK :

cd /tmp

wget -c "https://dl.google.com/android/repository/commandlinetools-linux-7583922_latest.zip"

unzip commandlinetools-linux-7583922_latest.zip
cd cmdline-tools/bin
export ANDROID_HOME=/tmp/cmdline-tools/
export ANDROID_SDK_ROOT=/tmp/cmdline-tools/

mkdir -p "$ANDROID_HOME/licenses"
./sdkmanager --sdk_root="/tmp/cmdline-tools/" --licenses

6 of 6 SDK package licenses not accepted. Review licenses that have not been accepted (y/N)? y

August 15, 2011

Accept? (y/N): y

January 16, 2019

Accept? (y/N): y

January 16, 2019

Accept? (y/N): y

June 2014.

Accept? (y/N): y

November 19, 2013

Accept? (y/N): y


Accept? (y/N): y

All SDK package licenses accepted

Second donwload the SndCpy and use the scripts :

cd /tmp
git clone https://github.com/rom1v/sndcpy ; cd sndcpy/
adb devices

List of devices attached 0123456789ABCDEF device

echo 'Puting the first result into a variable called SERIAL01'
SERIAL01=$(adb devices | sed -n 2p | awk '{print$01}')
echo 'Set the environment variable to search programs of android sdk in specific path'
export ANDROID_HOME=/tmp/cmdline-tools/
export ANDROID_SDK_ROOT=/tmp/cmdline-tools/

echo 'start the "run" script with the variable SERIAL01
./run "$SERIAL01"

Downloading https://services.gradle.org/distributions/gradle-5.6.4-all.zip ..................................................................................................................................... Unzipping /home/inukaze/.gradle/wrapper/dists/gradle-5.6.4-all/ankdp27end7byghfw1q2sw75f/gradle-5.6.4-all.zip to /home/inukaze/.gradle/wrapper/dists/gradle-5.6.4-all/ankdp27end7byghfw1q2sw75f

Welcome to Gradle 5.6.4!

Here are the highlights of this release:

  • Incremental Groovy compilation
  • Groovy compile avoidance
  • Test fixtures for Java projects
  • Manage plugin versions via settings script

For more details see https://docs.gradle.org/5.6.4/release-notes.html

Starting a Gradle Daemon (subsequent builds will be faster)

File /home/inukaze/.android/repositories.cfg could not be loaded. Checking the license for package Android SDK Platform-Tools in /tmp/cmdline-tools/licenses

License for package Android SDK Platform-Tools accepted.

Preparing "Install Android SDK Platform-Tools (revision: 31.0.3)".

"Install Android SDK Platform-Tools (revision: 31.0.3)" ready.

Installing Android SDK Platform-Tools in /tmp/cmdline-tools/platform-tools "Install Android SDK Platform-Tools (revision: 31.0.3)" complete. "Install Android SDK Platform-Tools (revision: 31.0.3)" finished.

Checking the license for package SDK Patch Applier v4 in /tmp/cmdline-tools/licenses

License for package SDK Patch Applier v4 accepted. Preparing "Install SDK Patch Applier v4 (revision: 1)".

"Install SDK Patch Applier v4 (revision: 1)" ready. Installing SDK Patch Applier v4 in /tmp/cmdline-tools/patcher/v4

"Install SDK Patch Applier v4 (revision: 1)" complete. "Install SDK Patch Applier v4 (revision: 1)" finished.

Checking the license for package Android Emulator in /tmp/cmdline-tools/licenses License for package Android Emulator accepted.

Preparing "Install Android Emulator (revision: 30.9.5)". <=============> 100% CONFIGURING [7h 7m 7s]

IDLE IDLE

Well i still wating that happend from that step XD.

inukaze commented 2 years ago

at the end just "Failed" the build XD