Hacking [Wii] [vWii] libruntimeiospatch

Excelsiior

Well-Known Member
OP
Member
Joined
Sep 13, 2009
Messages
274
Trophies
0
Website
www.nanolx.org
XP
328
Country
Germany
libruntimeiospatch (short: -lrip) is a library that provides all necessary functions for HW_AHBPROT (thanks to anyone involved in that). As of now all apps have their own code for that (IF they have), but I believe a library is better in this case, as on updates one does only need to update -lrip and re-link the Homebrews, rather than updating the code for every single Homebrew. (If you don't know what this is good for, you have no need for it)

Developers take all other infos from supplied API file.

It's part of the HomebrewFilter, so the source can be found in it's GIT repo (subfolder "libruntimeiospatch").

Installation:
runtimeiospatch.h => <DEVKITPPC>/libogc/include/
libruntimeiospatch.a => <DEVKITPPC>/libogc/lib/wii/

Download:
Source: http://downloads.nanolx.org/libruntimeiospatch
GIT: https://github.com/Nanolx/homebrewfilter

Changes:
1.5.3:
* changed layout of debug text to ensure it's always visible
* added colors to debug text
- cyan: headings
- green: patch succeeded
- red: patch failed

1.5.2:
* added SSL module patches made by FIX94 to fix some certificate
errors that occur when attempting to connect to a host using a
secure connection (DarkMatterCore)

1.5.1:
* code clean-up (JoostinOnline)
* add typedef for s32 (JoostinOnline)
* misc minor changes (JoostinOnline)

1.5:
* add ISFS_SetAttr() patches. (megazig)
Forces the ISFS_SetAttr() function to continue instead of
returning -102 when you're trying to change the UID/GID of a file.
 
Last edited by Excelsiior, , Reason: version 1.5.3

Excelsiior

Well-Known Member
OP
Member
Joined
Sep 13, 2009
Messages
274
Trophies
0
Website
www.nanolx.org
XP
328
Country
Germany
There's now v1.2 available (links in first post)

Code:
1.2:
[NEW]    get_libruntimeiospatch_version()
[MOD]    IosPatch_AHBPROT() - return code re-work
[MOD]    IosPatch_RUNTIME() - return code re-work
[MOD]    IosPatch_FULL() - retun code re-work
[MOD]    API doc file updated
[NEW]    CHANGES doc file
 
1.1:
[NEW]    IosPatch_FULL()
[MOD]    IosPatch_AHBPROT() - proper return work
[NEW]    API doc file
 
1.0: initial release
[NEW]    have_ahbprot()
[NEW]    IosPatch_AHBPROT()
[NEW]    IosPatch_RUNTIME()
 

DarkMatterCore

Finding my light.
Developer
Joined
May 30, 2009
Messages
1,292
Trophies
1
Age
28
Location
Madrid, Spain
Website
github.com
XP
2,605
Country
Spain
So with this added to xyzzy and FS Toolbox, we can dump the untouched NAND directly after game exploit?

Not exactly. Xyzzy doesn't actually require these IOS patches to work, since we can just inherit full hardware access from the HBC and read the OTP and SEEPROM data (which is precisely what my unofficial version does). Quite easy.

And, well, there is already a FSToolbox mod, which was done by Excelsiior, too. And yes, it uses these patches. ;)
 
  • Like
Reactions: [Truth]

Cyan

GBATemp's lurking knight
Former Staff
Joined
Oct 27, 2002
Messages
23,749
Trophies
4
Age
45
Location
Engine room, learning
XP
15,649
Country
France
yes, some homebrew are already using this library/souces v1.3, for example FSToolbox 0.4d, Settings Editor GUI 1.9.
Maybe other homebrew too, I didn't check others.
 

SifJar

Not a pirate
Member
Joined
Apr 4, 2009
Messages
6,022
Trophies
0
Website
Visit site
XP
1,175
Country
yes, some homebrew are already using this library/souces v1.3, for example FSToolbox 0.4d, Settings Editor GUI 1.9.
Maybe other homebrew too, I didn't check others.
Plus it is essentially the same code as has been in use in dozens of apps over the last year or two (since HW_AHBPROT support was added to HBC), pretty much all apps that previously relied on IOS patches but were updated to use HW_AHBPROT. This is just the same code externalized.
 

Excelsiior

Well-Known Member
OP
Member
Joined
Sep 13, 2009
Messages
274
Trophies
0
Website
www.nanolx.org
XP
328
Country
Germany
HomebrewFilter, SaveGame Manager GX (vWii build), YAWMM DE are also using libruntimeiospatch. Updated first post for v1.3

As SifJar said it's nothing special at all, just library providing the functions, so that in case of an update only the library needs code changes rather than every single application. An app then just needs a rebuild (just as older apps need no more than a rebuild against new libogc for WM+ support).
 

DarkMatterCore

