1# DeviceInfo
2
3
4## Overview
5
6Provides APIs for querying device information.
7
8**Since**: 10
9
10
11## Summary
12
13
14### File
15
16| Name| Description|
17| -------- | -------- |
18| [deviceinfo.h](deviceinfo_8h.md) | Declares the APIs for querying device information.|
19
20
21### Functions
22
23| Name| Description|
24| -------- | -------- |
25| const char \* [OH_GetDeviceType](#oh_getdevicetype) (void) | Obtains the device type.|
26| const char \* [OH_GetManufacture](#oh_getmanufacture) (void) | Obtains the device manufacturer.|
27| const char \* [OH_GetBrand](#oh_getbrand) (void) | Obtains the device brand.|
28| const char \* [OH_GetMarketName](#oh_getmarketname) (void) | Obtains the market name.|
29| const char \* [OH_GetProductSeries](#oh_getproductseries) (void) | Obtains the product series.|
30| const char \* [OH_GetProductModel](#oh_getproductmodel) (void) | Obtains the product model.|
31| const char \* [OH_GetSoftwareModel](#oh_getsoftwaremodel) (void) | Obtains the software model.|
32| const char \* [OH_GetHardwareModel](#oh_gethardwaremodel) (void) | Obtains the hardware model.|
33| const char \* [OH_GetBootloaderVersion](#oh_getbootloaderversion) (void) | Obtains the Bootloader version.|
34| const char \* [OH_GetAbiList](#oh_getabilist) (void) | Obtains the application binary interface (ABI) list.|
35| const char \* [OH_GetSecurityPatchTag](#oh_getsecuritypatchtag) (void) | Obtains the security patch tag.|
36| const char \* [OH_GetDisplayVersion](#oh_getdisplayversion) (void) | Obtains the display version.|
37| const char \* [OH_GetIncrementalVersion](#oh_getincrementalversion) (void) | Obtains the incremental version.|
38| const char \* [OH_GetOsReleaseType](#oh_getosreleasetype) (void) | Obtains the OS release type.|
39| const char \* [OH_GetOSFullName](#oh_getosfullname) (void) | Obtains the OS full name.|
40| int [OH_GetSdkApiVersion](#oh_getsdkapiversion) (void) | Obtains the SDK API version.|
41| int [OH_GetFirstApiVersion](#oh_getfirstapiversion) (void) | Obtains the first API version.|
42| const char \* [OH_GetVersionId](#oh_getversionid) (void) | Obtains the version ID.|
43| const char \* [OH_GetBuildType](#oh_getbuildtype) (void) | Obtains the build type.|
44| const char \* [OH_GetBuildUser](#oh_getbuilduser) (void) | Obtains the build user.|
45| const char \* [OH_GetBuildHost](#oh_getbuildhost) (void) | Obtains the build host.|
46| const char \* [OH_GetBuildTime](#oh_getbuildtime) (void) | Obtains the build time.|
47| const char \* [OH_GetBuildRootHash](#oh_getbuildroothash) (void) | Obtains the build root hash.|
48| const char \* [OH_GetDistributionOSName](#oh_getdistributionosname) (void) | Obtains the ISV distribution OS name. Independent software vendors (ISVs) can use their own OS names.|
49| const char \* [OH_GetDistributionOSVersion](#oh_getdistributionosversion) (void) | Obtains the ISV distribution OS version.|
50| int [OH_GetDistributionOSApiVersion](#oh_getdistributionosapiversion) (void) | Obtains the ISV distribution OS API version.|
51| const char \* [OH_GetDistributionOSReleaseType](#oh_getdistributionosreleasetype) (void) | Obtains the ISV distribution OS release type.|
52
53
54## Function Description
55
56
57### OH_GetAbiList()
58
59```
60const char* OH_GetAbiList (void)
61```
62
63**Description**
64
65Obtains the application binary interface (ABI) list.
66
67**Since**: 10
68
69**Returns**
70
71Returns ABIs of the string type.
72
73
74### OH_GetBootloaderVersion()
75
76```
77const char* OH_GetBootloaderVersion (void)
78```
79
80**Description**
81
82Obtains the Bootloader version.
83
84**Since**: 10
85
86**Returns**
87
88Returns a Bootloader version of the string type.
89
90
91### OH_GetBrand()
92
93```
94const char* OH_GetBrand (void)
95```
96
97**Description**
98
99Obtains the device brand.
100
101**Since**: 10
102
103**Returns**
104
105Returns a device brand of the string type.
106
107
108### OH_GetBuildHost()
109
110```
111const char* OH_GetBuildHost (void)
112```
113
114**Description**
115
116Obtains the build host.
117
118**Since**: 10
119
120**Returns**
121
122Returns a build host of the string type.
123
124
125### OH_GetBuildRootHash()
126
127```
128const char* OH_GetBuildRootHash (void)
129```
130
131**Description**
132
133Obtains the build root hash.
134
135**Since**: 10
136
137**Returns**
138
139Returns build root hash of the string type.
140
141
142### OH_GetBuildTime()
143
144```
145const char* OH_GetBuildTime (void)
146```
147
148**Description**
149
150Obtains the build time.
151
152**Since**: 10
153
154**Returns**
155
156Returns the build time of the string type.
157
158
159### OH_GetBuildType()
160
161```
162const char* OH_GetBuildType (void)
163```
164
165**Description**
166
167Obtains the build type.
168
169**Since**: 10
170
171**Returns**
172
173Returns a build type of the string type.
174
175
176### OH_GetBuildUser()
177
178```
179const char* OH_GetBuildUser (void)
180```
181
182**Description**
183
184Obtains the build user.
185
186**Since**: 10
187
188**Returns**
189
190Returns a build user of the string type.
191
192
193### OH_GetDeviceType()
194
195```
196const char* OH_GetDeviceType (void)
197```
198
199**Description**
200
201Obtains the device type.
202
203**Since**: 10
204
205**Returns**
206
207Returns one of the following values:
208
209**phone** (or **default**)
210
211**wearable**
212
213**liteWearable**
214
215**tablet**
216
217**tv**
218
219**car**
220
221**smartVision**
222
223
224### OH_GetDisplayVersion()
225
226```
227const char* OH_GetDisplayVersion (void)
228```
229
230**Description**
231
232Obtains the display version.
233
234**Since**: 10
235
236**Returns**
237
238Returns display version of the string type.
239
240
241### OH_GetDistributionOSApiVersion()
242
243```
244int OH_GetDistributionOSApiVersion (void)
245```
246
247**Description**
248
249Obtains the ISV distribution OS API version.
250
251**Since**: 10
252
253**Returns**
254
255Returns an API version of the ISV distribution OS. If no ISV is specified, the value of **OH_GetSdkApiVersion** is returned.
256
257
258### OH_GetDistributionOSName()
259
260```
261const char* OH_GetDistributionOSName (void)
262```
263
264**Description**
265
266Obtains the ISV distribution OS name. Independent software vendors (ISVs) can use their own OS names.
267
268**Since**: 10
269
270**Returns**
271
272Returns an ISV distribution OS name. If no ISV is specified, an empty string is returned.
273
274
275### OH_GetDistributionOSReleaseType()
276
277```
278const char* OH_GetDistributionOSReleaseType (void)
279```
280
281**Description**
282
283Obtains the ISV distribution OS release type.
284
285**Since**: 10
286
287**Returns**
288
289Returns an ISV distribution OS release type. If no ISV is specified, the value of **OH_GetOsReleaseType** is returned.
290
291
292### OH_GetDistributionOSVersion()
293
294```
295const char* OH_GetDistributionOSVersion (void)
296```
297
298**Description**
299
300Obtains the ISV distribution OS version.
301
302**Since**: 10
303
304**Returns**
305
306Returns an ISV distribution OS version. If no ISV is specified, the value of **OH_GetOSFullName** is returned.
307
308
309### OH_GetFirstApiVersion()
310
311```
312int OH_GetFirstApiVersion (void)
313```
314
315**Description**
316
317Obtains the first API version.
318
319**Since**: 10
320
321**Returns**
322
323Returns the first API version.
324
325
326### OH_GetHardwareModel()
327
328```
329const char* OH_GetHardwareModel (void)
330```
331
332**Description**
333
334Obtains the hardware model.
335
336**Since**: 10
337
338**Returns**
339
340Returns a hardware model of the string type.
341
342
343### OH_GetIncrementalVersion()
344
345```
346const char* OH_GetIncrementalVersion (void)
347```
348
349**Description**
350
351Obtains the incremental version.
352
353**Since**: 10
354
355**Returns**
356
357Returns an incremental version of the string type.
358
359
360### OH_GetManufacture()
361
362```
363const char* OH_GetManufacture (void)
364```
365
366**Description**
367
368Obtains the device manufacturer.
369
370**Since**: 10
371
372**Returns**
373
374Returns a device manufacturer of the string type.
375
376
377### OH_GetMarketName()
378
379```
380const char* OH_GetMarketName (void)
381```
382
383**Description**
384
385Obtains the market name.
386
387**Since**: 10
388
389**Returns**
390
391Returns a market name of the string type.
392
393
394### OH_GetOSFullName()
395
396```
397const char* OH_GetOSFullName (void)
398```
399
400**Description**
401
402Obtains the OS full name.
403
404**Since**: 10
405
406**Returns**
407
408Returns an OS full name of the string type.
409
410
411### OH_GetOsReleaseType()
412
413```
414const char* OH_GetOsReleaseType (void)
415```
416
417**Description**
418
419Obtains the OS release type.
420
421**Since**: 10
422
423**Returns**
424
425The OS release types include **release**, **Beta**, and **Canary**. A specific release type may be **release**, **Beta1**, or another similar type.
426
427
428### OH_GetProductModel()
429
430```
431const char* OH_GetProductModel (void)
432```
433
434**Description**
435
436Obtains the product model.
437
438**Since**: 10
439
440**Returns**
441
442Returns a product mode of the string type.
443
444
445### OH_GetProductSeries()
446
447```
448const char* OH_GetProductSeries (void)
449```
450
451**Description**
452
453Obtains the product series.
454
455**Since**: 10
456
457**Returns**
458
459Returns the product series of the string type.
460
461
462### OH_GetSdkApiVersion()
463
464```
465int OH_GetSdkApiVersion (void)
466```
467
468**Description**
469
470Obtains the SDK API version.
471
472**Since**: 10
473
474**Returns**
475
476Returns a SDK API version.
477
478
479### OH_GetSecurityPatchTag()
480
481```
482const char* OH_GetSecurityPatchTag (void)
483```
484
485**Description**
486
487Obtains the security patch tag.
488
489**Since**: 10
490
491**Returns**
492
493Returns a security patch tag of the string type.
494
495
496### OH_GetSoftwareModel()
497
498```
499const char* OH_GetSoftwareModel (void)
500```
501
502**Description**
503
504Obtains the software model.
505
506**Since**: 10
507
508**Returns**
509
510Returns a software model of the string type.
511
512
513### OH_GetVersionId()
514
515```
516const char* OH_GetVersionId (void)
517```
518
519**Description**
520
521Obtains the version ID.
522
523**Since**: 10
524
525**Returns**
526
527Returns a version ID of the string type.
528