├── README.md
├── .gitignore
└── motorola_get_id.py
/README.md:
--------------------------------------------------------------------------------
1 | # Motolora-Unlock (Abandoned project - No support provided, does not work on current phones.)
2 | Script that generates the **id** of `Motorola smartphones` for get the unlock bootloader
3 |
4 | Requeriments
5 | ================
6 |
7 | You need it:
8 |
9 | * Install in path the `fastboot`
10 | * A motorola Smartphone for test tool
11 | * Python 2.7x
12 |
13 | How use?
14 | ===========
15 | Download script and run with your smartphone connected in fastbootmode to the pc, use `python motorola_get_id.py` command, then it returns the **ID code** and generate and also file.
16 |
17 |
18 | Para Usuarios de habla hispana, pueden ir al mi post y ver Como desbloquear bootloader de motorola
19 |
20 | El script basicamente lo que hace es obtener la id (que normalmente tendriamos que buscar y unir manualmente) para luego subirla a la pagina de motorola y obtener la llave de desbloqueo
21 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Byte-compiled / optimized / DLL files
2 | __pycache__/
3 | *.py[cod]
4 | *$py.class
5 |
6 | # C extensions
7 | *.so
8 |
9 | # Distribution / packaging
10 | .Python
11 | env/
12 | build/
13 | develop-eggs/
14 | dist/
15 | downloads/
16 | eggs/
17 | .eggs/
18 | lib/
19 | lib64/
20 | parts/
21 | sdist/
22 | var/
23 | *.egg-info/
24 | .installed.cfg
25 | *.egg
26 |
27 | # PyInstaller
28 | # Usually these files are written by a python script from a template
29 | # before PyInstaller builds the exe, so as to inject date/other infos into it.
30 | *.manifest
31 | *.spec
32 |
33 | # Installer logs
34 | pip-log.txt
35 | pip-delete-this-directory.txt
36 |
37 | # Unit test / coverage reports
38 | htmlcov/
39 | .tox/
40 | .coverage
41 | .coverage.*
42 | .cache
43 | nosetests.xml
44 | coverage.xml
45 | *,cover
46 | .hypothesis/
47 |
48 | # Translations
49 | *.mo
50 | *.pot
51 |
52 | # Django stuff:
53 | *.log
54 | local_settings.py
55 |
56 | # Flask stuff:
57 | instance/
58 | .webassets-cache
59 |
60 | # Scrapy stuff:
61 | .scrapy
62 |
63 | # Sphinx documentation
64 | docs/_build/
65 |
66 | # PyBuilder
67 | target/
68 |
69 | # IPython Notebook
70 | .ipynb_checkpoints
71 |
72 | # pyenv
73 | .python-version
74 |
75 | # celery beat schedule file
76 | celerybeat-schedule
77 |
78 | # dotenv
79 | .env
80 |
81 | # virtualenv
82 | venv/
83 | ENV/
84 |
85 | # Spyder project settings
86 | .spyderproject
87 |
88 | # Rope project settings
89 | .ropeproject
90 |
--------------------------------------------------------------------------------
/motorola_get_id.py:
--------------------------------------------------------------------------------
1 | #Author: Mateo Bohorquez
2 | #NickName: MingoDRobin, Milor123
3 |
4 | from subprocess import Popen, PIPE, STDOUT
5 | import threading
6 |
7 | bootloader = False
8 |
9 | def get_code_motorola():
10 | try:
11 | igg = 'fastboot oem get_unlock_data'
12 | p = Popen(igg, shell=True, stdin=PIPE, stdout=PIPE, stderr=STDOUT)
13 | output = p.stdout.read().splitlines()
14 | code = []
15 | for x in output:
16 | if str(x[1:11]) == 'bootloader': # 1:11 is 'bootloader' > (bootloader) xxxCodexxx
17 | code.append(x[13:]) # 13: is 'xxxCodexx'
18 | bootloader = True
19 | if bootloader:
20 | alldata= ('').join(code)
21 | myfile = open('Code_Bootloader.txt','w')
22 | myfile.write(alldata)
23 | myfile.close()
24 | else:
25 | raise
26 | except:
27 | message= 'Error Desconocido, Intenta ejecutar este archivo donde este el fastboot o agregalo a la consola'
28 | myfile = open('motorola_get_id_Error.log','w')
29 | myfile.write(message)
30 | myfile.close()
31 |
32 | def killer(): # this is necessary because stdout.read() do a bucle if the phone is not connected
33 | global code
34 | import time
35 | time.sleep(5)
36 | if code.isAlive(): # if exists the thread
37 | code._Thread__stop() # kill thread
38 | message= 'Error Desconocido, Intenta ejecutar este archivo donde este el fastboot o agregalo a la consola'
39 | myfile = open('motorola_get_id_Error.log','w')
40 | myfile.write(message)
41 | myfile.close()
42 |
43 | # threads for kill process if its waiting
44 | code = threading.Thread(target=get_code_motorola)
45 | killer = threading.Thread(target=killer)
46 | code.start()
47 | killer.start()
48 |
49 |
50 |
--------------------------------------------------------------------------------