Homebrew RELEASE Awoo Installer - A No-Bullshit NSP/NSZ/XCI/XCZ Installer Based on Tinfoil

Huntereb

Well-Known Member
OP
Member
Joined
Sep 1, 2013
Messages
3,234
Trophies
0
Website
lewd.pics
XP
2,446
Country
United States
Nope, have issues adding the base game, update and all 88 DLCs to the installer through usb.
I've tested sending hundreds of files to Awoo Installer with the original Tinfoil python script and it works fine, so this might be a NS-USBloader issue. In the meantime, it's very easy to select maybe half of the files you're attempting to install, and install them in separate batches.

Not so lucky here. Most games got corrupted after mass install .nsz updates.
This is the same problem I encountered ahen installing nsz. Have all sigpatches installed. Nsz are all working fine except when I installed them using awoo they stopped working.
If you're installing over USB, make sure you're updated to the latest version of NS-USBloader. Previous versions have issues with NSZ installations. We've installed countless personal NSZ files of varying sizes on the latest version without a hitch.
 

GnK23

Well-Known Member
Member
Joined
Apr 6, 2016
Messages
170
Trophies
0
Age
35
XP
671
Country
United States
I've tested sending hundreds of files to Awoo Installer with the original Tinfoil python script and it works fine, so this might be a NS-USBloader issue. In the meantime, it's very easy to select maybe half of the files you're attempting to install, and install them in separate batches.



If you're installing over USB, make sure you're updated to the latest version of NS-USBloader. Previous versions have issues with NSZ installations. We've installed countless personal NSZ files of varying sizes on the latest version without a hitch.
yes im using the latest one. 0.9.1 some nsz work but most don't
 

duckbill007

Well-Known Member
Member
Joined
May 5, 2011
Messages
691
Trophies
1
XP
2,473
Country
Russia
What issues can have NS-USBloader? It just sends file content. It does not process files at all. Just open, seek to desired offset and send requested number of bytes to awoo. So, all issues can be on switch side.

Also - the filelist it just the same as file. CLOB of data, much less in size than 1Mb.
 

Huntereb

Well-Known Member
OP
Member
Joined
Sep 1, 2013
Messages
3,234
Trophies
0
Website
lewd.pics
XP
2,446
Country
United States
yes im using the latest one. 0.9.1 some nsz work but most don't
Try installing the file over LAN or from your SD card. We've had issues with NSZ installs over USB in the past, and I've yet to hear anyone else complain about NSZ installations on 1.3.0 until just recently.

What issues can have NS-USBloader? It just sends file content. It does not process files at all. Just open, seek to desired offset and send requested number of bytes to awoo. So, all issues can be on switch side.
That's a very incorrect assumption. Please see the latest changelogs for NS-USBloader. We've had issues exclusively over USB in the past due to a timing issue causing invalid data to be sent PC-side.
 
  • Like
Reactions: mikifantastik98

duckbill007

Well-Known Member
Member
Joined
May 5, 2011
Messages
691
Trophies
1
XP
2,473
Country
Russia
As I know switch always read data via USB by full packet. If it want to read less data than there are in buffer, extra bytes are dropped.
On PC side libusb raises an exception in this case (at least 0.1 at linux and mac, thats why adubbz fixes his python script for mac (see in his repo)).

If I correct understand goldleaf/quark usb code it always tries to read full packet (512 bytes for usb2, other for 1.1 and 3.0), then breaks by timeout and analyze actual read bytes. This way it gets lower speed, but no data loss.

Just checked how NS-USBloader sends file list: if sends header, then length, then actual list. All in separate writeUsb calls. I have no idea how these separate calls are wrapped into usb packets. Maybe some are glued together. If size and data are goes to the same packet, then start of data will be lost if switch will read only size and data on next read call.

So, I think awoo should always try to read full packets and create its own buffered pipe for USB in endpoint.
 

Huntereb

Well-Known Member
OP
Member
Joined
Sep 1, 2013
Messages
3,234
Trophies
0
Website
lewd.pics
XP
2,446
Country
United States
So, I think awoo should always try to read full packets and create its own buffered pipe for USB in endpoint.
Awoo Installer reads that data as a single packet, it just waits for all of the expected data to be received. If it doesn't get the data within a certain time limit it will kick you back to the main menu, or present an incomplete list of files.

I'll look into this in the coming days, I'm sure it's probably something simple.
 

duckbill007

