解决方法:前往 ${SDK目录}/ets/api/device-define目录,修改对应设备类型的json文件。删除对应的能力属性。
结果:

{
  "SysCaps": [
    "SystemCapability.ArkUI.ArkUI.Full",
    "SystemCapability.ArkUI.ArkUI.Napi",
    "SystemCapability.ArkUI.ArkUI.Libuv",
    "SystemCapability.ArkUI.UiAppearance",
    "SystemCapability.BundleManager.BundleFramework",
    "SystemCapability.BundleManager.BundleFramework.Overlay",
    "SystemCapability.BundleManager.DistributedBundleFramework",
    "SystemCapability.BundleManager.Zlib",
    "SystemCapability.Graphic.Graphic2D.WebGL",
    "SystemCapability.Graphic.Graphic2D.WebGL2",
    "SystemCapability.WindowManager.WindowManager.Core",
    "SystemCapability.Notification.CommonEvent",
    "SystemCapability.Notification.Notification",
    "SystemCapability.Notification.ReminderAgent",
    "SystemCapability.Notification.Emitter",
    "SystemCapability.Communication.IPC.Core",
    "SystemCapability.Communication.SoftBus.Core",
    "SystemCapability.Communication.NetManager.Core",
    "SystemCapability.Communication.NetManager.Ethernet",
    "SystemCapability.Communication.NetManager.NetSharing",
    "SystemCapability.Communication.NetManager.MDNS",
    "SystemCapability.Communication.NetManager.Vpn",
    "SystemCapability.Communication.NetStack",
    "SystemCapability.Communication.WiFi.Core",
    "SystemCapability.Communication.WiFi.STA",
    "SystemCapability.Communication.WiFi.AP.Core",
    "SystemCapability.Communication.WiFi.P2P",
    "SystemCapability.Communication.Bluetooth.Core",
    "SystemCapability.Communication.Bluetooth.Lite",
    "SystemCapability.Location.Location.Core",
    "SystemCapability.Location.Location.Geocoder",
    "SystemCapability.Location.Location.Geofence",
    "SystemCapability.Location.Location.Gnss",
    "SystemCapability.Location.Location.Lite",
    "SystemCapability.MultimodalInput.Input.Core",
    "SystemCapability.MultimodalInput.Input.InputDevice",
    "SystemCapability.MultimodalInput.Input.InputMonitor",
    "SystemCapability.MultimodalInput.Input.InputConsumer",
    "SystemCapability.MultimodalInput.Input.InputSimulator",
    "SystemCapability.MultimodalInput.Input.Pointer",
    "SystemCapability.MultimodalInput.Input.ShortKey",
    "SystemCapability.PowerManager.BatteryManager.Extension",
    "SystemCapability.PowerManager.BatteryManager.Lite",
    "SystemCapability.PowerManager.BatteryStatistics",
    "SystemCapability.PowerManager.DisplayPowerManager",
    "SystemCapability.PowerManager.DisplayPowerManager.Lite",
    "SystemCapability.PowerManager.ThermalManager",
    "SystemCapability.PowerManager.PowerManager.Core",
    "SystemCapability.PowerManager.BatteryManager.Core",
    "SystemCapability.PowerManager.PowerManager.Extension",
    "SystemCapability.Multimedia.Media.Core",
    "SystemCapability.Multimedia.Media.AudioPlayer",
    "SystemCapability.Multimedia.Media.AudioRecorder",
    "SystemCapability.Multimedia.Media.VideoPlayer",
    "SystemCapability.Multimedia.Media.VideoRecorder",
    "SystemCapability.Multimedia.Media.CodecBase",
    "SystemCapability.Multimedia.Media.AudioDecoder",
    "SystemCapability.Multimedia.Media.AudioEncoder",
    "SystemCapability.Multimedia.Media.VideoDecoder",
    "SystemCapability.Multimedia.Media.VideoEncoder",
    "SystemCapability.Multimedia.Media.Spliter",
    "SystemCapability.Multimedia.Media.Muxer",
    "SystemCapability.Multimedia.Media.AVPlayer",
    "SystemCapability.Multimedia.Media.AVRecorder",
    "SystemCapability.Multimedia.AVSession.Core",
    "SystemCapability.Multimedia.AVSession.Manager",
    "SystemCapability.Multimedia.AVSession.AVCast",
    "SystemCapability.Multimedia.Audio.Core",
    "SystemCapability.Multimedia.Audio.Renderer",
    "SystemCapability.Multimedia.Audio.Capturer",
    "SystemCapability.Multimedia.Audio.Device",
    "SystemCapability.Multimedia.Audio.Volume",
    "SystemCapability.Multimedia.Audio.Communication",
    "SystemCapability.Multimedia.Audio.Interrupt",
    "SystemCapability.Multimedia.Audio.Tone",
    "SystemCapability.Multimedia.Audio.PlaybackCapture",
    "SystemCapability.Multimedia.Camera.Core",
    "SystemCapability.Multimedia.Image.Core",
    "SystemCapability.Multimedia.Image.ImageSource",
    "SystemCapability.Multimedia.Image.ImagePacker",
    "SystemCapability.Multimedia.Image.ImageReceiver",
    "SystemCapability.Multimedia.MediaLibrary.Core",
    "SystemCapability.Multimedia.MediaLibrary.DistributedCore",
    "SystemCapability.Multimedia.SystemSound.Core",
    "SystemCapability.Telephony.CoreService",
    "SystemCapability.Telephony.CallManager",
    "SystemCapability.Telephony.CellularCall",
    "SystemCapability.Telephony.CellularData",
    "SystemCapability.Telephony.SmsMms",
    "SystemCapability.Telephony.StateRegistry",
    "SystemCapability.Global.I18n",
    "SystemCapability.Global.ResourceManager",
    "SystemCapability.Customization.ConfigPolicy",
    "SystemCapability.Customization.EnterpriseDeviceManager",
    "SystemCapability.BarrierFree.Accessibility.Core",
    "SystemCapability.BarrierFree.Accessibility.Vision",
    "SystemCapability.BarrierFree.Accessibility.Hearing",
    "SystemCapability.ResourceSchedule.WorkScheduler",
    "SystemCapability.ResourceSchedule.BackgroundTaskManager.ContinuousTask",
    "SystemCapability.ResourceSchedule.BackgroundTaskManager.TransientTask",
    "SystemCapability.ResourceSchedule.UsageStatistics.App",
    "SystemCapability.ResourceSchedule.UsageStatistics.AppGroup",
    "SystemCapability.Utils.Lang",
    "SystemCapability.HiviewDFX.HiLog",
    "SystemCapability.HiviewDFX.HiTrace",
    "SystemCapability.HiviewDFX.Hiview.FaultLogger",
    "SystemCapability.HiviewDFX.Hiview.LogLibrary",
    "SystemCapability.HiviewDFX.HiChecker",
    "SystemCapability.HiviewDFX.HiDumper",
    "SystemCapability.HiviewDFX.HiAppEvent",
    "SystemCapability.HiviewDFX.HiSysEvent",
    "SystemCapability.HiviewDFX.HiProfiler.HiDebug",
    "SystemCapability.Update.UpdateService",
    "SystemCapability.DistributedHardware.DeviceManager",
    "SystemCapability.Security.DeviceAuth",
    "SystemCapability.Security.DataTransitManager",
    "SystemCapability.Security.DeviceSecurityLevel",
    "SystemCapability.Security.AccessToken",
    "SystemCapability.Account.OsAccount",
    "SystemCapability.Account.AppAccount",
    "SystemCapability.UserIAM.UserAuth.Core",
    "SystemCapability.UserIAM.UserAuth.PinAuth",
    "SystemCapability.UserIAM.UserAuth.FaceAuth",
    "SystemCapability.MiscServices.InputMethodFramework",
    "SystemCapability.MiscServices.Time",
    "SystemCapability.MiscServices.Wallpaper",
    "SystemCapability.MiscServices.ScreenLock",
    "SystemCapability.MiscServices.Upload",
    "SystemCapability.MiscServices.Download",
    "SystemCapability.FileManagement.StorageService.Backup",
    "SystemCapability.FileManagement.StorageService.SpatialStatistics",
    "SystemCapability.FileManagement.StorageService.Volume",
    "SystemCapability.FileManagement.StorageService.Encryption",
    "SystemCapability.FileManagement.File.FileIO",
    "SystemCapability.FileManagement.File.FileIO.Lite",
    "SystemCapability.FileManagement.File.Environment",
    "SystemCapability.FileManagement.File.DistributedFile",
    "SystemCapability.FileManagement.AppFileService",
    "SystemCapability.FileManagement.UserFileService",
    "SystemCapability.FileManagement.UserFileManager.Core",
    "SystemCapability.FileManagement.PhotoAccessHelper.Core",
    "SystemCapability.FileManagement.DistributedFileService.CloudSyncManager",
    "SystemCapability.FileManagement.DistributedFileService.CloudSync.Core",
    "SystemCapability.USB.USBManager",
    "SystemCapability.Sensors.Sensor",
    "SystemCapability.Sensors.MiscDevice",
    "SystemCapability.Sensors.Sensor.Lite",
    "SystemCapability.Sensors.MiscDevice.Lite",
    "SystemCapability.Startup.SystemInfo",
    "SystemCapability.Startup.SystemInfo.Lite",
    "SystemCapability.DistributedDataManager.RelationalStore.Core",
    "SystemCapability.DistributedDataManager.KVStore.Core",
    "SystemCapability.DistributedDataManager.KVStore.DistributedKVStore",
    "SystemCapability.DistributedDataManager.DataObject.DistributedObject",
    "SystemCapability.DistributedDataManager.Preferences.Core",
    "SystemCapability.DistributedDataManager.Preferences.Core.Lite",
    "SystemCapability.DistributedDataManager.DataShare.Core",
    "SystemCapability.DistributedDataManager.DataShare.Consumer",
    "SystemCapability.DistributedDataManager.DataShare.Provider",
    "SystemCapability.Ability.AbilityBase",
    "SystemCapability.Ability.AbilityRuntime.Core",
    "SystemCapability.Ability.AbilityRuntime.FAModel",
    "SystemCapability.Ability.AbilityRuntime.AbilityCore",
    "SystemCapability.Ability.AbilityRuntime.Mission",
    "SystemCapability.Ability.AbilityTools.AbilityAssistant",
    "SystemCapability.Ability.Form",
    "SystemCapability.Ability.DistributedAbilityManager",
    "SystemCapability.Applications.ContactsData",
    "SystemCapability.Applications.settings.Core",
    "SystemCapability.Test.UiTest",
    "SystemCapability.Web.Webview.Core",
    "SystemCapability.Advertising.OAID",
    "SystemCapability.Security.CertificateManager",
    "SystemCapability.Security.CryptoFramework",
    "SystemCapability.Security.Cert",
    "SystemCapability.BundleManager.BundleFramework.Core",
    "SystemCapability.BundleManager.BundleFramework.FreeInstall",
    "SystemCapability.BundleManager.BundleFramework.Resource",
    "SystemCapability.BundleManager.BundleFramework.DefaultApp",
    "SystemCapability.BundleManager.BundleFramework.Launcher",
    "SystemCapability.BundleManager.BundleFramework.AppControl",
    "SystemCapability.Ability.AbilityRuntime.QuickFix",
    "SystemCapability.Graphic.Graphic2D.ColorManager.Core",
    "SystemCapability.ResourceSchedule.BackgroundTaskManager.EfficiencyResourcesApply",
    "SystemCapability.Msdp.DeviceStatus.Stationary",
    "SystemCapability.XTS.DeviceAttest",
    "SystemCapability.Request.FileTransferAgent",
    "SystemCapability.DistributedDataManager.UDMF.Core",
    "SystemCapability.Print.PrintFramework",
    "SystemCapability.Multimedia.Media.AVScreenCapture",
    "SystemCapability.AI.IntelligentVoice.Core",
    "SystemCapability.Multimedia.Media.SoundPool"
  ]
}
最后修改:2024 年 12 月 13 日
如果觉得我的文章对你有用,请随意赞赏