Code Monkey home page Code Monkey logo

Comments (9)

pilgun avatar pilgun commented on August 21, 2024

from acvtool.

MicheleDaniele avatar MicheleDaniele commented on August 21, 2024

Thank you for your immediate response.
Unfortunately, however, I just tried but I keep getting nothing.

from acvtool.

pilgun avatar pilgun commented on August 21, 2024

from acvtool.

MicheleDaniele avatar MicheleDaniele commented on August 21, 2024

Good morning, fortunately I was able to start the 'acv instrument' command. The trick was to start the tool via the teminal of the PyCharm CE app, strange but true.
Now unfortunately I get one more problem:
**Unable to open '/Users/user/acvtool/acvtool_working_dir/pl.sanszo.pcis_2.apk' as zipper archive**

I leave the full error trace below.

acv instrument /Users/user/Desktop/single-dex/pl.sanszo.pcis_2.apk
Working directory exists and may contain data: /Users/user/acvtool/acvtool_working_dir
Overwrite (y/n)? y
Exception in "main" thread brut.androlib.AndrolibException: Invalid chunk type: expected=0x00000200, got=0x00000206
        a brut.androlib.res.decoder.ARSCDecoder.checkChunkType(ARSCDecoder.java:542)
        a brut.androlib.res.decoder.ARSCDecoder.readTablePackage(ARSCDecoder.java:88)
        a brut.androlib.res.decoder.ARSCDecoder.readTableHeader(ARSCDecoder.java:82)
        a brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:48)
        a brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibResources.java:786)
        a brut.androlib.res.AndrolibResources.loadFrameworkPkg(AndrolibResources.java:123)
        a brut.androlib.res.data.ResTable.getPackage(ResTable.java:84)
        a brut.androlib.res.data.ResTable.getResSpec(ResTable.java:67)
        a brut.androlib.res.data.ResTable.getResSpec(ResTable.java:63)
        a brut.androlib.res.data.value.ResReferenceValue.getReferent(ResReferenceValue.java:62)
        a brut.androlib.res.data.value.ResReferenceValue.referentIsNull(ResReferenceValue.java:73)
        at brut.androlib.res.data.value.ResStyleValue.serializeToResValuesXml(ResStyleValue.java:49)
        at brut.androlib.res.AndrolibResources.generateValuesFile(AndrolibResources.java:742)
        at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:263)
        at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:129)
        at brut.androlib.ApkDecoder.decode(ApkDecoder.java:124)
        at brut.apktool.Main.cmdDecode(Main.java:170)
        a brut.apktool.Main.main(Main.java:76)

The execution failed!
decompiled pl.sanszo.pcis
parsing /Users/user/acvtool/acvtool_working_dir/apktool/pl.sanszo.pcis/smali...
saved instrumented smali: /Users/user/acvtool/acvtool_working_dir/apktool/pl.sanszo.pcis/smali...
saved pickle file: /Users/user/acvtool/acvtool_working_dir/metadata/pl.sanszo.pcis_2.pickle
instrumented
brut.directory.PathNotExist: apktool.yml

built
Traceback (last call):
  File "/usr/local/Caskroom/miniconda/base/envs/penv27java18/bin/acv", line 11, in <module>
    load_entry_point('acvtool', 'console_scripts', 'acv')()
  File "/Users/user/Desktop/acvtool/acvtool.py", line 217, in main
    run_actions(parser, args)
  File "/Users/user/Desktop/acvtool/acvtool.py," line 52, in run_actions
    mem_stats=args.memstats)
  File "/Users/user/Desktop/acvtool/smiler/instrumenting/utils.py", line 107, in wrapper
    result = method(*args, **kwargs)
  File "/Users/user/Desktop/acvtool/smiler/smiler.py", line 186, in instrument_apk
    sign_align_apk(instrumented_package_path, instrumented_apk_path)
  File "/Users/user/Desktop/acvtool/smiler/smiler.py", line 277, in sign_align_apk
    request_pipe(align_cmd)
  File "/Users/user/Desktop/acvtool/smiler/smiler.py", line 47, in request_pipe
    Out: %sEntry in error: %s" % (out, err))
Exception: ----------------------------------------------------
Out: 
Error: Unable to open '/Users/user/acvtool/acvtool_working_dir/pl.sanszo.pcis_2.apk' as zipper archive

I apologize again for the trouble and thank you in advance.

from acvtool.

