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

Difference between revisions of "RockpiS/dev/adb"

< RockpiS‎ | dev
(Hardware and Software support)
(Usage of rockchi-adbd service)
 
(4 intermediate revisions by 2 users not shown)
Line 14: Line 14:
 
and the other port connected to the Type-A socket of the PC.
 
and the other port connected to the Type-A socket of the PC.
  
===Hardware and Software support===
+
===Hardware support===
  
 
Support hardware platform:
 
Support hardware platform:
Line 22: Line 22:
 
You'd better follow the installation steps.
 
You'd better follow the installation steps.
  
Firstly, update rockchip-overlay and  kernel packages.
+
=== Installation ===
  
  $ sudo apt-get install -y rockchip-overlay # >= 2.2
+
==== Windows ====
  $ sudo apt-get install -y linux-4.4-rockpis # >= 4.4.143-34-rockchip
+
  
Secondly, install rockchip-adb package.
+
Refer [[Rock/windows_adb | Windows ADB]]
  
  $ sudo apt-get install -y rockchip-adb # >= 0.3
+
==== Linux ====
  
Finally, start rockcihp service
+
Refer [[Rock/linux_adb | Linux ADB]]
  
  $ sudo systemctl start rockchip-adb
+
===ADB Usage===
  
=== Usage of rockchi-adb service ===
+
When you have adb driver installed on PC, below are some common used adb commands:
 
+
Start rockchip-adb service
+
 
+
  $ sudo systemctl start rockchip-adb
+
 
+
Stop rockchip-adb service
+
 
+
  $ sudo systemctl stop rockchip-adb
+
 
+
Reload rockchip-adb service
+
 
+
  $ sudo systemctl reload rockchip-adb
+
  or
+
  $ sudo systemctl restart rockchip-adb
+
 
+
===How to use adb===
+
 
+
When there is only one adb device on PC such as Linux Ubuntu.
+
 
+
Install necessary packags for  adb.
+
+
  $ sudo apt-get install -y android-tools-adb
+
  
 
====Check adb devices====
 
====Check adb devices====
Line 65: Line 42:
 
   0123456789ABCDEF device
 
   0123456789ABCDEF device
  
====Login====
+
====Login/Shell====
  
 
   $ adb shell
 
   $ adb shell
 
   #  
 
   #  
  
And type /bin/bash followed by Enter key.
+
And type /bin/bash followed by Enter key to switch to bash shell.
  
 
   $ adb shell
 
   $ adb shell
Line 83: Line 60:
 
Example:
 
Example:
  
On PC, start another new thermial
+
On PC, input the following in Terminal
  
 
   $ adb push /tmp/meet-rockpis.md /home/rock
 
   $ adb push /tmp/meet-rockpis.md /home/rock
Line 110: Line 87:
 
=== Troubleshooting ===
 
=== Troubleshooting ===
  
If you have issue with adb, start a new post on the forum. https://forum.radxa.com/c/dev
+
If adb device is not detected on host PC, try to [[RockpiS/ssh | ssh]] or use [[RockpiS/dev/serial-console | serial console]] first and try the following:
 +
 
 +
Firstly, update rockchip-overlay and  kernel packages.
 +
 
 +
  $ sudo apt-get install -y rockchip-overlay # >= 2.2
 +
  $ sudo apt-get install -y inux-4.4-rock-pi-s-latest # >= 4.4.143-34-rockchip
 +
 
 +
Secondly, install rockchip-adb package.
 +
 
 +
  $ sudo apt-get install -y rockchip-adbd # >= 0.6
 +
 
 +
Finally, start rockchip service
 +
 
 +
  $ sudo systemctl start rockchip-adbd
 +
 
 +
=== 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/dev

Latest revision as of 11:14, 28 October 2021

    ROCK Pi S >  Development >  Using adb 

Description

Rock Pi S supports adb function.

One USB Type-C charging data cable can meet both power supply and adb requirement.

Here we use Type-C to Type-A USB cable with one port connected to the Type-C socket of ROCK Pi S, and the other port connected to the Type-A socket of the PC.

Hardware support

Support hardware platform:

  • ROCK Pi S V11
  • ROCK Pi S V12

You'd better follow the installation steps.

Installation

Windows

Refer Windows ADB

Linux

Refer Linux ADB

ADB Usage

When you have adb driver installed on PC, below are some common used adb commands:

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@rockpis:/# 
 root@rockpis:/# 

Transmit files from PC to ROCK Pi S

 $ adb push <local path> <remote path>

Example:

On PC, input the following in Terminal

 $ adb push /tmp/meet-rockpis.md /home/rock
 0 KB/s (26 bytes in 0.045s)

Check on ROCK Pi S

 root@rockpis:/home/rock# cat meet-rockpis.md 
 How do you do! ROCK Pi S!

Transmit files from ROCK Pi S to PC

 $ adb pull <remote path> <local path>

Example:

 $ adb pull /home/rock/meet-pc.md /tmp/
 0 KB/s (19 bytes in 0.086s)
 
 $ cat /tmp/meet-pc.md 
 How do you do! PC!

FAQs

Troubleshooting

If adb device is not detected on host PC, try to ssh or use serial console first and try the following:

Firstly, update rockchip-overlay and kernel packages.

 $ sudo apt-get install -y rockchip-overlay # >= 2.2
 $ sudo apt-get install -y inux-4.4-rock-pi-s-latest # >= 4.4.143-34-rockchip

Secondly, install rockchip-adb package.

 $ sudo apt-get install -y rockchip-adbd # >= 0.6

Finally, start rockchip service

 $ sudo systemctl start rockchip-adbd

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/dev