4.4 kitkat and sd cards

FTP client for Android handsets.

4.4 kitkat and sd cards

Postby ranger67 » Tue Mar 04, 2014 5:46 pm

Was wondering if you were going to implement 4.4 security such that andftp would request a folder on an available SD card? This would provide us users a continuing methodology of downloading a file from a server for use on the android device but stored on the SD card. Though these folders are inaccessible for writing from other apps, but read access would be there.

I currently maintain a server and would previously download Audio and Video data to various directories I had setup on the SD card. Since upgrading to 4.4, I can no longer do this due to new security restrictions in android. I am hoping that andftp will help me to re-anable this functionality by implementing the necessary security and providing a directory structure in which it can write to on the SD in which I can implement further subdirectories underneath.

I look forward to hearing/seeing your solutions in this matter.
ranger67
 
Posts: 2
Joined: Tue Mar 04, 2014 5:23 pm

Re: 4.4 kitkat and sd cards

Postby support » Thu Mar 13, 2014 7:49 pm

You're talking about the following issues?
http://www.androidcentral.com/kitkat-sdcard-changes
support
 
Posts: 1010
Joined: Sun Apr 20, 2008 4:40 pm

Re: 4.4 kitkat and sd cards

Postby ranger67 » Thu Mar 13, 2014 9:00 pm

yes it is. please note, as in the article, each application can request access to the s_d card. subsequently my post was to find out whether or not andftp will be doing this. If so, I could use your directory structure on the SD card to store my media files.
ranger67
 
Posts: 2
Joined: Tue Mar 04, 2014 5:23 pm

Re: 4.4 kitkat and sd cards

Postby support » Thu Mar 13, 2014 9:54 pm

Yes, if we can make it works then we will do for AndFTP and all our apps.
Have you already seen an application asking for such permission?

I guess it's related to ACTION_CREATE_DOCUMENT Intent in new SAF framework:
https://developer.android.com/guide/top ... vider.html
support
 
Posts: 1010
Joined: Sun Apr 20, 2008 4:40 pm

Re: 4.4 kitkat and sd cards

Postby support » Sun Mar 30, 2014 4:41 pm

We've made some tests with the new SAF API under 4.4 but it does not allow giving write access to a full folder on external sdcard. It can give access per file for write/update.

Some applications implemented the following workaround to get full write access:
http://forum.xda-developers.com/showthr ... ?t=2634840

We're going to check this workaround but I'm not sure it would work anymore on next Android update when Google will realize they forgot this old API.
support
 
Posts: 1010
Joined: Sun Apr 20, 2008 4:40 pm

Re: 4.4 kitkat and sd cards

Postby support » Sun Apr 13, 2014 10:45 am

In AndFTP 4.0.2, the external cache folder is created automatically under /Android/data/lysesoft.andftp/ folder. You can use it to download files/folders to external SDCard but pay attention that it's a cache folder so it will be deleted if you uninstall app!

Workaround (without root needs) to write to any folder on SDCard is not reliable and depends on device. From source code new changes in Android, it looks such workaround won't work anymore on the next Android update. So, reliable solution depends either on Google to change his mind or device provider to allow write permissions to apps (without following Google guidelines) due to end-users pressure.
support
 
Posts: 1010
Joined: Sun Apr 20, 2008 4:40 pm

Re: 4.4 kitkat and sd cards

Postby support » Mon Aug 11, 2014 12:04 pm

Here is an excellent article about the situation:
http://www.androidpolice.com/2014/04/06 ... -how-long/

In short, YES there is a workaround that works on some devices (without root permission) BUT it's not stable. YES, implementing this workaround breaks the Google rules:
Apps must not be allowed to write to secondary external storage devices, except in their package-specific directories as allowed by synthesized permissions. Restricting writes in this way ensures the system can clean up files when applications are uninstalled.. See: http://source.android.com/devices/tech/ ... ge-devices
And breaking the rules could lead your app to be rejected from Google Play.

Our position: We're going to wait next Android update, if Google (and device providers) fixes the hole then the workaround won't work for non-rooted app anymore. If Google change his mind and cancel this new restriction, then everyone will be happy.
support
 
Posts: 1010
Joined: Sun Apr 20, 2008 4:40 pm

Re: 4.4 kitkat and sd cards

Postby support » Tue Nov 04, 2014 8:24 pm

It looks like the solution comes from Android 5.0. And it's the official solution supported by Google, not a workaround that may work or not depending on device.
https://code.google.com/p/android/issue ... l?id=67570

We're going to implement/test it soon to see how it behaves on both 4.4 and 5.0
support
 
Posts: 1010
Joined: Sun Apr 20, 2008 4:40 pm

Re: 4.4 kitkat and sd cards

Postby support » Mon Nov 17, 2014 9:26 pm

The new SAF API is for Android 5.0 only, there is no backport to 4.4 :-(

So what can we do for 4.4 (KitKat)?
Before 5.0 (Lollipop), our position was to wait for official Google answer about KitKat and secondary storage write support to avoid breaking the Google policy. Since their positive decision for 5.0, we think it's safe to implement the ugly/unreliable MediaScanner workaround on 4.4. We know it works on limited devices only (i.e. Galaxy S4) but it should help a few users.
support
 
Posts: 1010
Joined: Sun Apr 20, 2008 4:40 pm

Re: 4.4 kitkat and sd cards

Postby OrganiseTheChaos » Fri Nov 21, 2014 4:20 pm

If you want to download to and SD card with AndFTP 4.1.1 on an android Kitkat 4.4.x phone you have two options

Option 1) WITH ROOT - Root your phone and then either manually edit an xml file OR use one of the free kitkat SD card fix apps from the google play store. This is what I did and it worked fine

[If you are going to root your phone you will need instructions specific to your phone( make and model) and android version. There are many useful guides out there but I would recommend reading around and getting to know the subject before rooting, NOT updating android before you root ( rooting exploits security holes which are fixed in updates) and being very, very careful. There are also many useful guides to "write sd card kitkat" that give step by step instructions on how to modify the correct files to enable writing to SD card.]

Option 2) WITHOUT ROOT filemanager workaround. Certain file manager apps allow you to set up the a folder on the SD card as if it were mounted on the main storage and allow you to write to Sd card that way. There are many useful guides to "write to sd card kitkat without root" that explain in detail how to do this.

I haven't included links because I don't want to get "spam filtered" but google is your friend and the search terms are pretty obvious ( just don't use "" on google as that finds specific word order) . This forum ( lysesoft AndFTP ) is NOT a suitable to place for discussing HOW to root phones.
OrganiseTheChaos
 
Posts: 2
Joined: Fri Nov 14, 2014 12:05 pm

Next

Return to AndFTP



cron

Sitemap | Privacy Statement | Java and all Java-based marks are trademarks or registered trademarks of Sun Microsystems, Inc.
in the U.S. and other countries. All other company and/or product names are the property of their respective owners.