(SHIFTphone 8) crDroid 12.7 Unofficial (Android 16QPR2)

Ene

Active member
Original poster
21 Oktober 2020
168
Germany / Bavaria

crDroid 12.7 (Unofficial)​


crdroid.png

General

I compiled crDroid for the SHIFTphone 8!

Prerequisites

  • unlocked bootloader

Download

OTA ZIP: https://drive.google.com/file/d/1PU36U-aucM6N6hfgCb4R1q09TZa4YZKA/view?usp=sharing
Fastboot Variant: https://drive.google.com/file/d/1dQERtm_QScwk7_2EoUhs5ANk9sSKYk_z/view?usp=sharing

Install

For the first installation, download the Fastboot Variant, extract it and run the commands in the _flash.bat file while the device is attached in bootloader mode.

Update

Just flash the OTA ZIP and wipe cache (reboot into recovery again after each flash)

Source


Building

To compile it yourself you just have to follow these simple steps (and need a beefy PC)

  1. install Ubuntu (you can use Windows On Linux 2)
  2. execute the following commands
    1. install programs
      Code:
      sudo apt install repo bc bison build-essential ccache curl flex g++-multilib gcc-multilib git git-lfs gnupg gperf imagemagick lib32ncurses-dev lib32readline-dev lib32z1-dev liblz4-tool libncurses6 libncurses-dev libsdl1.2-dev libssl-dev libwxgtk3.2-dev libxml2 libxml2-utils lzop pngcrush rsync schedtool squashfs-tools xsltproc zip zlib1g-dev -y
    2. configure git
      Code:
      git config --global user.email "you@example.com"
      git config --global user.name "Your Name"
      
      git lfs install
      git config --global trailer.changeid.key "Change-Id"
    3. configure ccache
      Code:
      rm ~/.cache/ccache
      mkdir -p ~/.cache/ccache/tmp
      echo export USE_CCACHE=1 >> ~/.bashrc
      echo export CCACHE_EXEC=/usr/bin/ccache >> ~/.bashrc
      echo export CPU_SSE42=false >> ~/.bashrc
      
      ccache -M 50G
    4. configure working directory (note that mine residents in the folder /home/android/shift8, change accordingly)
      Code:
      mkdir -p /home/android/shift8/crdroid
      cd /home/android/shift8/crdroid
      
      repo init -u https://github.com/crdroidandroid/android.git -b 16.0 --git-lfs --no-clone-bundle
      
      mkdir -p /home/android/shift8/crdroid/.repo/local_manifests
      cat <<EOF >>/home/android/shift8/crdroid/.repo/local_manifests/otter.xml
      <?xml version="1.0" encoding="UTF-8"?>
      <manifest>
        <project path="device/shift/otter" remote="github" name="LineageOS/android_device_shift_otter" revision="lineage-23.2" />
        <project path="kernel/shift/qcm6490" remote="github" name="LineageOS/android_kernel_shift_qcm6490" revision="lineage-23.2" />
        <project path="vendor/shift/otter" remote="github" name="TheMuppets/proprietary_vendor_shift_otter" revision="lineage-23.2" />
      </manifest>
      EOF
      
      repo sync  --current-branch -j8 --force-sync --force-checkout --force-remove-dirty --prune --auto-gc
    5. optional - increase SWAP size (to 80GB) to prevent out of memory crashes
      Code:
      sudo -s
      swapoff -a
      rm /swapfile
      fallocate -l 80G /swapfile
      chmod 600 /swapfile
      mkswap /swapfile
      swapon /swapfile
  3. build! (and fix the incorrect ARCH_VARIANT before it)
    Code:
    git -C ./device/shift/otter reset --hard HEAD
    git -C ./device/shift/otter clean -d --force
    sed -i 's/TARGET_2ND_ARCH_VARIANT := armv8-a/TARGET_2ND_ARCH_VARIANT := armv8-2a/' "./device/shift/otter/BoardConfig.mk"
    source build/envsetup.sh
    brunch otter
This will take about an hour and about 350GB of Disk space [tested with 28 cores and 120GB Memory (40GB RAM + 80GB SWAP]. The build process sometimes crashes because it runs of memory (exit code 137), increase the SWAP size and run the brunch command again. The flashable ZIP can be found in /out/target/product/otter
 
Erstmal : RESPEKT @Ene 👍

Prerequisites

  • unlocked bootloader
Versteh ich das richtig - der Bootloader muss "dauerhaft" entsperrt bleiben ,also auch nach vollendeter Installation?!

Demnach würde dann (also wahrscheinlich) auch der Fingerabdrucksensor nicht funktionieren - oder?
 
  • Like
Reaktionen: Ene
Erstmal : RESPEKT @Ene 👍


Versteh ich das richtig - der Bootloader muss "dauerhaft" entsperrt bleiben ,also auch nach vollendeter Installation?!

Demnach würde dann (also wahrscheinlich) auch der Fingerabdrucksensor nicht funktionieren - oder?
Ohne custom AVB keys zum importieren würde das Gerät mit einem geschlossen bootloader nicht mehr starten. Da ich nicht plane meinen bootloader zu schließen, habe ich mich damit nicht näher auseinander gesetzt.

Trotz offenem bootloader funktioniert der Fingerabdruck scanner ohne Probleme, eine Anleitung dazu folgt in Kürze.
 
  • Like
  • Wow
Reaktionen: DCSMW und R.E.D.