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

docs: Improve troubleshooting solutions #1543

Merged
merged 5 commits into from
Dec 22, 2023

Conversation

raxod502
Copy link
Contributor

@raxod502 raxod502 commented Dec 2, 2023

Document advice that could help users troubleshoot issues like #1493 and #1511 and https://github.com/ReVanced/revanced-patches-template/issues/114 without needing to contact support.

@raxod502 raxod502 mentioned this pull request Dec 2, 2023
4 tasks
docs/3_troubleshooting.md Outdated Show resolved Hide resolved
- ❗️ Error code `135`, `139` or `1` when patching the app

You may be trying to patch a split APK. This is common with the YouTube app. You can visit APKMirror to download an alternate version of the app that is not split (the `bundle` label means it is split) and install it.
Copy link
Member

@oSumAtrIX oSumAtrIX Dec 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ReVanced in itself has nothing to do with APKMirror as to why we should not state any opinion, such as visiting their site. It is the user's responsibility to source APK files, a precondition also stated in the documentation of ReVanced Manager.

We should not mention any specific apps because ReVanced is agnostic, so the documentation must also apply to any app.

E.g.:

You may be patching a split APK (also referred to as an "Android App Bundle"). In certain instances, this can lead to compilation errors. In such scenarios, it is advisable to patch a full APK instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How can the user tell whether the APK they have is a split APK? If we don't explain how to make this determination via APKMirror, then we should provide some other explanation.

It is the user's responsibility to source APK files, a precondition also stated in the documentation of ReVanced Manager.

Sorry, I looked for the place in the documentation where the requirement to use non-split APKs was mentioned, but I didn't manage to find it. Would you mind pointing me in the right direction?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How can the user tell whether the APK they have is a split APK?

You can add and reference a footnote to the term "split" to an external source in a similar fashion to how Wikipedia does. The determination should not be made using APKMirror. It may be a popular source of APK binaries but it is not connected with ReVanced whatsoever, whereas the official explanation of what a split APK is, is on the Android documentation website.

where the requirement to use non-split APKs was mentioned

You may have misunderstood what I said with:

It is the user's responsibility to source APK files, a precondition also stated in the documentation of ReVanced Manager.

Source: https://github.com/ReVanced/revanced-manager/blob/main/docs/2_1_patching.md#user-content-fn-1-0509e8ec511256471426023611fdf9d4 (first footnote)

This is not about split APK files. Split APK files can be patched in certain circumstances.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should not mention any specific apps because ReVanced is agnostic, so the documentation must also apply to any app.

Okay, I've updated the documentation to not mention YouTube, although I do feel that it would be helpful for ReVanced to document the requirements for what versions of apps it is able to patch (e.g., only the non-split version of YouTube can be patched, at least according to this comment).

You can add and reference a footnote to the term "split" to an external source in a similar fashion to how Wikipedia does

Okay, I've updated the documentation to use a footnote. Currently, it links to a Reddit post. I am happy to update this to point at some official Android documentation about how to tell whether an APK file is split or not, if any such documentation exists. I wasn't able to find any when I searched.

The determination should not be made using APKMirror

I'd love to know how the determination should be made, if not that way. This would surely be helpful information to other users, as well.

Split APK files can be patched in certain circumstances.

It would be very helpful to know what circumstances these are.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be very helpful to know what circumstances these are.

Primarily, patching resources limit us from properly supporting split APK file patching. Regardless, if you mount a resource-patched APK file, it may still work. In some specific known cases, either patching fails or the app crashes regardless of mounting.

Copy link
Member

@oSumAtrIX oSumAtrIX Dec 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd love to know how the determination should be made, if not that way. This would surely be helpful information to other users, as well.

The split APK architecture is simple. It works similarly to the dex architecture, where Android iterates over the entries in the zip file to search for a class that is yet to be loaded in a classloader. Similarily, Android queries the internals of an APK in multiple APK files. This means a split architecture is not identifiable in itself as they are regular APK files. What gives it away is, if the APK files miss required files such as dex or resource files. In this case, this implies wether an APK file is a split or not. Each APK file also has to include a manifest, which is encoded but contains the information regarding this as well. Sites such as APKMirror distribute proprietary formats for splits that archive the separate APK files in a single file intended to be installed with their proprietary installers.

@kitadai31
Copy link
Contributor

  • ❗️ Error code 135, 139 or 1 when patching the app

This section should be separated into Exit code 135 or 139 and Exit code 1.
Because the Exit code 1 has nothing to do with unsupported device issues.
(Error code 1 is usually caused by split apk, incorrect user input (like color codes in Theme patch), or a issue on the patch side.)

@oSumAtrIX
Copy link
Member

oSumAtrIX commented Dec 2, 2023

@kitadai31 Instead of splitting it into a separate section, simply mentioning both causes should be enough.

@raxod502 raxod502 force-pushed the rr-troubleshooting-advice branch from 186e13c to c3f0f3e Compare December 9, 2023 23:53
@raxod502
Copy link
Contributor Author

Instead of splitting it into a separate section, simply mentioning both causes should be enough

While I think having separate sections would be more informative, I have followed your suggestion here and updated the text accordingly.

docs/3_troubleshooting.md Outdated Show resolved Hide resolved
docs/3_troubleshooting.md Outdated Show resolved Hide resolved
docs/3_troubleshooting.md Outdated Show resolved Hide resolved
docs/3_troubleshooting.md Outdated Show resolved Hide resolved
@oSumAtrIX oSumAtrIX changed the title docs: more troubleshooting advice docs: Improve troubleshooting solutions Dec 10, 2023
@oSumAtrIX oSumAtrIX merged commit c06d15d into ReVanced:dev Dec 22, 2023
1 check passed
@raxod502 raxod502 deleted the rr-troubleshooting-advice branch December 22, 2023 04:55
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.

3 participants