The officially official Devuan Forum!

You are not logged in.

#26 2024-07-28 15:08:49

golinux
Administrator
Registered: 2016-11-25
Posts: 3,286  

Re: [SOLVED] Android -> Linux screen mirroring software

Dear Altoid,

Even I have build a package or two over the years using this guide by Soul Singin' on the Debian forum:

HowTo Build a Package from Source the Smart Way

Give it a try if you're in the mood some day!

Online

#27 2024-07-28 15:11:50

igorzwx
Member
Registered: 2024-05-06
Posts: 105  

Re: [SOLVED] Android -> Linux screen mirroring software

If you do not want learn yourself, you can only hope that others may learn how to rebuild packages. Otherwise, it might be nothing to install.

$ apt changelog android-sdk-platform-23 | cat
Get:1 store: android-framework-23 6.0.1+r72-6 Changelog
android-framework-23 (6.0.1+r72-6) unstable; urgency=medium

  * source-only upload

 -- Hans-Christoph Steiner <hans@eds.org>  Thu, 31 Dec 2020 12:49:26 +0100

android-framework-23 (6.0.1+r72-5) unstable; urgency=medium

  * Fix FTBFS with Java 9+ (Closes: #894285)
  * add basic autopkgtest to check that class files are in the JAR

 -- Hans-Christoph Steiner <hans@eds.org>  Wed, 06 Mar 2019 12:10:58 +0000

android-framework-23 (6.0.1+r72-4) unstable; urgency=medium

  * Team upload.
  * Fix FTBFS (Closes: #891548)
  * Add Apache NOTICE file
  * Use debhelper 11
  * Bump Standards-Version to 4.1.3

 -- tony mancill <tmancill@debian.org>  Sat, 10 Mar 2018 12:32:30 -0800

android-framework-23 (6.0.1+r72-3) unstable; urgency=medium

  * Build-Depends on gradle-debian-helper (>= 1.4~) for backport friendly
  * Build shrinkedAndroid.jar
    * Build-Depends on proguard

 -- Kai-Chung Yan <seamlikok@gmail.com>  Fri, 09 Dec 2016 21:14:29 +0800

android-framework-23 (6.0.1+r72-2) unstable; urgency=medium

  * d/build.gradle:
    * Declare :uiautomator:stubs dependsOn :android:jar, fixing FTBFS
    * Add -api & -removedApi options to Doclava
  * Update the usage of gradle-debian-helper
  * d/rules: Update the usage of maven-debian-helper

 -- Kai-Chung Yan <seamlikok@gmail.com>  Fri, 25 Nov 2016 13:55:33 +0800

android-framework-23 (6.0.1+r72-1) unstable; urgency=medium

  * Initial release. (Closes: #833458)

 -- Kai-Chung Yan <seamlikok@gmail.com>  Fri, 07 Oct 2016 19:11:58 +0800

There is an official Ubuntu repository with native Debian sources and native Debian packages which work with Devuan. If some of them are needed to build Devuan packages, why not import them to the Devuan repository?

Offline

#28 2024-07-28 15:44:08

Altoid
Member
Registered: 2017-05-07
Posts: 1,537  

Re: [SOLVED] Android -> Linux screen mirroring software

Hello gl:

Howsyadoin'?

golinux wrote:

Even I have build a package or two ...

Indeed ...
But then you are a force of nature. 8^)

golinux wrote:

Give it a try ...

Basically, the problem is that my bucket list long and complicated.
ie: too many things in the air and too little time to tend to them while life happens.

But thanks for the link.

Best,

A.

Offline

#29 2024-07-28 22:19:17

igorzwx
Member
Registered: 2024-05-06
Posts: 105  

Re: [SOLVED] Android -> Linux screen mirroring software

How to rebuild scrcpy for Devuan.

Install the tools "which are considered essential for building Debian packages":

sudo apt install build-essential debhelper devscripts 
sudo apt install apt-file command-not-found 

Debian wiki: apt-file
_https://wiki.debian.org/apt-file

NOTE: If apt-file doesn't help, you may try to search with Google, for example:

"/usr/lib/android-sdk/build-tools/debian/dx" site:packages.ubuntu.com 
https://www.google.com/search?&q=%22%2Fusr%2Flib%2Fandroid-sdk%2Fbuild-tools%2Fdebian%2Fdx%22+site%3Apackages.ubuntu.com 

Install android-sdk and default-jdk

sudo apt install android-sdk default-jdk

dalvik-exchange is also missing (it is in the same Ubuntu repository)

dalvik-exchange_10.0.0+r36-4_all.deb	    2022-04-30 
http://us.archive.ubuntu.com/ubuntu/pool/universe/a/android-platform-dalvik/dalvik-exchange_10.0.0+r36-4_all.deb

Notice that "android-platform-dalvik" is the name of the source.
The folder "android-platform-dalvik" contains the source packages and the binaries.
This is how to search for missing packages.

Download and install dalvik-exchange

sudo dpkg -i dalvik-exchange_10.0.0+r36-4_all.deb

Download and install 3 packages of "android-framework-23" from the same repository.

android-sdk-platform-23
_http://us.archive.ubuntu.com/ubuntu/pool/universe/a/android-framework-23/android-sdk-platform-23_6.0.1+r72-6_all.deb
libandroid-23-java
_http://us.archive.ubuntu.com/ubuntu/pool/universe/a/android-framework-23/libandroid-23-java_6.0.1+r72-6_all.deb
libandroid-uiautomator-23-java
_http://us.archive.ubuntu.com/ubuntu/pool/universe/a/android-framework-23/libandroid-uiautomator-23-java_6.0.1+r72-6_all.deb

sudo dpkg -i libandroid-23-java_6.0.1+r72-6_all.deb libandroid-uiautomator-23-java_6.0.1+r72-6_all.deb android-sdk-platform-23_6.0.1+r72-6_all.deb

1. Download the native Debian source packages from the same Ubuntu repository

scrcpy_1.25.orig.tar.gz	        2023-01-21 	
scrcpy_1.25-1.debian.tar.xz	        2023-01-21 
scrcpy_1.25-1.dsc	                2023-01-21 	

_http://us.archive.ubuntu.com/ubuntu/pool/universe/s/scrcpy/scrcpy_1.25.orig.tar.gz
_http://us.archive.ubuntu.com/ubuntu/pool/universe/s/scrcpy/scrcpy_1.25-1.debian.tar.xz
_http://us.archive.ubuntu.com/ubuntu/pool/universe/s/scrcpy/scrcpy_1.25-1.dsc

$ ls -1
scrcpy_1.25-1.debian.tar.xz
scrcpy_1.25-1.dsc
scrcpy_1.25.orig.tar.gz

2. Extract the source code

dpkg-source -x *.dsc 
$ dpkg-source -x *.dsc
gpgv: Signature made Sat 21 Jan 2023 01:31:18 AM CET
gpgv:                using RSA key 7E7729476D87D6F11D91ACCBC293E7B461825ACE
gpgv: Can't check signature: No public key
dpkg-source: warning: cannot verify inline signature for ./scrcpy_1.25-1.dsc: no acceptable signature found
dpkg-source: info: extracting scrcpy in scrcpy-1.25
dpkg-source: info: unpacking scrcpy_1.25.orig.tar.gz
dpkg-source: info: unpacking scrcpy_1.25-1.debian.tar.xz
dpkg-source: info: using patch list from debian/patches/series
dpkg-source: info: applying 0001-Fit-SDK-23.patch 
$ ls -1
scrcpy-1.25
scrcpy_1.25-1.debian.tar.xz
scrcpy_1.25-1.dsc
scrcpy_1.25.orig.tar.gz

3. cd to the source code directory

cd scrcpy-1.25

4. Read "Build-Depends" in /debian/control

$ cat ./debian/control
Source: scrcpy
Section: net
Priority: optional
Maintainer: Yangfl <mmyangfl@gmail.com>
Build-Depends:
 debhelper-compat (= 13),
Build-Depends-Arch:
 meson,
 libavcodec-dev,
 libavdevice-dev,
 libavformat-dev,
 libavutil-dev,
 libsdl2-dev,
 libusb-1.0-0-dev,
Build-Depends-Indep:
 android-sdk,
 android-sdk-platform-23,
 default-jdk,
 unzip,
 zip,
Rules-Requires-Root: no
Standards-Version: 4.6.2
Homepage: https://github.com/Genymobile/scrcpy
Vcs-Git: https://salsa.debian.org/yangfl-guest/scrcpy.git
Vcs-Browser: https://salsa.debian.org/yangfl-guest/scrcpy

Package: scrcpy
Architecture: any
Depends: ${misc:Depends}, ${shlibs:Depends}, scrcpy-server (= ${source:Version}),
Recommends: adb,
Description: Display and control your Android device
 This application provides display and control of Android devices connected on
 USB (or over TCP/IP). It does not require any root access.
 .
 This package contains the client (desktop) binary.

Package: scrcpy-server
Architecture: all
Multi-Arch: foreign
Depends: ${misc:Depends},
Description: Display and control your Android device - server binary
 This application provides display and control of Android devices connected on
 USB (or over TCP/IP). It does not require any root access.
 .
 This package contains the server (mobile) binary, which will be pushed to the
 Android device. 

5. Install build dependencies

sudo mk-build-deps -i 
sudo apt install -f 

6. Build the packages

$ dpkg-buildpackage -us -uc -b
...
dpkg-deb: building package 'scrcpy' in '../scrcpy_1.25-1_amd64.deb'.
dpkg-deb: building package 'scrcpy-dbgsym' in '../scrcpy-dbgsym_1.25-1_amd64.deb'.
dpkg-deb: building package 'scrcpy-server' in '../scrcpy-server_1.25-1_all.deb'.
 dpkg-genbuildinfo --build=binary -O../scrcpy_1.25-1_amd64.buildinfo
 dpkg-genchanges --build=binary -O../scrcpy_1.25-1_amd64.changes
dpkg-genchanges: info: binary-only upload (no source code included)
 dpkg-source --after-build .
dpkg-buildpackage: info: binary-only upload (no source included) 
cd ../ 
$ ls -1 ./scr*.deb
./scrcpy_1.25-1_amd64.deb
./scrcpy-dbgsym_1.25-1_amd64.deb
./scrcpy-server_1.25-1_all.deb 

7. Install the packages

sudo dpkg -i scrcpy_1.25-1_amd64.deb scrcpy-server_1.25-1_all.deb 

You may also try to build the sources from Debian unstable:

_https://packages.debian.org/source/unstable/scrcpy
Download scrcpy
scrcpy_1.25-1.dsc   
scrcpy_1.25.orig.tar.gz   
scrcpy_1.25-1.debian.tar.xz

NOW WE KNOW WHERE TO SEARCH FOR MISSING PACKAGES.

The reference package:

scrcpy_1.25-1_amd64.deb	        2023-01-21 
http://us.archive.ubuntu.com/ubuntu/pool/universe/s/scrcpy/scrcpy_1.25-1_amd64.deb 

It is a native Debian package (without "ubuntu" mark) of 2023.

Ubuntu Maintainers Handbook:
When Ubuntu adds a change or modification on top on what is in Debian, that change is expressed in the version number. One can think of a version number consisting of three segments: [upstream_version]-[debian_revision]ubuntu[ubuntu_revision]. The - splits the upstream version from the Debian packaging segment as you have seen in Debian control field "Version". The ubuntu string then marks that whatever follows it is related to changes added in Ubuntu.
_https://github.com/canonical/ubuntu-maintainers-handbook/blob/main/VersionStrings.md

Of course, you can simply download the native Debian packages and install them. But they may work better, if they are rebuilt for Devuan. You can also rename the package, disable a sort of pulseaudio, remove systemd dependencies, etc.

Some packages should be rebuilt because of libc6 and/or other dependencies.

Last edited by igorzwx (2024-07-30 17:50:34)

Offline

#30 2024-07-29 08:30:14

geki
Member
Registered: 2019-02-04
Posts: 104  

Re: [SOLVED] Android -> Linux screen mirroring software

JFYI, the upstream developer has a how to build current release from sources for Debian based distros. Version 1.x is a bit old. [0]

[0] https://github.com/Genymobile/scrcpy/bl … st-version

Last edited by geki (2024-07-29 08:30:31)

Offline

#31 2024-07-29 12:30:20

igorzwx
Member
Registered: 2024-05-06
Posts: 105  

Re: [SOLVED] Android -> Linux screen mirroring software

Thank you for the link.

Have you already tried to build it?

If you really need it, you may start a new topic: "How to install the newest version of scrcpy?"

And 40 minutes after that, the FBI had Thomas's Samsung Android smartphone unlocked and open for detailed inspection of the shooter's social media, browsing, texting, whatever, history.
What's interesting is that in other, just it was coincidental really, reporting, it appears to be fortuitous for the FBI that Thomas was not using a later model Apple iOS device since some documents leaked from Cellebrite indicate its inability to unlock such devices. 9to5Mac picked up on this last Thursday, reporting under their headline "Cellebrite cannot unlock most iPhones running iOS 17.4 and later." They wrote: "Leaked documents reveal that Cellebrite cannot unlock iPhones running iOS 17.4 and later, at least as of the date of publication," which was April of this year. They said: "The company has confirmed that the documents are genuine. Cellebrite devices, which are widely used by law enforcement agencies, can crack most Android phones, though there are exceptions.
_https://www.grc.com/sn/sn-984.htm
Security Now: CrowdStruck
_https://youtu.be/eLkfKizz6NU

Last edited by igorzwx (2024-07-30 15:14:49)

Offline

Board footer