Skip to content

Commit

Permalink
update version 1.3
Browse files Browse the repository at this point in the history
detect mtk header in binary
  • Loading branch information
carliv committed Jun 30, 2016
1 parent fc39c50 commit 2cf8f92
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 27 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<pre>
##############################################################################
# #
# Carliv Image Kitchen for Android v1.2 #
# Carliv Image Kitchen for Android v1.3 #
# for android phones copyright(c)2016 carliv@xda #
# including support for MTK powered phones images #
# WINDOWS version #
Expand Down
Binary file removed bin/grep.exe
Binary file not shown.
Binary file modified bin/unpackbootimg.exe
Binary file not shown.
21 changes: 5 additions & 16 deletions carliv.bat
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ cls
echo(
echo ***************************************************
echo * *
cecho * {0B}Carliv Image Kitchen for Android{#} v1.2 *{\n}
cecho * {0B}Carliv Image Kitchen for Android{#} v1.3 *{\n}
cecho * boot+recovery images (c)2016 {0B}carliv@xda{#} *{\n}
cecho * including support for {0E}MTK powered {#}phones images *{\n}
cecho * {0A}WINDOWS x64 {#}version *{\n}
Expand Down Expand Up @@ -60,7 +60,7 @@ goto main
cls
echo ***************************************************
echo * *
cecho * {0B}Carliv Image Kitchen for Android{#} v1.2 *{\n}
cecho * {0B}Carliv Image Kitchen for Android{#} v1.3 *{\n}
cecho * boot+recovery images (c)2016 {0B}carliv@xda{#} *{\n}
cecho * including support for {0E}MTK powered {#}phones images *{\n}
cecho * {0A}WINDOWS x64 {#}version *{\n}
Expand All @@ -84,7 +84,6 @@ if not exist "%workfolder%" goto imgmenulist
cecho The folder for repack will be {0A}%workfolder%{#}.{\n}
echo Make sure that folder exists and you didn't delete it, because if you did, it will give you an error.
:imgmenulist
for /f %%k in ('"set LANG=C && grep -obUaPc "\x88\x16\x88\x58" "working\%workfile%""') do set mtk=%%k
echo(
echo ][*************************][*************************][
cecho ][ {0B}1. Unpack image{#} ][ {0E}B. Other boot image{#} ][{\n}
Expand Down Expand Up @@ -112,11 +111,10 @@ goto imgmenu
set workfile=
set filetype=
set workfolder=
set mtk=
cls
echo ***************************************************
echo * *
cecho * {0B}Carliv Image Kitchen for Android{#} v1.2 *{\n}
cecho * {0B}Carliv Image Kitchen for Android{#} v1.3 *{\n}
cecho * boot+recovery images (c)2016 {0B}carliv@xda{#} *{\n}
cecho * including support for {0E}MTK powered {#}phones images *{\n}
cecho * {0A}WINDOWS x64 {#}version *{\n}
Expand Down Expand Up @@ -169,11 +167,10 @@ goto boot
set workfile=
set filetype=
set workfolder=
set mtk=
cls
echo ***************************************************
echo * *
cecho * {0B}Carliv Image Kitchen for Android{#} v1.2 *{\n}
cecho * {0B}Carliv Image Kitchen for Android{#} v1.3 *{\n}
cecho * boot+recovery images (c)2016 {0B}carliv@xda{#} *{\n}
cecho * including support for {0E}MTK powered {#}phones images *{\n}
cecho * {0A}WINDOWS x64 {#}version *{\n}
Expand Down Expand Up @@ -228,18 +225,10 @@ if %filetype%==bootimage goto unpackboot
if %filetype%==recoveryimage goto unpackrecovery
:unpackboot
copy "working\%workfile%" boot.img >nul
if %mtk%==0 goto unpackbootreg
call unpack_img.bat boot.img %workfolder% %mtk%
goto endunpack
:unpackbootreg
call unpack_img.bat boot.img %workfolder%
goto endunpack
:unpackrecovery
copy "working\%workfile%" recovery.img >nul
if %mtk%==0 goto unpackrecreg
call unpack_img.bat recovery.img %workfolder% %mtk%
goto endunpack
:unpackrecreg
call unpack_img.bat recovery.img %workfolder%
:endunpack
if exist boot.img del boot.img >nul
Expand Down Expand Up @@ -290,7 +279,7 @@ goto main
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:error
echo(
cecho {0C}The scripts and executables can't get execution permission! The kitchen won't run this way. {#}{\n}
cecho {0C}The scripts and executables can't get execution permissions! The kitchen won't run this way. {#}{\n}
PING -n 3 127.0.0.1>nul
goto end
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Expand Down
2 changes: 1 addition & 1 deletion scripts/Instructions.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
##############################################################################
# #
# Carliv Image Kitchen for Android v1.2 #
# Carliv Image Kitchen for Android v1.3 #
# for android phones copyright(c)2016 carliv@xda #
# including support for MTK powered phones images #
# WINDOWS version #
Expand Down
2 changes: 1 addition & 1 deletion scripts/clean_all.bat
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Setlocal EnableDelayedExpansion
echo(
echo ***************************************************
echo * *
cecho * {0B}Carliv Image Kitchen for Android{#} v1.2 *{\n}
cecho * {0B}Carliv Image Kitchen for Android{#} v1.3 *{\n}
cecho * boot+recovery images (c)2016 {0B}carliv@xda{#} *{\n}
cecho * including support for {0E}MTK powered {#}phones images *{\n}
cecho * {0A}WINDOWS x64 {#}version *{\n}
Expand Down
2 changes: 1 addition & 1 deletion scripts/clean_output.bat
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Setlocal EnableDelayedExpansion
echo(
echo ***************************************************
echo * *
cecho * {0B}Carliv Image Kitchen for Android{#} v1.2 *{\n}
cecho * {0B}Carliv Image Kitchen for Android{#} v1.3 *{\n}
cecho * boot+recovery images (c)2016 {0B}carliv@xda{#} *{\n}
cecho * including support for {0E}MTK powered {#}phones images *{\n}
cecho * {0A}WINDOWS x64 {#}version *{\n}
Expand Down
2 changes: 1 addition & 1 deletion scripts/image_info.bat
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Setlocal EnableDelayedExpansion
echo(
echo ***************************************************
echo * *
cecho * {0B}Carliv Image Kitchen for Android{#} v1.2 *{\n}
cecho * {0B}Carliv Image Kitchen for Android{#} v1.3 *{\n}
cecho * boot+recovery images (c)2016 {0B}carliv@xda{#} *{\n}
cecho * including support for {0E}MTK powered {#}phones images *{\n}
cecho * {0A}WINDOWS x64 {#}version *{\n}
Expand Down
2 changes: 1 addition & 1 deletion scripts/repack_img.bat
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Setlocal EnableDelayedExpansion
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
echo ***************************************************
echo * *
cecho * {0B}Carliv Image Kitchen for Android{#} v1.2 *{\n}
cecho * {0B}Carliv Image Kitchen for Android{#} v1.3 *{\n}
cecho * boot+recovery images (c)2016 {0B}carliv@xda{#} *{\n}
cecho * including support for {0E}MTK powered {#}phones images *{\n}
cecho * {0A}WINDOWS x64 {#}version *{\n}
Expand Down
6 changes: 1 addition & 5 deletions scripts/unpack_img.bat
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Setlocal EnableDelayedExpansion
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
echo ***************************************************
echo * *
cecho * {0B}Carliv Image Kitchen for Android{#} v1.2 *{\n}
cecho * {0B}Carliv Image Kitchen for Android{#} v1.3 *{\n}
cecho * boot+recovery images (c)2016 {0B}carliv@xda{#} *{\n}
cecho * including support for {0E}MTK powered {#}phones images *{\n}
cecho * {0A}WINDOWS x64 {#}version *{\n}
Expand All @@ -37,10 +37,6 @@ if exist "%folder%" rd /s/q "%folder%"
md %folder%
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
echo(
if "%~3" == "" goto nomtk
unpackbootimg -i %file% -o %folder% --mtk 1
goto donecheck
:nomtk
unpackbootimg -i %file% -o %folder%
:donecheck
cd %folder%
Expand Down

0 comments on commit 2cf8f92

Please sign in to comment.