Google Pixel 3a: Difference between revisions

From Maemo Leste Wiki
Jump to navigation Jump to search
Norayr (talk | contribs)
No edit summary
 
(19 intermediate revisions by one other user not shown)
Line 7: Line 7:
|dram=4GB
|dram=4GB
|soc=2 x 2 GHz, 6 x 1.7GHz
|soc=2 x 2 GHz, 6 x 1.7GHz
|lcd=1080x2220 OLED
|display=1080x2220 OLED
|video= adreno 615
|video= adreno 615
|audio=yes
|audio=yes
Line 13: Line 13:
|storage=64GB
|storage=64GB
|usb=Micro USB C
|usb=Micro USB C
|camera=yes
|camera=IMX355, IMX363
|sensors=yes
|sensors=BMI160, AK0991X, TMD2725, BMP380, MAX11261
|battery=3000/3700mAh
|battery=3000 / 3700mAh
|sw_kernel=6.12
|sw_kernel=6.12
|sw_charging=Yes
|sw_charging=Yes
|sw_touchscreen=Yes, multitouch
|sw_touchscreen=Yes, capacitive
|sw_screen=Yes
|sw_screen=Yes
|sw_3daccel=Yes
|sw_3daccel=Yes
Line 36: Line 36:
|sw_gps=Yes, ModemManager only
|sw_gps=Yes, ModemManager only
|sw_agps=Yes, ModemManager only
|sw_agps=Yes, ModemManager only
|sw_frontcam=Yes, qcam only
|sw_frontcam=Yes
|sw_backcam=Yes, qcam only
|sw_backcam=Yes
|sw_idlepower=280mW
|sw_idlepower=280mW
|sw_standbytime=40/50h
|sw_standbytime=40 / 50h
}}
}}


== Installation ==
== Installation ==


WIP
'''WARNING: Installing Maemo Leste will erase your Android installation and all user data. Make a backup before proceeding.'''
 
