Hacking DolBoot v1.0.2 by phpgeek

phpgeek

Well-Known Member
OP
Member
Joined
Feb 15, 2009
Messages
112
Trophies
0
XP
9
Country
File Updated to v1.0.3

I developed this tool to aid me in compiling the source for preloader. What it basically does is binds any homebrew application with the appropriate boot loader, calculates the correct offsets and modifies the dol header accordingly. The modified dol will then be able to legally boot in place of the systems menu. It can easily be linked with devkitPro to create a seamless compilation process, for any developer who wishes to develop an application that replaces the systems menu.

This is a dangerous tool if you do not know what you are doing, so if you do not have BootMii installed to boot2 or have no idea what the information above means then I strongly suggest that you don't download this tool!


ReadMe File

Code:
-----------------------------
| DolBoot v1.0.3 by phpgeek |
-----------------------------


* What is DolBoot? *

DolBoot is a simple application that will take a compiled dol file
containing a homebrew application for the nintendo wii and bind it
with a boot loader. The file can then be launched in place of the
official systems menu by replacing the appropriate .app nand file.


* Do I need to compile my dol differently? *

Yes! You need to compile your dol with an entry point of 81000000.

Makefile example:

LDFLAGSÂÂÂÂ=ÂÂÂÂ-g $(MACHDEP) -Wl,-Map,$(notdir $@).map -Wl,--section-start,.init=0x81000000


* Can I link DolBoot with my compiling process? *

Sure you can!

Makefile examples:

#---------------------------------------------------------------------------------
$(BUILD):
ÂÂÂÂ@[ -d $@ ] || mkdir -p $@
ÂÂÂÂ@make --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile
ÂÂÂÂdolboot $(OUTPUT).dol output.app

#---------------------------------------------------------------------------------

or:

#---------------------------------------------------------------------------------
run:
ÂÂÂÂdolboot $(TARGET).dol target.app

#---------------------------------------------------------------------------------

* Usage *

ÂÂÂÂdolboot.exe input.dol output.app


Download
http://gbatemp.net/index.php?download=7397


/phpgeek
 

urherenow

Well-Known Member
Member
Joined
Mar 8, 2009
Messages
4,774
Trophies
2
Age
48
Location
Japan
XP
3,674
Country
United States
yay.gif


thanks a million!

now...
1)compile the preloader source, using this bootdol tool either during or after... and it results in an .app file
2)Place this .app file into the data folder of the installer source and then compile it
This results in a fully functional preloader installer... correct?
 

phpgeek

Well-Known Member
OP
Member
Joined
Feb 15, 2009
Messages
112
Trophies
0
XP
9
Country
urherenow said:
yay.gif


thanks a million!

now...
1)compile the preloader source, using this bootdol tool either during or after... and it results in an .app file
2)Place this .app file into the data folder of the installer source and then compile it
This results in a fully functional preloader installer... correct?

10/10
wink2.gif
 

G0dLiKe

who needs a title ;)
Member
Joined
Aug 2, 2009
Messages
1,674
Trophies
0
Website
db.tt
XP
206
Country
United States
phpgeek said:
urherenow said:
yay.gif


thanks a million!

now...
1)compile the preloader source, using this bootdol tool either during or after... and it results in an .app file
2)Place this .app file into the data folder of the installer source and then compile it
This results in a fully functional preloader installer... correct?

10/10
wink2.gif

Go for it, would be awesome.
 

urherenow

Well-Known Member
Member
Joined
Mar 8, 2009
Messages
4,774
Trophies
2
Age
48
Location
Japan
XP
3,674
Country
United States
so what about the ticket thing?
Does this need to be fixed in the preloader, or the installer source?

or does all of this now take care of that problem as well? It seems the problem happens to people whave not installed an earlier preloader before installing .30 so I'm not sure if I'd get accurate results simply by installing a fresh SM 4.2...
 

phpgeek

Well-Known Member
OP
Member
Joined
Feb 15, 2009
Messages
112
Trophies
0
XP
9
Country
urherenow said:
so what about the ticket thing?
Does this need to be fixed in the preloader, or the installer source?

or does all of this now take care of that problem as well? It seems the problem happens to people whave not installed an earlier preloader before installing .30 so I'm not sure if I'd get accurate results simply by installing a fresh SM 4.2...

This is something that needs to be added to the installer, as it needs to select a suitable IOS that will allow appropriate ES Identification and adequate NAND access privileges. This is why I added the IOS249 selection option, until I get round to extending the code. ES_DIVerfiy patching is still required on the IOS used by preloader to load the systems menu so that could do with being implemented too. I will probably add all this to the installer at some point. Contrary to what I have read there is no way that preloader will launch the systems menu via an unpatched IOS, unless an unknown exploit exists. I maybe able to remove the requirement for this in IOS60 but everything changed in IOS70 which is probably another reason crediar gave up with the development cycle, as I think he was nearing a point where ES_DIVerfiy may no longer have been required, bang came along IOS70!

Another thing you need to watch out for if you're playing with the installer is that once you have preloader installed, you will need to apply the original permissions and uid back to the original files/dirs after they have been restored, else it can mislead you on the next test cycle into thinking that you no longer have to authenticate yourself to get those privileges. Under IOS70 I can't even authenticate under the systems menu, as the systems menu using genuine certificates from the console itself. That's like refusing your own ID, lol!


