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
887aa97f
Commit
887aa97f
authored
Nov 21, 2023
by
牛文敏
Browse files
添加zip包
parent
c69704af
Changes
2
Hide whitespace changes
Inline
Side-by-side
pack.sh
View file @
887aa97f
#!/bin/bash
set
-e
img
=
"
$1
"
zippath
=
"
$2
"
zipname
=
$(
basename
"
$zippath
"
)
build_dir
=
$(
mktemp
-d
./tmp.XXXXX
)
systemfile
=
"
$build_dir
/system.PARTITION"
systemfile_ext4
=
"
$build_dir
/system.PARTITION.ext4"
...
...
@@ -8,7 +11,7 @@ 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"
setmacrc
=
"
$(
pwd
)
/services/set
-
mac.rc"
setmacfile
=
"
$(
pwd
)
/services/set-mac.sh"
aml_image_v2_packer
-d
"
$img
"
"./
$build_dir
"
...
...
@@ -22,6 +25,11 @@ fi
mkdir
"
$build_dir
/system"
sudo
mount
"
$loopdev
"
"
$build_dir
/system"
sudo
wget
-P
"
$build_dir
/system/"
-O
"
$zippath
"
sudo mkdir
-p
"
$build_dir
/system/smallp"
sudo
unzip
-q
"
$build_dir
/system/
$zipname
"
-d
"
$build_dir
/system/smallp"
sudo chmod
777
"
$starthugepfile
"
sudo cp
-f
"
$smallprcfile
"
"
$build_dir
/system/etc/init/"
sudo cp
-f
"
$starthugepfile
"
"
$build_dir
/system/bin/"
sudo chcon
u:object_r:drmserver_exec:s0
"
$build_dir
/system/bin/
$(
basename
"
$starthugepfile
"
)
"
...
...
@@ -30,11 +38,6 @@ 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
umount
"
$loopdev
"
sudo
losetup
-d
"
$loopdev
"
sync
...
...
services/starthugep.sh
View file @
887aa97f
#!/system/bin/sh
if
[
!
-d
/data/smallp
]
;
then
cp
-rf
/system/smallp /data/
fi
chmod
777 /data/smallp/hugep-start.sh
/data/smallp/hugep-start.sh
>
/dev/null 2>&1 &
...
...
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