Skip to content

Commit

Permalink
Rekado 4.1.2
Browse files Browse the repository at this point in the history
- Added: All finished localizations from Crowdin.
- Removed: SX Loader from bundled payloads.
- Updated: fusee_primary and hekate payloads to the latest versions.
  • Loading branch information
MenosGrante committed Apr 17, 2021
1 parent 46fbc2b commit 21fdda3
Show file tree
Hide file tree
Showing 48 changed files with 765 additions and 299 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ Payload launcher written in Kotlin for Nintendo Switch.

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

[SX Loader](https://sx.xecuter.com/), [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 Primary](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 (**SX Loader/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 Primary**).
* 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
9 changes: 5 additions & 4 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ android {
applicationId "com.pavelrekun.rekado"
minSdkVersion minimumSDKVersion
targetSdkVersion currentSDKVersion
versionCode 74
versionName "4.1.1"
versionCode appVersionCode
versionName appVersionName

archivesBaseName = "[$versionName] Rekado [${versionCode}]"
}
Expand Down Expand Up @@ -66,8 +66,9 @@ dependencies {
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$androidXLifecycleVersion"
implementation "androidx.lifecycle:lifecycle-livedata-ktx:$androidXLifecycleVersion"
implementation "androidx.lifecycle:lifecycle-common-java8:$androidXLifecycleVersion"
implementation "androidx.navigation:navigation-fragment-ktx:$androixXNavigationVersion"
implementation "androidx.navigation:navigation-ui-ktx:$androixXNavigationVersion"
implementation "androidx.navigation:navigation-fragment-ktx:$androidXNavigationVersion"
implementation "androidx.navigation:navigation-ui-ktx:$androidXNavigationVersion"
implementation "androidx.swiperefreshlayout:swiperefreshlayout:$androidXSwipeToRefreshLayoutVersion"

// Google: Design
implementation "com.google.android.material:material:$materialComponentsVersion"
Expand Down
Binary file modified app/libs/magta.aar
Binary file not shown.
Binary file modified app/libs/penza.aar
Binary file not shown.
8 changes: 5 additions & 3 deletions app/src/main/java/com/pavelrekun/rekado/base/BaseActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ import android.os.Build
import android.os.Bundle
import androidx.navigation.NavController
import androidx.navigation.findNavController
import com.pavelrekun.magta.design.resolveColorAttribute
import com.pavelrekun.magta.design.tintNavigationBar
import com.pavelrekun.magta.design.tintTaskDescription
import com.pavelrekun.penza.base.PenzaActivity
import com.pavelrekun.penza.services.helpers.ColorsHelper
import com.pavelrekun.penza.services.helpers.DesignHelper
import com.pavelrekun.rekado.R
import com.pavelrekun.rekado.containers.PrimaryContainerActivity

Expand Down Expand Up @@ -35,11 +37,11 @@ open class BaseActivity : PenzaActivity() {
}

private fun initDesignRules() {
DesignHelper.tintTaskDescription(this, R.mipmap.ic_launcher, R.string.app_name, ColorsHelper.resolveColorAttribute(this, android.R.attr.windowBackground))
tintTaskDescription(R.mipmap.ic_launcher, R.string.app_name, resolveColorAttribute(android.R.attr.windowBackground))

if (this is PrimaryContainerActivity) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O_MR1) {
DesignHelper.tintNavigationBar(this, ColorsHelper.resolveColorAttribute(this, R.attr.colorBackgroundSecondary))
tintNavigationBar(resolveColorAttribute(R.attr.colorBackgroundSecondary))
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import android.view.ViewGroup
import androidx.preference.Preference
import androidx.preference.PreferenceFragmentCompat
import androidx.recyclerview.widget.RecyclerView
import com.pavelrekun.penza.services.extensions.convertPXToDP
import com.pavelrekun.magta.design.px

open class BasePreferencesFragment(private val preferencesLayoutId: Int, private val titleResId: Int) : PreferenceFragmentCompat() {

Expand All @@ -33,7 +33,7 @@ open class BasePreferencesFragment(private val preferencesLayoutId: Int, private
super.onScrolled(recyclerView, dx, dy)

if (view.canScrollVertically(SCROLL_DIRECTION_UP)) {
requireBaseActivity().supportActionBar?.elevation = 3.convertPXToDP(requireBaseActivity()).toFloat()
requireBaseActivity().supportActionBar?.elevation = 3.px.toFloat()
} else {
requireBaseActivity().supportActionBar?.elevation = 0F
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import com.pavelrekun.rekado.services.Constants
import com.pavelrekun.rekado.services.dialogs.DialogsShower
import com.pavelrekun.rekado.services.extensions.openAboutScreen
import com.pavelrekun.rekado.services.extensions.openSettingsScreen
import com.pavelrekun.rekado.services.extensions.openTranslatorsScreen

class PrimaryContainerActivity : BaseActivity() {

Expand Down Expand Up @@ -54,11 +53,6 @@ class PrimaryContainerActivity : BaseActivity() {
true
}

R.id.navigation_translators -> {
openTranslatorsScreen()
true
}

else -> return false
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ import android.graphics.Color
import android.os.Build
import android.os.Bundle
import androidx.activity.viewModels
import androidx.lifecycle.Observer
import com.pavelrekun.magta.isGesturalNavigationEnabled
import com.pavelrekun.magta.design.tintNavigationBar
import com.pavelrekun.magta.system.isGesturalNavigationEnabled
import com.pavelrekun.penza.pickers.theme.ThemePickerViewModel
import com.pavelrekun.penza.services.helpers.DesignHelper
import com.pavelrekun.rekado.R
import com.pavelrekun.rekado.base.BaseActivity
import com.pavelrekun.rekado.databinding.ActivityContainerSecondaryBinding
import com.pavelrekun.rekado.services.dialogs.DialogsShower
import com.pavelrekun.rekado.services.extensions.*
import dev.chrisbanes.insetter.applyInsetter
import dev.chrisbanes.insetter.applySystemWindowInsetsToPadding

class SecondaryContainerActivity : BaseActivity() {
Expand All @@ -31,7 +31,7 @@ class SecondaryContainerActivity : BaseActivity() {
prepareEdgeToEdge()
prepareObservers()

if(savedInstanceState == null) {
if (savedInstanceState == null) {
navigate()
}
}
Expand All @@ -42,10 +42,14 @@ class SecondaryContainerActivity : BaseActivity() {
window.setDecorFitsSystemWindows(false)
}

DesignHelper.tintNavigationBar(this, Color.TRANSPARENT)
tintNavigationBar(Color.TRANSPARENT)
}

binding.secondaryLayoutToolbar.applySystemWindowInsetsToPadding(top = true)
binding.secondaryLayoutToolbar.applyInsetter {
type(statusBars = true) {
padding()
}
}
}

private fun navigate() {
Expand All @@ -63,7 +67,6 @@ class SecondaryContainerActivity : BaseActivity() {
return when (intent.getIntExtra(NAVIGATION_TYPE, NAVIGATION_DESTINATION_UNKNOWN)) {
NAVIGATION_DESTINATION_SETTINGS -> R.id.navigationSettings
NAVIGATION_DESTINATION_ABOUT -> R.id.navigationAbout
NAVIGATION_DESTINATION_TRANSLATORS -> R.id.navigationTranslators
NAVIGATION_DESTINATION_TOOLS_SERIAL_CHECKER -> R.id.navigationSerialChecker
else -> NAVIGATION_DESTINATION_UNKNOWN
}
Expand All @@ -77,11 +80,11 @@ class SecondaryContainerActivity : BaseActivity() {
}

private fun prepareObservers() {
themesPickerViewModel.selectionResult.observe(this, Observer {
themesPickerViewModel.selectionResult.observe(this, {
DialogsShower.showSettingsRestartDialog(this)
})

themesPickerViewModel.controlResult.observe(this, Observer {
themesPickerViewModel.controlResult.observe(this, {
DialogsShower.showSettingsRestartDialog(this)
})
}
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/com/pavelrekun/rekado/data/Payload.kt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.pavelrekun.rekado.data

import com.google.gson.annotations.SerializedName
import com.pavelrekun.penza.services.extensions.EMPTY_STRING
import com.pavelrekun.magta.system.EMPTY_STRING
import com.pavelrekun.rekado.services.utils.MemoryUtils.getLocation

data class Payload(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ package com.pavelrekun.rekado.screens.about_fragment

import android.os.Bundle
import android.view.View
import com.pavelrekun.magta.constants.Links
import com.pavelrekun.magta.services.constants.Links
import com.pavelrekun.magta.system.viewBinding
import com.pavelrekun.rekado.BuildConfig
import com.pavelrekun.rekado.R
import com.pavelrekun.rekado.base.BaseFragment
import com.pavelrekun.rekado.databinding.FragmentAboutBinding
import com.pavelrekun.rekado.services.Constants
import com.pavelrekun.rekado.services.extensions.viewBinding
import com.pavelrekun.rekado.services.utils.Utils
import dev.chrisbanes.insetter.applySystemWindowInsetsToPadding
import dev.chrisbanes.insetter.applyInsetter

class AboutFragment : BaseFragment(R.layout.fragment_about) {

Expand Down Expand Up @@ -39,7 +39,11 @@ class AboutFragment : BaseFragment(R.layout.fragment_about) {
}

private fun initEdgeToEdge() {
binding.aboutLayoutContainer.applySystemWindowInsetsToPadding(bottom = true)
binding.aboutLayoutContainer.applyInsetter {
type(navigationBars = true) {
padding()
}
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ package com.pavelrekun.rekado.screens.instructions_fragment

import android.os.Bundle
import android.view.View
import com.pavelrekun.magta.system.viewBinding
import com.pavelrekun.rekado.R
import com.pavelrekun.rekado.base.BaseFragment
import com.pavelrekun.rekado.databinding.FragmentInstructionsBinding
import com.pavelrekun.rekado.services.Constants
import com.pavelrekun.rekado.services.extensions.viewBinding
import com.pavelrekun.rekado.services.utils.Utils

class InstructionsFragment : BaseFragment(R.layout.fragment_instructions) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import android.os.Bundle
import android.view.View
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import com.pavelrekun.penza.services.extensions.tintContrast
import com.pavelrekun.magta.design.tintContrast
import com.pavelrekun.magta.system.viewBinding
import com.pavelrekun.rekado.R
import com.pavelrekun.rekado.base.BaseFragment
import com.pavelrekun.rekado.databinding.FragmentLogsBinding
import com.pavelrekun.rekado.services.utils.LoginUtils
import com.pavelrekun.rekado.services.extensions.viewBinding

class LogsFragment : BaseFragment(R.layout.fragment_logs) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.recyclerview.widget.RecyclerView
import com.pavelrekun.penza.services.extensions.EMPTY_STRING
import com.pavelrekun.magta.system.EMPTY_STRING
import com.pavelrekun.rekado.data.Payload
import com.pavelrekun.rekado.databinding.ItemPayloadBinding
import com.pavelrekun.rekado.services.Events
import com.pavelrekun.rekado.services.utils.LoginUtils
import com.pavelrekun.rekado.services.payloads.PayloadHelper
import com.pavelrekun.rekado.services.utils.LoginUtils
import org.greenrobot.eventbus.EventBus
import java.io.File

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,16 @@ import android.os.Bundle
import android.view.View
import android.widget.Toast
import androidx.fragment.app.activityViewModels
import androidx.lifecycle.Observer
import androidx.recyclerview.widget.LinearLayoutManager
import com.pavelrekun.penza.services.extensions.tintContrast
import com.pavelrekun.magta.design.tintContrast
import com.pavelrekun.magta.system.extractFileName
import com.pavelrekun.magta.system.viewBinding
import com.pavelrekun.rekado.R
import com.pavelrekun.rekado.base.BaseFragment
import com.pavelrekun.rekado.databinding.FragmentPayloadsBinding
import com.pavelrekun.rekado.services.Constants
import com.pavelrekun.rekado.services.Events
import com.pavelrekun.rekado.services.dialogs.DialogsShower
import com.pavelrekun.rekado.services.extensions.extractFileName
import com.pavelrekun.rekado.services.extensions.viewBinding
import com.pavelrekun.rekado.services.payloads.PayloadHelper
import com.pavelrekun.rekado.services.payloads.Result
import com.pavelrekun.rekado.services.utils.LoginUtils
Expand Down Expand Up @@ -50,7 +49,7 @@ class PayloadsFragment : BaseFragment(R.layout.fragment_payloads) {
if (requestCode == Constants.KEY_OPEN_PAYLOAD) {
when (resultCode) {
Activity.RESULT_OK -> data?.data?.let {
val name = it.extractFileName()
val name = it.extractFileName(requireContext())
if (name != null) {
val inputStream = requireBaseActivity().contentResolver.openInputStream(it)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class PayloadsViewModel : ViewModel() {
val downloadPayloadResult = MutableLiveData<Result>()

fun fetchExternalConfig() {
val errorsHandler = CoroutineExceptionHandler { _, exception ->
val errorsHandler = CoroutineExceptionHandler { _, _ ->
fetchConfigResult.value = Result.ERROR
isProgressShowing.value = false
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,16 @@ import android.os.Bundle
import android.view.View
import android.widget.Toast
import com.google.zxing.integration.android.IntentIntegrator
import com.pavelrekun.magta.design.getString
import com.pavelrekun.magta.design.isEmpty
import com.pavelrekun.magta.system.viewBinding
import com.pavelrekun.rekado.R
import com.pavelrekun.rekado.base.BaseFragment
import com.pavelrekun.rekado.databinding.FragmentSerialCheckerBinding
import com.pavelrekun.rekado.services.Constants
import com.pavelrekun.rekado.services.extensions.getString
import com.pavelrekun.rekado.services.extensions.isEmpty
import com.pavelrekun.rekado.services.extensions.viewBinding
import com.pavelrekun.rekado.services.utils.SerialUtils
import com.pavelrekun.rekado.services.utils.Utils
import dev.chrisbanes.insetter.applyInsetter
import dev.chrisbanes.insetter.applySystemWindowInsetsToPadding

class SerialCheckerFragment : BaseFragment(R.layout.fragment_serial_checker) {
Expand Down Expand Up @@ -73,7 +74,11 @@ class SerialCheckerFragment : BaseFragment(R.layout.fragment_serial_checker) {
}

private fun initEdgeToEdge() {
binding.serialCheckerLayoutContainer.applySystemWindowInsetsToPadding(bottom = true)
binding.serialCheckerLayoutContainer.applyInsetter {
type(navigationBars = true) {
padding()
}
}
}

override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import com.pavelrekun.rekado.services.payloads.PayloadHelper
import com.pavelrekun.rekado.services.utils.LoginUtils
import com.pavelrekun.rekado.services.utils.PreferencesUtils
import com.pavelrekun.rekado.services.utils.Utils
import dev.chrisbanes.insetter.applyInsetter
import dev.chrisbanes.insetter.applySystemWindowInsetsToPadding

class SettingsFragment : BasePreferencesFragment(R.xml.preferences, R.string.navigation_settings) {
Expand Down Expand Up @@ -120,7 +121,7 @@ class SettingsFragment : BasePreferencesFragment(R.xml.preferences, R.string.nav
}

private fun initPayloadsCategory() {
payloadsHidePreference.setOnPreferenceChangeListener { preference, newValue ->
payloadsHidePreference.setOnPreferenceChangeListener { _, newValue ->
PreferencesUtils.setHideBundledPayloadsEnabled(newValue as Boolean)
initAutoInjectorCategory()
true
Expand All @@ -141,7 +142,11 @@ class SettingsFragment : BasePreferencesFragment(R.xml.preferences, R.string.nav


private fun initEdgeToEdge() {
listView.applySystemWindowInsetsToPadding(bottom = true)
listView.applyInsetter {
type(navigationBars = true) {
padding()
}
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ package com.pavelrekun.rekado.screens.tools_fragment

import android.os.Bundle
import android.view.View
import com.pavelrekun.magta.system.viewBinding
import com.pavelrekun.rekado.R
import com.pavelrekun.rekado.base.BaseFragment
import com.pavelrekun.rekado.databinding.FragmentToolsBinding
import com.pavelrekun.rekado.services.extensions.openToolsSerialCheckerScreen
import com.pavelrekun.rekado.services.extensions.viewBinding

class ToolsFragment : BaseFragment(R.layout.fragment_tools) {

Expand Down
Loading

0 comments on commit 21fdda3

Please sign in to comment.