Compare commits
12 Commits
android-20
...
android-21
Author | SHA1 | Date | |
---|---|---|---|
712d7604cd | |||
5994e45f3f | |||
7701c91e79 | |||
2a00de23e8 | |||
3e5078f409 | |||
6e67b25af9 | |||
e91667ba75 | |||
d45561ace0 | |||
0fdd6e8934 | |||
35794f4f18 | |||
7b01454d5f | |||
e4915fb7d2 |
@ -1,12 +1,9 @@
|
|||||||
| Pull Request | Commit | Title | Author | Merged? |
|
| Pull Request | Commit | Title | Author | Merged? |
|
||||||
|----|----|----|----|----|
|
|----|----|----|----|----|
|
||||||
| [12499](https://github.com/yuzu-emu/yuzu-android//pull/12499) | [`e4915fb7d`](https://github.com/yuzu-emu/yuzu-android//pull/12499/files) | Rework time services | [Kelebek1](https://github.com/Kelebek1/) | Yes |
|
|
||||||
| [12749](https://github.com/yuzu-emu/yuzu-android//pull/12749) | [`e3171486d`](https://github.com/yuzu-emu/yuzu-android//pull/12749/files) | general: workarounds for SMMU syncing issues | [liamwhite](https://github.com/liamwhite/) | Yes |
|
| [12749](https://github.com/yuzu-emu/yuzu-android//pull/12749) | [`e3171486d`](https://github.com/yuzu-emu/yuzu-android//pull/12749/files) | general: workarounds for SMMU syncing issues | [liamwhite](https://github.com/liamwhite/) | Yes |
|
||||||
| [12759](https://github.com/yuzu-emu/yuzu-android//pull/12759) | [`a120f8ff4`](https://github.com/yuzu-emu/yuzu-android//pull/12759/files) | core: miscellaneous fixes | [liamwhite](https://github.com/liamwhite/) | Yes |
|
| [12759](https://github.com/yuzu-emu/yuzu-android//pull/12759) | [`a120f8ff4`](https://github.com/yuzu-emu/yuzu-android//pull/12759/files) | core: miscellaneous fixes | [liamwhite](https://github.com/liamwhite/) | Yes |
|
||||||
| [12769](https://github.com/yuzu-emu/yuzu-android//pull/12769) | [`ad4622da2`](https://github.com/yuzu-emu/yuzu-android//pull/12769/files) | core: hid: Reduce controller requests | [german77](https://github.com/german77/) | Yes |
|
| [12769](https://github.com/yuzu-emu/yuzu-android//pull/12769) | [`ad4622da2`](https://github.com/yuzu-emu/yuzu-android//pull/12769/files) | core: hid: Reduce controller requests | [german77](https://github.com/german77/) | Yes |
|
||||||
| [12777](https://github.com/yuzu-emu/yuzu-android//pull/12777) | [`fb8c0f85f`](https://github.com/yuzu-emu/yuzu-android//pull/12777/files) | android: Add firmware decryption warning | [t895](https://github.com/t895/) | Yes |
|
| [12777](https://github.com/yuzu-emu/yuzu-android//pull/12777) | [`b8be8dff6`](https://github.com/yuzu-emu/yuzu-android//pull/12777/files) | android: Add key warning | [t895](https://github.com/t895/) | Yes |
|
||||||
| [12786](https://github.com/yuzu-emu/yuzu-android//pull/12786) | [`5a4dd4ba8`](https://github.com/yuzu-emu/yuzu-android//pull/12786/files) | android: Show driver vendor in FPS overlay | [t895](https://github.com/t895/) | Yes |
|
|
||||||
| [12787](https://github.com/yuzu-emu/yuzu-android//pull/12787) | [`7b01454d5`](https://github.com/yuzu-emu/yuzu-android//pull/12787/files) | android: Only compare game contents for GameAdapter | [t895](https://github.com/t895/) | Yes |
|
|
||||||
|
|
||||||
|
|
||||||
End of merge log. You can find the original README.md below the break.
|
End of merge log. You can find the original README.md below the break.
|
||||||
|
@ -624,11 +624,6 @@ object NativeLibrary {
|
|||||||
*/
|
*/
|
||||||
external fun areKeysPresent(): Boolean
|
external fun areKeysPresent(): Boolean
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if the system firmware can be decrypted by checking the Mii model system archive
|
|
||||||
*/
|
|
||||||
external fun canDecryptSystemArchive(): Boolean
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Button type for use in onTouchEvent
|
* Button type for use in onTouchEvent
|
||||||
*/
|
*/
|
||||||
|
@ -494,12 +494,7 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback {
|
|||||||
val gpuDriver = NativeLibrary.getGpuDriver()
|
val gpuDriver = NativeLibrary.getGpuDriver()
|
||||||
if (_binding != null) {
|
if (_binding != null) {
|
||||||
binding.showFpsText.text =
|
binding.showFpsText.text =
|
||||||
String.format(
|
String.format("FPS: %.1f\n%s/%s", perfStats[FPS], cpuBackend, gpuDriver)
|
||||||
"FPS: %.1f\n%s - %s",
|
|
||||||
perfStats[FPS],
|
|
||||||
cpuBackend,
|
|
||||||
gpuDriver
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
perfStatsUpdateHandler.postDelayed(perfStatsUpdater!!, 800)
|
perfStatsUpdateHandler.postDelayed(perfStatsUpdater!!, 800)
|
||||||
}
|
}
|
||||||
|
@ -31,6 +31,7 @@ import androidx.preference.PreferenceManager
|
|||||||
import androidx.viewpager2.widget.ViewPager2.OnPageChangeCallback
|
import androidx.viewpager2.widget.ViewPager2.OnPageChangeCallback
|
||||||
import com.google.android.material.transition.MaterialFadeThrough
|
import com.google.android.material.transition.MaterialFadeThrough
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
|
import org.yuzu.yuzu_emu.NativeLibrary
|
||||||
import java.io.File
|
import java.io.File
|
||||||
import org.yuzu.yuzu_emu.R
|
import org.yuzu.yuzu_emu.R
|
||||||
import org.yuzu.yuzu_emu.YuzuApplication
|
import org.yuzu.yuzu_emu.YuzuApplication
|
||||||
@ -162,7 +163,7 @@ class SetupFragment : Fragment() {
|
|||||||
R.string.install_prod_keys_warning_help,
|
R.string.install_prod_keys_warning_help,
|
||||||
{
|
{
|
||||||
val file = File(DirectoryInitialization.userDirectory + "/keys/prod.keys")
|
val file = File(DirectoryInitialization.userDirectory + "/keys/prod.keys")
|
||||||
if (file.exists()) {
|
if (file.exists() && NativeLibrary.areKeysPresent()) {
|
||||||
StepState.COMPLETE
|
StepState.COMPLETE
|
||||||
} else {
|
} else {
|
||||||
StepState.INCOMPLETE
|
StepState.INCOMPLETE
|
||||||
@ -347,7 +348,8 @@ class SetupFragment : Fragment() {
|
|||||||
val getProdKey =
|
val getProdKey =
|
||||||
registerForActivityResult(ActivityResultContracts.OpenDocument()) { result ->
|
registerForActivityResult(ActivityResultContracts.OpenDocument()) { result ->
|
||||||
if (result != null) {
|
if (result != null) {
|
||||||
if (mainActivity.processKey(result)) {
|
mainActivity.processKey(result)
|
||||||
|
if (NativeLibrary.areKeysPresent()) {
|
||||||
keyCallback.onStepCompleted()
|
keyCallback.onStepCompleted()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -34,9 +34,6 @@ class HomeViewModel : ViewModel() {
|
|||||||
private val _checkKeys = MutableStateFlow(false)
|
private val _checkKeys = MutableStateFlow(false)
|
||||||
val checkKeys = _checkKeys.asStateFlow()
|
val checkKeys = _checkKeys.asStateFlow()
|
||||||
|
|
||||||
private val _checkDecryption = MutableStateFlow(false)
|
|
||||||
val checkDecryption = _checkDecryption.asStateFlow()
|
|
||||||
|
|
||||||
var navigatedToSetup = false
|
var navigatedToSetup = false
|
||||||
|
|
||||||
fun setNavigationVisibility(visible: Boolean, animated: Boolean) {
|
fun setNavigationVisibility(visible: Boolean, animated: Boolean) {
|
||||||
@ -76,8 +73,4 @@ class HomeViewModel : ViewModel() {
|
|||||||
fun setCheckKeys(value: Boolean) {
|
fun setCheckKeys(value: Boolean) {
|
||||||
_checkKeys.value = value
|
_checkKeys.value = value
|
||||||
}
|
}
|
||||||
|
|
||||||
fun setCheckDecryption(value: Boolean) {
|
|
||||||
_checkDecryption.value = value
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -82,7 +82,11 @@ class MainActivity : AppCompatActivity(), ThemeProvider {
|
|||||||
checkedDecryption = savedInstanceState.getBoolean(CHECKED_DECRYPTION)
|
checkedDecryption = savedInstanceState.getBoolean(CHECKED_DECRYPTION)
|
||||||
}
|
}
|
||||||
if (!checkedDecryption) {
|
if (!checkedDecryption) {
|
||||||
|
val firstTimeSetup = PreferenceManager.getDefaultSharedPreferences(applicationContext)
|
||||||
|
.getBoolean(Settings.PREF_FIRST_APP_LAUNCH, true)
|
||||||
|
if (!firstTimeSetup) {
|
||||||
checkKeys()
|
checkKeys()
|
||||||
|
}
|
||||||
checkedDecryption = true
|
checkedDecryption = true
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -171,16 +175,6 @@ class MainActivity : AppCompatActivity(), ThemeProvider {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
launch {
|
|
||||||
repeatOnLifecycle(Lifecycle.State.CREATED) {
|
|
||||||
homeViewModel.checkDecryption.collect {
|
|
||||||
if (it) {
|
|
||||||
checkDecryption()
|
|
||||||
homeViewModel.setCheckDecryption(false)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Dismiss previous notifications (should not happen unless a crash occurred)
|
// Dismiss previous notifications (should not happen unless a crash occurred)
|
||||||
@ -194,20 +188,6 @@ class MainActivity : AppCompatActivity(), ThemeProvider {
|
|||||||
MessageDialogFragment.newInstance(
|
MessageDialogFragment.newInstance(
|
||||||
titleId = R.string.keys_missing,
|
titleId = R.string.keys_missing,
|
||||||
descriptionId = R.string.keys_missing_description,
|
descriptionId = R.string.keys_missing_description,
|
||||||
helpLinkId = R.string.keys_missing_help,
|
|
||||||
dismissible = false,
|
|
||||||
positiveAction = { homeViewModel.setCheckDecryption(true) }
|
|
||||||
).show(supportFragmentManager, MessageDialogFragment.TAG)
|
|
||||||
} else {
|
|
||||||
checkDecryption()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun checkDecryption() {
|
|
||||||
if (!NativeLibrary.canDecryptSystemArchive()) {
|
|
||||||
MessageDialogFragment.newInstance(
|
|
||||||
titleId = R.string.decryption_failed,
|
|
||||||
descriptionId = R.string.decryption_failed_description,
|
|
||||||
helpLinkId = R.string.keys_missing_help
|
helpLinkId = R.string.keys_missing_help
|
||||||
).show(supportFragmentManager, MessageDialogFragment.TAG)
|
).show(supportFragmentManager, MessageDialogFragment.TAG)
|
||||||
}
|
}
|
||||||
|
@ -925,10 +925,4 @@ jboolean Java_org_yuzu_yuzu_1emu_NativeLibrary_areKeysPresent(JNIEnv* env, jobje
|
|||||||
return ContentManager::AreKeysPresent();
|
return ContentManager::AreKeysPresent();
|
||||||
}
|
}
|
||||||
|
|
||||||
jboolean Java_org_yuzu_yuzu_1emu_NativeLibrary_canDecryptSystemArchive(JNIEnv* env, jobject jobj) {
|
|
||||||
auto& system = EmulationSession::GetInstance().System();
|
|
||||||
system.GetFileSystemController().CreateFactories(*system.GetFilesystem());
|
|
||||||
return ContentManager::CanDecryptSystemArchive(EmulationSession::GetInstance().System());
|
|
||||||
}
|
|
||||||
|
|
||||||
} // extern "C"
|
} // extern "C"
|
||||||
|
@ -147,8 +147,6 @@
|
|||||||
<string name="keys_missing">Encryption keys are missing</string>
|
<string name="keys_missing">Encryption keys are missing</string>
|
||||||
<string name="keys_missing_description">Firmware and retail games cannot be decrypted</string>
|
<string name="keys_missing_description">Firmware and retail games cannot be decrypted</string>
|
||||||
<string name="keys_missing_help">https://yuzu-emu.org/help/quickstart/#dumping-decryption-keys</string>
|
<string name="keys_missing_help">https://yuzu-emu.org/help/quickstart/#dumping-decryption-keys</string>
|
||||||
<string name="decryption_failed">System archive decryption failed</string>
|
|
||||||
<string name="decryption_failed_description">Encryption keys failed to decrypt firmware</string>
|
|
||||||
|
|
||||||
<!-- Applet launcher strings -->
|
<!-- Applet launcher strings -->
|
||||||
<string name="applets">Applet launcher</string>
|
<string name="applets">Applet launcher</string>
|
||||||
|
@ -368,30 +368,6 @@ inline GameVerificationResult VerifyGameContents(
|
|||||||
return GameVerificationResult::Success;
|
return GameVerificationResult::Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* \brief Check if the system firmware can be decrypted by checking the Mii model system archive
|
|
||||||
* \param system Reference to the system instance
|
|
||||||
* \return Whether we were able to decrypt the RomFS of the Mii model. Used to see if we can decrypt
|
|
||||||
* firmware.
|
|
||||||
*/
|
|
||||||
inline bool CanDecryptSystemArchive(Core::System& system) {
|
|
||||||
constexpr u64 MiiModelId = 0x0100000000000802;
|
|
||||||
const auto bis_system = system.GetFileSystemController().GetSystemNANDContents();
|
|
||||||
if (!bis_system) {
|
|
||||||
// Not having system BIS files is not an error.
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
const auto mii_nca = bis_system->GetEntry(MiiModelId, FileSys::ContentRecordType::Data);
|
|
||||||
if (!mii_nca) {
|
|
||||||
// We can't get system entries without keys.
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Return whether we are able to decrypt the RomFS of the Mii model.
|
|
||||||
return mii_nca->GetRomFS().get() != nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if the keys required for decrypting firmware and games are available
|
* Checks if the keys required for decrypting firmware and games are available
|
||||||
*/
|
*/
|
||||||
|
@ -4558,16 +4558,6 @@ void GMainWindow::OnCheckFirmwareDecryption() {
|
|||||||
"quickstart guide</a> to get all your keys, firmware and "
|
"quickstart guide</a> to get all your keys, firmware and "
|
||||||
"games."));
|
"games."));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ContentManager::CanDecryptSystemArchive(*system)) {
|
|
||||||
LOG_WARNING(Frontend, "Mii model decryption failed");
|
|
||||||
QMessageBox::warning(
|
|
||||||
this, tr("System Archive Decryption Failed"),
|
|
||||||
tr("Encryption keys failed to decrypt firmware. "
|
|
||||||
"<br>Please follow <a href='https://yuzu-emu.org/help/quickstart/'>the yuzu "
|
|
||||||
"quickstart guide</a> to get all your keys, firmware and "
|
|
||||||
"games."));
|
|
||||||
}
|
|
||||||
SetFirmwareVersion();
|
SetFirmwareVersion();
|
||||||
UpdateMenuState();
|
UpdateMenuState();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user