nix-community / nix-on-droid

Nix-enabled environment for your Android device. [maintainers=@t184256,@Gerschtli]
https://nix-on-droid.unboiled.info
MIT License
1.23k stars 65 forks source link

Trying to grant access to external storage #55

Closed 573 closed 4 years ago

573 commented 4 years ago
$ nix run nixpkgs.nix-info -c nix-info -m

 - system: `"aarch64-linux"`
 - host os: `Linux 4.4.111-17594784`
 - multi-user?: `no`
 - sandbox: `no`
 - version: `nix-env (Nix) 2.3.3`
 - channels(nix-on-droid): `"home-manager-19.09, nix-on-droid, nixpkgs-19.09.2213.71c6a1c4a83"`
 - nixpkgs: `/data/data/com.termux.nix/files/home/.nix-defexpr/channels/nixpkgs`

Hello,

nix-on-droid is just great and my favorite android app so far. What I'm still trying to do is getting access to a folder outside for easily sharing configs and stuff:

But neither of the commands seems to be available. I also gave the app storage permission.

t184256 commented 4 years ago

Great to hear you like it.

Could you please be more specific about what you are trying to achieve and how it fails?

What I did is I opened the app settings from Android and granted it storage access permission. For me it was enough to allow write access to /sdcard and I basically never investigated further. Do you have write access after that? Read access? What happens if you create /sdcard/Android/data/com.termux.nix/files, is it readable/writable?

573 commented 4 years ago

@t184256 didn't know about /sdcard. Works for me too! I think this was more question than an issue. Is there smth like a mount command as well to also see the internal storage path ?

573 commented 4 years ago

Don't mind my last question just found:

ls /data/data/com.termux.nix/files/home/
t184256 commented 4 years ago

Thanks for reporting along. If you think cothis knowledge should be put in some form that is useful to others, I'm all for adding it to readme or wiki.