Bug 394954 - WRITE_EXTERNAL_STORAGE permissions not properly requested
Summary: WRITE_EXTERNAL_STORAGE permissions not properly requested
Status: RESOLVED FIXED
Alias: None
Product: kdeconnect
Classification: Applications
Component: android-application (other bugs)
Version First Reported In: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Albert Vaca Cintora
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-06-02 12:59 UTC by lists@rhsoft.net
Modified: 2019-03-08 20:36 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description lists@rhsoft.net 2018-06-02 12:59:29 UTC
while other applications on my lineageos just request proper permissions for kdeconnect you have to manually mangle around or you can only upload to the internal storage and them moce with the device file-explorer wich mackes as example rsync your whole music to the external 400 GB sd-card impossible

steps to enable direct write access for "kdeconnect" on the external sd-card:

* adb root shell
* adb shell
* cp /data/system/packages.xml /scdard/packages.xml
* download packages.xml
* <package name="org.kde.kdeconnect_tp".....
  <perms>
   ....
   <item name="android.permission.WRITE_MEDIA_STORAGE" granted="true" flags="0" />
   <item name="android.permission.WRITE_EXTERNAL_STORAGE" granted="true" flags="0" />
  </perms>
* copy modified "packages.xml" back
* adb shell
* cat /sdcard/packages.xml > /data/system/packages.xml
* reboot device
Comment 1 Nicolas Fella 2018-06-02 18:17:12 UTC
Officially WRITE_MEDIA_STORGAE can only be granted to system apps, i.e. not us. LineageOS has decided to patch this out, this is why it works for you. We will check if we can include it without breaking things for other users
Comment 2 lists@rhsoft.net 2018-06-02 18:27:55 UTC
yes, but there are other apps like "MyLocalAccount" or "Turbo FTP client" which after get directed to write to the sd-card triggerd the LineageOS dialog and have no problem without touch "/data/system/packages.xml" by hand

https://developer.android.com/reference/android/Manifest.permission.html#WRITE_EXTERNAL_STORAGE

https://stackoverflow.com/questions/43385895/proper-way-of-requesting-write-external-storage-permission
Comment 3 Lukas Sabota 2018-06-29 21:14:21 UTC
I'm also running into this issue on my Nokia 6.1 (2018), but sadly there is not a safe root option for the device yet to work around this.

I am fairly sure non-system applications are able to write to external storage.  The "FX File Manager" for Android is able to write to external storage (after asking permission): https://play.google.com/store/apps/details?id=nextapp.fx

I don't believe FX is installed as a system application.  Sadly it's not an open source example, but I think it may show that it is *possible*