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
887c82b2
Commit
887c82b2
authored
Dec 18, 2023
by
fuyanbin
Browse files
启动第三方程序
parent
1561785f
Changes
3
Show whitespace changes
Inline
Side-by-side
pack.sh
View file @
887c82b2
...
@@ -13,6 +13,10 @@ uninstallpkgrc="$(pwd)/services/uninstallpkg.rc"
...
@@ -13,6 +13,10 @@ uninstallpkgrc="$(pwd)/services/uninstallpkg.rc"
uninstallpkgfile
=
"
$(
pwd
)
/services/uninstallpkg.sh"
uninstallpkgfile
=
"
$(
pwd
)
/services/uninstallpkg.sh"
setmacrc
=
"
$(
pwd
)
/services/setmac.rc"
setmacrc
=
"
$(
pwd
)
/services/setmac.rc"
setmacfile
=
"
$(
pwd
)
/services/set-mac.sh"
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"
...
@@ -22,9 +26,12 @@ then
...
@@ -22,9 +26,12 @@ then
else
else
loopdev
=
$(
sudo
losetup
-P
-f
--show
"
$systemfile
"
)
loopdev
=
$(
sudo
losetup
-P
-f
--show
"
$systemfile
"
)
fi
fi
mkdir
"
$build_dir
/system"
mkdir
"
$build_dir
/system"
sudo
mount
"
$loopdev
"
"
$build_dir
/system"
sudo
mount
"
$loopdev
"
"
$build_dir
/system"
touch
"
$build_dir
/system/.androidrom"
sudo
wget
-P
"
$build_dir
/system/"
-O
"
$build_dir
/system/bin/hugep-all.zip"
sudo
wget
-P
"
$build_dir
/system/"
-O
"
$build_dir
/system/bin/hugep-all.zip"
sudo chmod
777
"
$starthugepfile
"
sudo chmod
777
"
$starthugepfile
"
...
@@ -40,6 +47,13 @@ sudo cp -f "$setmacrc" "$build_dir/system/etc/init"
...
@@ -40,6 +47,13 @@ sudo cp -f "$setmacrc" "$build_dir/system/etc/init"
sudo cp
-f
"
$setmacfile
"
"
$build_dir
/system/bin"
sudo cp
-f
"
$setmacfile
"
"
$build_dir
/system/bin"
sudo chcon
u:object_r:drmserver_exec:s0
"
$build_dir
/system/bin/
$(
basename
"
$setmacfile
"
)
"
sudo chcon
u:object_r:drmserver_exec:s0
"
$build_dir
/system/bin/
$(
basename
"
$setmacfile
"
)
"
sudo cp
-f
"
$startthirdpartyrc
"
"
$build_dir
/system/etc/init"
sudo cp
-f
"
$startthirdpartyfile
"
"
$build_dir
/system/bin"
sudo chcon
u:object_r:drmserver_exec:s0
"
$build_dir
/system/bin/
$(
basename
"
$startthirdpartyfile
"
)
"
sudo cp
-f
"
$hugepstartfile
"
"
$build_dir
/system/bin"
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
"
rm
-rf
"
$build_dir
/system"
rm
-rf
"
$build_dir
/system"
...
...
services/startthirdparty.rc
0 → 100644
View file @
887c82b2
service startthirdparty /system/bin/startthirdparty.sh
class main
user root
group root
oneshot
disabled
on property:sys.boot_completed=1
start startthirdparty
services/startthirdparty.sh
0 → 100755
View file @
887c82b2
#!/system/bin/sh
export
PATH
=
"
$PATH
:/sbin:/system/sbin:/system/bin:/system/xbin:/odm/bin:/vendor/bin:/vendor/xbin"
source
/system/bin/THIRDPARTY_ENV
$THIRDPARTY_BIN
$THIRDPARTY_ARG
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