Saturday, February 8, 2014
android pc via usb operation of sqlite database
As stated, I am developing a android program, as it relates to confidentiality is prohibited wireless network, but need to connect the pc server database to upload and update data can only be operated via USB. The original solution is the first by adb pull the sqlite db file copying on pc, update through an application on the PC after a good database db data via adb push to copy files back android tablet PC, but this copy of the data Excessive consumption of time, the operation is relatively time-consuming, can not pass the PC directly to the android sqlite database operations. A class of software like peas in a pod like contact information can be read directly in the database. Online for a long time and no good way. . . . .
Reply:
The right to use the socket, peas clip will also install an apk file inside the phone, and pc to communicate this apk reads contacts, text messages, etc., and then send the pipe socket pc
Reply:
In the end you have a client PC fishes, two letters of communication, USB2.0 should also be right, in fact, nor is it unsafe to go wireless, depending on how to deal with
Reply:
With ADB shell commands, environment variables to configure your will.
Is the android-sdk-windows directory tools and full path platform-tools directory Copy the environment variable path.
You should Council.
Then you can operate directly, as shown below:
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C: \ Users \ SUN> adb shell
# Cd data / data / com.hwtt.mobile / databases
cd data / data / com.hwtt.mobile / databases
# Ls-l
ls-l
-Rw-rw ---- app_49 app_49 110592 2012-08-17 09:18 OAMOBILEDB
-Rw-rw ---- app_49 app_49 14336 2012-08-17 12:58 webview.db
-Rw-rw ---- app_49 app_49 20480 2012-08-17 13:00 webviewCache.db
# Sqlite3 OAMOBILEDB
sqlite3 OAMOBILEDB
SQLite version 3.6.22
Enter ". Help" for instructions
Enter SQL statements terminated with a ";"
sqlite>. schema
. Schema
CREATE TABLE ALREADYSAVE_TABLE (_id integer primary key autoincrement, SAVEDATA_TYPE integer, SAVEDATATYPE_ID integer, USER_ID
integer, DEPART_ID varchar (30));
CREATE TABLE DEPART_TABLE (_id integer primary key autoincrement, DEPART_ID varchar (30) not null, SUPER_DEPART_ID varchar (30)
not null, DEPART_NAME varchar (50) not null, DEPART_DESCRIPTION text, DEPART_RESPONSIBLE_PERSON integer);
CREATE TABLE GROUP_MEMBER_TABLE (_id integer primary key autoincrement, USER_ID integer not null, GROUP_ID integer not null, M
EMBER_TYPE varchar (30));
CREATE TABLE GROUP_TABLE (_id integer primary key autoincrement, GROUP_ID integer not null, GROUP_NAME varchar (30) not null, G
ROUP_DESCRIPTION text, GROUP_ISDEL integer, GROUP_CREATE_PERSON integer);
CREATE TABLE PERSONMSG_TABLE (_id integer primary key autoincrement, TITLE varchar (50), CONTENT text, OUTOBXPERSON varchar (30)
, INBOXPERSON varchar (30), CREATEDATE varchar (30), STATUS integer);
CREATE TABLE PERSONSMS_TABLE (_id integer primary key autoincrement, PHONE_NUMBER varchar (20), CONTENT text, TYPE varchar (30),
OUTOBXPERSON varchar (30), CREATEDATE varchar (30), REPLYDATE varchar (30));
CREATE TABLE TMPIC_TABLE (_id integer primary key autoincrement, FILENAME varchar (100), BLOCKINDEX integer, BlLOCKVALUE intege
r, BLOCKSIZE integer, FILEFLAG integer);
CREATE TABLE USER_TABLE (_id integer primary key autoincrement, USER_ID integer not null, USER_NAME varchar (30) not null, DEPA
RT_ID varchar (30) not null, POSITION_NAME varchar (30));
CREATE TABLE android_metadata (locale TEXT);
sqlite>
Reply:
LZ, Can you say adb to achieve next to me said, ah, very anxious to use and I am also involved in secret so that only let through USB to transfer data. . Thanks
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment