2

i am working on an android app which stores data in sqlite db i want to be able to access the data that is currently stored in the emulator. How do i go about connecting to it and perform sql operations.

OMG Ponies
  • 325,700
  • 82
  • 523
  • 502
user648929
  • 144
  • 4
  • 11

3 Answers3

5
  • Open a terminal window
  • Get a list of AVD devices by entering: adb devices
  • If your terminal can't find the adb command then have a look at this post for OSX or Windows.
  • Start a shell connection to your AVD by entering: adb -s emulator-xxxx shell
  • Browse to the databases location: cd data/data/your.package.name/databases
  • Type sqlite3 xxxxx.db
  • For SQLite shell instructions see Command Line Shell For SQLite
Community
  • 1
  • 1
Marcel Verwey
  • 441
  • 5
  • 6
0

There is an example on that link about "sqlite command in adb"

Regis St-Gelais
  • 3,156
  • 5
  • 27
  • 40
  • 1
    The issue here is that you don't give the answer, just a link to a external source: https://stackoverflow.com/help/how-to-answer `Links to external resources are encouraged, but please add context around the link so your fellow users will have some idea what it is and why it’s there. Always quote the most relevant part of an important link, in case the target site is unreachable or goes permanently offline.` – Mario Lopez Nov 30 '18 at 00:07
0

In the eclipse, go in to FileExplorer, here you will find three root folders: here go in to 1.data 2.go in to data folder again 3. here you will find all the package names of the applications. 4. once you find your projects particular package, click on it. 5.you will see a folder called 'databases' 6.in that folder you will get the sqlite db file. 7.in order to pull it out of the emulator, just click on it and on the top right corner you will find 3 icons: one to delete, one to pull a file from device and the other to push file in the device. 8. after selecting the db file, click on the icon that says 'pull a file from the device'. Thats it mate ...cheers.

krisDrOid
  • 3,252
  • 3
  • 25
  • 36