As I said in the title I am unable get adb working. I am running the latest version of Debian from the official Beaglebone website. I installed android-tools-adb
and android-tools-fastboot
packages and when I run adb devices
command I get:
List of devices attached
* daemon not running; starting now at tcp:5037
ADB server didn't ACK
Full server startup log: /tmp/adb.0.log
Server had pid: 1718
--- adb starting (pid 1718) ---
adb I 07-24 09:45:21 1718 1718 main.cpp:57] Android Debug Bridge version 1.0.39
adb I 07-24 09:45:21 1718 1718 main.cpp:57] Version 1:8.1.0+r23-5
adb I 07-24 09:45:21 1718 1718 main.cpp:57] Installed as /usr/lib/android-sdk/platform-tools/adb
adb I 07-24 09:45:21 1718 1718 main.cpp:57]
adb I 07-24 09:45:21 1718 1718 adb_auth_host.cpp:416] adb_auth_init...
adb I 07-24 09:45:21 1718 1718 adb_auth_host.cpp:262] User key '/root/.android/adbkey' does not exist...
adb I 07-24 09:45:21 1718 1718 adb_auth_host.cpp:109] generate_key(/root/.android/adbkey)...
* failed to start daemon
error: cannot connect to daemon
And the result from adb nodaemon server
command:
adb I 07-24 09:47:13 1721 1721 adb_auth_host.cpp:416] adb_auth_init...
adb I 07-24 09:47:13 1721 1721 adb_auth_host.cpp:262] User key '/root/.android/adbkey' does not exist...
adb I 07-24 09:47:13 1721 1721 adb_auth_host.cpp:109] generate_key(/root/.android/adbkey)...
Bus error
Adb clearly says to me Bus error
but why? I mean even lsusb
tells me that all is working fine:
Bus 001 Device 004: ID 18d1:4ee7 Google Inc.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
And even more weird when I do the same things with the same cable same android device on a new fresh raspberry all is working fine as expected.
Here is the output from gdb:
(gdb) bt
#0 0xb6c6f27c in ?? () from /usr/lib/arm-linux-gnueabihf/android/libcrypto.so.0
#1 0xb6c6f60e in ?? () from /usr/lib/arm-linux-gnueabihf/android/libcrypto.so.0
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb) disas
No function contains program counter for selected frame.
(gdb) info reg
r0 0x436408 4416520
r1 0x436408 4416520
r2 0x8 8
r3 0x436490 4416656
r4 0x4364b0 4416688
r5 0xe 14
r6 0xb6c6eba1 3066489761
r7 0xb6c6f5e1 3066492385
r8 0x43658c 4416908
r9 0xbeffce48 3204435528
r10 0xe 14
r11 0xbeffd04c 3204436044
r12 0xbeffc7a8 3204433832
sp 0xbeffc7a8 0xbeffc7a8
lr 0xb6c6f60f -1228474865
pc 0xb6c6f27c 0xb6c6f27c
cpsr 0x600d0030 1611464752
fpscr 0x60000000 1610612736
(gdb) disas $pc-0x80,$pc+0x80
Dump of assembler code from 0xb6c6f1fc to 0xb6c6f2fc:
0xb6c6f1fc: vand q10, q10, q8
0xb6c6f200: vand q11, q11, q8
0xb6c6f204: veor q7, q7, q10
0xb6c6f208: vshl.s64 q10, q10, #4
0xb6c6f20c: veor q3, q3, q11
0xb6c6f210: vshl.s64 q11, q11, #4
0xb6c6f214: veor q1, q1, q10
0xb6c6f218: veor q0, q0, q11
0xb6c6f21c: vldmia r4, {d16-d17}
0xb6c6f220: veor q4, q4, q8
0xb6c6f224: veor q6, q6, q8
0xb6c6f228: veor q3, q3, q8
0xb6c6f22c: veor q7, q7, q8
0xb6c6f230: veor q2, q2, q8
0xb6c6f234: veor q5, q5, q8
0xb6c6f238: veor q0, q0, q8
0xb6c6f23c: veor q1, q1, q8
0xb6c6f240: bx lr
0xb6c6f242: nop
0xb6c6f244: nop.w
0xb6c6f248: nop.w
0xb6c6f24c: nop.w
0xb6c6f250: subw r6, pc, #3
0xb6c6f254: vld1.8 {d14-d15}, [r4]!
0xb6c6f258: sub.w r6, r6, #1712 ; 0x6b0
0xb6c6f25c: vld1.8 {d30-d31}, [r4]!
0xb6c6f260: vmov.i8 q8, #1 ; 0x01
0xb6c6f264: vmov.i8 q9, #2 ; 0x02
0xb6c6f268: vmov.i8 q10, #4 ; 0x04
0xb6c6f26c: vmov.i8 q11, #8 ; 0x08
0xb6c6f270: vmov.i8 q12, #16 ; 0x10
0xb6c6f274: vmov.i8 q13, #32 ; 0x20
0xb6c6f278: vldmia r6, {d28-d29}
=> 0xb6c6f27c: vrev32.8 q7, q7
0xb6c6f280: vrev32.8 q15, q15
0xb6c6f284: sub.w r5, r5, #1
0xb6c6f288: vstmia r12!, {d14-d15}
0xb6c6f28c: b.n 0xb6c6f290
0xb6c6f28e: nop
0xb6c6f290: vtbl.8 d14, {d30-d31}, d28
0xb6c6f294: vtbl.8 d15, {d30-d31}, d29
0xb6c6f298: vmov.i8 q6, #64 ; 0x40
0xb6c6f29c: vmov.i8 q15, #128 ; 0x80
0xb6c6f2a0: vtst.8 q0, q7, q8
0xb6c6f2a4: vtst.8 q1, q7, q9
0xb6c6f2a8: vtst.8 q2, q7, q10
0xb6c6f2ac: vtst.8 q3, q7, q11
0xb6c6f2b0: vtst.8 q4, q7, q12
0xb6c6f2b4: vtst.8 q5, q7, q13
0xb6c6f2b8: vtst.8 q6, q7, q6
0xb6c6f2bc: vtst.8 q7, q7, q15
0xb6c6f2c0: vld1.8 {d30-d31}, [r4]!
0xb6c6f2c4: vmvn q0, q0
0xb6c6f2c8: vmvn q1, q1
0xb6c6f2cc: vmvn q5, q5
0xb6c6f2d0: vmvn q6, q6
0xb6c6f2d4: vrev32.8 q15, q15
0xb6c6f2d8: subs r5, #1
0xb6c6f2da: vstmia r12!, {d0-d15}
0xb6c6f2de: bne.n 0xb6c6f290
0xb6c6f2e0: vmov.i8 q7, #99 ; 0x63
--Type <RET> for more, q to quit, c to continue without paging--
0xb6c6f2e4: bx lr
0xb6c6f2e6: nop
0xb6c6f2e8: nop.w
0xb6c6f2ec: nop.w
0xb6c6f2f0: nop.w
0xb6c6f2f4: nop.w
0xb6c6f2f8: nop.w
End of assembler dump.
(gdb) disas $lr-0x80,$lr+0x80
Dump of assembler code from 0xb6c6f58f to 0xb6c6f68f:
0xb6c6f58f: strh r0, [r0, #0]
0xb6c6f591: sub.w r0, r0, #16
0xb6c6f595: mov r10, r1
0xb6c6f597: mov r1, r9
0xb6c6f599: mov r2, r3
0xb6c6f59b: vorr q4, q15, q15
0xb6c6f59f: vorr q5, q0, q0
0xb6c6f5a3: blx 0xb6c13bdc <AES_decrypt@plt+4>
0xb6c6f5a7: vld1.8 {d0-d1}, [r9]
0xb6c6f5ab: veor q0, q0, q4
0xb6c6f5af: vorr q15, q5, q5
0xb6c6f5b3: vst1.8 {d0-d1}, [r10]
0xb6c6f5b7: vmov.i32 q0, #0 ; 0x00000000
0xb6c6f5bb: vmov.i32 q1, #0 ; 0x00000000
0xb6c6f5bf: vstmia sp!, {d0-d3}
0xb6c6f5c3: cmp sp, r9
0xb6c6f5c5: bne.n 0xb6c6f5be
0xb6c6f5c7: mov sp, r9
0xb6c6f5c9: add sp, #16
0xb6c6f5cb: vst1.8 {d30-d31}, [r8]
0xb6c6f5cf: vpop {d8-d15}
0xb6c6f5d3: ldmia.w sp!, {r4, r5, r6, r7, r8, r9, r10, pc}
0xb6c6f5d7: nop
0xb6c6f5d9: nop.w
0xb6c6f5dd: nop.w
0xb6c6f5e1: cmp r2, #8
0xb6c6f5e3: bcc.w 0xb6c6f780
0xb6c6f5e7: mov r12, sp
0xb6c6f5e9: stmdb sp!, {r4, r5, r6, r7, r8, r9, r10, lr}
0xb6c6f5ed: vpush {d8-d15}
0xb6c6f5f1: ldr.w r8, [r12]
0xb6c6f5f5: sub sp, #16
0xb6c6f5f7: mov r9, sp
0xb6c6f5f9: ldr.w r10, [r3, #240] ; 0xf0
0xb6c6f5fd: sub.w r12, sp, r10, lsl #7
0xb6c6f601: add.w r12, r12, #96 ; 0x60
0xb6c6f605: mov r4, r3
0xb6c6f607: mov r5, r10
0xb6c6f609: mov sp, r12
0xb6c6f60b: bl 0xb6c6f250
0xb6c6f60f: veor q7, q7, q15
0xb6c6f613: vstmia r12, {d14-d15}
0xb6c6f617: vld1.8 {d0-d1}, [r8]
0xb6c6f61b: add.w r8, r6, #16
0xb6c6f61f: vldmia sp, {d8-d9}
0xb6c6f623: vmov.i32 q8, #1 ; 0x00000001
0xb6c6f627: veor q9, q9, q9
0xb6c6f62b: vrev32.8 q0, q0
0xb6c6f62f: vext.8 q8, q9, q8, #4
0xb6c6f633: vrev32.8 q4, q4
0xb6c6f637: vadd.i32 q9, q8, q8
0xb6c6f63b: vstmia sp, {d8-d9}
0xb6c6f63f: b.n 0xb6c6f640
0xb6c6f641: vadd.i32 q10, q8, q9
0xb6c6f645: vadd.i32 q1, q0, q8
0xb6c6f649: vadd.i32 q2, q0, q9
0xb6c6f64d: vadd.i32 q3, q0, q10
0xb6c6f651: vadd.i32 q4, q1, q10
0xb6c6f655: vadd.i32 q5, q2, q10
0xb6c6f659: vadd.i32 q6, q3, q10
0xb6c6f65d: vadd.i32 q7, q4, q10
This worked for me. Not going to lie I am a novice when it comes to linux but this allowed me to connect to my phone with adb. Hope it helps until buster is fixed.
From Link rk-zero commented on Jan 17, 2020:
I know this is more a debian issue, but i use this device as my main and only computer, so adb not working and quitting with key not found was a big issue for me.
To fix it, add stretch as a source in /etc/apt/sources.d/stretch.list
deb http://deb.debian.org/debian/ stretch main
then downgrade adb:
apt update && apt install adb=1:7.0.0+r33-1 android-libadb=1:7.0.0+r33-1 android-libbase=1:7.0.0+r33-1 android-liblog=1:7.0.0+r33-1 android-libcutils=1:7.0.0+r33-1
voila, adb works again. Quote https://github.com/SolidHal/PrawnOS/issues/143
User contributions licensed under CC BY-SA 3.0