Android - eclipse FileExplorer as root

I have a built-in Nexus One, and when I issue the following commands on the terminal, I can view the database of the application that I am developing.

adb shell su cd data/data/.../databases/ sqlite3 events.db 

Now this works great, but I want to be able to pull out the file and view it using the SQLITE GUI application / browser (e.g. Firefox plugin)

I used to have access to the data folder from Eclipse using FileExplorer, but it suddenly stopped working, and I'm just wondering if there is a way to do this again.

thanks

+4
source share
3 answers

Currently, it seems that your device is configured in such a way that the default adb shell is not root, and you should use su to get the root shell. The DDMS file explorer in eclipse will not do this, so it will only have root access if adbd is configured to run as root and provides root access to clients by default.

You can check this from adb shell with

 ps 

(and see if the ps process is running as root or shell) or

 getprop ro.secure 

Using the su-root shell, you can remount the root file system and change ro.secure to 0 in default.prop - among other things, this will cause adbd to run as root and provide root shells by default. However, this has security implications, and you may not want to leave it that way. You will need to search the Internet for the exact command to reinstall the shell for your specific device (since for convenience, adb will not work if adbd is not yet root).

You can also see if the adb root command will work to put adbd in root mode.

Perhaps your system is not β€œrooted” in the sense of making any configuration changes, but instead only in the sense that there is the usual binary representation that allows unprivileged users who are aware of the possibility of obtaining the root shell - exchange tools would not know about this opportunity and therefore could not.

+3
source

After much research with Google, I have simplified access to the SQLite database in Eclipse. I am going to conduct a study in response to accessing the SQLite database on a connected or emulating Android phone for viewing in Eclipse .

To view files from a specific application on your device, grant read and access rights to each folder in the application path.

  • Open cmd / terminal
  • Type 'adb shell'
  • sous
  • Click "Allow" on device
  • chmod 777 / data / data / data / data / data / com.application.package
  • chmod -R 777 / data / data / com.application.package

After that, you can view the files on the device.

A very useful Eclipse plugin for viewing SQLite database on an Android phone from Eclipse - this seems to be no longer supported, the Questoid browser plugin

I hope you guys find this post more specifically useful as a step-by-step view of your database.


References

+5
source

You can try

 adb pull /data/data/.../databases/events.db 

or something like that, to pull the sqlite file to your hard drive and open it.

+1
source

Source: https://habr.com/ru/post/1342922/


All Articles