Skip to content

Load a legacy module into its own process again - #819

Merged
JingMatrix merged 3 commits into
masterfrom
legacy-self-scope
Jul 30, 2026
Merged

Load a legacy module into its own process again#819
JingMatrix merged 3 commits into
masterfrom
legacy-self-scope

Conversation

@JingMatrix

Copy link
Copy Markdown
Owner

A legacy module reports being active by hooking a method in its own app, so it has to be in its own scope before it can say anything at all. The View-era manager added that row on every save -- if (legacy) list.add(self) -- and hid it again on read. #796 dropped both halves: ScopeViewModel.apply writes the draft verbatim, and ConfigCache builds its scope map from the stored rows alone. Every legacy module has reported itself inactive since (#816).

ConfigCache now derives the scope during the rebuild, so configurations written by those builds need no repair and nothing that replaces the scope table can drop it again. Legacy is the loader's own verdict, the strategy FileSystem.loadModule settled on, so an API 101 module keeps its own process to itself. Insertions go through one helper, because a module can now reach the same process by more than one route.

A legacy module reports being active by hooking a method in its own app, so it
has to be in its own scope before it can say anything at all. The View-era
manager added that row on every save -- `if (legacy) list.add(self)` -- and hid
it again on read. #796 dropped both halves: ScopeViewModel.apply writes the
draft verbatim, and ConfigCache builds its scope map from the stored rows alone.
Every legacy module has reported itself inactive since (#816).

ConfigCache derives the scope during the rebuild now, so configurations written
by those builds need no repair and nothing that replaces the scope table can
drop it again. Legacy is the loader's own verdict, the strategy loadModule
settled on, so an API 101 module keeps its own process to itself. Insertions go
through one helper, because a module can now reach the same process by more than
one route.
The daemon derives a legacy module's own process while it rebuilds its
configuration, and nothing comes back from `getModuleScope` to say so. The
scope screen therefore drew the one row the module certainly hooks unticked --
and with the module filter at its default, did not draw it at all.

So the screen stamps that row itself. The manifest inspection it already runs
for the recommended scope yields the legacy verdict too, and the row it names
is exempt from every filter, ticked, grouped with what is in force rather than
with what is about to be written, and closed to the toggle and to both bulk
actions. It never enters the draft, so the apply bar cannot offer to write or
to delete a row the scope table does not own.

The manager reads the APK rather than asking. The loader's verdict is not on
the manager binder, and the daemon holds one only for a module it has already
loaded -- which is precisely not the state a module is in while its scope is
being chosen for the first time.
check_translations.py requires every locale to carry every string in
values/strings.xml, and both were English only. Each one follows the wording
its own file already uses for scope and for a module.
@JingMatrix
JingMatrix merged commit 676d8e2 into master Jul 30, 2026
1 check passed
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.

Modules report themselves inactive on Vector but activate on LSPosed

1 participant