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
27814e30
Commit
27814e30
authored
Oct 09, 2021
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor Zygisk API changes
parent
f59309a4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
api.hpp
native/jni/zygisk/api.hpp
+8
-8
No files found.
native/jni/zygisk/api.hpp
View file @
27814e30
// All content of this file is released to the public domain.
// This file is the public API for Zygisk modules, and should always be updated in sync with:
// This file is the public API for Zygisk modules.
// DO NOT use this file for developing Zygisk modules as it might contain WIP changes.
// Always use the following header for development as those are finalized APIs:
// https://github.com/topjohnwu/zygisk-module-sample/blob/master/module/jni/zygisk.hpp
#pragma once
...
...
@@ -162,7 +164,7 @@ struct Api {
//
// The unmounting does not happen immediately after the function is called. It is actually
// done during app process specialization.
void
forceDeny
l
istUnmount
();
void
forceDeny
L
istUnmount
();
// Hook JNI native methods for a class
//
...
...
@@ -220,14 +222,12 @@ struct module_abi {
long
api_version
;
ModuleBase
*
_this
;
void
(
*
onLoad
)(
ModuleBase
*
,
Api
*
,
JNIEnv
*
);
void
(
*
preAppSpecialize
)(
ModuleBase
*
,
AppSpecializeArgs
*
);
void
(
*
postAppSpecialize
)(
ModuleBase
*
,
const
AppSpecializeArgs
*
);
void
(
*
preServerSpecialize
)(
ModuleBase
*
,
ServerSpecializeArgs
*
);
void
(
*
postServerSpecialize
)(
ModuleBase
*
,
const
ServerSpecializeArgs
*
);
module_abi
(
ModuleBase
*
module
)
:
api_version
(
ZYGISK_API_VERSION
),
_this
(
module
)
{
onLoad
=
[](
auto
self
,
auto
api
,
auto
env
)
{
self
->
onLoad
(
api
,
env
);
};
preAppSpecialize
=
[](
auto
self
,
auto
args
)
{
self
->
preAppSpecialize
(
args
);
};
postAppSpecialize
=
[](
auto
self
,
auto
args
)
{
self
->
postAppSpecialize
(
args
);
};
preServerSpecialize
=
[](
auto
self
,
auto
args
)
{
self
->
preServerSpecialize
(
args
);
};
...
...
@@ -248,12 +248,12 @@ struct api_table {
// Zygisk functions
int
(
*
connectCompanion
)(
void
*
/* _this */
);
void
(
*
forceDeny
l
istUnmount
)(
void
*
/* _this */
);
void
(
*
forceDeny
L
istUnmount
)(
void
*
/* _this */
);
};
template
<
class
T
>
void
entry_impl
(
api_table
*
table
,
JNIEnv
*
env
)
{
auto
module
=
new
T
();
ModuleBase
*
module
=
new
T
();
if
(
!
table
->
registerModule
(
table
,
new
module_abi
(
module
)))
return
;
auto
api
=
new
Api
();
...
...
@@ -266,8 +266,8 @@ void entry_impl(api_table *table, JNIEnv *env) {
int
Api
::
connectCompanion
()
{
return
impl
->
connectCompanion
(
impl
->
_this
);
}
void
Api
::
forceDeny
l
istUnmount
()
{
impl
->
forceDeny
l
istUnmount
(
impl
->
_this
);
void
Api
::
forceDeny
L
istUnmount
()
{
impl
->
forceDeny
L
istUnmount
(
impl
->
_this
);
}
void
Api
::
hookJniNativeMethods
(
const
char
*
className
,
JNINativeMethod
*
methods
,
int
numMethods
)
{
impl
->
hookJniNativeMethods
(
className
,
methods
,
numMethods
);
...
...
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