28 September 2020

UbuntuよりiPhone SE(第1世代)のバッテリー充電回数やSIMロックの状態などを確認する方法

Ubuntu 18.04より、iPhone SE(第1世代)のシステム情報を読み出し、バッテリーの充電回数やSIMロックの状態などを確認する方法。

バッテリー充電回数の確認

idevicediagnostics コマンドを実行すると、出力結果の赤で示した所にバッテリー充電回数が格納されているようだ。

$ idevicediagnostics diagnostics
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>GasGauge</key>
	<dict>
		<key>CycleCount</key>
		<integer>2</integer>
		<key>DesignCapacity</key>
		<integer>1600</integer>
		<key>FullChargeCapacity</key>
		<integer>100</integer>
		<key>Status</key>
		<string>Success</string>
	</dict>
	<key>HDMI</key>
	<dict>
		<key>Connection</key>
		<string>Unplugged</string>
		<key>Status</key>
		<string>Success</string>
	</dict>
	<key>NAND</key>
	<dict>
		<key>Status</key>
		<string>NANDInfoFailed</string>
	</dict>
	<key>WiFi</key>
	<dict>
		<key>Active</key>
		<string>NO</string>
		<key>Status</key>
		<string>Success</string>
	</dict>
</dict>
</plist>

SIMロックの状態を確認

20200928-simlock.jpg
設定・一般で表示されるSIMロックの状況

別のSIMを入れて認識されているのに、「SIMロックあり」と表示されている。

本当にSIMが認識されて、拒否されていないのかを確認してみるが、拒否されているということではないようだ。

設定の画面は一体何を意味しているのだろう…

まずは、docomoのSIMカードで認識されている状態。 緑色は、別のSIMカードを認識させた場合の違いがある部分赤でマーカーを引いたところ SIMStatus: kCTSIMSupportSIMStatusReady の表示はSIM Lockが掛かっていないことを示していると言われている。Lockされている場合は、 SIMStatus: kCTSIMSupportSIMStatusOperatorLocked となるようである。

docomoのSIMカードが認識されている場合
$ ideviceinfo
ActivationState: Activated
ActivationStateAcknowledged: true
BasebandActivationTicketVersion: V2
BasebandCertId: 3840149528
BasebandChipID: 8343777
BasebandKeyHashInformation: 
 AKeyStatus: 2
 SKeyHash: u+/tcCwvaQ+1Y9t40I4yegCEmB28mAXXXXXXXXXXXXX=
 SKeyStatus: 0
BasebandMasterKeyHash: 8CB15EE4C8002199070D9500BB8FB183B02713A5CA2A6B9000000000000000
BasebandRegionSKU: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==
BasebandSerialNumber: IR2CIw==
BasebandStatus: BBInfoAvailable
BasebandVersion: 10.00.02
BluetoothAddress: c4:61:8b:34:00:00
BoardId: 2
BrickState: false
BuildVersion: 18A393
CPUArchitecture: arm64
CarrierBundleInfoArray[1]: 
 0: 
  CFBundleIdentifier: com.apple.Docomo_jp
  CFBundleVersion: 42.0
  GID1: ffffff
  GID2: ffffff
  IntegratedCircuitCardIdentity: 8981100023553131867
  InternationalMobileSubscriberIdentity: 440103100636677
  MCC: 440
  MNC: 10
  MobileEquipmentIdentifier: 35660508757747
  SIMGID1: ////
  SIMGID2: ////
  Slot: kOne
  kCTPostponementInfoAvailable: SIMCarrierInfo
