HCL:PinePhone

Jump to: navigation, search
Pinephone booting to a graphical user interface, next to a Geeko plush

The purpose of the Pinephone isn’t only to deliver a functioning Linux phone to end-users, but also to actively create a market for such a device, as well as to support existing and well established Linux-on-Phone projects. Only openSUSE Tumbleweed is supported.

Plasma Mobile running on Tumbleweed, in a PinePhone

Technical Data

  • Allwinner A64 Quad Core SoC with Mali 400 MP2 GPU
  • 2GB/3GB of LPDDR3 RAM
  • 5.95″ LCD 1440×720, 18:9 aspect ratio (hardened glass)
  • Bootable Micro SD
  • 16GB/32GB eMMC
  • USB Type C (power, data and HSMI)
  • Quectel EG-25G with worldwide bands
  • WiFi: 802.11 b/g/n, single-band, hotspot capable
  • Bluetooth: 4.0, A2DP
  • GNSS: GPS, GPS-A, GLONASS
  • Vibrator
  • RGB status LED
  • Selfie and Main camera (2/5Mpx respectively)
  • Main Camera: Single OV6540, 5MP, 1/4″, LED Flash
  • Selfie Camera: Single GC2035, 2MP, f/2.8, 1/5″
  • Sensors: accelerator, gyro, proximity, compass, barometer, ambient light
  • 3 external buttons: up, down and power
  • Hardware killswitches: LTE/GNSS, Wi-Fi, microphone, cameras and headphone
  • Samsung J7 form-factor 3000mAh battery
  • Matte black finished plastic case
  • 3.5mm headphone jack

Apps

This list suggests what applications can be used to get certain capabilities going.

  • File manager: Nautilus, Portfolio, Maui Index
  • Camera: Megapixels
  • Telephony: Calls (ModemManager), Plasma Dialer (ModemManager)
  • SMS: Chatty (ModemManager) or Spacebar (ModemManager)
  • Terminal emulator: King's Cross, QMLKonsole
  • Software: GNOME Software, Discover
  • Web browsing: GNOME Web (epiphany - Firefox based), Angelfish (Chromium/QT WebEngine based), Firefox (with mobile-config-firefox), Chromium
  • Gallery: Maui Pix, Koko
  • Calculator: Kalk (not KCalc)
  • Drawing: Pikasso
  • PDF Viewer: Okular (okular-mobile subpackage)
  • Calendar: Calindori, DayKountdown
  • Alarms: KClock
  • Text editors: Maui Nota, Maui Buho
  • Music players and recorders: Maui Vvave, Elisa, Audacity, KRecorder
  • Video players: Maui Clip, Clapper, Glide Player
  • Feed reader: Alligator
  • Chat: Neochat (Matrix), Fractal (Matrix), Kaidan (Jabber/XMPP), Chatty (XMPP), Telegram (MTProto), Tok (MTProto), Axolotl (Signal)
  • Maps: GNOME Maps, Pure Maps

Some can be installed through flatpaks in case they are not available in our repositories. Currently we don't have any CuboCore CoreApps packaged.

The recommended ways to install software are: Zypper, OBS Package Installer, GNOME Software, Discover and Flatpak. We have the cnf (cannot find) tool to search what packages provide certain binaries, e.g. cnf gpspipe; this only works for repositories already on your system.

Flathub has to be enabled as it comes disabled by default.

flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo

Programs already ported by the openSUSE community on Open Build Service can be installed using opi, e.g. opi kweather. We recommend you have the Packman repository added, so you can install software with restricted licenses, like many codecs.

Users can switch the package manager from zypper to dnf if desired, just make sure to copy the repositories where they belong, in order to switch simply execute the following commands:

zypper in dnf PackageKit-backend-dnf

This will prompt for a conflict with the package PackageKit-backend-zypp, proceeding will replace the PackageKit backend.

