源碼編譯和刷機(jī)
編譯Android 4.4.4 r1的源碼刷Nexus 5手機(jī)詳細(xì)教程
下載鏡像
https://developers.google.com/android/images#hammerhead
在這里尋找想要的系統(tǒng)版本開始刷機(jī)荆隘,按照以下命令
參考網(wǎng)址:https://www.25pp.com/news/news_76805.html
1霎桅、將N5或者N6插入電腦牡肉,這時如果你的電腦中安裝有任一手機(jī)管理軟件,它都會自動幫你安裝ADB驅(qū)動甩十。
2、自動安裝好驅(qū)動后禽最,連接電腦的狀態(tài)下將手機(jī)關(guān)機(jī)刹前,然后按住電源鍵和音量下鍵重啟,進(jìn)入bootloader模式寸齐。
3欲诺、成功進(jìn)入后再電腦CMD中輸入fastboot oem unlock抄谐,然后手機(jī)會彈出確認(rèn)窗口,點(diǎn)擊確認(rèn)等待解鎖成功扰法。
解鎖成功后你的手機(jī)就可以刷機(jī)啦蛹含,現(xiàn)在進(jìn)入烹飪主菜環(huán)節(jié)
4、將下載好的tgz格式的刷機(jī)包解壓縮塞颁,解壓縮后再將里面的文件名為“image-hammerxxxx”的zip壓縮文件解壓縮浦箱。
▼如圖為兩次解壓縮后獲得的全部文件
接下來的環(huán)節(jié)都要在CMD下面以命令的形式進(jìn)行。
5祠锣、在CMD中進(jìn)入解壓后的刷機(jī)包目錄酷窥,比如我將刷機(jī)包解壓在了F盤下的android文件夾中的m文件夾,所以路徑如下圖所示伴网。
然后依次輸入下列命令:
fastboot flash bootloader bootloader文件名 .img
fastboot flash radio radio文件名.img
6蓬推、然后重啟bootloader:
fastboot reboot-bootloader
7、然后依次刷入recovery澡腾、boot沸伏、system等:
fastboot flash recovery recovery.img
fastboot flash boot boot.img
fastboot flash system system.img
8、為了保險起見动分,以上步驟完成后還需要清除掉舊的數(shù)據(jù):
fastboot flash cache cache.img
fastboot erase userdata
fastboot flash userdata userdata.img
9毅糟、全部結(jié)束后輸入命令重啟手機(jī):
fastboot reboot
等待手機(jī)重啟就會進(jìn)入Android M啦,第一次啟動會很慢澜公,需要耐心等待姆另。
Nexus 5x Android 7.0 刷機(jī)
針對Nexus 5x刷7.0:
7.0固件官方:https://pan.baidu.com/s/1cMICGm
步驟:
1.1 下載adb工具并解壓 https://pan.baidu.com/s/1bK08CQ
1.2 打開文件夾,將 adb.exe坟乾、fastboot.exe 復(fù)制到 c:/windows/system32下
1.3 再將 adb.exe迹辐、AdbWinApi.dll、AdbWinUsbApi.dll 這個三個文件復(fù)制到 c:/windows/system文件夾下
2.將.tgz文件解壓糊渊,再將里面的.zip文件再次解壓右核,將得到的所有文件復(fù)制到adb文件夾。在adb文件夾下按Shift+鼠標(biāo)右鍵渺绒,選擇「在此處打開命令窗口」贺喝;
3.關(guān)機(jī),最好在關(guān)機(jī)前備份數(shù)據(jù)宗兼、取消鎖屏密碼躏鱼、退出谷歌帳戶;
4.一定記得在開發(fā)者選項(xiàng)里面打開OEM解鎖殷绍;
5.長按電源+音量減進(jìn)入fastboot染苛,用數(shù)據(jù)線連接電腦,輸入 fastboot device 查看手機(jī)是否已經(jīng)和電腦連接好。然后開始刷機(jī),把其中「xxx」換成實(shí)際的文件名
具體步驟如下:
刷入bootloader
fastboot flash bootloader xxx.img
刷入radio
fastboot flash radio xxx.img
重啟bootloader
fastboot reboot-bootloader
刷入系統(tǒng)鏡像
fastboot flash system system.img
刷入驅(qū)動
fastboot flash vendor vendor.img
刷入內(nèi)核
fastboot flash boot boot.img
刷入Recovery
fastboot flash recovery recovery.img
清空cache分區(qū)
fastboot erase cache
清除緩存
fastboot flash cache cache.img
格式化全部數(shù)據(jù)
fastboot -w
重啟
fastboot reboot
Android Pixel 9.0 bate 版下載
https://www.androidsage.com/2018/06/06/download-install-android-p-developer-preview-3-beta-3/
https://developer.android.com/preview/download#images
https://developer.android.com/preview/devices/
https://www.google.com/android/beta
刷機(jī)步驟:
fi
fastboot flash bootloader bootloader-sailfish-8996-012001-1804121206.img
fastboot reboot-bootloader
sleep 5
fastboot flash radio radio-sailfish-8996-130181-1806061856.img
fastboot reboot-bootloader
sleep 5
fastboot -w update image-sailfish-ppp5.180610.010.zip
Pixel 2 XL 刷機(jī)
adb reboot bootloader
fastboot flashing unlock
fastboot flashing unlock_critical
下載最新的 platform-tools
下載 想要刷的 rom
解壓后點(diǎn)擊:flash_all.bat
I've updated my Pixel 2 XL to the latest version and I wanted to try out the P preview.. The problem is that apparently I have an newer version of the bootloader.
Device version-bootloader is 'TMZ12bb'.
Update requires 'TMZ20f'.
fastboot flashing unlock
fastboot flashing unlock_critical
>adb reboot bootloader
>fastboot.exe oem unlock
FAILED (remote: oem unlock is not allowed)
finished. total time: 0.015s
>fastboot.exe flashing unlock
FAILED (remote: oem unlock is not allowed)
finished. total time: 0.013s
>fastboot.exe flashing unlock_critical
FAILED (remote: oem unlock is not allowed)
finished. total time: 0.015s
>fastboot.exe flashing get_unlock_ability
(bootloader) get_unlock_ability: 0
OKAY [ 0.043s]
finished. total time: 0.046s
>fastboot.exe flashing get_unlock_bootloader_nonce
(bootloader) Command is not supported.
(bootloader) Please unlock device to enable this command.
FAILED (remote failure)
finished. total time: 0.098s
c382b65
"your device is corrupt. it can't be trusted and may not work properly.",
官網(wǎng):
https://developers.google.cn/android/images
對應(yīng) ota
https://developers.google.com/android/ota
platform-tools
https://developer.android.google.cn/studio/releases/platform-tools
images
https://dl.google.com/dl/android/aosp/taimen-opm1.171019.021-factory-55f528f1.zip
https://forum.xda-developers.com/pixel-2/help/pixel-2-xl-device-corrupt-t3806503