Android的ADB,使用检索数据库运行的 [英] android adb, retrieve database using run-as

查看:125
本文介绍了Android的ADB,使用检索数据库运行的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一个无根的Andr​​oid设备,我可以导航使用包含数据库的数据文件夹中的运行方式命令我的包的名字。大多数文件类型,我满足于只是观赏,但与数据库中,我想,如果从Android设备拉。

有一个下载 复制移动命令从这部分亚行壳?我想下载的数据库文件和使用数据库浏览器查看其内容。

一个答案这里牵涉到转向整个应用程序封装成一个COM pressed存档,但对如何提取该档案一旦做到这一点,并移动到本机没有进一步的答案,让我很侧钻时,有可能会一个更直接的解决方案,开始与

谢谢

解决方案

  ADB壳运行方式package.name搭配chmod 666 /data/data/package.name/databases/file
亚行拉/data/data/package.name/databases/file。
亚行壳运行方式package.name搭配chmod 600 /data/data/package.name/databases/file
 

更新

对于Android 5.0+的命令保存/data/data/package.name/databases/file是:

  ADB EXEC出运行的package.name猫的数据库/文件>文件
 

One a non-rooted android device, I can navigate to the data folder containing the database using the run-as command with my package name. Most files types I am content with just viewing, but with the database I would like to pull if from the android device.

Is there a download copy or move command from this part of adb shell? I would like to download the database file and view its content using a database browser.

One answer here involves turning entire application package into a compressed archive, but there is no further answer on how to extract that archive once this is done and moved to the machine, leaving me very sidetracked when there might be a more direct solution to begin with

thank you

解决方案

adb shell "run-as package.name chmod 666 /data/data/package.name/databases/file"
adb pull /data/data/package.name/databases/file .
adb shell "run-as package.name chmod 600 /data/data/package.name/databases/file"

UPDATE

the command for Android 5.0+ to save /data/data/package.name/databases/file would be:

adb exec-out run-as package.name cat databases/file > file

这篇关于Android的ADB,使用检索数据库运行的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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