1e41f4b71Sopenharmony_ci# Pushing Files to an Application Sandbox Directory 2e41f4b71Sopenharmony_ci 3e41f4b71Sopenharmony_ciDuring 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: 4e41f4b71Sopenharmony_ci 5e41f4b71Sopenharmony_ci- 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). 6e41f4b71Sopenharmony_ci 7e41f4b71Sopenharmony_ci- Use the hdc tool to push files to the application sandbox directory on the device, which is described below. 8e41f4b71Sopenharmony_ci 9e41f4b71Sopenharmony_ciHowever, 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#mapping-between-application-sandbox-paths-and-physical-paths). 10e41f4b71Sopenharmony_ci 11e41f4b71Sopenharmony_ci## Development Example 12e41f4b71Sopenharmony_ci 13e41f4b71Sopenharmony_ciThe following uses the bundle **com.ohos.example** as an example. If the application sandbox path is **/data/storage/el1/bundle**, the physical path is **/data/app/el1/bundle/public/com.ohos.example**. 14e41f4b71Sopenharmony_ci 15e41f4b71Sopenharmony_ciRun the following command to push a file: 16e41f4b71Sopenharmony_ci 17e41f4b71Sopenharmony_ci``` 18e41f4b71Sopenharmony_cihdc file send ${Path of the local file to send}/data/app/el1/bundle/public/com.ohos.example/ 19e41f4b71Sopenharmony_ci``` 20e41f4b71Sopenharmony_ci 21e41f4b71Sopenharmony_ciAfter 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. 22e41f4b71Sopenharmony_ci 23e41f4b71Sopenharmony_ci``` 24e41f4b71Sopenharmony_cihdc shell ps -ef | grep com.ohos.example 25e41f4b71Sopenharmony_ci``` 26e41f4b71Sopenharmony_ci 27e41f4b71Sopenharmony_ciRun the following command to set **user_id** and **group_id** of the file based on **user_id** of the application process: 28e41f4b71Sopenharmony_ci``` 29e41f4b71Sopenharmony_cihdc shell chown ${user_id}:${user_id} ${file_path} 30e41f4b71Sopenharmony_ci``` 31e41f4b71Sopenharmony_ci 32e41f4b71Sopenharmony_ci## Switching to the Application View 33e41f4b71Sopenharmony_ci 34e41f4b71Sopenharmony_ciDuring 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: 35e41f4b71Sopenharmony_ci 36e41f4b71Sopenharmony_ci``` 37e41f4b71Sopenharmony_cihdc shell // Switch to shell. 38e41f4b71Sopenharmony_cips -ef|grep [hapName] // Obtain the process identifier (PID) of the application. 39e41f4b71Sopenharmony_cinsenter -t [hapPid] -m /bin/sh // Enter the application sandbox environment based on the PID. 40e41f4b71Sopenharmony_ci``` 41e41f4b71Sopenharmony_ci 42e41f4b71Sopenharmony_ciNow the application view is in use, and the paths you see are the application sandbox paths. 43