uplift bdk

Signed-off-by: Damien Zhao <zdm65477730@126.com>
This commit is contained in:
Damien Zhao
2023-04-02 13:21:57 +08:00
parent cf553f87dd
commit c9b22b2a36
24 changed files with 868 additions and 467 deletions

View File

@@ -3,6 +3,7 @@
#include "gfx.h"
#include "gfxutils.h"
#include "../hid/hid.h"
#include <soc/timer.h>
#include <utils/util.h>
#include <utils/btn.h>
#include <utils/sprintf.h>

View File

@@ -34,6 +34,25 @@
#include <string.h>
#define TSEC_KEY_DATA_OFFSET 0x300
typedef struct _tsec_key_data_t
{
u8 debug_key[0x10];
u8 blob0_auth_hash[0x10];
u8 blob1_auth_hash[0x10];
u8 blob2_auth_hash[0x10];
u8 blob2_aes_iv[0x10];
u8 hovi_eks_seed[0x10];
u8 hovi_common_seed[0x10];
u32 blob0_size;
u32 blob1_size;
u32 blob2_size;
u32 blob3_size;
u32 blob4_size;
u8 reserved[0x7C];
} tsec_key_data_t;
extern hekate_config h_cfg;
#define DPRINTF(x)

View File

@@ -7,6 +7,7 @@
#include "lexer.h"
#include <storage/sd.h>
#include <soc/timer.h>
#include "../fs/fsutils.h"
#include "../gfx/gfxutils.h"
#include "../hid/hid.h"

View File

@@ -167,7 +167,7 @@ ErrCode_t DumpOrWriteEmmcPart(const char *path, const char *part, u8 write, u8 f
else {
emummc_storage_set_mmc_partition(&emmc_storage, 0);
emmc_part_t *system_part = nx_emmc_part_find(GetCurGPT(), part);
emmc_part_t *system_part = emmc_part_find(GetCurGPT(), part);
if (!system_part)
return newErrCode(TE_ERR_PARTITION_NOT_FOUND);

View File

@@ -40,7 +40,7 @@ void disconnectMMC(){
if (TConf.currentMMCConnected != MMC_CONN_None){
TConf.currentMMCConnected = MMC_CONN_None;
emummc_storage_end(&emmc_storage);
nx_emmc_gpt_free(&curGpt);
emmc_gpt_free(&curGpt);
}
}
@@ -55,7 +55,7 @@ int connectMMC(u8 mmcType){
if (!res){
TConf.currentMMCConnected = mmcType;
emummc_storage_set_mmc_partition(&emmc_storage, 0);
nx_emmc_gpt_parse(&curGpt, &emmc_storage);
emmc_gpt_parse(&curGpt);
}
return res; // deal with the errors later lol
@@ -69,7 +69,7 @@ ErrCode_t mountMMCPart(const char *partition){
emummc_storage_set_mmc_partition(&emmc_storage, 0); // why i have to do this twice beats me
emmc_part_t *system_part = nx_emmc_part_find(&curGpt, partition);
emmc_part_t *system_part = emmc_part_find(&curGpt, partition);
if (!system_part)
return newErrCode(TE_ERR_PARTITION_NOT_FOUND);

View File

@@ -19,6 +19,7 @@
#include <string.h>
#include "../fs/fscopy.h"
#include "../utils/utils.h"
#include <soc/timer.h>
void DumpSysFw(){
char sysPath[25 + 36 + 3 + 1]; // 24 for "bis:/Contents/registered", 36 for ncaName.nca, 3 for /00, and 1 to make sure :)

View File

@@ -3,6 +3,7 @@
#include <utils/types.h>
#include <mem/heap.h>
#include <utils/util.h>
#include <soc/timer.h>
#include "vector.h"
#include "../gfx/gfxutils.h"
#include "../gfx/gfx.h"