SHIFT SHIFT6mq (shift-axolotl)

Contributors

 * Amartinz
 * kalube
 * DylanVanAssche

Boot modes
By holding various button combinations while booting the device can be made to boot into different modes.

Unplug from USB, power off the device and press and hold the below buttons to enter the specific boot mode.

Bootloader
The bootloader (ABL) is supported by Fwupd and can be upgraded.

Unlock bootloader
To unlock the bootloader, you need to allow unlocking it via enabling  within Android.


 * 1) Go to Settings within Android and select
 * 2) Tap on   seven times to enable developer options
 * 3) Go back and select ,   and scroll down to
 * 4) Enable   and
 * 5) Reboot into bootloader by long pressing the power button, selecting   and

After it has successfully rebooted into, initiate unlocking the bootloader using  :

Please follow the prompts on the screen to finish unlocking the bootloader.

Custom AVB key
The bootloader has support for setting an user provided AVB key to allow relocking the bootloader if an OS with proper support is flashed.

This is realized with exposing a virtual partition  where the custom user key can be flashed to:

For more information please refer to the commit.

Developer mode
Supported since version  and enabling it has the following effects:


 * Ignore slot retry counter
 * Disables marking slots as unbootable
 * Switch active slots within the bootloader GUI

To enable developer mode:

To disable developer mode:

To check the current status of developer mode:

Mainline optimization
Bootloaders since version  support additional   commands to enable certain Quality of Life improvements when running mainline.

To enable mainline optimization:

To disable mainline optimization:

To check the current status of mainline support:

Fastbootd
Fastbootd is a userspace implementation of Fastboot. For axolotl it is located within the recovery.

To access it, you can boot the recovery and select a menu option to enter fastbootd mode. Optionally you can also enter it via ADB and Fastboot:

You can only access dynamic partitions within fastbootd.

Installation
Follow the pmbootstrap instructions to build your own image, using  as the vendor and   as the codename but stop before following flashing instructions, as these are different for axolotl.

There are currently different ways to install postmarketOS (only select one).

UBports Installer
You can use UBports Installer to flash a prebuilt image of postmarketOS onto your Shift6mq. Just select postmarketOS in the OS selection and choose the desired UI and lean back!

Manual installation on userdata partition
Installation on userdata is the most generic and universally supported way, however it does not allow for dual boot or utilizing the full flash storage of the device.

Reboot into  and install postmarketOS:

Manual installation on super partition
First select a slot ( or  ) you want to install postmarketOS on.

To install on  partition, a valid recovery with proper   implementation needs to be installed into the slot, which you want to install postmarketOS on. You can download the stock recovery image, provided by the manufacturer and install it within :

Enter  and ensure it is working as expected:

After you verified  works in the slot you have selected, you can install postmarketOS:

The phone will now always boot into postmarketOS until you switch slots with fastboot again:

Partition map
1|axolotl:/ # blkid /dev/block/zram0: UUID="663a3d49-89cc-4d71-8c4c-9ad121939171" TYPE="swap" /dev/block/sda2: UUID="e31914f5-d01b-4e08-97bd-d8e0f406764d" TYPE="ext4" /dev/block/sda8: UUID="91f68f2a-3821-47bf-8d9d-7d705b2d5ab0" TYPE="ext4" /dev/block/sda9: UUID="d5b3f5fa-dbd4-4cc5-9b9d-8550ad9c74a7" TYPE="f2fs" /dev/block/sde4: SEC_TYPE="msdos" UUID="00BC-614E" TYPE="vfat" /dev/block/sde5: SEC_TYPE="msdos" UUID="00BC-614E" TYPE="vfat" /dev/block/sde9: LABEL="dsp" UUID="af32c008-2a39-7e5b-a5dc-201456d93103" TYPE="ext4" /dev/block/sde26: SEC_TYPE="msdos" UUID="00BC-614E" TYPE="vfat" /dev/block/sde27: SEC_TYPE="msdos" UUID="00BC-614E" TYPE="vfat" /dev/block/sde31: LABEL="dsp" UUID="af32c008-2a39-7e5b-a5dc-201456d93103" TYPE="ext4" /dev/block/sde54: SEC_TYPE="msdos" LABEL="LOGFS" UUID="D273-55EA" TYPE="vfat"

