Fix for compatibility API 33 (Android 13) #5
+135
−69
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces several changes to the
HookMain
class in thetw.idv.palatis.xappdebug.xposed
package. The purpose of these changes is to improve compatibility and functionality for debugging applications on different Android versions.Updated PackageManagerService Class:
IS_TIRAMISU_OR_LATER
to check if the Android version is TIRAMISU or later.PM_CLASS
constant to use the appropriate PackageManagerService class based on the Android version.Modified Method Hooking:
getPackageInfo
,getApplicationInfo
, andgetInstalledApplicationsListInternal
method hooks with updated versions.long.class
for flags.Refactored Debuggable Check:
checkAndMakeDebuggable
to handle the debuggable check and flag setting for anApplicationInfo
object.FLAG_DEBUGGABLE
flag onApplicationInfo
objects.PackageInfo
orApplicationInfo
object to perform the debuggable check and flag assignment.Additional Debugging Check:
ApplicationInfo
object before performing the debuggable check in thegetPackageInfo
andgetApplicationInfo
hooks.ApplicationInfo
object is null correctly, preventing potential crashes.Compatibility with Multiple Android Versions:
Code Formatting and Documentation:
These changes enhance the compatibility and functionality of the
HookMain
class across different Android versions, ensuring proper debuggable flag assignment and improving the overall robustness of the codebase.