3

I'm trying to run adb and getting this output (ran 'adb server'):

ADB server didn't ACK
Full server startup log: /tmp/adb.1000.log
Server had pid: 7913
--- adb starting (pid 7913) ---
adb I 11-30 22:28:51  7913  7913 main.cpp:57] Android Debug Bridge version 1.0.39
adb I 11-30 22:28:51  7913  7913 main.cpp:57] Version 1:8.1.0+r23-8
adb I 11-30 22:28:51  7913  7913 main.cpp:57] Installed as /usr/lib/android-sdk/platform-tools/adb
adb I 11-30 22:28:51  7913  7913 main.cpp:57] 
adb I 11-30 22:28:51  7913  7913 adb_auth_host.cpp:416] adb_auth_init...
adb I 11-30 22:28:51  7913  7913 adb_auth_host.cpp:174] read_key_file '/home/tristan/.android/adbkey'...
munmap_chunk(): invalid pointer

* could not start server *

Contents of '/tmp/adb.1000.log':

--- adb starting (pid 7930) ---
adb I 11-30 22:30:00  7930  7930 main.cpp:57] Android Debug Bridge version 1.0.39
adb I 11-30 22:30:00  7930  7930 main.cpp:57] Version 1:8.1.0+r23-8
adb I 11-30 22:30:00  7930  7930 main.cpp:57] Installed as /usr/lib/android-sdk/platform-tools/adb
adb I 11-30 22:30:00  7930  7930 main.cpp:57] 
adb I 11-30 22:30:00  7930  7930 adb_auth_host.cpp:416] adb_auth_init...
adb I 11-30 22:30:00  7930  7930 adb_auth_host.cpp:174] read_key_file '/home/tristan/.android/adbkey'...
munmap_chunk(): invalid pointer

Before submitting, I managed to solve this issue. I'm putting the solution here for others who encounter it. The issue is with the Debian Android Tools Maintainers.

My quick fix: Reinstall the package from buster.

  1. Remove the current versions of adb and other android tools: sudo apt purge adb android*
  2. Replace 'bullseye' with 'buster' in /etc/apt/sources.list.
  3. Update apt: sudo apt update
  4. Install adb: sudo apt install adb
  5. Set /etc/apt/sources.list back to 'bullseye' and run sudo apt update again.

N.B. This will make some Debian users tear their hair out (see 'Don't make a FrankenDebian'). This solution is sketchy and very temporary. Make sure to set your sources.list back to the version you're using (bullseye in my case), and update adb as soon as this gets fixed.

The bug has already been filed by two other users:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=975707
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=976007

1 Answers1

1

My quick (and dirty) fix:

  1. Download the latest adb version from Google
  2. Copy only adb file from archive OVER /usr/lib/android-sdk/platform-tools/adb
Eran Dukas
  • 11
  • 1
  • Nice! That works too. I guess my friend (a Debian developer) has made me a bit of a prude about getting packages from Debian (and not upstream). – ifandonlyif Dec 04 '20 at 08:28
  • This is good. For a little more cleanliness, you can download the archive into the current working directory and extract adb with "unzip -j platform-tools_r30.0.5-linux.zip platform-tools/adb", then run it with ./adb . This way you don't need root, and you don't modify system binaries outside of the system packaging process. – Slartibartfast Dec 07 '20 at 03:03