Skip to content

Modify extension bytecode to fix SimpleDateFormat cannot parse errors #149

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

Merged
merged 1 commit into from
Jul 29, 2021

Conversation

Syer10
Copy link
Collaborator

@Syer10 Syer10 commented Jun 26, 2021

This PR fixes unparsable date errors, such as the ones from NHentai, by doing this process:

  1. Waits for Dex2Jar to decode the apk into a valid Jar file
  2. Loads all classes in the Jar file as ByteArrays
  3. Uses Java ASM to read the ByteArrays as Bytecode
  4. Changes all references from java.text.SimpleDateFormat to xyz.nulldev.androidcompat.replace.SimpleDateFormat
  5. Writes the new Bytecode as ByteArrays
  6. Loads all non-class files from the Jar
  7. Writes the new Jar into the same place it loaded from

Also:
Fixes mass testing
Cleans up a bit of the build.gradle.kts's
Fix Tsuki by setting a http.agent system property

@AriaMoradi AriaMoradi merged commit 863dccb into Suwayomi:master Jul 29, 2021
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.

2 participants