1

我正在尝试从沙盒 macOS 应用程序包中获取磁盘信息。system_profiler SPSerialATADataType SPNVMeDataType将在沙盒和非沙盒中运行。但是它们的输出略有不同。我想知道如何从沙箱中获得类似于非沙箱输出的信息。具体来说,我正在查看 SMART 状态和大小。我可以添加指定存储设备的权利吗?在更改此命令输出的沙箱中具体更改了什么?

非沙盒

APPLE SSD SM256C:

          Capacity: 251 GB (251,000,193,024 bytes)
          Model: APPLE SSD SM256C                        
          Revision: [REVISON NUM]
          Serial Number: [SERIAL NUMBER]      
          Native Command Queuing: Yes
          Queue Depth: 32
          Removable Media: No
          Detachable Drive: No
          BSD Name: disk0
          Medium Type: Solid State
          TRIM Support: Yes
          Partition Map Type: GPT (GUID Partition Table)
          S.M.A.R.T. status: Verified
          Volumes:
            EFI:
              Capacity: 209.7 MB (209,715,200 bytes)
              File System: MS-DOS FAT32
              BSD Name: disk0s1
              Content: EFI
              Volume UUID: 0E239BC6-F960-3107-89CF-1C97F78BB46B
            disk0s2:
              Capacity: 250.79 GB (250,790,436,864 bytes)
              BSD Name: disk0s2
              Content: Apple_APFS

沙盒

APPLE SSD SM256C:

          Model: APPLE SSD SM256C                        
          Revision: [REVISON NUM]
          Serial Number: [SERIAL NUMBER]      
          Native Command Queuing: Yes
          Queue Depth: 32
          Detachable Drive: No
          Medium Type: Solid State
          TRIM Support: Yes

4

0 回答 0