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

dex2jar only includes class files in the converted jar #31

Open
AriaMoradi opened this issue Mar 5, 2023 · 1 comment
Open

dex2jar only includes class files in the converted jar #31

AriaMoradi opened this issue Mar 5, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@AriaMoradi
Copy link

AriaMoradi commented Mar 5, 2023

I have this apk: tachiyomi-zh.copymanga-v1.3.48.zip

The contents are:

$ unzip tachiyomi-zh.copymanga-v1.3.48.apk 
Archive:  tachiyomi-zh.copymanga-v1.3.48.apk
  inflating: META-INF/com/android/build/gradle/app-metadata.properties  
  inflating: classes.dex             
  inflating: kotlin-tooling-metadata.json  
  inflating: simp.txt                
  inflating: simplified.txt          
  inflating: AndroidManifest.xml     
 extracting: res/CG.png              
 extracting: res/D2.png              
 extracting: res/SD.png              
 extracting: res/jy.png              
 extracting: res/u3.png              
 extracting: resources.arsc          
  inflating: META-INF/CERT.SF        
  inflating: META-INF/CERT.RSA       
  inflating: META-INF/MANIFEST.MF 

Part of the code inside the apk is using this library: https://github.com/luhuiguo/chinese-utils/blob/master/src/main/java/com/luhuiguo/chinese/Converter.java#L49 and the stacktrace is available at Suwayomi/Suwayomi-Server#512 (comment)

That library requires to load resource file /simp.txt or /simplified.txt but these are not included in the converted jar.

We are converting dex2jar via this function: https://github.com/Suwayomi/Tachidesk-Server/blob/master/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/util/PackageTools.kt#L53

Is there something we can do to make dex2jar include non-class files as well?

@ThexXTURBOXx
Copy link
Owner

I don't think, it's possible as of now. A short workaround would be to either use APKTool for that (if some of them are encoded, such as AndroidManifest.xml) or just unzipping them using Java APIs for that, such as ZipOutputStream

@ThexXTURBOXx ThexXTURBOXx added the enhancement New feature or request label Mar 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants