Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Debug in Adb Shell

Download as pdf or txt
Download as pdf or txt
You are on page 1of 16

Debug In ADB Shell

Version 1.2

This specification is proprietary and confidential to NEXGO and may not be published or disclosed in whole
or in part without prior permission of NEXGO.
Debug In ADB Shell

Contents

Version History ................................................................................................................... 3

1 Install USB Driver ......................................................................................................... 4

2 Install ADB Development Tool..................................................................................... 7

3 ADB Commands ........................................................................................................... 9

4 Development Application Examples ..........................................................................10

5 Appendix A ..................................................................................................................12

Page 2
Debug In ADB Shell

Version History

Version Date Comment Author


1.0 2019-07-04 Initial Version Guifeng Huang
1. Deleted the description about switching
“to gs0” and “to gdb” in the test program.
1.1 2019-12-04 2. Added the description about the USB Steven Guo
driver for the release terminal.

1. Added the description about the USB


1.2 2021-06-08 driver for T6 terminal. Gavin Huang

Page 3
Debug In ADB Shell

1 Install USB Driver

Step 1 Prepare the driver package, if your terminal is in the debug mode, you need use the

“simcom_signed-10040-9033-9029(debug).rar” package for G2-4G,


“Quectel_LTE&5G_Windows_USB_Driver_V2.2.5_no_netadapter(debug.zip)”
package for K300, and “DriverAssitant.rar” package for T6. If your terminal is in the
release mode, you only need use “XGD_VCOM_Driver_v2.2(release).zip (for release
terminal, excluding windows 10)” package. you can find all these packages in the ftp
directory “/XGD-ADS/compiler/compiler-for-windows_or_mac/USB_Driver/”, then
extract it to a specified directory.

Step 2 Connect the PC and POS with the USB cable. Hold keys “F + 1” and then press

POWER key to restart the terminal. When the buzzer rings once on the splash screen,
just release the keys and wait till it enters the downloading program automatically. If the
USB driver is not installed, it will prompt “Open USB port fail” when selecting “1. USB
port”.

Step 3 You will find 4 unidentified devices in the device manager of your PC.

Page 4
Debug In ADB Shell

Step 4 Right-click the unidentified device, select "Update Driver" in the pop-up menu, and

browse the computer to find the driver software extracted in the first step, then install the
driver. Every unknown device needs to be installed once, and it needs to be installed
four times in total.

Page 5
Debug In ADB Shell

Step 5 If the PC is installed with the Windows 10 operating system, you need to disable the

driver mandatory signature before installing the driver. (See the Appendix A for the
specific operation process.)
Page 6
Debug In ADB Shell

2 Install ADB Development Tool

Step 1 Copy the adb_usb.ini file (\XGD-ADS\compiler\compiler-for-windows_or_mac\

USB_Driver\) to the “C:\Users\<user name>\.android\” directory.

Step 2 Prepare the adb.zip package provided (\XGD-ADS\compiler\compiler-for-

windows_or_mac\USB_Driver\ ), you can also get this package on


http://adbshell.com/downloads/ .

Step 3 Unzip the adb.zip package, you will get abd.exe, AdbWinApi.dll and

AdbWinUsbApi.dll, Copy these three files to the “C:\Windows\SysWOW64” directory.

Step 4 Open the “Control Panel” menu of your PC. Select “Advanced system settings”

->”Environment Variables”. In the Environment Variables window, select the Path


variable in the System variables section and click the Edit button. Add the path
“C:\Windows\SysWOW64” as shown below.

Step 5 Press Win+R keys on your keyboard. Then, type cmd and press Enter or click/tap OK

to launch the Command Prompt.

Step 6 Type adb command, if the ADB version and relevant information are output as shown

below, it means the installation of the ADB tool is successfully completed.

Page 7
Debug In ADB Shell

Page 8
Debug In ADB Shell

3 ADB Commands

Here are some of the ADB commands that are commonly used in the debugging process.

 adb ---- Print a list of supported adb commands and their descriptions.
 adb devices ---- Generate a list of attached devices.
 adb shell ---- Enter shell of device.
 adb -s <device name> shell ---- If multiple devices are running, you must specify the
target device when you issue the adb command.
 adb push <Local path> <Remote path> ---- Upload file from computer to device.
 adb pull <Remote path> <Local path> ---- Download file from device to computer.
 adb kill-server ---- kill the server if it is running
 adb start-server ---- ensure that there is a server running

Page 9
Debug In ADB Shell

4 Development Application Examples

Step 1 Compile your application as shown below.

Step 2 Connect the PC and POS with the USB cable and restart the POS. If "device not found"

error is returned when you enter the “adb shell” command, please try to restart ADB
using “adb kill-server” and “adb start-server” command.

Step 3 Push your application to the device using the ADB command and give the application

file executable permission.

Step 4 Kill daemon, manage and all other application processes, then execute

“/os/bin/daemon.bin&” to run the application, or just restart the terminal.

Page 10
Debug In ADB Shell

Step 5 If you find that the application has not been executed, check the device's multitask.ini

file, which you can export and modify before importing it into the terminal.

Page 11
Debug In ADB Shell

5 Appendix A

How to disable the driver mandatory signature in window 10:

Step 1 Click "Notifications" in the lower right corner of the desktop to find and enter "All
Settings":

Step 2 Enter "Update and Security":

Page 12
Debug In ADB Shell

Step 3 Select “recovery” and click "Restart now" under "Advanced Startup" to restart the

computer:

Step 4 Select "Troubleshooting" after rebooting:

Page 13
Debug In ADB Shell

Step 5 Select "Advanced Options":

Step 6 Select "Startup Settings":

Page 14
Debug In ADB Shell

Step 7 Click "Reboot",windows will reboot:

Step 8 When prompted, enter "F7" to disable the driver signature enforcement:

Page 15
Debug In ADB Shell

Page 16

You might also like