Skip to content
/ sdbd Public

Simple Debug Bridge Daemon (SDBD) Compatible ADBD

License

Notifications You must be signed in to change notification settings

openbfdev/sdbd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple Debug Bridge Daemon (SDBD)

Fully compatible with ADBD 🥳🥳🥳

Design goal

  • Single file implementation, lightweight.
  • Event driven, fully ASYNC framework, high-performance.

Features

  • Daemon mode
  • USB 3.2 SuperSpeed+ support
  • RSA-2048 Authentication
  • Version 2 transmission protocol
  • Shell version 2, can change windows size
  • Automatic timeout close for unresponsive services
  • Cross endianness (Big-Endian / Little-Endian)
  • USB hot plugging
  • Shell command
  • Reboot command
  • Remount command
  • Intel SSE2 / Arm Neon HW acceleration

Support commands

$ adb shell [args] ... # interactive shell
$ adb reboot [args] ... # reboot device
$ adb remount # remount /system
$ adb push local-path remote-path # push files to device
$ adb pull remote-path local-path # pull files from device

Benchmark test

SDBD speed:

sdbd-speed

SDBD v2 speed:

sdbd-speed

ADBD speed:

adbd-speed

SDBD is 14.2 times the speed of ADBD.

How to use

Usage:

$ sdbd --help
Usage: ./sdbd-reldbg [option] ...
Simple Debug Bridge Daemon (SDBD) v0.3
Hardware Acceleration: 'Arm Neon'

Options:
  -h, --help            Display this information.
  -v, --version         Display version information.
  -d, --daemon          Run in daemon mode.
  -n, --noauth          Do not use authentication.
  -a, --authfile=PATH   Selects a public key file.
  -f, --logfile=PATH    Redirect logs to file.
  -l, --loglevel=LEVEL  Set print log level threshold.
  -t, --timout=SECONDS  Set service idle timeout value.

The following optionals are for loglevel:
  0: Emerg    (System is unusable)
  1: Alert    (Action must be taken immediately)
  2: Crit     (Critical conditions)
  3: Error    (Error conditions)
  4: Warning  (Warning conditions)
  5: Notice   (Normal but significant condition)
  6: Info     (Informational)
  7: Debug    (Debug-level messages)

By default, SDBD retrieves the auth key from the path specified below:
  '/adb_keys'
  '/data/misc/adb/adb_keys'

For bug reporting, please visit:
<https://github.com/openbfdev/sdbd>

How to build

The project requires bfdev and bfenv dependencies. Ensure they are installed prior to building.

$ make # typical build
$ make small # small memory device
$ make reldbg # release debug version
$ make debug # asan debug version

Memory Overhead

SDBD: Transfer 256MiB file

sdbd-memory

SDBD Small: Transfer 256MiB file

sdbd-small-memory

Reference link

License

This is free software: you can redistribute it and/or modify it under the terms of the latest GNU Lesser General Public License as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this program. If not, see http://www.gnu.org/licenses/.