worawit / blutter

Flutter Mobile Application Reverse Engineering Tool
MIT License
760 stars 128 forks source link

make_version.py exception 'str' object has no attribute 'decode' #7

Open jinxiaoshu opened 9 months ago

jinxiaoshu commented 9 months ago

image 大佬,这个该如何解决 Boss, how can we solve this

worawit commented 9 months ago

An error occurs in Dart make_version.py. I've never found this error. Can you give me what Dart version is getting compiled.

jinxiaoshu commented 9 months ago

image this?

jinxiaoshu commented 9 months ago

I just gave it a try and it is indeed a problem with Dart version. Dart version: 2.19.6 is acceptable

worawit commented 9 months ago

Version 2.10.4 is too old for this project. I have no plan to support it.

From the error, I think it requires python 2.7 to run the script in Dart SDK project. Even if you could build the SDK, I guess the blutter would not be compiled or run correctly.

xiejiale123 commented 8 months ago

Dart version: 2.18.6, My mistake is the same as the one above. Is 2.18.6 unacceptable?

uuyjp commented 7 months ago

I have solevd it by using other python which version is 3.11.

Onekki commented 7 months ago

I have the same issue with dart version 2.10.5

Prince-cool commented 6 months ago

meet same issue,how can i do for it? image

QAQQL commented 5 months ago

你可以修改以下代码 You can modify the following code

./blutter/dartsdk/v2.10.5/make_version.py version = version.replace('{{COMMIT_TIME}}', version_time.decode('utf-8')) 改为 change to version = version.replace('{{COMMIT_TIME}}', version_time)

并根据报错的command手动执行一次编译 And manually execute a compilation according to the command that reported an error

 File "/usr/lib/python3.11/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/usr/bin/python3', 'tools/make_version.py', '--output', 'runtime/vm/version.cc', '--input', 'runtime/vm/version_in.cc']' returned non-zero exit status 255.

例: sample:

cd dartsdk/v2.10.5/
/usr/bin/python3 tools/make_version.py --output runtime/vm/version.cc --input runtime/vm/version_in.cc

继续执行你刚才的pyhton即可 and rerun your py command python3 blutter.py ./arm64-v8a ./out

Prince-cool commented 5 months ago

你可以修改以下代码 You can modify the following code

./blutter/dartsdk/v2.10.5/make_version.py version = version.replace('{{COMMIT_TIME}}', version_time.decode('utf-8')) 改为 change to version = version.replace('{{COMMIT_TIME}}', version_time)

并根据报错的command手动执行一次编译 And manually execute a compilation according to the command that reported an error

 File "/usr/lib/python3.11/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/usr/bin/python3', 'tools/make_version.py', '--output', 'runtime/vm/version.cc', '--input', 'runtime/vm/version_in.cc']' returned non-zero exit status 255.

例: sample:

cd dartsdk/v2.10.5/
/usr/bin/python3 tools/make_version.py --output runtime/vm/version.cc --input runtime/vm/version_in.cc

继续执行你刚才的pyhton即可 and rerun your py command python3 blutter.py ./arm64-v8a ./out

my Dart version: 3.1.5, Snapshot: 7dbbeeb8ef7b91338640dca3927636de, Target: android arm64 image it‘s replace right,but it wrong too

QAQQL commented 5 months ago

你可以修改以下代码 You can modify the following code ./blutter/dartsdk/v2.10.5/make_version.py version = version.replace('{{COMMIT_TIME}}', version_time.decode('utf-8')) 改为 change to version = version.replace('{{COMMIT_TIME}}', version_time) 并根据报错的command手动执行一次编译 And manually execute a compilation according to the command that reported an error

 File "/usr/lib/python3.11/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/usr/bin/python3', 'tools/make_version.py', '--output', 'runtime/vm/version.cc', '--input', 'runtime/vm/version_in.cc']' returned non-zero exit status 255.

例: sample:

cd dartsdk/v2.10.5/
/usr/bin/python3 tools/make_version.py --output runtime/vm/version.cc --input runtime/vm/version_in.cc

继续执行你刚才的pyhton即可 and rerun your py command python3 blutter.py ./arm64-v8a ./out

my Dart version: 3.1.5, Snapshot: 7dbbeeb8ef7b91338640dca3927636de, Target: android arm64 image it‘s replace right,but it wrong too

请粘贴你报错的行数和提示 Please paste the number of lines you reported incorrectly and the prompt

Prince-cool commented 5 months ago

你可以修改以下代码 You can modify the following code ./blutter/dartsdk/v2.10.5/make_version.py version = version.replace('{{COMMIT_TIME}}', version_time.decode('utf-8')) 改为 change to version = version.replace('{{COMMIT_TIME}}', version_time) 并根据报错的command手动执行一次编译 And manually execute a compilation according to the command that reported an error

 File "/usr/lib/python3.11/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/usr/bin/python3', 'tools/make_version.py', '--output', 'runtime/vm/version.cc', '--input', 'runtime/vm/version_in.cc']' returned non-zero exit status 255.

例: sample:

cd dartsdk/v2.10.5/
/usr/bin/python3 tools/make_version.py --output runtime/vm/version.cc --input runtime/vm/version_in.cc

继续执行你刚才的pyhton即可 and rerun your py command python3 blutter.py ./arm64-v8a ./out

my Dart version: 3.1.5, Snapshot: 7dbbeeb8ef7b91338640dca3927636de, Target: android arm64 image it‘s replace right,but it wrong too

请粘贴你报错的行数和提示 Please paste the number of lines you reported incorrectly and the prompt

image

QAQQL commented 5 months ago

你可以修改以下代码 You can modify the following code ./blutter/dartsdk/v2.10.5/make_version.py version = version.replace('{{COMMIT_TIME}}', version_time.decode('utf-8')) 改为 change to version = version.replace('{{COMMIT_TIME}}', version_time) 并根据报错的command手动执行一次编译 And manually execute a compilation according to the command that reported an error

 File "/usr/lib/python3.11/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/usr/bin/python3', 'tools/make_version.py', '--output', 'runtime/vm/version.cc', '--input', 'runtime/vm/version_in.cc']' returned non-zero exit status 255.

例: sample:

cd dartsdk/v2.10.5/
/usr/bin/python3 tools/make_version.py --output runtime/vm/version.cc --input runtime/vm/version_in.cc

继续执行你刚才的pyhton即可 and rerun your py command python3 blutter.py ./arm64-v8a ./out

my Dart version: 3.1.5, Snapshot: 7dbbeeb8ef7b91338640dca3927636de, Target: android arm64 image it‘s replace right,but it wrong too

请粘贴你报错的行数和提示 Please paste the number of lines you reported incorrectly and the prompt

image

你修改后是否执行了以下代码? Did you execute the following code after modification?

cd ./dartsdk/v3.1.5
D:\\Program Files\\python39\\python.exe tools/make_version.py --output runtime/vm/version.cc --input runtime/vm/version_in.cc

参数请根据你的错误提示修改,目录请根据你实际目录修改。 Parameters Please modify according to your error prompt, directory Please modify according to your actual directory.

以上步骤为手动编译sdk,当你执行完这些,将跳过sdk重新下载并编译的步骤,这样会直接进行下一步 The above steps are for manually compiling the sdk. When you finish these steps, you will skip the step of re-downloading and compiling the sdk, which will proceed directly to the next step