Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flatpak package #486

Open
nexustar opened this issue Apr 2, 2019 · 22 comments
Open

flatpak package #486

nexustar opened this issue Apr 2, 2019 · 22 comments
Labels

Comments

@nexustar
Copy link

nexustar commented Apr 2, 2019

Hi,I have packaged scrcpy with flatpak.You can find it in https://github.com/12wk34/scrcpy-flatpak
Could you add it to flathub.org cause they require the developer to do it.
The more information about app submission: https://github.com/flathub/flathub/wiki/App-Submission

@Calinou
Copy link

Calinou commented Jul 20, 2019

Bump 🙂 Could you take a look at it, please?

@rom1v
Copy link
Collaborator

rom1v commented Jul 20, 2019

@12wk34 Sorry for the delay.

Thank you for your work. 👍

Could you add it to flathub.org cause they require the developer to do it.

I am happy if scrcpy is packaged for many systems, but I have no time to work/maintain them.

It seems it is not a strong requirement for the author to be involved.

If you are interested, you could maintain the flatpack package like @sisco311 does for the snap package.

However, you should not include binaries/zip of sources, but reference the links from github (and the matching sha256) from the json, so that everyone can be sure that the "flatpack recipe" builds the expected sources.

A minor remark: why do you need x264 (the encoder) and other stuff for ffmpeg? I guess --enable-decoder=h264should be sufficient.

@aiamuzz
Copy link

aiamuzz commented Aug 13, 2019

Hi,I have packaged scrcpy with flatpak.You can find it in https://github.com/12wk34/scrcpy-flatpak
Could you add it to flathub.org cause they require the developer to do it.
The more information about app submission: https://github.com/flathub/flathub/wiki/App-Submission

@12wk34 ... could you create a new PR on flathub repo ... just quote this thread there to show you have the approval of upstream(@rom1v ) ... i believe they would add it to flathub once they see that upstream is ok with it ...

@rugk
Copy link

rugk commented Sep 25, 2019

Any news here?

An flatpack package is strongly appreciated…

@nexustar
Copy link
Author

A problem is that I dont know how to use a custom adb build. the binary from google is not free. It is what need be done before add to flathub

@rugk
Copy link

rugk commented Sep 26, 2019

I guess the source code for adb should be in the AOSP project, somewhere... 😄

At least distros build this in their packages, so it has to be FLOSS. (And you may also look there, Debian or Fedora or so, how they build it.)

@rom1v
Copy link
Collaborator

rom1v commented Sep 26, 2019

https://android.googlesource.com/platform/system/core.git/+/refs/heads/master/adb/

@sisco311
Copy link

sisco311 commented Oct 5, 2019

Building adb from source is a PITA.

But according to the NOTICE.txt file included in the zip from https://dl.google.com/android/repository/platform-tools_r28.0.3-linux.zip the binary is licensed under the Apache License, Version 2.0

@maggu2810
Copy link

Any news? Can't you bundle the one from the platform-tools zip file if this is using the APL-2?

@uajain
Copy link

uajain commented Mar 18, 2020

Building the adb from source would be ideal but for the time-being we can adopt the approach : flathub/org.godotengine.Godot#38

i.e. adb needs to be present on host, and the scrcpy can run it via flatpak-spawn

@uajain
Copy link

uajain commented Mar 18, 2020

Also, confirming on flatpak IRC:

<uajain> Is a binary distributable (adb from android-tools in this case) via a flatpak package, provided it's licensed under Apache license 2.0 
<uajain> My reading says is OK to distribute, but am not an expert here.
<barthalion> uajain: unless binary is under different license, it's fine

@sisco311 @maggu2810 Looks like it's OK to bundle it.

@rom1v rom1v added the distrib label Apr 11, 2020
@francku
Copy link

francku commented May 22, 2020

Any news?
I have snap installed just for scrcp, so flatpak package would be really helpful.

@nexustar
Copy link
Author

Sorry for the postpone.I dont think it is a goold idea to compile library like ffmpeg in each app in flathub. So i was beeing waiting.

