Makedir on SD card failed

Discuss any general programming issues here
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Makedir on SD card failed

Post by airsoftsoftwair »

This is related to a new permission management concerning SDcard access starting with apps that target Android's API level 30. APK Compiler 4.0 targets API level 30 because this is now the requirement for uploading apps to the Play Store. It looks like Google now wants everybody to use something that is called "scoped storage system" but I haven't fully figured out how to use that myself or how to still get access to the SDcard like before. This is also the reason why the Hollywood Player 9.1 isn't available on the Play Store yet because it also accesses /sdcard/Hollywood. I'll need to dig into this to see how it can be resolved.
amyren
Posts: 352
Joined: Thu May 02, 2019 11:53 am

Re: Makedir on SD card failed

Post by amyren »

Just did a quick test with HW9.1 and apk-compiler 4.1 and those four examples listed earlier.
HW9.1/Compiler 4.1 works just the same as compiled with HW9.0/compiler 4.0, none of the four examples are able to create a directory.

Strange enaugh, example 2, 3 od 4 does work as hwa's with player 9.1.
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Makedir on SD card failed

Post by airsoftsoftwair »

amyren wrote: Tue Jun 07, 2022 3:22 pm Just did a quick test with HW9.1 and apk-compiler 4.1 and those four examples listed earlier.
HW9.1/Compiler 4.1 works just the same as compiled with HW9.0/compiler 4.0, none of the four examples are able to create a directory.

Strange enaugh, example 2, 3 od 4 does work as hwa's with player 9.1.
It's not strange, the behaviour you're seeing is completely expected. As described in my previous post, the Hollywood Player 9.1 for Android targets API level 29 which means that it will be allowed to access /sdcard. APK Compiler 4.x will create apps that target API level 30, though, because that is now the Play Store requirement. But apps that target API level 30 won't have access to /sdcard. Google has massively increased restrictions with API level 30 and apps that want to have access to /sdcard will only be allowed on the Play Store after an "extended review" by Google that may take several weeks and also lots of formal stuff has to be submitted to Google for every app that wants to access /sdcard. See here: https://support.google.com/googleplay/a ... 4102?hl=en Rumour has it that only apps by very big companies pass that review. This is also why the 9.1 player is currently not available on the Play Store but only on http://www.hollywood-mal.com/ because of course it also accesses /sdcard/Hollywood.

I still need to work out how to deal with this but the behaviour you're seeing is completely normal and not a bug or anything.
xabierpayet
Posts: 267
Joined: Fri Feb 24, 2012 9:34 am

Re: Makedir on SD card failed

Post by xabierpayet »

you can make the dir or access to the files knowing the name of the SDCard, you can see the name of the SDCard
with Files from Google for example, enter inside the SDCard, select any file and in the rightthree points menu, select drawer information
Must be some thing, as this

/storage/9DE6-1717/ABCDE

and now you can read and write in the SDCard again
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Makedir on SD card failed

Post by airsoftsoftwair »

xabierpayet wrote: Wed Feb 08, 2023 5:35 pm and now you can read and write in the SDCard again
Hmm, that's sounds like a hack that's not going to work for very long ;)
xabierpayet
Posts: 267
Joined: Fri Feb 24, 2012 9:34 am

Re: Makedir on SD card failed

Post by xabierpayet »

i can use it here without problems, for now...
You don't know any way to query the available drives? I'm really using a lot the SDCard in all my Android devices
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Makedir on SD card failed

Post by airsoftsoftwair »

xabierpayet wrote: Sat Feb 11, 2023 11:25 pm You don't know any way to query the available drives? I'm really using a lot the SDCard in all my Android devices
Me too but Google has restricted access to the SDcard and it's only available with special permission which is very difficult to obtain from Google...
amyren
Posts: 352
Joined: Thu May 02, 2019 11:53 am

Re: Makedir on SD card failed

Post by amyren »

airsoftsoftwair wrote: Sun Feb 19, 2023 9:57 pm
xabierpayet wrote: Sat Feb 11, 2023 11:25 pm You don't know any way to query the available drives? I'm really using a lot the SDCard in all my Android devices
Me too but Google has restricted access to the SDcard and it's only available with special permission which is very difficult to obtain from Google...
Have you had time to look any more into this?
Would it be easier to implement access to shared storage locations, like described here
https://medium.com/@vivekvashistha/how- ... e4fdf3d2cb
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Makedir on SD card failed

Post by airsoftsoftwair »

amyren wrote: Sat Oct 28, 2023 5:18 pm Have you had time to look any more into this?
Would it be easier to implement access to shared storage locations, like described here
https://medium.com/@vivekvashistha/how- ... e4fdf3d2cb
Yes, support for this is definitely planned for future versions.
Post Reply