Well-Known Member
Member
Joined
May 5, 2011
Messages
691
Trophies
1
XP
2,473
Country
Russia
Awoo Installer reads that data as a single packet,
No it is not.
First it reads header:
https://github.com/Huntereb/Awoo-Installer/blob/1.3.0/source/usbInstall.cpp#L54
And right after that it reads data:
https://github.com/Huntereb/Awoo-Installer/blob/1.3.0/source/usbInstall.cpp#L68

NS-USBloader sends all of this as separate calls to USB write, but not do any flashes, so, technically start of data can be in the same usb packet as end of header. In this case awoo will read header, lose start of data, read end of data, will wait for more data (which is not) and catch timeout.
 

Huntereb

Well-Known Member
OP
Member
Joined
Sep 1, 2013
Messages
3,234
Trophies
0
Website
lewd.pics
XP
2,446
Country
United States
No it is not.
First it reads header:
https://github.com/Huntereb/Awoo-Installer/blob/1.3.0/source/usbInstall.cpp#L54
And right after that it reads data:
https://github.com/Huntereb/Awoo-Installer/blob/1.3.0/source/usbInstall.cpp#L68

NS-USBloader sends all of this as separate calls to USB write, but not do any flashes, so, technically start of data can be in the same usb packet as end of header. In this case awoo will read header, lose start of data, read end of data, will wait for more data (which is not) and catch timeout.

The problem is unrelated to the initial header packet, as it's always the same size. The problem is when receiving the larger second packet containing the list of file names. Both of these are read as a "single packet". From what @developer_su has told me, this is likely related to memory alignment. Fortunately it's an easy fix.

And as I've said before, feel free to submit a PR if you have the ability to figure out any issues you run across. :)
 
  • Like
Reactions: developer_su

duckbill007

Well-Known Member
Member
Joined
May 5, 2011
Messages
691
Trophies
1
XP
2,473
Country
Russia
OK. You know your code better. Yes, header and file list are read into unaligned memory and this can easily be fixed.

I just wonder, why problem occurs at ~50 filenames. For usb 1.1 packet size is 64 bytes, for USB 2 - 512, for USB 3 - 1024. All are way smaller than 50 filenames, which is around 2.5-3K.

Also I tried on USB2 and USB3 ports. Error occurs with the same file count not related to packet size.
 

Crusard

Well-Known Member
Member
Joined
Jan 22, 2015
Messages
182
Trophies
0
Age
29
XP
1,871
Country
i just tried out. Simple and fast.
I really like NSP bulk installs.
USB speeds:
- NSP: 33-41MB (Good speed)
- NSZ 16-25MB (Ok Speed)
No errors over 10 NSZ installed.

Very good alternative to Goldleaf.

Good Work @Huntereb , keep going!
 
  • Like
Reactions: Huntereb

Huntereb

Well-Known Member
OP
Member
Joined
Sep 1, 2013
Messages
3,234
Trophies
0
Website
lewd.pics
XP
2,446
Country
United States
OK. You know your code better. Yes, header and file list are read into unaligned memory and this can easily be fixed.

I just wonder, why problem occurs at ~50 filenames. For usb 1.1 packet size is 64 bytes, for USB 2 - 512, for USB 3 - 1024. All are way smaller than 50 filenames, which is around 2.5-3K.

Also I tried on USB2 and USB3 ports. Error occurs with the same file count not related to packet size.
I've just committed the memory alignment fix. I am able to send 250+ NSP files with NS-USBloader on Windows 10, and install them just fine.

https://github.com/Huntereb/Awoo-Installer/commit/fd2cfd29d95609bd248ef95521f6b251b44a0a1a
 

JJTapia19

I fight for my friends.
Member
Joined
May 31, 2015
Messages
2,171
Trophies
1
Age
32
XP
2,438
Country
Puerto Rico
Every time I open the app I get a light blue screen and my emunand gets locked. I need to hard turn off. Does someone know what cause this?
 

glencoe2004

Member
Newcomer
Joined
Jul 24, 2019
Messages
18
Trophies
0
Age
51
XP
205
Country
Canada
Blocking access to use the app if you’re using a particular cfw (especially as it works fine with said cfw) doesn’t seem very user friendly, it’s petty if anything. Not sure why you’re happy with this.

It's fucking XorTroll, man. His rabid anti-SXOS and blawar hatred should be well known by now.
 
Last edited by glencoe2004,

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Veho @ Veho: https://www.keepretro.com/products/miyoo-a30