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
3fcd85b6
Commit
3fcd85b6
authored
Sep 09, 2024
by
fuyanbin
Browse files
统一判断system file是否为sparse格式的方式
parent
921fb7d7
Changes
1
Show whitespace changes
Inline
Side-by-side
pack-ci.sh
View file @
3fcd85b6
...
...
@@ -204,7 +204,7 @@ unpack_and_mount_image() {
__unpack_super_img
"
$ROCKCHIP_DEFAULT_SYSTEM_PARTITION_NAME
"
fi
if
file
"
$systemfile
"
|
grep
"Android sparse image"
if
__is_sparse_system
then
simg2img
"
$systemfile
"
"
$systemfile_ext4
"
loopdev
=
$(
losetup
-P
-f
--show
"
$systemfile_ext4
"
)
...
...
@@ -421,6 +421,15 @@ __get_chip_from_parameter() {
printf
"%s"
"
$parameter
"
}
__is_sparse_system
()
{
if
file
"
$systemfile
"
|
grep
"Android sparse image"
then
return
0
else
return
1
fi
}
pack_image
()
{
local
img
img
=
"
$1
"
...
...
@@ -429,7 +438,7 @@ pack_image() {
rm
-rf
"
$system_mount_point
"
sync
if
[[
-f
"
$systemfile_ext4
"
]]
if
__is_sparse_system
then
rm
-f
"
$systemfile
"
img2simg
"
$systemfile_ext4
"
"
$systemfile
"
...
...
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