Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
付燕斌
android-image-pack-tool
Commits
30dadc7d
Commit
30dadc7d
authored
Sep 09, 2024
by
fuyanbin
Browse files
fix: 重新pack super后 system 内的selinux标识消失
parent
c3ea36ff
Changes
1
Show whitespace changes
Inline
Side-by-side
pack-ci.sh
View file @
30dadc7d
...
...
@@ -142,7 +142,7 @@ resize_system_image() {
__unpack_super_img
()
{
local
system_partition_name
=
"
$1
"
if
file
"
$super_file
"
|
grep
"Android sparse image"
if
__is_sparse_super
then
simg2img
"
$super_file
"
"
$super_file_ext4
"
lpunpack
"
$super_file_ext4
"
"
$super_img_tmp_dir
"
...
...
@@ -295,7 +295,7 @@ install_dianxin() {
find ./services/
-type
f
!
-name
"*.rc"
!
-name
"*.zip"
!
-name
"hugep"
!
-name
"hugep-start.sh"
-exec
install
-m
0777
-t
"
$system_path
"
/bin/
{}
\;
for
file
in
$(
find ./services/
-type
f
!
-name
"*.rc"
!
-name
"*.zip"
!
-name
"*.zip"
!
-name
"hugep"
!
-name
"hugep-start.sh"
)
for
file
in
$(
find ./services/
-type
f
!
-name
"*.rc"
!
-name
"*.zip"
!
-name
"hugep"
!
-name
"hugep-start.sh"
)
do
chcon
u:object_r:drmserver_exec:s0
"
$system_path
/bin/
$(
basename
"
$file
"
)
"
done
...
...
@@ -308,10 +308,19 @@ install_dianxin() {
pack_image
"
$img
"
}
__is_sparse_super
()
{
if
file
"
$super_file
"
|
grep
"Android sparse image"
then
return
0
else
return
1
fi
}
__pack_super_img
()
{
local
system_partition_name
=
"
$1
"
local
c_super_file
if
[[
-f
"
$super_file_ext4
"
]]
if
__is_sparse_super
then
c_super_file
=
"
$super_file_ext4
"
else
...
...
@@ -328,14 +337,20 @@ __pack_super_img() {
"
$c_group_name
"
\
"
$systemfile
"
if
[[
-f
"
$super_file_ext4
"
]]
if
__is_sparse_super
then
img2simg
"
$super_file_ext4
"
"
$super_file
"
rm
-rf
"
$super_file_ext4
"
fi
else
repack.sh
"
$c_super_file
"
"
$c_group_name
"
"
$systemfile
"
"
$system_partition_name
"
mv
"
$(
dirname
"
$c_super_file
"
)
/super.new.img"
"
$c_super_file
"
if
__is_sparse_super
then
mv
"
$(
dirname
"
$c_super_file
"
)
/super.new.img"
"
$super_file
"
else
simg2img
"
$(
dirname
"
$c_super_file
"
)
/super.new.img"
"
$super_file
"
rm
-f
"
$(
dirname
"
$c_super_file
"
)
/super.new.img"
fi
fi
}
...
...
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