User Tools

Site Tools


android:motorola_google_nexus_6_shamu

Information

  • Resources for the Google/Motorola Nexus 6

xda-developers

Latest platform-tools

Linux

Windows

Factory Image

Filesystem Maintenance

Notes

  • Can only be done within TWRP Recovery either via built-in Terminal or over ADB
  • Ideal to do before a clean ROM flash, after an improper shutdown, and/or after configuring all apps/copying over all data

Quick-commands

ext4

Encrypted

  • This expects /data and /cache to be ext4
  • This expects /data to be encrypted
  • Boot TWRP, enter encryption password, and immediately run the following from a computer
adb shell "umount '/sdcard' && umount '/cache' && umount '/data' && e2fsck -y -f -v '/dev/block/mmcblk0p41' && e2fsck -y -f -v '/dev/block/mmcblk0p26' && e2fsck -y -f -v '/dev/block/mmcblk0p21' && e2fsck -y -f -v '/dev/block/mmcblk0p1' && e2fsck -y -f -v '/dev/block/dm-0' && e2fsck -y -f -v '/dev/block/mmcblk0p38' && mount '/system' && mount '/data' && mount '/cache' && mount '/firmware' && rm -Rf '/data/dalvik-cache' && fstrim -v '/system' && fstrim -v '/data' && fstrim -v '/cache' && fstrim -v '/firmware' && sync && umount '/system' && umount '/data' && umount '/cache' && umount '/firmware' && reboot"

Unencrypted

  • This expects /data and /cache to be ext4
  • This expects /data to be unencrypted
  • Boot TWRP, enter encryption password, and immediately run the following from a computer
adb shell "umount '/data' && umount '/cache' && umount '/sdcard' && e2fsck -y -f -v '/dev/block/mmcblk0p41' && e2fsck -y -f -v '/dev/block/mmcblk0p26' && e2fsck -y -f -v '/dev/block/mmcblk0p21' && e2fsck -y -f -v '/dev/block/mmcblk0p1' && e2fsck -y -f -v '/dev/block/mmcblk0p42' && e2fsck -y -f -v '/dev/block/mmcblk0p38' && mount '/system' && mount '/data' && mount '/cache' && mount '/firmware' && rm -Rf '/data/dalvik-cache' && fstrim -v '/system' && fstrim -v '/data' && fstrim -v '/cache' && fstrim -v '/firmware' && sync && umount '/system' && umount '/data' && umount '/cache' && umount '/firmware' && reboot"

Information

  • /dev/block/mmcblk0p41 is /system
  • /dev/block/mmcblk0p38 is /cache
  • /dev/block/mmcblk0p42 is /data and /sdcard
  • /dev/block/mmcblk0p1 is /firmware
  • All 5 partitions are ext4

Unmount Partitions

umount '/system'
umount '/cache'
umount '/data'
umount '/sdcard'
umount '/firmware'

AIO

umount '/system' '/cache' '/data' '/sdcard' '/firmware'

ext4 Filesystem Maintenance

e2fsck -y -f -v '/dev/block/mmcblk0p41'
e2fsck -y -f -v '/dev/block/mmcblk0p38'
e2fsck -y -f -v '/dev/block/mmcblk0p42'
e2fsck -y -f -v '/dev/block/mmcblk0p1'

Mount Partitions

mount '/system'
mount '/data'
mount '/cache'
mount '/firmware'

AIO

mount -a

Clear Dalvik/ART Cache

adb shell
mount '/data'
rm -Rf '/data/dalvik-cache'

fstrim

  • If done immediately after booting TWRP, /data and /cache are already mounted, but /system and /firmware aren't
adb shell
mount '/system' && mount '/firmware'
fstrim -v '/system' && fstrim -v '/data' && fstrim -v '/cache' && fstrim -v '/firmware' && sync

Quick-command

  • Run after booting into TWRP
adb shell "mount -a || fstrim -v '/system' && fstrim -v '/data' && fstrim -v '/cache' && fstrim -v '/firmware' && sync"

Erase Everything

  • This requires a radio re-flash 1)
  • This does not erase the bootloader nor recovery
sudo fastboot erase 'all'

Flash Base

  • Requires a Factory Image extracted to ~/Downloads
