So, I’ve had my PinePhone for a couple of days now.
It’s awesome to be running mainline Linux with a “normal” userland on a phone.
It allows my desktop-Linux knowledge to be applied to my phone.
I’ve written some scripts and utils. They are of course open-source, and I
thought I might share them, as some of them might be useful to others.
Pinemouse
This is implements a toggle-able touchpad mode that works well under any
desktop environment.
While technically not PinePhone specific, it’s written for using more
desktop-like applications that require a proper “relative” input
device(application that capture the mouse, e.g. FPS games)
A trackpoint(“Thinkpad nipple”) mode is currently in the works.
In the future this script(or an ancestor of it) might also emulate keyboard
events, and provide basic universal onscreen touch-controls.
This could be extended to a full virtual keyboard when I figure out how to
draw an overlay over all desktop environments.
You currently need to install
Lua(most versions will do, Lua5.1 is easiest),
and two of my libraries:
lua-input and
lua-time.
For usage, see the README.md on github.
Demo video of running an application that captures the mouse(AssaultCude):
This also combines great with docked mode, as you don’t need a mouse anymore
to make effective use of another monitor, a keyboard suffices.
MyThumb
If you’re familiar with DriveDroid on Android, this is basically that implemented in bash.
if you’re not, Linux supports running as a USB device(presumably attached to another computer), and allows emulating a USB Mass Storage device(like a thumbdrive).
You can provide a filesystem image and use the PinePhone as a USB stick, e.g. to boot a computer. Allows for CDROM emulation.
The functionality was adapted from https://git.sr.ht/~martijnbraam/thumbdrives, and you should use that version if you’re comfortable compiling it or your distro includes it.
You need kernel support for this. Make sure to enable: CONFIG_CONFIGFS_FS
, CONFIG_USB_F_MASS_STORAGE
, CONFIG_USB_CONFIGFS
and CONFIG_USB_CONFIGFS_MASS_STORAGE
Tweaks
Some things that I found useful on my pinephone.
- I just figured out that you can make the phone/docked mode toggle always available if you set your machine type to something other than
handset
(the default):sudo hostnamectl set-chassis convertible
- I’ve had issues with the ondemand CPU governor and really bad USB ethernet performance.
- If you have a 3.5mm “headphone”/“aux” cable you can use the PinePhone hardware serial console. Combines well with a USB serial adapter to debug boot messages. You can also use this as a 3.3v serial port for talking to uC, I guess…
Use at your own risk!
Any questions, suggestions etc. welcome!