Modified launcher TMD wasn't written, and HWInfo reading was broken.
This commit is contained in:
parent
647ae53632
commit
d06223ef97
41
makenand.sh
41
makenand.sh
@ -93,14 +93,28 @@ export MTOOLSRC=./mtoolsrc
|
||||
# The status variable will contain the region byte of the launcher TID.
|
||||
#
|
||||
# Probably not a bad idea to confirm that the TID is for an known region.
|
||||
HWINFO_STATUS=$(python hwinfo.py --consoleid 084109149469a108 --hwinfo TJH101232355.dat verify)
|
||||
if [[ "$2" == "" ]]; then
|
||||
echo ">>> Region not found! Setting as 'ALL'."
|
||||
echo ">>> Factory firmware will be used."
|
||||
REGION_CODE="ALL"
|
||||
else
|
||||
|
||||
nogba_consoleid=$(echo $3 | tac -rs .. | echo "$(tr -d '\n')")
|
||||
python hwinfo.py --consoleid $nogba_consoleid --hwinfo $2 verify
|
||||
if [[ "$2" != "" ]]; then
|
||||
if [[ "$CONSOLE_SIGNING" == "dev" ]]; then
|
||||
HWINFO_STATUS=$(python hwinfo.py --consoleid $nogba_consoleid --hwinfo $2 --dev verify)
|
||||
else
|
||||
HWINFO_STATUS=$(python hwinfo.py --consoleid $nogba_consoleid --hwinfo $2 verify)
|
||||
fi
|
||||
|
||||
if [[ "$HWINFO_STATUS" == "Signature is valid" ]] && [[ "$2" != "" ]]; then
|
||||
REGION_CODE=$(xxd -p -s 160 -l 1 "$2")
|
||||
echo ">>> Region is $REGION_CODE"
|
||||
else
|
||||
echo ">>> HWInfo is bad, so region was not found! Setting as ALL."
|
||||
echo ">>> Factory firmware will be used."
|
||||
REGION_CODE="ALL"
|
||||
fi
|
||||
else
|
||||
echo ">>> HWInfo is bad, so region was not found! Setting as ALL."
|
||||
echo ">>> Factory firmware will be used."
|
||||
REGION_CODE="ALL"
|
||||
fi
|
||||
|
||||
# Make system folders
|
||||
@ -153,8 +167,8 @@ while IFS= read -r FILE; do
|
||||
# This is only needed for region specific firmware. Since ALL/HNAA has the backup unlaunch as a TMD, it will automatically trigger.
|
||||
if [[ "$FILE" == *"00030017"* ]] && [[ "$FILE" == *"title.tmd" ]]; then
|
||||
cp "./donor/$CONSOLE_SIGNING/software/$FILE" "./tmp.tmd"
|
||||
echo "47" | dd of="./tmp.tmd" bs=1 seek=400 conv=notrunc status=none
|
||||
mcopy -D o "./tmd.tmd" "d:/$FILE"
|
||||
printf "G" | dd of="./tmp.tmd" bs=1 seek=400 conv=notrunc status=none
|
||||
mcopy -D o "./tmp.tmd" "d:/$FILE"
|
||||
else
|
||||
mcopy -D o "./donor/$CONSOLE_SIGNING/software/$FILE" "d:/$FILE"
|
||||
fi
|
||||
@ -169,10 +183,10 @@ while IFS= read -r FILE; do
|
||||
echo ">>> Writing ticket..."
|
||||
# Encrypt ticket to console.
|
||||
./twltool syscrypt --consoleid $3 --in "./donor/$CONSOLE_SIGNING/software/$FILE" --out "./tmp.tik" --encrypt
|
||||
mcopy "./tmp.tik" "d:/$FILE"
|
||||
mcopy -D o "./tmp.tik" "d:/$FILE"
|
||||
else
|
||||
echo ">>> Moving title datas..."
|
||||
mcopy "./donor/$CONSOLE_SIGNING/software/$FILE" "d:/$FILE"
|
||||
mcopy -D o "./donor/$CONSOLE_SIGNING/software/$FILE" "d:/$FILE"
|
||||
fi
|
||||
done < "./donor/$CONSOLE_SIGNING/software/ALL.txt"
|
||||
|
||||
@ -180,13 +194,6 @@ done < "./donor/$CONSOLE_SIGNING/software/ALL.txt"
|
||||
makemdirs "title/00030017/484e4141/content/title.tmd" "d:"
|
||||
mcopy -D o "./donor/hb/HNAALaunch.tmd" "d:/title/00030017/484e4141/content/title.tmd"
|
||||
|
||||
nogba_consoleid=$(echo $3 | tac -rs .. | echo "$(tr -d '\n')")
|
||||
if [[ "$CONSOLE_SIGNING" == "dev" ]]; then
|
||||
HWINFO_STATUS=$(python hwinfo.py --consoleid $nogba_consoleid --hwinfo $2 --dev verify)
|
||||
else
|
||||
HWINFO_STATUS=$(python hwinfo.py --consoleid $nogba_consoleid --hwinfo $2 verify)
|
||||
fi
|
||||
|
||||
if [[ "$HWINFO_STATUS" == "Signature is invalid" ]] || [[ "$2" == "" ]]; then
|
||||
echo ">>> HWInfo is bad! HNAA unlaunch will be needed."
|
||||
else
|
||||
|
||||
Loading…
Reference in New Issue
Block a user