termux / termux-app

Termux - a terminal emulator application for Android OS extendible by variety of packages.
https://f-droid.org/en/packages/com.termux
Other
36.1k stars 3.79k forks source link

[Feature]: Support `ACCESS_MEDIA_LOCATION` permission for GPS data #4140

Closed Diniboy1123 closed 1 month ago

Diniboy1123 commented 1 month ago

Feature description

Apparently on Android 10+ targeting applications, accessing GPS data of pictures is restricted. I noticed that while using Termux to save my pictures from /sdcard/DCIM/Camera/. The SHA-256 hash of the pictures were different and the location data was stripped whenever Termux tried to access it.

It would be a really useful feature for me if this permission handling would be implemented as one could backup Pictures with proper metadata to their servers.

Additional information

Most gallery apps support this feature. While Termux certainly isn't one, I don't see a reason why one would prefer stripped location data in their terminal emulator.

agnostic-apollo commented 1 month ago

How are you accessing the files in Termux?

Can you test if MANAGE_EXTERNAL_STORAGE permission works as per here. On Android >= 11, you can grant it with Android Settings -> Apps -> (Advanced ->) Special app access -> All files access -> Termux after installing Termux app v0.119.0-beta.1.

https://github.com/termux/termux-app/releases/tag/v0.119.0-beta.1

Diniboy1123 commented 1 month ago

Thanks for the quick response. It turned out to be a not-so-well documented CalyxOS feature: https://gitlab.com/CalyxOS/calyxos/-/issues/2630

After turning that off I can confirm that the latest Github release version works fine with all location info present.