Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # mybuild4.sh
- # my custom script to download, build and flash
- # note the start time
- START=$(date +%s)
- # assign variable
- DEVICE="$1"
- # start from the beginning, if called
- case "$DEVICE" in
- all)
- # do it all
- cd ~
- apt-get install git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.6-dev squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev sun-java6-jdk pngcrush schedtool g++-multilib lib32z1-dev lib32ncurses5-dev lib32readline5-dev
- echo y
- echo -ne \\r
- ;;
- exec mybuild4.sh buildall
- exit
- buildall)
- # make the needed directories
- cd ~
- mkdir -p ~/bin
- mkdir -p ~/android/system
- # download repo and make executable
- curl http://android.git.kernel.org/repo > ~/bin/repo
- chmod a+x ~/bin/repo
- # reload terminal
- source .bashrc
- # change to the proper directory and download the source
- cd ~/android/system/
- repo init -u git://github.com/CyanogenMod/android.git -b gingerbread
- echo -ne \\r
- echo -ne \\r
- # create local_manifest, make a link to it in the right place
- cp ~/Saved/local_manifest.xml ~/android/system/.repo/manifests/
- ln -s ~/android/system/.repo/manifests/local_manifests.xml ~/android/system/.repo/local_manifest.xml
- # download source
- repo sync -j16
- ;;
- clean)
- cd ~/android/system
- make clean
- rm -rf ./out
- ;;
- esac
- # get rom manager
- cd ~/android/system/vendor/cyanogen
- ./get-rommanager
- # prepare to build kernel
- cd ~/android/system && . build/envsetup.sh && lunch cyanogen_captivatemtd-eng
- # change to kernel directory and build kernel
- cd ~/android/system/kernel/samsung/aries && ./build.sh captivatemtd
- # change to top of build directory and build, using ccache to speed things up
- cd ~/android/system && USE_CCACHE=1 brunch captivatemtd
- # push zip to connected phone and flash
- eat
- # calculate and show elapsed time
- END=$(date +%s)
- ELAPSED=$((END - START))
- E_MIN=$((ELAPSED / 60))
- E_SEC=$((ELAPSED - E_MIN * 60))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement