Android Storage Access Framework woes after reboot

There seems to be a lot of confusion amongst developers how to get persistible permissions when using the SAF. Wasted some hours on this, so it is worth a note here.

To get the average file open dialog using the SAF, one could do this:

Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT);
startActivityForResult(i, 0);

That works perfectly fine, but after a reboot, the permissions are gone, and opening the same file (without opening the dialog again) will fail. There are lots of resources on the Internet that tell developers to add some arguments when calling the Intent. This is wrong! Passing these to the intent is completely useless:

intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION); // Don't do this
intent.addFlags(Intent.FLAG_GRANT_WRITE_URI_PERMISSION); // Also no!

Instead, a single call to takePersistableUriPermission will retain permissions even after a reboot:

protected void onPropertyRequestResult(int propertyRequestCode, int resultCode, Intent data) {
    getContentResolver().takePersistableUriPermission(data.getData(), Intent.FLAG_GRANT_READ_URI_PERMISSION | Intent.FLAG_GRANT_WRITE_URI_PERMISSION);

WinUAE Help 3.0.3

Sort of old news, but we are at version 3.0.3 since July, just forgot the announcement – see WinUAE.

Persona 4 Golden Save Tool 1.7

So I’ve recently gotten ahold of the Steam port for P4G and discovered a nifty little save editor to fix a save state I had messed up. It is open source, but it lacked some of the features I wanted and was not 100% compatible with the PC port of the game.

So a short while later, I modified the tool to be able to fully support the PC port. You can find it in the tools section! I’ve also made some other improvements:

  • ADDED: Support for the PC port of the game (update the MD5 in .binslot file)
  • ADDED: “Quest Items” category to the items tab
  • CHANGED: Updated and cleaned some of the code
  • CHANGED: Modified the about dialog slightly
  • CHANGED: Added a NEWS.txt
  • CHANGED: Only enable save menu items after opening a file to prevent crashes
  • FIXED: Crash when selecting the “Other” item category

WinUAE Help 3.0.1

After the massive update last time around, only minor changes this time. Caught up with WinUAE 4.2 thanks to Peter, and made some minor corrections. Go download it!

Also, this is some anniversary: 20 years ago, I started pulling together the first content of the help file together with Brian King. How time passes…

New look

And yes, it is extremely fancy… expect no less from a design-impaired programmer. Still, plenty of updates all around!

WinUAE Help 2.2.15 & Online

There is a new version of the WinUAE Help file available as of now, which is 2.2.15. You may grab the updated version in our downloads section, as usual.
Also, in a rare case of promised and actually completed some work: the online version of the WinUAE Help is now up-to-date with the latest development! There have been a lot of changes going on in an attempt to vastly improve the content quality. This will ultimately result in a version 3.0 for the file. In the meantime, keep track of progress at!

New Host

After some jackass tried attacking our old website host, and it’s content went offline for some time. That was not due to a successful attack but rather dissatisfaction with the hosting company. We have since moved to a new host with modern software and HTTPS support. Do enjoy.

Scroll to Top