echo off
echo ------------------------------------------------------------------------------
echo waiting for device to connect. 
echo make sure you have adb developer options turn on on the device
echo ------------------------------------------------------------------------------
adb wait-for-device
cls
echo Manufacturer > bootloader-info.txt
echo HUAWEI >> bootloader-info.txt
echo - >> bootloader-info.txt
echo Model Number >> bootloader-info.txt
echo HUAWEI Y300-0000 >> bootloader-info.txt

echo - >> bootloader-info.txt
echo Serial Number >> bootloader-info.txt
adb shell getprop ro.serialno >> bootloader-info.txt
echo IMEI Number HERE >> bootloader-info.txt
echo - >> bootloader-info.txt
echo Product ID HERE >> bootloader-info.txt
echo - >> bootloader-info.txt
echo unlock code HERE >> bootloader-info.txt
echo - >> bootloader-info.txt
echo - >> bootloader-info.txt
echo - >> bootloader-info.txt
echo - >> bootloader-info.txt
echo Huawei Bootloader unlock site link >> bootloader-info.txt
echo http://emui.huawei.com/en/ >> bootloader-info.txt
echo - >> bootloader-info.txt
echo unlock bootloader commands to run once you have a bootloader unlock code >> bootloader-info.txt
echo in the unlock bootloader folder hold shift and right click mouse select open command window here >> bootloader-info.txt
echo - >> bootloader-info.txt
echo adb reboot bootloader >> bootloader-info.txt
echo - >> bootloader-info.txt
echo fastboot oem unlock pasteunlockcodehere >> bootloader-info.txt
echo - >> bootloader-info.txt
echo fastboot reboot >> bootloader-info.txt
adb shell am start -a android.intent.action.DIAL -d tel:1
echo ------------------------------------------------------------------------------
echo on you phone delete the 1 and enter *#06# in the phone dialer that 
echo popped up this will show your IMEI number type it into the document
echo ------------------------------------------------------------------------------
start bootloader-info.txt
start HuaweiProductIDGenerator.exe
pause
cls
echo ------------------------------------------------------------------------------
echo Huawei product id generator is open select Huawei Y300-0000
echo enter IMEI number from document then generate a product id
echo copy generated product id to the bootloader info document. 
echo ------------------------------------------------------------------------------
pause
start http://emui.huawei.com/en/plugin.php?id=unlock&mod=unlock&action=apply
cls
echo ------------------------------------------------------------------------------
echo WARNING Huawei site is down alot. If this happens just refresh the pages.
echo sign into Huawei site or create a new account.
echo Enter all info from document into site and generate a unlock code. 
echo copy unlock code to bootloader info document. 
echo ------------------------------------------------------------------------------
pause