Solved How to Move a File to Folder /data/data/com.name_application.mobile/files/Folder/{here} on Android Without Root

Status
Not open for further replies.

Argentavis

Platinian
Original poster
Dec 25, 2023
12
25
3
24
Hello everyone before asking I want to explain that I have a configuration file for an application on android A where the configuration file is located in /data/data/com.name_application.mobile/files/Folder/ on android A I can access it because the android is rooted.

The problem is... I want to move it to android B which is not rooted is there a special method that allows me to move it without rooting android B?
 

fedesito

Platinian
Jun 11, 2023
6
5
3
25
no
/data/data is not accessible without root, you can try virtual spaces as an alternative
 

Argentavis

Platinian
Original poster
Dec 25, 2023
12
25
3
24
Thanks everyone, I've found a solution and hopefully this will help all of you who are looking for something similar.

1. Make changes to the target application by enabling its debug mode to true.
2. Install it to the android you want, it's okay if the android is not rooted.
3. Make sure your USB debug mode is active and connect it to the computer.
4. On the computer use the following command to run the copy command as the user of the application that has been debugged:

Code:
adb -d shell "run-as com.your_application.mobile cp -r /data/data/com.your_aplication.mobile/files/files2/files_target /sdcard/Download"
The above command will move files_target to a writeable folder for all users on the phone, namely the download folder on your internal storage.

If you want to copy the target file to your computer use the following command:

Code:
adb pull /sdcard/Download/files_target
HOPE THIS HELPS!
 
Status
Not open for further replies.