Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error instrumenting apk #39

Closed
sadovnikovsergey opened this issue Nov 1, 2023 · 2 comments
Closed

Error instrumenting apk #39

sadovnikovsergey opened this issue Nov 1, 2023 · 2 comments

Comments

@sadovnikovsergey
Copy link

Hello!
I am tried to instrument some apk`s, but all of them are failed with the same error. There is result of AIMP instrumentation, as example:

python2.7 acvtool.py instrument ../aimp_4.02.1368.apk
The working directory exists and may contain data: /home/sadovnikov/acvtool/acvtool_working_dir
Overwrite (y/n)? y
decompiled com.aimp.player
parsing /home/sadovnikov/acvtool/acvtool_working_dir/apktool/com.aimp.player/smali...
saving instrumented smali:  /home/sadovnikov/acvtool/acvtool_working_dir/apktool/com.aimp.player/smali...
pickle file saved: /home/sadovnikov/acvtool/acvtool_working_dir/metadata/aimp_4.02.1368.pickle
instrumented
brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [/tmp/brut_util_Jar_14631828153885591959.tmp, p, --forced-package-id, 127, --min-sdk-version, 23, --target-sdk-version, 34, --version-code, 1368, --version-name, v4.02.1368 (20.09.2023), --no-version-vectors, -F, /tmp/APKTOOL10057241395823491847.tmp, -e, /tmp/APKTOOL2076583431270168081.tmp, -0, arsc, -I, /home/sadovnikov/.local/share/apktool/framework/1.apk, -S, /home/sadovnikov/acvtool/acvtool_working_dir/apktool/com.aimp.player/res, -M, /home/sadovnikov/acvtool/acvtool_working_dir/apktool/com.aimp.player/AndroidManifest.xml]

built
Traceback (most recent call last):
  File "acvtool.py", line 220, in <module>
    main()
  File "acvtool.py", line 217, in main
    run_actions(parser, args)
  File "acvtool.py", line 52, in run_actions
    mem_stats=args.memstats)
  File "/home/sadovnikov/Desktop/android-studio-2022.3.1.20-linux/acvtool/smiler/instrumenting/utils.py", line 107, in wrapper
    result = method(*args, **kwargs)
  File "/home/sadovnikov/Desktop/android-studio-2022.3.1.20-linux/acvtool/smiler/smiler.py", line 186, in instrument_apk
    sign_align_apk(instrumented_package_path, instrumented_apk_path)
  File "/home/sadovnikov/Desktop/android-studio-2022.3.1.20-linux/acvtool/smiler/smiler.py", line 277, in sign_align_apk
    request_pipe(align_cmd)
  File "/home/sadovnikov/Desktop/android-studio-2022.3.1.20-linux/acvtool/smiler/smiler.py", line 47, in request_pipe
    Out: %s\nError: %s" % (out, err))
Exception: ----------------------------------------------------
Out: 
Error: Unable to open '/home/sadovnikov/acvtool/acvtool_working_dir/aimp_4.02.1368.apk' as zip archive

Can you advise what can be a reason of this problem?

@auermich93
Copy link

@sadovnikovsergey I guess you are using an outdated apktool version (the one that is shipped with ACVTool)? It looks like the re-assembling failed. You could try to decompile and re-assemble above APK with the latest apktool version without using ACVTool at all. Once this worked, you can update ACVTool's internal apktool version, see my pull request on how to do this: #36

@pilgun
Copy link
Owner

pilgun commented Apr 29, 2024

Please try with the updated version.

@pilgun pilgun closed this as not planned Won't fix, can't repro, duplicate, stale Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants