]> Chaos Git - console/XDS.git/commitdiff
Added NAND dump generation with decrypted CIAs
authorYifan Lu <me@yifanlu.com>
Fri, 25 Mar 2016 01:55:03 +0000 (20:55 -0500)
committerYifan Lu <me@yifanlu.com>
Fri, 25 Mar 2016 01:55:03 +0000 (20:55 -0500)
Added basic build instructions to readme

NAND/title/build_nand.py [new file with mode: 0644]
README.md

diff --git a/NAND/title/build_nand.py b/NAND/title/build_nand.py
new file mode 100644 (file)
index 0000000..d5d2828
--- /dev/null
@@ -0,0 +1,25 @@
+#!/bin/python
+import glob
+import os
+import sys
+
+def main():
+  if len(sys.argv) < 2:
+    print 'invalid directory specified'
+    return
+
+  for i in os.listdir(sys.argv[1]):
+    tid_high = i[0:8]
+    tid_low = i[8:16]
+    outdir = os.path.join('.', tid_high, tid_low, 'content')
+    if not os.path.exists(outdir):
+      os.makedirs(outdir)
+    cia = os.path.join(sys.argv[1], i)
+    os.system("./ctrtool --tmd=" + outdir + "/00000000.tmd --contents=" + outdir + "/contents '" + cia + "'")
+    items = glob.glob(outdir + '/contents.*')
+    for item in items:
+      cid = item[-8:]
+      os.rename(item, os.path.join(outdir,cid + '.app'))
+
+if __name__ == "__main__":
+  main()
\ No newline at end of file
index 28c72d51a91c9bbfb7c57f127268e6931b3c13d2..061f818fd3d841137cc85f3206dc3e9031d549c7 100644 (file)
--- a/README.md
+++ b/README.md
@@ -4,4 +4,13 @@ thanks to
 plutooo
 Normmatt
 Bond697
-who helped me create XDS
\ No newline at end of file
+who helped me create XDS
+
+To build XDS, first build external/gl3w
+On Windows, use windows/xds.sln
+On OSX, install libglfw3 (Makefile assumes its installed with MacPorts), then 
+run `make`
+
+To generate a NAND dump of the firmware, decrypt all CIAs for the firmware and 
+run `python NAND/title/build_nand.py dir/to/cias` and the decrypted firmware 
+will be placed into the correct directories. You also need ctrtool for this.