CertID: 3840149528
ChipID: 32771
ChipSerialNo: IR2CIw==
DeviceClass: iPhone
DeviceColor: #c8caca
DeviceName: ○○○○のiPhone
DieID: 8255219204468000
EthernetAddress: c4:61:8b:34:00:00
FirmwareVersion: iBoot-6723.0.48
FusingStatus: 3
HardwareModel: N69AP
HardwarePlatform: s8003
HasSiDP: true
HostAttached: true
IntegratedCircuitCardIdentity: 8981100023553131867
InternationalMobileEquipmentIdentity: 356605087570000
InternationalMobileSubscriberIdentity: 440103100636677
MLBSerialNumber: FJ6746604CJHPHNA
MobileEquipmentIdentifier: 35660508757747
MobileSubscriberCountryCode: 440
MobileSubscriberNetworkCode: 10
ModelNumber: MP892
NonVolatileRAM: 
 IONVRAM-SYNCNOW-PROPERTY: SU9OVlJBTS1TWU5DTk9XLVBST1AAAAAA
 auto-boot: dHJ1ZQ==
 backlight-level: MTUyNw==
 backlight-nits: MHgwMGFiNWNmZg==
 boot-args: 
 com.apple.System.tz0-size: MHhFMDAwMDA=
 oblit-begins: T2JsaXRUeXBlOiBPYmxpdGVyYXRlRGF0YVBhcnRpdGlvbi4gUmVhc29uOiB1bmxxxxxx
 obliteration: aGFuZGxlX21lc3NhZ2U6IE9ibGl0ZXJhdGlvbiBDb21wbxxxxxx=
 ota-controllerVersion: U1VTLTIuMA==
PRIVersion_Major: 0
PRIVersion_Minor: 1
PRIVersion_ReleaseNo: 178
PartitionType: GUID_partition_scheme
PasswordProtected: false
PhoneNumber: +81 90 1234 5678
PkHash: 5OQIGNymupBn16zMKPujMp3562XDnNFkULy+xxxxxxx=
ProductName: iPhone OS
ProductType: iPhone8,4
ProductVersion: 14.0.1
ProductionSOC: true
ProtocolVersion: 2
ProximitySensorCalibration: T00DAA0JSjcQAwAAAABeAQAAjQEFALXxgwQFAAg89gLuAigAU0EPAvn2xh8AAADGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
RegionInfo: J/A
SIMGID1: /w==
SIMGID2: /w==
SIMStatus: kCTSIMSupportSIMStatusReady
SIMTrayStatus: kCTSIMSupportSIMTrayInsertedWithSIM
SerialNumber: DX3VQ2EXXXXXX
SoftwareBehavior: GQAAAAAAAAAAAAAAAAAAAA==
SoftwareBundleVersion: 
SupportedDeviceFamilies[1]: 
 0: 1
TelephonyCapability: true
TimeIntervalSince1970: 1601211131.563204
TimeZone: Asia/Tokyo
TimeZoneOffsetFromUTC: 32400.000000
TrustedHostAttached: true
UniqueChipID: 8255219204460000
UniqueDeviceID: d1a6370eb3de48d687eaca244846923d88620000
UseRaptorCerts: true
Uses24HourClock: false
WiFiAddress: c4:61:8b:34:3c:c0
WirelessBoardSerialNumber: 7B829F0000
kCTPostponementInfoPRIVersion: 0.1.178
kCTPostponementInfoPRLName: 0
kCTPostponementInfoServiceProvisioningState: true
kCTPostponementStatus: kCTPostponementStatusActivated

中華電信のSIMカードで起動した場合。日本国内なので、接続できないがSIMカード自体は認識されているようだ。

中華電信のSIMカードが認識されている場合
$ ideviceinfo
ActivationState: Activated
ActivationStateAcknowledged: true
BasebandActivationTicketVersion: V2
BasebandCertId: 3840149528
BasebandChipID: 8343777
BasebandKeyHashInformation: 
 AKeyStatus: 2
 SKeyHash: u+/tcCwvaQ+1Y9t40I4yegCEmB28mAXXXXXXXXXXXXX=
 SKeyStatus: 0