I just push a request in flathub( flathub/flathub#1551 ). And the build is sucess.

By the way, is there a plan to give scrcpy an icon?

@rom1v
Copy link
Collaborator

rom1v commented May 29, 2020

By the way, is there a plan to give scrcpy an icon?

There is currently no plan to do that (no designer).

And there is already an awesome icon </troll>

@Maneli-droid
Copy link

Hi @rom1v , I installed SCRCPY with Flatpak, however an error happens:
emanuel@emanuel:~$ flatpak run com.Genymobile.Scrcpy
INFO: scrcpy 1.13 https://github.com/Genymobile/scrcpy

  • daemon not running; starting now at tcp:5037
  • daemon started successfully
    /app/share/scrcpy-server.jar: 1 file p...ped. 49.4 MB/s (27694 bytes in 0.001s)
    [server] INFO: Device: Xiaomi Mi A3 (Android 10)
    ERROR: Could not initialize parser
    INFO: Renderer: opengl
    INFO: OpenGL version: 4.6 (Compatibility Profile) Mesa 20.0.5
    INFO: Trilinear filtering enabled
    INFO: Initial texture: 720x1560
    WARN: Device disconnected
    Can you help me?

@rom1v
Copy link
Collaborator

rom1v commented Jul 1, 2020

ERROR: Could not initialize parser

Something is very wrong.

scrcpy/app/src/stream.c

Lines 217 to 219 in e99b896

stream->parser = av_parser_init(AV_CODEC_ID_H264);
if (!stream->parser) {
LOGE("Could not initialize parser");

Does it work with a non-flatpak version?

@Maneli-droid
Copy link

ERRO: Não foi possível inicializar o analisador

Algo está muito errado.

scrcpy/app/src/stream.c

Lines 217 to 219 in e99b896

stream->parser = av_parser_init(AV_CODEC_ID_H264);
if (!stream->parser) {
LOGE("Could not initialize parser");

Funciona com uma versão não flatpak?

I tried on Win 7 with the same phone, same USB cable and it worked, but when I try endless End (which only accepts Flatpak) it doesn't work

@LorenDB
Copy link

LorenDB commented Nov 12, 2021

I'd appreciate a Flatpak build, as I don't use Snap. Unfortunately, this issue seems to have been abandoned.

@Binly42
Copy link

Binly42 commented Dec 18, 2022

One alternative/workaround might be the flatpak version guiscrcpy .

my note:

  • the "latest"(though released in 2021) v4.11.3 includes scrcpy v1.24 (well I don't know why and how ...

  • I did get able to use it on my Xiaomi Mi11 LE MIUI13 Android 12 Phone (take care the security setting of the phone)

  • However, after using a little while (even without much interacting), it seems usually to lag, and even crash

    Not digged into yet. Some detail info:

    My case is wifi, Debian 11.5 stable, KDE, and -m 1024.

    The errors are often as follows:

    DEBUG: End of frames
    DEBUG: Receiver stopped
    WARN: Device disconnected
    DEBUG: quit...
    DEBUG: Server disconnected
    DEBUG: Server terminated
    
  • seems that not work when multiple devices connected ?


Some other might noteworthy things:

@Binly42
Copy link

Binly42 commented Dec 16, 2023

One alternative/workaround might be the flatpak version guiscrcpy .

* I did get able to use it on my Xiaomi Mi11 LE MIUI13 Android 12 Phone ([take care the security setting of the phone](https://github.com/Genymobile/scrcpy/issues/70#issuecomment-1223436139))

* However, after using a little while (even without much interacting), it seems usually to lag, and even crash

nearly months, this works okay:

  • turn on the wlan debugoption (in chinese 无线调试) (inside the debugging section part of Developer options), which would generate a ip:port
  • use /var/lib/flatpak/app/in.srev.guiscrcpy/x86_64/stable/active/files/bin/adb to manually connect device with the above ip:port
  • go in guiscrcpy, just pick the correct candidate device and start ~

NOTE: a bad thing is, the port may change ... so that need manually re-connect

@Fei1Yang
Copy link

Hello, since the last Flatpak packaging attempt stalled, I made another one at Fei1Yang/[email protected] which addressed two problems mentioned by Flathub maintainers in the last attempt using a wrapper script. this method works fairly well during my testing.

Regarding the adb issue, there is a more lightweight method to compile it at nmeum/android-tools (and it's being used by Fedora's Anitya project to monitor new releases for adb), but I'm not sure if a switch is necessary since the Google binary is already Apache-2.0 licensed.

If the scrcpy developers are satisfied with this manifest, I will try to submit it to flathub.

@AzureRaptor
Copy link

@rom1v Could you take a look at @Fei1Yang 's flatpak repackage request above? I'd really love to get a working, updated scrcpy flatpak going, and I know I'm not alone here.

Thank you very much for your time, and Fei1Yang, thank you also for your efforts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests