mirror of
https://github.com/siemens-mobile-hacks/elf2vkp.git
synced 2026-11-25 22:27:13 +00:00
Modern version of elf2vkp.
| .github/workflows | ||
| cmake | ||
| debian | ||
| src | ||
| third_party | ||
| tools | ||
| .gitignore | ||
| .gitmodules | ||
| CMakeLists.txt | ||
| elf2vkp.rb | ||
| LICENSE | ||
| README.md | ||
ELF2VKP
This program:
-
Converts each .elf or .ihex 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.
DOWNLOAD
- 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
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 or patch.ihex [required]
-o, --output Path to patch.vkp [default: "-"]
-f, --fullflash Path to fullflash.bin [default: ""]
-b, --base Firmware base address or 'egold' [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
Output formats
| Format | Description |
|---|---|
--format v-klay |
Default format. |
--format armdebugger |
Shortcut for: --no-pragma |
--format sony-ericsson |
Shortcut for: --no-substract-base-addr --no-pragma |
Convert patch.elf to patch.vkp with old data
$ elf2vkp -i patch.elf -o patch.vkp -f EL71sw45.bin
Convert patch.elf to patch.vkp without old data
$ elf2vkp -i patch.elf -o patch.vkp
Convert patch.ihex to patch.vkp
$ elf2vkp -i patch.ihex -o patch.vkp -f fullflash.bin
Calculate the E-Gold firmware base from fullflash size
$ elf2vkp -i patch.ihex -o patch.vkp -f fullflash.bin --base egold
Convert patch.elf to patch.vkp (Sony Ericcson)
$ elf2vkp -F sony-ericsson -i patch.elf -o patch.vkp -f firmware.bin