suchmememanyskill / EmmcHaccGen

Supposed to be a replacement of ChoiDuJour
Other
99 stars 8 forks source link

Unhandled exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation." when generationg imkvdb #15

Closed Luiaves closed 1 year ago

Luiaves commented 1 year ago

C:\Users\Luiaves\Downloads\EmmcHaccGen.2.2.3>EmmcHaccGen.exe --keys C:\Users\Luiaves\Downloads\EmmcHaccGen.2.2.3\Firmware\prod.keys --fw C:\Users\Luiaves\Downloads\EmmcHaccGen.2.2.3\Firmware\14.1.2 --no-exfat EmmcHaccGen started Indexing nca files...

EmmcHaccGen will now generate firmware files using the following settings: fw: 14.1.2 Exfat Support: False Key path: C:\Users\Luiaves\Downloads\EmmcHaccGen.2.2.3\Firmware\prod.keys Destination folder: NX-14.1.2 Mariko boot generation: False Save version: v5 AutoRCM: True

Creating folders.. Destination folder already exists. Delete the old folder? Y/N: y Deleting NX-14.1.2

Generating bis.. Wrote 0x00180000 bytes to NX-14.1.2/BOOT0.bin Wrote 0x00080000 bytes to NX-14.1.2/BOOT1.bin Wrote 0x00800000 bytes to NX-14.1.2/BCPKG2-1-Normal-Main.bin Wrote 0x00800000 bytes to NX-14.1.2/BCPKG2-2-Normal-Sub.bin Wrote 0x00800000 bytes to NX-14.1.2/BCPKG2-3-SafeMode-Main.bin Wrote 0x00800000 bytes to NX-14.1.2/BCPKG2-4-SafeMode-Sub.bin Wrote 0x01200025 bytes to NX-14.1.2/boot.bis

Copying files...

Setting archive bits..

Generating imkvdb.. Unhandled exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Exception: [IMEN] Invalid hash given at EmmcHaccGen.imkv.Imen.AddContentNca() at EmmcHaccGen.imkv.Imen.GenValue() at EmmcHaccGen.imkv.Imen.Gen() at EmmcHaccGen.imkv.Imen..ctor(List`1 pair) at EmmcHaccGen.imkv.Imkv.MakeImenList(NcaIndexer& ncaIndex) at EmmcHaccGen.imkv.Imkv..ctor(NcaIndexer& ncaIndex) at EmmcHaccGen.Program.Start(String keys, String fwPath, Boolean noExfat, Boolean verbose, Boolean showNcaIndex, Boolean fixHashes, Boolean noAutoRcm, Boolean mariko) at EmmcHaccGen.Program.Main(String keys, String fw, Boolean noExfat, Boolean verbose, Boolean showNcaIndex, Boolean fixHashes, Boolean noAutorcm, Boolean mariko) --- End of inner exception stack trace --- at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) at System.CommandLine.Invocation.ModelBindingCommandHandler.InvokeAsync(InvocationContext context) at System.CommandLine.Invocation.InvocationPipeline.<>cDisplayClass4_0.<b0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<b20_0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>cDisplayClass15_0.<b0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>cDisplayClass24_0.<b0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>cDisplayClass22_0.<b0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<b21_0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<b19_0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<b__11_0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<b10_0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>cDisplayClass6_0.<b0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>cDisplayClass13_0.<b0>d.MoveNext()

Luiaves commented 1 year ago

fixed it by grabbing firmware from a website not from tegra. bin thingy

suchmememanyskill commented 1 year ago

This happens when you are trying to generate from .nca files that have differering versions between meta and data files, seemingly pointing to an invalid firmware. Not a bug