Skip to content

Probe the original apk for the AppComponentFactory it declares - #121

Open
JingMatrix wants to merge 1 commit into
masterfrom
appcomponentfactory-probe
Open

Probe the original apk for the AppComponentFactory it declares#121
JingMatrix wants to merge 1 commit into
masterfrom
appcomponentfactory-probe

Conversation

@JingMatrix

Copy link
Copy Markdown
Owner

The check for a declared AppComponentFactory ran against the outer apk's class loader. Unless the patch injected the dex, that apk holds only the metaloader stub, so the class was never found and every app declaring a factory silently lost it -- the framework fell back to the default one. Probe the extracted original apk through a throwaway loader instead. loadClass resolves without running the static initializer, so a factory whose <clinit> is an anti-tamper gate still waits for realizeLoadedApk. A packed app that names a factory it does not ship is still dropped.

The check for a declared AppComponentFactory ran against the outer apk's
class loader. Unless the patch injected the dex, that apk holds only the
metaloader stub, so the class was never found and every app declaring a
factory silently lost it -- the framework fell back to the default one.
Probe the extracted original apk through a throwaway loader instead.
loadClass resolves without running the static initializer, so a factory
whose <clinit> is an anti-tamper gate still waits for realizeLoadedApk.
A packed app that names a factory it does not ship is still dropped.
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.

1 participant