├── .gitignore ├── LICENSE ├── README.md ├── pom.xml └── src └── main └── java └── com └── testinium └── deviceinformation ├── DeviceInfo.java ├── DeviceInfoImpl.java ├── device ├── AllDeviceFinder.java ├── AndroidDeviceFinder.java ├── DeviceFinder.java ├── DeviceFinderFactory.java ├── DeviceType.java ├── IosDeviceFinder.java └── IosSimulatorDeviceFinder.java ├── exception └── DeviceNotFoundException.java ├── helper ├── JsonHelper.java └── ProcessHelper.java └── model ├── Android.java ├── Device.java ├── DeviceInfoModel.java ├── Ios.java └── IosSimulator.java /.gitignore: -------------------------------------------------------------------------------- 1 | # Eclipse 2 | .classpath 3 | .project 4 | .settings/ 5 | 6 | # Intellij 7 | .idea/ 8 | *.iml 9 | *.iws 10 | 11 | # Mac 12 | .DS_Store 13 | 14 | # Maven 15 | log/ 16 | target/ -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # MobileDeviceInfo 2 | 3 | MobileDeviceInfo helps you fetch information from your mobile device such as UUID, Device Name, etc. 4 | You can integrate MobileDeviceInfo library into your Appium projects to manage your capabilities dynamically. 5 | 6 | ## Prerequisites: 7 | You need to have **ADB** and **libimobiledevice** installed on your machine 8 | 9 | ADB installation can be done via this [link](https://developer.android.com/studio/index.html ) 10 | 11 | libimobiledevice can be found on this [link](https://github.com/libimobiledevice/libimobiledevice) 12 | 13 | or 14 | 15 | brew cask install android-platform-tools 16 | 17 | brew install --HEAD libimobiledevice 18 | 19 | 20 | ## Basic Usage 21 | ``` 22 | DeviceInfo deviceInfo = new DeviceInfoImpl(DeviceType.ANDROID); 23 | if (deviceInfo.anyDeviceConnected()) { 24 | Device device = deviceInfo.getFirstDevice(); 25 | System.out.println("Device Name - " + device.getDeviceProductName()); 26 | System.out.println("Device id - " + device.getUniqueDeviceID()); 27 | ``` 28 | 29 | or 30 | 31 | ``` 32 | DeviceInfo deviceInfo = new DeviceInfoImpl(DeviceType.IOS); 33 | if (deviceInfo.anyDeviceConnected()) { 34 | Device device = deviceInfo.getFirstDevice(); 35 | System.out.println("Device Name - " + device.getDeviceProductName()); 36 | System.out.println("Device id - " + device.getUniqueDeviceID()); 37 | ``` 38 | 39 | or ( Attention - Data Comes Late ) 40 | 41 | ``` 42 | DeviceInfo deviceInfo = new DeviceInfoImpl(DeviceType.IOSSIMULATOR); 43 | if (deviceInfo.anyDeviceConnected()) { 44 | Device device = deviceInfo.getFirstDevice(); 45 | System.out.println("Device Name - " + device.getDeviceProductName()); 46 | System.out.println("Device id - " + device.getUniqueDeviceID()); 47 | ``` 48 | 49 | or ( Only Android and IOS Devices Except IOS Simulator ) 50 | 51 | ``` 52 | DeviceInfo deviceInfo = new DeviceInfoImpl(DeviceType.ALL); 53 | if (deviceInfo.anyDeviceConnected()) { 54 | Device device = deviceInfo.getFirstDevice(); 55 | System.out.println("Device Name - " + device.getDeviceProductName()); 56 | System.out.println("Device id - " + device.getUniqueDeviceID()); 57 | ``` 58 | 59 | or ( Attention - Data Comes Late Due To IOS Simulator) 60 | 61 | ``` 62 | DeviceInfo deviceInfo = new DeviceInfoImpl(DeviceType.ALLANDIOSSIMULATOR); 63 | if (deviceInfo.anyDeviceConnected()) { 64 | Device device = deviceInfo.getFirstDevice(); 65 | System.out.println("Device Name - " + device.getDeviceProductName()); 66 | System.out.println("Device id - " + device.getUniqueDeviceID()); 67 | ``` 68 | 69 | For **Appium** projects, here's a usage: 70 | ``` 71 | DesiredCapabilities capabilities = new DesiredCapabilities(); 72 | capabilities.setCapability(CapabilityType.PLATFORM, device.getDeviceProductName()); 73 | capabilities.setCapability("platformName", device.getDeviceProductName()); 74 | capabilities.setCapability(CapabilityType.VERSION, device.getProductVersion()); 75 | capabilities.setCapability("deviceName", device.getModelNumber()); 76 | capabilities.setCapability("udid", device.getUniqueDeviceID()); 77 | capabilities.setCapability("app", "#Your App File#"); 78 | 79 | 80 | driver = new RemoteWebDriver(new URL(URL), capabilities); 81 | ``` 82 | 83 | 84 | You can add your project as a maven dependency. 85 | 86 | ``` 87 | 88 | com.testinium.deviceinformation 89 | device-information 90 | 2.0 91 | 92 | ``` 93 | 94 | You have to add our repository to your pom.xml because it hasn't released to Maven Central repositories. 95 | 96 | ``` 97 | 98 | 99 | public 100 | public 101 | http://mvn.testinium.com/repository/public/ 102 | 103 | true 104 | 105 | 106 | true 107 | 108 | 109 | 110 | ``` 111 | -------------------------------------------------------------------------------- /pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | 5 | com.testinium.deviceinformation 6 | device-information 7 | 2.0 8 | jar 9 | 10 | DeviceInformation 11 | http://www.testinium.com 12 | 13 | 14 | UTF-8 15 | github 16 | 17 | 18 | 19 | 20 | org.apache.commons 21 | commons-lang3 22 | 3.7 23 | 24 | 25 | com.google.code.gson 26 | gson 27 | 2.8.2 28 | 29 | 30 | org.apache.commons 31 | commons-exec 32 | 1.3 33 | 34 | 35 | org.json 36 | json 37 | 20090211 38 | 39 | 40 | junit 41 | junit 42 | 4.12 43 | 44 | 45 | 46 | 47 | 48 | 49 | org.apache.maven.plugins 50 | maven-compiler-plugin 51 | 3.0 52 | 53 | 1.8 54 | 1.8 55 | 56 | 57 | 58 | com.github.github 59 | site-maven-plugin 60 | 0.12 61 | 62 | Maven artifacts for ${project.name}-${project.version} 63 | true 64 | ${project.build.directory}/mvn-repo 65 | refs/heads/mvn-repo 66 | **/* 67 | MobileDeviceInfo 68 | Testinium 69 | 70 | 71 | 72 | 73 | site 74 | 75 | deploy 76 | 77 | 78 | 79 | 80 | maven-deploy-plugin 81 | 2.8.1 82 | 83 | internal.repo::default::file://${project.build.directory}/mvn-repo 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | internal.repo 92 | Temporary Staging Repository 93 | file://${project.build.directory}/mvn-repo 94 | 95 | 96 | 97 | 98 | -------------------------------------------------------------------------------- /src/main/java/com/testinium/deviceinformation/DeviceInfo.java: -------------------------------------------------------------------------------- 1 | package com.testinium.deviceinformation; 2 | 3 | import com.testinium.deviceinformation.exception.DeviceNotFoundException; 4 | import com.testinium.deviceinformation.model.Android; 5 | import com.testinium.deviceinformation.model.Device; 6 | import com.testinium.deviceinformation.model.Ios; 7 | import com.testinium.deviceinformation.model.IosSimulator; 8 | 9 | import java.io.IOException; 10 | import java.util.List; 11 | import java.util.stream.Collectors; 12 | 13 | public interface DeviceInfo { 14 | 15 | default boolean anyDeviceConnected() throws IOException, DeviceNotFoundException { 16 | return getDevices().size() > 0; 17 | } 18 | 19 | default Device getFirstDevice() throws IOException, DeviceNotFoundException { 20 | return getDevices().stream().findFirst().orElse(null); 21 | } 22 | 23 | default Android getFirstAndroid() throws IOException, DeviceNotFoundException { 24 | return (Android) getDevices().stream().filter(device -> device.getDeviceProductName().contains("Android")).filter(device -> device.getSerialNumber() != null).filter(device -> !device.getModelNumber().contains("SDK")).findFirst().orElse(null); 25 | } 26 | 27 | default Android getFirstAndroidEmulator() throws IOException, DeviceNotFoundException { 28 | return (Android) getDevices().stream().filter(device -> device.getDeviceProductName().contains("Android")).filter(device -> device.getSerialNumber() == null).filter(device -> device.getModelNumber().contains("SDK")).findFirst().orElse(null); 29 | } 30 | 31 | default Ios getFirstIos() throws IOException, DeviceNotFoundException { 32 | return (Ios) getDevices().stream().filter(device -> device.getDeviceProductName().contains("Ios")).findFirst().orElse(null); 33 | } 34 | 35 | default IosSimulator getFirstIosSimulator() throws IOException, DeviceNotFoundException { 36 | return (IosSimulator) getDevices().stream().filter(device -> device.getDeviceProductName().contains("Ios Simulator")).findFirst().orElse(null); 37 | } 38 | 39 | default Device getFirstAndroidDevice() throws IOException, DeviceNotFoundException { 40 | return getDevices().stream().filter(device -> device.getDeviceProductName().contains("Android")).filter(device -> device.getSerialNumber() != null).filter(device -> !device.getModelNumber().contains("SDK")).findFirst().orElse(null); 41 | } 42 | 43 | default Device getFirstAndroidEmulatorDevice() throws IOException, DeviceNotFoundException { 44 | return getDevices().stream().filter(device -> device.getDeviceProductName().contains("Android")).filter(device -> device.getSerialNumber() == null).filter(device -> device.getModelNumber().contains("SDK")).findFirst().orElse(null); 45 | } 46 | 47 | default Device getFirstIosDevice() throws IOException, DeviceNotFoundException { 48 | return getDevices().stream().filter(device -> device.getDeviceProductName().contains("Ios")).findFirst().orElse(null); 49 | } 50 | 51 | default Device getFirstIosSimulatorDevice() throws IOException, DeviceNotFoundException { 52 | return getDevices().stream().filter(device -> device.getDeviceProductName().contains("Ios Simulator")).findFirst().orElse(null); 53 | } 54 | 55 | default List getAndroidDevices() throws IOException, DeviceNotFoundException { 56 | return getAndroidDevices(); 57 | } 58 | 59 | default List getAndroidEmulatorDevices() throws IOException, DeviceNotFoundException { 60 | return getAndroidDevices().stream().filter(device -> device.getDeviceProductName().contains("Android")).filter(device -> device.getSerialNumber() == null).filter(device -> device.getModelNumber().contains("SDK")).collect(Collectors.toList()); 61 | } 62 | 63 | default List getIosDevices() throws IOException, DeviceNotFoundException { 64 | return getIosDevices(); 65 | } 66 | 67 | default List getIosSimulatorDevices() throws IOException, DeviceNotFoundException { 68 | return getIosSimulatorDevices(); 69 | } 70 | 71 | // default Device searchDeviceByName(String name) throws IOException, DeviceNotFoundException { 72 | // return getDevices().stream().filter(device -> device.getDeviceProductName().equals(name)).findFirst().orElse(null); 73 | // } 74 | 75 | List getDevices() throws IOException, DeviceNotFoundException; 76 | 77 | } 78 | -------------------------------------------------------------------------------- /src/main/java/com/testinium/deviceinformation/DeviceInfoImpl.java: -------------------------------------------------------------------------------- 1 | package com.testinium.deviceinformation; 2 | 3 | import com.testinium.deviceinformation.device.DeviceFinder; 4 | import com.testinium.deviceinformation.device.DeviceFinderFactory; 5 | import com.testinium.deviceinformation.device.DeviceType; 6 | import com.testinium.deviceinformation.exception.DeviceNotFoundException; 7 | import com.testinium.deviceinformation.model.Android; 8 | import com.testinium.deviceinformation.model.Device; 9 | import com.testinium.deviceinformation.model.Ios; 10 | import com.testinium.deviceinformation.model.IosSimulator; 11 | import org.apache.commons.exec.OS; 12 | import org.apache.commons.lang3.StringUtils; 13 | 14 | import java.io.IOException; 15 | import java.util.List; 16 | 17 | public class DeviceInfoImpl implements DeviceInfo { 18 | 19 | private DeviceFinder deviceFinder; 20 | 21 | public DeviceInfoImpl(DeviceType deviceType) throws UnsupportedOperationException { 22 | if (!StringUtils.isEmpty(System.getProperty("key"))) { 23 | throw new IllegalArgumentException(getClass().getSimpleName() + " - " + System.getProperty("key") + " - will not work if you have any key value."); 24 | } 25 | 26 | if (deviceType == DeviceType.IOS && !isOperationSystemMacOs()) { 27 | throw new UnsupportedOperationException("Operation System Is Not Valid! Ios device info only run macos operation system."); 28 | } 29 | 30 | if (deviceType == DeviceType.IOSSIMULATOR && !isOperationSystemMacOs()) { 31 | throw new UnsupportedOperationException("Operation System Is Not Valid! Ios Simulator device info only run macos operation system."); 32 | } 33 | 34 | deviceFinder = DeviceFinderFactory.createDeviceFinder(deviceType); 35 | } 36 | 37 | private boolean isOperationSystemMacOs() { 38 | return OS.isFamilyMac(); 39 | } 40 | 41 | @Override 42 | public List getDevices() throws IOException, DeviceNotFoundException { 43 | return deviceFinder.findDevices().getDevices(); 44 | } 45 | 46 | @Override 47 | public List getAndroidDevices() throws IOException, DeviceNotFoundException { 48 | return deviceFinder.findDevices().getAndroidDevices(); 49 | } 50 | 51 | @Override 52 | public List getIosDevices() throws IOException, DeviceNotFoundException { 53 | return deviceFinder.findDevices().getIosDevices(); 54 | } 55 | 56 | @Override 57 | public List getIosSimulatorDevices() throws IOException, DeviceNotFoundException { 58 | return deviceFinder.findDevices().getIosSimulatorDevices(); 59 | } 60 | 61 | } 62 | -------------------------------------------------------------------------------- /src/main/java/com/testinium/deviceinformation/device/AllDeviceFinder.java: -------------------------------------------------------------------------------- 1 | package com.testinium.deviceinformation.device; 2 | 3 | import com.testinium.deviceinformation.exception.DeviceNotFoundException; 4 | import com.testinium.deviceinformation.model.*; 5 | 6 | import java.io.IOException; 7 | import java.util.ArrayList; 8 | import java.util.List; 9 | import java.util.Map; 10 | 11 | public class AllDeviceFinder implements DeviceFinder { 12 | 13 | private DeviceType deviceType; 14 | 15 | public AllDeviceFinder(DeviceType deviceType) { 16 | this.deviceType = deviceType; 17 | } 18 | 19 | public AllDeviceFinder() { } 20 | 21 | @Override 22 | public DeviceInfoModel findDevices(String localPath) throws IOException { 23 | DeviceInfoModel deviceDeviceInfoModel = new DeviceInfoModel<>(); 24 | List devices = new ArrayList<>(); 25 | 26 | List deviceAndroid = new AndroidDeviceFinder().findDevices(localPath).getDevices(); 27 | List deviceIos = new IosDeviceFinder().findDevices(localPath).getDevices(); 28 | List deviceIosSimulator = null; 29 | 30 | if (deviceType == DeviceType.ALLANDIOSSIMULATOR) 31 | deviceIosSimulator = new IosSimulatorDeviceFinder().findDevices(localPath).getDevices(); 32 | 33 | if (deviceAndroid != null) 34 | devices.addAll(deviceAndroid); 35 | if (deviceIos != null) 36 | devices.addAll(deviceIos); 37 | if (deviceIosSimulator != null) 38 | devices.addAll(deviceIosSimulator); 39 | if(deviceAndroid == null && deviceIos == null && deviceType == null || deviceAndroid == null && deviceIos == null && deviceIosSimulator.size() == 0){ 40 | try { 41 | throw new DeviceNotFoundException("No device is plugged in !!!"); 42 | }catch (DeviceNotFoundException e){ 43 | System.err.println(e.toString()); 44 | } 45 | } 46 | deviceDeviceInfoModel.setDevices(devices); 47 | return deviceDeviceInfoModel; 48 | } 49 | 50 | @Override 51 | public Map readDeviceInfo(String localPath) { 52 | return null; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /src/main/java/com/testinium/deviceinformation/device/AndroidDeviceFinder.java: -------------------------------------------------------------------------------- 1 | package com.testinium.deviceinformation.device; 2 | 3 | import com.google.gson.reflect.TypeToken; 4 | import com.testinium.deviceinformation.exception.DeviceNotFoundException; 5 | import com.testinium.deviceinformation.helper.JsonHelper; 6 | import com.testinium.deviceinformation.helper.ProcessHelper; 7 | import com.testinium.deviceinformation.model.Android; 8 | import com.testinium.deviceinformation.model.DeviceInfoModel; 9 | import org.apache.commons.lang3.StringUtils; 10 | 11 | import java.io.BufferedReader; 12 | import java.io.IOException; 13 | import java.io.InputStreamReader; 14 | import java.util.ArrayList; 15 | import java.util.HashMap; 16 | import java.util.List; 17 | import java.util.Map; 18 | 19 | public class AndroidDeviceFinder implements DeviceFinder { 20 | 21 | private final String ADB_LIST_SHELL_COMMAND = "adb devices"; 22 | private final String ADB_SERIAL_NUMBER_PUT_SHELL_COMMAND = "adb -s serialNumber shell getprop"; 23 | private final String ADB_INTEGRATED_CIRCUIT_CARD_IDENTITY_SHELL_COMMAND = "adb -s serialNumber shell dumpsys CustomFrequencyManagerService | grep 'mIccid sim'"; 24 | 25 | @Override 26 | public DeviceInfoModel findDevices(String localPath) throws IOException { 27 | DeviceInfoModel deviceInfoModel = JsonHelper.convertJsonToDeviceInfo(readDeviceInfo(localPath), new TypeToken>() {}); 28 | if (deviceInfoModel == null || (deviceInfoModel.getDevices() == null || deviceInfoModel.getDevices().size() == 0)) { 29 | try { 30 | throw new DeviceNotFoundException("Android Device Not Found !!!"); 31 | }catch (DeviceNotFoundException e){ 32 | System.err.println(e.toString()); 33 | } 34 | } 35 | return deviceInfoModel; 36 | } 37 | 38 | @Override 39 | public Map readDeviceInfo(String localPath) throws IOException { 40 | Map parentMap; 41 | List> deviceMapList = new ArrayList<>(); 42 | Map device = new HashMap<>(); 43 | 44 | Process deviceListProcess = ProcessHelper.runTimeExec(String.format("%s%s", localPath, ADB_LIST_SHELL_COMMAND)); 45 | BufferedReader reader = new BufferedReader(new InputStreamReader(deviceListProcess.getInputStream())); 46 | String line; 47 | while ((line = reader.readLine()) != null) { 48 | if (StringUtils.isEmpty(line) || line.startsWith("List of devices attached")) { 49 | continue; 50 | } 51 | String[] serialNumberArray = line.replace(" ", "").split("device"); 52 | String serialNumber = serialNumberArray[0].trim(); 53 | Process deviceDetailInfoProcess = ProcessHelper.runTimeExec(String.format("%s%s", localPath, ADB_SERIAL_NUMBER_PUT_SHELL_COMMAND).replace("serialNumber", serialNumber)); 54 | 55 | String infoLine; 56 | BufferedReader infoReader = new BufferedReader(new InputStreamReader(deviceDetailInfoProcess.getInputStream())); 57 | parentMap = new HashMap<>(); 58 | parentMap.put("UniqueDeviceID", serialNumber); 59 | while ((infoLine = infoReader.readLine()) != null) { 60 | try { 61 | infoLine = infoLine.replaceAll("\\[", "").replaceAll("]", ""); 62 | if (infoLine.contains(":")) { 63 | String[] detailInfo = infoLine.split(": ", -1); 64 | parentMap.put(detailInfo[0].replace(".", "").replace("_", "").replace("-", ""), detailInfo[1]); 65 | } 66 | }catch (Exception e){ } 67 | } 68 | Process deviceListProcessOnlyCard = ProcessHelper.runTimeExec( 69 | String.format("%s%s", localPath, ADB_INTEGRATED_CIRCUIT_CARD_IDENTITY_SHELL_COMMAND) 70 | .replace("serialNumber", serialNumber)); 71 | BufferedReader readerOnlyCard = new BufferedReader( 72 | new InputStreamReader(deviceListProcessOnlyCard.getInputStream())); 73 | 74 | try { 75 | String[] mIccidsim = readerOnlyCard.readLine().replaceAll(" ", "").split("="); 76 | parentMap.put(mIccidsim[0], mIccidsim[1]); 77 | } catch (Exception e) { 78 | parentMap.put("mIccidsim", "null"); 79 | } 80 | 81 | readerOnlyCard.close(); 82 | infoReader.close(); 83 | deviceMapList.add(parentMap); 84 | device.put("android", deviceMapList); 85 | } 86 | reader.close(); 87 | return device; 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /src/main/java/com/testinium/deviceinformation/device/DeviceFinder.java: -------------------------------------------------------------------------------- 1 | package com.testinium.deviceinformation.device; 2 | 3 | import com.testinium.deviceinformation.exception.DeviceNotFoundException; 4 | import com.testinium.deviceinformation.model.Device; 5 | import com.testinium.deviceinformation.model.DeviceInfoModel; 6 | 7 | import java.io.IOException; 8 | import java.util.Map; 9 | 10 | public interface DeviceFinder { 11 | 12 | default DeviceInfoModel findDevices() 13 | throws IOException, DeviceNotFoundException { 14 | return findDevices(""); 15 | } 16 | 17 | DeviceInfoModel findDevices(String localPath) throws IOException, DeviceNotFoundException; 18 | 19 | default Map readDeviceInfo() throws IOException { 20 | return readDeviceInfo(""); 21 | } 22 | 23 | Map readDeviceInfo(String localPath) throws IOException; 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/com/testinium/deviceinformation/device/DeviceFinderFactory.java: -------------------------------------------------------------------------------- 1 | package com.testinium.deviceinformation.device; 2 | 3 | public class DeviceFinderFactory { 4 | 5 | private DeviceFinderFactory() { 6 | 7 | } 8 | 9 | public static DeviceFinder createDeviceFinder(DeviceType deviceType) { 10 | DeviceFinder deviceFinder; 11 | if (deviceType == DeviceType.ANDROID) { 12 | deviceFinder = new AndroidDeviceFinder(); 13 | } else if (deviceType == DeviceType.IOS) { 14 | deviceFinder = new IosDeviceFinder(); 15 | } else if (deviceType == DeviceType.IOSSIMULATOR) { 16 | deviceFinder = new IosSimulatorDeviceFinder(); 17 | } else if (deviceType == DeviceType.ALLANDIOSSIMULATOR) { 18 | deviceFinder = new AllDeviceFinder(deviceType); 19 | } else if (deviceType == DeviceType.ALL) { 20 | deviceFinder = new AllDeviceFinder(); 21 | } else { 22 | throw new IllegalArgumentException("Device Type Not Found"); 23 | } 24 | return deviceFinder; 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/com/testinium/deviceinformation/device/DeviceType.java: -------------------------------------------------------------------------------- 1 | package com.testinium.deviceinformation.device; 2 | 3 | public enum DeviceType { 4 | ANDROID, 5 | IOS, 6 | IOSSIMULATOR, 7 | ALLANDIOSSIMULATOR, 8 | ALL 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/com/testinium/deviceinformation/device/IosDeviceFinder.java: -------------------------------------------------------------------------------- 1 | package com.testinium.deviceinformation.device; 2 | 3 | import com.google.gson.reflect.TypeToken; 4 | import com.testinium.deviceinformation.exception.DeviceNotFoundException; 5 | import com.testinium.deviceinformation.helper.JsonHelper; 6 | import com.testinium.deviceinformation.helper.ProcessHelper; 7 | import com.testinium.deviceinformation.model.DeviceInfoModel; 8 | import com.testinium.deviceinformation.model.Ios; 9 | import org.apache.commons.lang3.StringUtils; 10 | 11 | import java.io.BufferedReader; 12 | import java.io.IOException; 13 | import java.io.InputStreamReader; 14 | import java.util.ArrayList; 15 | import java.util.HashMap; 16 | import java.util.List; 17 | import java.util.Map; 18 | 19 | public class IosDeviceFinder implements DeviceFinder { 20 | 21 | private final String LIB_MOBILE_DEVICE_LIST_SHELL_COMMAND = "idevice_id -l"; 22 | private final String LIB_MOBILE_DEVICE_UDID_PUT_SHELL_COMMAND = "ideviceinfo -u UniqueDeviceID"; 23 | 24 | @Override 25 | public DeviceInfoModel findDevices(String localPath) throws IOException { 26 | DeviceInfoModel deviceInfoModel = JsonHelper.convertJsonToDeviceInfo(readDeviceInfo(localPath), new TypeToken>() {}); 27 | if (deviceInfoModel == null || (deviceInfoModel.getDevices() == null || deviceInfoModel.getDevices().size() == 0)) { 28 | try { 29 | throw new DeviceNotFoundException("Ios Device Not Found !!!"); 30 | }catch (DeviceNotFoundException e){ 31 | System.err.println(e.toString()); 32 | } 33 | } 34 | return deviceInfoModel; 35 | } 36 | 37 | @Override 38 | public Map readDeviceInfo(String localPath) throws IOException { 39 | Map parentMap; 40 | List> deviceMapList = new ArrayList<>(); 41 | Map device = new HashMap<>(); 42 | 43 | Process deviceListProcess = ProcessHelper.runTimeExec(String.format("%s%s", localPath, LIB_MOBILE_DEVICE_LIST_SHELL_COMMAND)); 44 | BufferedReader reader = new BufferedReader(new InputStreamReader(deviceListProcess.getInputStream())); 45 | String line; 46 | while ((line = reader.readLine()) != null) { 47 | if (StringUtils.isEmpty(line)) { 48 | continue; 49 | } 50 | String serialNumberArray = line.replace(" ", ""); 51 | Process deviceDetailInfoProcess = ProcessHelper.runTimeExec(String.format("%s%s", localPath, LIB_MOBILE_DEVICE_UDID_PUT_SHELL_COMMAND).replace("UniqueDeviceID", serialNumberArray.trim())); 52 | 53 | String infoLine; 54 | BufferedReader infoReader = new BufferedReader(new InputStreamReader(deviceDetailInfoProcess.getInputStream())); 55 | parentMap = new HashMap<>(); 56 | while ((infoLine = infoReader.readLine()) != null) { 57 | try { 58 | infoLine = infoLine.replaceAll("\\[", "").replaceAll("]", ""); 59 | String[] detailInfo = infoLine.split(": ", -1); 60 | parentMap.put(detailInfo[0].trim(), detailInfo[1].trim()); 61 | }catch (Exception e){ } 62 | } 63 | infoReader.close(); 64 | deviceMapList.add(parentMap); 65 | device.put("ios", deviceMapList); 66 | } 67 | reader.close(); 68 | return device; 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /src/main/java/com/testinium/deviceinformation/device/IosSimulatorDeviceFinder.java: -------------------------------------------------------------------------------- 1 | package com.testinium.deviceinformation.device; 2 | 3 | import com.google.gson.Gson; 4 | import com.google.gson.JsonArray; 5 | import com.google.gson.JsonElement; 6 | import com.google.gson.JsonObject; 7 | import com.google.gson.reflect.TypeToken; 8 | import com.testinium.deviceinformation.exception.DeviceNotFoundException; 9 | import com.testinium.deviceinformation.helper.JsonHelper; 10 | import com.testinium.deviceinformation.helper.ProcessHelper; 11 | import com.testinium.deviceinformation.model.DeviceInfoModel; 12 | import com.testinium.deviceinformation.model.IosSimulator; 13 | 14 | import java.io.BufferedReader; 15 | import java.io.IOException; 16 | import java.io.InputStreamReader; 17 | import java.util.ArrayList; 18 | import java.util.HashMap; 19 | import java.util.List; 20 | import java.util.Map; 21 | 22 | public class IosSimulatorDeviceFinder implements DeviceFinder { 23 | 24 | private final String XCRUN_SIMCTL_SIMULATOR_INFORMATION_DEVICE_LIST_JSON = "xcrun simctl list devices --json devices"; 25 | private final String XCRUN_XCDEVICE_SIMULATOR_INFORMATION_DEVICE_LIST_JSON = "xcrun xcdevice list"; 26 | 27 | @Override 28 | public DeviceInfoModel findDevices(String localPath) throws IOException { 29 | DeviceInfoModel deviceInfoModel = JsonHelper.convertJsonToDeviceInfo(readDeviceInfo(localPath), new TypeToken>() {}); 30 | if (deviceInfoModel == null || (deviceInfoModel.getDevices() == null || deviceInfoModel.getDevices().size() == 0)) { 31 | try { 32 | throw new DeviceNotFoundException("Ios Simulator Device Not Found !!!"); 33 | }catch (DeviceNotFoundException e){ 34 | System.err.println(e.toString()); 35 | } 36 | } 37 | return deviceInfoModel; 38 | } 39 | 40 | @Override 41 | public Map readDeviceInfo(String localPath) throws IOException { 42 | Map parentMap; 43 | List> deviceMapList = new ArrayList<>(); 44 | Map device = new HashMap<>(); 45 | 46 | Process simctlProcess = ProcessHelper.runTimeExec(String.format("%s%s", localPath, XCRUN_SIMCTL_SIMULATOR_INFORMATION_DEVICE_LIST_JSON)); 47 | BufferedReader simctlReader = new BufferedReader(new InputStreamReader(simctlProcess.getInputStream())); 48 | 49 | StringBuilder deviceListStringBuilder = new StringBuilder(); 50 | simctlReader.lines().map(String::trim).forEach(deviceListStringBuilder::append); 51 | 52 | Process xcdeviceProcess = ProcessHelper.runTimeExec(String.format("%s%s", localPath, XCRUN_XCDEVICE_SIMULATOR_INFORMATION_DEVICE_LIST_JSON)); 53 | BufferedReader xcdeviceReader = new BufferedReader(new InputStreamReader(xcdeviceProcess.getInputStream())); 54 | 55 | StringBuilder deviceDetailInfoStringBuilder = new StringBuilder(); 56 | xcdeviceReader.lines().map(String::trim).forEach(deviceDetailInfoStringBuilder::append); 57 | 58 | JsonObject devicesListJson = new Gson().fromJson(String.valueOf(deviceListStringBuilder), JsonObject.class).getAsJsonObject("devices"); 59 | JsonArray devicesDetailInfoJson = new Gson().fromJson(String.valueOf(deviceDetailInfoStringBuilder), JsonArray.class); 60 | 61 | for (String currentDynamicKey : devicesListJson.keySet()) { 62 | JsonElement currentDynamicValue = devicesListJson.get(currentDynamicKey); 63 | for (JsonElement inCurrentValue : ((JsonArray) currentDynamicValue)) { 64 | parentMap = new HashMap<>(); 65 | JsonObject currentKey = (JsonObject) inCurrentValue; 66 | if (currentKey.get("state").toString().contains("Booted")) { 67 | for (String setKey : currentKey.keySet()) { 68 | parentMap.put(setKey,currentKey.get(setKey).toString().replaceAll("\"","")); 69 | } 70 | for (JsonElement currentElement : devicesDetailInfoJson) { 71 | JsonObject currentElementValue = (JsonObject) currentElement; 72 | if (currentElementValue.get("identifier").toString().contains(currentKey.get("udid").toString())) { 73 | Map operatingSystemVersion = new HashMap<>(); 74 | for (String key: currentElementValue.keySet()) { 75 | if (key.contains("operatingSystemVersion")){ 76 | String[] strArray = currentElementValue.get(key).toString() 77 | .replaceAll("\\(","") 78 | .replaceAll("\\)","") 79 | .replaceAll("\"","") 80 | .split(" "); 81 | operatingSystemVersion.put("productVersion",strArray[0]); 82 | operatingSystemVersion.put("buildVersion",strArray[1]); 83 | parentMap.putAll(operatingSystemVersion); 84 | } 85 | parentMap.put(key,currentElementValue.get(key).toString().replaceAll("\"","")); 86 | } 87 | } 88 | } 89 | deviceMapList.add(parentMap); 90 | } 91 | } 92 | } 93 | 94 | device.put("iosSimulator", deviceMapList); 95 | simctlReader.close(); 96 | xcdeviceReader.close(); 97 | return device; 98 | } 99 | } 100 | -------------------------------------------------------------------------------- /src/main/java/com/testinium/deviceinformation/exception/DeviceNotFoundException.java: -------------------------------------------------------------------------------- 1 | package com.testinium.deviceinformation.exception; 2 | 3 | public class DeviceNotFoundException extends Exception { 4 | 5 | public DeviceNotFoundException() { } 6 | 7 | public DeviceNotFoundException(String message) { 8 | super(message); 9 | } 10 | 11 | } 12 | -------------------------------------------------------------------------------- /src/main/java/com/testinium/deviceinformation/helper/JsonHelper.java: -------------------------------------------------------------------------------- 1 | package com.testinium.deviceinformation.helper; 2 | 3 | import com.google.gson.Gson; 4 | import com.google.gson.GsonBuilder; 5 | import com.google.gson.reflect.TypeToken; 6 | import com.testinium.deviceinformation.model.Device; 7 | import com.testinium.deviceinformation.model.DeviceInfoModel; 8 | 9 | import java.util.Map; 10 | 11 | public class JsonHelper { 12 | 13 | private JsonHelper() { 14 | 15 | } 16 | 17 | public static DeviceInfoModel convertJsonToDeviceInfo(Map deviceList, TypeToken typeToken) { 18 | Gson gson = new GsonBuilder().create(); 19 | return gson.fromJson(String.valueOf(gson.toJson(deviceList)), typeToken.getType()); 20 | } 21 | 22 | 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/com/testinium/deviceinformation/helper/ProcessHelper.java: -------------------------------------------------------------------------------- 1 | package com.testinium.deviceinformation.helper; 2 | 3 | import java.io.IOException; 4 | 5 | public class ProcessHelper { 6 | 7 | private ProcessHelper() { 8 | } 9 | 10 | public static Process runTimeExec(String runTimeExec) throws IOException { 11 | return Runtime.getRuntime().exec(runTimeExec); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/com/testinium/deviceinformation/model/Device.java: -------------------------------------------------------------------------------- 1 | package com.testinium.deviceinformation.model; 2 | 3 | public interface Device { 4 | 5 | String getUniqueDeviceID(); 6 | 7 | String getProductVersion(); 8 | 9 | String getBuildVersion(); 10 | 11 | String getSerialNumber(); 12 | 13 | String getModelNumber(); 14 | 15 | String getDeviceProductName(); 16 | 17 | String getIntegratedCircuitCardIdentity(); 18 | 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/com/testinium/deviceinformation/model/DeviceInfoModel.java: -------------------------------------------------------------------------------- 1 | package com.testinium.deviceinformation.model; 2 | 3 | import com.google.gson.annotations.Expose; 4 | import com.google.gson.annotations.SerializedName; 5 | 6 | import java.util.List; 7 | 8 | public class DeviceInfoModel { 9 | 10 | @SerializedName(value = "device", alternate = {"ios","iosSimulator", "android"}) 11 | @Expose 12 | private List devices; 13 | 14 | public List getDevices() { 15 | return devices; 16 | } 17 | 18 | public List getAndroidDevices() { return (List) devices; } 19 | 20 | public List getIosDevices() { return (List) devices; } 21 | 22 | public List getIosSimulatorDevices() { return (List) devices; } 23 | 24 | public void setDevices(List devices) { 25 | this.devices = devices; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/com/testinium/deviceinformation/model/Ios.java: -------------------------------------------------------------------------------- 1 | package com.testinium.deviceinformation.model; 2 | 3 | import com.google.gson.annotations.Expose; 4 | import com.google.gson.annotations.SerializedName; 5 | 6 | public class Ios implements Device { 7 | 8 | @SerializedName("0") 9 | @Expose 10 | private String _0; 11 | @SerializedName("BluetoothAddress") 12 | @Expose 13 | private String bluetoothAddress; 14 | @SerializedName("SBLockdownEverRegisteredKey") 15 | @Expose 16 | private String sBLockdownEverRegisteredKey; 17 | @SerializedName("WirelessBoardSerialNumber") 18 | @Expose 19 | private String wirelessBoardSerialNumber; 20 | @SerializedName("kCTPostponementInfoPRIVersion") 21 | @Expose 22 | private String kCTPostponementInfoPRIVersion; 23 | @SerializedName("ProductName") 24 | @Expose 25 | private String productName; 26 | @SerializedName("SupportedDeviceFamilies[1]") 27 | @Expose 28 | private String supportedDeviceFamilies1; 29 | @SerializedName("CarrierBundleInfoArray[1]") 30 | @Expose 31 | private String carrierBundleInfoArray1; 32 | @SerializedName("CFBundleVersion") 33 | @Expose 34 | private String cFBundleVersion; 35 | @SerializedName("MNC") 36 | @Expose 37 | private String mNC; 38 | @SerializedName("InternationalMobileSubscriberIdentity") 39 | @Expose 40 | private String internationalMobileSubscriberIdentity; 41 | @SerializedName("CFBundleIdentifier") 42 | @Expose 43 | private String cFBundleIdentifier; 44 | @SerializedName("MCC") 45 | @Expose 46 | private String mCC; 47 | @SerializedName("IntegratedCircuitCardIdentity") 48 | @Expose 49 | private String integratedCircuitCardIdentity; 50 | @SerializedName("SIMTrayStatus") 51 | @Expose 52 | private String sIMTrayStatus; 53 | @SerializedName("ProtocolVersion") 54 | @Expose 55 | private String protocolVersion; 56 | @SerializedName("MobileSubscriberCountryCode") 57 | @Expose 58 | private String mobileSubscriberCountryCode; 59 | @SerializedName("UseRaptorCerts") 60 | @Expose 61 | private String useRaptorCerts; 62 | @SerializedName("DieID") 63 | @Expose 64 | private String dieID; 65 | @SerializedName("BasebandCertId") 66 | @Expose 67 | private String basebandCertId; 68 | @SerializedName("kCTPostponementStatus") 69 | @Expose 70 | private String kCTPostponementStatus; 71 | @SerializedName("HostAttached") 72 | @Expose 73 | private String hostAttached; 74 | @SerializedName("PasswordProtected") 75 | @Expose 76 | private String passwordProtected; 77 | @SerializedName("InternationalMobileEquipmentIdentity") 78 | @Expose 79 | private String internationalMobileEquipmentIdentity; 80 | @SerializedName("ModelNumber") 81 | @Expose 82 | private String modelNumber; 83 | @SerializedName("HardwareModel") 84 | @Expose 85 | private String hardwareModel; 86 | @SerializedName("ActivationStateAcknowledged") 87 | @Expose 88 | private String activationStateAcknowledged; 89 | @SerializedName("ProductType") 90 | @Expose 91 | private String productType; 92 | @SerializedName("BasebandVersion") 93 | @Expose 94 | private String basebandVersion; 95 | @SerializedName("ChipSerialNo") 96 | @Expose 97 | private String chipSerialNo; 98 | @SerializedName("TimeIntervalSince1970") 99 | @Expose 100 | private String timeIntervalSince1970; 101 | @SerializedName("UniqueChipID") 102 | @Expose 103 | private String uniqueChipID; 104 | @SerializedName("PartitionType") 105 | @Expose 106 | private String partitionType; 107 | @SerializedName("FusingStatus") 108 | @Expose 109 | private String fusingStatus; 110 | @SerializedName("TelephonyCapability") 111 | @Expose 112 | private String telephonyCapability; 113 | @SerializedName("TimeZone") 114 | @Expose 115 | private String timeZone; 116 | @SerializedName("SerialNumber") 117 | @Expose 118 | private String serialNumber; 119 | @SerializedName("BasebandKeyHashInformation") 120 | @Expose 121 | private String basebandKeyHashInformation; 122 | @SerializedName("SKeyHash") 123 | @Expose 124 | private String sKeyHash; 125 | @SerializedName("SKeyStatus") 126 | @Expose 127 | private String sKeyStatus; 128 | @SerializedName("AKeyStatus") 129 | @Expose 130 | private String aKeyStatus; 131 | @SerializedName("BasebandSerialNumber") 132 | @Expose 133 | private String basebandSerialNumber; 134 | @SerializedName("ChipID") 135 | @Expose 136 | private String chipID; 137 | @SerializedName("HardwarePlatform") 138 | @Expose 139 | private String hardwarePlatform; 140 | @SerializedName("SoftwareBehavior") 141 | @Expose 142 | private String softwareBehavior; 143 | @SerializedName("HasSiDP") 144 | @Expose 145 | private String hasSiDP; 146 | @SerializedName("NonVolatileRAM") 147 | @Expose 148 | private String nonVolatileRAM; 149 | @SerializedName("obliteration") 150 | @Expose 151 | private String obliteration; 152 | @SerializedName("oblit-begins") 153 | @Expose 154 | private String oblitBegins; 155 | @SerializedName("backlight-level") 156 | @Expose 157 | private String backlightLevel; 158 | @SerializedName("com.apple.System.tz0-size") 159 | @Expose 160 | private String comAppleSystemTz0Size; 161 | @SerializedName("boot-args") 162 | @Expose 163 | private String bootArgs; 164 | @SerializedName("auto-boot") 165 | @Expose 166 | private String autoBoot; 167 | @SerializedName("PkHash") 168 | @Expose 169 | private String pkHash; 170 | @SerializedName("ProximitySensorCalibration") 171 | @Expose 172 | private String proximitySensorCalibration; 173 | @SerializedName("CertID") 174 | @Expose 175 | private String certID; 176 | @SerializedName("DeviceClass") 177 | @Expose 178 | private String deviceClass; 179 | @SerializedName("RegionInfo") 180 | @Expose 181 | private String regionInfo; 182 | @SerializedName("UniqueDeviceID") 183 | @Expose 184 | private String uniqueDeviceID; 185 | @SerializedName("ProductVersion") 186 | @Expose 187 | private String productVersion; 188 | @SerializedName("EthernetAddress") 189 | @Expose 190 | private String ethernetAddress; 191 | @SerializedName("kCTPostponementInfoServiceProvisioningState") 192 | @Expose 193 | private String kCTPostponementInfoServiceProvisioningState; 194 | @SerializedName("BoardId") 195 | @Expose 196 | private String boardId; 197 | @SerializedName("SIMStatus") 198 | @Expose 199 | private String sIMStatus; 200 | @SerializedName("ActivationState") 201 | @Expose 202 | private String activationState; 203 | @SerializedName("BuildVersion") 204 | @Expose 205 | private String buildVersion; 206 | @SerializedName("TrustedHostAttached") 207 | @Expose 208 | private String trustedHostAttached; 209 | @SerializedName("BrickState") 210 | @Expose 211 | private String brickState; 212 | @SerializedName("MobileSubscriberNetworkCode") 213 | @Expose 214 | private String mobileSubscriberNetworkCode; 215 | @SerializedName("TimeZoneOffsetFromUTC") 216 | @Expose 217 | private String timeZoneOffsetFromUTC; 218 | @SerializedName("WiFiAddress") 219 | @Expose 220 | private String wiFiAddress; 221 | @SerializedName("MLBSerialNumber") 222 | @Expose 223 | private String mLBSerialNumber; 224 | @SerializedName("Uses24HourClock") 225 | @Expose 226 | private String uses24HourClock; 227 | @SerializedName("DeviceColor") 228 | @Expose 229 | private String deviceColor; 230 | @SerializedName("BasebandRegionSKU") 231 | @Expose 232 | private String basebandRegionSKU; 233 | @SerializedName("SoftwareBundleVersion") 234 | @Expose 235 | private String softwareBundleVersion; 236 | @SerializedName("FirmwareVersion") 237 | @Expose 238 | private String firmwareVersion; 239 | @SerializedName("BasebandMasterKeyHash") 240 | @Expose 241 | private String basebandMasterKeyHash; 242 | @SerializedName("CPUArchitecture") 243 | @Expose 244 | private String cPUArchitecture; 245 | @SerializedName("BasebandStatus") 246 | @Expose 247 | private String basebandStatus; 248 | @SerializedName("BasebandActivationTicketVersion") 249 | @Expose 250 | private String basebandActivationTicketVersion; 251 | @SerializedName("BasebandChipID") 252 | @Expose 253 | private String basebandChipID; 254 | @SerializedName("DeviceName") 255 | @Expose 256 | private String deviceName; 257 | @SerializedName("ProductionSOC") 258 | @Expose 259 | private String productionSOC; 260 | 261 | public String get0() { 262 | return _0; 263 | } 264 | 265 | public void set0(String _0) { 266 | this._0 = _0; 267 | } 268 | 269 | public String getBluetoothAddress() { 270 | return bluetoothAddress; 271 | } 272 | 273 | public void setBluetoothAddress(String bluetoothAddress) { 274 | this.bluetoothAddress = bluetoothAddress; 275 | } 276 | 277 | public String getSBLockdownEverRegisteredKey() { 278 | return sBLockdownEverRegisteredKey; 279 | } 280 | 281 | public void setSBLockdownEverRegisteredKey(String sBLockdownEverRegisteredKey) { 282 | this.sBLockdownEverRegisteredKey = sBLockdownEverRegisteredKey; 283 | } 284 | 285 | public String getWirelessBoardSerialNumber() { 286 | return wirelessBoardSerialNumber; 287 | } 288 | 289 | public void setWirelessBoardSerialNumber(String wirelessBoardSerialNumber) { 290 | this.wirelessBoardSerialNumber = wirelessBoardSerialNumber; 291 | } 292 | 293 | public String getKCTPostponementInfoPRIVersion() { 294 | return kCTPostponementInfoPRIVersion; 295 | } 296 | 297 | public void setKCTPostponementInfoPRIVersion(String kCTPostponementInfoPRIVersion) { 298 | this.kCTPostponementInfoPRIVersion = kCTPostponementInfoPRIVersion; 299 | } 300 | 301 | public String getProductName() { 302 | return productName; 303 | } 304 | 305 | public void setProductName(String productName) { 306 | this.productName = productName; 307 | } 308 | 309 | public String getSupportedDeviceFamilies1() { 310 | return supportedDeviceFamilies1; 311 | } 312 | 313 | public void setSupportedDeviceFamilies1(String supportedDeviceFamilies1) { 314 | this.supportedDeviceFamilies1 = supportedDeviceFamilies1; 315 | } 316 | 317 | public String getCarrierBundleInfoArray1() { 318 | return carrierBundleInfoArray1; 319 | } 320 | 321 | public void setCarrierBundleInfoArray1(String carrierBundleInfoArray1) { 322 | this.carrierBundleInfoArray1 = carrierBundleInfoArray1; 323 | } 324 | 325 | public String getCFBundleVersion() { 326 | return cFBundleVersion; 327 | } 328 | 329 | public void setCFBundleVersion(String cFBundleVersion) { 330 | this.cFBundleVersion = cFBundleVersion; 331 | } 332 | 333 | public String getMNC() { 334 | return mNC; 335 | } 336 | 337 | public void setMNC(String mNC) { 338 | this.mNC = mNC; 339 | } 340 | 341 | public String getInternationalMobileSubscriberIdentity() { 342 | return internationalMobileSubscriberIdentity; 343 | } 344 | 345 | public void setInternationalMobileSubscriberIdentity( 346 | String internationalMobileSubscriberIdentity) { 347 | this.internationalMobileSubscriberIdentity = internationalMobileSubscriberIdentity; 348 | } 349 | 350 | public String getCFBundleIdentifier() { 351 | return cFBundleIdentifier; 352 | } 353 | 354 | public void setCFBundleIdentifier(String cFBundleIdentifier) { 355 | this.cFBundleIdentifier = cFBundleIdentifier; 356 | } 357 | 358 | public String getMCC() { 359 | return mCC; 360 | } 361 | 362 | public void setMCC(String mCC) { 363 | this.mCC = mCC; 364 | } 365 | 366 | public String getIntegratedCircuitCardIdentity() { 367 | return integratedCircuitCardIdentity; 368 | } 369 | 370 | public void setIntegratedCircuitCardIdentity(String integratedCircuitCardIdentity) { 371 | this.integratedCircuitCardIdentity = integratedCircuitCardIdentity; 372 | } 373 | 374 | public String getSIMTrayStatus() { 375 | return sIMTrayStatus; 376 | } 377 | 378 | public void setSIMTrayStatus(String sIMTrayStatus) { 379 | this.sIMTrayStatus = sIMTrayStatus; 380 | } 381 | 382 | public String getProtocolVersion() { 383 | return protocolVersion; 384 | } 385 | 386 | public void setProtocolVersion(String protocolVersion) { 387 | this.protocolVersion = protocolVersion; 388 | } 389 | 390 | public String getMobileSubscriberCountryCode() { 391 | return mobileSubscriberCountryCode; 392 | } 393 | 394 | public void setMobileSubscriberCountryCode(String mobileSubscriberCountryCode) { 395 | this.mobileSubscriberCountryCode = mobileSubscriberCountryCode; 396 | } 397 | 398 | public String getUseRaptorCerts() { 399 | return useRaptorCerts; 400 | } 401 | 402 | public void setUseRaptorCerts(String useRaptorCerts) { 403 | this.useRaptorCerts = useRaptorCerts; 404 | } 405 | 406 | public String getDieID() { 407 | return dieID; 408 | } 409 | 410 | public void setDieID(String dieID) { 411 | this.dieID = dieID; 412 | } 413 | 414 | public String getBasebandCertId() { 415 | return basebandCertId; 416 | } 417 | 418 | public void setBasebandCertId(String basebandCertId) { 419 | this.basebandCertId = basebandCertId; 420 | } 421 | 422 | public String getKCTPostponementStatus() { 423 | return kCTPostponementStatus; 424 | } 425 | 426 | public void setKCTPostponementStatus(String kCTPostponementStatus) { 427 | this.kCTPostponementStatus = kCTPostponementStatus; 428 | } 429 | 430 | public String getHostAttached() { 431 | return hostAttached; 432 | } 433 | 434 | public void setHostAttached(String hostAttached) { 435 | this.hostAttached = hostAttached; 436 | } 437 | 438 | public String getPasswordProtected() { 439 | return passwordProtected; 440 | } 441 | 442 | public void setPasswordProtected(String passwordProtected) { 443 | this.passwordProtected = passwordProtected; 444 | } 445 | 446 | public String getInternationalMobileEquipmentIdentity() { 447 | return internationalMobileEquipmentIdentity; 448 | } 449 | 450 | public void setInternationalMobileEquipmentIdentity(String internationalMobileEquipmentIdentity) { 451 | this.internationalMobileEquipmentIdentity = internationalMobileEquipmentIdentity; 452 | } 453 | 454 | public String getModelNumber() { 455 | return modelNumber; 456 | } 457 | 458 | @Override 459 | public String getDeviceProductName() { 460 | // return getDeviceClass(); 461 | return "Ios"; 462 | } 463 | 464 | public void setModelNumber(String modelNumber) { 465 | this.modelNumber = modelNumber; 466 | } 467 | 468 | public String getHardwareModel() { 469 | return hardwareModel; 470 | } 471 | 472 | public void setHardwareModel(String hardwareModel) { 473 | this.hardwareModel = hardwareModel; 474 | } 475 | 476 | public String getActivationStateAcknowledged() { 477 | return activationStateAcknowledged; 478 | } 479 | 480 | public void setActivationStateAcknowledged(String activationStateAcknowledged) { 481 | this.activationStateAcknowledged = activationStateAcknowledged; 482 | } 483 | 484 | public String getProductType() { 485 | return productType; 486 | } 487 | 488 | public void setProductType(String productType) { 489 | this.productType = productType; 490 | } 491 | 492 | public String getBasebandVersion() { 493 | return basebandVersion; 494 | } 495 | 496 | public void setBasebandVersion(String basebandVersion) { 497 | this.basebandVersion = basebandVersion; 498 | } 499 | 500 | public String getChipSerialNo() { 501 | return chipSerialNo; 502 | } 503 | 504 | public void setChipSerialNo(String chipSerialNo) { 505 | this.chipSerialNo = chipSerialNo; 506 | } 507 | 508 | public String getTimeIntervalSince1970() { 509 | return timeIntervalSince1970; 510 | } 511 | 512 | public void setTimeIntervalSince1970(String timeIntervalSince1970) { 513 | this.timeIntervalSince1970 = timeIntervalSince1970; 514 | } 515 | 516 | public String getUniqueChipID() { 517 | return uniqueChipID; 518 | } 519 | 520 | public void setUniqueChipID(String uniqueChipID) { 521 | this.uniqueChipID = uniqueChipID; 522 | } 523 | 524 | public String getPartitionType() { 525 | return partitionType; 526 | } 527 | 528 | public void setPartitionType(String partitionType) { 529 | this.partitionType = partitionType; 530 | } 531 | 532 | public String getFusingStatus() { 533 | return fusingStatus; 534 | } 535 | 536 | public void setFusingStatus(String fusingStatus) { 537 | this.fusingStatus = fusingStatus; 538 | } 539 | 540 | public String getTelephonyCapability() { 541 | return telephonyCapability; 542 | } 543 | 544 | public void setTelephonyCapability(String telephonyCapability) { 545 | this.telephonyCapability = telephonyCapability; 546 | } 547 | 548 | public String getTimeZone() { 549 | return timeZone; 550 | } 551 | 552 | public void setTimeZone(String timeZone) { 553 | this.timeZone = timeZone; 554 | } 555 | 556 | public String getSerialNumber() { 557 | return serialNumber; 558 | } 559 | 560 | public void setSerialNumber(String serialNumber) { 561 | this.serialNumber = serialNumber; 562 | } 563 | 564 | public String getBasebandKeyHashInformation() { 565 | return basebandKeyHashInformation; 566 | } 567 | 568 | public void setBasebandKeyHashInformation(String basebandKeyHashInformation) { 569 | this.basebandKeyHashInformation = basebandKeyHashInformation; 570 | } 571 | 572 | public String getSKeyHash() { 573 | return sKeyHash; 574 | } 575 | 576 | public void setSKeyHash(String sKeyHash) { 577 | this.sKeyHash = sKeyHash; 578 | } 579 | 580 | public String getSKeyStatus() { 581 | return sKeyStatus; 582 | } 583 | 584 | public void setSKeyStatus(String sKeyStatus) { 585 | this.sKeyStatus = sKeyStatus; 586 | } 587 | 588 | public String getAKeyStatus() { 589 | return aKeyStatus; 590 | } 591 | 592 | public void setAKeyStatus(String aKeyStatus) { 593 | this.aKeyStatus = aKeyStatus; 594 | } 595 | 596 | public String getBasebandSerialNumber() { 597 | return basebandSerialNumber; 598 | } 599 | 600 | public void setBasebandSerialNumber(String basebandSerialNumber) { 601 | this.basebandSerialNumber = basebandSerialNumber; 602 | } 603 | 604 | public String getChipID() { 605 | return chipID; 606 | } 607 | 608 | public void setChipID(String chipID) { 609 | this.chipID = chipID; 610 | } 611 | 612 | public String getHardwarePlatform() { 613 | return hardwarePlatform; 614 | } 615 | 616 | public void setHardwarePlatform(String hardwarePlatform) { 617 | this.hardwarePlatform = hardwarePlatform; 618 | } 619 | 620 | public String getSoftwareBehavior() { 621 | return softwareBehavior; 622 | } 623 | 624 | public void setSoftwareBehavior(String softwareBehavior) { 625 | this.softwareBehavior = softwareBehavior; 626 | } 627 | 628 | public String getHasSiDP() { 629 | return hasSiDP; 630 | } 631 | 632 | public void setHasSiDP(String hasSiDP) { 633 | this.hasSiDP = hasSiDP; 634 | } 635 | 636 | public String getNonVolatileRAM() { 637 | return nonVolatileRAM; 638 | } 639 | 640 | public void setNonVolatileRAM(String nonVolatileRAM) { 641 | this.nonVolatileRAM = nonVolatileRAM; 642 | } 643 | 644 | public String getObliteration() { 645 | return obliteration; 646 | } 647 | 648 | public void setObliteration(String obliteration) { 649 | this.obliteration = obliteration; 650 | } 651 | 652 | public String getOblitBegins() { 653 | return oblitBegins; 654 | } 655 | 656 | public void setOblitBegins(String oblitBegins) { 657 | this.oblitBegins = oblitBegins; 658 | } 659 | 660 | public String getBacklightLevel() { 661 | return backlightLevel; 662 | } 663 | 664 | public void setBacklightLevel(String backlightLevel) { 665 | this.backlightLevel = backlightLevel; 666 | } 667 | 668 | public String getComAppleSystemTz0Size() { 669 | return comAppleSystemTz0Size; 670 | } 671 | 672 | public void setComAppleSystemTz0Size(String comAppleSystemTz0Size) { 673 | this.comAppleSystemTz0Size = comAppleSystemTz0Size; 674 | } 675 | 676 | public String getBootArgs() { 677 | return bootArgs; 678 | } 679 | 680 | public void setBootArgs(String bootArgs) { 681 | this.bootArgs = bootArgs; 682 | } 683 | 684 | public String getAutoBoot() { 685 | return autoBoot; 686 | } 687 | 688 | public void setAutoBoot(String autoBoot) { 689 | this.autoBoot = autoBoot; 690 | } 691 | 692 | public String getPkHash() { 693 | return pkHash; 694 | } 695 | 696 | public void setPkHash(String pkHash) { 697 | this.pkHash = pkHash; 698 | } 699 | 700 | public String getProximitySensorCalibration() { 701 | return proximitySensorCalibration; 702 | } 703 | 704 | public void setProximitySensorCalibration(String proximitySensorCalibration) { 705 | this.proximitySensorCalibration = proximitySensorCalibration; 706 | } 707 | 708 | public String getCertID() { 709 | return certID; 710 | } 711 | 712 | public void setCertID(String certID) { 713 | this.certID = certID; 714 | } 715 | 716 | public String getDeviceClass() { 717 | return deviceClass; 718 | } 719 | 720 | public void setDeviceClass(String deviceClass) { 721 | this.deviceClass = deviceClass; 722 | } 723 | 724 | public String getRegionInfo() { 725 | return regionInfo; 726 | } 727 | 728 | public void setRegionInfo(String regionInfo) { 729 | this.regionInfo = regionInfo; 730 | } 731 | 732 | public String getUniqueDeviceID() { 733 | return uniqueDeviceID; 734 | } 735 | 736 | public void setUniqueDeviceID(String uniqueDeviceID) { 737 | this.uniqueDeviceID = uniqueDeviceID; 738 | } 739 | 740 | public String getProductVersion() { 741 | return productVersion; 742 | } 743 | 744 | public void setProductVersion(String productVersion) { 745 | this.productVersion = productVersion; 746 | } 747 | 748 | public String getEthernetAddress() { 749 | return ethernetAddress; 750 | } 751 | 752 | public void setEthernetAddress(String ethernetAddress) { 753 | this.ethernetAddress = ethernetAddress; 754 | } 755 | 756 | public String getKCTPostponementInfoServiceProvisioningState() { 757 | return kCTPostponementInfoServiceProvisioningState; 758 | } 759 | 760 | public void setKCTPostponementInfoServiceProvisioningState( 761 | String kCTPostponementInfoServiceProvisioningState) { 762 | this.kCTPostponementInfoServiceProvisioningState = kCTPostponementInfoServiceProvisioningState; 763 | } 764 | 765 | public String getBoardId() { 766 | return boardId; 767 | } 768 | 769 | public void setBoardId(String boardId) { 770 | this.boardId = boardId; 771 | } 772 | 773 | public String getSIMStatus() { 774 | return sIMStatus; 775 | } 776 | 777 | public void setSIMStatus(String sIMStatus) { 778 | this.sIMStatus = sIMStatus; 779 | } 780 | 781 | public String getActivationState() { 782 | return activationState; 783 | } 784 | 785 | public void setActivationState(String activationState) { 786 | this.activationState = activationState; 787 | } 788 | 789 | public String getBuildVersion() { 790 | return buildVersion; 791 | } 792 | 793 | public void setBuildVersion(String buildVersion) { 794 | this.buildVersion = buildVersion; 795 | } 796 | 797 | public String getTrustedHostAttached() { 798 | return trustedHostAttached; 799 | } 800 | 801 | public void setTrustedHostAttached(String trustedHostAttached) { 802 | this.trustedHostAttached = trustedHostAttached; 803 | } 804 | 805 | public String getBrickState() { 806 | return brickState; 807 | } 808 | 809 | public void setBrickState(String brickState) { 810 | this.brickState = brickState; 811 | } 812 | 813 | public String getMobileSubscriberNetworkCode() { 814 | return mobileSubscriberNetworkCode; 815 | } 816 | 817 | public void setMobileSubscriberNetworkCode(String mobileSubscriberNetworkCode) { 818 | this.mobileSubscriberNetworkCode = mobileSubscriberNetworkCode; 819 | } 820 | 821 | public String getTimeZoneOffsetFromUTC() { 822 | return timeZoneOffsetFromUTC; 823 | } 824 | 825 | public void setTimeZoneOffsetFromUTC(String timeZoneOffsetFromUTC) { 826 | this.timeZoneOffsetFromUTC = timeZoneOffsetFromUTC; 827 | } 828 | 829 | public String getWiFiAddress() { 830 | return wiFiAddress; 831 | } 832 | 833 | public void setWiFiAddress(String wiFiAddress) { 834 | this.wiFiAddress = wiFiAddress; 835 | } 836 | 837 | public String getMLBSerialNumber() { 838 | return mLBSerialNumber; 839 | } 840 | 841 | public void setMLBSerialNumber(String mLBSerialNumber) { 842 | this.mLBSerialNumber = mLBSerialNumber; 843 | } 844 | 845 | public String getUses24HourClock() { 846 | return uses24HourClock; 847 | } 848 | 849 | public void setUses24HourClock(String uses24HourClock) { 850 | this.uses24HourClock = uses24HourClock; 851 | } 852 | 853 | public String getDeviceColor() { 854 | return deviceColor; 855 | } 856 | 857 | public void setDeviceColor(String deviceColor) { 858 | this.deviceColor = deviceColor; 859 | } 860 | 861 | public String getBasebandRegionSKU() { 862 | return basebandRegionSKU; 863 | } 864 | 865 | public void setBasebandRegionSKU(String basebandRegionSKU) { 866 | this.basebandRegionSKU = basebandRegionSKU; 867 | } 868 | 869 | public String getSoftwareBundleVersion() { 870 | return softwareBundleVersion; 871 | } 872 | 873 | public void setSoftwareBundleVersion(String softwareBundleVersion) { 874 | this.softwareBundleVersion = softwareBundleVersion; 875 | } 876 | 877 | public String getFirmwareVersion() { 878 | return firmwareVersion; 879 | } 880 | 881 | public void setFirmwareVersion(String firmwareVersion) { 882 | this.firmwareVersion = firmwareVersion; 883 | } 884 | 885 | public String getBasebandMasterKeyHash() { 886 | return basebandMasterKeyHash; 887 | } 888 | 889 | public void setBasebandMasterKeyHash(String basebandMasterKeyHash) { 890 | this.basebandMasterKeyHash = basebandMasterKeyHash; 891 | } 892 | 893 | public String getCPUArchitecture() { 894 | return cPUArchitecture; 895 | } 896 | 897 | public void setCPUArchitecture(String cPUArchitecture) { 898 | this.cPUArchitecture = cPUArchitecture; 899 | } 900 | 901 | public String getBasebandStatus() { 902 | return basebandStatus; 903 | } 904 | 905 | public void setBasebandStatus(String basebandStatus) { 906 | this.basebandStatus = basebandStatus; 907 | } 908 | 909 | public String getBasebandActivationTicketVersion() { 910 | return basebandActivationTicketVersion; 911 | } 912 | 913 | public void setBasebandActivationTicketVersion(String basebandActivationTicketVersion) { 914 | this.basebandActivationTicketVersion = basebandActivationTicketVersion; 915 | } 916 | 917 | public String getBasebandChipID() { 918 | return basebandChipID; 919 | } 920 | 921 | public void setBasebandChipID(String basebandChipID) { 922 | this.basebandChipID = basebandChipID; 923 | } 924 | 925 | public String getDeviceName() { 926 | return deviceName; 927 | } 928 | 929 | public void setDeviceName(String deviceName) { 930 | this.deviceName = deviceName; 931 | } 932 | 933 | public String getProductionSOC() { 934 | return productionSOC; 935 | } 936 | 937 | public void setProductionSOC(String productionSOC) { 938 | this.productionSOC = productionSOC; 939 | } 940 | 941 | } 942 | -------------------------------------------------------------------------------- /src/main/java/com/testinium/deviceinformation/model/IosSimulator.java: -------------------------------------------------------------------------------- 1 | package com.testinium.deviceinformation.model; 2 | 3 | import com.google.gson.annotations.Expose; 4 | import com.google.gson.annotations.SerializedName; 5 | 6 | public class IosSimulator implements Device { 7 | 8 | @SerializedName("buildVersion") 9 | @Expose 10 | private String buildVersion; 11 | @SerializedName("simulator") 12 | @Expose 13 | private String simulator; 14 | @SerializedName("available") 15 | @Expose 16 | private String available; 17 | @SerializedName("availability") 18 | @Expose 19 | private String availability; 20 | @SerializedName("platform") 21 | @Expose 22 | private String platform; 23 | @SerializedName("modelName") 24 | @Expose 25 | private String modelName; 26 | @SerializedName("productVersion") 27 | @Expose 28 | private String productVersion; 29 | @SerializedName("operatingSystemVersion") 30 | @Expose 31 | private String operatingSystemVersion; 32 | @SerializedName("modelCode") 33 | @Expose 34 | private String modelCode; 35 | @SerializedName("name") 36 | @Expose 37 | private String name; 38 | @SerializedName("state") 39 | @Expose 40 | private String state; 41 | @SerializedName("udid") 42 | @Expose 43 | private String udid; 44 | @SerializedName("architecture") 45 | @Expose 46 | private String architecture; 47 | @SerializedName("identifier") 48 | @Expose 49 | private String identifier; 50 | 51 | public String getSimulator() { 52 | return simulator; 53 | } 54 | 55 | public void setSimulator(String simulator) { 56 | this.simulator = simulator; 57 | } 58 | 59 | public String getAvailable() { 60 | return available; 61 | } 62 | 63 | public void setAvailable(String available) { 64 | this.available = available; 65 | } 66 | 67 | public String getAvailability() { 68 | return availability; 69 | } 70 | 71 | public void setAvailability(String availability) { 72 | this.availability = availability; 73 | } 74 | 75 | public String getPlatform() { 76 | return platform; 77 | } 78 | 79 | public void setPlatform(String platform) { 80 | this.platform = platform; 81 | } 82 | 83 | public String getModelName() { 84 | return modelName; 85 | } 86 | 87 | public void setModelName(String modelName) { 88 | this.modelName = modelName; 89 | } 90 | 91 | public String getOperatingSystemVersion() { 92 | return operatingSystemVersion; 93 | } 94 | 95 | public void setOperatingSystemVersion(String operatingSystemVersion) { 96 | this.operatingSystemVersion = operatingSystemVersion; 97 | } 98 | 99 | public String getModelCode() { 100 | return modelCode; 101 | } 102 | 103 | public void setModelCode(String modelCode) { 104 | this.modelCode = modelCode; 105 | } 106 | 107 | public String getName() { 108 | return name; 109 | } 110 | 111 | public void setName(String name) { 112 | this.name = name; 113 | } 114 | 115 | public String getState() { 116 | return state; 117 | } 118 | 119 | public void setState(String state) { 120 | this.state = state; 121 | } 122 | 123 | public String getUdid() { 124 | return udid; 125 | } 126 | 127 | public void setUdid(String udid) { 128 | this.udid = udid; 129 | } 130 | 131 | public String getArchitecture() { 132 | return architecture; 133 | } 134 | 135 | public void setArchitecture(String architecture) { 136 | this.architecture = architecture; 137 | } 138 | 139 | public String getIdentifier() { 140 | return identifier; 141 | } 142 | 143 | public void setIdentifier(String identifier) { 144 | this.identifier = identifier; 145 | } 146 | 147 | @Override 148 | public String getUniqueDeviceID() { 149 | return udid; 150 | } 151 | 152 | @Override 153 | public String getProductVersion() { 154 | return productVersion; 155 | } 156 | 157 | public void setProductVersion(String productVersion) { 158 | this.productVersion = productVersion; 159 | } 160 | 161 | @Override 162 | public String getBuildVersion() { 163 | return buildVersion; 164 | } 165 | 166 | public void setBuildVersion(String buildVersion) { 167 | this.buildVersion = buildVersion; 168 | } 169 | 170 | @Override 171 | public String getSerialNumber() { 172 | return null; 173 | } 174 | 175 | @Override 176 | public String getModelNumber() { 177 | return modelCode; 178 | } 179 | 180 | @Override 181 | public String getDeviceProductName() { 182 | return "Ios Simulator"; 183 | } 184 | 185 | @Override 186 | public String getIntegratedCircuitCardIdentity() { 187 | return null; 188 | } 189 | } 190 | --------------------------------------------------------------------------------