Google Pixel 4a (google-sunfish)
Appearance
This device has been tested with postmarketOS, but its device package has not yet been added to the postmarketOS repositories. This means that it cannot be selected in pmbootstrap. |
![]() Pixel 4a | |
Manufacturer | |
---|---|
Name | Pixel 4a |
Codename | google-sunfish |
Released | 2020 |
Type | handset |
Hardware | |
Chipset | Qualcomm Snapdragon 730G (SM7150-AB) |
CPU | Kryo 470 |
GPU | Adreno 618 |
Display | 5.81 inch 2340x1080 AMOLED |
Storage | 128 GB |
Memory | 6 GB |
Architecture | aarch64 |
Software | |
Original software The software and version the device was shipped with. |
Android 10 |
Extended version The most recent supported version from the manufacturer. |
Android |
FOSS bootloader | partial |
Mainline Instead of a Linux kernel fork, it is possible to run (Close to) Mainline. |
no |
Flashing It is possible to flash the device with pmbootstrap flasher . |
Works
|
---|---|
USB Networking After connecting the device with USB to your PC, you can connect to it via telnet (initramfs) or SSH (booted system). |
Works
|
Internal storage eMMC, SD cards, UFS, ... |
Works
|
Battery Charging and battery level reporting works |
Partial
|
Screen Display works. Ideally with sleep mode and brightness control. |
Works
|
Touchscreen |
Broken
|
Multimedia | |
3D Acceleration |
Works
|
Audio Audio playback, microphone, headset and buttons. |
Untested
|
Camera |
Untested
|
Connectivity | |
WiFi |
Works
|
Bluetooth |
Works
|
GPS |
Untested
|
NFC Near Field Communication |
Untested
|
Modem | |
Calls |
Works
|
SMS |
Works
|
Mobile data |
Works
|
Miscellaneous | |
FDE Full disk encryption and unlocking with unl0kr. |
Partial
|
USB OTG USB On-The-Go or USB-C Role switching |
Works
|
Sensors | |
Accelerometer Auto screen rotation works in desktops e.g. Phosh or Plasma Mobile |
Untested
|
Magnetometer Sensor to measure magnetism |
Untested
|
Ambient Light |
Untested
|
Proximity |
Untested
|
Hall Effect Also known as flip cover sensor |
Untested
|
Barometer Sensor to measure air pressure |
Untested
|
Power Sensor Sensor to monitor current, voltage and power. Not fuel gauge! |
Untested
|
Secondary Bootloader It is possible to chainload U-Boot from stock bootloader. |
Works
|
---|---|
Mainline Latest versions of U-Boot are not broken and it is possible to use them. |
Works
|
Internal Storage It is possible to boot from internal storage (e.g. eMMC or UFS). |
Works
|
USB Host It is possible to boot from a USB storage or connect a keyboard. |
Partial
|
USB Peripheral It is possible to use device as a peripheral in U-Boot, e.g. for fastboot mode. |
Works
|
Display |
Works
|
Buttons It is possible to navigate in boot menu or grub with volume and power buttons. |
Works
|
This device is based on the Snapdragon 730G. See the SoC page for common tips, guides and troubleshooting steps |
Contributors
- JIaxyga
- Smaybius (AceOfSpadesProduc100)
Users owning this device
- AceOfSpadesProduc100 (Notes: LineageOS 20)
- Adrian (Notes: Mainline fun)
- Bastindo (Notes: Daily driver, on stock Android 13)
- BenWolsieffer
- Choc (Notes: daily driver, running grapheneOS)
- CosmicPro543 (Notes: PostMarketOS with Broken Screen)
- Debiansh (Notes: Notes: Possible future test subject, daily driver, bootloader unlocked, running GrapheneOS)
- Eriki73 (Notes: Daily-driving with Android 13)
- Ettucompute (Notes: Backup with stock Android installed)
- Fell (Notes: Stock Android 13)
- Floppydisk (Notes: Daily driver)
- Fludix (Notes: Available for testing!)
- Gbhdrew (Notes: Can test in the future)
- Iramosu (Notes: LineageOS)
- JIaxyga (Notes: 6/128 Broken touchscreen)
- Minosimo (Notes: x2 One for experimentation)
- Nobodywasishere
- Segfault (Notes: Daily driver)
- Thewiseguyshivam (Notes: Currently running stock Android)
How to enter flash mode
With developer mode, OEM unlocking, and USB debugging enabled, connect the phone to your PC and enter `adb reboot bootloader` in your command line and it'll enter fastboot mode.
Mainline
A work in progress mainline kernel is being developed here.
Mainline status
Feature table for SM7150
Device feature table:
Component | Model | Status | Notes |
---|---|---|---|
Display | Samsung sofef00 or sofef01 | ? | |
Touchscreen | fts | N | Connected via i2c7 @49 (0xa84000) |
Charging | USE PMIC | ? | slg51000-regulator, connected via i2c9 @75 (0xa8c000) |
Accelerometer and gyroscope | STMicro LSM6DSR | ? | |
Ambient light and proximity sensor | AMS TCS3701 | ? | |
Magnetometer | STMicro LIS2MDL | ? | |
Haptics/Vibrator | Texas Instruments drv2624 | ? | i2c9 @5a (0xa8c000) |
Barometer | Bosch BMP380 | ? | |
Sound | Cirrus cs35l41 | ? | i2c9 @40 (0xa8c000) |
cs35l41 | ? | i2c9 @41 (0xa8c000) | |
rt5514 | ? | i2c2 @57 (@0x888000) | |
rt5514 | ? | spi0.0 (0x880000) | |
Camera | Sony IMX355_s5 | ? | Front camera |
Sony IMX363_s5 | ? | Rear camera | |
Qualcomm SOC connections | ? | qcom,a5@ac00000 | |
NFC | st21nfc | ? | Connected via i2c2 @08 (0x888000) |
Fingerprint | fp_fpc1020 | ? | |
Other | at24 | ? | i2c 2-0050 |
drv2624 | ? | i2c9 @5a (@0xa8c000) | |
dummy | ? | i2c 2-0051 | |
dummy | ? | i2c 2-0052 | |
dummy | ? | i2c 2-0053 |
Installation
- Make sure pmbootstrap is installed and your bootloader is unlocked
- Navigate to the installation folder containing pmbootstrap and edit ./pmb/core/config.py. Set boot_size from 256 to 64. This is to later allow flashing the flash_kernel image to a 64MB sized partition.
- The device uses a AB Partition layout. With the device plugged in on fastboot, keep note of what slot is currently active via
fastboot getvar current-slot
- This device is now a part of SM7150 generic port, and requires an installed U-Boot for EFI environment (systemd-boot is used).
So, install U-Boot as described on the generic port page. Keep track of which slot U-Boot is installed on. - Run through
pmbootstrap init
and select qcom as the vendor and sm7150 as the device. - Generate the rootfs by running
pmbootstrap install
- Backup and erase both dtbo partition.
- To boot Linux, you'll have to erase the dtbo partition. It is recommended to back it up first if you want to boot Android again
- Run
dd if=/dev/block/by-name/dtbo_a of=/sdcard/dtbo_a.img
anddd if=/dev/block/by-name/dtbo_b of=/sdcard/dtbo_b.img
from a rooted shell on your phone and pull it withadb pull /sdcard/dtbo_a.img
andadb pull /sdcard/dtbo_b.img
to your computer. - Boot into bootloader mode
- Erase the dtbo partition with
fastboot erase dtbo_a
andfastboot erase dtbo_b
- To restore the partition flash it with
fastboot flash dtbo_a dtbo_a.img
andfastboot flash dtbo_b dtbo_b.img
- Flash the rootfs by running
pmbootstrap flasher flash_rootfs
- To install the kernel, we need to install it on the alternate boot partition
- If U-Boot was installed on boot_a, flash the kernal to boot_b by running
pmbootstrap flasher flash_kernel --partition boot_b
. Ensure U-Boot is active by runningfastboot set_active a
and reboot withpmbootstrap chroot fastboot reboot
- If U-Boot was installed on boot_b, flash the kernal to boot_a by running
pmbootstrap flasher flash_kernel --partition boot_a
. Ensure U-Boot is active by runningfastboot set_active b
and reboot withpmbootstrap chroot fastboot reboot
- If U-Boot was installed on boot_a, flash the kernal to boot_b by running