cp -t /etc/dnf/repos.d/ /etc/zypp/repos.d/*

Do not link both folders to prevent issues down the line. Once you transfered the repositories, check our wiki for more information.

Installing openSUSE in a Pinephone

As of the release 2020.12.16 Jumpdrive can be used to flash the eMMC memory directly. The procedure is the same as the sdcard. See the Pine64 wiki for more information. Indeed, installing to the eMMC storage is prefered for performance reasons.
  1. Download the image you want from here. Make a choice of phone enviroments:
    Geeko-white.png
    GNOME Shell adaption for small devices, developed by Purism.
    Geeko-white.png
    Plasma Mobile: Developed by the KDE community.

    If the direct links above do not work for you (as we are constantly building new images), please check the general download directory for the images.

  2. At your desire, verify the downloaded image.
  3. Flash the image to your storage unit (replace sdX with the device name of your storage). You can use lsblk to list your drives before and after plugging in the SD card/exposed eMMC, in order to select the correct drive.
    All previous data on the storage unit will be lost. Check first if the device you have selected is really the correct one!
    $ xzcat [image].raw.xz | sudo dd bs=4M of=/dev/sdX iflag=fullblock oflag=direct status=progress; sync
  4. Insert the SD card with the openSUSE image into your board.
  5. Power on the board.
    • Phosh: a welcome app will be started to walk you through the first boot steps.
  6. Have a lot of fun...
The default login goes with the username pine and the password 1234.
The root user's password is linux, you should set a different one using sudo passwd root.
During the first boot, the screen may stay black for about one minute. This is totally normal, and will happen as long as we are using Plymouth. Consequent boots should take less time.
Icon-warning.png
Warning: In openSUSE Tumbleweed the correct way to update the system through the terminal is using zypper dup, not zypper up.

The default filesystem is Btrfs, and the transparent compression is disabled by default as it caused updates to be slow and compressed some important files that should not be compressed.

Verifying the images

Every time new images are built, matching SHA-256 sums and PGP signatures accompany them. The PGP signatures verify the SHA-256 sums. These are the steps to verify our images:

  1. Download our public key.
    curl https://build.opensuse.org/projects/devel:ARM:Factory:Contrib:PinePhone/public_key > public_key
    
  2. Import the downloaded key.
    gpg --import public_key
    rm public_key
    
  3. Download the corresponding SHA-256 pair of files according to the image you download (e.g. Plasma Mobile). They can be found at the images repository.
  4. Check the SHA-256 sum against the accompanying signature, as per the following example:
    gpg --verify openSUSE-Tumbleweed-ARM-PLAMO-pinephone.aarch64-2021.04.16-Build27.11.raw.xz.sha256.asc openSUSE-Tumbleweed-ARM-PLAMO-pinephone.aarch64-2021.04.16-Build27.11.raw.xz.sha256
    

    The output should say Good signature.

    gpg: Signature made jue 22 abr 2021 00:31:21 CST
    gpg:                using RSA key 16C5D54F3F546F34
    gpg: Good signature from "devel:ARM OBS Project <[...]@build.opensuse.org>" [unknown]
    gpg: WARNING: This key is not certified with a trusted signature!
    gpg:          There is no indication that the signature belongs to the owner.
    Primary key fingerprint: 1D65 71D6 77CD 36CE F6B9  3856 16C5 D54F 3F54 6F34
    
  5. Finally, verify the SHA256 sum of the downloaded image. Make sure the *.sha256 and *.raw.xz files are at the same location.
    sha256sum -c openSUSE-Tumbleweed-ARM-PLAMO-pinephone.aarch64-2021.04.16-Build27.11.raw.xz.sha256
    

    The output should be something like:

    openSUSE-Tumbleweed-ARM-PLAMO-pinephone.aarch64-2021.04.16-Build27.11.raw.xz: OK
    

    If so, then you have successfully verified the integrity of the downloaded image. Else, the image you have is corrupted or has been tampered in transit. Try downloading it again over a more stable or safer network.

Current status

Feature Supported? Additional notes
Rear and front camera Yes Use the megapixels app, it includes post-processing scripts to enhance image quality.
Camera flash Yes
WiFi Yes In Plasma Mobile, when prompted for a KWallet password, keep in mind that if you set one you will be asked for it every reboot. If you don't want to, just press Ok without typing anything.
Bluetooth Yes
GNSS:GPS Yes The A-GPS functionality is integrated into eg25-manager.
Magnetometer, Ambient light, Accelerometer, Gyroscope Yes Supported via iio-sensor-proxy.
Vibration motor Yes
Proximity Yes On Phosh, the display is disabled when an object comes close to the sensor. In the case of Plasma Mobile, the screen does not currently turn off while in a call.
Notification LED Yes
Volume buttons Yes
Audio Yes
Mobile data Yes
SMS Yes
Calls Yes
USB OTG Yes Storage units may need to be manually mounted before they can be accessed. Run lsblk in a terminal session to see if your devices are detected.
Official dock Yes Mouse, keyboard, RJ-45 and HDMI work, as expected since this a matter of following the USB standard.
Wireless hotspot Yes Requires dnsmasq to be installed (it is included now), also the WiFi connectivity needs to enabled, else it will fail indicating that the device wlan0 is not available.
USB Tethering No
USB MTP No
System encryption No

Troubleshooting and suggestions

  • When updating, you may notice zypper will try to pull a lot of recommended packages. This can be solved by updating with the following arguments:
sudo zypper dup --no-recommends

This happens because our images are built without recommended packages. Inversely, to install all recommended packages that have not yet been installed:

sudo zypper dup --recommends

Usually lang (translation) subpackages are installed as part of the recommended packages. This behavior can't be controlled through PackageKit, but you can disable it by commenting out # solver.onlyRequires = false and changing it to true in /etc/zypp/zypp.conf.

  • If some applications do not launch, try executing the following command:
rm -rf ~/.cache
  • In case there are kernel or u-boot updates available, prefer updating through PackageKit (Discover or GNOME Software), since these makes the updates install after a system reboot, which is safer for the system integrity.
  • If you have issues with the SIM card, try removing the PIN code from another device.
  • For YaST, note that the GUI does not work, but you can use the built-in Alt, Tab and arrow buttons (in QMLKonsole or Phosh's Squeekboard) to use the YaST2 TUI. Launch it by running yast2 in a terminal session (note that you can use it over SSH too).
  • If you have problems with audio playback make sure the correct output device (Internal speaker) and device profile settings (Default) are selected in the audio settings. Multimedia content on websites or container formats like mp4 may fail to play - try installing the necessary codecs. They are not included in openSUSE distributions for legal reasons.
  • The emoji support for Plasma Mobile is not included by default. To add it:
    sudo zypper install maliit-keyboard2-lang maliit-keyboard2-emoji
    
  • To setup the WiFi connection easily through the terminal you can use nmtui or nmcli. There is a hard way using wpa_supplicant, which is the one in the case of JeOS (make sure wicked is not running):
systemctl stop wicked wickedd
wpa_passphrase SSID PASSWORD > /etc/wpa_supplicant/SSID.conf #replace SSID and PASSWORD with your configuration
ip link set wlan0 down; ip link set wlan0 up
wpa_supplicant -B -iwlan0 -c /etc/wpa_supplicant/SSID.conf -Dnl80211,wext
ip addr add DEVICEIP/SUBNET dev wlan0    #example: ip addr add 10.42.0.27/24 dev wlan0
#this ^ is your local IP, as DHCP/dhclient won't set one for you, choose whatever number you want as long as it is not already in use; use ip neigh to scan your local network from another device
ip route add default via GATEWAY||ROUTE  #example: ip route add default via 10.42.0.1
echo "nameserver 1.1.1.1">>/etc/resolv.conf #you need to add a DNS server, 1.1.1.1 is the Cloudflare DNS

If you want to use wicked, note that it is possible to configure the network via YaST.

  • You can use the sftp protocol to browse your phone files remotely, through the terminal or certain file browsers like Dolphin. MTP implementations are not provided yet for security reasons.
  • If you try to chroot directly into the SD card from your laptop you will see errors like these:
"chroot: failed to run command '/usr/bin/rpmdb': No such file or directory"
"chroot: failed to run command '/bin/bash': No such file or directory"

Which is confusing because they don't really tell much about what is going under the hood. To solve it see our guide

In a nutshell: mount the SD card/eMMC, set up binmft for the current session (install qemu-linux-user and execute qemu-binfmt-conf.sh), copy the binmft files to the target chroot (e.g. cp /usr/bin/{qemu-aarch64-binfmt,qemu-aarch64} /mnt/sdcard/usr/bin/).

After following these steps you should be able to chroot with no problems. The above instructions apply to only openSUSE distros.

  • Waydroid is available. TODO: install instructions

Contributing

If you want to contribute in packaging, testing or have any suggestions, don't hesitate to contact us via:

You can reach us for help in those chats case you run into any issues, but do keep in mind that we are all doing this voluntarily and work on the project with limited time.

We also have list of available tasks, ideas and notes in the openSUSE Etherpad.

The source code is available at the devel:ARM:Factory:Contrib:PinePhone Open Build Service project.

The following repositories are used to test and experiment changes:

These repositories are unstable and may risk leaving your device in an unusable state. Add them at your own risk.
zypper ar -p90 https://download.opensuse.org/repositories/home:/alefnode:/branches:/devel:/ARM:/Factory:/Contrib:/PinePhone/standard/home:alefnode:branches:devel:ARM:Factory:Contrib:PinePhone.repo
zypper ar -p90 https://download.opensuse.org/repositories/KDE:/Frameworks5/openSUSE_Factory/KDE:Frameworks5.repo
zypper ar -p90 https://download.opensuse.org/repositories/home:/andresbs:/plasma-mobile/openSUSE_Tumbleweed/home:andresbs:plasma-mobile.repo
zypper ar -p90 https://download.opensuse.org/repositories/home:/andresbs:/plasma-mobile:/extra/openSUSE_Tumbleweed/home:andresbs:plasma-mobile:extra.repo
zypper ar -p90 https://download.opensuse.org/repositories/home:/andresbs:/plasma-mobile:/gear/openSUSE_Tumbleweed/home:andresbs:plasma-mobile:gear.repo
zypper ar -p90 https://download.opensuse.org/repositories/home:/andresbs:/pure-maps/openSUSE_Tumbleweed/home:andresbs:pure-maps.repo

Useful links