forked from vcka/huawei-honor-unlock-bootloader
-
Notifications
You must be signed in to change notification settings - Fork 0
/
lock.py
34 lines (24 loc) · 786 Bytes
/
lock.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
SkyEmie_'
"""
import time
#from flashbootlib import test
import os
import math
print('\n\n Lock Bootloader script - By SkyEmie_\'')
print('\n\n (Please enable USB DEBBUG and OEM UNLOCK if the device isn\'t appear..)')
print(' /!\ All data will be erased /!\\\n')
input(' Press any key to detect device..\n')
os.system('adb devices')
OEM = int(input('Type OEM code :'))
input('Press any key to reboot your device..\n')
os.system('adb reboot bootloader')
input('Press any key when your device is ready..\n')
os.system('fastboot oem relock '+OEM)
os.system('fastboot getvar unlocked')
os.system('fastboot reboot')
print('\n\nDevice lock !')
input('Press any key to exit..\n')
exit()