unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: conses <contact@conses.eu>
To: 62201@debbugs.gnu.org
Cc: contact@conses.eu
Subject: [bug#62201] [PATCH] gnu: Add payload-dumper.
Date: Wed, 15 Mar 2023 13:34:01 +0100	[thread overview]
Message-ID: <863566xkg6.fsf@conses.eu> (raw)

* gnu/packages/android.scm (payload-dumper): New variable.
---
 gnu/packages/android.scm | 53 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 53 insertions(+)

diff --git a/gnu/packages/android.scm b/gnu/packages/android.scm
index 881b75d763..d7a308775f 100644
--- a/gnu/packages/android.scm
+++ b/gnu/packages/android.scm
@@ -51,6 +51,7 @@ (define-module (gnu packages android)
   #:use-module (gnu packages java)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages pcre)
+  #:use-module (gnu packages protobuf)
   #:use-module (gnu packages python)
   #:use-module (gnu packages python-crypto)
   #:use-module (gnu packages python-web)
@@ -982,6 +983,58 @@ (define-public git-repo
 script that you can put anywhere in your path.")
     (license license:asl2.0)))
 
+(define-public payload-dumper
+  (let ((commit "35134a28d641deda899c30aed57aace21bfd4a3c")
+        (revision "0"))
+    (package
+      (name "payload-dumper")
+      (version (git-version "0" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri
+          (git-reference
+           (url "https://github.com/vm03/payload_dumper")
+           (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "1sdq6dgva5yxz147bkv8xbf79pz60vwc33f0cmj9awgfbxha2b43"))))
+      (inputs
+       (list python-3 python-protobuf python-six python-bsdiff4))
+      (build-system python-build-system)
+      (arguments
+       (list
+        #:use-setuptools? #f
+        #:tests? #f
+        #:phases
+        #~(modify-phases %standard-phases
+            (delete 'build)
+            (replace 'install
+              (lambda* (#:key outputs #:allow-other-keys)
+                (begin
+                  (use-modules (guix build utils))
+                  (let* ((python (string-append
+                                  #$(this-package-input "python")
+                                  "/bin"))
+                         (bin (string-append #$output "/bin"))
+                         (target (string-append bin "/payload_dumper"))
+                         (version (python-version
+                                   #$(this-package-input "python")))
+                         (pydir (string-append #$output "/lib/python"
+                                               version "/site-packages")))
+                    (mkdir-p bin)
+                    (copy-file (string-append #$source "/payload_dumper.py")
+                               target)
+                    (install-file "update_metadata_pb2.py" pydir)
+                    (substitute* target
+                      (("/usr/bin/env python") (which "python3")))
+                    (chmod target #o555))))))))
+      (synopsis "Android OTA payload dumper")
+      (description "Script to extract the payload of incremental and full
+OTA's.")
+      (home-page "https://github.com/vm03/payload_dumper")
+      (license license:gpl3+))))
+
 (define-public abootimg
   (package
     (name "abootimg")
-- 
2.39.1



-- 
Best regards,
conses




             reply	other threads:[~2023-03-15 12:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-15 12:34 conses [this message]
2023-06-13 10:58 ` [bug#62201] [PATCH] gnu: Add payload-dumper Andrew Tropin
2023-06-28  7:51 ` Miguel Ángel Moreno
2023-06-29 13:14   ` Andrew Tropin
2023-06-29 16:59     ` Liliana Marie Prikler
2023-06-30  8:52       ` Miguel Ángel Moreno
2023-07-10 21:29         ` bug#62201: " Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=863566xkg6.fsf@conses.eu \
    --to=contact@conses.eu \
    --cc=62201@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).