简体   繁体   English

如何在 Android 设备上安装 SQLite 可执行文件?

[英]How can I install the SQLite executable on an Android device?

I have an root application that reads the SQLite database of WhatsApp.我有一个根应用程序可以读取 WhatsApp 的 SQLite 数据库。 I'm using the sqlite binary to execute the SQL query and I read the results into my app.我正在使用sqlite二进制文件来执行 SQL 查询,并将结果读入我的应用程序。

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.现在,这一切正常,但我注意到某些设备上似乎缺少 SQLite 可执行文件,尤其是 Galaxy S3 GT-I9300。 (I can see this through my crash statistics.) (我可以通过我的崩溃统计数据看到这一点。)

My application also installs the sqlite3 executable onto the users phone.我的应用程序还将sqlite3可执行文件安装到用户手机上。 The SQLite executable needs to be at /system/xbin/sqlite3 or /system/bin/sqlite3 . SQLite 可执行文件需要位于/system/xbin/sqlite3/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.我已将sqlite3二进制文件与我的应用程序捆绑在assets ,我的应用程序解压缩资产并将其复制到正确的位置。 I extracted the sqlite3 binary from the Android emulator.我从 Android 模拟器中提取了sqlite3二进制文件。

Now, I've been seeing errors that read that library file libncurses.so is missing.现在,我一直看到读取库文件libncurses.so丢失的错误。 On my phone that file is at /system/bin/libncurses.so .在我的手机上,该文件位于/system/bin/libncurses.so

Now, should I also bundle the libncurses.so file with my application?现在,我是否还应该将libncurses.so文件与我的应用程序捆绑在一起? 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.如果有更好的方法在设备上获取sqlite3 ,我会很高兴听到的。

如果您想逃避依赖关系,只需使用静态链接的所有需要​​的库自己构建它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在 Android 设备上安装 java 运行时? - how can I install java runtime on Android device? 如何直接在Android设备上以可执行文件的形式运行简单的c ++程序? - How can I run a simple c++ program on android device directly as an executable? 如何在Eclipse Juno中使用DDMS访问真实android设备上的Sqlite数据库 - how can i access the Sqlite database on real android device using DDMS in eclipse juno 如何将Google Map Api安装到我的新Android设备上? - How can I install Google Map Api to my new Android Device? 如何编写前端程序以通过android设备安装和卸载应用程序? - How can I write a front end program to install and uninstall an app over android device? 如何使用android studio在Android设备上安装驱动程序? - How do I install a driver on an android device using android studio? 如何在Android设备上编写多个可执行文件的分析脚本? - How to script the profiling of multiple executable on an Android device? 如何在Android中处理SQLite数据集 - How can I process a SQLite dataset in Android 如何在Android应用程序中使用SQLite? - How can I use SQLite in android application? 如何在android中打开SQLite数据库? - How can I open a SQLite database in android?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM