nexus5环境配置

nexus5配置环境,记录一下。

工具版本

  1. 官方镜像:hammerhead-lrx22c-factory-3b22f481.zip
  2. Auto Root:CF-Auto-Root-hammerhead-hammerhead-nexus5.zip
  3. 第三方Recovery:twrp-3.3.1-0-hammerhead.img
  4. Xposed应用:xposed-installer-3-1-5.apk
  5. Xposed框架:xposed-v89-sdk21-arm.zip

刷入官方镜像

下载镜像
https://developers.google.com/android/images#hammerhead

手机进入bootloader

1
2
adb reboot bootloader
或长按关机键+音量下

使用flash-all.sh脚本刷入后无限重启,先将下载后镜像包中的image-hammerhead-lrx22c.zip解压,写一个shell脚本安装:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh
fastboot erase cache
fastboot erase userdata
fastboot erase bootfastboot erase cache
fastboot erase recovery
fastboot erase system
fastboot erase userdata
fastboot flash bootloader bootloader-hammerhead-hhz12d.img
fastboot reboot-bootloader
fastboot flash radio radio-hammerhead-m8974a-2.0.50.2.22.img
fastboot reboot-bootloader
fastboot flash recovery ./image-hammerhead-lrx22c/recovery.img
fastboot flash boot ./image-hammerhead-lrx22c/boot.img
fastboot flash system ./image-hammerhead-lrx22c/system.img
fastboot flash cache ./image-hammerhead-lrx22c/cache.img
fastboot flash userdata ./image-hammerhead-lrx22c/userdata.img

然后重启手机

ROOT

下载Auto Root
https://download.chainfire.eu/363/CF-Root/CF-Auto-Root/CF-Auto-Root-hammerhead-hammerhead-nexus5.zip

1
2
3
adb reboot bootloader
chmod +x root-mac.sh
./root-mac.sh

twrp

下载Twrp
https://twrp.me/lg/lgnexus5.html

1
2
3
4
adb reboot bootloader
fastboot flash recovery twrp-3.3.1-0-hammerhead.img
fastboot reboot
adb reboot recovery

Xposed

下载安装安装包

1
adb install xposed-installer-3-1-5.apk

android5.0以上需要安装额外的框架
https://forum.xda-developers.com/showthread.php?t=3034811

下载对应的框架
https://dl-xda.xposed.info/framework/sdk21/arm/xposed-v89-sdk21-arm.zip

官方推荐Twrp安装
进入Twrp->Advanced->ADB sideload

1
2
3
adb slidload adb sideload xposed-v89-sdk21-arm.zip

adb shell flash-archive.sh xposed-v89-sdk21-arm.zip