This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
hardware:mobile_devices:nexus_5x [2021/03/30 00:27] nanodano ↷ Page moved from hardware:mobile:nexus_5x to hardware:mobile_devices:nexus_5x |
hardware:mobile_devices:nexus_5x [2021/04/06 00:52] (current) nanodano [Nexus 5X Phone] |
||
---|---|---|---|
Line 3: | Line 3: | ||
====== Nexus 5X Phone ====== | ====== Nexus 5X Phone ====== | ||
- | The Nexus 5X a.k.a. bullhead is a mobile phone with an arm64 CPU and 2G/3G/4G. | + | The Nexus 5X a.k.a. bullhead is a mobile phone with an arm64 CPU and 2G/ |
- | There are a couple free operating systems you can install on it: | + | Product name: bullhead |
- | * LineageOS [[https:// | + | Variant: bullhead |
- | * Maru OS [[https:// | + | |
+ | Special boot mode: With the device powered off, hold Volume Down + Power. | ||
+ | |||
+ | Android versions: | ||
+ | |||
+ | * Original: Android 6.0 " | ||
+ | * Current: Android 8.1 " | ||
+ | * Factory images available at: https:// | ||
+ | * Driver binaries at: https:// | ||
+ | * The last 8.1 factory image and drivers: https:// | ||
+ | |||
+ | |||
+ | Operating systems available: | ||
+ | |||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * Kali NetHunter (Couldn' | ||
+ | * Android full OTA factory ROM - For example, the last 8.1 factory image and drivers: https:// | ||
+ | * PostmarketOS (Long build process, haven' | ||
+ | |||
+ | |||
+ | ===== Flashing a custom recovery ===== | ||
+ | |||
+ | Download a recovery image from [[https:// | ||
+ | |||
+ | When the custom recovery is installed, you can plug the phone into the computer over USB and power it on while holding the volume-down button. This will load it into the simple bootloader where you can press down twice and enter " | ||
+ | |||
+ | The other way to boot into the bootloader menu is to plug the phone in to the computer and use '' | ||
+ | |||
+ | <code bash> | ||
+ | # Restart phone to the boot menu (fastboot) | ||
+ | adb reboot bootloader | ||
+ | # Alternatively, | ||
+ | </ | ||
+ | |||
+ | Once it is in this bootloader menu and the phone is plugged into the PC, you can run '' | ||
+ | |||
+ | <code bash> | ||
+ | # Verify it's got connection and you can see it | ||
+ | fastboot devices | ||
+ | </ | ||
+ | |||
+ | If you need to unlock it use '' | ||
+ | |||
+ | <code bash> | ||
+ | fastboot flashing unlock | ||
+ | </ | ||
+ | |||
+ | From here, you can run '' | ||
+ | |||
+ | |||
+ | <code bash> | ||
+ | # Download latest from https:// | ||
+ | wget " | ||
+ | fastboot flash recovery twrp-3.5.1_9-0-bullhead.img | ||
+ | </ | ||
+ | |||
+ | If all goes well, reboot manually while holding volume-down or use '' | ||
+ | |||
+ | <code bash> | ||
+ | # Power off and power on while holding volume-down or use fastboot | ||
+ | fastboot reboot bootloader | ||
+ | </ | ||
+ | |||
+ | Then in the bootloader menu, press volume-down twice and then the power button once to enter into Recovery mode, which should now be the latest TWRP that we just flashed. | ||
+ | |||
+ | ## Wiping and formatting | ||
+ | |||
+ | In TWRP, if you want to wipe, doing a " | ||
+ | |||
+ | If you want to wipe the OS too, choose Advanced Wipe, then choose Dalvik, Data, and Cache from the default wipe and then also add in System. Leave Internal Storage unchecked if you want to keep ''/ | ||
+ | |||
+ | If you don't care about the internal storage and you want to do a total wipe, check all boxes. | ||
+ | |||
+ | If you want to __completely__ wipe everything, use the format option. This will remove any encryption and be the most complete wipe. | ||
+ | |||
+ | ===== Build LineageOS ===== | ||
+ | |||
+ | You can download a pre-built ROM at [[https:// | ||
+ | |||
+ | Full build instructions at [[https:// | ||
+ | |||
+ | Install some dependencies on Debian first: | ||
+ | |||
+ | <code bash> | ||
+ | sudo apt install -y bc bison build-essential ccache curl \ | ||
+ | flex g++-multilib gcc-multilib git gnupg gperf imagemagick \ | ||
+ | lib32ncurses5-dev lib32readline-dev lib32z1-dev liblz4-tool \ | ||
+ | libncurses5 libncurses5-dev libsdl1.2-dev libssl-dev libxml2 \ | ||
+ | libxml2-utils lzop pngcrush rsync schedtool squashfs-tools \ | ||
+ | xsltproc zip zlib1g-dev openjdk-11-jdk | ||
+ | | ||
+ | # And Java JDK. I'm using 11. '' | ||
+ | # If you need to download Java, visit [[https:// | ||
+ | # If you need to: '' | ||
+ | </ | ||
+ | |||
+ | And the steps I took for building: | ||
+ | |||
+ | <code bash nexus_5x_lineageos_build_steps.txt> | ||
+ | mkdir ~/ | ||
+ | mkdir bin; mkdir -p android/ | ||
+ | curl https:// | ||
+ | chmod +x bin/repo | ||
+ | export PATH=$PATH: | ||
+ | export USE_CCACHE=1 | ||
+ | export CCACHE_EXEC=/ | ||
+ | # Set cache size to 50GB. Add into bashrc/ | ||
+ | export ANDROID_JACK_VM_ARGS=" | ||
+ | |||
+ | git config --global user.email nanodano@devdungeon.com; | ||
+ | |||
+ | cd android/ | ||
+ | repo init -u https:// | ||
+ | repo sync # then wait | ||
+ | |||
+ | source build/ | ||
+ | breakfast bullhead | ||
+ | |||
+ | # This threw some makefile errors, I used the Binary Driver downloads from Google official and extracted and ran the `extract.sh` file it came with inside the `lineage_build/ | ||
+ | # Then reran `breakfast bullhead` | ||
+ | # Then got no errors. | ||
+ | |||
+ | croot | ||
+ | brunch bullhead | ||
+ | # It complained I did not have Java 1.8 then it complained I didn't have an OpenJDK version | ||
+ | # I had to download a prebuild openJDK 8 version from | ||
+ | # https:// | ||
+ | # Then re-running `brunch bullhead` worked. | ||
+ | |||
+ | cd $OUT | ||
+ | |||
+ | ls lineage-15.1-*-UNOFFICIAL-bullhead.zip | ||
+ | ls recovery.img | ||
+ | |||
+ | # Then install the .zip | ||
+ | # I chose not to install the recovery img and leave TWRP. | ||
+ | |||
+ | |||
+ | # I then downloaded GApps from https:// | ||
+ | # https:// | ||
+ | # Then move that zip over to the phone, and install it using TWRP recovery mode. | ||
+ | # It didn't work, but I read the micro version instead of nano works. Trying that. | ||
+ | # I also downloaded the su tool for 15.1 https:// | ||
+ | # https:// | ||
+ | # Wiped, formatted, queued up those 3 zips (lineage os, gapps, su). | ||
+ | # Doing all three of these worked!! I bet this is what I needed for /e/ os and Maru OS too. | ||
+ | </ | ||
+ | |||
+ | ## NanoDroid instead of GApps | ||
+ | |||
+ | NOTE: Instead of using GApps which still comes with Google things like a personal Advertising ID and Google sync, try [https:// | ||
+ | |||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | |||
+ | |||
+ | |||
+ | ===== Install an OS using TWRP recovery ===== | ||
+ | |||
+ | You can wipe the whole disk first if you want. Boot into the TWRP recovery app (see previous section), and then choose `Wipe` and then do Advanced Options and wipe everything there too. Then go back to the main menu and chose Reboot | Recovery. | ||
+ | |||
+ | You'll need a ZIP of an OS to install. Either follow the steps for building LineageOS or download the pre-built MaruOS. | ||
+ | |||
+ | To install, you have two options: | ||
+ | |||
+ | * Copy the ZIP to the device. You can put it on an SD card, or you can connect the phone to a PC while it's in recovery mode, and then copy the zip to the phone' | ||
+ | * Use ADB sideloading. In the TWRP recovery app, choose `Advanced | ADB Sideload`. Then the phone will sit and wait for you to use `adb` on the computer to push something. You can press cancel if you're not ready. | ||
+ | |||
+ | DONT FORGET: You need to also install the Open GApps to get things to work. I needed to get the arm64 8.1 pico version, but if one version doesn' | ||
+ | |||
+ | * https:// | ||
+ | * https:// | ||
+ | |||
+ | Alternatively, | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ===== References ===== | ||
+ | |||
+ | * https:// | ||
+ | * https:// | ||
+ | * https:// | ||
+ | * https:// | ||
+ | * https:// | ||
+ | * https:// | ||
+ | * https:// | ||
+ | * https:// | ||
+ | * TWRP Recovery image: https:// | ||