'How can I install the SQLite executable on an Android device?
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.
Solution 1:[1]
if you want to escape dependencies just build it yourself with all needed libraries statically linked.
Solution 2:[2]
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?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Vasaka |
| Solution 2 | Community |