Before installing Maemo Leste, it is recommended to upgrade Android to the latest available version and install all system updates. Maemo Leste uses firmware from existing Android partitions to support various hardware components, as also described in the Mobian [https://wiki.debian.org/InstallingDebianOn/Google/Pixel3a wiki].
 
'''Do not modify the device's partition table.''' The installation only requires flashing existing partitions.


'''WARNING: Flashing Maemo Leste to your device will erase your Android installation and all the data contained in it.'''
You will need a computer with recent Android SDK Platform Tools installed, including ''fastboot'', and a USB cable.


It's recommended that you upgrade Android to the latest available version and install all system updates before installing Maemo-leste, because Maemo-leste uses FW files from Android partitions for enabling various peripherals, as mentioned in Mobian [https://wiki.debian.org/InstallingDebianOn/Google/Pixel3a wiki]
=== Bootloader setup ===


The bootloader must be unlocked before installing Maemo Leste.


Install fastboot and last android-sdk-platform-tools on your computer.
From Android, open Settings → About phone and tap the build number seven times to enable developer options.


Then open Settings → System → Developer options and enable OEM unlocking.


=== Flash mode ===
=== Flash mode ===


WIP
Turn off the phone. Hold the Volume Down and Power buttons until the fastboot screen appears.
 
Connect the phone to your computer using USB.
 
You can check whether fastboot recognizes the phone:
 
<pre>
fastboot devices
</pre>
 
If the bootloader is not already unlocked, unlock it using:
 
<pre>
fastboot flashing unlock
</pre>
 
Follow the instructions on the phone to confirm the operation.
 
'''Note:''' Unlocking the bootloader erases user data.


To enter flash mode (fastboot):
=== Installation with fastboot ===


Hold "Volume Down" and "Power" buttons until fastboot appears.
First, download the Maemo Leste images [https://maedevu.maemo.org/images/pixel3a/20260906-excalibur/ here] and extract the .tar.xz archive.


Then connect your PC and your phone through USB.
The archive contains boot images for both Pixel 3a and Pixel 3a XL, and a common root filesystem image.


=== Bootloader setup ===
The Pixel 3a and Pixel 3a XL use different boot images:


WIP
* Pixel 3a (sargo): boot-sargo.img
* Pixel 3a XL (bonito): boot-bonito-sdc.img or boot-bonito-tianma.img, depending on the display panel.


Device bootloader needs to be unlocked: from Android, go to "About phone" page in Settings app. Then, click 7 times on the build number to enable developer settings.
Make sure you use the correct boot image for your device.
From Setting main page, go to "System", "Developer options" and enable OEM unlocking.


Before flashing Maemo Leste, you need to unlock the bootloader in fastboot mode with this command:
You can check your device model with:


<pre>
<pre>
fastboot flashing unlock
fastboot getvar product
</pre>
</pre>


=== Installation with fastboot ===
The output should contain ''sargo'' for Pixel 3a or ''bonito'' for Pixel 3a XL.
 
==== A/B slots ====


WIP
The Pixel 3a uses an A/B partition scheme. This means that some partitions, including the boot partition, have two copies: boot_a and boot_b.


Fastboot (useful) commands:
To see which slot is currently active, run:


<pre>
<pre>
fastboot getvar current-slot
fastboot getvar current-slot
</pre>
</pre>
For example, if the output says:


<pre>
<pre>
fastboot set_active a
current-slot: a
</pre>
</pre>
then the command:


<pre>
<pre>
fastboot set_active b
fastboot flash boot boot.img
</pre>
</pre>


will automatically flash boot_a.


Download necessary img's files [https://maedevu.maemo.org/images/pixel3a/20260906-excalibur/ here]
There is normally no need to change the active slot or specify boot_a or boot_b manually.


From fastboot menu:
==== Flashing Maemo Leste ====
 
Before flashing the boot image, erase the DTBO partition:


<pre>
<pre>
fastboot flash boot <boot.img>
fastboot erase dtbo
</pre>


fastboot flash userdata <excalibur-sdm670.img>
DTBO contains device tree overlays used by Android. Erasing it may be necessary to avoid conflicts with the device tree supplied by the Maemo Leste boot image.


This operation erases the DTBO partition for the active slot, but does not change the partition table. If you later restore Android, you may need to restore the original DTBO image.
The following commands are an example for the '''Pixel 3a (sargo)''' using the 2026-09-06 Excalibur images.
Flash the boot image:
<pre>
fastboot flash boot maemo-leste-excalibur-sdm670-20260906.boot-sargo.img
</pre>
Flash the root filesystem:
<pre>
fastboot flash userdata maemo-leste-excalibur-sdm670-20260906.rootfs.img
</pre>
This replaces the contents of the userdata partition. The command may take some time, as the image is transferred in several chunks.
Check that each command finishes successfully before continuing.
For the '''Pixel 3a XL (bonito)''', replace the sargo boot image with the appropriate bonito image for your display panel. The root filesystem image is the same.
==== Enabling console output ====
The Pixel 3a bootloader appends console=null to the kernel command line by default, which hides kernel messages on the screen.
To enable console output, run:
<pre>
fastboot oem uart enable
fastboot oem uart enable
</pre>


Finally, reboot the phone:
<pre>
fastboot reboot
fastboot reboot
</pre>
</pre>


'''Warning:''' TODO it is confusing how to use fastboot flash boot/boot_a/boot_b command. Needs clarifications.
=== First boot ===


The first boot may take longer than usual.


'''Note:''' The bootloader on the Pixel 3a appends console=null to the kernel cmdline by default, which hides the boot logs on the screen. A custom manufacturer fastboot command can configure console=tty0: 'fastboot oem uart enable'
Maemo Leste uses firmware from the existing Android partitions. During initial startup, droid-juicer may extract the necessary firmware and reboot the device.


== Tweaks ==
Do not interrupt the phone while this process is running.
 
If the device does not boot successfully, check that you used the correct boot image, erased DTBO as described above, and did not change the partition table.
 
The same installation procedure was successfully tested on a Pixel 3a (sargo) with the 2026-09-06 Excalibur image.== Tweaks ==


WIP
WIP
Line 171: Line 243:


Rotation is currently chaotic, it is recommanded to lock the device in portrait mode using Orientation Lock Applet and allow automatic landscape rotation for specific apps in transitions.ini file if needed (until a proper rotation fix).
Rotation is currently chaotic, it is recommanded to lock the device in portrait mode using Orientation Lock Applet and allow automatic landscape rotation for specific apps in transitions.ini file if needed (until a proper rotation fix).
=== Video recording (testing) ===
Both back and front cameras work (more or less) and it is already possible to record some videos using gst-launch and libcamera:
<pre>
sudo apt install libcamera-tools
sudo apt install gstreamer1.0-libcamera
sudo apt install gstreamer1.0-plugins-ugly
</pre>
First test to show video stream: (sudo needed ATM)
<pre>
sudo gst-launch-1.0 -e libcamerasrc camera-name="/base/soc@0/cci@ac4a000/i2c-bus@1/camera@1a" ! queue ! videoconvert ! autovideosink
</pre>
Then, to record a video: (sudo needed ATM)
'''(i2c-bus@0 for back and i2c-bus@1 for front camera)'''
<pre>
sudo gst-launch-1.0 -e libcamerasrc camera-name="/base/soc@0/cci@ac4a000/i2c-bus@1/camera@1a" ! video/x-raw,framerate=17/2 ! queue ! videoconvert ! x264enc tune=zerolatency bitrate=4000 speed-preset=ultrafast ! h264parse ! mp4mux ! filesink location=videotest.mp4
</pre>
That is only an example and a WIP. Lot of parameters need to be added or modified.
'''Note: libcamera-tools provides qcam which can be used to take some pictures. Colors are a bit wrong and rotation seems not calibrated properly.
=== GPS with ModemManager and Geoclue (testing, not implemented, WIP) ===
<pre>
sudo apt install geoclue-2-demo
</pre>
To enable GPS:
<pre>
qmicli -d qrtr://0 --loc-set-engine-lock=mt
qmicli -d qrtr://0 --loc-set-nmea-types=all
mmcli -m any --location-enable-gps-nmea
</pre>
To disable GPS:
<pre>
mmcli -m any --location-disable-gps-nmea
qmicli -d qrtr://0 --loc-stop
</pre>
To start location:
<pre>
qmicli -d qrtr://0 --loc-start
</pre>
Then, in 2 different terminals:
<pre>
/usr/libexec/geoclue-2.0/demos/agent
</pre>
and
<pre>
/usr/libexec/geoclue-2.0/demos/where-am-i
</pre>
After a while, '''where-am-i''' should show network coordinates and GPS coordinates a bit later.
Once network or GPS coordinates appear in '''where-am-i''', Firefox is able to report coordinates in location websites like Google Maps.
'''Note: Comaps experimental maemo version is also able to report coordinates.'''
=== Bluetooth (testing with Pipewire) ===
Packages needed: blueman, pipewire, pipewire-pulse, wireplumber, bluez, pipewire-audio, libspa-0.2-bluetooth
Launch blueman and search/pair/connect your device.
Sending files between Pixel 3a and android phones works.
'''If you pair and connect a headset, note that bluetooth device is not set as default sink:'''
To check bluetooth device sink number:
<pre>
wpctl status
</pre>
Look in Audio ---> Sinks
Then:
<pre>
wpctl set-default <bluetooth device sink number>
</pre>


== Remaining issues ==
== Remaining issues ==
Broken notification sounds (notify-sv).


Mobile data not working with ofono (qrtr implementation).
Mobile data not working with ofono (qrtr implementation).
Line 182: Line 354:
Phone calls work nicely with ofono/sphone, however incoming calls work only if you make an outgoing call first (after boot).
Phone calls work nicely with ofono/sphone, however incoming calls work only if you make an outgoing call first (after boot).


Current draw is a bit high out of the box. fixed in newer kernel. (6.12 patched kernel is available however)
Current draw is a bit high out of the box. Fixed in newer kernel. (6.12 patched kernel is available however)




[[Category:Device]]
[[Category:Device]]

Latest revision as of 11:43, 7 November 2026

Google Pixel 3a
Manufacturer Google
Codename Pixel 3a/3a XL, Google sargo/bonito
Release Date 2019
Category Supported
Specifications
SoC 2 x 2 GHz, 6 x 1.7GHz
DRAM 4GB
Hardware Features
Display 1080x2220 OLED
Video adreno 615
Audio yes
Network yes
Storage 64GB
USB Micro USB C
Camera IMX355, IMX363
Sensors BMI160, AK0991X, TMD2725, BMP380, MAX11261
Battery Capacity 3000 / 3700mAh
Software Features
Kernel 6.12
Charging Yes
Touchscreen Yes, capacitive
Screen Yes
3D acceleration Yes
Vibration motor Yes
Audio Yes
Phone calls Yes
SMS Yes
Wifi Yes
IrDA No
2G/3G data Yes, ModemManager only
4G data Yes, ModemManager only
Bluetooth Yes
FM transmitter No
FM receiver No
Accelerometer Yes
Proximity Sensor Yes
GPS Yes, ModemManager only
A-GPS Yes, ModemManager only
Front Camera Yes
Back Camera(s) Yes
Idle Power Consumption 280mW
Stand by time 40 / 50h

Installation

WARNING: Installing Maemo Leste will erase your Android installation and all user data. Make a backup before proceeding.

Before installing Maemo Leste, it is recommended to upgrade Android to the latest available version and install all system updates. Maemo Leste uses firmware from existing Android partitions to support various hardware components, as also described in the Mobian wiki.

Do not modify the device's partition table. The installation only requires flashing existing partitions.

You will need a computer with recent Android SDK Platform Tools installed, including fastboot, and a USB cable.

Bootloader setup

The bootloader must be unlocked before installing Maemo Leste.

From Android, open Settings → About phone and tap the build number seven times to enable developer options.

Then open Settings → System → Developer options and enable OEM unlocking.

Flash mode

Turn off the phone. Hold the Volume Down and Power buttons until the fastboot screen appears.

Connect the phone to your computer using USB.

You can check whether fastboot recognizes the phone:

fastboot devices

If the bootloader is not already unlocked, unlock it using:

fastboot flashing unlock

Follow the instructions on the phone to confirm the operation.

Note: Unlocking the bootloader erases user data.

Installation with fastboot

First, download the Maemo Leste images here and extract the .tar.xz archive.

The archive contains boot images for both Pixel 3a and Pixel 3a XL, and a common root filesystem image.

The Pixel 3a and Pixel 3a XL use different boot images:

  • Pixel 3a (sargo): boot-sargo.img
  • Pixel 3a XL (bonito): boot-bonito-sdc.img or boot-bonito-tianma.img, depending on the display panel.

Make sure you use the correct boot image for your device.

You can check your device model with:

fastboot getvar product

The output should contain sargo for Pixel 3a or bonito for Pixel 3a XL.

A/B slots

The Pixel 3a uses an A/B partition scheme. This means that some partitions, including the boot partition, have two copies: boot_a and boot_b.

To see which slot is currently active, run:

fastboot getvar current-slot

For example, if the output says:

current-slot: a

then the command:

fastboot flash boot boot.img

will automatically flash boot_a.

There is normally no need to change the active slot or specify boot_a or boot_b manually.

Flashing Maemo Leste

Before flashing the boot image, erase the DTBO partition:

fastboot erase dtbo

DTBO contains device tree overlays used by Android. Erasing it may be necessary to avoid conflicts with the device tree supplied by the Maemo Leste boot image.

This operation erases the DTBO partition for the active slot, but does not change the partition table. If you later restore Android, you may need to restore the original DTBO image.

The following commands are an example for the Pixel 3a (sargo) using the 2026-09-06 Excalibur images.

Flash the boot image:

fastboot flash boot maemo-leste-excalibur-sdm670-20260906.boot-sargo.img

Flash the root filesystem:

fastboot flash userdata maemo-leste-excalibur-sdm670-20260906.rootfs.img

This replaces the contents of the userdata partition. The command may take some time, as the image is transferred in several chunks.

Check that each command finishes successfully before continuing.

For the Pixel 3a XL (bonito), replace the sargo boot image with the appropriate bonito image for your display panel. The root filesystem image is the same.

Enabling console output

The Pixel 3a bootloader appends console=null to the kernel command line by default, which hides kernel messages on the screen.

To enable console output, run:

fastboot oem uart enable

Finally, reboot the phone:

fastboot reboot

First boot

The first boot may take longer than usual.

Maemo Leste uses firmware from the existing Android partitions. During initial startup, droid-juicer may extract the necessary firmware and reboot the device.

Do not interrupt the phone while this process is running.

If the device does not boot successfully, check that you used the correct boot image, erased DTBO as described above, and did not change the partition table.

The same installation procedure was successfully tested on a Pixel 3a (sargo) with the 2026-09-06 Excalibur image.== Tweaks ==

WIP

First boot

Recommanded useful apps

coolkbd, brightness applet, orientation lock applet

Firefox(-esr) tips

To activate touchscreen scrolling:

Edit

/usr/share/applications/hildon/firefox-esr.desktop

modify "Exec" line

Exec=bash -c 'MOZ_USE_XINPUT2=1 /usr/bin/firefox-esr'

To modify scaling and fit to Pixel 3a screen in portrait mode, go to "about:config" and edit

layout.css.devPixelsPerPx 0.8

Mobile data (workaround)

Ofono doesn't handle qrtr properly unfortunately, however it is possible to run ModemManager just for mobile data, as a workaround.

(Note: network-manager package is needed)

See PMOS page Mobile data

and ModemManager init script

That works fine even with ofono running at the same time.

Portrait VS Landscape

Almost all apps can run in portrait mode with hildon-desktop, however few apps like osso-addressbook or chromium need to be added by-hand in transitions.ini whitelist:

/usr/share/hildon-desktop/transitions.ini

Some apps can be also locked in landscape mode if needed (blacklist). It is particulary useful for video apps like smplayer.

Rotation is currently chaotic, it is recommanded to lock the device in portrait mode using Orientation Lock Applet and allow automatic landscape rotation for specific apps in transitions.ini file if needed (until a proper rotation fix).

Video recording (testing)

Both back and front cameras work (more or less) and it is already possible to record some videos using gst-launch and libcamera:

sudo apt install libcamera-tools
sudo apt install gstreamer1.0-libcamera
sudo apt install gstreamer1.0-plugins-ugly

First test to show video stream: (sudo needed ATM)

sudo gst-launch-1.0 -e libcamerasrc camera-name="/base/soc@0/cci@ac4a000/i2c-bus@1/camera@1a" ! queue ! videoconvert ! autovideosink

Then, to record a video: (sudo needed ATM)

(i2c-bus@0 for back and i2c-bus@1 for front camera)

sudo gst-launch-1.0 -e libcamerasrc camera-name="/base/soc@0/cci@ac4a000/i2c-bus@1/camera@1a" ! video/x-raw,framerate=17/2 ! queue ! videoconvert ! x264enc tune=zerolatency bitrate=4000 speed-preset=ultrafast ! h264parse ! mp4mux ! filesink location=videotest.mp4

That is only an example and a WIP. Lot of parameters need to be added or modified.

Note: libcamera-tools provides qcam which can be used to take some pictures. Colors are a bit wrong and rotation seems not calibrated properly.

GPS with ModemManager and Geoclue (testing, not implemented, WIP)

sudo apt install geoclue-2-demo


To enable GPS:

qmicli -d qrtr://0 --loc-set-engine-lock=mt
qmicli -d qrtr://0 --loc-set-nmea-types=all
mmcli -m any --location-enable-gps-nmea

To disable GPS:

mmcli -m any --location-disable-gps-nmea
qmicli -d qrtr://0 --loc-stop

To start location:

qmicli -d qrtr://0 --loc-start

Then, in 2 different terminals:

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

and

/usr/libexec/geoclue-2.0/demos/where-am-i

After a while, where-am-i should show network coordinates and GPS coordinates a bit later.

Once network or GPS coordinates appear in where-am-i, Firefox is able to report coordinates in location websites like Google Maps.

Note: Comaps experimental maemo version is also able to report coordinates.

Bluetooth (testing with Pipewire)

Packages needed: blueman, pipewire, pipewire-pulse, wireplumber, bluez, pipewire-audio, libspa-0.2-bluetooth

Launch blueman and search/pair/connect your device.

Sending files between Pixel 3a and android phones works.

If you pair and connect a headset, note that bluetooth device is not set as default sink:

To check bluetooth device sink number:

wpctl status

Look in Audio ---> Sinks

Then:

wpctl set-default <bluetooth device sink number>

Remaining issues

Broken notification sounds (notify-sv).

Mobile data not working with ofono (qrtr implementation).

Rotation accuracy.

GPS with geoclue implementation for Maemo location apps.

Phone calls work nicely with ofono/sphone, however incoming calls work only if you make an outgoing call first (after boot).

Current draw is a bit high out of the box. Fixed in newer kernel. (6.12 patched kernel is available however)