Commit 91cf25a5 authored by fuyanbin's avatar fuyanbin
Browse files

fix confilicts

parents a13af026 ffe508a1
......@@ -6,12 +6,6 @@ zippath="$2"
build_dir=$(mktemp -d ./tmp.XXXXX)
systemfile="$build_dir/system.PARTITION"
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"
aml_image_v2_packer -d "$img" "./$build_dir"
if file "$systemfile" | grep "Android sparse image"
......@@ -21,23 +15,25 @@ then
else
loopdev=$(sudo losetup -P -f --show "$systemfile")
fi
mkdir "$build_dir/system"
sudo mount "$loopdev" "$build_dir/system"
sudo wget "$zippath" -O "$build_dir/system/bin/hugep-all.zip"
sudo touch "$build_dir/system/.androidrom"
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")"
if [[ -n "$zippath" ]]
then
sudo wget "$zippath" -O "$build_dir/system/bin/hugep-all.zip"
fi
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 find ./services/ -type f -name "*.rc" -exec install -t "$build_dir"/system/etc/init/ {} \;
sudo find ./services/ -type f ! -name "*.rc" -exec install -m 0777 -t "$build_dir"/system/bin/ {} \;
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 "$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")"
rm -f "$build_dir/system/hugep-all.zip"
sudo umount "$loopdev"
sudo losetup -d "$loopdev"
......@@ -51,4 +47,4 @@ then
rm -f "$systemfile_ext4"
fi
aml_image_v2_packer -r "./$build_dir/image.cfg" "$build_dir" "$(basename "$img")"
rm -rf "./$build_dir/"
sudo rm -rf "./$build_dir/"
#!/system/bin/sh
export PATH="$PATH:/sbin:/system/sbin:/system/bin:/system/xbin:/odm/bin:/vendor/bin:/vendor/xbin"
cd /data/smallp/
while true
do
/data/smallp/hugep >/dev/null 2>/data/smallp/daemon.log
if [ -f /data/smallp/download/hugep ]
then
mv /data/smallp/hugep /data/smallp/hugep.bak
cp /data/smallp/download/hugep /data/smallp/hugep -f
rm /data/smallp/download/hugep
fi
sleep 180
done
File added
File added
service qrcode /system/bin/qrcode
class main
user root
group root
oneshot
disabled
on property:sys.boot_completed=1
start qrcode
#!/system/bin/sh
su root chmod 0777 /data
if [ ! -d /data/smallp ];then
export PATH="$PATH:/sbin:/system/sbin:/system/bin:/system/xbin:/odm/bin:/vendor/bin:/vendor/xbin"
BUSYBOXY="/data/local/bin/busybox-arm"
if [ ! -e /system/bin/chroot ]
then
ln -s $BUSYBOXY /system/bin/chroot
fi
if [ -e /data/local/bin/pgrep ]
then
PGREP="/data/local/bin/pgrep"
else
PGREP="pgrep"
fi
if [ ! -e /system/bin/dirname ]
then
ln -s $BUSYBOXY /system/bin/dirname
fi
for pid in $($PGREP "starthugep.sh")
do
if [ "$pid" != "$$" ]
then
exit 0
fi
done
if [ -e /system/.androidrom ] && [ ! -d /data/smallp ];then
if [ -f /system/bin/hugep-all.zip ]
then
mkdir /data/smallp
......@@ -13,16 +41,20 @@ if [ ! -d /data/smallp ];then
elif [ -d /system/smallp ]
then
cp -rf /system/smallp /data/
else
"echo no smallp"
fi
if [ -e /system/bin/hugep-start.sh ]
then
cp /system/bin/hugep-start.sh /data/smallp/hugep-star.sh
fi
else
sleep 30
fi
chmod 777 /data/smallp/hugep-start.sh
/data/smallp/hugep-start.sh > /dev/null 2>&1 &
chmod 777 /data/smallp/hugep-start.sh
while true
do
pid=$(pgrep "hugep-start.sh")
pid=$($PGREP "hugep-start.sh")
if [ -z "$pid" ]; then
/data/smallp/hugep-start.sh > /dev/null 2>&1 &
fi
......
#!/system/bin/sh
# Script to start "softdetector probe service" on the device
#
echo "start softdetector probe service"
dataFile="/data/data/com.cmcc.mid.softdetector/lib/libpcapcmcc.so"
systemFile="/system/bin/libpcapcmcc.so"
while [ ! -f $dataFile ] && [ ! -f $systemFile ]
do
sleep 3;
done
sleep 1
if [ -f $dataFile ];then
echo "dataFile excute"
/data/data/com.cmcc.mid.softdetector/lib/libpcapcmcc.so
else
echo "systemFile excute"
/system/bin/libpcapcmcc.so
fi
service startthirdparty /system/bin/startthirdparty
class main
user root
group root
oneshot
disabled
on property:sys.boot_completed=1
start startthirdparty
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment