############################################################################
#
# Copyright (c) 2011 - dsixda (dislam@rocketmail.com)
#
# Android Kitchen is 100% free.  This script file is intended for personal
# and/or educational use only.  It may not be duplicated for monetary
# benefit or any other purpose without the permission of the developer.
#
############################################################################


#
# This script has one optional parameter:
#
# $1 = folder containing boot.img
#

base_dir=`pwd`

if [ "$1" == "" ]
then
  if [ ! -d WORKING_* ]
  then
    echo Working folder not found!
    exit 0
  fi
  cd WORKING_*
else
  cd $1
fi

page_size=`od -A n -D -j 36 -N 4 boot.img | sed 's/ //g'`

cd $base_dir
echo $page_size


