Page 1 of 1

love.filesystem does not work on Android 6.0+

Posted: Sun Mar 26, 2017 10:12 am
by Macsek
Hello everyone!

I'm trying to make an autoupdater for my game to simplify the testing/distribution process for my games. It works quite well on Android 5.0 and below but it doesnt want to work on android 6.0+

here is the bit of code that manages the download/run part:

Code: Select all

 local body, code = http.request("mydomain/game.love")
    if not body then error(code) end
    file = love.filesystem.newFile( "game.love" )
    file:open("w")
    file:write(body)
    file:close()

Code: Select all

love.filesystem.mount('game.love', '')
            package.loaded.main = nil
            package.loaded.conf = nil
            love.conf = nil
            love.init()
            love.load(args)
The download part does not throw an error but when i try to load it the app just resets so i assume there is nothing on the storage.
Does anyone have a similar problem?

Also i cannot open the /data directory in Android to check if there is something in it or not... :x

Thanks in advance. :nyu:

Re: love.filesystem does not work on Android 6.0+

Posted: Sun Mar 26, 2017 11:13 am
by zorg
Macsek wrote: Sun Mar 26, 2017 10:12 am

Code: Select all

 local body, code = http.request("mydomain/game.love")
    if not body then error(code) end
    file = love.filesystem.newFile( "game.love" )
    file:open("w")
    file:write(body)
    file:close()
The download part does not throw an error but when i try to load it the app just resets so i assume there is nothing on the storage.
Does anyone have a similar problem?

Also i cannot open the /data directory in Android to check if there is something in it or not... :x

Thanks in advance. :nyu:
Hi!

Exactly why can't you open the data directory?
If you lack a file manager, then get Total commander for android and look for it with that. (if it works on 6.x, i only have 3.x, 4.x and 5.x droid devices sadly)

Re: love.filesystem does not work on Android 6.0+

Posted: Sun Mar 26, 2017 3:40 pm
by Macsek
Ugh after some figthing with android sdk/ndk the fix on the bitbucket worked:

https://bitbucket.org/MartinFelis/love- ... -android-6

I still don't know why i cant see anything in any of love's directories i'm using Amaze File Explorer from F-Droid.