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.
- Remove the current versions of adb and other android tools:
sudo apt purge adb android*
- Replace 'bullseye' with 'buster' in /etc/apt/sources.list.
- Update apt:
sudo apt update
- Install adb:
sudo apt install adb
- 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