2

Suppose you fear you could meet someone who will threaten you with death.

Assuming the bad guy won't destroy your handheld (for example an Ubuntu Touch device) on sight, a barely decent form of protection would be to have your phone continuously stream its microphone to a remote server you do not have access to, programmed to publicly upload the recorded audio content on a popular YouTube channel on a regular basis, unless a circle of physically unavailable, neutral, trusted people for the threatener do not cancel it if nothing happened.

I want to know how to do that.

| improve this question | | | | |
2

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

  • Ubuntu Touch specific: Increase the size of the system.img of your Ubports phone with some extra gigs.

  • Ubuntu Touch specific: Make your rootfs writable

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
  • Start tor
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.
| improve this answer | | | | |
  • Now, on this site I can admire the solution and try it on my E4.5 ;-) – Bruni Dec 20 '19 at 16:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.