Android4.4 changes to sdcard permissions and compatibility issues

Source: Internet
Author: User

In the course of upgrading 4.4, we discovered that some third-party applications were not available. Check out the following requirements:


1 "API 19 or more now requires Android.permission.READ_EXTERNAL_STORAGE and Android.permission.WRITE_EXTERNAL_STORAGE permissions.


2 "If you find that you can still read the contents of SDcard without permission on the real machine. Check to see if the phone is root.


Reasons such as the following:

This problem can be seen/storage/emulated/0 on NEXUS5 with root, but I

They can't see them on their phones.

This is due to the fact that we are able to get root access to Super Su on NEXUS5.

And on our phone is directly able to adb root (since we are on the Userdebug version number). Let's see.

To the additional/storage/emulated/0 node is the Supersu Daemonsu program mount out.


Let's say the user version number of our phone is also more prison, under Su Look, the result is the same as N5.


In order to verify. We killed the Supersu daemon on the N5 (Killall daemonsu) and then used it again

Strace follow:


Strace-s 200-f/system/xbin/daemonsu--auto-daemon


When running ADB shell->su->mount in a terminal, you can still see

/storage/emulated/0. Then look at the output of the Strace, which runs the/storage/emulated/0

Mount operation. The output of the strace is shown in the attachment.


Another very interesting point, using Su-obtained shell, with PS $$ to see this process, will find its

The parent process is daemonsu.


3 Note: android:minsdkversion and android:targetsdkversion defined in your manifest are 3 or below. This permission on the API (Android 4.4.2) machine will force you to attach this read-write SDcard permission. If you are sure that your application does not need to read and write SDcard permissions, you need to declare targetsdkversion greater than or equal to 4 ....



Android4.4 changes to sdcard permissions and compatibility issues

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.