Compare commits
9 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
| 2bb0b70c6e | |||
| aa89a23486 | |||
| aff95c3c0f | |||
| 3aa75c0b88 | |||
| a499ad3242 | |||
| dc4dc5103e | |||
| df6fdaade6 | |||
| 4a3d609ce1 | |||
| 7a9cfdb7a6 |
@@ -1,3 +1,38 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Jul 22 10:20:58 UTC 2025 - munix9@googlemail.com
|
||||
|
||||
- Add fix-libusb-enumeration.patch
|
||||
* Fix libusb enumeration to handle PINE64 PinePhone modem
|
||||
(gh#nmeum/android-tools#153)
|
||||
- The android-udev-rules package is now suggested but no longer
|
||||
required. See https://github.com/systemd/systemd/pull/36939
|
||||
and (gh#M0Rf30/android-udev-rules#344)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue May 27 09:28:29 UTC 2025 - munix9@googlemail.com
|
||||
|
||||
- Add fix-protobuf-30-compat.patch
|
||||
* vendor/extras/libjsonpb: Fix incompatibility with protobuf v30
|
||||
based on https://github.com/nmeum/android-tools/commit/0c4d799
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Mar 29 10:34:35 UTC 2025 - munix9@googlemail.com
|
||||
|
||||
- Use system libusb library (>= 1.0.28 with SuperSpeedPlus
|
||||
support) for Factory/TW
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Mar 9 05:32:44 UTC 2025 - munix9@googlemail.com
|
||||
|
||||
- Revoke "Use system fmt library for Leap >= 16", as "SLFO_Main"
|
||||
does not appear to provide an fmt library >= 10.2.0
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Mar 8 19:05:03 UTC 2025 - munix9@googlemail.com
|
||||
|
||||
- Fix build for Factory/TW: Add "BuildRequires: python-rpm-macros"
|
||||
- Use system fmt library for Leap >= 16
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Nov 5 05:16:45 UTC 2024 - munix9@googlemail.com
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package android-tools
|
||||
#
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
# Copyright (c) 2025 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -18,12 +18,11 @@
|
||||
|
||||
%if 0%{?suse_version} <= 1600
|
||||
%bcond_without bundled_libfmt
|
||||
%bcond_without bundled_libusb
|
||||
%else
|
||||
%bcond_with bundled_libfmt
|
||||
%bcond_with bundled_libusb
|
||||
%endif
|
||||
# currently libusb with support for SuperSpeedPlus is required,
|
||||
# which is not yet released, so the one bundled is used.
|
||||
%bcond_without bundled_libusb
|
||||
|
||||
Name: android-tools
|
||||
Version: 35.0.2
|
||||
@@ -34,11 +33,16 @@ URL: https://developer.android.com/studio/releases/platform-tools
|
||||
Source0: https://github.com/nmeum/android-tools/releases/download/%{version}/%{name}-%{version}.tar.xz
|
||||
# PATCH-FIX-OPENSUSE fix-install-completion.patch boo#1185883 munix9@googlemail.com -- Simplify completion
|
||||
Patch0: fix-install-completion.patch
|
||||
# PATCH-FIX-UPSTREAM fix-protobuf-30-compat.patch -- based on commit 0c4d799
|
||||
Patch1: fix-protobuf-30-compat.patch
|
||||
# PATCH-FIX-UPSTREAM fix-libusb-enumeration.patch gh#nmeum/android-tools#153
|
||||
Patch2: fix-libusb-enumeration.patch
|
||||
BuildRequires: cmake >= 3.12
|
||||
BuildRequires: go
|
||||
BuildRequires: llvm-gold
|
||||
BuildRequires: ninja
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: python-rpm-macros
|
||||
BuildRequires: pkgconfig(gtest)
|
||||
BuildRequires: pkgconfig(libbrotlicommon)
|
||||
BuildRequires: pkgconfig(liblz4)
|
||||
@@ -47,9 +51,9 @@ BuildRequires: pkgconfig(libunwind-generic)
|
||||
BuildRequires: pkgconfig(libzstd)
|
||||
BuildRequires: pkgconfig(protobuf) >= 21
|
||||
BuildRequires: pkgconfig(zlib)
|
||||
Requires: android-udev-rules
|
||||
Suggests: %{name}-mkbootimg = %{version}
|
||||
Suggests: %{name}-partition = %{version}
|
||||
Suggests: android-udev-rules
|
||||
Provides: %{name}-python3 = %{version}-%{release}
|
||||
Obsoletes: %{name}-python3 < %{version}-%{release}
|
||||
Provides: bundled(boringssl)
|
||||
@@ -71,7 +75,7 @@ BuildRequires: pkgconfig(fmt) >= 10.2.0
|
||||
BuildRequires: pkgconfig(libudev)
|
||||
Provides: bundled(libusb-1_0)
|
||||
%else
|
||||
BuildRequires: pkgconfig(libusb-1.0)
|
||||
BuildRequires: pkgconfig(libusb-1.0) >= 1.0.28
|
||||
%endif
|
||||
|
||||
%description
|
||||
|
||||
38
fix-libusb-enumeration.patch
Normal file
38
fix-libusb-enumeration.patch
Normal file
@@ -0,0 +1,38 @@
|
||||
From d349fae010f6c780d76e89c5d6b81d45119137c0 Mon Sep 17 00:00:00 2001
|
||||
From: Arnav Singh <me@arnavion.dev>
|
||||
Date: Sat, 3 Aug 2024 21:55:23 -0700
|
||||
Subject: [PATCH] Fix libusb enumeration to handle PINE64 PinePhone modem.
|
||||
|
||||
The PINE64 PinePhone modem exposes itself as an adb-accessible device over USB
|
||||
but its device class is LIBUSB_CLASS_MISCELLANEOUS, so allow that too.
|
||||
---
|
||||
vendor/adb/client/usb_libusb.cpp | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/vendor/adb/client/usb_libusb.cpp b/vendor/adb/client/usb_libusb.cpp
|
||||
index 6133e7c8..9af91eb7 100644
|
||||
--- a/vendor/adb/client/usb_libusb.cpp
|
||||
+++ b/vendor/adb/client/usb_libusb.cpp
|
||||
@@ -364,8 +364,8 @@ struct LibusbConnection : public Connection {
|
||||
}
|
||||
|
||||
bool FindInterface(libusb_device_descriptor* device_desc) {
|
||||
- if (device_desc->bDeviceClass != LIBUSB_CLASS_PER_INTERFACE) {
|
||||
- // Assume that all Android devices have the device class set to per interface.
|
||||
+ if (device_desc->bDeviceClass != LIBUSB_CLASS_PER_INTERFACE && device_desc->bDeviceClass != LIBUSB_CLASS_MISCELLANEOUS) {
|
||||
+ // Assume that all Android devices have the device class set to per interface or miscellaneous.
|
||||
// TODO: Is this assumption valid?
|
||||
VLOG(USB) << "skipping device with incorrect class at " << device_address_;
|
||||
return false;
|
||||
@@ -1039,7 +1039,7 @@ void usb_init() {
|
||||
static_cast<libusb_hotplug_event>(LIBUSB_HOTPLUG_EVENT_DEVICE_ARRIVED |
|
||||
LIBUSB_HOTPLUG_EVENT_DEVICE_LEFT),
|
||||
LIBUSB_HOTPLUG_ENUMERATE, LIBUSB_HOTPLUG_MATCH_ANY, LIBUSB_HOTPLUG_MATCH_ANY,
|
||||
- LIBUSB_CLASS_PER_INTERFACE, hotplug_callback, nullptr, nullptr);
|
||||
+ LIBUSB_HOTPLUG_MATCH_ANY, hotplug_callback, nullptr, nullptr);
|
||||
|
||||
if (rc != LIBUSB_SUCCESS) {
|
||||
LOG(FATAL) << "failed to register libusb hotplug callback";
|
||||
--
|
||||
2.46.0
|
||||
|
||||
11
fix-protobuf-30-compat.patch
Normal file
11
fix-protobuf-30-compat.patch
Normal file
@@ -0,0 +1,11 @@
|
||||
--- a/vendor/extras/libjsonpb/parse/jsonpb.cpp
|
||||
+++ b/vendor/extras/libjsonpb/parse/jsonpb.cpp
|
||||
@@ -33,7 +33,7 @@ using google::protobuf::util::TypeResolver;
|
||||
static constexpr char kTypeUrlPrefix[] = "type.googleapis.com";
|
||||
|
||||
std::string GetTypeUrl(const Message& message) {
|
||||
- return std::string(kTypeUrlPrefix) + "/" + message.GetDescriptor()->full_name();
|
||||
+ return std::string(kTypeUrlPrefix) + "/" + std::string(message.GetDescriptor()->full_name());
|
||||
}
|
||||
|
||||
ErrorOr<std::string> MessageToJsonString(const Message& message) {
|
||||
Reference in New Issue
Block a user