Hacking Question Can you copy your EmuNAND to your SysNAND?

benfah

Member
OP
Newcomer
Joined
Jun 23, 2019
Messages
9
Trophies
0
Age
21
Website
github.com
XP
312
Country
Germany
Hello guys,
I'm currently facing a problem, that my SysNAND is bricked and I'm missing BOOT1.bin to restore my nand, yet my EmuNAND is intact. So, is there currently any way to Copy your EmuNAND to your SysNAND?

Thanks in advance,
benfah :)

Edit: I was able to restore my nand backup, because I made a backup of my BOOT0/1 and used the BOOT1 from the fresh backup with the BOOT0 of my old backup.
 
Last edited by benfah,

ksanislo

Well-Known Member
Member
Joined
Feb 23, 2016
Messages
386
Trophies
0
Location
Seattle, WA
XP
512
Country
United States
In case someone else needs this still, you can use the following bash script on a Mac or Linux computer to extract an emuMMC partition into files that can be restored to your sysMMC.


#!/bin/bash
# The device node for your sd card, yours may be different.
device=/dev/disk3

# emummc_sector from your .ini in decimal, not hex. 0x2 == 2 is the default SX location.
offset=2

#################################################################
# These values shouldn't change unless there's new hardware revision with a different size internal storage.
# All of these are in bytes.
sectorsize=512
nandsize=31276924928
maxsize=2147483648
bootsize=4194304

# The position is counted in sectors, not bytes.
position=0

# Dump our BOOT0 file
dd bs=${sectorsize} if=${device} of=BOOT0 skip=$(( ${offset} + ${position} )) count=$(( ${bootsize}/${sectorsize} ))
position=$(( ${position} + ${bootsize}/${sectorsize} ))

# Dump our BOOT1 file
dd bs=${sectorsize} if=${device} of=BOOT1 skip=$(( ${offset} + ${position} )) count=$(( ${bootsize}/${sectorsize} ))
position=$(( ${position} + ${bootsize}/${sectorsize} ))

# This loops over the rest and dumps the rawnand.bin.* files
while [ ${position} -lt $(( ${nandsize}/${sectorsize} )) ] ; do
if [ $(( ${position} + ${maxsize}/${sectorsize} )) -gt $(( ${nandsize}/${sectorsize} )) ] ; then
sectors=$(( ${nandsize}/${sectorsize} - ${position} ))
else
sectors=$(( ${maxsize}/${sectorsize} ))
fi

filename=$( printf "rawnand.bin.%02d" $(( (${position} - ${bootsize}/${sectorsize} * 2) / (${maxsize}/${sectorsize}) )) )

dd bs=${sectorsize} if=${device} of=${filename} skip=$(( ${offset} + ${position} )) count=${sectors}
position=$(( ${position} + ${sectors} ))
done
 
  • Like
Reactions: benfah and thaikhoa

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
  • BigOnYa @ BigOnYa:
    Damn that's cheap.
  • K3Nv2 @ K3Nv2:
    Slower speeds for gen4
  • K3Nv2 @ K3Nv2:
    I'll reformat and have a 3tb raid0 m. 2 at least
    +1
  • K3Nv2 @ K3Nv2:
    Lmao that sold out fast
    +1
  • Veho @ Veho:
    Yeet the cat.
    +1
  • K3Nv2 @ K3Nv2:
    Good idea
    +1
  • The Real Jdbye @ The Real Jdbye:
    i thought everybody knew cocktails are like 75% ice
  • Veho @ Veho:
    Yeah but not like this.
  • Veho @ Veho:
    It's not like they're complaining that their Slurpee is 99% ice or something, but if the cocktail calls for "shot of vodka, shot of vermouth, shot of gin, shot of Campari, three shots of juice, squirt of lemon" and ends up being a thimbleful of booze, that's a problem.
  • The Real Jdbye @ The Real Jdbye:
    the funny thing is cocktails in norway are only allowed to have 1 20ml shot of booze
  • The Real Jdbye @ The Real Jdbye:
    so..... yeah
  • The Real Jdbye @ The Real Jdbye:
    we're used to only having a thimbleful of booze
  • Veho @ Veho:
    Booo.
  • The Real Jdbye @ The Real Jdbye:
    same thing if you want whisky on the rocks or something, you can't get a double
  • The Real Jdbye @ The Real Jdbye:
    but you could buy as many shots of whisky (or anything else) as you want and ask for a glass of ice and pour them in
  • The Real Jdbye @ The Real Jdbye:
    it's dumb
  • Veho @ Veho:
    Maybe.
  • Veho @ Veho:
    There was a comparison of the number of Ibuprofen poisonings before and after they limited the maximum dosage per box or per pill (i'll look that up). No limit on the number of boxes you can still buy as many as you want, so people argued it was pointless.
  • Veho @ Veho:
    But the number of (accidental) poisonings dropped because drinking an entire package of ibuprofen pills went from "I need a new liver" to "I need a new box of Ibuprofen".
  • Veho @ Veho:
    Here we have ketoprofen that used to be prescription-only because of the risk of toxic dosages, but then they halved the dose per pill and sell them in bottles of six pills apiece instead of twenty and it doesn't need a prescription any more. Yes you can buy more than one bottle but people simply don't.
    Veho @ Veho: Here we have ketoprofen that used to be prescription-only because of the risk of toxic dosages...