title: adb encounters "munmap_chunk(): invalid pointer" when trying to start server (Debian bullseye)
body: <p>I'm trying to run adb and getting this output (ran 'adb server'):</p>
  <pre><code>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 *
  </code></pre>
  <p>Contents of '/tmp/adb.1000.log':</p>
  <pre><code>--- 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
  </code></pre>
  <p>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.</p>
  <p><strong>My quick fix:</strong> Reinstall the package from buster.</p>
  <ol>
  <li>Remove the current versions of adb and other android tools: <code>sudo apt purge adb android*</code></li>
  <li>Replace 'bullseye' with 'buster' in /etc/apt/sources.list.</li>
  <li>Update apt: <code>sudo apt update</code></li>
  <li>Install adb: <code>sudo apt install adb</code></li>
  <li>Set /etc/apt/sources.list back to 'bullseye' and run <code>sudo apt update</code> again.</li>
  </ol>
  <p>N.B. This will make some Debian users tear their hair out (see '<a href="https://wiki.debian.org/DontBreakDebian#Don.27t_make_a_FrankenDebian" rel="nofollow noreferrer">Don't make a FrankenDebian</a>'). 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 <strong>as soon as this gets fixed</strong>.</p>
  <p>The bug has already been filed by two other users:</p>
  <p><a href="https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=975707" rel="nofollow noreferrer">https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=975707</a><br />
  <a href="https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=976007" rel="nofollow noreferrer">https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=976007</a></p>