This program:
-
Converts each .elf section into a V-Klay patch string.
-
Add old patch data if a fullflash path is specified.
The main reason for the existence of this program is that the sources of the old elf2vkp.exe have been lost.
- Windows: download .exe in Releases.
- ArchLinux:
yay -S elf2vkp-git
- OSX:
brew install siemens-mobile-hacks/tap/elf2vkp
- Ubuntu/Debian: download .deb in Releases.
- Build from sources:
git clone https://github.com/siemens-mobile-hacks/elf2vkp cd elf2vkp git submodule init git submodule update # Ubuntu/Debian fakeroot debian/rules binary # OSX, Linux, Unix, MinGW cmake -B build -DCMAKE_BUILD_TYPE=Release cmake --build build cmake --install build # Windows cmake -B build cmake --build build --config Release
Usage: elf2vkp [--help] [--version] --input VAR --output VAR [--fullflash VAR] [--base VAR] [--header VAR]... [--header-from-file VAR] [--section-names] [--chunk-size VAR] [--format VAR] [--no-substract-base-addr] [--no-pragma] [--use-crlf]
Optional arguments:
-h, --help shows help message and exits
-v, --version prints version information and exits
-i, --input Path to patch.elf [required]
-o, --output Path to patch.vkp [default: "-"]
-f, --fullflash Path to fullflash.bin [default: ""]
-b, --base Firmware base address [default: "A0000000"]
-H, --header Add patch header [default: {}] [may be repeated]
--header-from-file Add patch header (from file) [default: ""]
--section-names Show section names in .vkp
--chunk-size Maximum bytes per one line [default: 16]
-F, --format Patch output format: v-klay, armdebugger, sony-ericsson [default: "v-klay"]
--no-substract-base-addr Disable substracting base address from patch addr
--no-pragma Disable use of #pragma in the patch
--use-crlf Use windows \r\n instead of Unix \n
Format | Description |
---|---|
--format v-klay |
Default format. |
--format armdebugger |
Shortcut for: --no-pragma |
--format sony-ericsson |
Shortcut for: --no-substract-base-addr --no-pragma |
$ elf2vkp -i patch.elf -o patch.vkp -f EL71sw45.bin
$ elf2vkp -i patch.elf -o patch.vkp
$ elf2vkp -F sony-ericsson -i patch.elf -o patch.vkp -f firmware.bin