Procedure
I cloned your repo and setup a venv and downloaded and unzipped a fresh darwin androidtools.
after realizing that your setup.py didn't have setuptools module in it, I ran it using the interpretor,
using python setup.py
.
Please add that in the README so folks knows.
I copied the 'offici5l-un-lock.py' to my 'platform-tools' dir created from the unzipping of the platformtools zipfile, and after running through the prompts in the script I got this error:
device token:
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
device product:
lancelot
code: 10000 descEN: Request parameter error
Invalid device token or product.
Traceback (most recent call last):
File "/xxxxx/xxxxxx/xxxxxxxxxxxx/mitool/miunlock/platform-tools/offici5l-un-lock.py", line 224, in <module>
exec("\n".join(line for i, line in enumerate(codecs.open('un-lock.py', 'r', 'utf-8').read().split('\n'), 1) if i not in range(10, 27)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen codecs>", line 906, in open
FileNotFoundError: [Errno 2] No such file or directory: 'un-lock.py'
parts are obfuscated for security, but you can see that 'un-lock.py' is returning a Error no 2, as
I've stated above. Was that because you decided to rename the script from 'un-lock.py' to 'offici5l-un-lock.py'. There isn't any reference to this in the README, and the file doesn't appear in the repo.
When I think about it it doesn't make sense that 'un-lock.py' is a typo, since there won't much need to open another file from a script where all the data is already accessible.
It is very non-plus.
In looking through the MiTool main repo there is the identical layout with one exception being that the open()
function is pointing towards an address on the termux filesystem.
It says something like '/data/data/com.termux/files/usr/bin/un-lock.py' or soemthing.
and in the repo there is actually a file called 'un-lock.py' as oppsed to here where there is only a 'offici5l-un-lock.py'. Maybe that is the source of the problem.
I put up a long sprawling post about it where I suggest near the end that you might have a feature here that dumps the token so that a user might use it with a fastboot command.