diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..9c4a3e3 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 - 2025 woa-msmnile authors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..e814fdc --- /dev/null +++ b/README.md @@ -0,0 +1,28 @@ +# XCReader + +## Introduction + +QC starts using a new format of XBL config since 8450 platforms. The new format designed for it is to store some +important configurations like `XBL DTB`, `CPR`, and `DCB`. +This tool is aim to extract those files from the XBL config. +:::tip +This tool only works on SM8450 and subsequent platforms. +::: + +## How to use + +- Just run it in a terminal will be fine. +- xbl_config.img is also acceptable. + +``` +Usage: +``` + +## Build +- Need cmake and C toolchain. +``` +git clone https://github.com/woa-msmnile/XBLConfigReader --depth=1 +cd XBLConfigReader +mkdir build && cd build +cmake -S .. && cmake --build . +``` \ No newline at end of file diff --git a/main.c b/main.c index 1554de6..230e7b3 100644 --- a/main.c +++ b/main.c @@ -9,7 +9,7 @@ // Entry int main(int argc, char *argv[]) { printf("XBLConfigParser Version %s\n", PARSER_VERSION); - printf("Copyright (c) 2024-2025 \n\n"); + printf("Copyright (c) 2024-2025 woa-msmnile authors\n\n"); // Check args if (argc != 3) { @@ -40,7 +40,7 @@ int main(int argc, char *argv[]) { // Print ELF header info printf("ELF Header Information:\n"); - printf("ELF Magic: 0x%016llx 0x%016llx\n", *(uint64_t *) hdr->e_ident, *(uint64_t *) (hdr->e_ident + 8)); + printf("ELF Magic: 0x%016llx 0x%016llx\n", (uint64_t) hdr->e_ident, (uint64_t) (hdr->e_ident + 8)); printf("Program Header Offset: 0x0%llx\n", hdr->e_phoff); printf("Program Header Numbers: 0x%x\n", hdr->e_phnum); printf("Program Header Size: 0x%x\n", hdr->e_phentsize);