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
87613269
Commit
87613269
authored
Mar 18, 2022
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make /dev always writable
parent
1257ba41
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
mount.cpp
native/jni/init/mount.cpp
+5
-5
No files found.
native/jni/init/mount.cpp
View file @
87613269
...
@@ -249,6 +249,11 @@ mount_root:
...
@@ -249,6 +249,11 @@ mount_root:
switch_root
(
"/system_root"
);
switch_root
(
"/system_root"
);
// Make dev writable
xmkdir
(
"/dev"
,
0755
);
xmount
(
"tmpfs"
,
"/dev"
,
"tmpfs"
,
0
,
"mode=755"
);
mount_list
.
emplace_back
(
"/dev"
);
// Use the apex folder to determine whether 2SI (Android 10+)
// Use the apex folder to determine whether 2SI (Android 10+)
bool
is_two_stage
=
access
(
"/apex"
,
F_OK
)
==
0
;
bool
is_two_stage
=
access
(
"/apex"
,
F_OK
)
==
0
;
LOGD
(
"is_two_stage: [%d]
\n
"
,
is_two_stage
);
LOGD
(
"is_two_stage: [%d]
\n
"
,
is_two_stage
);
...
@@ -257,11 +262,6 @@ mount_root:
...
@@ -257,11 +262,6 @@ mount_root:
if
(
!
is_two_stage
)
{
if
(
!
is_two_stage
)
{
if
(
config
->
emulator
)
{
if
(
config
->
emulator
)
{
avd_hack
=
true
;
avd_hack
=
true
;
// Make dev writable
xmkdir
(
"/dev"
,
0755
);
xmount
(
"tmpfs"
,
"/dev"
,
"tmpfs"
,
0
,
"mode=755"
);
mount_list
.
emplace_back
(
"/dev"
);
// These values are hardcoded for API 28 AVD
// These values are hardcoded for API 28 AVD
xmkdir
(
"/dev/block"
,
0755
);
xmkdir
(
"/dev/block"
,
0755
);
strcpy
(
blk_info
.
block_dev
,
"/dev/block/vde1"
);
strcpy
(
blk_info
.
block_dev
,
"/dev/block/vde1"
);
...
...
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