Hacking NUSPacker - pack files into installable packages

Billy Acuña

Well-Known Member
Member
Joined
Oct 10, 2015
Messages
3,126
Trophies
1
Age
31
XP
3,701
Country
Mexico
Repacking an app doesn't give it magically new, implemented features
Yeah, but I don't think is that hard to give USB support on a rpx Loadiine, but due the lack of documentation and how worthless would be an installable Loadiine, well... you know [emoji14]
 
D

Deleted User

Guest
Yeah, but I don't think is that hard to give USB support on a rpx Loadiine, but due the lack of documentation and how worthless would be an installable Loadiine, well... you know [emoji14]
Currently, it is possible to have direct filesystem access on the Wii U itself, by launching an iosuhax firmware capable of WUPServer, at which point we can directly communicate with it using sockets. It is essentially running WUPServer and WUPClient (you know, the python script?) on the same device.

Haven't seen anyone try this yet, though.
 
  • Like
Reactions: Billy Acuña

Jayro

MediCat USB Dev
Developer
Joined
Jul 23, 2012
Messages
13,007
Trophies
4
Location
WA State
Website
ko-fi.com
XP
17,112
Country
United States
  • Like
Reactions: Quantumcat

Billy Acuña

Well-Known Member
Member
Joined
Oct 10, 2015
Messages
3,126
Trophies
1
Age
31
XP
3,701
Country
Mexico
Currently, it is possible to have direct filesystem access on the Wii U itself, by launching an iosuhax firmware capable of WUPServer, at which point we can directly communicate with it using sockets. It is essentially running WUPServer and WUPClient (you know, the python script?) on the same device.

Haven't seen anyone try this yet, though.
Still worthless for Loadiine, but perhaps useful on FTPiiU and WUPinstaller [emoji14]
 
  • Like
Reactions: Deleted User

Maschell

Well-Known Member
Member
Joined
Jun 14, 2008
Messages
1,092
Trophies
2
XP
4,676
Country
Germany
Yeah, but I don't think is that hard to give USB support on a rpx Loadiine
At first we need to way to mount a NTFS (or at least fat32) USB device and this has nothing to do with elf or rpx. We probably need a driver.
But I mean on rednand we have signatures patched and can install everything on your external hdd. Do we really need loadiine hdd support?

For mods we just need to allow sd access in every app and use cafiine
 

timogus

Member
OP
Newcomer
Joined
Oct 28, 2016
Messages
22
Trophies
0
Age
37
XP
258
Country
United States
Done. Download from quantumc.at
Any suggestions welcome. All this currently does is pass on what you type to NUSPacker and prints the output in the text area at the bottom.
View attachment 68187
At first thanks.
But when we have a GUI, we should use it for the things we currently CAN'T adjust using the command line.
Like modifing the ContentRules and replace the hardcoded values in the TMD ;)
 

Quantumcat

Dead and alive
Member
Joined
Nov 23, 2014
Messages
15,144
Trophies
0
Location
Canberra, Australia
Website
boot9strap.com
XP
11,119
Country
Australia
At first thanks.
But when we have a GUI, we should use it for the things we currently CAN'T adjust using the command line.
Like modifing the ContentRules and replace the hardcoded values in the TMD ;)
Do you have a specific suggestion? I'll go through the NUSPacker code and try to understand it, then you can PM me what you think the GUI should be able to do (specifically).
 

morpheous

Well-Known Member
Member
Joined
Apr 2, 2009
Messages
159
Trophies
0
XP
445
Country
United States
Do you have a specific suggestion? I'll go through the NUSPacker code and try to understand it, then you can PM me what you think the GUI should be able to do (specifically).


I have an suggestion for you and its the most important feature! file splitting of big files over 4gb on fat32 file system!

I converted Black ops II for wii u but couldn't transfer the 0000000B.app file that is 18.7gb in size. :(

The application needs to be able to limited files to under 4gb, when converting big files or split them, whatever way is feasible.


Anyway to get around this while i wait for this feature?
 
Last edited by morpheous,
  • Like
Reactions: Don Jon

LoganK93

Well-Known Member
Member
Joined
Dec 5, 2012
Messages
672
Trophies
1
Age
31
XP
1,992
Country
United States
Can anyone help me get this working? I'd like to repack a ds vc title with a custom ROM. It always claims I have no code content or meta folders even though I am pointing it to the right directory.
 

timogus

Member
OP
Newcomer
Joined
Oct 28, 2016
Messages
22
Trophies
0
Age
37
XP
258
Country
United States
I have an suggestion for you and its the most important feature! file splitting of big files over 4gb on fat32 file system!

I converted Black ops II for wii u but couldn't transfer the 0000000B.app file that is 18.7gb in size. :(

