Sd fix

Post your questions and help other users.

Moderator: Martin

Akt
Posts: 133
Joined: 25 May 2014 08:57

Sd fix

Post by Akt » 03 Sep 2017 07:51

Hi,
SD fix app works on Android 4 and 5 and what to do in Android 6??

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: Sd fix

Post by Desmanto » 03 Sep 2017 08:42

Don't really understand what do you mean. If you want access to external storage (microsd), since Lollipop (including Marshmallow), there is Storage Access Framework already.
You only need to grant Automagic the permission, look at Automagic Preferences - External SD card access, unhide the SD card and select the root of your microSD.
You can now write to your microsd thru Automagic. (example : save file to microSD)
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

User avatar
Bluscre
Posts: 145
Joined: 31 Aug 2017 13:58
Location: Germany
Contact:

Re: Sd fix

Post by Bluscre » 03 Sep 2017 08:53

What about adopted Storage?
Unofficial AutoMagic Telegram Group: https://t.me/automagicforandroid
Check out my other flows here: https://github.com/Bluscream/AutoMagicFlows or here.

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: Sd fix

Post by Desmanto » 03 Sep 2017 09:14

AFAIK, adoptable storage works just like internal virtual SDcard, no need to grant any additional permission. Only portable storage needs the additional External SD card Access.

Oh, one thing to be noted. If you are using MIUI 7.0+, something is wrong with the default setting for microSD access. Xiaomi seems to disable the Documents (com.android.documentsui) by default, which is the app that store the Storage Acess Framework permission (SAF). So, if you try to grant Automagic the SAF permission, it will failed. You should go to manage app and enable the Documents first (in All Apps/Disabled Apps), then you grant the permission as usual.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

User avatar
Bluscre
Posts: 145
Joined: 31 Aug 2017 13:58
Location: Germany
Contact:

Re: Sd fix

Post by Bluscre » 03 Sep 2017 13:36

This problem seems to get more complicated, trying to give it permissions in the externalstorage.ui
Image

results in a 'crash'

Code: Select all

Version: 1.34.0
Build: P-20170902_213106_0f2c955
Package: package ch.gridvision.ppam.androidautomagic

Brand: Lenovo
Device: A10-70L
Model: Lenovo TAB 2 A10-70L
Id: MRA58K
Product: LenovoTAB2A10-70L

SDK: 23
Release: 6.0
Incremental: A10-70L_S000214_170606_ROW

Timestamp: 03.09.2017 15:03:19.271

java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=987, result=-1, data=Intent { dat=content://com.android.externalstorage.documents/tree/256F-0902: flg=0xc3 }} to activity {ch.gridvision.ppam.androidautomagic/ch.gridvision.ppam.androidautomagic.ExternalSDCardEnablingActivity}: java.lang.SecurityException: No persistable permission grants found for UID 10243 and Uri 0 @ content://com.android.externalstorage.documents/tree/256F-0902:
at android.app.ActivityThread.deliverResults(ActivityThread.java:3940)
at android.app.ActivityThread.handleSendResult(ActivityThread.java:3983)
at android.app.ActivityThread.-wrap16(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1548)
at android.os.Handler.dispatchMessage(Handler.java:111)
at android.os.Looper.loop(Looper.java:207)
at android.app.ActivityThread.main(ActivityThread.java:5765)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:679)
at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:102)
Caused by: java.lang.SecurityException: No persistable permission grants found for UID 10243 and Uri 0 @ content://com.android.externalstorage.documents/tree/256F-0902:
at android.os.Parcel.readException(Parcel.java:1599)
at android.os.Parcel.readException(Parcel.java:1552)
at android.app.ActivityManagerProxy.takePersistableUriPermission(ActivityManagerNative.java:4418)
at android.content.ContentResolver.takePersistableUriPermission(ContentResolver.java:1752)
at ch.gridvision.ppam.androidautomagic.ExternalSDCardEnablingActivity.onActivityResult(SourceFile:148)
at android.app.Activity.dispatchActivityResult(Activity.java:6500)
at android.app.ActivityThread.deliverResults(ActivityThread.java:3936)
... 10 more
Image

and when i click on "Ok" i end up with
Image

which seems to be fine for me.

After that the "Access External SD" thing is still unchecked
Image

and i still can't select the file i want to watch
Image

I am asking myself why i have root and xposed if AM is not gonna use them anyway x3
Unofficial AutoMagic Telegram Group: https://t.me/automagicforandroid
Check out my other flows here: https://github.com/Bluscream/AutoMagicFlows or here.

Akt
Posts: 133
Joined: 25 May 2014 08:57

Re: Sd fix

Post by Akt » 03 Sep 2017 14:27

Hi,
I don't have access to SD card after following your steps.
In android 5 , I have installed SD fix app and I was granted permission to write on SD card.
Please hwlp

User avatar
Bluscre
Posts: 145
Joined: 31 Aug 2017 13:58
Location: Germany
Contact:

Re: Sd fix

Post by Bluscre » 03 Sep 2017 14:42

Akt wrote:Hi,
I don't have access to SD card after following your steps.
In android 5 , I have installed SD fix app and I was granted permission to write on SD card.
Please hwlp
My Post was not a 'tutorial', but a bug report :)
Unofficial AutoMagic Telegram Group: https://t.me/automagicforandroid
Check out my other flows here: https://github.com/Bluscream/AutoMagicFlows or here.

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: Sd fix

Post by Desmanto » 03 Sep 2017 15:46

@Bluscre : That two is different problem. For granting external SDcard access, it seem your documents didn't response properly. If you have no problem reselecting SDcard path for all other app, you can try to clear data for the documents (com.android.documentsui), and try to grant the permission again. Sometimes the database corrupt and can't be written with new app permission.

For can't select file at root folder, it has been ever asked before. It is probably because the action was run using normal user privilege.
viewtopic.php?f=5&t=6895
You have to use execute root command.

@Akt : Do you have that documents (com.android.documentsui) at your phone? What is your phone, and what ROM do you use? Some ported Lolipop ROM may have remove this feature for kernel compatibility with kitkat. For that, Automagic can't do anything about it.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

Akt
Posts: 133
Joined: 25 May 2014 08:57

Re: Sd fix

Post by Akt » 05 Sep 2017 04:30

Now i am using cyanogenmod 13.

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: Sd fix

Post by Desmanto » 05 Sep 2017 05:08

Akt wrote:Now i am using cyanogenmod 13.
Do you have that documents (com.android.documentsui) at your phone? Check at manage app.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

Post Reply