In similar fashion, CyanogenMod simply set the access group back to sdcard_rw, as it had once been. Effectively, any developer expecting to have full access with the older permission would get exactly that. For example, Samsung’s solution was to automatically grant the WRITE_MEDIA_STORAGE permission to any app that requested WRITE_EXTERNAL_STORAGE. However, the most significant reason the change never made news is because OEMs and custom ROM developers didn’t follow along with Google. But the XOOM launched with a disabled SD slot, and by the time it was enabled in 3.2, the issue was usually disregarded as a bug. In fact, the only device known to be affected by the change was the Motorola XOOM. Further, the Nexus One never received an official OTA to Ice Cream Sandwich, so access to the SD card was never visibly lost. To begin with, Honeycomb's source code only became public with the release of Ice Cream Sandwich, meaning this change was buried amidst thousands of others. This change actually went live in Honeycomb 3.2, but it received fairly little attention. Left: Attempting to write a file, Right: Attempting to delete a file There is a little bit more to this story, but we’ll get to that later. Basically, this cut off any possibility for 3rd-party apps to modify data on SD cards. The newer WRITE_MEDIA_STORAGE permission could write to secondary storage, but regular apps couldn’t access it. The end result was that the original WRITE_EXTERNAL_STORAGE permission could only give apps the ability to write to the primary storage, but not secondary storage. The new permission had a protection level of systemOrSignature, which limited it to system applications (usually those included by Google and OEMs) and anything signed by the creator of the permission (the OS itself). In essence, WRITE_MEDIA_STORAGE duplicated the original functionality of WRITE_EXTERNAL_STORAGE, but with a catch: it was impossible for regular apps to request it. Source: /platform/frameworks/base/core/res/AndroidManifest.xml ( added later ) To gain access to this group, a permission called WRITE_MEDIA_STORAGE was added. The commit message simply read, "Mount secondary external storage writable by AID_MEDIA_RW rather than AID_SDCARD_RW." The side-effect of this change was that applications would now have to belong to the media_rw group to modify the contents of an SD card. Back in March 2011, almost 3 years ago, a small modification was made to the Android source code that would change how secondary storage mediums (SD cards) were mounted by the operating system.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |