A little background. I've had an app with a database that's worked fine for a few years. I added new options, including DELETE DATABASE, with this line of code:


No error. But now I get exceptions where I try to re-load or create a new database. I wondered if there was a possibly-corrupted database on the emulator or if a file with the name I was using was present but with 0 size, somehow. I needed to see it in a directory listing. Never seen one before.

Using adb at the DOS command prompt, I (finally; long time spent) found command syntax to show the files. Here's the command:

C:\Users\Dov>adb ls /data/data/com.dslomer64.servyhelperton/databases

Here's the output.

000041f9 00001000 59b7bc7d .
000041e9 00001000 59b5a17d ..
000081b0 00005000 59b72501 Dictionary.dic
00008180 00002210 59b72501 Dictionary.dic-journal
000081b0 00005000 59b6e3c3 TEST2.dic
00008180 00002210 59b6e3c3 TEST2.dic-journal
000081b0 00005000 59b710c8 TEST.dic
00008180 00002210 59b710c8 TEST.dic-journal

YAY. But what are the columns of numbers? Size? Mod/create date?

(I think the two less-urgent questions below just require YES/NO answers.) (I would hate to start a new Question for either.)

Just to see what I'd get, I asked for ls of the database itself:

C:\Users\Dov>adb ls /data/data/com.dslomer64.servyhelperton/databases/Dictionary.dic


Got no error. Got nothing. Did anything hidden happen?

I pulled TEST.dic and opened it with Notepad. Not text.

But assuming what I pulled is a valid SQLite database, could an app read it?

  • 1
    The columns do in fact look weird, no idea what's going on there. But deducing from the file names, I'd say what you see there are indeed SQLite databases (telling by the -journal files next to them, SQLite3). Have you tried opening the pulled databases with e.g. SQLiteman or some other SQLite tool?
    – Izzy
    Sep 12 '17 at 19:03
  • Good point. I'll try sqlite.exe.
    – DSlomer64
    Sep 13 '17 at 9:05
  • Yes! One is, so surely all 3 are normal databases, pulled from this emulator or that. Thanks for the suggestion, @Izzy!
    – DSlomer64
    Sep 13 '17 at 9:13
  • Glad I could help! Can't put it as answer, though, as the main part of your question rather is on that strange output from ls. Those 3 cols look like hex values or hashes of something. Could you include some details on what Android you're running in that emulator (the tag suggests your talking about running in one), and also what kind of file system it uses for the corresponding partition?
    – Izzy
    Sep 13 '17 at 9:24
  • Second column seems to be the size in hex: 1000=4096, which is a typical size for a directory node. Funny though that all your database files should have the same size (20k), as do their journals (5.7k) – can you confirm that size after your pull? The first column could be a presentation of ownership (owner, group) perhaps combined with the corresponding permissions, and the third some timestamp representation (note that one always corresponds between a db and its journal). All just a "wild guess", though.
    – Izzy
    Sep 13 '17 at 9:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.