Changes to project structure
This commit is contained in:
parent
7d71c4bfda
commit
fb63da2836
51 changed files with 801 additions and 586 deletions
116
build/articles/rsync-android
Normal file
116
build/articles/rsync-android
Normal file
|
|
@ -0,0 +1,116 @@
|
|||
[1m[23m[39m[49m[24m[29mUsing rsync on Android to syncronise my Music library[0m
|
||||
|
||||
Never
|
||||
|
||||
[22m[3m[39m[49m[24m[29m12.01.2026[0m
|
||||
|
||||
────────────────────
|
||||
|
||||
[1m[23m[39m[49m[24m[29mSETUP TERMUX[0m
|
||||
|
||||
Install Termux using F-Droid.
|
||||
|
||||
Update software repos.
|
||||
|
||||
[0m[0m[22;23;24m[0m[22;23;24mpkg[0m[22;23;24m[0m[22;23;24m update[0m[22;23;24m[0m
|
||||
|
||||
Grant file access permissions using.
|
||||
|
||||
[0m[0m[22;23;24m[0m[22;23;24mtermux-setup-storage[0m[22;23;24m[0m
|
||||
|
||||
[1m[23m[39m[49m[24m[29mESTABLISHING AN SSH CONNECTION[0m
|
||||
|
||||
If network (such as eduroam) is blocking ssh trafic between machines,
|
||||
open a Wi-Fi Hotspot on your Linux machine and connect the Android
|
||||
device to it before using [22m[23m[31m[47m[24m[29m rsync [0m or [22m[23m[31m[47m[24m[29m ssh [0m.
|
||||
|
||||
[1m[23m[39m[49m[24m[29mConfiguring Android[0m
|
||||
|
||||
Install the openssh server on Termux.
|
||||
|
||||
[0m[0m[22;23;24m[0m[22;23;24mpkg[0m[22;23;24m[0m[22;23;24m install openssh[0m[22;23;24m[0m
|
||||
|
||||
Start the ssh server daemon.
|
||||
|
||||
[0m[0m[22;23;24m[0m[22;23;24msshd[0m[22;23;24m[0m
|
||||
|
||||
Get the ip address of the Android machine (in the Hotspot).
|
||||
|
||||
[0m[0m[22;23;24m[0m[22;23;24mifconfig[0m[22;23;24m[0m
|
||||
|
||||
[22m[23m[31m[49m[24m[29mWarning: cannot open /proc/net/dev (Permission denied). Limited output.[0m
|
||||
[22m[23m[31m[49m[24m[29mlo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536[0m
|
||||
[22m[23m[31m[49m[24m[29m inet 127.0.0.1 netmask 255.0.0.0[0m
|
||||
[22m[23m[31m[49m[24m[29m unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 1000 (UNSPEC)[0m
|
||||
|
||||
[22m[23m[31m[49m[24m[29mrmnet0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST> mtu 1280[0m
|
||||
[22m[23m[31m[49m[24m[29m inet 10.200.157.166 netmask 255.255.255.0 destination 10.200.157.166[0m
|
||||
[22m[23m[31m[49m[24m[29m unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 1000 (UNSPEC)[0m
|
||||
|
||||
[22m[23m[31m[49m[24m[29mwlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500[0m
|
||||
[22m[23m[31m[49m[24m[29m inet 10.42.0.200 netmask 255.255.255.0 broadcast 10.42.0.210[0m
|
||||
[22m[23m[31m[49m[24m[29m unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 1000 (UNSPEC)[0m
|
||||
|
||||
In this case 10.42.0.200.
|
||||
|
||||
The ssh server should now be running and listening on port 8022. You can
|
||||
check by running
|
||||
|
||||
[0m[0m[22;23;24m[34;22;23;24mnmap[0m[22;23;24m[0m[22;23;24m [0m[22;23;24m[33;22;23;24m-Pn[0m[22;23;24m[0m[22;23;24m [0m[22;23;24m[90;22;23;24m<[0m[22;23;24m[0m[22;23;24mip_address[0m[22;23;24m[90;22;23;24m>[0m[22;23;24m[0m
|
||||
|
||||
For me [22m[23m[31m[47m[24m[29m <ip_address> [0m whould be 10.42.0.200.
|
||||
|
||||
Get the username.
|
||||
|
||||
[0m[0m[22;23;24m[34;22;23;24mwhoami[0m[22;23;24m[0m
|
||||
|
||||
[22m[23m[31m[49m[24m[29mu0_a700[0m
|
||||
|
||||
Set a password for this user.
|
||||
|
||||
[0m[0m[22;23;24m[34;22;23;24mpasswd[0m[22;23;24m[0m
|
||||
|
||||
[1m[23m[39m[49m[24m[29mConnecting to Android via ssh[0m
|
||||
|
||||
Make sure you have an ssh key pair on the Linux system. If not generate
|
||||
one using [22m[23m[31m[47m[24m[29m ssh-keygen [0m.
|
||||
|
||||
Now connect to Android by [22m[23m[31m[47m[24m[29m ssh [0m.
|
||||
|
||||
[0m[0m[22;23;24m[34;22;23;24mssh[0m[22;23;24m[0m[22;23;24m [0m[22;23;24m[90;22;23;24m<[0m[22;23;24m[0m[22;23;24musername[0m[22;23;24m[90;22;23;24m>[0m[22;23;24m[0m[22;23;24m@[0m[22;23;24m[90;22;23;24m<[0m[22;23;24m[0m[22;23;24mip_address[0m[22;23;24m[90;22;23;24m>[0m[22;23;24m[0m[22;23;24m -p 8022[0m[22;23;24m[0m
|
||||
|
||||
[1m[23m[39m[49m[24m[29mSYNCRONISING FILES WITH RSYNC[0m
|
||||
|
||||
Install [22m[23m[31m[47m[24m[29m rsync [0m on Termux and Linux. Make sure to keep your own openssl
|
||||
config.
|
||||
|
||||
[0m[0m[22;23;24m[0m[22;23;24mpkg[0m[22;23;24m[0m[22;23;24m install rsync[0m[22;23;24m[0m
|
||||
|
||||
Now on your Linux machine, syncronise your Music library with rsync.
|
||||
|
||||
[0m[0m[22;23;24m[34;22;23;24mrsync[0m[22;23;24m[0m[22;23;24m [0m[22;23;24m[33;22;23;24m-av[0m[22;23;24m[0m[22;23;24m [0m[22;23;24m[33;22;23;24m-e[0m[22;23;24m[0m[22;23;24m [0m[22;23;24m[36;22;23;24m"ssh -p 8022"[0m[22;23;24m[0m[22;23;24m ~/Music [0m[22;23;24m[90;22;23;24m<[0m[22;23;24m[0m[22;23;24musername[0m[22;23;24m[90;22;23;24m>[0m[22;23;24m[0m[22;23;24m@[0m[22;23;24m[90;22;23;24m<[0m[22;23;24m[0m[22;23;24mip_address[0m[22;23;24m[90;22;23;24m>[0m[22;23;24m[0m[22;23;24m:/data/data/com.termux/files/home/storage/music[0m[22;23;24m[0m
|
||||
|
||||
[1m[23m[39m[49m[24m[29mRefreshing the Android MediaStore[0m
|
||||
|
||||
Android uses a Database to store files. In order to play your music,
|
||||
this database needs to be refreshed. This can be achieved by a reboot or
|
||||
by using adb to manually refresh it.
|
||||
|
||||
[0m[0m[22;23;24m[34;22;23;24msudo[0m[22;23;24m[0m[22;23;24m dnf install adb[0m[22;23;24m[0m
|
||||
|
||||
Connect the Android device via USB and see if it is listed.
|
||||
|
||||
[0m[0m[22;23;24m[0m[22;23;24madb[0m[22;23;24m[0m[22;23;24m devices[0m[22;23;24m[0m
|
||||
|
||||
If it is, restart adb in TCP mode with port 5555
|
||||
|
||||
[0m[0m[22;23;24m[0m[22;23;24madb[0m[22;23;24m[0m[22;23;24m tcpip 5555[0m[22;23;24m[0m
|
||||
|
||||
Connect to the device using its .
|
||||
|
||||
[0m[0m[22;23;24m[0m[22;23;24madb[0m[22;23;24m[0m[22;23;24m connect [0m[22;23;24m[90;22;23;24m<[0m[22;23;24m[0m[22;23;24mip_address[0m[22;23;24m[90;22;23;24m>[0m[22;23;24m[0m
|
||||
|
||||
Refresh MediaStore.
|
||||
|
||||
[0m[0m[22;23;24m[0m[22;23;24madb[0m[22;23;24m[0m[22;23;24m shell am broadcast [0m[22;23;24m[33;22;23;24m-a[0m[22;23;24m[0m[22;23;24m android.intent.action.MEDIA_SCANNER_SCAN [0m[22;23;24m[33;22;23;24m-d[0m[22;23;24m[0m[22;23;24m file:///data/data/com.termux/files/home/storage/music/[0m[22;23;24m[0m
|
||||
[0m]8;;\
|
||||
Loading…
Add table
Add a link
Reference in a new issue