8

I have an root application that reads the SQLite database of WhatsApp. I'm using the sqlite binary to execute the SQL query and I read the results into my app.

Now, this all works fine but I've noticed that the SQLite executable seems to be missing on some devices especially the Galaxy S3 GT-I9300. (I can see this through my crash statistics.)

My application also installs the sqlite3 executable onto the users phone. The SQLite executable needs to be at /system/xbin/sqlite3 or /system/bin/sqlite3. I've bundled the sqlite3 binary with my application in the assets and my application unpacks the assets and copies it over to the correct location. I extracted the sqlite3 binary from the Android emulator.

Now, I've been seeing errors that read that library file libncurses.so is missing. On my phone that file is at /system/bin/libncurses.so.

Now, should I also bundle the libncurses.so file with my application? Is there anything else I would need to bundle?

If there's a better way of getting sqlite3 on the device, I'll be glad to hear it.

Mridang Agarwalla
  • 43,201
  • 71
  • 221
  • 382

2 Answers2

0

if you want to escape dependencies just build it yourself with all needed libraries statically linked.

Vasaka
  • 1,953
  • 1
  • 19
  • 30
  • 2
    could you elaborate on how I could do this? I don't have much knowledge of make and gcc but with a little help, I could do it. Thanks. – Mridang Agarwalla Jul 02 '13 at 14:27
  • @MridangAgarwalla I can not help you here much, can only suggest to setup environment to build full android and change it somehow, or go to cyanogen community and ask aid there. – Vasaka Jul 02 '13 at 14:39
0

Some searching on SO will result in a plethora of answers:

Here is one: Why do I get a "sqlite3: not found" error on a rooted Nexus One when I try to open a database using the adb shell?

Community
  • 1
  • 1
Booger
  • 18,579
  • 7
  • 55
  • 72