Rooting your Gemini PDA

I recently got a Gemini PDA (WiFi). To run rooted Android and Linux (dual boot) I did the following:

  1. Followed the details here.
  2. Downloaded & unzipped Windows Flashing Tool
  3. Downloaded & installed Windows Drivers
  4. Chose my Partition setup here then downloaded
    1. Scatter File
    2. Base Firmware (ie Android)
    3. Linux Firmware
  5. Unzipped both firmwares into a dir & put scatter file in there
  6. Connected Gemini powered off
  7. Started flashing tool, selected scatter file (following this guide)
  8. Chose “Firmware Upgrade” & “Download”
  9. Powered Gemini on
  10. Waited. First you get a fast red progress bar (partitioning?). Then you get two slow yellow progress bars (presumably installing each OS). In total the process took 35-45 minutes.
    Update: on a recent install (see step 11) this was much quicker, a couple of minutes.
  11. Powered on Gemini into Android (my default). To get “proper” root I installed Magisk Manager from here.
    WARNING: latest Magisk Manager put my Gemini into a boot loop requiring firmware reinstall – so don’t update to latest version & allow it to rebuild!

Note I skipped backing up the NVRAM. You probably shouldn’t do that.

Then post-install I installed Linux Deploy from the play store, Arch Linux under that (into an ext4 partition on my SD card) & termux as a terminal into it.

 

Arch Linux on aarch64 gpg keys

If you have an issue with gpg verification of packages the instructions are slightly different to recover as the signing keys are different:

pacman-key --init
pacman-key --populate archlinuxarm

This is if you get errors like:

error: mutt: signature from "Arch Linux ARM Build System <builder@archlinuxarm.org>" is unknown trust
:: File /var/cache/pacman/pkg/mutt-1.10.0-1-aarch64.pkg.tar.xz is corrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n] y
error: failed to commit transaction (invalid or corrupted package (PGP signature))
Errors occurred, no packages were upgraded.

Build emacs 25 rpm for redhat / centos 7

This is for the console only (no graphical xwindows) version. Installs into /opt/emacs253 so can run side-by-side with system emacs.

  • # Download emacs tarball & untar
  • ./configure --prefix=/opt/emacs253 --with-gif=no --with-tiff=no --with-x-toolkit=no \
    
    --with-xpm=no --with-jpeg=no --with-png=no
  • # install any dependencies & build
    
    make
    
    make DESTDIR=/tmp/emacs install
  • # Install fpm (gem install fpm) to build package
    
    fpm -s dir -t rpm -C /tmp/emacs --name emacs25 --version 25.3 --iteration 1 --description "emacs 25.3"
  • rm -rf /tmp/emacs

					

gsconnect – native kdeconnect for gnome

https://extensions.gnome.org/extension/1319/gsconnect/ is a fantastic implementation of kdeconnect which allows you interface with your android phone from your linux desktop.

I had some issues configuring it on Fedora as I was previously using kdeconnectd so gsconnect defaulted to the next available port (1717).

To resolve this I removed kdeconnectd (yum remove), uninstalled gsconnect (rm -rf ~/.local/share/gnome-shell/extensions/gsconnect@andyholmes.github.io), wiped the prefs (dconf reset -f /org/gnome/shell/extensions/gsconnect/)  and then reinstalled gsconnect.

Test it’s listening on 1716:

lsof -Pi | grep 171

And sync with kdeconnect android app.

(Also ensure your linux machine isn’t firewalling the ports).

Another useful emacs package: crux

Contains various helper functions including crux-duplicate-and-comment-current-line-or-region for when you want to rework a line of code but keep the original. I’ve added these shortcuts:

;; crux
(global-set-key (kbd "C-c I") #'crux-find-user-init-file)
(global-set-key (kbd "C-c r") #'crux-rename-file-and-buffer)
(global-set-key (kbd "C-c d") #'crux-duplicate-current-line-or-region)
(global-set-key (kbd "C-c M-d") #'crux-duplicate-and-comment-current-line-or-region)
(global-set-key (kbd "C-c n") #'crux-cleanup-buffer-or-region)