axolotl:/ # df -h Filesystem     Size Used Avail Use% Mounted on  tmpfs           3.7G 1.5M  3.7G   1% /dev tmpfs          3.7G    0  3.7G   0% /mnt /dev/block/sda8 11M 160K   11M   2% /metadata /dev/block/dm-1 1.2G 849M 476M  65% / /dev/block/dm-2 971M 489M 482M  51% /system_ext /dev/block/dm-0 1.8G 378M 1.4G  21% /product /dev/block/dm-3 732M 482M 250M  66% /vendor tmpfs          3.7G 8.0K  3.7G   1% /apex tmpfs          3.7G 524K  3.7G   1% /linkerconfig /dev/block/sda2 27M 0.9M   26M   4% /mnt/vendor/persist /dev/block/sde5 64M 704K   63M   2% /vendor/bt_firmware /dev/block/sde4 120M 115M 5.0M  96% /vendor/firmware_mnt /dev/block/sde9 27M  24M  3.1M  89% /vendor/dsp /dev/block/dm-8 101G 1.7G 100G   2% /data tmpfs          3.7G    0  3.7G   0% /data_mirror /data/media    101G 1.7G  100G   2% /mnt/runtime/default/emulated /dev/fuse      101G 1.7G  100G   2% /mnt/user/0/emulated

Requirements

 * SHIFT6mq
 * Screwdriver that came with your SHIFT6mq
 * Alternatively any T4 Torx screwdriver should be suitable
 * Wires to connect test points
 * UART-TTL USB Adapter (I have used this one)

Optionally
Depending on whether you want to permanently have wires attached to your 6mq (which makes it less suitable as an actually usable phone) or just a temporary connection, you need:


 * Soldering iron
 * And a steady hand!
 * Something to temporary hold the wires in place during your UART usage

Removing the case
First of all, properly shutdown your 6mq in case it is powered on! Next remove the backcover, remove the battery and unscrew all 14 screws securing the housing of the 6mq.

Gently insert your fingernail (or any tool for this purpose) between display and the device frame to loosen their connection and remove the display.

You can also follow this iFixit guide until Step 5.



Removing the top PCB
Remove the connector (responsible for the POWER and VOLUME buttons) on the right side at the top PCB to expose another screw. Then remove all 3 screws as shown in the picture.



Afterwards gently remove the top PCB.



After you have removed the top PCB, the test points we need are still covered by the SIM card tray.

Explanation of test points
After removing the SIM card tray, the test points we need for UART are exposed.



These are the test points together with the color of the wire used in this guide:
 * TH - Thermal test point -> blue
 * 1.8 (left) -> green
 * 1.8 (right) -> yellow
 * You can connect these two points while booting up to force boot into EDL mode
 * Especially useful if you ever brick the bootloader, as it allows you to unbrick your device using QFIL
 * T - Transmit -> orange
 * R - Receive -> red
 * G - Ground -> brown

T, R and G are required for UART.

Extras for permanent connections
If you want to keep using the device's housing when having UART wires soldered, you may need to extend the SIM card tray opening to guide the wires through. This is possible with soldering away the housing itself.



When putting the device together, be sure to carefully connect the fingerprint reader connector, as this is a bit tricky to connect.



Usage of UART
If you want to use UART for reading logs, connect as follows:
 * T (orange) of the PCB to RXD of the USB adapter card
 * G (brown) of the PCB to GND of the USB adapter card

Afterwards launch minicom (or any other program you prefer):

sudo minicom -D /dev/ttyUSB0

Camera
The state of the implementation of the camera is tracked on https://gitlab.com/sdm845-mainline/linux/-/issues/21

Troubleshooting
If your 4G connection only shortly appears and then falls back to 2G/3G, your EPS initial bearer might be wrong. You can check if the EPS bearer is wrong if there's no  in the output of   under the 3GPP category.

For Telenet (Belgium), you need to clear username, password and APN of the initial bearer. There's no UI for it, but you can with :

mmcli -m any --3gpp-set-initial-eps-bearer-settings="ip-type=ipv4,user=,password=,apn=''"

After that, disable and enable your modem in GNOME Settings.