yashsingh1/xdaforums huggingface dataset:
[Android Software Development] oberworld:
Of course testing in a while.

EDIT: here you have the log:

********* 2016/06/10 **********
- Detecting busybox
- Mount system RW
- Mount again system RW
log.log: No such file or directory
log.log: No such file or directory
- Adjust permissions
chown: unknown user/group root:root
- Add permissions to apps
- Write changes back to file
- Remove temporary file
- Adjust permissions
BusyBox v1.24.1-Stericson (2015-11-06 19:11:24 EST) multi-call binary.

Usage: chown [-RhLHPcvf]... OWNER[<.|:>[GROUP]] FILE...

Change the owner and/or group of each FILE to OWNER and/or GROUP

-R	Recurse
-h	Affect symlinks instead of symlink targets
-L	Traverse all symlinks to directories
-H	Traverse symlinks on command line only
-P	Don't traverse symlinks (default)
-c	List changed files
-v	List all files
-f	Hide errors
BusyBox v1.24.1-Stericson (2015-11-06 19:11:24 EST) multi-call binary.

Usage: chmod [-Rcvf] MODE[,MODE]... FILE...

Each MODE is one or more of the letters ugoa, one of the
symbols +-= and one or more of the letters rwxst

-R	Recurse
-c	List changed files
-v	List all files
-f	Hide errors
- Mount system RO
********* 2016/06/10 **********

Phone working normally, nothing changes no errors.

---------- Post added at 03:35 AM ---------- Previous post was at 03:19 AM ----------

Testing again..

---------- Post added at 03:40 AM ---------- Previous post was at 03:35 AM ----------

Here you have last log:

********* 2016/06/10 **********

- Detecting busybox

- Mount system RW

- Mount again system RW

- Save permissions and ownerships

- Adjust permissions

chown: unknown user/group root:root

- Add permissions to apps

- Write changes back to file

- Remove temporary file

- Apply back permissions and ownership

chown: invalid option -- r

BusyBox v1.24.1-Stericson (2015-11-06 19:11:24 EST) multi-call binary.

Usage: chown [-RhLHPcvf]... OWNER[<.|:>[GROUP]] FILE...

Change the owner and/or group of each FILE to OWNER and/or GROUP

-R	Recurse

-h	Affect symlinks instead of symlink targets

-L	Traverse all symlinks to directories

-H	Traverse symlinks on command line only

-P	Don't traverse symlinks (default)

-c	List changed files

-v	List all files

-f	Hide errors

********* 2016/06/10 **********
[Android Software Development] rufus.wilson:
It seems that the set_perm function does not work on android the same than on my linux machine...

Hopefully this one is the last... Thank you so much for your help.
[Android Software Development] rufus.wilson:
I have uploaded a new version v2.9b. It adds reverting changes when flashed twice for marshmallow.

[MENTION=4761735]oberworld[/MENTION], you can test only the script in the zip if you want.
[Android Software Development] oberworld:
ok i'll test in a while, read my last post edited.
[Android Software Development] rufus.wilson:
Regarding the number in the file name it is linked to the API, not the version number... :)

Exactly, I have to chown "0.0". unfortunately, ls gives the names so I have updated the way the permissions are set in the new release v2.9b.

Good night.
[Android Software Development] oberworld:
Ok, here you have the log, sorry for the waiting time, phone it's ok no changes:

********* 2016/06/10 02:26:20 **********

- Detecting busybox

- Mount system RW

- Mount again system RW

- Save permissions and ownerships

- Adjust permissions

- Add permissions to apps

- Write changes back to file

- Remove temporary file

- Apply back permissions and ownership

chown: invalid option -- r

BusyBox v1.24.1-Stericson (2015-11-06 19:11:24 EST) multi-call binary.

Usage: chown [-RhLHPcvf]... OWNER[<.|:>[GROUP]] FILE...

Change the owner and/or group of each FILE to OWNER and/or GROUP

-R	Recurse

-h	Affect symlinks instead of symlink targets

