1/* 2 * Copyright (c) 2025 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"), 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16/** 17 * @file 18 * @kit BasicServicesKit 19 */ 20 21/** 22 * A static class pertaining to the product information. 23 * 24 * @class deviceInfo 25 * @syscap SystemCapability.Startup.SystemInfo 26 * @crossplatform 27 * @since 20 28 * @arkts 1.2 29 */ 30declare class deviceInfo { 31 32 /** 33 * Obtains the device type represented by a string, 34 * which can be {@code phone} (or {@code default} for phones), {@code wearable}, {@code liteWearable}, 35 * {@code tablet}, {@code tv}, {@code car}, or {@code smartVision}. 36 * 37 * 38 * @syscap SystemCapability.Startup.SystemInfo 39 * @crossplatform 40 * @since 20 41 * @arkts 1.2 42 */ 43 static get deviceType(): string; 44 45 /** 46 * Obtains the device manufacturer represented by a string. 47 * 48 * 49 * @syscap SystemCapability.Startup.SystemInfo 50 * @crossplatform 51 * @since 20 52 * @arkts 1.2 53 */ 54 static get manufacture(): string; 55 56 /** 57 * Obtains the external product series represented by a string. 58 * 59 * 60 * @syscap SystemCapability.Startup.SystemInfo 61 * @crossplatform 62 * @since 20 63 * @arkts 1.2 64 */ 65 static get brand(): string; 66 67 /** 68 * Obtains the external product series represented by a string. 69 * 70 * 71 * @syscap SystemCapability.Startup.SystemInfo 72 * @crossplatform 73 * @since 20 74 * @arkts 1.2 75 */ 76 static get marketName(): string; 77 78 /** 79 * Obtains the product series represented by a string. 80 * 81 * 82 * @syscap SystemCapability.Startup.SystemInfo 83 * @crossplatform 84 * @since 20 85 * @arkts 1.2 86 */ 87 static get productSeries(): string; 88 89 90 /** 91 * Obtains the product model represented by a string. 92 * 93 * 94 * @syscap SystemCapability.Startup.SystemInfo 95 * @crossplatform 96 * @since 20 97 * @arkts 1.2 98 */ 99 static get productModel(): string; 100 101 /** 102 * Obtains the product model alias represented by a string. 103 * 104 * @syscap SystemCapability.Startup.SystemInfo 105 * @crossplatform 106 * @since 20 107 * @arkts 1.2 108 */ 109 static get productModelAlias(): string; 110 111 /** 112 * Obtains the software model represented by a string. 113 * 114 * 115 * @syscap SystemCapability.Startup.SystemInfo 116 * @crossplatform 117 * @since 20 118 * @arkts 1.2 119 */ 120 static get softwareModel(): string; 121 122 /** 123 * Obtains the hardware model represented by a string. 124 * 125 * 126 * @syscap SystemCapability.Startup.SystemInfo 127 * @crossplatform 128 * @since 20 129 * @arkts 1.2 130 */ 131 static get hardwareModel(): string; 132 133 /** 134 * Obtains the hardware model represented by a string. 135 * 136 * 137 * @syscap SystemCapability.Startup.SystemInfo 138 * @crossplatform 139 * @since 20 140 * @arkts 1.2 141 */ 142 static get hardwareProfile(): string; 143 144 /** 145 * Obtains the device serial number represented by a string. 146 * 147 * @permission ohos.permission.sec.ACCESS_UDID 148 * 149 * @syscap SystemCapability.Startup.SystemInfo 150 * @since 20 151 * @arkts 1.2 152 */ 153 static get serial(): string; 154 155 /** 156 * Obtains the bootloader version number represented by a string. 157 * 158 * 159 * @syscap SystemCapability.Startup.SystemInfo 160 * @crossplatform 161 * @since 20 162 * @arkts 1.2 163 */ 164 static get bootloaderVersion(): string; 165 166 /** 167 * Obtains the application binary interface (Abi) list represented by a string. 168 * 169 * 170 * @syscap SystemCapability.Startup.SystemInfo 171 * @crossplatform 172 * @since 20 173 * @arkts 1.2 174 */ 175 static get abiList(): string; 176 177 /** 178 * Obtains the security patch level represented by a string. 179 * 180 * 181 * @syscap SystemCapability.Startup.SystemInfo 182 * @crossplatform 183 * @since 20 184 * @arkts 1.2 185 */ 186 static get securityPatchTag(): string; 187 188 /** 189 * Obtains the product version represented by a string. 190 * 191 * 192 * @syscap SystemCapability.Startup.SystemInfo 193 * @crossplatform 194 * @since 20 195 * @arkts 1.2 196 */ 197 static get displayVersion(): string; 198 199 /** 200 * Obtains the incremental version represented by a string. 201 * 202 * 203 * @syscap SystemCapability.Startup.SystemInfo 204 * @crossplatform 205 * @since 20 206 * @arkts 1.2 207 */ 208 static get incrementalVersion(): string; 209 210 /** 211 * Obtains the OS release type represented by a string. 212 * <p>The OS release category can be {@code Release}, {@code Beta}, or {@code Canary}. 213 * The specific release type may be {@code Release}, {@code Beta1}, or others alike. 214 * 215 * 216 * @syscap SystemCapability.Startup.SystemInfo 217 * @crossplatform 218 * @since 20 219 * @arkts 1.2 220 */ 221 static get osReleaseType(): string; 222 223 224 /** 225 * Obtains the OS version represented by a string. 226 * 227 * 228 * @syscap SystemCapability.Startup.SystemInfo 229 * @crossplatform 230 * @since 20 231 * @arkts 1.2 232 */ 233 static get osFullName(): string; 234 235 /** 236 * Obtains the major (M) version number, which increases with any updates to the overall architecture. 237 * <p>The M version number monotonically increases from 1 to 99. 238 * 239 * 240 * @syscap SystemCapability.Startup.SystemInfo 241 * @crossplatform 242 * @since 20 243 * @arkts 1.2 244 */ 245 static get majorVersion(): int; 246 247 /** 248 * Obtains the senior (S) version number, which increases with any updates to the partial 249 * architecture or major features. 250 * <p>The S version number monotonically increases from 0 to 99. 251 * 252 * 253 * @syscap SystemCapability.Startup.SystemInfo 254 * @crossplatform 255 * @since 20 256 * @arkts 1.2 257 */ 258 static get seniorVersion(): int; 259 260 /** 261 * Obtains the feature (F) version number, which increases with any planned new features. 262 * <p>The F version number monotonically increases from 0 or 1 to 99. 263 * 264 * 265 * @syscap SystemCapability.Startup.SystemInfo 266 * @crossplatform 267 * @since 20 268 * @arkts 1.2 269 */ 270 static get featureVersion(): int; 271 272 /** 273 * Obtains the build (B) version number, which increases with each new development build. 274 * <p>The B version number monotonically increases from 0 or 1 to 999. 275 * 276 * 277 * @syscap SystemCapability.Startup.SystemInfo 278 * @crossplatform 279 * @since 20 280 * @arkts 1.2 281 */ 282 static get buildVersion(): int; 283 284 285 /** 286 * Obtains the SDK API version number. 287 * 288 * 289 * @syscap SystemCapability.Startup.SystemInfo 290 * @crossplatform 291 * @since 20 292 * @arkts 1.2 293 */ 294 static get sdkApiVersion(): int; 295 296 /** 297 * Obtains the first API version number. 298 * 299 * 300 * @syscap SystemCapability.Startup.SystemInfo 301 * @crossplatform 302 * @since 20 303 * @arkts 1.2 304 */ 305 static get firstApiVersion(): int; 306 307 /** 308 * Obtains the version ID by a string. 309 * 310 * 311 * @syscap SystemCapability.Startup.SystemInfo 312 * @crossplatform 313 * @since 20 314 * @arkts 1.2 315 */ 316 static get versionId(): string; 317 318 /** 319 * Obtains the build types of the same baseline code. 320 * 321 * 322 * @syscap SystemCapability.Startup.SystemInfo 323 * @crossplatform 324 * @since 20 325 * @arkts 1.2 326 */ 327 static get buildType(): string; 328 329 /** 330 * Obtains the different build user of the same baseline code. 331 * 332 * 333 * @syscap SystemCapability.Startup.SystemInfo 334 * @crossplatform 335 * @since 20 336 * @arkts 1.2 337 */ 338 static get buildUser(): string; 339 340 /** 341 * Obtains the different build host of the same baseline code. 342 * 343 * 344 * @syscap SystemCapability.Startup.SystemInfo 345 * @crossplatform 346 * @since 20 347 * @arkts 1.2 348 */ 349 static get buildHost(): string; 350 351 /** 352 * Obtains the build time. 353 * 354 * 355 * @syscap SystemCapability.Startup.SystemInfo 356 * @crossplatform 357 * @since 20 358 * @arkts 1.2 359 */ 360 static get buildTime(): string; 361 362 /** 363 * Obtains the version hash. 364 * 365 * 366 * @syscap SystemCapability.Startup.SystemInfo 367 * @crossplatform 368 * @since 20 369 * @arkts 1.2 370 */ 371 static get buildRootHash(): string; 372 373 /** 374 * Obtains the device udid. 375 * 376 * @permission ohos.permission.sec.ACCESS_UDID 377 * 378 * @syscap SystemCapability.Startup.SystemInfo 379 * @since 20 380 * @arkts 1.2 381 */ 382 static get udid(): string; 383 384 /** 385 * Obtains the Distribution OS name. 386 * <p>Independent Software Vendor (ISV) may distribute OHOS with their own OS name. 387 * distributionOsName will return the ISV OS name 388 * If ISV not specified, it will return an empty string 389 * 390 * 391 * @syscap SystemCapability.Startup.SystemInfo 392 * @since 20 393 * @arkts 1.2 394 */ 395 static get distributionOSName(): string; 396 397 /** 398 * Obtains the Distribution OS version. 399 * <p>Independent Software Vendor (ISV) may distribute OHOS with their own OS version. 400 * distributionOSVersion will return the ISV OS version 401 * If ISV not specified, it will return the same value as osFullName 402 * 403 * 404 * @syscap SystemCapability.Startup.SystemInfo 405 * @since 20 406 * @arkts 1.2 407 */ 408 static get distributionOSVersion(): string; 409 410 /** 411 * Obtains the Distribution OS version. 412 * <p>Independent Software Vendor (ISV) may distribute OHOS with their own OS api version. 413 * distributionOSVersion will return the ISV OS api version 414 * If ISV not specified, it will return the same value as sdkApiVersion 415 * 416 * 417 * @syscap SystemCapability.Startup.SystemInfo 418 * @since 20 419 * @arkts 1.2 420 */ 421 static get distributionOSApiVersion(): int; 422 423 /** 424 * Obtains the Distribution OS api name. 425 * <p>Independent Software Vendor (ISV) may distribute OHOS with their own OS api name. 426 * distributionOSApiName will return the ISV OS api name 427 * 428 * @syscap SystemCapability.Startup.SystemInfo 429 * @since 20 430 * @arkts 1.2 431 */ 432 static get distributionOSApiName(): string; 433 434 /** 435 * Obtains the Distribution OS release type. 436 * <p>Independent Software Vendor (ISV) may distribute OHOS with their own OS release type. 437 * distributionOSVersion will return the ISV OS release type 438 * If ISV not specified, it will return the same value as osReleaseType 439 * 440 * 441 * @syscap SystemCapability.Startup.SystemInfo 442 * @since 20 443 * @arkts 1.2 444 */ 445 static get distributionOSReleaseType(): string; 446 447 /** 448 * Open Device Identifier (ODID): a developer-level non-permanent device identifier. 449 * A developer can be an enterprise or individual developer. 450 * Example: dff3cdfd-7beb-1e7d-fdf7-1dbfddd7d30c 451 * 452 * An ODID will be regenerate in the following scenarios: 453 * Restore a phone to its factory settings. 454 * Uninstall and reinstall all apps of one developer on one device. 455 * 456 * An ODID is generated based on the following rules: 457 * For apps from the same developer, which are running on the same device, they have the same ODID. 458 * For apps from different developers, which are running on the same device, each of them has its own ODID. 459 * For apps from the same developer, which are running on different devices, each of them has its own ODID. 460 * For apps from different developers, which are running on different devices, each of them has its own ODID. 461 * 462 * 463 * @syscap SystemCapability.Startup.SystemInfo 464 * @since 20 465 * @arkts 1.2 466 */ 467 static get ODID(): string; 468 469 /** 470 * Obtaining the hard drive serial number. 471 * 472 * @permission ohos.permission.ACCESS_DISK_PHY_INFO 473 * @syscap SystemCapability.Startup.SystemInfo 474 * @since 20 475 * @arkts 1.2 476 */ 477 static get diskSN(): string; 478} 479export default deviceInfo; 480