About extracting zip files

42 views
Skip to first unread message

Fatih Elitas

unread,
Feb 6, 2026, 1:43:20 PM (6 days ago) Feb 6
to DroidScript
DroidScript works fine with code, but it doesn't work when I create an APK. It doesn't extract the contents of the zip file. Where could the problem be? Is there a bug in the APK generator?

 ds 2.79.1
adndroid 12

function OnStart()
{
    app.UnzipFile( "yourfile.zip", "/sdcard/Extracted" );
}

Alan Hendry

unread,
Feb 6, 2026, 4:49:56 PM (5 days ago) Feb 6
to DroidScript
HI,
My first instinct would be scoped storage.
Have you looked at GetPermission?
Regards, ah

Dave

unread,
Feb 9, 2026, 4:22:44 AM (3 days ago) Feb 9
to DroidScript
I don't think it will create the target folder for you.  Did you try this - 

function OnStart()
{
    app.MakeFolder( "/sdcard/Extracted"  )
    app.UnzipFile( "yourfile.zip", "/sdcard/Extracted" );
}

Note: on a scoped storage device (Android 10+) "/sdcard/*" paths will point to the /Android/data/[packagename].... path
Reply all
Reply to author
Forward
0 new messages