BasebandMasterKeyHash: 8CB15EE4C8002199070D9500BB8FB183B02713A5CA2A6B9000000000000000
BasebandRegionSKU: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==
BasebandSerialNumber: IR2CIw==
BasebandStatus: BBInfoAvailable
BasebandVersion: 10.00.02
BluetoothAddress: c4:61:8b:34:00:00
BoardId: 2
BrickState: false
BuildVersion: 18A393
CPUArchitecture: arm64
CarrierBundleInfoArray[1]: 
 0: 
  CFBundleIdentifier: com.apple.Chunghwa_tw
  CFBundleVersion: 42.0
  GID1: ffffffffffffffff
  GID2: ffffffffffffffff
  IntegratedCircuitCardIdentity: 89886920041978879697
  InternationalMobileSubscriberIdentity: 466924197887969
  MCC: 466
  MNC: 92
  MobileEquipmentIdentifier: 35660508757747
  SIMGID1: //////////8=
  SIMGID2: //////////8=
  Slot: kOne
  kCTPostponementInfoAvailable: SIMCarrierInfo
CertID: 3840149528
ChipID: 32771
ChipSerialNo: IR2CIw==
DeviceClass: iPhone
DeviceColor: #c8caca
DeviceName: ○○○○のiPhone
DieID: 8255219204468000
EthernetAddress: c4:61:8b:34:00:00
FirmwareVersion: iBoot-6723.0.48
FusingStatus: 3
HardwareModel: N69AP
HardwarePlatform: s8003
HasSiDP: true
HostAttached: true
IntegratedCircuitCardIdentity: 89886920041978879697
InternationalMobileEquipmentIdentity: 356605087570000
InternationalMobileSubscriberIdentity: 466924197887969
MLBSerialNumber: FJ6746604CJHPHNA
MobileEquipmentIdentifier: 35660508757747
MobileSubscriberCountryCode: 466
MobileSubscriberNetworkCode: 92
ModelNumber: MP892
NonVolatileRAM: 
 IONVRAM-SYNCNOW-PROPERTY: SU9OVlJBTS1TWU5DTk9XLVBST1AAAAAA
 auto-boot: dHJ1ZQ==
 backlight-level: MTUyNw==
 backlight-nits: MHgwMGFiNWNmZg==
 boot-args: 
 com.apple.System.tz0-size: MHhFMDAwMDA=
 oblit-begins: T2JsaXRUeXBlOiBPYmxpdGVyYXRlRGF0YVBhcnRpdGlvbi4gUmVhc29uOiB1bmxxxxxx
 obliteration: aGFuZGxlX21lc3NhZ2U6IE9ibGl0ZXJhdGlvbiBDb21wbxxxxxx=
 ota-controllerVersion: U1VTLTIuMA==
PRIVersion_Major: 0
PRIVersion_Minor: 1
PRIVersion_ReleaseNo: 167
PartitionType: GUID_partition_scheme
PasswordProtected: false
PkHash: 5OQIGNymupBn16zMKPujMp3562XDnNFkULy+xxxxxxx=
ProductName: iPhone OS
ProductType: iPhone8,4
ProductVersion: 14.0.1
ProductionSOC: true
ProtocolVersion: 2
ProximitySensorCalibration: T00DAA0JSjcQAwAAAABeAQAAjQEFALXxgwQFAAg89gLuAigAU0EPAvn2xh8AAADGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
RegionInfo: J/A
SIMGID1: /w==
SIMGID2: /w==
SIMStatus: kCTSIMSupportSIMStatusReady
SIMTrayStatus: kCTSIMSupportSIMTrayInsertedWithSIM
SerialNumber: DX3VQ2EXXXXXX
SoftwareBehavior: GQAAAAAAAAAAAAAAAAAAAA==
SoftwareBundleVersion: 
SupportedDeviceFamilies[1]: 
 0: 1
TelephonyCapability: true
TimeIntervalSince1970: 1601211131.563204
TimeZone: Asia/Tokyo
TimeZoneOffsetFromUTC: 32400.000000
TrustedHostAttached: true
UniqueChipID: 8255219204460000
UniqueDeviceID: d1a6370eb3de48d687eaca244846923d88620000
UseRaptorCerts: true
Uses24HourClock: false
WiFiAddress: c4:61:8b:34:3c:c0
WirelessBoardSerialNumber: 7B829F0000
kCTPostponementInfoPRIVersion: 0.1.167
kCTPostponementInfoPRLName: 0
kCTPostponementInfoServiceProvisioningState: true
kCTPostponementStatus: kCTPostponementStatusActivated