在没有模拟器的情况下将sqlite3安装在外部设备上 [英] Installing sqlite3 on an external device without emulator

查看:88
本文介绍了在没有模拟器的情况下将sqlite3安装在外部设备上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是一名学生,我想学习有关在Android上使用sqlite3的知识.我的朋友尝试运行android模拟器并开始输入命令 adb -e shell su ,在模拟器存储中导航,然后运行 sqlite3 mydb.db .一切都很好.但是,每当我们尝试使用外部物理android设备运行adb时,运行 sqlite mydb.db 都是一个问题.亚行在某种程度上找不到sqlite可执行文件.我已经扎根了我的设备并授予了adb权限,但它似乎仍然找不到sqlite可执行文件.

I am a student and I want to learn about using sqlite3 on android. My friend tried to run the android emulator and start typing commands adb -e shell, su, navigated through the emulator storage, then run sqlite3 mydb.db. Everything went fine. But whenever we tried running adb with the use of an external physical android device, running sqlite mydb.db is a problem. ADB cannot somewhat find the sqlite executable. I already rooted my device and granted permission the adb but still it doesn't seem to find the sqlite executable.

我做了一些研究.我在另一个.答案之一建议.我已经尝试过了,但是安装程序对我不起作用.在同一问题中,选择的答案是从支持模拟器的模拟器中提取sqlite,并将其推送到我的设备上.

I did some research. I found out in another post that some of android devices do not have sqlite built in. So I tried researching for any possible ways to install sqlite3 on android system. I found this. One of the answers suggested this. I already tried but The installer doesn't work for me. In the same question, the selected answer is to pull sqlite from an emulator (that supports one) and push it to my device.

此方法的问题是我们的资源量有限.我正在使用的笔记本电脑只有1 GHz CPU和3 GB RAM.由于CPU的速度,Android Studio甚至不允许我运行仿真器.从可以运行模拟器的更快更好的笔记本电脑(可以使用sqlite3仿真设备)进行复制只是我的最后也是最后一个选择.还有其他办法吗?

The problem with this method is we have limited amount of resources. The laptop I'm working on has only 1 GHz CPU and 3 GB RAM. Android Studio won't even let me run an emulator because of the speed of my CPU. Copying from a faster and better laptop that can run emulator (that can emulate device with sqlite3) is only my last and very final option. Is there any other way?

推荐答案

对于将来的学生,我会回答这个问题

For future students I'll answer this question

这里为Android编译了sqlite3

Download here compiled sqlite3 for android

通过 adb push sqlite3/data/local/tmp

授予通过 adb shell&&执行的权限cd/data/local/tmp&&chmod + X sqlite3

然后运行

/data/local/tmp/sqlite3/data/data/com.app/databases/some_database.db从sqlite_master的WHERE type ='table'中选择名称"

这篇关于在没有模拟器的情况下将sqlite3安装在外部设备上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