ayushnix / pass-coffin

A password store extension to hide data inside a signed and encrypted coffin
GNU General Public License v3.0
41 stars 3 forks source link

Install on Termux (without sudo privilages)? #17

Open danielkrajnik opened 1 year ago

danielkrajnik commented 1 year ago

I'm trying to install pass coffin on a non-rooted Android device via termux. I'm stuck on sudo make install step. It complains that it can't find /etc/bash_completion.d directory:

install: creating directory '/data/data/com.termux/files/usr/lib/password-store'
install: creating directory '/data/data/com.termux/files/usr/lib/password-store/extensions'
install: cannot change permissions of ‘/etc/bash_completion.d’: No such file or directory
make: *** [Makefile:18: install] Error 1

There may be two things here:

  1. no sudo access
  2. location is wrong (by default termux uses $PREFIX - /data/data/com.termux/files/usr)

Any advice would be really appreciated.

danielkrajnik commented 1 year ago

Okay, I think make install DESTDIR=$PREFIX works, although now pass open complains that: Error: coffin is not in the password store.

even though it's clearly there... (.password-store/.coffin/coffin.tar.gpg)

danielkrajnik commented 1 year ago

It turns out that PREFIX variables got messed up and scripts landed in

/data/data/com.termux/files/usr/data/data/com.termux/files/usr/lib/password-store/extensions/

instead of

/data/data/com.termux/files/usr/lib/password-store/extensions/

However, even after moving them to the correct location pass open still gives the same error as above.

Also termux doesn't use systemd so automatic timers won't work after opening the coffin, so it may make more sense to just extract coffin manually and close it via cron job every 10 minutes or so.

If anyone have managed to get this to work though please let me know.