This repository has been archived by the owner on Jan 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Module Scope
vvb2060 edited this page May 7, 2022
·
1 revision
Module scopes are required in LSPosed to activate a module. Of course, user can select their own scope for a specific module, but it's too advance for a user to determine the real module scope. So in LSPosed, a new meta-data is introduced for module developers to declare its scope.
If a module wants to hook package com.example.a
and com.example.b
, in AndroidManifest.xml
, a meta-data named xposedscope
should be defined as:
<meta-data
android:name="xposedscope"
android:resource="@array/example_scope" />
And in array.xml
, a string array named example_scope
(this name could be arbitrarily changed) should be defined as:
<string-array name="example_scope" >
<item>com.example.a</item>
<item>com.example.b</item>
</string-array>
If no alternative resources, can hardcode it:
<meta-data
android:name="xposedscope"
android:value="com.example.a;com.example.b" />
By defining such a meta-data, all apps within this array will be selected by default when the module is enabled in the manager.
LSPosed Official Wiki