The application needs to be able to limited files to under 4gb, when converting big files or split them, whatever way is feasible.

Anyway to get around this while i wait for this feature?

Currently I guess its limited to 2gb. I need to figure out a smart way to split the content automatically between serveral .app files when they get bigger than 2gb.
I tested repacking NSMBU though. 1,7gb and 1000+ files. worked fine =)

You need to extened the content rules. Today I'll try t implement an auto-detection.

Otherwise you can try to do it manually, just write the rules on your own:
https://bitbucket.org/timogus/nuspa...&fileviewer=file-view-default#Starter.java-92

Doing something like (each rule will create a new .app file
Code:
/*000000??*/ rules.createNewRule("/content/.*", common_details_content);
/*000000??*/ rules.createNewRule("/content/packages/.*", common_details_content);
/*000000??*/ rules.createNewRule("/content/movies/.*", common_details_content);
/*000000??*/ rules.createNewRule("/content/bigfile123.bin", common_details_content);
/*000000??*/ rules.createNewRule("/content/assets/models/.*", common_details_content);
In each rule you define a regular expression that has to fit to number of files where the totalfilesize is <2gb (maybe 4gb, didn't test it though)

Notice that the order may be important. You need to order it from the least to the most specific (otherwise the rules will be overwrittten). Each file will be assigned to last .app it gets assinged to. (And make sure to assign ALL files, otherwise NUSPacker will fail)

@Quantumcat for example this!
 
Last edited by timogus,

daxtsu

Well-Known Member
Member
Joined
Jun 9, 2007
Messages
5,627
Trophies
2
XP
5,194
Country
Antarctica
I can't get this to work for the life of me. When I specify a directory that contains code, meta, and content subdirectories (and their relevant contents), it just throws a NullPointerException when generating the FST. Any ideas?

Code:
>java -jar NUSPacker.jar -in "hbl" -out "out" -tID 0005000013371337 -encryptionKey 1371337133713371337133713371337 -encryptKeyWith <Wii U common key removed, and the original doesn't have <>'s>

Directory structure
Code:
└─hbl
   ├─code
   ├─content
   └─meta

Java version:
Code:
>java -version
java version "1.8.0_111"
Java(TM) SE Runtime Environment (build 1.8.0_111-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.111-b14, mixed mode)

Output:

Code:
NUSPacker 0.1 - alpha

Files read. Set it to content files.
-----
Apply rule /code/app.xml
Set content to 00000001 for: /code/app.xml
-----
Apply rule /code/cos.xml
Set content to 00000002 for: /code/cos.xml
-----
Apply rule /meta/meta.xml
Set content to 00000003 for: /meta/meta.xml
-----
Apply rule /meta/.*[^.xml]+
Set content to 00000004 for: /meta/bootDrcTex.tga
Set content to 00000004 for: /meta/bootLogoTex.tga
Set content to 00000004 for: /meta/bootMovie.h264
Set content to 00000004 for: /meta/bootSound.btsnd
Set content to 00000004 for: /meta/bootTvTex.tga
Set content to 00000004 for: /meta/iconTex.tga
Set content to 00000004 for: /meta/Manual.bfma
-----
Apply rule /meta/bootMovie.h264
Set content to 00000005 for: /meta/bootMovie.h264
-----
Apply rule /meta/bootLogoTex.tga
Set content to 00000006 for: /meta/bootLogoTex.tga
-----
Apply rule /meta/Manual.bfma
Set content to 00000007 for: /meta/Manual.bfma
-----
Apply rule /code/.*(.rpx|.rpl)
Set content to 00000008 for: /code/homebrew_launcher.rpx
Trying /code/.*(.rpx|.rpl)to/content/
-----
Apply rule /code/preload.txt
No file matched the rule. Lets delete the content again
-----
Apply rule /content/.*
Set content to 00000009 for: /content/
-----
Generating the FST.
Exception in thread "main" java.lang.NullPointerException
        at com.tim.wuppacker.fst.FSTEntry.getFSTEntriesByContent(FSTEntry.java:5
24)
        at com.tim.wuppacker.fst.FSTEntry.getFSTEntriesByContent(FSTEntry.java:5
28)
        at com.tim.wuppacker.fst.FSTEntries.getFSTEntriesByContent(FSTEntries.ja
va:50)
        at com.tim.wuppacker.utils.Contents.update(Contents.java:167)
        at com.tim.wuppacker.fst.FST.update(FST.java:39)
        at com.tim.wuppacker.NUSPackageFactory.createNewPackage(NUSPackageFactor
y.java:48)
        at com.tim.wuppacker.Starter.main(Starter.java:94)
 
Last edited by daxtsu,

Zarklord

Well-Known Member
Member
Joined
May 13, 2016
Messages
194
Trophies
0
Age
25
XP
268
Country
United States
I can't get this to work for the life of me. When I specify a directory that contains code, meta, and content subdirectories (and their relevant contents), it just throws a NullPointerException when generating the FST. Any ideas?

Code:
>java -jar NUSPacker.jar -in "hbl" -out "out" -tID 0005000013371337 -encryptionKey 1371337133713371337133713371337 -encryptKeyWith <Wii U common key removed, and the original doesn't have <>'s>

Directory structure
Code:
└─hbl
   ├─code
   ├─content
   └─meta

Java version:
Code:
>java -version
java version "1.8.0_111"
Java(TM) SE Runtime Environment (build 1.8.0_111-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.111-b14, mixed mode)

Output:

Code:
NUSPacker 0.1 - alpha

Files read. Set it to content files.
-----
Apply rule /code/app.xml
Set content to 00000001 for: /code/app.xml
-----
Apply rule /code/cos.xml
Set content to 00000002 for: /code/cos.xml
-----
Apply rule /meta/meta.xml
Set content to 00000003 for: /meta/meta.xml
-----
Apply rule /meta/.*[^.xml]+
Set content to 00000004 for: /meta/bootDrcTex.tga
Set content to 00000004 for: /meta/bootLogoTex.tga
Set content to 00000004 for: /meta/bootMovie.h264
Set content to 00000004 for: /meta/bootSound.btsnd
Set content to 00000004 for: /meta/bootTvTex.tga
Set content to 00000004 for: /meta/iconTex.tga
Set content to 00000004 for: /meta/Manual.bfma
-----
Apply rule /meta/bootMovie.h264
Set content to 00000005 for: /meta/bootMovie.h264
-----
Apply rule /meta/bootLogoTex.tga
Set content to 00000006 for: /meta/bootLogoTex.tga
-----
Apply rule /meta/Manual.bfma
Set content to 00000007 for: /meta/Manual.bfma
-----
Apply rule /code/.*(.rpx|.rpl)
Set content to 00000008 for: /code/homebrew_launcher.rpx
Trying /code/.*(.rpx|.rpl)to/content/
-----
Apply rule /code/preload.txt
No file matched the rule. Lets delete the content again
-----
Apply rule /content/.*
Set content to 00000009 for: /content/
-----
Generating the FST.
Exception in thread "main" java.lang.NullPointerException
        at com.tim.wuppacker.fst.FSTEntry.getFSTEntriesByContent(FSTEntry.java:5
24)
        at com.tim.wuppacker.fst.FSTEntry.getFSTEntriesByContent(FSTEntry.java:5
28)
        at com.tim.wuppacker.fst.FSTEntries.getFSTEntriesByContent(FSTEntries.ja
va:50)
        at com.tim.wuppacker.utils.Contents.update(Contents.java:167)
        at com.tim.wuppacker.fst.FST.update(FST.java:39)
        at com.tim.wuppacker.NUSPackageFactory.createNewPackage(NUSPackageFactor
y.java:48)
        at com.tim.wuppacker.Starter.main(Starter.java:94)
you need a file in "content"
 
D

Deleted User

Guest
At first we need to way to mount a NTFS (or at least fat32) USB device and this has nothing to do with elf or rpx. We probably need a driver.
But I mean on rednand we have signatures patched and can install everything on your external hdd. Do we really need loadiine hdd support?

For mods we just need to allow sd access in every app and use cafiine
Actually, if the mod in question only requires modifications to the /vol/content folder, we don't even need signature patches to install it to sysNAND.
 
  • Like
Reactions: KiiWii

Tarantus

Well-Known Member
Member
Joined
Mar 11, 2015
Messages
105
Trophies
0
Age
37
Location
-24.100361, -45.689251
Website
ow.ly
XP
137
Country
Brazil
Since now we can use CFWBooter with sysNAND to install our DLCs and eShops to a USB device, would this process be possible to repack a Loadiine backup and let us install it with the title.tik from the game disc?
 

LoganK93

Well-Known Member
Member
Joined
Dec 5, 2012
Messages
672
Trophies
1
Age
31
XP
1,992
Country
United States
OK I'm still getting the same error as daxtsu but there is definitely stuff in every folder. All I'm wanting to do is inject a ds ROM, change title id, repack and install.
 

LoganK93

Well-Known Member
Member
Joined
Dec 5, 2012
Messages
672
Trophies
1
Age
31
XP
1,992
Country
United States
Ok I am getting: Exception in thread "main" java.lang.StringIndexOutBoundsException: String index out of range: 33

Edit: Finally made an installable package but WUPInstaller doesn't seem to like it. error FFFBF442
 
Last edited by LoganK93,

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Psionic Roshambo @ Psionic Roshambo: https://youtu.be/ajurvXsCdbo?t=225 +1