The following is simplest procedure I came up with. It will work on any GNU/Linux handheld, but instructions for an Ubuntu touch device are provided, anyway.
On the handheld device
sudo mount -o remount,rw /
- Proceed to install
tor
and rsync
; for an Ubuntu Touch device it would be
sudo apt install tor rsync
- Have this uncommented in your torrc
/etc/tor/torrc
----------------
HiddenServiceDir /var/lib/tor/ssh/
HiddenServicePort 22 127.0.0.1:22
service tor start # Ubuntu touch
systemctl enable tor # Any other Ubuntu version
systemctl start tor # Any other Ubuntu version
- Get the onion address of your handheld
/var/lib/tor/ssh/hostname
--------------------------
your_onion_address.onion
- Record from microphone with
arecord ~/Music/recording.wav
On the remote computer
Install rsync and youtube-video-upload
(follow the instructions on the website to configure it for your account).
Write the recording.yaml
corresponding to your recording.wav.
Run the sync_and_upload.sh script
sync_and_upload.sh
-------------------------
#!/usr/bin/env bash
watch -n <seconds_between_consecutive_syncs> rsync phablet@your_onion_address.onion /path/to/recording.wav &
watch -n <seconds_between_consecutive_uploads> python3 -m youtube_video_upload /path/to/recording.yaml
Known issues
- It is not adviced by Ubuntu Touch manual to write on the rootfs, so you will have to repeat the procedure every time you upgrade your phone;
- After receiving a call, microphone mutes in the recording;
- Tor should start at boot;
- In Ubports/Ubuntu Touch everything should run into a libertine container.