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

Issue dex #2262

Closed
wants to merge 2 commits into from
Closed

Issue dex #2262

wants to merge 2 commits into from

Conversation

CrazyLeoJay
Copy link

因为Android 10 不允许设备获取imei,所以,设备厂商推出获取oaid作为替代方案,但是在接入获取设备id的SDK包以后, apktool解压时发生错误,意为在asset下有一个 A3AEECD8.dex 的文件,并不能被反编译,而且也不需要反编译。

所以我做了修改,默认不进行递归解压,在一般情况下,只需要反编译根目录下的 classes.dex 即可。

还有我使用了idea的代码格式化工具,导致项目代码的一些顺序发生了变化。重点在184行。望采纳。

@realityJie
Copy link

realityJie commented Dec 26, 2019

1、A3AEECD8.dex反编译出错是因为它根本就不是一个dex文件,你可以使用file命令看看。
2、apktool对dex反编译的设计是,默认反编译所有dex文件。如果只想反编译根目录的dex文件,可以带上--only-main-classes参数。
3、--only-main-classes2.4.1前的版本有bug,你可以看这个#2226
4、请用英文,对大家友好一点。

  1. A3AEECD8.dex decompilation error is because it is not a dex file at all, you can use file command to see.
  2. The design of apktool for dex decompilation is to decompile all dex files by default. If you only want to decompile the dex file in the root directory, you can bring the --only-main-classes parameter.
  3. --only-main-classes has bugs in versions before 2.4.1, you can see this fix bug of Unrecognized option: --only-main-classes #2226
  4. Please use English and be kind to everyone.

@iBotPeaches
Copy link
Owner

Thanks for the PR, but a lot more than just this changed happened and I believe the intended fix is already here as --only-main-classes.

@CrazyLeoJay
Copy link
Author

英文比较差,感谢你的回答,以后会尽可能加上英文。
My English is bad,Thanks for your answer.I will try to add English in the future.

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

Successfully merging this pull request may close these issues.

None yet

3 participants