简体   繁体   中英

Android to PC data exchange via adb

I've written an android application which reads database through the content providers. And now I want to display the database in a PC program. How can my PC program get the data gained by the android application? In other words, how to do data exchange between Android and PC via adb?

Thanks in advance!

Go in DDMS perspective, then open the File Explorer , there you can find data directories of the applications and system. Navigate to /data/data/you-package-name/databases , the click the Pull out file from the phone icon, save it wherever you want on your PC.

Android will not let you send files from device to PC using ADB. You can use adb pull to get files, but there isn't a way for the device to push. It would be easier to make a simple TCP client/server setup that would send data via WiFi or 3G. If you really need to use USB, you may be able to use the new USB APIs in Android 3.1.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM