v14.2
This commit is contained in:
parent
4660ec5c1d
commit
afd2588986
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
[submodule "Builder"]
|
||||
path = Builder
|
||||
url = git@github.com:AtlasNX/Kosmos-Builder.git
|
1
Builder
Submodule
1
Builder
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit e77a9dca85a767280fa63b92ece21ebe9e67d281
|
339
LICENSE.md
339
LICENSE.md
|
@ -1,339 +0,0 @@
|
|||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Lesser General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License.
|
|
@ -1,40 +0,0 @@
|
|||
; Disable uploading error reports to Nintendo
|
||||
[eupld]
|
||||
upload_enabled = u8!0x0
|
||||
; Enable USB 3.0 superspeed for homebrew
|
||||
[usb]
|
||||
usb30_force_enabled = u8!0x0
|
||||
; Control whether RO should ease its validation of NROs.
|
||||
; (note: this is normally not necessary, and ips patches can be used.)
|
||||
[ro]
|
||||
ease_nro_restriction = u8!0x0
|
||||
; Atmosphere custom settings
|
||||
[atmosphere]
|
||||
; Reboot from fatal automatically after some number of milliseconds.
|
||||
; If field is not present or 0, fatal will wait indefinitely for user input.
|
||||
fatal_auto_reboot_interval = u64!0x0
|
||||
; Make the power menu's "reboot" button reboot to payload.
|
||||
; Set to "normal" for normal reboot, "rcm" for rcm reboot.
|
||||
power_menu_reboot_function = str!payload
|
||||
; Controls whether dmnt cheats should be toggled on or off by
|
||||
; default. 1 = toggled on by default, 0 = toggled off by default.
|
||||
dmnt_cheats_enabled_by_default = u8!0x0
|
||||
; Controls whether dmnt should always save cheat toggle state
|
||||
; for restoration on new game launch. 1 = always save toggles,
|
||||
; 0 = only save toggles if toggle file exists.
|
||||
dmnt_always_save_cheat_toggles = u8!0x0
|
||||
; Controls whether fs.mitm should redirect save files
|
||||
; to directories on the sd card.
|
||||
; 0 = Do not redirect, 1 = Redirect.
|
||||
; NOTE: EXPERIMENTAL
|
||||
; If you do not know what you are doing, do not touch this yet.
|
||||
fsmitm_redirect_saves_to_sd = u8!0x0
|
||||
[hbloader]
|
||||
; Controls the size of the homebrew heap when running as applet.
|
||||
; If set to zero, all available applet memory is used as heap.
|
||||
; The default is zero.
|
||||
applet_heap_size = u64!0x0
|
||||
; Controls the amount of memory to reserve when running as applet
|
||||
; for usage by other applets. This setting has no effect if
|
||||
; applet_heap_size is non-zero. The default is zero.
|
||||
applet_heap_reservation_size = u64!0x8000000
|
Binary file not shown.
Before Width: | Height: | Size: 3.5 MiB |
|
@ -1,42 +0,0 @@
|
|||
[config]
|
||||
autoboot=0
|
||||
autoboot_list=0
|
||||
bootwait=1
|
||||
verification=1
|
||||
backlight=100
|
||||
autohosoff=0
|
||||
autonogc=1
|
||||
|
||||
{AtlasNX/Kosmos KOSMOS_VERSION}
|
||||
{}
|
||||
{Discord: discord.teamatlasnx.com}
|
||||
{Github: git.teamatlasnx.com}
|
||||
{Patreon: patreon.teamatlasnx.com}
|
||||
{Pegascape DNS: pegascape.sdsetup.com}
|
||||
{}
|
||||
|
||||
{--- Custom Firmware ---}
|
||||
[CFW (SYSNAND)]
|
||||
emummc_force_disable=1
|
||||
fss0=atmosphere/fusee-secondary.bin
|
||||
kip1patch=nosigchk
|
||||
atmosphere=1
|
||||
logopath=bootloader/bootlogo.bmp
|
||||
icon=bootloader/res/icon_payload.bmp
|
||||
{}
|
||||
|
||||
[CFW (EMUMMC)]
|
||||
fss0=atmosphere/fusee-secondary.bin
|
||||
kip1patch=nosigchk
|
||||
atmosphere=1
|
||||
logopath=bootloader/bootlogo.bmp
|
||||
icon=bootloader/res/icon_payload.bmp
|
||||
{}
|
||||
|
||||
{--- Stock ---}
|
||||
[Stock (SYSNAND)]
|
||||
emummc_force_disable=1
|
||||
fss0=atmosphere/fusee-secondary.bin
|
||||
stock=1
|
||||
icon=bootloader/res/icon_switch.bmp
|
||||
{}
|
|
@ -1,127 +0,0 @@
|
|||
# UTF-8
|
||||
# A KIP section is [kip1_name:sha256_hex_8bytes]
|
||||
# A patchset is .patch_name=kip_section_dec:offset_hex_0x:length_hex_0x:src_data_hex,dst_data_hex
|
||||
# _dec: 1 char decimal | _hex_0x: max u32 prefixed with 0x | _hex: hex array.
|
||||
# Kip1 section decimals: TEXT: 0, RODATA: 1, DATA: 2.
|
||||
#
|
||||
# Care when editing this, otherwise it will fail to be parsed.
|
||||
|
||||
#FS Patches for 1.0.0
|
||||
[FS:de9fdda4085dd5fe]
|
||||
.nosigchk=0:0x0:0x0:00,00
|
||||
|
||||
#FS Patches for 1.0.0 exfat
|
||||
[FS:fc3e80991dca1796]
|
||||
.nosigchk=0:0x0:0x0:00,00
|
||||
|
||||
#FS Patches for 2.0.0
|
||||
[FS:cd7bbe18d6130b28]
|
||||
.nosigchk=0:0x0:0x0:00,00
|
||||
|
||||
#FS Patches for 2.0.0 exfat
|
||||
[FS:e76692dfaa0420e9]
|
||||
.nosigchk=0:0x0:0x0:00,00
|
||||
|
||||
#FS Patches for 2.1.0
|
||||
[FS:0d7005627b07767c]
|
||||
.nosigchk=0:0x0:0x0:00,00
|
||||
|
||||
#FS Patches for 2.1.0 exfat
|
||||
[FS:dbd85fcacc193da8]
|
||||
.nosigchk=0:0x0:0x0:00,00
|
||||
|
||||
#FS Patches for 3.0.0
|
||||
[FS:a86da5e87ef1097b]
|
||||
.nosigchk=0:0x0:0x0:00,00
|
||||
|
||||
#FS Patches for 3.0.0 exfat
|
||||
[FS:981c57e7f02f70f7]
|
||||
.nosigchk=0:0x0:0x0:00,00
|
||||
|
||||
#FS Patches for 3.0.1
|
||||
[FS:57397c063f10b631]
|
||||
.nosigchk=0:0x0:0x0:00,00
|
||||
|
||||
#FS Patches for 3.0.1 exfat
|
||||
[FS:073099d7c6ad7d89]
|
||||
.nosigchk=0:0x0:0x0:00,00
|
||||
|
||||
#FS Patches for 4.0.0
|
||||
[FS:06e90719595a010c]
|
||||
.nosigchk=0:0x0:0x0:00,00
|
||||
|
||||
#FS Patches for 4.0.0 exfat
|
||||
[FS:549b0f8d6f72c4e9]
|
||||
.nosigchk=0:0x0:0x0:00,00
|
||||
|
||||
#FS Patches for 4.1.0
|
||||
[FS:8096af7c6a35aa82]
|
||||
.nosigchk=0:0x0:0x0:00,00
|
||||
|
||||
#FS Patches for 4.1.0 exfat
|
||||
[FS:02d5abaafd20c8b0]
|
||||
.nosigchk=0:0x0:0x0:00,00
|
||||
|
||||
#FS Patches for 5.0.0
|
||||
[FS:a6f27ad9ac7c73ad]
|
||||
.nosigchk=0:0x0:0x0:00,00
|
||||
|
||||
#FS Patches for 5.0.0 exfat
|
||||
[FS:ce3ecba2f2f062f5]
|
||||
.nosigchk=0:0x0:0x0:00,00
|
||||
|
||||
#FS Patches for 5.1.0
|
||||
[FS:76f87402c9387c0f]
|
||||
.nosigchk=0:0x0:0x0:00,00
|
||||
|
||||
#FS Patches for 5.1.0 exfat
|
||||
[FS:10b2d81605488599]
|
||||
.nosigchk=0:0x0:0x0:00,00
|
||||
|
||||
#FS Patches for 6.0.0 - 4
|
||||
[FS:1b82cb221867cb52]
|
||||
.nosigchk=0:0x0:0x0:00,00
|
||||
|
||||
#FS Patches for 6.0.0 - 4 exfat
|
||||
[FS:966add3d20b62713]
|
||||
.nosigchk=0:0x0:0x0:00,00
|
||||
|
||||
#FS Patches for 6.0.0 - 5
|
||||
[FS:3a574d436186191d]
|
||||
.nosigchk=0:0x0:0x0:00,00
|
||||
|
||||
#FS Patches for 6.0.0 - 5 exfat
|
||||
[FS:330553f6b5fb55c4]
|
||||
.nosigchk=0:0x0:0x0:00,00
|
||||
|
||||
#FS Patches for 7.0.0
|
||||
[FS:2ADBE97E9B5F4177]
|
||||
.nosigchk=0:0x0:0x0:00,00
|
||||
|
||||
#FS Patches for 7.0.0 exfat
|
||||
[FS:2CCE659CEC536A8E]
|
||||
.nosigchk=0:0x0:0x0:00,00
|
||||
|
||||
#FS Patches for 8.0.0
|
||||
[FS:B2F5176B3548364D]
|
||||
.nosigchk=0:0x0:0x0:00,00
|
||||
|
||||
#FS Patches for 8.0.0 exfat
|
||||
[FS:DBD941C0C53C52CC]
|
||||
.nosigchk=0:0x0:0x0:00,00
|
||||
|
||||
#FS Patches for 8.1.0
|
||||
[FS:6B09B67B29C02024]
|
||||
.nosigchk=0:0x0:0x0:00,00
|
||||
|
||||
#FS Patches for 8.1.0 exfat
|
||||
[FS:B4CAE1F24965D92E]
|
||||
.nosigchk=0:0x0:0x0:00,00
|
||||
|
||||
#FS Patches for 9.0.0
|
||||
[FS:468740761e193eb7]
|
||||
.nosigchk=0:0x0:0x0:00,00
|
||||
|
||||
#FS Patches for 9.0.0 exfat
|
||||
[FS:7c951376e5c12df8]
|
||||
.nosigchk=0:0x0:0x0:00,00
|
|
@ -1,39 +0,0 @@
|
|||
{
|
||||
"sysmodules" : [
|
||||
{
|
||||
"name" : "sys-ftpd",
|
||||
"tid" : "420000000000000E",
|
||||
"requires_reboot": false
|
||||
},
|
||||
{
|
||||
"name" : "nxsh",
|
||||
"tid" : "43000000000000FF",
|
||||
"requires_reboot": false
|
||||
},
|
||||
{
|
||||
"name" : "sys-netcheat",
|
||||
"tid" : "430000000000000A",
|
||||
"requires_reboot": false
|
||||
},
|
||||
{
|
||||
"name" : "sys-clk",
|
||||
"tid" : "00FF0000636C6BFF",
|
||||
"requires_reboot": false
|
||||
},
|
||||
{
|
||||
"name" : "ldn_mitm",
|
||||
"tid" : "4200000000000010",
|
||||
"requires_reboot": true
|
||||
},
|
||||
{
|
||||
"name" : "emuiibo",
|
||||
"tid" : "0100000000000352",
|
||||
"requires_reboot": true
|
||||
},
|
||||
{
|
||||
"name" : "ojds-nx",
|
||||
"tid" : "0100000000000901",
|
||||
"requires_reboot": false
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
version = "KOSMOS_VERSION";
|
||||
installed_files = [ ];
|
||||
received_exfat_warning = false;
|
||||
received_ignore_config_warning = false;
|
||||
ignore_config_files = false;
|
Binary file not shown.
|
@ -14,7 +14,6 @@ This handy All-in-One package includes everything you need to run Hekate / Atmos
|
|||
* Up-to-date packages
|
||||
* Splash screens and instant launch
|
||||
* Background FTP-Server
|
||||
* Background netcheat system
|
||||
* Updating through a console homebrew app
|
||||
* Customizable button bindings for the Homebrew Loader
|
||||
* Drag and drop
|
||||
|
@ -43,4 +42,4 @@ Follow this guide: https://guide.teamatlasnx.com
|
|||
* [Sys-CLK](https://github.com/retronx-team/sys-clk)
|
||||
* [ldn_mitm](https://github.com/spacemeowx2/ldn_mitm)
|
||||
* [emuiibo](https://github.com/XorTroll/emuiibo)
|
||||
* [nxdumptool](https://github.com/DarkMatterCore/nxdumptool)
|
||||
* [nxdumptool](https://github.com/DarkMatterCore/nxdumptool)
|
||||
|
|
155
common.sh
155
common.sh
|
@ -1,155 +0,0 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Kosmos
|
||||
# Copyright (C) 2019 Steven Mattera
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
|
||||
# =============================================================================
|
||||
# General Functions
|
||||
# =============================================================================
|
||||
|
||||
# Test username and password against GitHub's API
|
||||
# Params:
|
||||
# - GitHub Login
|
||||
# Returns:
|
||||
# Whether it worked or not.
|
||||
test_login () {
|
||||
response=$(curl -u ${1} -H "Accept: application/json" -H "Content-Type: application/json" -H "User-Agent: Kosmos/1.0.0" -s https://api.github.com/)
|
||||
message_index=$(echo ${response} | jq 'keys | index("message")')
|
||||
if [ "${message_index}" == "null" ]
|
||||
then
|
||||
echo "1"
|
||||
else
|
||||
echo "0"
|
||||
fi
|
||||
}
|
||||
|
||||
# Downloads the latest release JSON.
|
||||
# Params:
|
||||
# - GitHub Login
|
||||
# - GitHub Company
|
||||
# - GitHub Repo
|
||||
# Returns:
|
||||
# The latest release JSON.
|
||||
get_latest_release () {
|
||||
if [ -z "${1}" ]
|
||||
then
|
||||
echo $(curl -H "Accept: application/json" -H "Content-Type: application/json" -H "User-Agent: Kosmos/1.0.0" -s https://api.github.com/repos/${2}/${3}/releases | jq -r '.[0]')
|
||||
else
|
||||
echo $(curl -u ${1} -H "Accept: application/json" -H "Content-Type: application/json" -H "User-Agent: Kosmos/1.0.0" -s https://api.github.com/repos/${2}/${3}/releases | jq -r '.[0]')
|
||||
fi
|
||||
}
|
||||
|
||||
# Gets the number of assets in a release.
|
||||
# Params:
|
||||
# - The release JSON
|
||||
# Returns:
|
||||
# The number of assets.
|
||||
_get_number_of_assets () {
|
||||
return $(echo ${1} | jq -r '.assets | length')
|
||||
}
|
||||
|
||||
# Finds a specific asset in a release.
|
||||
# Params:
|
||||
# - The release JSON
|
||||
# - Start with blob pattern
|
||||
# - Ends with blob pattern
|
||||
# Returns:
|
||||
# The asset JSON.
|
||||
find_asset () {
|
||||
_get_number_of_assets "${1}"
|
||||
number_of_assets=${?}
|
||||
|
||||
for (( i=0; i<${number_of_assets}; i++ ))
|
||||
do
|
||||
name=$(echo ${1} | jq -r ".assets[${i}].name" | tr '[:upper:]' '[:lower:]')
|
||||
asset=$(echo ${1} | jq -r ".assets[${i}]")
|
||||
|
||||
if [[ ${#} -eq 2 && ${name} == ${2} ]]
|
||||
then
|
||||
echo ${asset}
|
||||
break
|
||||
fi
|
||||
|
||||
if [[ ${#} -eq 3 && ${name} == ${2} && ${name} == ${3} ]]
|
||||
then
|
||||
echo ${asset}
|
||||
break
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
# Downloads a file.
|
||||
# Params:
|
||||
# - The release asset JSON
|
||||
# Returns:
|
||||
# The file path.
|
||||
download_file () {
|
||||
url=$(echo ${1} | jq -r ".browser_download_url")
|
||||
echo $(download_file_url "${url}")
|
||||
}
|
||||
|
||||
# Downloads a file from URL.
|
||||
# Params:
|
||||
# - URL
|
||||
# Returns:
|
||||
# The file path.
|
||||
download_file_url () {
|
||||
file="/tmp/$(uuidgen)"
|
||||
curl -L -H "User-Agent: ${user_agent}" -s ${1} >> ${file}
|
||||
echo ${file}
|
||||
}
|
||||
|
||||
# Gets the version number from an asset.
|
||||
# Params:
|
||||
# - The release asset JSON
|
||||
# Returns:
|
||||
# The version number.
|
||||
get_version_number () {
|
||||
echo $(echo ${1} | jq -r ".tag_name")
|
||||
}
|
||||
|
||||
# Find path matching a pattern
|
||||
# Params:
|
||||
# - The pattern
|
||||
# Returns:
|
||||
# The first file found.
|
||||
glob () {
|
||||
files=( ${1} )
|
||||
echo ${files[0]}
|
||||
}
|
||||
|
||||
# =============================================================================
|
||||
# Main Script
|
||||
# =============================================================================
|
||||
|
||||
if [ $# -le 1 ]
|
||||
then
|
||||
echo "This is not meant to be called by end users and is used by the kosmos.sh and sdsetup.sh scripts."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check if the function exists (bash specific)
|
||||
if declare -f "$1" > /dev/null
|
||||
then
|
||||
# call arguments verbatim
|
||||
"$@"
|
||||
else
|
||||
# Show a helpful error
|
||||
echo "'$1' is not a known function name" >&2
|
||||
exit 1
|
||||
fi
|
118
kosmos.sh
118
kosmos.sh
|
@ -1,118 +0,0 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Kosmos
|
||||
# Copyright (C) 2019 Steven Mattera
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
|
||||
func_result=""
|
||||
|
||||
# Prompts for GitHub Username and Password
|
||||
# Returns:
|
||||
# The username and password on ${func_result}.
|
||||
prompt_login () {
|
||||
echo "It is recommended that you login to GitHub to use this tool. However you"
|
||||
echo "can continue without logging in, but you may run into rate limits. If you"
|
||||
echo "use two-factor authentication then you will need to generate a personal"
|
||||
echo "access token and use it as your password. https://github.com/settings/tokens"
|
||||
echo ""
|
||||
read -p "Username: (Leave blank to continue without logging in) " username
|
||||
|
||||
if [ ! -z "${username}" ]
|
||||
then
|
||||
read -sp "Password or personal access token:" password
|
||||
func_result="${username}:${password}"
|
||||
else
|
||||
func_result=""
|
||||
fi
|
||||
}
|
||||
|
||||
# =============================================================================
|
||||
# Main Script
|
||||
# =============================================================================
|
||||
|
||||
if [ $# -le 0 ]
|
||||
then
|
||||
echo "Usage: ./kosmos.sh [output_directory]"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
authenticated=0
|
||||
username_password=""
|
||||
while [ $authenticated -ne 1 ]; do
|
||||
prompt_login
|
||||
username_password=${func_result}
|
||||
|
||||
if [ ! -z "${username_password}" ]
|
||||
then
|
||||
authenticated=$(./common.sh test_login "${username_password}")
|
||||
else
|
||||
authenticated=1
|
||||
fi
|
||||
|
||||
echo ""
|
||||
done
|
||||
|
||||
# Get version number
|
||||
version_number=$(head -1 version.txt)
|
||||
|
||||
# Build temp directory
|
||||
temp_directory="/tmp/$(uuidgen)"
|
||||
mkdir -p "${temp_directory}"
|
||||
|
||||
# Start building!
|
||||
atmosphere_version=$(./modules.sh download_atmosphere "${temp_directory}" "${username_password}")
|
||||
hekate_version=$(./modules.sh download_hekate "${temp_directory}" "${version_number}" "${username_password}")
|
||||
appstore_version=$(./modules.sh download_appstore "${temp_directory}" "${username_password}")
|
||||
edizon_version=$(./modules.sh download_edizon "${temp_directory}" "${username_password}")
|
||||
emuiibo_version=$(./modules.sh download_emuiibo "${temp_directory}" "${username_password}")
|
||||
goldleaf_version=$(./modules.sh download_goldleaf "${temp_directory}" "${username_password}")
|
||||
kosmos_toolbox_version=$(./modules.sh download_kosmos_toolbox "${temp_directory}" "${username_password}")
|
||||
kosmos_updater_version=$(./modules.sh download_kosmos_updater "${temp_directory}" "${version_number}" "${username_password}")
|
||||
ldn_mitm_version=$(./modules.sh download_ldn_mitm "${temp_directory}" "${username_password}")
|
||||
lockpick_version=$(./modules.sh download_lockpick "${temp_directory}" "${username_password}")
|
||||
lockpick_rcm_version=$(./modules.sh download_lockpick_rcm "${temp_directory}" "${username_password}")
|
||||
sys_clk_version=$(./modules.sh download_sys_clk "${temp_directory}" "${username_password}")
|
||||
sys_ftpd_version=$(./modules.sh download_sys_ftpd "${temp_directory}" "${username_password}")
|
||||
|
||||
# Delete the bundle if it already exists.
|
||||
dest=$(realpath -s ${1})
|
||||
rm -f "${dest}/Kosmos-${version_number}.zip"
|
||||
|
||||
# Bundle everything together.
|
||||
current_directory=${PWD}
|
||||
cd "${temp_directory}"
|
||||
zip -q -r "${dest}/Kosmos-${version_number}.zip" .
|
||||
cd "${current_directory}"
|
||||
|
||||
# Clean up.
|
||||
rm -rf "${temp_directory}"
|
||||
|
||||
# Output some useful information.
|
||||
echo "Kosmos ${version_number} built with:"
|
||||
echo " Atmosphere - ${atmosphere_version}"
|
||||
echo " Hekate - ${hekate_version}"
|
||||
echo " EdiZon - ${edizon_version}"
|
||||
echo " Emuiibo - ${emuiibo_version}"
|
||||
echo " Goldleaf - ${goldleaf_version}"
|
||||
echo " Homebrew App Store - ${appstore_version}"
|
||||
echo " Kosmos Toolbox - ${kosmos_toolbox_version}"
|
||||
echo " Kosmos Updater - ${kosmos_updater_version}"
|
||||
echo " ldn_mitm - ${ldn_mitm_version}"
|
||||
echo " Lockpick - ${lockpick_version}"
|
||||
echo " Lockpick RCM - ${lockpick_rcm_version}"
|
||||
echo " sys-clk - ${sys_clk_version}"
|
||||
echo " sys-ftpd - ${sys_ftpd_version}"
|
258
modules.sh
258
modules.sh
|
@ -1,258 +0,0 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Kosmos
|
||||
# Copyright (C) 2019 Steven Mattera
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
|
||||
# Downloads the latest Atmosphere release and extracts it.
|
||||
# Params:
|
||||
# - Directory to extract to
|
||||
# - GitHub Login
|
||||
# Returns:
|
||||
# The version number.
|
||||
download_atmosphere () {
|
||||
mkdir -p ${1}
|
||||
latest_release=$(./common.sh get_latest_release "${2}" "Atmosphere-NX" "Atmosphere")
|
||||
|
||||
asset=$(./common.sh find_asset "${latest_release}" "atmosphere*" "*.zip")
|
||||
file=$(./common.sh download_file "${asset}")
|
||||
|
||||
unzip -qq "${file}" -d "${1}"
|
||||
rm -f "${1}/switch/reboot_to_payload.nro"
|
||||
rm -f "${file}"
|
||||
|
||||
asset=$(./common.sh find_asset "${latest_release}" "fusee*" "*.bin")
|
||||
file=$(./common.sh download_file "${asset}")
|
||||
|
||||
mkdir -p "${1}/bootloader/payloads"
|
||||
mv ${file} "${1}/bootloader/payloads/fusee-primary.bin"
|
||||
rm -f "${1}/atmosphere/system_settings.ini"
|
||||
cp "./Modules/atmosphere/system_settings.ini" "${1}/atmosphere/system_settings.ini"
|
||||
|
||||
echo $(./common.sh get_version_number "${latest_release}")
|
||||
}
|
||||
|
||||
# Downloads the latest Hekate release and extracts it.
|
||||
# Params:
|
||||
# - Directory to extract to
|
||||
# - The Kosmos version number
|
||||
# - GitHub Login
|
||||
# Returns:
|
||||
# The version number.
|
||||
download_hekate () {
|
||||
mkdir -p ${1}
|
||||
latest_release=$(./common.sh get_latest_release "${3}" "CTCaer" "hekate")
|
||||
|
||||
asset=$(./common.sh find_asset "${latest_release}" "hekate*" "*.zip")
|
||||
file=$(./common.sh download_file "${asset}")
|
||||
|
||||
unzip -qq "${file}" -d "${1}"
|
||||
rm -f "${file}"
|
||||
|
||||
payload=$(./common.sh glob "${1}/hekate*.bin")
|
||||
cp "${payload}" "${1}/bootloader/update.bin"
|
||||
mkdir -p "${1}/atmosphere"
|
||||
cp "${payload}" "${1}/atmosphere/reboot_payload.bin"
|
||||
|
||||
cp "./Modules/hekate/bootlogo.bmp" "${1}/bootloader/bootlogo.bmp"
|
||||
|
||||
rm -f "${1}/bootloader/patches_template.ini"
|
||||
cp "./Modules/hekate/patches_template.ini" "${1}/bootloader/patches_template.ini"
|
||||
|
||||
sed "s/KOSMOS_VERSION/${2}/g" "./Modules/hekate/hekate_ipl.ini" >> "${1}/bootloader/hekate_ipl.ini"
|
||||
|
||||
echo $(./common.sh get_version_number "${latest_release}")
|
||||
}
|
||||
|
||||
download_appstore () {
|
||||
mkdir -p ${1}
|
||||
latest_release=$(./common.sh get_latest_release "${2}" "vgmoose" "hb-appstore")
|
||||
|
||||
asset=$(./common.sh find_asset "${latest_release}" "*.nro")
|
||||
file=$(./common.sh download_file "${asset}")
|
||||
|
||||
mkdir -p "${1}/switch/appstore"
|
||||
mv ${file} "${1}/switch/appstore/appstore.nro"
|
||||
|
||||
echo $(./common.sh get_version_number "${latest_release}")
|
||||
}
|
||||
|
||||
download_edizon () {
|
||||
mkdir -p ${1}
|
||||
latest_release=$(./common.sh get_latest_release "${2}" "WerWolv" "EdiZon")
|
||||
|
||||
asset=$(./common.sh find_asset "${latest_release}" "*.zip")
|
||||
file=$(./common.sh download_file "${asset}")
|
||||
|
||||
unzip -qq "${file}" -d "${1}"
|
||||
rm -f "${file}"
|
||||
|
||||
echo $(./common.sh get_version_number "${latest_release}")
|
||||
}
|
||||
|
||||
download_emuiibo () {
|
||||
mkdir -p ${1}
|
||||
latest_release=$(./common.sh get_latest_release "${2}" "XorTroll" "emuiibo")
|
||||
|
||||
asset=$(./common.sh find_asset "${latest_release}" "emuiibo*" "*.zip")
|
||||
file=$(./common.sh download_file "${asset}")
|
||||
|
||||
unzip -qq "${file}" -d "${1}"
|
||||
rm -f "${1}/titles/0100000000000352/flags/boot2.flag"
|
||||
rm -f "${file}"
|
||||
mkdir -p "${1}/atmosphere/titles"
|
||||
mv "${1}/titles/0100000000000352" "${1}/atmosphere/titles/"
|
||||
rm -rf "${1}/titles"
|
||||
|
||||
echo $(./common.sh get_version_number "${latest_release}")
|
||||
}
|
||||
|
||||
download_goldleaf () {
|
||||
mkdir -p ${1}
|
||||
latest_release=$(./common.sh get_latest_release "${2}" "XorTroll" "Goldleaf")
|
||||
|
||||
asset=$(./common.sh find_asset "${latest_release}" "*.nro")
|
||||
file=$(./common.sh download_file "${asset}")
|
||||
|
||||
mkdir -p "${1}/switch/Goldleaf"
|
||||
mv ${file} "${1}/switch/Goldleaf/Goldleaf.nro"
|
||||
|
||||
echo $(./common.sh get_version_number "${latest_release}")
|
||||
}
|
||||
|
||||
download_kosmos_toolbox () {
|
||||
mkdir -p ${1}
|
||||
latest_release=$(./common.sh get_latest_release "${2}" "AtlasNX" "Kosmos-Toolbox")
|
||||
|
||||
asset=$(./common.sh find_asset "${latest_release}" "*.nro")
|
||||
file=$(./common.sh download_file "${asset}")
|
||||
|
||||
mkdir -p "${1}/switch/KosmosToolbox"
|
||||
mv "${file}" "${1}/switch/KosmosToolbox/KosmosToolbox.nro"
|
||||
cp "./Modules/kosmos-toolbox/config.json" "${1}/switch/KosmosToolbox/config.json"
|
||||
|
||||
echo $(./common.sh get_version_number "${latest_release}")
|
||||
}
|
||||
|
||||
download_kosmos_updater () {
|
||||
mkdir -p ${1}
|
||||
latest_release=$(./common.sh get_latest_release "${3}" "AtlasNX" "Kosmos-Updater")
|
||||
|
||||
asset=$(./common.sh find_asset "${latest_release}" "*.nro")
|
||||
file=$(./common.sh download_file "${asset}")
|
||||
|
||||
mkdir -p "${1}/switch/KosmosUpdater"
|
||||
mv ${file} "${1}/switch/KosmosUpdater/KosmosUpdater.nro"
|
||||
sed "s/KOSMOS_VERSION/${2}/g" "./Modules/kosmos-updater/internal.db" >> "${1}/switch/KosmosUpdater/internal.db"
|
||||
|
||||
echo $(./common.sh get_version_number "${latest_release}")
|
||||
}
|
||||
|
||||
download_ldn_mitm () {
|
||||
mkdir -p ${1}
|
||||
latest_release=$(./common.sh get_latest_release "${2}" "spacemeowx2" "ldn_mitm")
|
||||
|
||||
asset=$(./common.sh find_asset "${latest_release}" "ldn_mitm*" "*.zip")
|
||||
file=$(./common.sh download_file "${asset}")
|
||||
|
||||
unzip -qq "${file}" -d "${1}"
|
||||
rm -f "${1}/atmosphere/titles/4200000000000010/flags/boot2.flag"
|
||||
rm -f "${file}"
|
||||
|
||||
echo $(./common.sh get_version_number "${latest_release}")
|
||||
}
|
||||
|
||||
download_lockpick () {
|
||||
mkdir -p ${1}
|
||||
latest_release=$(./common.sh get_latest_release "${2}" "shchmue" "Lockpick")
|
||||
|
||||
asset=$(./common.sh find_asset "${latest_release}" "*.nro")
|
||||
file=$(./common.sh download_file "${asset}")
|
||||
|
||||
mkdir -p "${1}/switch/Lockpick"
|
||||
mv ${file} "${1}/switch/Lockpick/Lockpick.nro"
|
||||
|
||||
echo $(./common.sh get_version_number "${latest_release}")
|
||||
}
|
||||
|
||||
download_lockpick_rcm () {
|
||||
mkdir -p ${1}
|
||||
latest_release=$(./common.sh get_latest_release "${2}" "shchmue" "Lockpick_RCM")
|
||||
|
||||
asset=$(./common.sh find_asset "${latest_release}" "*.bin")
|
||||
file=$(./common.sh download_file "${asset}")
|
||||
|
||||
mkdir -p "${1}/bootloader/payloads"
|
||||
mv ${file} "${1}/bootloader/payloads/Lockpick_RCM.bin"
|
||||
|
||||
echo $(./common.sh get_version_number "${latest_release}")
|
||||
}
|
||||
|
||||
download_sys_clk () {
|
||||
mkdir -p ${1}
|
||||
latest_release=$(./common.sh get_latest_release "${2}" "retronx-team" "sys-clk")
|
||||
|
||||
asset=$(./common.sh find_asset "${latest_release}" "sys-clk*" "*.zip")
|
||||
file=$(./common.sh download_file "${asset}")
|
||||
|
||||
unzip -qq "${file}" -d "${1}"
|
||||
rm -f "${1}/atmosphere/titles/00FF0000636C6BFF/flags/boot2.flag"
|
||||
rm -f "${1}/README.html"
|
||||
rm -f "${file}"
|
||||
|
||||
echo $(./common.sh get_version_number "${latest_release}")
|
||||
}
|
||||
|
||||
download_sys_ftpd () {
|
||||
releases=$(curl -d '{"action":"get","items":{"href":"/sys-ftpd/","what":1}}' -H 'Content-Type: application/json' -X POST -s http://bsnx.lavatech.top/sys-ftpd/\?)
|
||||
latest_release=$(echo ${releases} | jq -r '.items | map(select(has("fetched") | not)) | sort_by(.time) | reverse | .[1].href')
|
||||
latest_release_url="http://bsnx.lavatech.top${latest_release}"
|
||||
|
||||
mkdir -p ${1}
|
||||
file=$(./common.sh download_file_url "${latest_release_url}")
|
||||
|
||||
temp_sysftpd_directory="/tmp/$(uuidgen)"
|
||||
mkdir -p "${temp_sysftpd_directory}"
|
||||
unzip -qq "${file}" -d "${temp_sysftpd_directory}"
|
||||
cp -r "${temp_sysftpd_directory}/sd"/* "${1}"
|
||||
rm -f "${1}/atmosphere/titles/420000000000000E/flags/boot2.flag"
|
||||
rm -f "${file}"
|
||||
rm -rf "${temp_sysftpd_directory}"
|
||||
|
||||
echo $(expr substr "${latest_release}" 20 7)
|
||||
}
|
||||
|
||||
# =============================================================================
|
||||
# Main Script
|
||||
# =============================================================================
|
||||
|
||||
if [ $# -le 1 ]
|
||||
then
|
||||
echo "This is not meant to be called by end users and is used by the kosmos.sh and sdsetup.sh scripts."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check if the function exists (bash specific)
|
||||
if declare -f "$1" > /dev/null
|
||||
then
|
||||
# call arguments verbatim
|
||||
"$@"
|
||||
else
|
||||
# Show a helpful error
|
||||
echo "'$1' is not a known function name" >&2
|
||||
exit 1
|
||||
fi
|
166
sdsetup.sh
166
sdsetup.sh
|
@ -1,166 +0,0 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Kosmos
|
||||
# Copyright (C) 2019 Steven Mattera
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
|
||||
func_result=""
|
||||
auto=0
|
||||
|
||||
# Prompts for GitHub Username and Password
|
||||
# Returns:
|
||||
# The username and password on ${func_result}.
|
||||
prompt_login () {
|
||||
echo "It is recommended that you login to GitHub to use this tool. However you"
|
||||
echo "can continue without logging in, but you may run into rate limits. If you"
|
||||
echo "use two-factor authentication then you will need to generate a personal"
|
||||
echo "access token and use it as your password. https://github.com/settings/tokens"
|
||||
echo ""
|
||||
read -p "Username: (Leave blank to continue without logging in) " username
|
||||
|
||||
if [ ! -z "${username}" ]
|
||||
then
|
||||
read -sp "Password or personal access token:" password
|
||||
func_result="${username}:${password}"
|
||||
else
|
||||
func_result=""
|
||||
fi
|
||||
}
|
||||
|
||||
# =============================================================================
|
||||
# Main Script
|
||||
# =============================================================================
|
||||
|
||||
if [ $# -le 0 ]
|
||||
then
|
||||
echo "Usage: ./sdsetup.sh <output_directory> [github username] [github password/access token] [\"auto\"]"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ $# -gt 3 ]
|
||||
then
|
||||
if [ "${4}" == "auto" ]
|
||||
then
|
||||
auto=1
|
||||
fi
|
||||
fi
|
||||
|
||||
authenticated=0
|
||||
username_password=""
|
||||
|
||||
if [ $# -gt 2 ]
|
||||
then
|
||||
username_password=${2}:${3}
|
||||
authenticated=$(./common.sh test_login "${username_password}")
|
||||
if [ $authenticated -ne 1 ]
|
||||
then
|
||||
echo "Authentication Failed"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
while [ $authenticated -ne 1 ]; do
|
||||
prompt_login
|
||||
username_password=${func_result}
|
||||
|
||||
if [ ! -z "${username_password}" ]
|
||||
then
|
||||
authenticated=$(./common.sh test_login "${username_password}")
|
||||
else
|
||||
authenticated=1
|
||||
fi
|
||||
|
||||
echo ""
|
||||
done
|
||||
fi
|
||||
|
||||
|
||||
|
||||
# Get version number
|
||||
version_number=$(head -1 version.txt)
|
||||
|
||||
# Build temp directory
|
||||
temp_directory="/tmp/$(uuidgen)"
|
||||
mkdir -p "${temp_directory}"
|
||||
|
||||
# Start building!
|
||||
atmosphere_version=$(./modules.sh download_atmosphere "${temp_directory}/must_have" "${username_password}")
|
||||
hekate_version=$(./modules.sh download_hekate "${temp_directory}/must_have" "${version_number}" "${username_password}")
|
||||
emuiibo_version=$(./modules.sh download_emuiibo "${temp_directory}/emuiibo" "${username_password}")
|
||||
kosmos_toolbox_version=$(./modules.sh download_kosmos_toolbox "${temp_directory}/kosmos_toolbox" "${username_password}")
|
||||
kosmos_updater_version=$(./modules.sh download_kosmos_updater "${temp_directory}/kosmos_updater" "${version_number}" "${username_password}")
|
||||
ldn_mitm_version=$(./modules.sh download_ldn_mitm "${temp_directory}/ldn_mitm" "${username_password}")
|
||||
lockpick_rcm_version=$(./modules.sh download_lockpick_rcm "${temp_directory}/lockpick_rcm" "${username_password}")
|
||||
sys_clk_version=$(./modules.sh download_sys_clk "${temp_directory}/sys_clk" "${username_password}")
|
||||
sys_ftpd_version=$(./modules.sh download_sys_ftpd "${temp_directory}/sys_ftpd" "${username_password}")
|
||||
|
||||
if [ "${auto}" != "1" ]
|
||||
then
|
||||
appstore_version=$(./modules.sh download_appstore "${temp_directory}/appstore" "${username_password}")
|
||||
edizon_version=$(./modules.sh download_edizon "${temp_directory}/edizon" "${username_password}")
|
||||
goldleaf_version=$(./modules.sh download_goldleaf "${temp_directory}/goldleaf" "${username_password}")
|
||||
lockpick_version=$(./modules.sh download_lockpick "${temp_directory}/lockpick" "${username_password}")
|
||||
fi
|
||||
|
||||
|
||||
# Delete some files we don't want in the output
|
||||
rm -f ${temp_directory}/must_have/hbmenu.nro
|
||||
rm -f ${temp_directory}/must_have/hekate*
|
||||
|
||||
# Delete the output directory if it already exists.
|
||||
dest=""
|
||||
|
||||
if [ "${auto}" != "1" ]
|
||||
then
|
||||
dest=$(realpath -s ${1})/${version_number}
|
||||
else
|
||||
dest=$(realpath -s ${1})
|
||||
fi
|
||||
|
||||
rm -rf ${dest}
|
||||
|
||||
# Move temp folder files to output directory
|
||||
mv -f ${temp_directory} ${dest}
|
||||
|
||||
# Output some useful information.
|
||||
|
||||
if [ "${auto}" != "1" ]
|
||||
then
|
||||
echo "SDSetup Modules built with:"
|
||||
echo " Atmosphere - ${atmosphere_version}"
|
||||
echo " Hekate - ${hekate_version}"
|
||||
echo " EdiZon - ${edizon_version}"
|
||||
echo " Emuiibo - ${emuiibo_version}"
|
||||
echo " Goldleaf - ${goldleaf_version}"
|
||||
echo " Homebrew App Store - ${appstore_version}"
|
||||
echo " Kosmos Toolbox - ${kosmos_toolbox_version}"
|
||||
echo " Kosmos Updater - ${kosmos_updater_version}"
|
||||
echo " ldn_mitm - ${ldn_mitm_version}"
|
||||
echo " Lockpick - ${lockpick_version}"
|
||||
echo " Lockpick RCM - ${lockpick_rcm_version}"
|
||||
echo " sys-clk - ${sys_clk_version}"
|
||||
echo " sys-ftpd - ${sys_ftpd_version}"
|
||||
else
|
||||
echo "must_have:${atmosphere_version}"
|
||||
echo "hekate:${hekate_version}"
|
||||
echo "emuiibo:${emuiibo_version}"
|
||||
echo "kosmos_toolbox:${kosmos_toolbox_version}"
|
||||
echo "kosmos_updater:${kosmos_updater_version}"
|
||||
echo "ldn_mitm:${ldn_mitm_version}"
|
||||
echo "lockpick_rcm:${lockpick_rcm_version}"
|
||||
echo "sys_clk:${sys_clk_version}"
|
||||
echo "sys_ftpd:${sys_ftpd_version}"
|
||||
fi
|
|
@ -1 +0,0 @@
|
|||
v14.1
|
Reference in a new issue