pilgun avatar pilgun commented on August 21, 2024

from acvtool.

MicheleDaniele avatar MicheleDaniele commented on August 21, 2024

I've already tried but I receive the same error :(

from acvtool.

pilgun avatar pilgun commented on August 21, 2024

I see you are using an environment: 'Caskroom/miniconda/base/envs/penv27java18'. It should not be an issue, but maybe you could call directly the python2.7 instance and also put arguments for the working directory. The error says apktool can't find the apktool.yml file. This could mean that apktool probably runs over wrong directory because usually apktool.yml is always there.
acv_repo:> /usr/bin/python2 acvtool.py instrument /Users/user/Desktop/single-dex/pl.sanszo.pcis_2.apk --wd wd

The --wd option is for the path to the working directory.

from acvtool.

MicheleDaniele avatar MicheleDaniele commented on August 21, 2024

Just tried but unfortunately I always get the same error:
/usr/local/bin/python2 acvtool.py instrument /Users/user/Desktop/single-dex/ardash.lato_1001006.apk --wd wd ─╯

Working directory exists and may contain data: wd
Overwrite (y/n)? y

Exception in "main" thread brut.androlib.AndrolibException: Invalid chunk type: expected=0x00000200, got=0x00000206
	a brut.androlib.res.decoder.ARSCDecoder.checkChunkType(ARSCDecoder.java:542)
	a brut.androlib.res.decoder.ARSCDecoder.readTablePackage(ARSCDecoder.java:88)
	a brut.androlib.res.decoder.ARSCDecoder.readTableHeader(ARSCDecoder.java:82)
	a brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:48)
	a brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibResources.java:786)
	a brut.androlib.res.AndrolibResources.loadFrameworkPkg(AndrolibResources.java:123)
	a brut.androlib.res.data.ResTable.getPackage(ResTable.java:84)
	a brut.androlib.res.data.ResTable.getResSpec(ResTable.java:67)
	a brut.androlib.res.data.ResTable.getResSpec(ResTable.java:63)
	a brut.androlib.res.data.value.ResReferenceValue.getReferent(ResReferenceValue.java:62)
	a brut.androlib.res.data.value.ResReferenceValue.referentIsNull(ResReferenceValue.java:73)
	at brut.androlib.res.data.value.ResStyleValue.serializeToResValuesXml(ResStyleValue.java:49)
	at brut.androlib.res.AndrolibResources.generateValuesFile(AndrolibResources.java:742)
	at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:263)
	at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:129)
	at brut.androlib.ApkDecoder.decode(ApkDecoder.java:124)
	at brut.apktool.Main.cmdDecode(Main.java:170)
	a brut.apktool.Main.main(Main.java:76)

The execution failed!
decompiled ardash.side
parsing wd/apktool/ardash.side/smali...
saved instrumented smali: wd/apktool/ardash.side/smali...
saved pickle file: wd/metadata/ardash.side_1001006.pickle
instrumented
brut.directory.PathNotExist: apktool.yml

built
Traceback (last call):
  "acvtool.py" file, 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 "/Users/user/Desktop/acvtool/smiler/instrumenting/utils.py", line 107, in wrapper
    result = method(*args, **kwargs)
  File "/Users/user/Desktop/acvtool/smiler/smiler.py", line 186, in instrument_apk
    sign_align_apk(instrumented_package_path, instrumented_apk_path)
  File "/Users/user/Desktop/acvtool/smiler/smiler.py", line 277, in sign_align_apk
    request_pipe(align_cmd)
  File "/Users/user/Desktop/acvtool/smiler/smiler.py", line 47, in request_pipe
    Out: %sEntry in error: %s" % (out, err))
Exception: ----------------------------------------------------
Out:
Error: Unable to open 'wd/ardash.lato_1001006.apk' as a zip archive 

Sorry to be wasting your time but I am very curious to try it out

from acvtool.

pilgun avatar pilgun commented on August 21, 2024

looks like this is apktool issue, try to repackage only with apktool

> java -jar acv_repo/smiler/libs/jars/apktool_2.4.1.jar d /Users/user/Desktop/single-dex/pl.sanszo.pcis_2.apk -o output
> java -jar acv_repo/smiler/libs/jars/apktool_2.4.1.jar b output -o test.apk

If you get the same error you may run:

> java -jar apktool_2.4.1.jar empty-framework-dir --force

from acvtool.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.