-L	Traverse all symlinks to directories

-H	Traverse symlinks on command line only

-P	Don't traverse symlinks (default)

-c	List changed files

-v	List all files

-f	Hide errors

********* 2016/06/10 02:26:20 **********

Till tomorrow...
[Android Software Development] CyberCaptainKaz:
Ok thanks man now I understood :)

Great mod need this for ages now :)

---------- Post added at 03:04 AM ---------- Previous post was at 02:55 AM ----------

I can't download it

Says the file was removed or disabled ;(
[Android Software Development] rufus.wilson:
Yes it is normal. The latest version is 2.9. I removed the previous ones to avoid people using versions that are known not to work.
[Android Software Development] fusionstream:
So I got it working on my s7 edge finally. I had to allow supersu during boot. Maybe a note about this on the main post would be good?

---------- Post added at 12:52 PM ---------- Previous post was at 12:50 PM ----------

It still doesn't work with external SD though but works with internal.
[Android Software Development] monterrey4ever:
Reporting Moto G 2015 (XT1543) Using Mokee ROM. This fixed SDCard write permission for my "Motorola Camera" app.
[Android Software Development] WILMANS2M:
Just to say that setperm did not work with my phone. Have to use setmetadata & setmetedatarecursive. Do not know if can help. Thanks anyway.

Envoyé de mon SM-G903F en utilisant Tapatalk
[Android Software Development] rufus.wilson:
Ok, will add. Thanks.
[Android Software Development] rufus.wilson:
Could you post the log files?
[Android Software Development] WILMANS2M:
Unfortunately not. I am not on MM anymore. Rolled back to LL. Sorry.

Envoyé de mon GT-I9505 en utilisant Tapatalk
[Android Software Development] rufus.wilson:
Could you try to flash this zip on lollipop and send me the log files? I suggest you to do a backup before so that you can restore quickly.

I have made changes to the lollipop code as well but I cannot test it myself.
[Android Software Development] oberworld:
I'm back. I can help you with LL when finish with MM if you want.

---------- Post added at 09:41 AM ---------- Previous post was at 09:38 AM ----------

You can try this one too: http://xdaforums.com/showpost.php?p=67250011&postcount=602
[Android Software Development] rufus.wilson:
:)

Thanks!
[Android Software Development] oberworld:
This is the code not working on last version:

# changes permissions

echo "- Apply back permissions and ownership"

"${BBbin}" chown ${own}:${gro} "${fpath_ori}"

"${BBbin}" chmod 0${op}${gp}${wp} "${fpath_ori}"

This is the error log:

- Apply back permissions and ownership

chown: invalid option -- r

BusyBox v1.24.1-Stericson (2015-11-06 19:11:24 EST) multi-call binary.

Usage: chown [-RhLHPcvf]... OWNER[<.|:>[GROUP]] FILE...

Change the owner and/or group of each FILE to OWNER and/or GROUP

-R	Recurse

-h	Affect symlinks instead of symlink targets

-L	Traverse all symlinks to directories

-H	Traverse symlinks on command line only

-P	Don't traverse symlinks (default)

-c	List changed files

-v	List all files

-f	Hide errors

We need to fix that...
[Android Software Development] Tecalote:
Hello :) Please add on the first site also, people who test it, should make with the recovery not only a backup from system, but also from data, cache and boot (complete Nandroid backup) The original file of the packages.xml is stored in the data partition. I testet all versions beginning with 1.9b exclude the 2.9 yet. And always I have to restore the complete Nandroid Backup. In my case, the renaming of the packages.xml-rw.bak to the original name, after delete the modified file didn't work for me, to get my system back without conflicts. And please for those, this method works, they must delete the Scriptfile in the init.d folder also... But the simplest way is to restore the complete Nandroid Backup..
[Android Software Development] oberworld:
[MENTION=6935794]rufus.wilson[/MENTION] I did more testing....

- If i reboot the phone i can see the new permissions are not in the packages.xml file.

