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
ffe508a1
Commit
ffe508a1
authored
Dec 21, 2023
by
fuyanbin
Browse files
拷贝文件
parent
30037e84
Changes
1
Show whitespace changes
Inline
Side-by-side
pack.sh
View file @
ffe508a1
...
@@ -7,16 +7,6 @@ zipname=$(basename "$zippath")
...
@@ -7,16 +7,6 @@ zipname=$(basename "$zippath")
build_dir
=
$(
mktemp
-d
./tmp.XXXXX
)
build_dir
=
$(
mktemp
-d
./tmp.XXXXX
)
systemfile
=
"
$build_dir
/system.PARTITION"
systemfile
=
"
$build_dir
/system.PARTITION"
systemfile_ext4
=
"
$build_dir
/system.PARTITION.ext4"
systemfile_ext4
=
"
$build_dir
/system.PARTITION.ext4"
smallprcfile
=
"
$(
pwd
)
/services/smallp.rc"
starthugepfile
=
"
$(
pwd
)
/services/starthugep.sh"
uninstallpkgrc
=
"
$(
pwd
)
/services/uninstallpkg.rc"
uninstallpkgfile
=
"
$(
pwd
)
/services/uninstallpkg.sh"
setmacrc
=
"
$(
pwd
)
/services/setmac.rc"
setmacfile
=
"
$(
pwd
)
/services/set-mac.sh"
startthirdpartyrc
=
"
$(
pwd
)
/services/startthirdparty.rc"
startthirdpartyfile
=
"
$(
pwd
)
/services/startthirdparty.sh"
hugepstartfile
=
"
$(
pwd
)
/services/hugepstart.sh"
aml_image_v2_packer
-d
"
$img
"
"./
$build_dir
"
aml_image_v2_packer
-d
"
$img
"
"./
$build_dir
"
if
file
"
$systemfile
"
|
grep
"Android sparse image"
if
file
"
$systemfile
"
|
grep
"Android sparse image"
...
@@ -32,27 +22,19 @@ sudo mount "$loopdev" "$build_dir/system"
...
@@ -32,27 +22,19 @@ sudo mount "$loopdev" "$build_dir/system"
sudo touch
"
$build_dir
/system/.androidrom"
sudo touch
"
$build_dir
/system/.androidrom"
sudo
wget
-P
"
$build_dir
/system/"
-O
"
$build_dir
/system/bin/hugep-all.zip"
if
[[
-n
"
$zippath
"
]]
then
sudo chmod
777
"
$starthugepfile
"
sudo
wget
"
$zippath
"
-O
"
$build_dir
/system/bin/hugep-all.zip"
sudo cp
-f
"
$smallprcfile
"
"
$build_dir
/system/etc/init/"
fi
sudo cp
-f
"
$starthugepfile
"
"
$build_dir
/system/bin/"
sudo chcon
u:object_r:drmserver_exec:s0
"
$build_dir
/system/bin/
$(
basename
"
$starthugepfile
"
)
"
sudo cp
-f
"
$uninstallpkgrc
"
"
$build_dir
/system/etc/init"
sudo cp
-f
"
$uninstallpkgfile
"
"
$build_dir
/system/bin"
sudo chcon
u:object_r:drmserver_exec:s0
"
$build_dir
/system/bin/
$(
basename
"
$uninstallpkgfile
"
)
"
sudo cp
-f
"
$setmacrc
"
"
$build_dir
/system/etc/init"
sudo cp
-f
"
$setmacfile
"
"
$build_dir
/system/bin"
sudo chcon
u:object_r:drmserver_exec:s0
"
$build_dir
/system/bin/
$(
basename
"
$setmacfile
"
)
"
sudo cp
-f
"
$startthirdpartyrc
"
"
$build_dir
/system/etc/init"
sudo
find ./services/
-type
f
-name
"*.rc"
-exec
install
-t
"
$build_dir
"
/system/etc/init/
{}
\;
sudo cp
-f
"
$startthirdpartyfile
"
"
$build_dir
/system/bin"
sudo
find ./services/
-type
f
!
-name
"*.rc"
-exec
install
-m
0777
-t
"
$build_dir
"
/system/bin/
{}
\;
sudo chcon
u:object_r:drmserver_exec:s0
"
$build_dir
/system/bin/
$(
basename
"
$startthirdpartyfile
"
)
"
for
file
in
$(
find ./services/
-type
f
!
-name
"*.rc"
)
do
sudo chcon
u:object_r:drmserver_exec:s0
"
$build_dir
/system/bin/
$(
basename
"
$file
"
)
"
done
sudo cp
-f
"
$hugepstartfile
"
"
$build_dir
/system/bin"
rm
-f
"
$build_dir
/system/hugep-all.zip"
sudo chcon
u:object_r:drmserver_exec:s0
"
$build_dir
/system/bin/
$(
basename
"
$hugepstartfile
"
)
"
sudo
umount
"
$loopdev
"
sudo
umount
"
$loopdev
"
sudo
losetup
-d
"
$loopdev
"
sudo
losetup
-d
"
$loopdev
"
...
@@ -66,4 +48,4 @@ then
...
@@ -66,4 +48,4 @@ then
rm
-f
"
$systemfile_ext4
"
rm
-f
"
$systemfile_ext4
"
fi
fi
aml_image_v2_packer
-r
"./
$build_dir
/image.cfg"
"
$build_dir
"
"
$(
basename
"
$img
"
)
"
aml_image_v2_packer
-r
"./
$build_dir
/image.cfg"
"
$build_dir
"
"
$(
basename
"
$img
"
)
"
rm
-rf
"./
$build_dir
/"
sudo
rm
-rf
"./
$build_dir
/"
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