- 
                Notifications
    You must be signed in to change notification settings 
- Fork 105
For Android users
- 
FX File Explorer(recommended): a file explorer app that allows you to connect to Termux space.
- 
Connect to storage> Select "Termux" as storage provider > Select Termux $HOME directory. (no root needed)
- NOTE: Android's storage space is usually Termux/hOME/storage.- ie, the Downloadfolder you normally see in most "File Explorer App" equals toTermux home/storage/downloads
 
- ie, the 
 
- 
- 
Install Termuxin Android, using theF-droidapp. Follow instructions here.
- 
Open Termux and type apt update && apt upgrade.
- 
Type pkg install opensshto install SSH for ssh-keys.
- 
Type pkg install gitto install Git.
- 
Configure Git username and email: git config --global user.name "John Doe" git config --global user.email [email protected] NOTE: This is the name and email which will go into commits, it can be anything, not necessary related to your GitHub account. 
- 
In the Termux terminal, type termux-setup-storageto allow Termux access to your internal storage and/or SD card
- 
In the Termux terminal, create a folder for your graph, for example cd documents; mkdir MyGraphand clone your repo there with the commandgit clone [email protected]:{your-username}/{your-reponame}.git ~/storage/shared/MyGraph
- 
Open Logseq and add a graph on that folder. Check that all looks ok. 
- 
Type git config --global --add safe.directory ~/storage/shared/MyGraphto enable Git operations on that folder.NOTE: If you encounter issues like this, please make sure you are using the correct path. 
NOTE: It might increase your battery usage drastically, I highly recommend the shortcut method below in order to save battery life.
Check this gist for more.
- 
Install Termux:WidgetsfromF-droid.
- 
In Termux, type cd ~/.shortcutsand edit a file named, for example,pull-graphcontaining:#!/usr/bin/bash eval $(ssh-agent) source ~/../usr/bin/source-ssh-agent # path might varied based on your system and brand cd {your repo location} # eg: cd ~/documents/MyGraph git pull NOTE: If you use password-free private keys for Git you don't need the ssh-agentline. You can include it to avoid typing the private key passphrase each time.
- 
In the same ~/.shortcutsfolder create a second one named, for example,push-graphcontaining:#!/usr/bin/bash eval $(ssh-agent) source ~/../usr/bin/source-ssh-agent # path might varied based on your system and brand cd {your repo location} git add -A git commit -m "sync from android" git push 
- 
Add a widget for Termux Widgetapp to the Android screen, which will show the scripts available in~/.shortcuts(in our example, it will showpull-graphandpush-graph). Taping on them, they will be executed by Termux.
- Tap pull-graphto download the most recent version of your graph from GitHub.
- Open Logseq and admire the latest version of your notes.
- Edit/add notes, work on them.
- Exit Logseq and tap push-graphto upload your changes to GitHub.