Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

EasyGBD access SD card directory report open failed: EACCES (Permission denied) how to solve

2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

This article introduces how to solve the problem of EasyGBD visiting SD card catalogue newspaper open failed: EACCES (Permission denied). The content is very detailed. Interested friends can use it for reference and hope to be helpful to you.

Last year, due to the protracted epidemic war, the video surveillance intelligent analysis system also fell to the ground in the anti-epidemic project, and the national standard GB28181 protocol, as a video streaming protocol proposed by the Ministry of Public Security, also played an important role in many anti-epidemic video analysis systems.

Prior to this, we developed EasyGBD, the push platform of the GB28181 agreement, which was mainly for the traffic police and public security officers to push the video stream of individual equipment to the GB platform through the GB agreement when they were on duty. However, in this year's epidemic prevention, we found that health care workers can still record and push the video of the GB agreement on outdoor duty through EasyGBD.

When we developed EasyGBD to access the SD card directory, we got an error: open failed: EACCES (Permission denied)

Analyze the problem:

When this problem occurs, the first thing that comes to mind is the change and adaptation of Android Q partition storage permissions.

To give users more control over their files and to limit file clutter, Android Q modified the way APP accesses files in external storage. The new feature of external storage is called Scoped Storage.

Android Q still uses READ_EXTERNAL_STORAGE and WRITE_EXTERNAL_STORAGE as user-facing storage-related runtime permissions, but access to external storage is now restricted even if these permissions are obtained. The context in which APP requires these runtime permissions has changed, and so has the visibility of external storage to APP in various cases.

Resolve the problem:

At the beginning, read and write permissions have been declared in AndroidManifest.xml.

However, when visiting the photo album, I still reported an error:

Open failed: EACCES (Permission denied)

The solution is to add in AndroidManifest.xml:

Android:requestLegacyExternalStorage= "true"

The code is as follows:

The running effect is as follows:

About EasyGBD access SD card directory report open failed: EACCES (Permission denied) how to solve the sharing here, I hope that the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report