Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
M
Magisk
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Magisk
Commits
6ecc04a4
Commit
6ecc04a4
authored
Jan 20, 2023
by
石松洲
Committed by
John Wu
Jan 22, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix auto install stub
parent
15a7e9af
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
13 deletions
+12
-13
package.cpp
native/src/core/package.cpp
+12
-13
No files found.
native/src/core/package.cpp
View file @
6ecc04a4
...
...
@@ -119,20 +119,19 @@ int get_manager(int user_id, string *pkg, bool install) {
};
if
(
skip_mgr_check
.
test_and_set
())
{
if
(
mgr_app_id
<
0
)
{
goto
not_found
;
}
// Just need to check whether the app is installed in the user
const
char
*
name
=
mgr_pkg
->
empty
()
?
JAVA_PACKAGE_NAME
:
mgr_pkg
->
data
();
ssprintf
(
app_path
,
sizeof
(
app_path
),
"%s/%d/%s"
,
APP_DATA_DIR
,
user_id
,
name
);
if
(
access
(
app_path
,
F_OK
)
==
0
)
{
// Always check dyn signature for repackaged app
if
(
!
mgr_pkg
->
empty
()
&&
!
check_dyn
(
user_id
))
if
(
mgr_app_id
>=
0
)
{
// Just need to check whether the app is installed in the user
const
char
*
name
=
mgr_pkg
->
empty
()
?
JAVA_PACKAGE_NAME
:
mgr_pkg
->
data
();
ssprintf
(
app_path
,
sizeof
(
app_path
),
"%s/%d/%s"
,
APP_DATA_DIR
,
user_id
,
name
);
if
(
access
(
app_path
,
F_OK
)
==
0
)
{
// Always check dyn signature for repackaged app
if
(
!
mgr_pkg
->
empty
()
&&
!
check_dyn
(
user_id
))
goto
not_found
;
if
(
pkg
)
*
pkg
=
name
;
return
user_id
*
AID_USER_OFFSET
+
mgr_app_id
;
}
else
{
goto
not_found
;
if
(
pkg
)
*
pkg
=
name
;
return
user_id
*
AID_USER_OFFSET
+
mgr_app_id
;
}
else
{
goto
not_found
;
}
}
}
else
{
// Here, we want to actually find the manager app and cache the results.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment