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
a4c1ddd9
Commit
a4c1ddd9
authored
Aug 15, 2020
by
vvb2060
Committed by
John Wu
Aug 16, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use uid 2000 to install patched apk
parent
ddd51311
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
2 deletions
+11
-2
PatchAPK.kt
...src/main/java/com/topjohnwu/magisk/core/utils/PatchAPK.kt
+1
-2
manager.sh
app/src/main/res/raw/manager.sh
+10
-0
No files found.
app/src/main/java/com/topjohnwu/magisk/core/utils/PatchAPK.kt
View file @
a4c1ddd9
...
@@ -130,8 +130,7 @@ object PatchAPK {
...
@@ -130,8 +130,7 @@ object PatchAPK {
return
false
return
false
// Install the application
// Install the application
repack
.
setReadable
(
true
,
false
)
if
(!
Shell
.
su
(
"adb_pm_install $repack"
).
exec
().
isSuccess
)
if
(!
Shell
.
su
(
"pm install $repack"
).
exec
().
isSuccess
)
return
false
return
false
Config
.
suManager
=
pkg
.
toString
()
Config
.
suManager
=
pkg
.
toString
()
...
...
app/src/main/res/raw/manager.sh
View file @
a4c1ddd9
...
@@ -85,6 +85,16 @@ EOF
...
@@ -85,6 +85,16 @@ EOF
cd
/
cd
/
}
}
adb_pm_install
()
{
local
tmp
=
/data/local/tmp/patched.apk
cp
-f
"
$1
"
$tmp
chmod
644
$tmp
su 2000
-c
pm
install
$tmp
local
res
=
$?
rm
-f
$tmp
return
$res
}
check_boot_ramdisk
()
{
check_boot_ramdisk
()
{
# Create boolean ISAB
# Create boolean ISAB
[
-z
$SLOT
]
&&
ISAB
=
false
||
ISAB
=
true
[
-z
$SLOT
]
&&
ISAB
=
false
||
ISAB
=
true
...
...
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