summaryrefslogtreecommitdiff
path: root/gnu/packages/android.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/android.scm')
-rw-r--r--gnu/packages/android.scm111
1 files changed, 87 insertions, 24 deletions
diff --git a/gnu/packages/android.scm b/gnu/packages/android.scm
index f804f98a0f..ac5395bae2 100644
--- a/gnu/packages/android.scm
+++ b/gnu/packages/android.scm
@@ -4,7 +4,7 @@
;;; Copyright © 2016, 2020 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2017 Julien Lepiller <julien@lepiller.eu>
;;; Copyright © 2017 Hartmut Goebel <h.goebel@crazy-compilers.com>
-;;; Copyright © 2017, 2020, 2021, 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2017, 2020, 2021, 2022 Maxim Cournoyer <maxim@guixotic.coop>
;;; Copyright © 2018–2021 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2018 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2019, 2020, 2023 Andreas Enge <andreas@enge.fr>
@@ -12,7 +12,7 @@
;;; Copyright © 2020 Sergey Trofimov <sarg@sarg.org.ru>
;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
;;; Copyright © 2021 Petr Hodina <phodina@protonmail.com>
-;;; Copyright © 2023 Camilo Q.S. (Distopico) <distopico@riseup.net>
+;;; Copyright © 2023, 2025 Camilo Q.S. (Distopico) <distopico@riseup.net>
;;; Copyright © 2025 Jordan Moore <lockbox@struct.foo>
;;;
;;; This file is part of GNU Guix.
@@ -45,6 +45,7 @@
#:use-module (guix build-system qt)
#:use-module (guix build-system trivial)
#:use-module ((guix licenses) #:prefix license:)
+ #:use-module ((guix search-paths) #:select ($SSL_CERT_FILE))
#:use-module (gnu packages)
#:use-module (gnu packages check)
#:use-module (gnu packages compression)
@@ -434,6 +435,32 @@ of device actions, such as installing and debugging apps, and it provides access
to a Unix shell that can run commands on the connected device or emulator.")
(license license:asl2.0)))
+(define-public betteradbsync
+ (package
+ (name "betteradbsync")
+ (version "1.4.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/jb2170/better-adb-sync/")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "06ri9a8r0a4i9ih0cqdj5j19dbkbqwd5m5g8ch220rh4firaj4w2"))))
+ (build-system pyproject-build-system)
+ (arguments (list #:tests? #f)) ; there are none
+ (home-page "https://github.com/jb2170/better-adb-sync/")
+ (native-inputs (list python-setuptools python-wheel))
+ (synopsis "Rsync-like file transfer over @acronym{ADB,Android Debug Bridge}")
+ (description "An rsync-like command-line utility that facilitates file
+transfer over @acronym{ADB,Android Debug Bridge}. There are several additional
+features over Google's original @code{adbsync} version with support for the
+@code{--exclude}, @code{--exclude-from}, @code{--del}, and
+@code{--delete-excluded} command line flags, which have the same purpose to
+the corresponding @command{rsync} flags.")
+ (license license:asl2.0)))
+
(define-public mkbootimg
(package
(name "mkbootimg")
@@ -739,27 +766,47 @@ file system.")
(define-public sdkmanager
(package
(name "sdkmanager")
- (version "0.6.5")
- (source (origin
- (method url-fetch)
- (uri (pypi-uri "sdkmanager" version ".tar.gz"))
- (sha256
- (base32
- "11as7n2mj3nbqsqb3ivyv9985n73i022s748qvjg36cs8ig50afx"))))
+ (version "0.6.11")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "sdkmanager" version ".tar.gz"))
+ (sha256
+ (base32 "0r3xwk8xsfxvmxyw3d57sy2i9by24g0l1jl40735jiac9mypcg7n"))))
(build-system pyproject-build-system)
- (inputs (list python-requests
- python-argcomplete
- python-urllib3-1.26
- gnupg))
- (native-inputs (list python-setuptools python-wheel))
+ (inputs (list python-requests python-argcomplete python-urllib3
+ python-looseversion gnupg))
+ (native-inputs (list python-setuptools python-wheel python-requests-cache
+ python-defusedxml))
+ (native-search-paths
+ (list $SSL_CERT_FILE))
(arguments
- (list #:phases #~(modify-phases %standard-phases
- (add-before 'build 'patch-gnupg
- (lambda _
- (substitute* "sdkmanager.py"
- (("gpgv")
- (string-append #$(this-package-input "gnupg")
- "/bin/gpgv"))))))))
+ (list
+ #:test-flags
+ #~(list "-k" "test_*")
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'patch-tests
+ (lambda _
+ (substitute* "test_sdkmanager.py"
+ ;; Tests below require network.
+ (("def test_checksums_json_mirrors")
+ "def __test_checksums_json_mirrors")
+ (("def test_install_and_rerun")
+ "def __test_install_and_rerun")
+ (("def test_main_args")
+ "def __test_main_args")
+ (("def test_licenses")
+ "def __test_licenses"))))
+ (add-before 'build 'patch-gnupg
+ (lambda _
+ (substitute* "sdkmanager.py"
+ (("gpgv")
+ (string-append #$(this-package-input "gnupg") "/bin/gpgv")))))
+ (replace 'check
+ (lambda* (#:key tests? test-flags #:allow-other-keys)
+ (when tests?
+ (apply invoke "python" "-m" "unittest" test-flags)))))))
(home-page "https://gitlab.com/fdroid/sdkmanager")
(synopsis "Replacement for Android sdkmanager written in Python")
(description
@@ -772,7 +819,7 @@ line. The project also attempts to maintain the same terminal output.")
(define-public android-udev-rules
(package
(name "android-udev-rules")
- (version "20210501")
+ (version "20250525")
(source
(origin
(method git-fetch)
@@ -781,7 +828,7 @@ line. The project also attempts to maintain the same terminal output.")
(commit version)))
(file-name (git-file-name name version))
(sha256
- (base32 "0pl1wfd7k9vz8mvy2jb2icc5f11c5p07aixpyhjs6gi5cyaywm5f"))))
+ (base32 "1m5ngii9alsia81nk0cr8d13kpkrizbk7gpf9ai5yq8m9bsd9q70"))))
(build-system trivial-build-system)
(native-inputs `(("source" ,source)))
(arguments
@@ -1358,7 +1405,23 @@ mounted via FUSE.")
#:tests? #f ; no tests provided upstream
#:phases
;; There is no configure step.
- #~(modify-phases %standard-phases (delete 'configure))))
+ #~(modify-phases %standard-phases
+ (delete 'configure)
+ (add-before 'build 'patch-calloc-order
+ ;; As of the 1.1.5 release, the calloc argument order is
+ ;; wrong, and GCC 14 recognises this. We correct it here.
+ ;; When updating this package, remove these patches
+ ;; (fixed in master).
+ (lambda _
+ (substitute* "backed_block.cpp"
+ (("calloc[(]sizeof[(]struct backed_block_list[)], 1[)]")
+ "calloc(1, sizeof(struct backed_block_list))"))
+ (substitute* "simg2simg.cpp"
+ (("calloc[(]sizeof[(]struct sparse_file[*][)], files[)]")
+ "calloc(files, sizeof(struct sparse_file*))"))
+ (substitute* "sparse.cpp"
+ (("calloc[(]sizeof[(]struct sparse_file[)], 1[)]")
+ "calloc(1, sizeof(struct sparse_file))")))))))
(inputs (list zlib))
(home-page "https://github.com/anestisb/android-simg2img")
(synopsis "Convert Android sparse images to raw ext4 images")