@@ -51,7 +51,7 @@ diff -Nru android-platform-tools-34.0.5/debian/changelog android-platform-tools-
5151--- android-platform-tools-34.0.5/debian/changelog 2025-04-04 06:03:19.000000000 +0000
5252+++ android-platform-tools-34.0.5/debian/changelog 2025-08-25 09:09:07.000000000 +0000
5353@@ -1,3 +1,10 @@
54- +android-platform-tools (34.0.5-12arduino3 ) unstable; urgency=medium
54+ +android-platform-tools (34.0.5-12arduino4 ) unstable; urgency=medium
5555+
5656+ * adbd:
5757+ - Remove root and switch to bash
@@ -137,13 +137,45 @@ diff -Nru android-platform-tools-34.0.5/debian/patches/adbd/adbd-disable-network
137137+ #if defined(__ANDROID__)
138138+ // Get the first valid port from addrs and setup mDNS.
139139+ int port = -1;
140+ diff -Nru android-platform-tools-34.0.5/debian/patches/adbd/adbd-restart-usb.patch android-platform-tools-34.0.5/debian/patches/adbd/adbd-restart-usb.patch
141+ --- android-platform-tools-34.0.5/debian/patches/adbd/adbd-restart-usb.patch 1970-01-01 00:00:00.000000000 +0000
142+ +++ android-platform-tools-34.0.5/debian/patches/adbd/adbd-restart-usb.patch 2025-09-11 12:50:26.000000000 +0000
143+ @@ -0,0 +1,15 @@
144+ +## Description: add some description
145+ +## Origin/Author: add some origin or author
146+ +## Bug: bug URL
147+ +Index: android-platform-tools-35.0.2/packages/modules/adb/transport.cpp
148+ +===================================================================
149+ +--- android-platform-tools-35.0.2.orig/packages/modules/adb/transport.cpp
150+ ++++ android-platform-tools-35.0.2/packages/modules/adb/transport.cpp
151+ +@@ -1251,6 +1251,7 @@ bool atransport::HandleRead(std::unique_ptr<apacket> p) {
152+ +
153+ + void atransport::HandleError(const std::string& error) {
154+ + LOG(INFO) << serial_name() << ": connection terminated: " << error;
155+ ++ exit(1);
156+ + fdevent_run_on_looper([this]() {
157+ + handle_offline(this);
158+ + transport_destroy(this);
159+ diff -Nru android-platform-tools-34.0.5/debian/adbd.service android-platform-tools-34.0.5/debian/adbd.service
160+ --- android-platform-tools-34.0.5/debian/adbd.service 2025-04-04 06:03:19.000000000 +0000
161+ +++ android-platform-tools-34.0.5/debian/adbd.service 2025-09-11 12:52:01.000000000 +0000
162+ @@ -10,6 +10,8 @@ ExecStartPre=/usr/lib/android-sdk/platform-tools/adbd-usb-gadget setup
163+ ExecStart=/usr/lib/android-sdk/platform-tools/adbd
164+ ExecStartPost=/usr/lib/android-sdk/platform-tools/adbd-usb-gadget activate
165+ ExecStopPost=/usr/lib/android-sdk/platform-tools/adbd-usb-gadget reset
166+ +Restart=always
167+ +RestartSec=1
168+
169+ [Install]
170+ WantedBy=multi-user.target
140171diff -Nru android-platform-tools-34.0.5/debian/patches/series android-platform-tools-34.0.5/debian/patches/series
141172--- android-platform-tools-34.0.5/debian/patches/series 2025-04-04 06:03:19.000000000 +0000
142173+++ android-platform-tools-34.0.5/debian/patches/series 2025-08-25 09:07:06.000000000 +0000
143- @@ -27,3 +27,6 @@
174+ @@ -27,3 +27,7 @@
144175 adbd/adbd-allow-notifying-systemd.patch
145176 adbd/adbd-usb-drop-property-monitor.patch
146177 adbd/adbd-don-t-require-authorization-on-Linux.patch
147178+adbd/adbd-drop-root.patch
148179+adbd/adbd-use-bash.patch
149180+adbd/adbd-disable-network-mode.patch
181+ +adbd/adbd-restart-usb.patch
0 commit comments