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
54a8a05d
Commit
54a8a05d
authored
Feb 27, 2019
by
John Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Small adjustments in connect.cpp
parent
164a9968
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
connect.cpp
native/jni/su/connect.cpp
+5
-6
No files found.
native/jni/su/connect.cpp
View file @
54a8a05d
...
@@ -18,9 +18,9 @@
...
@@ -18,9 +18,9 @@
#include "su.h"
#include "su.h"
#define BROADCAST_REBOOT
_COMPLETED
\
#define BROADCAST_REBOOT \
"/system/bin/app_process", "/system/bin", "com.android.commands.am.Am", \
"/system/bin/app_process", "/system/bin", "com.android.commands.am.Am", \
"broadcast",
nullptr
, nullptr, "-a", "android.intent.action.REBOOT", \
"broadcast",
"-n"
, nullptr, "-a", "android.intent.action.REBOOT", \
"-f", "0x10000020"
"-f", "0x10000020"
static
inline
const
char
*
get_command
(
const
struct
su_request
*
to
)
{
static
inline
const
char
*
get_command
(
const
struct
su_request
*
to
)
{
...
@@ -34,7 +34,6 @@ static inline const char *get_command(const struct su_request *to) {
...
@@ -34,7 +34,6 @@ static inline const char *get_command(const struct su_request *to) {
static
void
silent_run
(
const
char
**
args
,
struct
su_info
*
info
)
{
static
void
silent_run
(
const
char
**
args
,
struct
su_info
*
info
)
{
char
component
[
128
];
char
component
[
128
];
sprintf
(
component
,
"%s/a.h"
,
info
->
str
[
SU_MANAGER
]);
sprintf
(
component
,
"%s/a.h"
,
info
->
str
[
SU_MANAGER
]);
args
[
4
]
=
"-n"
;
args
[
5
]
=
component
;
args
[
5
]
=
component
;
exec_t
exec
{
exec_t
exec
{
.
pre_exec
=
[]()
->
void
{
.
pre_exec
=
[]()
->
void
{
...
@@ -80,7 +79,7 @@ void app_log(struct su_context *ctx) {
...
@@ -80,7 +79,7 @@ void app_log(struct su_context *ctx) {
sprintf
(
policy
,
"%d"
,
ctx
->
info
->
access
.
policy
);
sprintf
(
policy
,
"%d"
,
ctx
->
info
->
access
.
policy
);
const
char
*
cmd
[]
=
{
const
char
*
cmd
[]
=
{
BROADCAST_REBOOT
_COMPLETED
,
BROADCAST_REBOOT
,
"--user"
,
user
,
"--user"
,
user
,
"--es"
,
"action"
,
"log"
,
"--es"
,
"action"
,
"log"
,
"--ei"
,
"from.uid"
,
fromUid
,
"--ei"
,
"from.uid"
,
fromUid
,
...
@@ -107,7 +106,7 @@ void app_notify(struct su_context *ctx) {
...
@@ -107,7 +106,7 @@ void app_notify(struct su_context *ctx) {
sprintf
(
policy
,
"%d"
,
ctx
->
info
->
access
.
policy
);
sprintf
(
policy
,
"%d"
,
ctx
->
info
->
access
.
policy
);
const
char
*
cmd
[]
=
{
const
char
*
cmd
[]
=
{
BROADCAST_REBOOT
_COMPLETED
,
BROADCAST_REBOOT
,
"--user"
,
user
,
"--user"
,
user
,
"--es"
,
"action"
,
"notify"
,
"--es"
,
"action"
,
"notify"
,
"--ei"
,
"from.uid"
,
fromUid
,
"--ei"
,
"from.uid"
,
fromUid
,
...
@@ -122,7 +121,7 @@ void app_connect(const char *socket, struct su_info *info) {
...
@@ -122,7 +121,7 @@ void app_connect(const char *socket, struct su_info *info) {
setup_user
(
user
,
info
);
setup_user
(
user
,
info
);
const
char
*
cmd
[]
=
{
const
char
*
cmd
[]
=
{
BROADCAST_REBOOT
_COMPLETED
,
BROADCAST_REBOOT
,
"--user"
,
user
,
"--user"
,
user
,
"--es"
,
"action"
,
"request"
,
"--es"
,
"action"
,
"request"
,
"--es"
,
"socket"
,
socket
,
"--es"
,
"socket"
,
socket
,
...
...
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