How to access android root directory

10,479

use adb to copy the file. Even if it's in root dir, u should have access to it via adb.

Do adb pull data/user/0/filename.json path_on_ur_comp.json.

this will copy the file to the directory you define in the 2nd parameter.

// EDIT:

adb is part of the Android SDK, stands for Android Debug Bridge. You can use this for MANY MANY different reason but of course, the "main" reason is to debug Android devices. You can use it to transfer files in your case.

In Windows, it's located here:

C:\Users\USERNAME\AppData\Local\Android\sdk\platform-tools\adb

In Mac, it's lcoated here:

/Users/USERNAME/Library/Android/sdk/platform-tools/adb

Depending on which OS you use, open that either with Terminal (Mac) or Command Prompt (Windows). Once you do that, run the following command:

For Mac:

adb pull data/user/0/filename.json /Users/USERNAME/Desktop/somefile.json

For Windows:

adb pull data/user/0/filename.json c:\Users\USERNAME\Desktop\somefile.json

This will copy the file and put it on your desktop

Share:
10,479
geoinfo
Author by

geoinfo

Updated on June 04, 2022

Comments

  • geoinfo
    geoinfo about 2 years

    I am developing an application using ionic framework.

    The app creates files (*.json) and stores them in /data/user/0/ when i verify whether they exist or not, the result was true which means the files exist in the mentioned directory and I can access and modify their content without problem, but when I check the directory with a file manager or from the computer, no result, the directory is empty.

    Could someone tell me what should I do?