- If i exec the script once the phone booted (via terminal or program), i can see the new permissions are added in all app inside packages.xml, so the last script seems working.

Unfortunately system doesn't use the new permissions if we modify the xml "on the fly"

Any suggest?

EDIT: More useful info about marshmallow permission system here: https://docs.google.com/presentatio...CrJ9IQOzn3KcB8o/edit#slide=id.gcda601c64_1_25
[Android Software Development] Tecalote:
Hello, I flashed the new Version 2.9b. I have Huawei p8 MM (newest) The flash was successful. The init.d file has correct permissions 0755. The packages.xml is okay, no more 0b, now it has more MB as the original one and the packages.xml-RW.bak file is created. But the fix don't work as he should yet. I test it with the app: Folder Sync

https://play.google.com/store/apps/details?id=org.t2k269.foldersync&hl=de

In Kitkat with the Kitkat SD Fix:

https://play.google.com/store/apps/details?id=nextapp.sdfix&hl=de

Or:

http://xdaforums.com/showthread.php?t=2684188

(which worked also in Lollipop! - just added one line to the platform.xml and there was ful permission for all apps to external SD)

I just synchronised a folder from the internal SD with one in the external SD in Lollipop.

In Marshmallow it is not possible, even not with your fix 2.9b.I tried it also with ADM Downloadmanager, the same, not working yet.

The logs are attached. Thank you for your work!
[Android Software Development] oberworld:
to [MENTION=6870018]Tecalote[/MENTION], [MENTION=6935794]rufus.wilson[/MENTION]

- Like i said before packages.xml is restored on every boot or app installation so the script changes nothing.

- If you exec the script manually after boot, it add permissions to packages.xml correctly, but new permissions doesn't work anyway.

After more testing i think i'm close to find the way it works for marshmallow but now i'm stuck. These are my conclusions after my tests:

- On marshmallow we don't need to modify packages.xml, apps who want to write extsd already have the correct permissions, but android system doesn't let it write.

- We need to modify /data/system/urigrants.xml that's the file who grant permissions to write on extsd, find after lot of tests. This file doesn't change on every boot, the changes we made are "permanent" (if we unninstall the app, the permissions are removed).

urigrants.xml structure example from my phone:

<?xml version='1.0' encoding='utf-8' standalone='yes' ?>
<uri-grants>
<uri-grant sourceUserId="0" targetUserId="0" sourcePkg="com.android.externalstorage" targetPkg="eu.thedarken.sdm" uri="content://com.android.externalstorage.documents/tree/5006-E051%3A" prefix="true" modeFlags="3" createdTime="1465406335403" />
<uri-grant sourceUserId="0" targetUserId="0" sourcePkg="com.android.externalstorage" targetPkg="nextapp.fx" uri="content://com.android.externalstorage.documents/tree/5006-E051%3A" prefix="true" modeFlags="3" createdTime="1465404097940" />
<uri-grant sourceUserId="0" targetUserId="0" sourcePkg="com.android.externalstorage" targetPkg="com.keramidas.TitaniumBackup" uri="content://com.android.externalstorage.documents/tree/5006-E051%3A" prefix="true" modeFlags="3" createdTime="1465550026103" />
</uri-grants>

The value 5006-E051 is the external SD card, if you need to read what is your value, you can find on /data/system/storage.xml

Example storage.xml from my phone:

<?xml version='1.0' encoding='utf-8' standalone='yes' ?>
<volumes version="3" forceAdoptable="false">
<volume type="0" fsUuid="2269-CFCA" userFlags="0" createdMillis="1464917887626" lastTrimMillis="0" lastBenchMillis="0" />
<volume type="0" fsUuid="5006-E051" userFlags="3" createdMillis="1463593853790" lastTrimMillis="0" lastBenchMillis="0" />
</volumes>

But adding the values manually on urigrants.xml doesn't work even if you reboot phone. Values persist on the file but still not working, we need to modify something else but i can't find what.

Edit: the app seems to be added in \data\system\appops.xml too when it has write extsd permissions.

