Add vendor ID support and unlock text to fastbootinstall
To use vendor ID, add:
fastbootvendor: XXXX
To add unlock text, add:
fastbootunlock: true
to a device markdown header in _devices.
Change-Id: Idac1f6f513b7a1cc9e45792a29e4683904ae4260
diff --git a/_includes/fastbootinstall.html b/_includes/fastbootinstall.html
index a6ed640..81f0642 100644
--- a/_includes/fastbootinstall.html
+++ b/_includes/fastbootinstall.html
@@ -1,3 +1,4 @@
+{% capture fastboot %}fastboot{% if page.fastbootvendor %} -i 0x{{ page.fastbootvendor }}{% endif %}{% endcapture %}
<html>
<div class='page-heading' id='fastboot-install'>Fastboot Install Method (No Root Required):</div>
<a id='fastboot'></a>
@@ -6,7 +7,13 @@
<p class="text">Windows users will need proper drivers installed on your computer. You can try the <a href="http://www.xda-developers.com/universal-naked-driver-solves-your-adb-driver-problems-on-windows/">Naked ADB drivers</a> or the <a href="http://www.koushikdutta.com/post/universal-adb-driver">Universal ADB drivers</a> if you don't already have a working driver installed</p>
<p class="text">On your device, go into Settings -> About and find the Build Number and tap on it 7 times to enable developer settings. Press back and go into Developer Options and enable USB debugging. From your computer, open a command prompt and type:</p>
<p class="text">adb reboot bootloader</p>
-<p class="text">You should now be in fastboot mode. Download the correct image file and copy the file into the same folder as your adb and fastboot binaries. Rename the image to twrp.img and type:</p>
-<p class="text">fastboot flash recovery twrp.img<p></p>fastboot reboot</p>
-<p class="text">Note many devices will replace your custom recovery automatically during first boot. To prevent this, use <a href="http://www.google.com">Google</a> to find the proper key combo to enter recovery. After typing fastboot reboot, hold the key combo and boot to TWRP. Once TWRP is booted, TWRP will patch the stock ROM to prevent the stock ROM from replacing TWRP. If you don't follow this step, you will have to repeat the install.</p>
-</html>
\ No newline at end of file
+<p class="text">You should now be in fastboot mode.</p>
+{% if page.fastbootunlock %}
+<p class="text">Your device needs to be unlocked before it can flash custom images. To unlock your device type:</p>
+<p class="text">{{ fastboot }} oem unlock</p>
+{% endif %}
+<p class="text">Download the correct image file and copy the file into the same folder as your adb and fastboot binaries. Rename the image to twrp.img and type:</p>
+<p class="text">{{ fastboot }} flash recovery twrp.img</p>
+<p class="text">{{ fastboot }} reboot</p>
+<p class="text">Note many devices will replace your custom recovery automatically during first boot. To prevent this, use <a href="http://www.google.com">Google</a> to find the proper key combo to enter recovery. After typing {{ fastboot }} reboot, hold the key combo and boot to TWRP. Once TWRP is booted, TWRP will patch the stock ROM to prevent the stock ROM from replacing TWRP. If you don't follow this step, you will have to repeat the install.</p>
+</html>