summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c1d4840)
raw | patch | inline | side by side (parent: c1d4840)
author | Praneeth Bajjuri <praneeth@ti.com> | |
Thu, 14 Mar 2019 19:20:06 +0000 (14:20 -0500) | ||
committer | Praneeth Bajjuri <praneeth@ti.com> | |
Thu, 14 Mar 2019 19:20:06 +0000 (14:20 -0500) |
userdata image should use mke2fs for android pie instead
of make_ext4fs.make_ext4fs is deprecated in pie.
Removing the complete resize of userdata image section.
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
of make_ext4fs.make_ext4fs is deprecated in pie.
Removing the complete resize of userdata image section.
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
fastboot.sh | patch | blob | history |
diff --git a/fastboot.sh b/fastboot.sh
index 43fce55558e4696dad1337cb8926ce7649695dca..7dbd2584f5c2ca5c137ce091f8562fdbba8c56f8 100755 (executable)
--- a/fastboot.sh
+++ b/fastboot.sh
echo "Flashing FIT Boot Image"
${FASTBOOT} flash boot ${bootfitimg}
-userdataimg_orig="${userdataimg}.orig"
-if [ ! -f $userdataimg_orig ]; then
- cp $userdataimg $userdataimg_orig
-else
- cp $userdataimg_orig $userdataimg
-fi
-
-echo "Resizing userdata.img"
-resizefail=0
-userdatasize=`${FASTBOOT} getvar userdata_size 2>&1 | grep "userdata_size" | awk '{print$2}'`
-if [ -n "$userdatasize" ]; then
- while [ 1 ];do
- echo Current userdata partition size=${userdatasize} KB
- if [ -d "./data" ]; then
- echo "Removing data"
- rm -rf ./data || resizefail=1
- if [ $resizefail -eq 1 ]; then
- echo "unable to remove data folder" && break
- fi
- fi
- mkdir ./data
- ./simg2img ${userdataimg} ${userdataimg}.raw
- mount -o loop -o grpid -t ext4 ${userdataimg}.raw ./data || resizefail=1
- if [ $resizefail -eq 1 ]; then
- echo "Mount failed" && break
- fi
- ./make_ext4fs -s -l ${userdatasize}K -a data ${userdataimg} data/
- sync
- umount data
- sync
- rm -rf ./data
- rm ${userdataimg}.raw
- break
- done
-else
- resizefail=1
-fi
-
-if [ $resizefail -eq 1 ]; then
- echo "userdata resize failed."
- echo "Eg: sudo ./fastboot.sh"
- echo "For now, we are defaulting to original userdata.img"
- cp $userdataimg_orig $userdataimg
-fi
+echo "Flashing userdata Image"
${FASTBOOT} flash userdata ${userdataimg}
-
-#reboot now
-#${FASTBOOT} reboot
-
-#if [ $resizefail -eq 1 ]; then
-# echo "--------------------------------------------------"
-# echo "Attempt was made to resize the userdata partition image"
-# echo "to the size available on your SOM. But it failed either"
-# echo "because it failed to remove existing ./data folder or because"
-# echo "you are not running this script with superuser privileges"
-# echo "Don't panic! The script just loaded the original userdata.img"
-# echo "so, things should just work as expected. Just that the size"
-# echo "of /data will be smaller on target."
-# echo ""
-# echo "If you really want to resize userdata.img, remove any existing"
-# echo "./data folder and run \"sudo ./fastboot.sh\""
-# echo "For now, we are defaulting to original userdata.img"
-# echo "--------------------------------------------------"
-#fi