Also there is an intesresting file to check about: \data\system\users\0\runtime-permissions.xml

Hope this helps a lot, i contribute as best i can.

Regards.
[Android Software Development] DemonDroid_97:
Latest version 2.9b works perfectly on mm Resurrection Remix. Thank you so much! :)
[Android Software Development] CyberCaptainKaz:
It seems I am blind in the OP the LATEST WORKING says v1.9 and the LATEST says file deleted

Since I am blind can u tell me the link for downloading the mod?
[Android Software Development] entony80:
Download here
[Android Software Development] Vishal Vignesh:
[MENTION=6935794]rufus.wilson[/MENTION]

I flashed the zip package....

I am pretty sure that it is not working...[emoji30] [emoji30]

---------- Post added at 04:01 PM ---------- Previous post was at 04:00 PM ----------

I can provide any file you want....
[Android Software Development] Tecalote:
Hello again....

In /data/security/current are some linked files, one of those called mac_permissions.xml

I don't know, maybe this is a corresponding key.

One Website describe: Package Manager -

In SEAndroid, Package Manager has been modified to consult the Android-specific policy file “mac_permissions.xml” and decide if the permissions requested by the application can actually be granted to it, or not...

https://android.googlesource.com/platform/external/sepolicy/+/jb-mr1-dev/mac_permissions.xml
[Android Software Development] oberworld:
Thanks for the help, but that is old, it's for Jelly Bean, that file doesn't exist on AOSP 6.0.
[Android Software Development] rufus.wilson:
Thank you for the info. It looks like there is no real solution.... except rewriting MM.
[Android Software Development] rufus.wilson:
If you make changes in there are they permanent? Do you think we can tweak these files in any ways?
[Android Software Development] oberworld:
[MENTION=6935794]rufus.wilson[/MENTION]

Like i said before, the changes on /data/system/urigrants.xml still there even if you reboot, only removed when you unnistall the app.

I tested appops.xml and don't remember well but i think yes, still there even if you reboot, only removed when you unnistall the app.

storage.xml not tested.

runtime-permissions.xml permissions is removed for non system apps on reboot i think, i was reding about that yesterday, more info here:

http://www.erroritms.com/android-runtime-permission-for-system-apps/

and here:

https://docs.google.com/presentatio...SCrJ9IQOzn3KcB8o/edit#slide=id.gcda601c64_7_0

But is not a problem because if these permissions are readed on runtime we can add it after reboot, not sure, need to test it.

But still missing something because if you edit the files still not working, maybe one more file needs to be modded to validate the changes at runtime.

This was my test:

- Grant correct permissions to titanium backup through the document provider trick to write extsd.

- Confirmed i can backup to my extsd.

- I did a copy of appops.xml, urigrants.xml, and runtime-permissions.xml, not copy for packages.xml because the permissions for the app are the same when it has write acces to extsdcard.

- Unnistalled the app and reboot

- Install titanium backup again, and granted permissions of course it can't write to extsd without the document provider trick.

- Restored my copy the files again and set correct permissions to the xml files.

- Titanium backup can not write extsd even with the copy of the files made when it can write.

So something still missed out there

Hope it helps.
[Android Software Development] vhick:
Maybe I'm lost but the tags also not remove in package.xml in every reboot unless you update the app. That is the purpose of this fix, to check if the tags is still there unless you update in every reboot, to prevent putting the tags manually in very app update.
[Android Software Development] oberworld:
I can confirm it was removed on AOSP 6.0, I did lot of test.

Of course we can edit the script to wait a few seconds and then modify the file, but still need to modify other files to make it work.

what rom and version of android have you?.
[Android Software Development] venomxob:
Xperia z2, Android 6.0.1, the lastest build 575. After flashing 2.8b it srewed my custom recovery up by overwriting the busybox. It didn't recognise that I have installed one.

---------- Post added at 04:51 AM ---------- Previous post was at 04:45 AM ----------

There is a script which enables init.d on x2, I manage to enable init.d thanks to that.

