Difference between revisions of "RockpiE/dev/adb"
(Created page with "{{rockpiE_header}} {{Languages|rockpiE/dev/adb}} ROCK Pi E > Development > Using adb === Requirement === * ROCK Pi E...") |
(→FAQ) |
||
(8 intermediate revisions by 4 users not shown) | |||
Line 22: | Line 22: | ||
[[File:rock-pi-e-usb-mala-a-to-dupont-cable.jpg | 500px ]] | [[File:rock-pi-e-usb-mala-a-to-dupont-cable.jpg | 500px ]] | ||
+ | |||
+ | ===Hardware support=== | ||
+ | |||
+ | Support hardware platform: | ||
+ | * ROCK Pi E V1.1 or later | ||
+ | |||
+ | You'd better follow the installation steps. | ||
+ | |||
+ | === Operations on ROCK Pi E === | ||
+ | |||
+ | You can use [[RockpiS/ssh | ssh]] or [[rockpiE/dev/serial-console | serial console]] to access ROCK Pi E. | ||
+ | |||
+ | Step 1: Add the following line to file '''/boot/uEnv.txt'''. | ||
+ | |||
+ | overlays=rk3328-uart2 '''rk3328-usb-otg''' | ||
+ | |||
+ | Step 2: Update rockchip-overlay, kernel, rockchip-adbd kernel packages. | ||
+ | |||
+ | $ sudo apt-get install -y rockchip-overlay | ||
+ | $ sudo apt-get install -y linux-4.4-rock-pi-e-latest | ||
+ | $ sudo apt-get install -y rockchip-adbd | ||
+ | |||
+ | Step 3: Reboot the device. | ||
+ | |||
+ | $ sudo reboot | ||
+ | |||
+ | === Operations on PC === | ||
+ | |||
+ | ==== Windows ==== | ||
+ | |||
+ | Install adb tool under Wins PC. Refer [[Rock/windows_adb | Windows ADB]] | ||
+ | |||
+ | ==== Linux ==== | ||
+ | |||
+ | Install adb tool under Linux PC. Refer [[Rock/linux_adb | Linux ADB]] | ||
+ | |||
+ | === ADB Usage === | ||
+ | |||
+ | Here we use adb to access ROCK Pi E 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@rockpie:/# | ||
+ | root@rockpie:/# | ||
+ | |||
+ | ====Transmit files from PC to ROCK Pi E==== | ||
+ | |||
+ | $ adb push <local path> <remote path> | ||
+ | |||
+ | Example: | ||
+ | |||
+ | On PC, input the following in Terminal | ||
+ | |||
+ | $ adb push /tmp/meet-rockpie.md /home/rock | ||
+ | 0 KB/s (26 bytes in 0.045s) | ||
+ | |||
+ | Check on ROCK Pi E | ||
+ | |||
+ | root@rockpie:/home/rock# cat meet-rockpie.md | ||
+ | How do you do! ROCK Pi E! | ||
+ | |||
+ | ====Transmit files from ROCK Pi E 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! | ||
+ | |||
+ | === FAQ === | ||
+ | |||
+ | ==== Usage of rockchi-adb 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/rockpie |
Latest revision as of 09:07, 30 August 2021
ROCK Pi E > Development > Using adb
Contents
Requirement
- ROCK Pi E mainboard
- eMMC module
- Power adapter
- USB Male A to Dupont cable.
- One port is Male A type and the other includes three Dupont lines.
- Hardware connection
ROCK Pi E 40-pin Header | USB Interface | USB Male A to Dupont Cable |
---|---|---|
PIN#18 | Data+ | Green wire |
PIN#16 | Data- | White wire |
PIN#14 | GND | Black wire |
Hardware support
Support hardware platform:
- ROCK Pi E V1.1 or later
You'd better follow the installation steps.
Operations on ROCK Pi E
You can use ssh or serial console to access ROCK Pi E.
Step 1: Add the following line to file /boot/uEnv.txt.
overlays=rk3328-uart2 rk3328-usb-otg
Step 2: Update rockchip-overlay, kernel, rockchip-adbd kernel packages.
$ sudo apt-get install -y rockchip-overlay $ sudo apt-get install -y linux-4.4-rock-pi-e-latest $ sudo apt-get install -y rockchip-adbd
Step 3: 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 Pi E 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@rockpie:/# root@rockpie:/#
Transmit files from PC to ROCK Pi E
$ adb push <local path> <remote path>
Example:
On PC, input the following in Terminal
$ adb push /tmp/meet-rockpie.md /home/rock 0 KB/s (26 bytes in 0.045s)
Check on ROCK Pi E
root@rockpie:/home/rock# cat meet-rockpie.md How do you do! ROCK Pi E!
Transmit files from ROCK Pi E 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!
FAQ
Usage of rockchi-adb 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/rockpie