sudo fastboot flash 'bootloader' ~/'Downloads/shamu-'*'/bootloader-shamu-moto-'*'.img' && sudo fastboot reboot-bootloader && sleep 5 && sudo fastboot flash 'radio' ~/'Downloads/shamu-'*'/radio-shamu-'*'.img' && sudo fastboot reboot-bootloader

Ideal Stack

  • As of: 2017/10/28
  • F2FS TWRP
  • LineageOS for easy microG + UnifiedNlp
  • FrancoKernel
  • microG
  • Magisk

microG

Flash Order

  • Boot to Recovery
  • ROM
  • Reboot to Recovery
  • Advanced Wipe → Erase everything except System, format Data and Cache to F2FS
  • Reboot to Recovery
  • Kernel
  • Magisk
  • Reboot to System

F2FS TWRP

LineageOS for easy microG + UnifiedNlp

FrancoKernel

Settings

Script

nano ~/'Downloads/99-kernel.sh' && adb push ~/'Downloads/99-kernel.sh' '/storage/emulated/0' && rm ~/'Downloads/99-kernel.sh' && sync
#!/system/bin/sh

# I/O Scheduler (noop)
echo noop > /sys/block/mmcblk0/queue/scheduler
echo noop > /sys/block/mmcblk0rpmb/queue/scheduler

# fsync (disabled)
echo N > /sys/module/sync/parameters/fsync_enabled

# Vibration Intensity (75)
echo 75 > /sys/drv2605/rtp_strength

# Display Profile (obsanity_standard)
echo 245 245 256 > /sys/devices/platform/kcal_ctrl.0/kcal
echo 273 > /sys/devices/platform/kcal_ctrl.0/kcal_sat
echo 255 > /sys/devices/platform/kcal_ctrl.0/kcal_val
echo 255 > /sys/devices/platform/kcal_ctrl.0/kcal_cont
echo 0 > /sys/devices/platform/kcal_ctrl.0/kcal_hue

Install Script

adb shell
su
mv '/storage/emulated/0/99-kernel.sh' '/magisk/.core/service.d/99-kernel.sh' && chown 'root':'root' '/magisk/.core/service.d/99-kernel.sh' && chmod '755' '/magisk/.core/service.d/99-kernel.sh' && sync

Check Settings

I/O Schedulers

cat '/sys/block/mmcblk0/queue/scheduler' '/sys/block/mmcblk0rpmb/queue/scheduler'
fsync

cat '/sys/module/sync/parameters/fsync_enabled'
Vibration Strength

cat '/sys/drv2605/rtp_strength'
Display Profile

cat '/sys/devices/platform/kcal_ctrl.0/kcal' '/sys/devices/platform/kcal_ctrl.0/kcal_sat' '/sys/devices/platform/kcal_ctrl.0/kcal_val' '/sys/devices/platform/kcal_ctrl.0/kcal_cont' '/sys/devices/platform/kcal_ctrl.0/kcal_hue'

Magisk

F-Droid

Install

wget -O ~/'Downloads/FDroid.apk' 'https://f-droid.org/FDroid.apk' && adb install ~/'Downloads/FDroid.apk' && adb shell 'sync' && rm -f ~/'Downloads/FDroid.apk' && sync

microG Repo

adb shell input text "microg.org/fdroid/repo"
adb shell input text "9BD06727E62796C0130EB6DAB39B73157451582CBD138E86C468ACC395D14165"

Apps

APK Restore

  • This batch-installs multiple APKs
  • cd into the directory containing the APKs
nano 'apk.sh' && chmod +x 'apk.sh'
#!/bin/sh
for file in *.apk
do
  adb install $file
done
./'apk.sh'

F-Droid

Core

  • 8 apps
  • FakeStore
  • microG DroidGuard Helper
  • microG Services Core
  • microG Services Framework Proxy
  • NominatimNlpBackend
  • LocalGsmNlpBackend
  • LocalWifiNlpBackend
  • Yalp Store 2)

Extras

  • 17 apps
  • OneTimePad
  • K-9 Mail
  • KeePassDroid
  • AndStatus
  • M.A.L.P.
  • WiFiAnalyzer
  • Document Viewer
  • Feeder
  • Maps & GPS Navigation OsmAnd+
  • Conversations
  • DAVdroid
  • OpenTasks
  • Loyalty Card Keychain
  • SatStat
  • Forecastie
  • AsteroidOS Sync
  • Firefox Klar

