| .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
AI-assisted contributions
We are not against AI. We are against vibe coding, AI slop, and attempts to offload engineering work to a model. This project prioritizes quality, not development speed or results at any cost.
-
Do not use AI-generated text in human-to-human communication.
Write comments, discussions, PR descriptions, and responses to reviewers yourself.
-
Do not let AI submit PRs or commits.
The author must always be a human who has personally reviewed the changes and takes responsibility for them.
-
Do not submit code primarily designed or written by AI.
Architecture, algorithms, code organization, and the final implementation must be decided by a human. AI may only be used as an auxiliary tool.
-
You must understand all the code you submit.
You must be able to explain every change, justify your decisions, and fix any problems yourself. If you do not understand the code, open a feature request instead of a PR.
-
Code must be simple, clear, and tested.
Follow KISS, the project's coding style, and its existing architecture. Do not introduce unnecessary abstractions, dependencies, or untested changes.
AI slop PRs will be closed without review.