Android: Numerous fixes

* GetSerialNumber in ISystemSettingsServer

* Bionic qualifiers

* Revert application pool size to 3285 MB for 4 GB DRAM

* Fix PPTC recompilation if mod or patch is applied
This commit is contained in:
KeatonTheBot
2025-05-26 16:01:23 -05:00
parent 20f1cef9b2
commit 19dd23c288
19 changed files with 341 additions and 57 deletions
@@ -24,7 +24,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Common
{
return arrange switch
{
MemoryArrange.MemoryArrange4GiB => 3455 * MiB,
MemoryArrange.MemoryArrange4GiB or
MemoryArrange.MemoryArrange4GiBSystemDev or
MemoryArrange.MemoryArrange6GiBAppletDev => 3285 * MiB,
MemoryArrange.MemoryArrange4GiBAppletDev => 2048 * MiB,
@@ -25,7 +25,10 @@ namespace Ryujinx.HLE.HOS.Services.Nifm.StaticService
IsAnyInternetRequestAccepted = true, // NOTE: Why not accept any internet request?
};
NetworkChange.NetworkAddressChanged += LocalInterfaceCacheHandler;
if (!PlatformInfo.IsBionic)
{
NetworkChange.NetworkAddressChanged += LocalInterfaceCacheHandler;
}
GeneralServiceManager.Add(_generalServiceDetail);
}
@@ -84,7 +87,7 @@ namespace Ryujinx.HLE.HOS.Services.Nifm.StaticService
networkProfile.IpSettingData.IpAddressSetting = new IpAddressSetting(interfaceProperties, unicastAddress);
networkProfile.IpSettingData.DnsSetting = new DnsSetting(interfaceProperties);
"RyujinxNetwork"u8.CopyTo(networkProfile.Name.AsSpan());
"KenjinxNetwork"u8.CopyTo(networkProfile.Name.AsSpan());
context.Memory.Write(networkProfileDataPosition, networkProfile);
@@ -196,7 +199,10 @@ namespace Ryujinx.HLE.HOS.Services.Nifm.StaticService
{
if (isDisposing)
{
NetworkChange.NetworkAddressChanged -= LocalInterfaceCacheHandler;
if (!PlatformInfo.IsBionic)
{
NetworkChange.NetworkAddressChanged -= LocalInterfaceCacheHandler;
}
GeneralServiceManager.Remove(_generalServiceDetail.ClientId);
}
@@ -1,8 +1,19 @@
using Ryujinx.Common.Logging;
using Ryujinx.HLE.HOS.Services.Pm.Types;
namespace Ryujinx.HLE.HOS.Services.Pm
{
[Service("pm:bm")]
class IBootModeInterface : IpcService
{
public IBootModeInterface(ServiceCtx context) { }
[CommandCmif(0)]
// GetBootMode() -> u32
public ResultCode GetBootMode(ServiceCtx context)
{
context.ResponseData.Write((uint)BootMode.Normal);
return ResultCode.Success;
}
}
}
@@ -0,0 +1,9 @@
namespace Ryujinx.HLE.HOS.Services.Pm.Types
{
enum BootMode : uint
{
Normal = 0,
Maintenance = 1,
SafeMode = 2,
}
}
@@ -244,6 +244,15 @@ namespace Ryujinx.HLE.HOS.Services.Settings
return ResultCode.Success;
}
[CommandCmif(68)]
// GetSerialNumber() -> buffer<nn::settings::system::SerialNumber, 0x16>
public ResultCode GetSerialNumber(ServiceCtx context)
{
context.ResponseData.Write(Encoding.ASCII.GetBytes("RYU00000000000"));
return ResultCode.Success;
}
[CommandCmif(77)]
// GetDeviceNickName() -> buffer<nn::settings::system::DeviceNickName, 0x16>
public ResultCode GetDeviceNickName(ServiceCtx context)
@@ -1,3 +1,4 @@
using Ryujinx.Common;
using Ryujinx.HLE.FileSystem;
using Ryujinx.HLE.HOS.Kernel.Common;
using Ryujinx.HLE.HOS.Services.Spl.Types;
@@ -51,6 +52,14 @@ namespace Ryujinx.HLE.HOS.Services.Spl
context.ResponseData.Write(configValue);
if(PlatformInfo.IsBionic)
{
if (result == SmcResult.Success)
{
return ResultCode.Success;
}
}
return (ResultCode)((int)result << 9) | ResultCode.ModuleId;
}