---------- Post added at 05:10 AM ---------- Previous post was at 04:51 AM ----------

Yes. I have init.d enabled. http://xdaforums.com/android/software-hacking/script-zip-init-d-enabler-stock-kernel-t3347724
[Android Software Development] husaintaherali:
V1.9b is working on marshmallow 6.0.1 on galaxy s5 sm-g900h rooted with supersu beta v2.68 but with issues.

It uninstalls apps that have been installed after flashing it on reboot.

Also i m getting parse error on some apps when i try to install their update manually.

---------- Post added at 11:36 AM ---------- Previous post was at 11:34 AM ----------

V1.9b is working on marshmallow 6.0.1 on galaxy s5 sm-g900h rooted with supersu beta v2.68 but with issues.

It uninstalls apps that have been installed after flashing it on reboot.

Also i m getting parse error on some apps when i try to install their update manually.
[Android Software Development] rivasprd:
I first tried 1.9b and didnt work, then I tried v2.9b and it actually worked. Thanks!
[Android Software Development] vd69:
What 29b.Where?

Νους
[Android Software Development] yamwt:
I have s7 edge with busybox and init.d activted and i installed v2.8b but it is not working for me... the app that i need to write on SD still giving me error that "the app has no writing permission to sd"

:(

Enviado desde mi SM-G935F mediante Tapatalk
[Android Software Development] jaydee316:
Packages.xml

It shows 1.04MB. Sorry for the late response. :D
[Android Software Development] d3kod3:
Check the download option right next to discussion.
[Android Software Development] Vishal Vignesh:
I have flashed the latest version, but it doesn't work.

I am running on note 2

CandySix ROM

Android 6.0.1 Marshmallow
[Android Software Development] hgaaditya:
2.9 not working. Whatsapp is giving the unable to download error.. The last version that worked properly was 1.9 I think.
[Android Software Development] Mebhius:
v1.9b

On the Homtom HT7 Pro ( Lollipop 5.1) working perfectly v1.9b

thanks very, very much :o:good:
[Android Software Development] ya7hu:
Fixed! Working in Marshmallow CM13 unofficial build by sultanxda for the OnePlus X.

Thanks .
[Android Software Development] EzioStrong:
Hi.

ur fix doesn't work on Grand 2 (SM-G7102) With Unofficial CM13.

Universal Init.d says my kernel doesn't have init.

Now I flashed a kernel and Universal app says my kernel support but after I reflashed ur fix I've still have sd card prob.

Can u provide ur fix for Grand 2 users?
[Android Software Development] d3kod3:
Can anybody tell me what is the actual use of this mod ?

I flashed it in my device running CM13 to get access to download files in ExtSD card in UC Browser but still it is downloading in Android/data/com.ucmobile.Intl.
[Android Software Development] rufus.wilson:
The objective of this fix is to allow apps to be able to write to external SD cards.

It is currently not working on most ROMs... [MENTION=4761735]oberworld[/MENTION] is kindly trying to find the files that should be modified to get it to work.
[Android Software Development] rufus.wilson:
As is the case with most ROMs.

Once it will work on the majority of the ROMs, the investigation/testing should be done by users of ROMs for which this fix does not work.
[Android Software Development] Muantemama:
it is working on galaxy s5 MM
[Android Software Development] rufus.wilson:
Seriously? Which ROM? Which version of the fix?
[Android Software Development] Tecalote:
Thank you and oberworld for your lot of work
[Android Software Development] vinniej:
Worked for me. Thanks button to be pressed after this post.

Installed ExtSD_Fix_rw-signed-v2.9b.zip

ROM - Stock, rooted G900TUVU1GPE1 (MM)

Tested SMS Backup and Titanium to the ExtSD.

If you need more info, let me know.
[Android Software Development] EzioStrong:
Where is the download link for 2.9??

When I tap on download link on 1St post , that shows me version 1.9
[Android Software Development] vinniej:
Above the OP, hit download. See the attachment...2.9b is there
[Android Software Development] heross:
Thanks rufus.wilson,

to link me to your fix thread. I have test it on my Alcatel IDOL 3 4,7 MM 6.0.1.

It works at half. ;) After flash in TotalCommander i see a new SDcard with Permission 755, but my problematic Apps become "Permission denied" :crying:

