Skip to content

Commit

Permalink
- Added: Support for Android 12.
Browse files Browse the repository at this point in the history
- Updated: Fusee replaced fusee-primary.
  • Loading branch information
MenosGrante committed Sep 10, 2021
1 parent bc822ea commit 2643f63
Show file tree
Hide file tree
Showing 39 changed files with 491 additions and 218 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
### The application has already received all the functionality that I planned to lay in it, so I will only fix defects and add localizations in the future. [More details here.](https://pavelrekun.dev/blog/news_25.08.2020/)


<a href="https://www.patreon.com/bePatron?u=29011893" target="_blank"><img src="https://i.imgur.com/U7uMymh.png" alt="Become my Patron" height="60"></a>
<a href="https://www.buymeacoffee.com/pavelrekun" target="_blank"><img src="https://i.imgur.com/yAojiF0.png" alt="Buy me a coffee" height="60"></a>

[![Crowdin](https://badges.crowdin.net/rekado/localized.svg)](https://crowdin.com/project/rekado) [![Stars](https://img.shields.io/github/stars/MenosGrante/Rekado)](https://github.com/MenosGrante/Rekado/stargazers) [![License](https://img.shields.io/github/license/MenosGrante/Rekado)](https://github.com/MenosGrante/Rekado/blob/master/LICENSE) [![Releases](https://img.shields.io/github/downloads/MenosGrante/Rekado/total.svg)](https://github.com/MenosGrante/Rekado/releases/latest)

Expand All @@ -10,12 +10,12 @@ Payload launcher written in Kotlin for Nintendo Switch.

**Application doesn't require Root on your device.**

[ReiNX](https://reinx.guide/), [Fusee Primary](https://github.com/Atmosphere-NX/Atmosphere) and [Hekate](https://github.com/CTCaer/hekate) payloads bundled as default.
[ReiNX](https://reinx.guide/), [Fusee](https://github.com/Atmosphere-NX/Atmosphere) and [Hekate](https://github.com/CTCaer/hekate) payloads bundled as default.

## Usage
* Launch application.
* Find a cable to connect your device to the Nintendo Switch. For proper work, this should be a cable that is designed for data transmission, not just for charging. It is advisable to use an **A-to-C** cable and an **USB OTG** adapter.
* In the **"Payloads"** category, click the **"+"** button to select preloaded payload from your device's storage. Or simply transfer your payload to the Rekado folder in the device's memory. Or you can use the bundled payloads (**ReiNX/Hekate/Fusee Primary**).
* In the **"Payloads"** category, click the **"+"** button to select preloaded payload from your device's storage. Or simply transfer your payload to the Rekado folder in the device's memory. Or you can use the bundled payloads (**ReiNX/Hekate/Fusee**).
* Enter your Nintendo Switch into **RCM** mode in any convenient way. Your Nintendo Switch will power on by itself when plugged in, be sure to hold **VOLUME +**.
* Connect the device to the Nintendo Switch and allow permission for the **USB** access if necessary. Wait unit payloads chooser dialog will be opened and select which one you want to load.
* Wait for payload to finish loading on your console.
Expand Down
3 changes: 0 additions & 3 deletions app/CMakeLists.txt

This file was deleted.

91 changes: 0 additions & 91 deletions app/build.gradle

This file was deleted.

89 changes: 89 additions & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
plugins {
id("com.android.application")

kotlin("android")
}

android {
compileSdk = Config.compileSDKVersion
ndkVersion = Config.NDKVersion

defaultConfig {
applicationId = "com.pavelrekun.rekado"

minSdk = Config.minimumSDKVersion
targetSdk = Config.targetSDKVersion
versionCode = Config.versionCode
versionName = Config.versionName
}

buildTypes {
getByName("release") {
isMinifyEnabled = false
isDebuggable = true
}
}

compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}

lint {
isAbortOnError = false
}

androidResources {
noCompress.add("bin")
}

buildFeatures {
viewBinding = true
}

externalNativeBuild {
cmake {
path = file("src/main/cpp/CMakeLists.txt")
}
}

kotlinOptions {
jvmTarget = "1.8"
}

}

dependencies {

// Private
implementation(fileTree(mapOf("dir" to "libs", "include" to listOf("*.aar"))))

// AndroidX
implementation(Libraries.AndroidX.Core)
implementation(Libraries.AndroidX.RecyclerView)
implementation(Libraries.AndroidX.Browser)
implementation(Libraries.AndroidX.Preferences)
implementation(Libraries.AndroidX.ConstraintLayout)
implementation(Libraries.AndroidX.LifecycleViewModel)
implementation(Libraries.AndroidX.LifecycleLiveData)
implementation(Libraries.AndroidX.LifecycleCommon)
implementation(Libraries.AndroidX.NavigationFragment)
implementation(Libraries.AndroidX.NavigationUI)

// Design
implementation(Libraries.Design.MaterialComponents)
implementation(Libraries.Design.FlexboxLayout)
implementation(Libraries.Design.Insetter)

// Tools
implementation(Libraries.Tools.EventBus)
implementation(Libraries.Tools.Retrofit)
implementation(Libraries.Tools.Zxing)
implementation(Libraries.Tools.Gson)
implementation(Libraries.Tools.AppUpdater)

// Kotlin
implementation(Libraries.Kotlin.Kotlin)
implementation(Libraries.Kotlin.Coroutines)

}
Binary file modified app/libs/magta.aar
Binary file not shown.
Binary file modified app/libs/penza.aar
Binary file not shown.
1 change: 1 addition & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

<activity
android:name=".containers.PrimaryContainerActivity"
android:exported="true"
android:launchMode="singleTop">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
Expand Down
3 changes: 3 additions & 0 deletions app/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
cmake_minimum_required(VERSION 3.4.1)
add_library( payload_launcher SHARED payload_launcher.cpp)
include_directories(.)
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ object DialogsShower {
val binding = DialogDonateBinding.inflate(activity.layoutInflater)
val builder = MaterialAlertDialogBuilder(activity)

binding.aboutPatreonButton.setOnClickListener { Utils.openLink(activity, Links.PATREON_LINK) }
binding.donateButton.setOnClickListener { Utils.openLink(activity, Links.BUY_ME_COFFEE_LINK) }

builder.setTitle(R.string.navigation_donate)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import com.pavelrekun.rekado.services.utils.PreferencesUtils

object PayloadHelper {

val BUNDLED_PAYLOADS = listOf("hekate.bin", "fusee_primary.bin", "reinx.bin")
val BUNDLED_PAYLOADS = listOf("hekate.bin", "fusee.bin", "reinx.bin")

fun getAllPayloads(): MutableList<Payload> {
return if (PreferencesUtils.checkHideBundledPayloadsEnabled()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,15 @@ object MemoryUtils {
private val resources = RekadoApplication.context.resources

fun parseBundledConfig() {
if (!PreferencesUtils.checkConfigExists()) {
if (PreferencesUtils.checkConfigExists()) {
val currentConfig = PreferencesUtils.getCurrentConfig()
val bundledConfig = resources.openRawResource(R.raw.config).parseConfig()

if (bundledConfig.timestamp > currentConfig.timestamp) {
PreferencesUtils.saveConfig(bundledConfig)
copyBundledPayloads()
}
} else {
val config = resources.openRawResource(R.raw.config).parseConfig()
PreferencesUtils.saveConfig(config)
copyBundledPayloads()
Expand All @@ -31,7 +39,7 @@ object MemoryUtils {
}

private fun copyBundledPayloads() {
copyPayload(resources.openRawResource(R.raw.fusee_primary), "fusee_primary.bin")
copyPayload(resources.openRawResource(R.raw.fusee), "fusee.bin")
copyPayload(resources.openRawResource(R.raw.hekate), "hekate.bin")
copyPayload(resources.openRawResource(R.raw.reinx), "reinx.bin")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ object SerialUtils {
private const val STATUS_ERROR = 3

fun defineConsoleStatus(serialNumber: String): Int {
return when (defineConsoleStatusInternal(serialNumber.toUpperCase(Locale.ROOT))) {
return when (defineConsoleStatusInternal(serialNumber.uppercase(Locale.ROOT))) {
STATUS_NOT_PATCHED -> R.string.serial_checker_status_not_patched
STATUS_PATCHED -> R.string.serial_checker_status_patched
STATUS_POSSIBLY_PATCHED -> R.string.serial_checker_status_possibly_patched
Expand Down
Binary file modified app/src/main/res/drawable-nodpi/pic_donate.webp
Binary file not shown.
28 changes: 9 additions & 19 deletions app/src/main/res/layout/dialog_donate.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,15 @@
android:textColor="?android:attr/textColorSecondary"
android:textSize="16sp" />

<com.google.android.material.button.MaterialButton
android:id="@+id/aboutPatreonButton"
style="@style/Widget.MaterialComponents.Button.TextButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
<ImageView
android:id="@+id/donateButton"
android:layout_width="180dp"
android:layout_height="40dp"
android:layout_gravity="center_horizontal"
android:layout_marginTop="8dp"
android:fontFamily="@font/gilroy_medium"
android:paddingStart="16dp"
android:paddingTop="8dp"
android:paddingEnd="16dp"
android:paddingBottom="8dp"
android:text="@string/donate_button"
android:textColor="@color/colorWhite"
android:textSize="12sp"
app:backgroundTint="#FF424D"
app:cornerRadius="24dp"
app:icon="@drawable/ic_donate_patreon"
app:iconPadding="8dp"
app:iconTint="@color/colorWhite" />
android:layout_marginBottom="24dp"
android:clickable="true"
android:contentDescription="@null"
android:focusable="true"
app:srcCompat="@drawable/pic_donate" />

</LinearLayout>
10 changes: 5 additions & 5 deletions app/src/main/res/raw/config.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"timestamp": 1625835635,
"timestamp": 1631268813,
"payloads":[
{
"title":"hekate.bin",
"downloadUrl": "https://pavelrekun.dev/payloads/hekate.bin",
"version":"5.5.8"
"version":"5.6.0"
},
{
"title":"fusee_primary.bin",
"downloadUrl": "https://pavelrekun.dev/payloads/fusee_primary.bin",
"version":"0.19.5"
"title":"fusee.bin",
"downloadUrl": "https://pavelrekun.dev/payloads/fusee.bin",
"version":"1.0.0"
},
{
"title":"reinx.bin",
Expand Down
Binary file added app/src/main/res/raw/fusee.bin
Binary file not shown.
Binary file removed app/src/main/res/raw/fusee_primary.bin
Binary file not shown.
11 changes: 10 additions & 1 deletion app/src/main/res/values-es/strings.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Strings for Navigation -->
<string name="navigation_payloads">Cargas</string>
<string name="navigation_tools">Herramientas</string>
<string name="navigation_instructions">Instrucciones</string>
<string name="navigation_logs">Registros</string>
Expand All @@ -25,16 +26,21 @@
<string name="tools_serial_checker_title">Verificador de Serial</string>
<string name="tools_serial_checker_description">Verifica si tu Nintendo Switch es vulnerable usando el numero de serie de tu unidad</string>
<!-- Strings for Instructions -->
<string name="instructions_category_cable">Cable</string>
<string name="instructions_category_cable_description">Primero, necesitas buscar un cable para conectar tu dispositivo a la Nintendo Switch. Para un uso adecuado, tiene que ser un cable apto para la transmisión de datos, no solo para la carga.\n\nEs aconsejable usar un cable tipo A-C y un Adaptador OTG USB.</string>
<string name="instructions_category_payload">Carga</string>
<string name="instructions_category_payload_description">Puedes a\u00f1adir tu payload desde la memoria de tu dispositivo (haciendo click en el bot\u00f3n \"+\"), descargarlo directamente desde un link (haciendo click en el bot\u00f3n con el icono de \"nube\") en la pantalla de \"payloads\" o simplemente mu\u00e9velo a la carpeta de Rekado (/sdcard/Android/data/com.pavelrekun.rekado/files/).\n\nO puedes usar los payloads preinstalados (Hekate/Fusee Primary/ReiNX).</string>
<string name="instructions_category_rcm_description">Coloca tu Nintendo Switch en modo RCM de una forma correcta. \n\nTu Nintendo Switch se encenderá cuando la enchufes, asegurate de mantener oprimido \"VOLUMEN +\".</string>
<string name="instructions_category_final">Final</string>
<string name="instructions_category_final_description">Conecta tu dispositivo a la Nintendo Switch y da permisos de acceso a USB si es necesario. Espera hasta que el dialogo del selector de payloads se abra y selecciona el que quieras cargar.</string>
<!-- Strings for Donate -->
<string name="donate_description">Puedes apoyar al desarrollador de esta aplicación comprando un café. Si tu quieres, por supuesto.</string>
<string name="donate_button">Conviértete en un \"Patreon\"</string>
<!-- Strings for Settings -->
<string name="settings_category_auto_injector">Auto-inyector</string>
<string name="settings_auto_injector_status_title_disabled">Activar \"Auto-injector\"</string>
<string name="settings_auto_injector_status_title_enabled">Desactivar \"Auto-injector\"</string>
<string name="settings_auto_injector_payload_title">Payload</string>
<string name="settings_category_payloads">Payloads</string>
<string name="settings_payloads_hide_title">No mostrar payloads incluidos</string>
<string name="settings_payloads_hide_summary">No mostrar todas los payloads incluidos (Hekate/Fusee Primary/ReiNX)</string>
<string name="settings_payloads_reset_title">Limpiar</string>
Expand All @@ -51,6 +57,9 @@
<string name="settings_picker_color_title">Elegir color</string>
<string name="settings_picker_color_button_close">Cerrar</string>
<string name="settings_picker_theme_title">Elegir tema</string>
<string name="settings_picker_theme_category_control">Control</string>
<string name="settings_picker_theme_category_themes">Temas</string>
<string name="settings_picker_theme_control_manual">Manual</string>
<string name="settings_picker_theme_control_system_default">Por defecto</string>
<string name="settings_picker_theme_control_battery_saver">Escoger \"Ahorrador de batería\"</string>
<string name="settings_utils_restart_dialog_title">Ajustes cambiados</string>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-fr/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<string name="instructions_category_final">Finalement</string>
<string name="instructions_category_final_description">Connectez votre appareil à la Switch et autorisez la permission pour l\'accès USB si nécessaire. Attendez que l\'application ouvre le menu de choix de payload et sélectionner celui que vous voulez injecter.</string>
<!-- Strings for Donate -->
<string name="donate_description">Vous pouvez soutenir le développement de l\'application en m\'achetant un café. Si vous le voulez bien sûr.</string>
<string name="donate_button">Devenir un Patreon</string>
<!-- Strings for Settings -->
<string name="settings_category_auto_injector">Injection automatique</string>
<string name="settings_auto_injector_status_title_disabled">Activer l\'injection automatique</string>
Expand Down
Loading

0 comments on commit 2643f63

Please sign in to comment.