From patchwork Wed Mar 15 12:34:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Miguel_=C3=81ngel_Moreno?= X-Patchwork-Id: 48015 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 12EA816C76; Wed, 15 Mar 2023 12:35:16 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id C19BB16961 for ; Wed, 15 Mar 2023 12:35:13 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pcQLS-0007V6-3k; Wed, 15 Mar 2023 08:35:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pcQLQ-0007UZ-AS for guix-patches@gnu.org; Wed, 15 Mar 2023 08:35:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pcQLQ-0007aq-0Y for guix-patches@gnu.org; Wed, 15 Mar 2023 08:35:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pcQLO-00012B-Lk for guix-patches@gnu.org; Wed, 15 Mar 2023 08:35:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#62201] [PATCH] gnu: Add payload-dumper. Resent-From: conses Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 15 Mar 2023 12:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 62201 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 62201@debbugs.gnu.org Cc: contact@conses.eu X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16788836513905 (code B ref -1); Wed, 15 Mar 2023 12:35:02 +0000 Received: (at submit) by debbugs.gnu.org; 15 Mar 2023 12:34:11 +0000 Received: from localhost ([127.0.0.1]:39278 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pcQKY-00010u-Se for submit@debbugs.gnu.org; Wed, 15 Mar 2023 08:34:11 -0400 Received: from lists.gnu.org ([209.51.188.17]:45064) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pcQKX-00010n-PN for submit@debbugs.gnu.org; Wed, 15 Mar 2023 08:34:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pcQKX-0006zF-Io for guix-patches@gnu.org; Wed, 15 Mar 2023 08:34:09 -0400 Received: from relay6-d.mail.gandi.net ([217.70.183.198]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pcQKV-0007NB-1P for guix-patches@gnu.org; Wed, 15 Mar 2023 08:34:09 -0400 Received: (Authenticated sender: contact@conses.eu) by mail.gandi.net (Postfix) with ESMTPSA id 15690C0005; Wed, 15 Mar 2023 12:34:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=conses.eu; s=gm1; t=1678883643; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type; bh=EWWqZ5Wd7Z/TNxgRFuq2YkXQhmfxSYeWzyP96M/XQ/A=; b=fbNa4bTqQDKhZkcUJRTDT013ANfGwYCm2eiz0mnuoAqBxLnff8TdbNg4/Rf2JV8GI2cZ5A sg4DVUbwqcq0ZV1utuLhNafm5FB3E2HrPDfvcUSFlQG4alJwG3ZjBu+70aum/U78BQd2Y+ pgDGjAG8Ib0C4rXU86keMac1O5j75u7XlPcUZ3VnfWQWMoiS4huc0w4L3kpMQAzxHXFV2y uLOIRX+KWe6cBnJkKGTFUhiE8MzW1MCaionUFHtxJsQd4ozpaDzfSnOwCuCSQ/EdGI9jKE sm95eo+59j78jdPI1ACPj0wo1+VaSbuXgsq4K+7baHDx7R0j4IjuQYFtuMbPqw== From: conses Date: Wed, 15 Mar 2023 13:34:01 +0100 Message-ID: <863566xkg6.fsf@conses.eu> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Received-SPF: pass client-ip=217.70.183.198; envelope-from=contact@conses.eu; helo=relay6-d.mail.gandi.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * 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")