I hope in the future you succeed perfectly to outwit this f...... Google rights management. good luck :good:
[Android Software Development] vinniej:
Sorry, wish I could help you out. Maybe rufus.wilson will update the OP download link?
[Android Software Development] lazyI:
Excellent! It worked!

Thanks!!!!!

Device: Motorola Moto G 2nd XT1068

Rom: cm-13.0-20160611-NIGHTLY-titan
[Android Software Development] madhero:
This was previously brought up in the thread. rufus is looking into it. Guess we'll have to learn to live with this issue for now.
[Android Software Development] ngm2378:
I'm on moto e 2014 rooted with supersu, cm13 with adopted sd card...some apps are showing in internal storage...with this zip help
[Android Software Development] heross:
Why you need this mod with adopted sd card? :confused:
[Android Software Development] Vishal Vignesh:
You have an adopted sd card... why do you need this mod?

---------- Post added at 01:10 AM ---------- Previous post was at 01:10 AM ----------

You have an adopted sd card... why do you need this mod?
[Android Software Development] KaMyKaSii:
[MENTION=6935794]rufus.wilson[/MENTION] Hello, instead of an init.d script also could not be a su.d? Supporting systemless (/su/su.d/) and also systemless Busybox (/su/xbin/busybox). I think it would increase support, including my device

Edit: the comment above is for version 2.9, 1.9 worked perfectly. But I think i need to install the zip every time i install an app what need this permission, right?
[Android Software Development] Sactgr:
How?

Which version you tried?

Does xinternalSD module working ?(like temasek)
[Android Software Development] phoenX80:
Flashed the dev today on Samsung Note 4 N910F 6.0.1 DPE3 with xposed and initd and busybox already installed boots up but goes black on unlock screen. So not working atm for me. Greetings.
[Android Software Development] ya7hu:
Tried v2.9b on June 5 build of sultanxda CM13 working fine.
[Android Software Development] madhero:
Does it uninstall your apps on and off?
[Android Software Development] ya7hu:
I was wondering what was happening with my phone, but i didn't have any problems running in sultanxda' s but on Dirty Unicorns it did.

Currently on Purity ROM and flashed 1.9b and got it working. 2.9b did nothing for me.
[Android Software Development] xenolith190:
working stable v1.9b on unofficial cm13 by banmeifyouwant for Redmi Note 3 Snapdragon.

Thanks
[Android Software Development] cossak2007:
Works on Resurrection Rom

Works on Resurrection Rom MM Redmi Note 3 Pro.

1.9B

Thank you.
[Android Software Development] yfriday14:
Thanks for your work!

Works fine on Samsung Galaxy S4 i9505, using Resurrection Remix v5.6.9 20160520 Marshmallow.

Sent from Samsung Galaxy S4 i9505 using Tapatalk
[Android Software Development] equi_design:
Version 1.9 works for my devices:

OnePlus X running TurboROM (MM 6.0.1)

NVIDIA Shield Tablet (original model) running Vulkan Preview (MM 6.0.1)

Let me know if you'd like me to test the newer fix versions. I just had 1.9 already loaded on my SDcard when I was testing/flashing - so that's the one I went with.

Thanks [MENTION=6935794]rufus.wilson[/MENTION] for your hard work!!
[Android Software Development] richardfeb2@gmail.com:
Can i transfer my games to external sd card after installing this zip ? Please explain . Do i still need to use Foldermount ? using CM 12.1 ANDROID 5.1 Galaxy tab s 8.4 t700.
[Android Software Development] sutax:
Version 1.9 works for my devices:

Galaxy Note 4, N910F

Rom: [6.0.1][ MM ] [TW] Nameless V3

Thanks!