Skip to content

Commit

Permalink
Update cus_add.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
buihien224 authored Apr 5, 2022
1 parent 9c81df2 commit 0189dc1
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions cus_add.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

permis()
{
haa=$(find $1)
haa=$(sudo find $1)
for i in $haa; do
if [[ $i =~ "/bin/" ]]; then
sudo chmod 755 $i
Expand All @@ -29,21 +29,22 @@ linkcute=$(ls *.zip)
if [[ -f $linkcute ]]; then
echo "Phat hien $linkcute"
mkdir working custom
dd if=/dev/zero bs=1M count=612 >> addon.img
resize2fs addon.img
e2fsck -f addon.img
dd if=/dev/zero bs=1M count=612 >> addon.img
e2fsck -f -y addon.img > /dev/null 2>&1
resize2fs addon.img > /dev/null 2>&1
sudo mount addon.img working
echo "Giai nen $linkcute"
cp $linkcute custom ; cd custom
mv $linkcute custom ; cd custom
jar xf $linkcute ; rm $linkcute
cd ..
echo "Copy file vao addon.img"
sudo cp -rf custom/* working/system
sudo cp -rf custom/* working
echo "Set quyen va SEcontest"
permis working
sudo umount working
resize2fs -f -M addon.img
resize2fs -f -M addon.img > /dev/null 2>&1
rm -rf working custom
echo "Xong, hay copy file addon.img vao module/update"

fi

0 comments on commit 0189dc1

Please sign in to comment.