[英]How to get device memory via Android Management API
I want to get memory from my device, I use golang lib for it.我想从我的设备中获取内存,为此我使用 了 golang lib 。 My device has 16gb memory, now free 5.3gb and filled 10.7gb.我的设备有 16gb 内存,现在可用 5.3gb,填充 10.7gb。
After device enrolling, I see that device has 2762690560 bytes for total internal storage .设备注册后,我看到该设备有 2762690560 字节的总内部存储空间。
I send get command to get memory event我发送get 命令来获取内存事件
And I have:我有:
EXTERNAL_STORAGE_DETECTED - 12061962240 EXTERNAL_STORAGE_DETECTED - 12061962240
INTERNAL_STORAGE_MEASURED - 43319296 INTERNAL_STORAGE_MEASURED - 43319296
EXTERNAL_STORAGE_MEASURED - 5709090816 EXTERNAL_STORAGE_MEASURED - 5709090816
total internal storage - 2762690560 info about total internal storage from google doc. total internal storage - 2762690560 来自 google doc 的关于 total internal storage 的信息。
So my problem is that I can't understand how to calculate these event Types to get correct memory data for device, and is it possible to do in this way?所以我的问题是我无法理解如何计算这些事件类型以获得设备的正确内存数据,是否可以通过这种方式进行? Maybe I can send some ADB command to device via Android Management API?也许我可以通过 Android Management API 向设备发送一些 ADB 命令?
MemoryEvent returns 3 values per event, eventType
, createTime
, and byteCount
. MemoryEvent为每个事件返回 3 个值,即eventType
、 createTime
和byteCount
。 To get these values, you first need to include the statusReportingSettings on your policy and set memoryInfoEnabled: true
.要获取这些值,您首先需要在策略中包含statusReportingSettings并设置memoryInfoEnabled: true
。 You can check this link for more information with regards to memoryEvents.您可以查看此链接以获取有关 memoryEvents 的更多信息。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.