Use of ADB

Source: Internet
Author: User
Document directory
  • ADB debug SQLite

Development in Linux

After 2.3, the path of the ADB tool in the SDK is changed to platform-tools/, instead of the original tools/

If this path is not added to the path, you must enter the platform-tools path on the terminal. The command execution method is similar to./ADB devices (must have ./);

If you have added export Path =/home/yuebao/android-sdk-linux_86/platform-tools: $ path

The execution command in any path of the terminal is similar to ADB devices (No ./)

 

Problems:
"USB connects to the real machine and runs the ADB devices command in Ubuntu (9.10). The returned result is:


List of devices attached


???????????? No Permissions


This means that USB-connected devices can be identified. After Google, I learned that the ADB server needs to be started with the root permission, so I had the following command:


Brian @ Brian-LAPTOP :~ /Dev/Java/Android/android-sdk-linux_86/tools $./ADB kill-Server


Brian @ Brian-LAPTOP :~ /Dev/Java/Android/android-sdk-linux_86/tools $ sudo./ADB start-Server


* Daemon not running. Starting it now *


* Daemon started successfully *





The first command is used to kill the currently running server. The second command starts the new server with the root permission. We can view the devices again:


Brian @ Brian-LAPTOP :~ /Dev/Java/Android/android-sdk-linux_86/tools $./ADB Devices


List of devices attached


Ht848kv04386 Devic







ADB debug SQLite

ADB shell # Enter Shell
CD/data/Data
CD com. EX/databases

Sqlite3 studdb. DB # Enter SQLite
. Tables # List table names
Select * from student; # execute the query
. Mode column # change the display mode of query results
. Header on
Select * from student;

. Exit or. Quit

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.