DevEco Studio provides Device File Browser that simplifies file management on connected devices. You can create, delete, upload, and download files on the target device without using any CLI. Currently, Device File Browser offers two views: file view and app sandbox view.

To view a database file, you can download the database file (for example, data > app > el2 > 100 > database > Project name > entry > rdb > File name) to the PC and use other tools to view the file.
Since DevEco Studio 6.0.0 Beta2, you can hold down Ctrl or Shift and click the left mouse button (hold down Command or Shift and click the left mouse button on macOS) to select multiple files or directories for downloading to your local computer. Since DevEco Studio 6.0.2 Beta1, the same multi-select capability is supported for deleting multiple files or directories.
Device File Browser provides access to the following directories: app sandbox directory, temporary directory, log directory, device public directory, and media library directory.

The app sandbox directory is where data and resource files related to the app are stored. You can access this directory in two ways:
The file view displays the file structure of the current device as it exists on the device according to the device's actual physical paths.

The physical path of the app sandbox on the device is /data/app/{el1,el2}/100/{base,database}/{packageName}.
Under the file view, files in the el1 directory are read-only, while files in the el2 directory can also be downloaded, but no other operations are allowed.
The app sandbox view displays the structure of all debug apps within their respective sandboxes.
Since DevEco Studio 6.1.0 Beta1, you can click
to filter the sandbox directory corresponding to the current project.

To view the file structure of an app using the sandbox view on API versions earlier than 15, you must configure the ohos.permission.INTERNET permission to enable Internet access within the module.json5 file, and then reinstall the app.

The sandbox path is /data/storage/{el1,el2}/{base,database}, which corresponds to the physical path.
Under the app sandbox view, files in both the el1 and el2 directories can be created, deleted, uploaded, and downloaded.
Since DevEco Studio 6.0.1 Release, the cloud space directory /data/storage/el2/cloud has been added. For details about how to use this directory, see Device-Cloud File Sync.
The temporary directory, at /data/local/tmp/, is used to store temporary files generated during debugging and testing. You can create, delete, upload, and download files in this directory.

When your app is running, logs are generated in real time using HiLog and stored in the HiLog output buffer, which is typically 256 KB. When the buffer reaches its capacity, historical logs are saved as compressed packages in the /data/log/hilog/ directory.
To view historical logs, download the compressed packages and the hilog_dict.XXX.zip file (data dictionary file) in the directory, and then use the hilogtool to parse the log files.

The public directories, such as Desktop, Documents, and Downloads, are at /storage/media/100/local/files/Docs. You can delete, upload, and download files in these directories.

Since API version 22, the media library directory /mnt/data/100/media_fuse/Photo has been added. The original directory /storage/media/100/local/files/Photo is now a symbolic link that redirects to /mnt/data/100/media_fuse/Photo. This new directory enables upload, download, and deletion of image and video files.
Wearables do not support the media library directory.

There are two special directories on the device: faultlog and gallery directories. These directories are not displayed in Device File Browser, but can be accessed using hdc commands.
hdc shell hidumper -s 1201 -a "-p Faultlogger"

hdc shell hidumper -s 1201 -a "-p Faultlogger %s -LogSuffixWithMs"

hdc shell hidumper -s 1201 -a "-p Faultlogger -f {filename}" 
hdc file recv /data/log/faultlog/faultlogger/{filename} {path} 
The gallery directory stores image and video files generated by system apps, such as the screen recorder and camera. To download these files to your local PC, perform the following:

hdc shell mediatool query a.mp4 -u

In this case, use the value of uri to save the file to a path on which you have the download permission, for example, /data/local/tmp:
hdc shell mediatool recv file://media/Photo/2/VID_1744944984_000/a.mp4 /data/local/tmp
The second line in the output is the downloadable file path.


hdc file recv {FilePath} .\ You can access the sandbox directory of debug apps through the CLI.
$ hdc shell aa start -a {abilityName} -b {bundleName}
start ability successfully. $ hdc shell -b {bundleName} ls -lZ -A "./data/storage/el2/base" // List files in the app sandbox /el2/base directory (return full file information).
$ hdc shell -b {bundleName} ls -A "./data/storage/el2/base" // List files in the app sandbox /el2/base directory (return only file names).
$ hdc shell -b {bundleName} mkdir -p "./data/storage/el2/base/test" // Create a test directory under the app sandbox /el2/base directory.
$ hdc shell -b {bundleName} rm -r "./data/storage/el2/base/test.txt" // Delete the test.txt file under the app sandbox /el2/base directory.
$ hdc shell -b {bundleName} rm -r "./data/storage/el2/base/test" // Delete the test directory under the app sandbox /el2/base directory. $ hdc file send -b {bundleName} "D:\test.txt" "./data/storage/el2/base" // Send the file to the device sandbox /el2/base directory.
$ hdc file recv -b {bundleName} "./data/storage/el2/base/test.txt" D:\ // Download the file from the device sandbox /el2/base directory to the local PC. "requestPermissions": [
{"name": "ohos.permission.INTERNET"}
] $ aa process -b {bundleName} -a {abilityName} -p "/system/bin/bftpd -D -p {port}" -S
start native process successfully.
$ ps -ef | grep bftpd
20020143 12254 613 0 11:52:53 ? 00:00:00 bftpd -D -p 9021 // The bftpd service starts successfully on the corresponding port.
shell 13035 11901 10 11:54:44 ? 00:00:00 grep bftpd $ ftpget -p {port} -P guest -u anonymous localhost -l /data/storage/el2/base // List files in the app sandbox /el2/base directory (return full file information).
$ ftpget -p {port} -P guest -u anonymous localhost -L /data/storage/el2/base // List files in the app sandbox /el2/base directory (return only file names).
$ ftpget -p {port} -P guest -u anonymous localhost -M /data/storage/el2/base/test // Create a test directory under the app sandbox /el2/base directory.
$ ftpget -p {port} -P guest -u anonymous localhost -d /data/storage/el2/base/test.txt // Delete the test.txt file under the app sandbox /el2/base directory.
$ ftpget -p {port} -P guest -u anonymous localhost -D /data/storage/el2/base/test // Delete the test directory under the app sandbox /el2/base directory (only empty directories can be deleted). $ hdc file send test.txt /data/local/tmp/test.txt // First, send the file to the data/local/tmp directory on the device.
$ ftpget -p {port} -P guest -u anonymous localhost -s /data/local/tmp/test.txt /data/storage/el2/base/test.txt // Then, push it to the app sandbox directory.
$ ftpget -p {port} -P guest -u anonymous localhost -g /data/local/tmp/test.txt /data/storage/el2/base/test.txt // First, download the file to the data/local/tmp directory on the device.
$ hdc file recv /data/local/tmp/test.txt test.txt // Then, obtain it from the device. What should I do if opening a folder in the app sandbox view displays the "[Fail][E003001] Invalid bundle name" message?

Follow the steps below to troubleshoot: