Skip to content

Commit

Permalink
Update build_tools for CM-13.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ghsr committed Nov 25, 2015
1 parent d271a79 commit 7d6a702
Show file tree
Hide file tree
Showing 15 changed files with 1,926 additions and 336 deletions.
14 changes: 9 additions & 5 deletions README
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
Scripts and patches to build ROMs for S II Plus
Scripts and patches to build ROMs for Samsung Galaxy S2 Plus and Samsung Galaxy Mega 5.8
==================================

How to get:
Run "git clone https://github.com/andixlm/android_build-tools_galaxys2plus-common build-tools" in root of ROM sources directory.
-------------
Run "git clone https://github.com/ghsr/build_tools.git -b cm-13.0" in root of ROM sources directory.

Description of scripts:
-------------
resync - reset all changes in ROM sources, sync and get prebuilts. Use "-o" to reset changes only.
----------

patch - patch ROM sources.
----------
build - build ROM. It asks for cleaning of out directory (make clean) and device (i9105 or i9105p), then build for chosen device. Also it handles 1st option ("i9105" or "i9105p" or "s2plus"). To build with cleaning use "-c" as a 2nd option. To build boot image (or recovery image) for device defined in 1st option w/o whole ROM building use 2nd option "-b" ("-r" for recovery).

build - build ROM. It asks for cleaning of out directory (make clean) and device (i9105 or i9105p or i9152), then build for chosen device. Also it handles 1st option ("i9105" or "i9105p" or "s2plus" or "i9152"). To build with cleaning use "-c" as a 2nd option. To build boot image (or recovery image) for device defined in 1st option w/o whole ROM building use 2nd option "-b" ("-r" for recovery).

Credits:
-------------
pawitp - patches
luk1337 - initial implementation of scripts
25 changes: 6 additions & 19 deletions build
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
#!/bin/bash

# Get start time
start_time=$(date +"%s")

cd ..

export USE_CCACHE=1
Expand Down Expand Up @@ -41,6 +38,10 @@ case "$1" in
DEVICE='i9105 i9105p'
FAST=1
;;
i9152 )
DEVICE=$1
FAST=1
;;
"" )
;;
* )
Expand Down Expand Up @@ -128,27 +129,13 @@ if [[ !($FAST) ]]; then
make clean
fi

echo -n 'Device? (i9105 or i9105p): '
echo -n 'Device? (i9105 or i9105p or i9152): '
read DEVICE
# Check if given proper device DNAME
if [[ $DEVICE != i9105 && $DEVICE != i9105p ]]; then
if [[ $DEVICE != i9105 && $DEVICE != i9105p && $DEVICE != i9152 ]]; then
echo Unknown device DNAME: $DEVICE
exit 0
fi

build_rom
fi

# Calculate elapsed time
end_time=$(date +"%s")
tdiff=$(($end_time-$start_time))
hours=$(($tdiff / 3600 ))
mins=$((($tdiff % 3600) / 60))
secs=$(($tdiff % 60))

# Print elapsed time
tput setaf 2
echo ""
printf "Elapsed time: %02g:%02g:%02g" $hours $mins $secs
echo ""
tput sgr0
4 changes: 1 addition & 3 deletions patch
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@ cd ..

COUNT=0
CURRENT_DIR="$PWD"
PD="build-tools/patches"
PD="build_tools/patches"
PATCHES=(
'bootable/recovery bootable_recovery.patch'
'frameworks/av frameworks_av.patch'
'frameworks/base frameworks_base.patch'
'frameworks/native frameworks_native.patch'
Expand All @@ -16,7 +15,6 @@ PATCHES=(
'packages/apps/Trebuchet packages_apps_Trebuchet.patch'
'packages/services/Telephony packages_services_Telephony.patch'
'system/core system_core.patch'
'vendor/cm vendor_cm.patch'
)

while [ "x${PATCHES[COUNT]}" != "x" ]
Expand Down
31 changes: 0 additions & 31 deletions patches/bootable_recovery.patch

This file was deleted.

Loading

0 comments on commit 7d6a702

Please sign in to comment.