1# Pushing Files to an Application Sandbox Directory 2 3During the development and debugging process of an application, you may need to push files to the application sandbox directory for intra-application access or for testing purposes. You can use either of the following methods to push files: 4 5- Use DevEco Studio to push the files to the application installation directory. For details, see [Application Installation Resource Access](../quick-start/resource-categories-and-access.md#resource-access). 6 7- Use the hdc tool to push files to the application sandbox directory on the device, which is described below. 8 9However, the file paths viewed on the hdc shell are different from the application sandbox paths in the application view. You need to understand the [mappings between application sandbox paths and physical paths](app-sandbox-directory.md#mappings-between-application-sandbox-paths-and-physical-paths). 10 11## Development Example 12 13The application package **com.ohos.example** is used as an example. If files are read and written in the application sandbox directory **/data/storage/el1/bundle** of **example**, the physical path is **/data/app/el1/bundle/public/<PACKAGENAME>**, that is, **/data/app/el1/bundle/public/com.ohos.example**, according to the [mappings between application sandbox paths and physical paths](app-sandbox-directory.md#mappings-between-application-sandbox-paths-and-physical-paths). 14 15Run the following command to push a file: 16 17``` 18hdc file send ${Path of the local file to send}/data/app/el1/bundle/public/com.ohos.example/ 19``` 20 21After the file is pushed, set **user_id** and **group_id** of the file to **user_id** of the application. You can run the following command to query **user_id** of the application, which is the value in the first column of the process. 22 23``` 24hdc shell ps -ef | grep com.ohos.example 25``` 26 27Run the following command to set **user_id** and **group_id** of the file based on **user_id** of the application process: 28``` 29hdc shell chown ${user_id}:${user_id} ${File path} 30``` 31 32## Switching to the Application View 33 34During the debugging process, if the required permission is unavailable or the file does not exist, you need to switch from the process view to the application view and further analyze permission and directory problems. To switch to the application view, run the following commands: 35 36``` 37hdc shell // Switch to shell. 38ps -ef|grep [hapName] // Obtain the process identifier (PID) of the application. 39nsenter -t [hapPid] -m /bin/sh // Enter the application sandbox environment based on the PID. 40``` 41 42Now the application view is in use, and the paths you see are the application sandbox paths. 43