/phpgeek
 

eggy

New Member
Newbie
Joined
Oct 17, 2009
Messages
4
Trophies
0
XP
6
Country
United States
When I try to use dolboot in my Makefile, even when its successful (I get the Done! message) my make output's an Error 1 code.
using the...
dolboot $(TARGET).dol target.app
example.

Any ideas?
 

urherenow

Well-Known Member
Member
Joined
Mar 8, 2009
Messages
4,774
Trophies
2
Age
48
Location
Japan
XP
3,674
Country
United States
dunno why, but don't worry about it. I get the same thing so it's nothing you did wrong. My guess is that dolboot.exe doesn't end with a 'return' or something like that so 'make' doesn't know that it finished properly

@phpgeek: I've been playing around and so far I don't know what you mean about everything changing in IOS70. The ES_Identify patch, NAND permissions patch, and Trucha patch are all there and located the same way (ie. looking for the suspect hex strings turn up only 1 result in the 0000000e.app file of IOS70.

I'm not much of a coder but the patches themselves can be taken directly out of the TBR source. I just don't know how to add it to the installer, read the 0000000e.app, make the patch, and write the patched file back to NAND. Also skip it after reading it into memory if the suspect hex strings don't exist (because it's already patched).

And yea I know it's even a bit more complicated than that, 'cause to make it universal you'd have to check what system menu version the system is using so you can start in the right directory in the first place (to patch the system menu IOS)!


Anyway, besides the error 1 at the end of compiling... everything works perfectly! At least on my machine (no ticket issues because I already had .29+ installed) I removed preloader, then reinstalled it. Thank you so much for your time!
 

nicksasa

Well-Known Member
Member
Joined
Oct 25, 2008
Messages
1,410
Trophies
0
XP
79
Country
Belgium
i would still go for the idea of adding the bootloader and changing the load offsets in the installer itself, then you just need to add a normal DOL to the installer with entrypoint | 0x81000000 but maybe everyone would make a sysmenu replacement then
wink.gif
 

phpgeek

Well-Known Member
OP
Member
Joined
Feb 15, 2009
Messages
112
Trophies
0
XP
9
Country
eggy said:
When I try to use dolboot in my Makefile, even when its successful (I get the Done! message) my make output's an Error 1 code.
using the...
dolboot $(TARGET).dol target.app
example.

Any ideas?

Just ignore this for now as I forgot to return the correct response to make, will fix this but it's not going to effect your compile.

QUOTE(urherenow @ Oct 18 2009, 12:15 PM) I've been playing around and so far I don't know what you mean about everything changing in IOS70. The ES_Identify patch, NAND permissions patch, and Trucha patch are all there and located the same way (ie. looking for the suspect hex strings turn up only 1 result in the 0000000e.app file of IOS70.

Patching is fine, I was referring to getting the system menu booting under IOS70 without patching it, currently an impossibility.


/phpgeek
 

eggy

New Member
Newbie
Joined
Oct 17, 2009
Messages
4
Trophies
0
XP
6
Country
United States
phpgeek said:
eggy said:
When I try to use dolboot in my Makefile, even when its successful (I get the Done! message) my make output's an Error 1 code.
using the...
dolboot $(TARGET).dol target.app
example.

Any ideas?

Just ignore this for now as I forgot to return the correct response to make, will fix this but it's not going to effect your compile.

/phpgeek

Yep, I figured that was the case, just wanted to make sure you knew about the issue. Or if you knew of a work around, as this does break my automatic build scripts, despite having a binary in the end.. For now, though, I have converted my script to a bat file, this will work until a proper response is written. Also.. if you get the time, I'd love to have a linux binary
wink.gif
I do apperciate your work on preloader and this tool thus far.
Thanks!
 

KirovAir

Alcoholic Programmer
Member
Joined
Dec 7, 2006
Messages
771
Trophies
1
Age
32
Location
Netherlands
Website
www.jessesander.nl
XP
2,449
Country
Netherlands
Yes!
I was looking for this.
If I have time (work atm) I'll create a simple app that will always boot USBloader GX, but when any button is pressed, it will boot system menu.
smile.gif
(Which' boot loader should be moved elsewhere..)
 

phpgeek

Well-Known Member
OP
Member
Joined
Feb 15, 2009
Messages
112
Trophies
0
XP
9
Country
First post updated to v1.0.3, couldn't be bothered to start a new thread as I didn't see any point!

Nothing much added, except that it now returns an exit code on success, in order to not confuse linkage with make. You can also drag and drop dols on top of the file to output a .app file with the same name as the input .dol. This update is likely to be the final version!


/phpgeek
 

wiiman123

Well-Known Member
Member
Joined
Apr 5, 2009
Messages
938
Trophies
0
Website
Visit site
XP
114
Country
New Zealand
phpgeek said:
First post updated to v1.0.3, couldn't be bothered to start a new thread as I didn't see any point!

Nothing much added, except that it now returns an exit code on success, in order to not confuse linkage with make. You can also drag and drop dols on top of the file to output a .app file with the same name as the input .dol. This update is likely to be the final version!


/phpgeek

Thanks for the update.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    Veho @ Veho: The cybertruck is a death trap.