From 610aa5dd9601780da068b031434099da612d7932 Mon Sep 17 00:00:00 2001 From: Dmitry Isaenko Date: Fri, 9 Dec 2022 05:37:31 +0300 Subject: [PATCH] 1. Start moving to 'InFileStreamProducer' entity to simplify work with [inside-NCA]-[in-pfs0/romfs]-[sub-files] that could be located inside encrypted or not encrypted sections. This approach will allow us to map filesystem to/as 'enough-informed' objects that could perform actions on content without pre-extraction. For example decompress NSO0 'ELF' sections from the inside PFS0 that is located inside NCA3 that is located inside XCI/NSP. 2. Add NSO0 support. Add NSO0 decompressor/extractor 3. Add logo draft sketch, update dependencies, add LZ4 libs deps, add final identifier in some places --- README.md | 7 +- pom.xml | 17 +- src/main/java/libKonogonka/Converter.java | 4 + src/main/java/libKonogonka/RainbowDump.java | 8 +- .../NPDM/ACI0/FSAccessHeaderProvider.java | 20 +- .../libKonogonka/Tools/NPDM/NPDMProvider.java | 38 +-- .../libKonogonka/Tools/NSO/NSO0Provider.java | 204 ++++++++++++++++ .../libKonogonka/Tools/NSO/NSO0Unpacker.java | 221 ++++++++++++++++++ .../libKonogonka/Tools/NSO/SegmentHeader.java | 49 ++++ .../Tools/NSO/SegmentHeaderRelative.java | 43 ++++ .../Tools/PFS0/IPFS0Provider.java | 7 + .../libKonogonka/Tools/PFS0/PFS0Provider.java | 26 +++ .../ctraes/InFileStreamProducer.java | 119 ++++++++++ .../RomFsDecrypted/NSODecompressTest.java | 43 ++++ .../libKonogonka/RomFsDecrypted/NSOTest.java | 129 ++++++++++ 15 files changed, 894 insertions(+), 41 deletions(-) create mode 100644 src/main/java/libKonogonka/Tools/NSO/NSO0Provider.java create mode 100644 src/main/java/libKonogonka/Tools/NSO/NSO0Unpacker.java create mode 100644 src/main/java/libKonogonka/Tools/NSO/SegmentHeader.java create mode 100644 src/main/java/libKonogonka/Tools/NSO/SegmentHeaderRelative.java create mode 100644 src/main/java/libKonogonka/ctraes/InFileStreamProducer.java create mode 100644 src/test/java/libKonogonka/RomFsDecrypted/NSODecompressTest.java create mode 100644 src/test/java/libKonogonka/RomFsDecrypted/NSOTest.java diff --git a/README.md b/README.md index 45eaa7f..2d269d1 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# libKonogonka +libKonogonka ![License](https://img.shields.io/badge/License-GPLv3-blue.svg) [![Build Status](https://ci.redrise.ru/api/badges/desu/libKonogonka/status.svg)](https://ci.redrise.ru/desu/libKonogonka) @@ -13,10 +13,13 @@ You can get this application from independent source location: [https://git.redr [GNU General Public License v3 or higher](https://git.redrise.ru/desu/libKonogonka/LICENSE) ### Used libraries & resources + * [Bouncy Castle](https://www.bouncycastle.org/) for Java. * [Java-XTS-AES](https://github.com/horrorho/Java-XTS-AES) by horrorho with minimal changes. +* [lz4-java](https://github.com/lz4/lz4-java) + +#### Thanks -#### Thanks * Switch brew wiki * Original ScriesM software * roothorick, [shchmue](https://github.com/shchmue/), He, other Team AtlasNX discord members for their advices, notes and examples! diff --git a/pom.xml b/pom.xml index 521eaeb..07d03de 100644 --- a/pom.xml +++ b/pom.xml @@ -15,7 +15,7 @@ 2022 Dmitry Isaenko - https://developersu.blogspot.com/ + https://redrise.ru/ @@ -67,28 +67,33 @@ org.apache.logging.log4j log4j-core - 2.18.0 + 2.19.0 compile org.junit.jupiter junit-jupiter-engine - 5.5.2 + 5.9.0 test org.junit.jupiter junit-jupiter-api - 5.5.2 + 5.9.0 test org.junit.jupiter junit-jupiter-params - 5.5.2 + 5.9.0 test + + org.lz4 + lz4-pure-java + 1.8.0 + ${project.artifactId}-${project.version}-${maven.build.timestamp} @@ -111,7 +116,7 @@ -