“Invalid file format” from device pulled *.db file in Nexus 4 - Android 5.1.1

人盡茶涼 提交于 2019-12-02 04:42:31

I had a same problem with android 4.2, although I used ubuntu 16.04 and sqlite browser instead.

I found only one way that I could access my not rooted phone's file system and finally I could open the database file.

Install SSHDroid on your phone

adb -d shell "run-as your.package.name cat databases/database_name.db > /mnt/sdcard/database_name.db"

just for sure, you can check whether the file is there

$ adb shell
shell@android:/ $ cd /mnt/sdcard
shell@android:/mnt/sdcard $ ls

if you don't know the exact name of your package then

adb shell 'pm list packages -f'

start the SSHDroid

the default username is root and the default password is admin. It makes sense to change the password.

start FileZilla
open the Site Manager and add a new site with the settings of the SSHDroid's ssh server.

set /mnt/sdcard as default remote directory

and connect to your phone via SFTP protocol

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!