Finding my light.
Developer
Joined
May 30, 2009
Messages
1,292
Trophies
1
Age
28
Location
Madrid, Spain
Website
github.com
XP
2,605
Country
Spain
You should include this new patch (sorry, I still don't get used to SourceForge :P):

Code:
const u8 isfs_setattr_pt1_old[] = { 0x42, 0xAB, 0xD0, 0x02, 0x20, 0x66 };
const u8 isfs_setattr_pt1_patch[] = { 0x42, 0xAB, 0xE0, 0x02, 0x20, 0x66 };
const u8 isfs_setattr_pt2_old[] = { 0x2D, 0x00, 0xD0, 0x02, 0x20, 0x66 };
const u8 isfs_setattr_pt2_patch[] = { 0x2D, 0x00, 0xE0, 0x02, 0x20, 0x66 };
 
s32 IosPatch_RUNTIME(bool wii, bool sciifii, bool vwii, bool verbose) {
 
    ...
 
    count += apply_patch("isfs_setattr_pt1", isfs_setattr_pt1_old, sizeof(isfs_setattr_pt1_old), isfs_setattr_pt1_patch, sizeof(isfs_setattr_pt1_patch), 0, verbose);
    count += apply_patch("isfs_setattr_pt2", isfs_setattr_pt2_old, sizeof(isfs_setattr_pt2_old), isfs_setattr_pt2_patch, sizeof(isfs_setattr_pt2_patch), 0, verbose);
 
    ...
}

It forces the ISFS_SetAttr() function to continue instead of returning -102 when you're trying to change the UID/GID of a file. It was done by megazig.

I have not checked vWii compatbility, though. Maybe someone else can do that for me?

Sorry for the necrobump, btw.
 

Cyan

GBATemp's lurking knight
Former Staff
Joined
Oct 27, 2002
Messages
23,749
Trophies
4
Age
45
Location
Engine room, learning
XP
15,649
Country
France
thanks.
I guess it's now v1.5.0? (doesn't really matter, but just for consistencies between all projects)

Code:
1.5:
* add ISFS_SetAttr() patches. (by megazig)
	Forces the ISFS_SetAttr() function to continue instead of
	returning -102 when you're trying to change the UID/GID of a file.

1.4:
* fix value for hash_old (spotted by DarkMatterCore)

.h
Code:
// Copyright (C) 2010		Joseph Jordan <[email protected]>
// Copyright (C) 2012-2013	damysteryman
// Copyright (C) 2012-2013	Christopher Bratusek <[email protected]>
// Copyright (C) 2013		DarkMatterCore
// Copyright (C) 2014		megazig


#ifndef _RUNTIMEIOSPATCH_H_
	#define _RUNTIMEIOSPATCH_H_

	#define LIB_RUNTIMEIOSPATCH_VERSION "1.5.0"
 

DarkMatterCore

Finding my light.
Developer
Joined
May 30, 2009
Messages
1,292
Trophies
1
Age
28
Location
Madrid, Spain
Website
github.com
XP
2,605
Country
Spain
Yeah, I think so. Right now I'm trying to find a way to correct the -115 (ENOTEMPTY) error that appears sometimes when calling ISFS_SetAttr() after applying this new patch. megazig doesn't have his IDBs anymore, though, and I don't have IDA Pro.
 

JoostinOnline

Certified Crash Test Dummy
Member
Joined
Apr 2, 2011
Messages
11,005
Trophies
1
Location
The Twilight Zone
Website
www.hacksden.com
XP
4,339
Country
United States
The license should also be changed from GPL to MIT, and a typedef needs to be added for s32
Code:
/*------------------------------------------------------------------------------
 
Copyright (C) 2010 Joseph Jordan <[email protected]>
Copyright (C) 2012-2013 damysteryman
Copyright (C) 2012-2013 Christopher Bratusek <[email protected]>
Copyright (C) 2013 DarkMatterCore
Copyright (C) 2014 megazig
 
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
 
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
 
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
------------------------------------------------------------------------------*/
Here is a zip file of an updated version of libruntimeiospatch. It's DarkMatterCore's changes and a few of my own that I've made over the past months (nothing special). The only thing that needs to be changed is the license, but I can't legally change that so I'll leave it to Excelsiior.
http://filebin.ca/18TZ1C4BjAvm/libruntimeiospatch_v1.5.2.zip
 
  • Like
Reactions: DarkMatterCore

Excelsiior

Well-Known Member
OP
Member
Joined
Sep 13, 2009
Messages
274
Trophies
0
Website
www.nanolx.org
XP
328
Country
Germany
Officially released v1.5.1 now, updated first post. Thanks to megazig, DarkMatterCore and JoostinOnline.

About the License: GPL is correct, as the original code was bundled with FTPii, which is gpl'ed.
 

Excelsiior

Well-Known Member
OP
Member
Joined
Sep 13, 2009
Messages
274
Trophies
0
Website
www.nanolx.org
XP
328
Country
Germany
Thanks to @DarkMatterCore there's now version 1.5.2 available.

Code:
1.5.2:
* added SSL module patches made by FIX94 to fix some certificate
  errors that occur when attempting to connect to a host using a
  secure connection (DarkMatterCore)

/on a side note: there's something wrong with the vWii-builds of the HomebrewFilter. So expect a minor update of it "soon".
 
  • Like
Reactions: DarkMatterCore

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Flame @ Flame: Never fight uphill, me boys.