Please enable javascript, or click here to visit my ecommerce web site powered by Shopify.
Jump to: navigation, search

Difference between revisions of "Rock3/dev/adb"

< Rock3‎ | dev
(Created page with "{{rock3_header}} {{Languages|rock3/dev/adb}} ROCK 3 > Development > Using adb ===Description=== ROCK 3 supports adb fun...")
 
 
Line 24: Line 24:
 
Step 3: Update rockchip-overlay, kernel, rockchip-adbd kernel packages to the latest version.
 
Step 3: Update rockchip-overlay, kernel, rockchip-adbd kernel packages to the latest version.
  
   $ sudo apt-get install update
+
   $ sudo apt-get update
 
   $ sudo apt-get install -y rockchip-overlay  
 
   $ sudo apt-get install -y rockchip-overlay  
 
   $ sudo apt-get install -y linux-4.19-rock-3-latest # (>=4.19.193-5-rockchip)
 
   $ sudo apt-get install -y linux-4.19-rock-3-latest # (>=4.19.193-5-rockchip)

Latest revision as of 09:56, 24 September 2021

    ROCK 3 >  Development >  Using adb

Description

ROCK 3 supports adb function. Here we use test it on ROCK 3A. Here we use Type-A to Type-A USB cable with one port connected to the Type-A socket of ROCK 3A, and the other port connected to the Type-A socket of the PC.

Hardware support

Support hardware platform:

  • ROCK 3A V1.1 or later

Operations on ROCK 3A

Step 1: Set the USB OTG switch to the device side(silk screen)

Step 2: Use ssh or serial console to access ROCK 3A.

Step 3: Update rockchip-overlay, kernel, rockchip-adbd kernel packages to the latest version.

 $ sudo apt-get update
 $ sudo apt-get install -y rockchip-overlay 
 $ sudo apt-get install -y linux-4.19-rock-3-latest # (>=4.19.193-5-rockchip)
 $ sudo apt-get install -y rockchip-adbd

Step 4: Reboot the device.

 $ sudo reboot

Operations on PC

Windows

Install adb tool under Wins PC. Refer Windows ADB

Linux

Install adb tool under Linux PC. Refer Linux ADB

ADB Usage

Here we use adb to access ROCK 3A under Linux PC.

Check adb devices

 $ adb devices
 List of devices attached 
 0123456789ABCDEF	device

Login/Shell

 $ adb shell
 # 

And type /bin/bash followed by Enter key to switch to bash shell.

 $ adb shell
 # /bin/bash
 root@rock3a:/# 
 root@rock3a:/# 

Transmit files from PC to ROCK 3A

 $ adb push <local path> <remote path>

Example:

On PC, input the following in Terminal

 $ adb push /tmp/meet-rock3a.md /home/rock
 /tmp/meet-rock3a.md: 1 file pushed. 0.0 MB/s (31 bytes in 0.002s)

Check on ROCK 3A

 root@rock3a:/# cat /home/rock/meet-rock3a.md 
 How do you do! ROCK 3 Model A!

Transmit files from ROCK 3A to PC

 $ adb pull <remote path> <local path>

Example:

 $ adb pull /home/rock/meet-pc.md /tmp
 /home/rock/meet-pc.md: 1 file pulled. 0.0 MB/s (19 bytes in 0.002s)
 $ cat /tmp/meet-pc.md 
 How do you do! PC!

FAQ

Usage of rockchip-adbd service

Start rockchip-adbd service

 $ sudo systemctl start rockchip-adbd

Stop rockchip-adbd service

 $ sudo systemctl stop rockchip-adbd

Reload rockchip-adbd service

 $ sudo systemctl reload rockchip-adbd
 or
 $ sudo systemctl restart rockchip-adbd

If you still have issue with adb, start a new post on the forum. https://forum.radxa.com/c/rock3