Yalp Store

  • 7 apps
  • Ingress
  • Keybase
  • Obenkyo
  • Pokémon GO
  • Steam
  • VLC
  • VPN.AC Client

Disable

  • com.google.android.apps.tycho is Project Fi
  • com.google.android.apps.gcs is Google Connectivity Services 3)
  • org.lineageos.updater isn't usable with custom LineageOS builds
adb shell
su
pm disable 'com.android.email'
pm disable 'com.google.android.apps.gcs'
pm disable 'org.lineageos.jelly'
pm disable 'com.cyanogenmod.eleven'
pm disable 'com.google.android.apps.tycho'
pm disable 'org.lineageos.updater'

LocalGsmNlpBackend

FastLacellsGenerator

Dependencies

sudo dnf install 'sqlite' && sync

Download

wget -O ~/'Downloads/FastLacellsGenerator-master.zip' 'https://github.com/sobrus/FastLacellsGenerator/archive/master.zip' && unzip ~/'Downloads/FastLacellsGenerator-master.zip' -d ~/'Downloads'

Config

  • TOKEN should be a OpenCelliD API token
  • MMC includes all US
nano ~/'Downloads/FastLacellsGenerator-master/config'
MCC="310|311|312|313|316"
TOKEN="x"

Download and Generate Map Data

  • OpenCelliD apparently only allows 1 download per-day.
  • If the generated lacells.db isn't around 300MB+, this is a problem
cd ~/'Downloads/FastLacellsGenerator-master' && ~/'Downloads/FastLacellsGenerator-master/flg'

Push Map Data

adb push ~/'Downloads/FastLacellsGenerator-master/lacells.db' '/storage/emulated/0/LocalGSMBackend/lacells.db.new'

Cleanup

rm -Rf ~/'Downloads/FastLacellsGenerator-master.zip' ~/'Downloads/FastLacellsGenerator-master' && sync

External database location

/storage/emulated/0/LocalGSMBackend
adb shell input text "/storage/emulated/0/LocalGSMBackend"

Legacy

Flash Order

  • Boot to Recovery
  • ROM
  • GApps
  • Reboot to Recovery
  • Advanced Wipe → Erase everything except System, format Data and Cache to F2FS
  • Reboot to Recovery
  • Kernel
  • Magisk
  • Reboot to System

F2FS TWRP

LineageOS

FrancoKernel

Magisk

Modules

Unified Hosts Adblock

The Open GApps Project

  • Pico is fine
  • Nano also works if Google Search is necessary 4)

gapps-config.txt

  • Place on root of Internal Storage
# No Debug logs
# https://github.com/opengapps/opengapps/wiki/Advanced-Features-and-Options#debug-logs

#NoDebug

# Smart Pre-ODEXing of APKs
# https://github.com/opengapps/opengapps/wiki/Advanced-Features-and-Options#skip-smart-pre-odexing-of-apks

PreODEX

# Exclude GApps
# https://github.com/opengapps/opengapps/wiki/Advanced-Features-and-Options#include-or-exclude-gapps
# Expects Nano package

DialerFramework
CalSync
GoogleTTS
PackageInstallerGoogle
BatteryUsage
FaceDetect
FaceUnlock
Speech

# Remove Stock apps
# https://github.com/opengapps/opengapps/wiki/Advanced-Features-and-Options#remove-stock-apps
# Expects LineageOS

(Eleven)
(Email)
(Jelly)

App Disable

adb shell
su
pm disable 'com.google.android.syncadapters.calendar'
pm disable 'com.google.android.syncadapters.contacts'
pm disable 'com.android.email'
pm disable 'org.lineageos.jelly'
pm disable 'com.cyanogenmod.eleven'

Other Information

Display

DPI

  • Native DPI is 493
  • Default DPI is 560
  • Works as low as 240
wm density '493'
wm density '240'
wm density reset

Resolution

  • Native resolution is 1440×2560
  • Can upscale to 2160×3840
  • Can downscale to 1080×1920
  • Works as low as 540×960 5)
wm size 2160x3840
wm size 1080x1920
wm size 540x960
wm size reset
1)
can use flash-base.sh from the latest Factory Image
3)
if using microG, GCS will crash after reboots frequently; disabling it doesn't seem to break anything
4)
only useful for Android Wear
5)
Ingress UI starts to overlap any lower than this
/var/www/wiki/data/pages/android/motorola_google_nexus_6_shamu.txt · Last modified: by 127.0.0.1