#+TITLE: Pine phone #+SHORT-TITLE: PinePhone #+TOC-KEYWORDS: PinePhone #+KEYWORDS: junk, linux, phone #+DESCRIPTION: pain with PinePhone #+BEGIN(menu):left [[toc][]] #+END * Pine phone is not a phone A phone is a device that can /reliably/ make and accept phone calls. Pine Phone is not a phone because of its unreliability: it is actually a toy that /sometimes/ can accept and make calls. When you start using Pine Phone, first you get an impression that it is a working device. This is wrong: about 50% of the icons on your screen just will not work. For the creators of Pine Phone design is more important than functionality, and packaging is more important than the content. My Pine Phone came with Linux Manjaro preinstalled. Initially it had locked-screen bug (making the system unusable), so I tried booting [[mobian]] from an SDHC card. By 2022 the bug is probably resolved. * Read this before you buy it - You can miss important phone calls and never realize that someone has called you. (Both on Manjaro and [[mobian]].) - The screen can freeze or unexpectedly become black any moment. For 10 seconds or forever. - The phone is very slow. Even simple GUI apps may take 15+ seconds to load. - 4G does not work in Manjaro (which is the preinstalled OS). - The phone conversation is not smooth: small pieces of it are lost which is very annoying. - Often I cannot see whole program window (including configs) on the phone screen, and there is no way to scroll to the invisible part. - (In [[mobian]]) The phone heats and the battery discharges quickly. - There is a diode that could indicate charging but it does not. - No [[https://www.corning.com/gorillaglass/worldwide/en.html][gorilla glass]]: the screen is covered with cheap plastic and gets scratched easily. - The number that unlocks the screen is also the password of the user; using this password and [[src:sudo bash]] one gets access to root terminal. Evidently the creators did not want the security to be better than everything else in this device. - You cannot use [[src:nano]] in the terminal because there are no cursor movement keys available (but there are currency symbols, including Japanese yen and Russian ruble, as well as several types of double quotes). * ssh via wifi The first thing we need to do is to connect to this +piece of crap+ device via ssh. Using [[https://github.com/chalaev/wifi-switcher][wifi-switcher]] I create a WiFi hotspot on my laptop; [[src:/usr/share/wifi-switcher/get-passwords]] gives me the wifi password. After the phone is connected, [[src:nmap -sP 192.168.1.0/24]] tells me its IP address: 192.168.1.16. (NetworkManager authors think they can decide for you which WiFi network is better; since the WiFi hotspot on my laptop does have internet access, NetworkManager automatically connects to a "better" wifi network if there is any.) The first thing I did after connecting to the phone via WiFi was copying my public key into [[src:\~/.ssh/authorized_keys]]: #+BEGIN(src) shell on laptop ssh-copy-id 192.168.1.16 #+END I can easily connect to my PinePhone from my laptop using normal keyboard and screen. It is easy to guess my 4-digit numeric password unlocking the screen. It is important that no one could use this password to connect my phone via ssh. I avoid this by editing [[src:sshd]] configuration: #+BEGIN(src) shell on PinePhone nano /etc/ssh/sshd_config #+END in order to disable passwords: #+BEGIN(src) /etc/ssh/sshd_config on PinePhone … PasswordAuthentication no … #+END After that I restart [[src:sshd]] #+BEGIN(src) root shell on PinePhone systemctl restart sshd.service #+END * Tips I do not trust any GUI applications on PinePhone. Here are some useful console commands: ** Battery charge information #+BEGIN(src) shell cat /sys/class/power_supply/axp20x-battery/capacity #+END ← outputs a number = % of the total charge. ** Text messages (sms) #+BEGIN(src) shell mmcli -m 0 --messaging-list-sms #+END Manjaro GUI: use [[src:Spacebar]] to send text messages (sms); [[src:KDE Connect SMS]] does not work. ** Installing important packages #+BEGIN(src) root shell pacman -Syyu pacman -Syu screen #+END * Related pages - [[mobian][installing Mobian]] - [[tethering][Wi-Fi tethering]]