Android View mobile phone internal storage directory and database files __ Database

Source: Internet
Author: User

We usually develop when the file cache, commonly used in the mobile phone internal storage and external storage of mobile phones, mobile phone internal storage mainly includes the app after the installation of some files, external storage is commonly used by the space, used to save some pictures of movies and so on.

When fast-read cache files are generally stored in the internal storage, because the internal storage is faster than the external storage, external storage generally save some relatively large files, read and write frequency is low, external storage capacity is much larger than the internal storage.

Internal Storage Directory Explanation:

External Storage Directory Explanation:

The code gets the internal storage cache directory as follows:

String Innercachepath = Context.getcachedir (). GetAbsolutePath ();

Output:/data/user/0/com.example.test/cache code gets the external storage directory as follows:

String Outercachepath = Context.getexternalcachedir (). GetAbsolutePath ();
Output:/storage/emulated/0/android/data/com.example.test/cache

Of course, you can specify a different directory, so the benefit is that deleting the app deletes the

Now look at the mobile phone file system, because the market of mobile phones are locked, is not directly to see the internal file, so must unlock and root, but now the phone is really root is very troublesome, here I do not root, directly with the simulator, Android Stuido with the simulator is very card, here with a third party simulator, such as night God, the hippocampus play, are relatively easy to use, the simulator is usually root, so you can see the internal file.

Note: The latest Android Studio 3.0 has a more convenient way to see the file system, and the phone doesn't need root

http://blog.csdn.net/msn465780/article/details/78538225 Click on the Open link


Start Ddms, launch Android stuido,tools→android→android Device Monitor

As shown in figure:


Then the device list is empty, and then the emulator starts, as shown in figure:



At this point the simulator is detected, and look at file Explorer, all directories as shown:



Then you can slowly look inside the file directory structure,

Next look at the directory of the app you developed, open data/data/, and find the package name for the app, as shown:


Now export the desired database file and view it with a database tool, as shown in figure:



Next, use sqlitestudio-3.1.1 to view the exported database, the tool download link, the different system versions Oh, but here, for example, win,

Https://sqlitestudio.pl/index.rvt

Click to open the link

After the download decompression, double-click SQLiteStudio.exe Open Tool, the upper left corner click on the database-add a database, just the database file added, as shown in the figure:


At this point you can slowly view, here you can see how many tables, table data structure, table data, such as figure:


Of course, there are other tools, such as Sqlitedatabasebrowser, with the same usage,

I uploaded the tool to Csdn, here is the link address:

http://download.csdn.net/detail/msn465780/9923570

Click to open the link

http://download.csdn.net/detail/msn465780/9923576

Click to open the link

Now it's time to play again.



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.