0

I have some HTML files in the SD card in my phone, which I want to open in Chrome. But, when I am entering the URL of those files in the Chrome's address bar with the file:/// prefix, Chrome says Access to the file was denied. But, I have checked that Chrome has access to the storage. See this screenshot:

Please help me out.
I have Android 7.0 Nougat and please ask if any more information is required.

  • Are you able to save pages to your sd card when using Chrome? – Reddy Lutonadio Jul 17 at 12:14
  • Yes, of course. – Puspam Adak Jul 17 at 12:17
  • Copy the file to the internal storage and check if Chrome can open it. – Reddy Lutonadio Jul 17 at 12:22
  • Yes, it can open from the internal storage. – Puspam Adak Jul 17 at 12:27
  • It seems that Chrome does not have the permission to read the external storage although you have enabled it. – Reddy Lutonadio Jul 17 at 12:34
1

Chrome can read file from the SD card folders it has access to. That folder, if you have set to download pages on the SD card, can be located by clicking Menu, then Downloads, then clicking on the gear. You have unrestricted access to that folder. But if you try to navigate to the parent folder, you will receive an Access to the file was denied message (if that folder is located on the SD card).

You can copy your files in that folder and read it from there. Or you can copy them to the internal storage and access the internal storage by typing file:///sdcard/ from Chrome's address bar. The internal storage is not restricted and you can navigate to any folder.

  • You are right, Chrome can read and write from the Android/data/com.android.chrome/files/download folder in the SD card, but is unable to access it's parent directories. Thanks. – Puspam Adak Jul 17 at 15:17
  • I have made a browser app of my own. In that app, everything is working fine, it is able to access the SD card. See this screenshot. I can still remember that I haven't used any special permissions in that app. – Puspam Adak Jul 17 at 15:29
  • @PuspamAdak I will have to check but if I remember correctly Firefox is also able to access the SD card in its entirety. – Reddy Lutonadio Jul 17 at 15:36
  • I know that using ADB, we can grant permissions to apps. So, is there any way to grant SD card reading permission to Chrome? – Puspam Adak Jul 18 at 10:59
  • @PuspamAdak I am not sure if it is going to work or not on a non rooted phone. But you can try (if you have not already done it) the following command: adb shell pm grant com.android.chrome android.permission.READ_EXTERNAL_STORAGE. I have a rooted phone and with some Xposed modules, Chrome has full access to the SD card. – Reddy Lutonadio Jul 18 at 12:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.