chenxiaolong / deodexer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

add_dex_files_to_zip failing because of prefix

1ex opened this issue · comments

commented

I tried to use deodexer.py via command line and it gives this exception Found unknown file in dex dir: for every single apk.

I did some debug on script and figured out that this line cause issue:

prefix = pathlib.Path(used_vdex).stem + '.apk_'

it cause fail inside add_dex_files_to_zip function

This condition will always fail

if not p.name.startswith(prefix):

for example i am deodexing Settings.apk then :

p.name = "Settings_classes.dex"
and
prefix = "Settings.apk_"
which is always failing

P.S.
removing + '.apk_' from this line

prefix = pathlib.Path(used_vdex).stem + '.apk_'

makes fix for me