The following are some of the useful tips that could help you in your Droidian journey:

How to resize the rootfs?

To resize rootfs, boot to TWRP, open Terminal under Advanced, and type the following commands:

 e2fsck -f /data/rootfs.img
 resize2fs /data/rootfs.img 16G

This will resize the rootfs to 16 GB.

NOTE: the larger the rootfs, the harder it will be to make a backup from it.

How to connect via SSH?

Enable ssh on device:

sudo systemctl enable ssh

Then plugin via usb and:

ssh droidian@10.15.19.82

the password is 1234 by default

If no new network interface is showing up on your computer when you plug usb in, you may need to install droidian-devtools on the phone and restart the device.

sudo apt install droidian-devtools 

Additionally, if the host is Windows, and the RNDIS device in device manager shows up as broken, you may need to update the driver: browse my computer for drivers -> Let me pick from a list -> Network Adapters -> Microsoft -> USB RNDIS Adapter

Change password

Open up the terminal app and run

sudo passwd droidian

Hotspot has no internet

Open up the terminal app and run

/usr/sbin/ifconfig

Look for an interface with the name rmnet_dataX (X can be any number)

After that run

sudo sysctl net.ipv4.ip_forward=1
sudo iptables -t nat -A POSTROUTING -o rmnet_data0 -j MASQUERADE
sudo iptables -A FORWARD -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
sudo iptables -A FORWARD -i wlan0 -o rmnet_data0 -j ACCEPT

Make sure to replace rmnet_data0 with your interface.

Modem not showing up (no 2G/3G/4G Signal symbol on top left)

Rebooting modemmanager might help:

sudo mmcli -m any -r

Enable GPS

sudo mmcli -m any --location-enable-gps-nmea --location-enable-gps-raw

To make it accessable for e.g. PureMaps, start Geoclue:

/usr/libexec/geoclue-2.0/demos/agent 

Add VPN connection from openvpn file

sudo nmcli connection import type openvpn file path/to/vpnfile.ovpn

Add the username to the connection with (replace “${vpnname}” and “${myname}” with yours:

nmcli connection modify "${vpnname}" +vpn.data username="${myname}"

Then you should be able to enable VPN via Network settings

Make a Screenshot

  • In Phosh, you can activate a system menu by long-pressing the power button. Оne of the 4 options in it is making a screenshot. The screenshot will be copied to the Wayland clipboard, so you will need then to paste it into a file - for example with the wl-paste command. First install the wl-clipboard package if not installed yet (sudo apt install wl-clipboard). Then run the paste-and-save command in your terminal or SSH session as follows:

      wl-paste > ~/Pictures/"$(date +'%Y-%m-%d_%H:%M:%S').png"
    
  • Previous method takes screenshot immediately, so you have all the chances to get screenshot of the power button menu. Alternatively, you can use grim command to trigger screenshot from the command line. First install the grim package if not installed yet (sudo apt install grim). Then run the command in your terminal or SSH session as follows:

      grim ~/Pictures/"$(date +'%Y-%m-%d_%H:%M:%S').png"
    

Make a Screencast

First install the wf-recorder package if not installed yet (sudo apt install wf-recorder). Then run the wf-recorder command in your terminal or SSH session. If run without arguments, it starts writing video of the current Wayland session to the recording.mkv file in your home directory. Recording can be stopped from the same terminal or SSH session by pressing CTRL+C. Information on how to specify a filename, as well as various format options, can be found in the wf-recording help or its man page (run sudo apt install man if not installed).

Enable desktop mode without a monitor plugged in

In /etc/machine-info change the value of CHASSIS from handset to desktop. now on screen keyboard can be enabled in settings->accessibility. To go back to default change it back to handset

Start GUI application as root

To start some GUI application as root (for example, gedit), type:

sudo -E gedit