devicely 2.2.5 → 2.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/devicely.js +1 -105
- package/config/devices.conf +6 -22
- package/lib/androidDeviceDetection.js +1 -276
- package/lib/appMappings.js +1 -337
- package/lib/deviceDetection.js +1 -394
- package/lib/devices.js +1 -54
- package/lib/doctor.js +1 -94
- package/lib/encryption.js +1 -88
- package/lib/executor.js +1 -104
- package/lib/frontend/asset-manifest.json +3 -3
- package/lib/frontend/index.html +1 -1
- package/lib/frontend/static/css/main.23bd35c0.css.map +1 -0
- package/lib/frontend/static/js/{main.26a24c5c.js → main.4ff1ea70.js} +3 -3
- package/lib/frontend/static/js/main.4ff1ea70.js.map +1 -0
- package/lib/logger.js +1 -47
- package/lib/package-lock.json +1678 -0
- package/lib/package.json +30 -0
- package/lib/screenshots/screenshot_ios_iPhone17_20260205_225900.png +0 -0
- package/lib/screenshots/screenshot_ios_iPhone17_20260205_225942.png +0 -0
- package/lib/screenshots/screenshot_ios_iPhone17_20260205_231101.png +0 -0
- package/lib/screenshots/screenshot_ios_iPhone17_20260205_232911.png +0 -0
- package/lib/screenshots/screenshot_ios_iPhone17_20260208_095103.png +0 -0
- package/lib/screenshots/screenshot_ios_iPhone17_20260208_095720.png +0 -0
- package/lib/screenshots/screenshot_ios_iPhoneXR17x_20260206_115040.png +0 -0
- package/lib/screenshots/screenshot_ios_iPhoneXR17x_20260206_115047.png +0 -0
- package/lib/screenshots/screenshot_ios_iPhoneXR17x_20260206_115118.png +0 -0
- package/lib/screenshots/screenshot_ios_iPhoneXR17x_20260206_115125.png +0 -0
- package/lib/screenshots/screenshot_ios_iPhoneXR17x_20260206_115143.png +0 -0
- package/lib/screenshots/screenshot_ios_iPhoneXR17x_20260206_120107.png +0 -0
- package/lib/screenshots/screenshot_ios_iPhoneXR17x_20260206_120118.png +0 -0
- package/lib/screenshots/screenshot_ios_iPhoneXR17x_20260206_120137.png +0 -0
- package/lib/screenshots/screenshot_ios_iPhoneXR17x_20260206_120201.png +0 -0
- package/lib/screenshots/screenshot_ios_iPhoneXR17x_20260206_134529.png +0 -0
- package/lib/scriptLoader.js +1 -13
- package/lib/server.js +1 -3546
- package/package.json +14 -3
- package/scripts/shell/android_device_control.enc +1 -1
- package/scripts/shell/connect_android_usb_multi_final.enc +1 -1
- package/scripts/shell/connect_android_wireless.enc +1 -1
- package/scripts/shell/connect_android_wireless_multi_final.enc +1 -1
- package/scripts/shell/connect_ios_usb_multi_final.enc +1 -1
- package/scripts/shell/connect_ios_wireless_multi_final.enc +1 -1
- package/scripts/shell/ios_device_control.enc +1 -1
- package/scripts/compile-shell-scripts.js +0 -208
- package/scripts/encrypt-shell-simple.js +0 -58
- package/scripts/obfuscate-shell.js +0 -160
- package/scripts/shell/apps_presets.conf +0 -271
- package/scripts/shell/devices.conf +0 -24
- /package/lib/frontend/static/js/{main.26a24c5c.js.LICENSE.txt → main.4ff1ea70.js.LICENSE.txt} +0 -0
package/lib/deviceDetection.js
CHANGED
|
@@ -1,395 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
// Unified Device Detection Module - iOS & Android
|
|
3
|
-
// Auto-detects both USB-connected and wireless devices for both platforms
|
|
4
|
-
|
|
5
|
-
const { spawn } = require('child_process');
|
|
6
|
-
const fs = require('fs').promises;
|
|
7
|
-
const path = require('path');
|
|
8
|
-
|
|
9
|
-
// Config file location - works for both dev and npm package
|
|
10
|
-
let DEVICE_CONFIG = path.join(__dirname, 'devices.conf');
|
|
11
|
-
// Check if we're in npm package structure (lib/ folder)
|
|
12
|
-
if (!require('fs').existsSync(DEVICE_CONFIG)) {
|
|
13
|
-
DEVICE_CONFIG = path.join(__dirname, '../config/devices.conf');
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
// Import Android detection module
|
|
17
|
-
let androidDetection;
|
|
18
|
-
try {
|
|
19
|
-
androidDetection = require('./androidDeviceDetection');
|
|
20
|
-
} catch (err) {
|
|
21
|
-
console.warn('Android detection module not available');
|
|
22
|
-
androidDetection = null;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
// Detect iOS USB devices using idevice_id
|
|
26
|
-
async function detectIOSUSBDevices() {
|
|
27
|
-
return new Promise((resolve) => {
|
|
28
|
-
const udids = [];
|
|
29
|
-
const idevice = spawn('idevice_id', ['-l']);
|
|
30
|
-
|
|
31
|
-
let output = '';
|
|
32
|
-
idevice.stdout.on('data', (data) => {
|
|
33
|
-
output += data.toString();
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
idevice.on('close', (code) => {
|
|
37
|
-
if (code === 0 && output.trim()) {
|
|
38
|
-
const devices = output.trim().split('\n').filter(Boolean);
|
|
39
|
-
devices.forEach(udid => {
|
|
40
|
-
udids.push({
|
|
41
|
-
name: `iOS-${udid.substring(0, 8)}`,
|
|
42
|
-
udid: udid.trim(),
|
|
43
|
-
platform: 'ios',
|
|
44
|
-
type: 'usb',
|
|
45
|
-
connectionType: 'usb',
|
|
46
|
-
status: 'unknown' // Will be checked for WDA later
|
|
47
|
-
});
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
resolve(udids);
|
|
51
|
-
});
|
|
52
|
-
|
|
53
|
-
idevice.on('error', () => {
|
|
54
|
-
resolve([]); // idevice_id not installed
|
|
55
|
-
});
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
// Detect USB devices (iOS + Android)
|
|
60
|
-
async function detectUSBDevices() {
|
|
61
|
-
const iosDevices = await detectIOSUSBDevices();
|
|
62
|
-
|
|
63
|
-
let androidDevices = [];
|
|
64
|
-
if (androidDetection) {
|
|
65
|
-
try {
|
|
66
|
-
androidDevices = await androidDetection.detectUSBDevices();
|
|
67
|
-
} catch (err) {
|
|
68
|
-
console.error('Error detecting Android USB devices:', err.message);
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
return [...iosDevices, ...androidDevices];
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
// Get device info using ideviceinfo
|
|
76
|
-
async function getUSBDeviceInfo(udid) {
|
|
77
|
-
return new Promise((resolve) => {
|
|
78
|
-
const idevice = spawn('ideviceinfo', ['-u', udid]);
|
|
79
|
-
|
|
80
|
-
let output = '';
|
|
81
|
-
idevice.stdout.on('data', (data) => {
|
|
82
|
-
output += data.toString();
|
|
83
|
-
});
|
|
84
|
-
|
|
85
|
-
idevice.on('close', (code) => {
|
|
86
|
-
if (code === 0 && output.trim()) {
|
|
87
|
-
const info = {};
|
|
88
|
-
const lines = output.split('\n');
|
|
89
|
-
|
|
90
|
-
lines.forEach(line => {
|
|
91
|
-
if (line.includes('DeviceName:')) {
|
|
92
|
-
info.name = line.split(':')[1].trim();
|
|
93
|
-
}
|
|
94
|
-
if (line.includes('ProductVersion:')) {
|
|
95
|
-
info.osVersion = line.split(':')[1].trim();
|
|
96
|
-
}
|
|
97
|
-
});
|
|
98
|
-
|
|
99
|
-
resolve(info);
|
|
100
|
-
} else {
|
|
101
|
-
resolve(null);
|
|
102
|
-
}
|
|
103
|
-
});
|
|
104
|
-
|
|
105
|
-
idevice.on('error', () => {
|
|
106
|
-
resolve(null);
|
|
107
|
-
});
|
|
108
|
-
});
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
// Load all devices from config (iOS + Android, USB and wireless)
|
|
112
|
-
async function loadDevicesFromConfig() {
|
|
113
|
-
try {
|
|
114
|
-
const content = await fs.readFile(DEVICE_CONFIG, 'utf-8');
|
|
115
|
-
const devices = content
|
|
116
|
-
.split('\n')
|
|
117
|
-
.filter(line => line.trim() && !line.startsWith('#'))
|
|
118
|
-
.map(line => {
|
|
119
|
-
const parts = line.split(',').map(s => s.trim());
|
|
120
|
-
const [name, udid, ip, platform, type] = parts;
|
|
121
|
-
|
|
122
|
-
// Auto-detect platform if not specified
|
|
123
|
-
let devicePlatform = platform || 'ios'; // Default for backward compatibility
|
|
124
|
-
|
|
125
|
-
// Smart platform detection based on UDID format
|
|
126
|
-
if (!platform) {
|
|
127
|
-
// Android wireless: IP:PORT format (e.g., 192.168.1.100:5555)
|
|
128
|
-
if (udid && udid.includes(':') && udid.match(/^\d+\.\d+\.\d+\.\d+:\d+$/)) {
|
|
129
|
-
devicePlatform = 'android';
|
|
130
|
-
}
|
|
131
|
-
// Android USB: Short serial (not UUID format)
|
|
132
|
-
else if (udid && udid.length < 20 && !udid.includes('-')) {
|
|
133
|
-
devicePlatform = 'android';
|
|
134
|
-
}
|
|
135
|
-
// iOS: Long UUID with dashes
|
|
136
|
-
else if (udid && udid.includes('-') && udid.length > 30) {
|
|
137
|
-
devicePlatform = 'ios';
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
const connectionType = type || (ip ? 'wireless' : 'usb');
|
|
142
|
-
|
|
143
|
-
return {
|
|
144
|
-
name,
|
|
145
|
-
udid,
|
|
146
|
-
ip: ip || '',
|
|
147
|
-
platform: devicePlatform,
|
|
148
|
-
type: connectionType,
|
|
149
|
-
connectionType,
|
|
150
|
-
status: 'unknown'
|
|
151
|
-
};
|
|
152
|
-
});
|
|
153
|
-
return devices;
|
|
154
|
-
} catch (error) {
|
|
155
|
-
return [];
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
// Load wireless devices from config (backwards compatibility)
|
|
160
|
-
async function loadWirelessDevices() {
|
|
161
|
-
const devices = await loadDevicesFromConfig();
|
|
162
|
-
return devices.filter(d => d.ip);
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
// Save USB device to config if not already present
|
|
166
|
-
async function saveUSBDeviceToConfig(device) {
|
|
167
|
-
try {
|
|
168
|
-
const existingDevices = await loadDevicesFromConfig();
|
|
169
|
-
const exists = existingDevices.some(d => d.udid === device.udid);
|
|
170
|
-
|
|
171
|
-
if (!exists) {
|
|
172
|
-
// Read current config
|
|
173
|
-
let content = '';
|
|
174
|
-
try {
|
|
175
|
-
content = await fs.readFile(DEVICE_CONFIG, 'utf-8');
|
|
176
|
-
} catch (error) {
|
|
177
|
-
// Config doesn't exist, create with header
|
|
178
|
-
content = `# Device Configuration (Auto-updated)
|
|
179
|
-
# Format: device_name,udid,ip_address,platform,type
|
|
180
|
-
# Platform: ios | android
|
|
181
|
-
# Type: usb | wireless
|
|
182
|
-
#
|
|
183
|
-
# 🔌 USB DEVICES: Automatically detected and saved here
|
|
184
|
-
# - No configuration needed for USB connection
|
|
185
|
-
# - Add IP address to enable wireless support later
|
|
186
|
-
#
|
|
187
|
-
# 📡 WIRELESS DEVICES: Manually add with IP address
|
|
188
|
-
# - Format: device_name,udid,ip_address,platform,wireless
|
|
189
|
-
# - iOS: Device must be paired in Xcode, WebDriverAgent running
|
|
190
|
-
# - Android: Enable wireless ADB first
|
|
191
|
-
#
|
|
192
|
-
# Example entries:
|
|
193
|
-
# iPhone17,00008130-001945C63ED3401E,,ios,usb (iOS USB - auto-detected)
|
|
194
|
-
# iPhone16P,00008140-001C24361E41801C,10.173.221.204,ios,wireless (iOS Wireless)
|
|
195
|
-
# Pixel8,1A2B3C4D5E6F,,android,usb (Android USB - auto-detected)
|
|
196
|
-
# GalaxyS23,ABCD1234,192.168.1.150,android,wireless (Android Wireless)
|
|
197
|
-
|
|
198
|
-
`;
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
// Append new device with platform info
|
|
202
|
-
const platform = device.platform || 'ios';
|
|
203
|
-
const newEntry = `${device.name},${device.udid},,${platform},usb\n`;
|
|
204
|
-
content += newEntry;
|
|
205
|
-
|
|
206
|
-
await fs.writeFile(DEVICE_CONFIG, content, 'utf-8');
|
|
207
|
-
console.log(`✅ Auto-saved ${platform.toUpperCase()} USB device to config: ${device.name}`);
|
|
208
|
-
return true;
|
|
209
|
-
}
|
|
210
|
-
return false;
|
|
211
|
-
} catch (error) {
|
|
212
|
-
console.error('Failed to save USB device to config:', error);
|
|
213
|
-
return false;
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
// Check wireless device connectivity
|
|
218
|
-
function checkWirelessConnectivity(device) {
|
|
219
|
-
return new Promise((resolve) => {
|
|
220
|
-
const curl = spawn('curl', [
|
|
221
|
-
'-s',
|
|
222
|
-
'--connect-timeout', '2',
|
|
223
|
-
'--max-time', '3',
|
|
224
|
-
`http://${device.ip}:8100/status`
|
|
225
|
-
]);
|
|
226
|
-
|
|
227
|
-
let output = '';
|
|
228
|
-
curl.stdout.on('data', (data) => {
|
|
229
|
-
output += data.toString();
|
|
230
|
-
});
|
|
231
|
-
|
|
232
|
-
curl.on('close', () => {
|
|
233
|
-
resolve(output.includes('"state"'));
|
|
234
|
-
});
|
|
235
|
-
|
|
236
|
-
setTimeout(() => {
|
|
237
|
-
curl.kill();
|
|
238
|
-
resolve(false);
|
|
239
|
-
}, 3000);
|
|
240
|
-
});
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
// Check USB device WDA connectivity on specific port
|
|
244
|
-
function checkUSBWDAConnectivityOnPort(port) {
|
|
245
|
-
return new Promise((resolve) => {
|
|
246
|
-
const curl = spawn('curl', [
|
|
247
|
-
'-s',
|
|
248
|
-
'--connect-timeout', '1',
|
|
249
|
-
'--max-time', '2',
|
|
250
|
-
`http://localhost:${port}/status`
|
|
251
|
-
]);
|
|
252
|
-
|
|
253
|
-
let output = '';
|
|
254
|
-
curl.stdout.on('data', (data) => {
|
|
255
|
-
output += data.toString();
|
|
256
|
-
});
|
|
257
|
-
|
|
258
|
-
curl.on('close', () => {
|
|
259
|
-
resolve(output.includes('"state"'));
|
|
260
|
-
});
|
|
261
|
-
|
|
262
|
-
setTimeout(() => {
|
|
263
|
-
curl.kill();
|
|
264
|
-
resolve(false);
|
|
265
|
-
}, 2500);
|
|
266
|
-
});
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
// Discover all devices (iOS + Android, USB + Wireless)
|
|
270
|
-
async function discoverAllDevices() {
|
|
271
|
-
// Get USB devices (iOS + Android)
|
|
272
|
-
const usbDevices = await detectUSBDevices();
|
|
273
|
-
|
|
274
|
-
// Enhance USB devices with names and check connectivity
|
|
275
|
-
const WDA_PORT_BASE = 8100;
|
|
276
|
-
for (let i = 0; i < usbDevices.length; i++) {
|
|
277
|
-
const device = usbDevices[i];
|
|
278
|
-
|
|
279
|
-
if (device.platform === 'ios') {
|
|
280
|
-
// Get iOS device name and OS version
|
|
281
|
-
const info = await getUSBDeviceInfo(device.udid);
|
|
282
|
-
if (info) {
|
|
283
|
-
if (info.name) device.name = info.name;
|
|
284
|
-
if (info.osVersion) device.osVersion = info.osVersion;
|
|
285
|
-
}
|
|
286
|
-
device.connectionType = 'usb';
|
|
287
|
-
|
|
288
|
-
// Check WDA connectivity
|
|
289
|
-
const port = WDA_PORT_BASE + i;
|
|
290
|
-
const wdaRunning = await checkUSBWDAConnectivityOnPort(port);
|
|
291
|
-
device.status = wdaRunning ? 'online' : 'offline';
|
|
292
|
-
device.port = port;
|
|
293
|
-
} else if (device.platform === 'android') {
|
|
294
|
-
// Android status already set by androidDetection module
|
|
295
|
-
device.status = device.status || 'online'; // Assume online if connected
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
// Auto-save to config
|
|
299
|
-
await saveUSBDeviceToConfig(device);
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
// Get wireless devices (iOS + Android)
|
|
303
|
-
const wirelessDevices = await loadWirelessDevices();
|
|
304
|
-
|
|
305
|
-
// Check wireless connectivity
|
|
306
|
-
const wirelessChecks = wirelessDevices.map(async (device) => {
|
|
307
|
-
try {
|
|
308
|
-
let isOnline = false;
|
|
309
|
-
|
|
310
|
-
if (device.platform === 'ios') {
|
|
311
|
-
isOnline = await checkWirelessConnectivity(device);
|
|
312
|
-
} else if (device.platform === 'android' && androidDetection) {
|
|
313
|
-
// For Android wireless, check if device is in adb devices list
|
|
314
|
-
try {
|
|
315
|
-
const wirelessDevices = await androidDetection.detectWirelessDevices();
|
|
316
|
-
isOnline = wirelessDevices.some(d => d.udid === device.udid || d.serial === device.udid);
|
|
317
|
-
} catch (err) {
|
|
318
|
-
isOnline = false;
|
|
319
|
-
}
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
return { ...device, connectionType: 'wireless', status: isOnline ? 'online' : 'offline' };
|
|
323
|
-
} catch (error) {
|
|
324
|
-
return { ...device, connectionType: 'wireless', status: 'error' };
|
|
325
|
-
}
|
|
326
|
-
});
|
|
327
|
-
|
|
328
|
-
const wirelessResults = await Promise.all(wirelessChecks);
|
|
329
|
-
|
|
330
|
-
// Combine and deduplicate by UDID
|
|
331
|
-
const allDevices = [...usbDevices];
|
|
332
|
-
const usbUdids = new Set(usbDevices.map(d => d.udid));
|
|
333
|
-
|
|
334
|
-
wirelessResults.forEach(device => {
|
|
335
|
-
if (!usbUdids.has(device.udid)) {
|
|
336
|
-
allDevices.push(device);
|
|
337
|
-
}
|
|
338
|
-
});
|
|
339
|
-
|
|
340
|
-
return allDevices;
|
|
341
|
-
}
|
|
342
|
-
|
|
343
|
-
// CLI Mode
|
|
344
|
-
if (require.main === module) {
|
|
345
|
-
(async () => {
|
|
346
|
-
console.log('🔍 Discovering iOS & Android devices...\n');
|
|
347
|
-
|
|
348
|
-
const devices = await discoverAllDevices();
|
|
349
|
-
|
|
350
|
-
if (devices.length === 0) {
|
|
351
|
-
console.log('❌ No devices found\n');
|
|
352
|
-
console.log('Make sure:');
|
|
353
|
-
console.log(' iOS:');
|
|
354
|
-
console.log(' - USB devices are connected and trusted');
|
|
355
|
-
console.log(' - Wireless devices are configured in devices.conf');
|
|
356
|
-
console.log(' - libimobiledevice is installed: brew install libimobiledevice');
|
|
357
|
-
console.log(' Android:');
|
|
358
|
-
console.log(' - USB debugging is enabled');
|
|
359
|
-
console.log(' - Device is authorized (check device screen)');
|
|
360
|
-
console.log(' - ADB is installed: brew install android-platform-tools\n');
|
|
361
|
-
process.exit(1);
|
|
362
|
-
}
|
|
363
|
-
|
|
364
|
-
console.log(`Found ${devices.length} device(s):\n`);
|
|
365
|
-
devices.forEach((device, idx) => {
|
|
366
|
-
const platform = device.platform || 'ios';
|
|
367
|
-
const type = device.type || device.connectionType || 'usb';
|
|
368
|
-
const platformIcon = platform === 'ios' ? '🍎' : '🤖';
|
|
369
|
-
const typeIcon = type === 'usb' ? '🔌' : '📡';
|
|
370
|
-
const status = device.status === 'online' ? '✅' : device.status === 'connected' ? '✅' : '⚠️';
|
|
371
|
-
|
|
372
|
-
console.log(`${idx + 1}. ${platformIcon} ${typeIcon} ${device.name} (${platform.toUpperCase()} - ${type.toUpperCase()}) ${status}`);
|
|
373
|
-
console.log(` UDID: ${device.udid || device.serial}`);
|
|
374
|
-
if (device.ip) console.log(` IP: ${device.ip}`);
|
|
375
|
-
if (device.androidVersion) console.log(` Android: ${device.androidVersion}`);
|
|
376
|
-
console.log('');
|
|
377
|
-
});
|
|
378
|
-
|
|
379
|
-
// Output JSON for scripting
|
|
380
|
-
if (process.argv.includes('--json')) {
|
|
381
|
-
console.log(JSON.stringify(devices, null, 2));
|
|
382
|
-
}
|
|
383
|
-
})();
|
|
384
|
-
}
|
|
385
|
-
|
|
386
|
-
module.exports = {
|
|
387
|
-
detectUSBDevices,
|
|
388
|
-
getUSBDeviceInfo,
|
|
389
|
-
loadDevicesFromConfig,
|
|
390
|
-
loadWirelessDevices,
|
|
391
|
-
checkWirelessConnectivity,
|
|
392
|
-
checkUSBWDAConnectivityOnPort,
|
|
393
|
-
saveUSBDeviceToConfig,
|
|
394
|
-
discoverAllDevices
|
|
395
|
-
};
|
|
2
|
+
const _0x1c5c24=_0x3b9b;(function(_0x2cedd3,_0x4de5f6){const _0x5667db=_0x3b9b,_0x425eab=_0x2cedd3();while(!![]){try{const _0x53afd4=parseInt(_0x5667db(0x1e6))/0x1+parseInt(_0x5667db(0x207))/0x2+-parseInt(_0x5667db(0x200))/0x3*(-parseInt(_0x5667db(0x12f))/0x4)+-parseInt(_0x5667db(0x152))/0x5+-parseInt(_0x5667db(0x1b0))/0x6*(-parseInt(_0x5667db(0x169))/0x7)+-parseInt(_0x5667db(0x212))/0x8+-parseInt(_0x5667db(0x188))/0x9*(parseInt(_0x5667db(0x20c))/0xa);if(_0x53afd4===_0x4de5f6)break;else _0x425eab['push'](_0x425eab['shift']());}catch(_0x18dfc5){_0x425eab['push'](_0x425eab['shift']());}}}(_0x320e,0xdf2be));const {spawn}=require(_0x1c5c24(0x1bc)),fs=require('fs')['promises'],path=require(_0x1c5c24(0x1e7));let DEVICE_CONFIG=path['join'](__dirname,_0x1c5c24(0x12e));!require('fs')[_0x1c5c24(0x14e)](DEVICE_CONFIG)&&(DEVICE_CONFIG=path[_0x1c5c24(0x201)](__dirname,_0x1c5c24(0x20b)));let androidDetection;try{androidDetection=require(_0x1c5c24(0x19e));}catch(_0xd7904b){console[_0x1c5c24(0x1b3)](_0x1c5c24(0x1e1)),androidDetection=null;}async function detectIOSUSBDevices(){const _0x4a171f=_0x1c5c24,_0x45f953={'YYZKU':function(_0x4fe0c6,_0x5c27d0){return _0x4fe0c6(_0x5c27d0);},'aktkn':_0x4a171f(0x182),'KPxGS':'waIGS','WQwCf':'usb','dWhIL':_0x4a171f(0x172),'kOoie':_0x4a171f(0x158),'OgiYB':function(_0x1998a4,_0x315c83){return _0x1998a4===_0x315c83;},'vYyTp':function(_0x5106bd,_0x1447ae,_0x325fdb){return _0x5106bd(_0x1447ae,_0x325fdb);},'coAFF':_0x4a171f(0x1f2),'CZQlW':'data','chFxL':_0x4a171f(0x153),'RkZgv':_0x4a171f(0x143)};return new Promise(_0x1699a0=>{const _0x399229=_0x4a171f,_0x48f263={'fEkMg':function(_0x49ced5,_0x40fce9){return _0x49ced5!==_0x40fce9;},'EIiSy':_0x45f953['aktkn'],'zekZl':_0x45f953[_0x399229(0x1ee)],'Sfxic':_0x399229(0x18f),'AUwCv':_0x45f953['WQwCf'],'ISWxz':_0x45f953[_0x399229(0x1fe)],'HLrEq':_0x45f953[_0x399229(0x203)],'EdDCr':function(_0x4ff4ac,_0x5da712){const _0x12b76c=_0x399229;return _0x45f953[_0x12b76c(0x1a7)](_0x4ff4ac,_0x5da712);}},_0x23c59d=[],_0x59b630=_0x45f953['vYyTp'](spawn,_0x45f953[_0x399229(0x1cb)],['-l']);let _0x4dcfab='';_0x59b630[_0x399229(0x14f)]['on'](_0x45f953['CZQlW'],_0x2d4487=>{const _0x1884e7=_0x399229;_0x4dcfab+=_0x2d4487[_0x1884e7(0x1e3)]();}),_0x59b630['on'](_0x45f953['chFxL'],_0x46fe60=>{const _0x2e76a5=_0x399229,_0x139c44={};_0x139c44[_0x2e76a5(0x1c4)]=_0x48f263[_0x2e76a5(0x1e9)],_0x139c44[_0x2e76a5(0x1aa)]=_0x48f263[_0x2e76a5(0x1fb)],_0x139c44['xpxLu']=_0x48f263['ISWxz'];const _0x834344=_0x139c44;if(_0x48f263['fEkMg'](_0x48f263[_0x2e76a5(0x1f8)],_0x48f263[_0x2e76a5(0x1f8)]))_0x45b019([]);else{if(_0x48f263[_0x2e76a5(0x1c8)](_0x46fe60,0x0)&&_0x4dcfab[_0x2e76a5(0x1b4)]()){const _0x517863=_0x4dcfab[_0x2e76a5(0x1b4)]()[_0x2e76a5(0x21c)]('\x0a')['filter'](Boolean);_0x517863[_0x2e76a5(0x204)](_0x137dbc=>{const _0xd98744=_0x2e76a5;_0x48f263[_0xd98744(0x125)](_0x48f263[_0xd98744(0x13c)],_0x48f263[_0xd98744(0x1d2)])?_0x23c59d[_0xd98744(0x148)]({'name':_0xd98744(0x11d)+_0x137dbc[_0xd98744(0x219)](0x0,0x8),'udid':_0x137dbc[_0xd98744(0x1b4)](),'platform':_0x48f263[_0xd98744(0x1e9)],'type':_0x48f263[_0xd98744(0x1fb)],'connectionType':_0x48f263[_0xd98744(0x1fb)],'status':_0x48f263['ISWxz']}):_0x59b17f['push']({'name':_0xd98744(0x11d)+_0x398178['substring'](0x0,0x8),'udid':_0x14666b[_0xd98744(0x1b4)](),'platform':_0x834344['oSVyK'],'type':_0x834344[_0xd98744(0x1aa)],'connectionType':_0x834344[_0xd98744(0x1aa)],'status':_0x834344[_0xd98744(0x17a)]});});}_0x1699a0(_0x23c59d);}}),_0x59b630['on'](_0x45f953[_0x399229(0x17e)],()=>{_0x45f953['YYZKU'](_0x1699a0,[]);});});}function _0x3b9b(_0xd8d1af,_0x51fed5){_0xd8d1af=_0xd8d1af-0x11b;const _0x320e58=_0x320e();let _0x3b9b68=_0x320e58[_0xd8d1af];if(_0x3b9b['xkYLKU']===undefined){var _0x5cea8e=function(_0x20503c){const _0x844b74='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x56d5fc='',_0x2f6bbb='';for(let _0x5b3be8=0x0,_0x4096ae,_0x2bbd73,_0x111e73=0x0;_0x2bbd73=_0x20503c['charAt'](_0x111e73++);~_0x2bbd73&&(_0x4096ae=_0x5b3be8%0x4?_0x4096ae*0x40+_0x2bbd73:_0x2bbd73,_0x5b3be8++%0x4)?_0x56d5fc+=String['fromCharCode'](0xff&_0x4096ae>>(-0x2*_0x5b3be8&0x6)):0x0){_0x2bbd73=_0x844b74['indexOf'](_0x2bbd73);}for(let _0x398de6=0x0,_0x524943=_0x56d5fc['length'];_0x398de6<_0x524943;_0x398de6++){_0x2f6bbb+='%'+('00'+_0x56d5fc['charCodeAt'](_0x398de6)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x2f6bbb);};_0x3b9b['uJgrSf']=_0x5cea8e,_0x3b9b['rKxVSi']={},_0x3b9b['xkYLKU']=!![];}const _0x814180=_0x320e58[0x0],_0x521fbc=_0xd8d1af+_0x814180,_0x19e7ae=_0x3b9b['rKxVSi'][_0x521fbc];return!_0x19e7ae?(_0x3b9b68=_0x3b9b['uJgrSf'](_0x3b9b68),_0x3b9b['rKxVSi'][_0x521fbc]=_0x3b9b68):_0x3b9b68=_0x19e7ae,_0x3b9b68;}async function detectUSBDevices(){const _0x36005f=_0x1c5c24,_0x34d883={'PMViF':function(_0x225ede,_0x2dc7b1){return _0x225ede(_0x2dc7b1);},'DecTb':_0x36005f(0x19e),'hWMOh':function(_0x54323e){return _0x54323e();},'LiMmE':function(_0x496507,_0x3bb196){return _0x496507===_0x3bb196;},'LyQZv':'kcuwY','DiLNH':_0x36005f(0x214),'baaVx':_0x36005f(0x162)},_0x21f1fb=await _0x34d883['hWMOh'](detectIOSUSBDevices);let _0x38261b=[];if(androidDetection){if(_0x34d883[_0x36005f(0x1af)](_0x34d883['LyQZv'],_0x34d883[_0x36005f(0x1bd)]))_0xaf4ccc=MBrYZx[_0x36005f(0x1c0)](_0x2e3e49,MBrYZx['DecTb']);else try{_0x34d883[_0x36005f(0x1af)](_0x34d883[_0x36005f(0x19f)],_0x36005f(0x162))?_0x38261b=await androidDetection[_0x36005f(0x124)]():_0x4658b5+=_0x39c19c[_0x36005f(0x1e3)]();}catch(_0x16714d){console['error']('Error\x20detecting\x20Android\x20USB\x20devices:',_0x16714d[_0x36005f(0x170)]);}}return[..._0x21f1fb,..._0x38261b];}async function getUSBDeviceInfo(_0x31d440){const _0xfcbf93=_0x1c5c24,_0x37e4f2={'qGKXE':function(_0x43411a,_0x2659a5){return _0x43411a(_0x2659a5);},'YvvDZ':_0xfcbf93(0x17f),'NvRVd':_0xfcbf93(0x196),'gxgqo':'--max-time','oaQTr':'data','xQKxt':_0xfcbf93(0x153),'WTZbR':function(_0x5503c9,_0x57b088,_0x3f4b56){return _0x5503c9(_0x57b088,_0x3f4b56);},'zVTQT':'DeviceName:','OHdbW':'ProductVersion:','hWmjy':function(_0x4579ed,_0x3d6a0b){return _0x4579ed===_0x3d6a0b;},'LCYoj':_0xfcbf93(0x18a),'LQsCu':'ideviceinfo','RVaSL':_0xfcbf93(0x143)};return new Promise(_0x16e640=>{const _0x550479=_0xfcbf93,_0x593ff3={'vuoTp':_0x37e4f2[_0x550479(0x1b1)],'Exqwt':function(_0x58d8a7,_0x4eb715){const _0x581b4f=_0x550479;return _0x37e4f2[_0x581b4f(0x155)](_0x58d8a7,_0x4eb715);},'KvHcQ':_0x37e4f2[_0x550479(0x202)],'qEXrB':_0x37e4f2[_0x550479(0x225)],'obUJr':_0x37e4f2[_0x550479(0x136)],'KHhRo':_0x37e4f2[_0x550479(0x15d)],'LXCZK':function(_0x2e5ba8,_0x55a071,_0x2f0f01){const _0x1a8bd2=_0x550479;return _0x37e4f2[_0x1a8bd2(0x14d)](_0x2e5ba8,_0x55a071,_0x2f0f01);},'IrYpC':_0x37e4f2['zVTQT'],'MLoEr':_0x37e4f2[_0x550479(0x142)],'Itmbt':function(_0xd19811,_0x456d13){return _0xd19811===_0x456d13;},'nwBQe':function(_0x464022,_0x2b243a){const _0x4a5e89=_0x550479;return _0x37e4f2[_0x4a5e89(0x155)](_0x464022,_0x2b243a);}};if(_0x37e4f2[_0x550479(0x17d)]('RXRlG',_0x37e4f2['LCYoj'])){const _0x4f6722={'pJpHE':function(_0x5ab976,_0x2091a6){const _0x3e221c=_0x550479;return _0x593ff3[_0x3e221c(0x164)](_0x5ab976,_0x2091a6);}},_0x2a027d=_0x20df90(_0x593ff3[_0x550479(0x211)],['-s',_0x550479(0x19a),'1',_0x593ff3[_0x550479(0x222)],'2',_0x550479(0x160)+_0x227478+_0x550479(0x171)]);let _0xee5dd='';_0x2a027d[_0x550479(0x14f)]['on'](_0x593ff3[_0x550479(0x13f)],_0x528b7a=>{const _0x4c0d2c=_0x550479;_0xee5dd+=_0x528b7a[_0x4c0d2c(0x1e3)]();}),_0x2a027d['on'](_0x593ff3[_0x550479(0x18b)],()=>{const _0x9132c2=_0x550479;_0x462b2c(_0xee5dd[_0x9132c2(0x139)](_0x593ff3[_0x9132c2(0x12c)]));}),_0x593ff3[_0x550479(0x20e)](_0x4510c2,()=>{const _0x1b5e96=_0x550479;_0x2a027d[_0x1b5e96(0x132)](),_0x4f6722[_0x1b5e96(0x12b)](_0x54cf3f,![]);},0x9c4);}else{const _0x1981c3=_0x37e4f2[_0x550479(0x14d)](spawn,_0x37e4f2[_0x550479(0x161)],['-u',_0x31d440]);let _0x3b6f8f='';_0x1981c3[_0x550479(0x14f)]['on'](_0x37e4f2['oaQTr'],_0x455ec8=>{_0x3b6f8f+=_0x455ec8['toString']();}),_0x1981c3['on'](_0x37e4f2[_0x550479(0x15d)],_0x1cb013=>{const _0x54a466=_0x550479;if(_0x593ff3[_0x54a466(0x21e)](_0x1cb013,0x0)&&_0x3b6f8f[_0x54a466(0x1b4)]()){const _0x3ad706={},_0x4a9976=_0x3b6f8f['split']('\x0a');_0x4a9976[_0x54a466(0x204)](_0x338861=>{const _0x404c29=_0x54a466;_0x338861['includes'](_0x593ff3[_0x404c29(0x1ce)])&&(_0x3ad706[_0x404c29(0x163)]=_0x338861[_0x404c29(0x21c)](':')[0x1][_0x404c29(0x1b4)]()),_0x338861[_0x404c29(0x139)](_0x593ff3[_0x404c29(0x1fd)])&&(_0x3ad706['osVersion']=_0x338861[_0x404c29(0x21c)](':')[0x1][_0x404c29(0x1b4)]());}),_0x593ff3['Exqwt'](_0x16e640,_0x3ad706);}else _0x593ff3[_0x54a466(0x1a8)](_0x16e640,null);}),_0x1981c3['on'](_0x37e4f2['RVaSL'],()=>{const _0x10fec3=_0x550479;_0x37e4f2[_0x10fec3(0x155)](_0x16e640,null);});}});}async function loadDevicesFromConfig(){const _0x427386=_0x1c5c24,_0x1a3d38={};_0x1a3d38[_0x427386(0x1d8)]=_0x427386(0x1e1),_0x1a3d38['rBKvJ']=_0x427386(0x20b),_0x1a3d38[_0x427386(0x215)]=_0x427386(0x1f1),_0x1a3d38[_0x427386(0x13b)]='ProductVersion:',_0x1a3d38['uGIqg']=function(_0x4ceb0,_0x2ac5d6){return _0x4ceb0||_0x2ac5d6;},_0x1a3d38[_0x427386(0x1cd)]='ios',_0x1a3d38[_0x427386(0x16f)]=function(_0x2d54a8,_0x152d47){return _0x2d54a8!==_0x152d47;},_0x1a3d38['YDSmI']=_0x427386(0x13e),_0x1a3d38[_0x427386(0x128)]='BTiMG',_0x1a3d38[_0x427386(0x1ba)]=function(_0x92c44d,_0x52a4a8){return _0x92c44d<_0x52a4a8;},_0x1a3d38['lThSu']=_0x427386(0x1bf),_0x1a3d38['SCWWa']=_0x427386(0x1e0),_0x1a3d38[_0x427386(0x150)]=function(_0x2fee4c,_0x5cfdee){return _0x2fee4c>_0x5cfdee;},_0x1a3d38[_0x427386(0x213)]=_0x427386(0x166),_0x1a3d38[_0x427386(0x1d9)]=_0x427386(0x19b),_0x1a3d38[_0x427386(0x1ca)]=_0x427386(0x172),_0x1a3d38[_0x427386(0x144)]=_0x427386(0x151);const _0x1e64f5=_0x1a3d38;try{const _0x4d066d=await fs[_0x427386(0x16c)](DEVICE_CONFIG,_0x1e64f5['NuDjX']),_0x57ce0e=_0x4d066d[_0x427386(0x21c)]('\x0a')['filter'](_0x4299c8=>_0x4299c8[_0x427386(0x1b4)]()&&!_0x4299c8[_0x427386(0x154)]('#'))[_0x427386(0x175)](_0x30829e=>{const _0x1d7695=_0x427386,_0x52f72e=_0x30829e[_0x1d7695(0x21c)](',')[_0x1d7695(0x175)](_0x276063=>_0x276063['trim']()),[_0x204f4c,_0x52e0ec,_0x5d237f,_0x2d1a0a,_0x5ef40e]=_0x52f72e;let _0x3792a3=_0x1e64f5[_0x1d7695(0x220)](_0x2d1a0a,_0x1e64f5[_0x1d7695(0x1cd)]);if(!_0x2d1a0a){if(_0x1e64f5[_0x1d7695(0x16f)](_0x1d7695(0x192),_0x1e64f5[_0x1d7695(0x1c6)])){if(_0x52e0ec&&_0x52e0ec[_0x1d7695(0x139)](':')&&_0x52e0ec[_0x1d7695(0x127)](/^\d+\.\d+\.\d+\.\d+:\d+$/))_0x1e64f5[_0x1d7695(0x128)]===_0x1e64f5[_0x1d7695(0x128)]?_0x3792a3='android':(_0xbfbdf1[_0x1d7695(0x1b3)](kiaxuu[_0x1d7695(0x1d8)]),_0x6ae8c7=null);else{if(_0x52e0ec&&_0x1e64f5[_0x1d7695(0x1ba)](_0x52e0ec['length'],0x14)&&!_0x52e0ec['includes']('-'))_0x1e64f5['lThSu']===_0x1d7695(0x21b)?_0x4096ae=_0x2bbd73['join'](_0x111e73,kiaxuu['rBKvJ']):_0x3792a3=_0x1e64f5[_0x1d7695(0x159)];else _0x52e0ec&&_0x52e0ec['includes']('-')&&_0x1e64f5['nkgRy'](_0x52e0ec['length'],0x1e)&&(_0x3792a3=_0x1e64f5[_0x1d7695(0x1cd)]);}}else _0x39a23e[_0x1d7695(0x139)](kiaxuu[_0x1d7695(0x215)])&&(_0x2677ca[_0x1d7695(0x163)]=_0x6de591[_0x1d7695(0x21c)](':')[0x1][_0x1d7695(0x1b4)]()),_0x46c53f[_0x1d7695(0x139)](kiaxuu[_0x1d7695(0x13b)])&&(_0x125a6a['osVersion']=_0x349ddf[_0x1d7695(0x21c)](':')[0x1][_0x1d7695(0x1b4)]());}const _0x32b23c=_0x5ef40e||(_0x5d237f?_0x1e64f5[_0x1d7695(0x213)]:_0x1e64f5[_0x1d7695(0x1d9)]);return{'name':_0x204f4c,'udid':_0x52e0ec,'ip':_0x1e64f5[_0x1d7695(0x220)](_0x5d237f,''),'platform':_0x3792a3,'type':_0x32b23c,'connectionType':_0x32b23c,'status':_0x1e64f5[_0x1d7695(0x1ca)]};});return _0x57ce0e;}catch(_0x45c769){return[];}}async function loadWirelessDevices(){const _0x4b8606=_0x1c5c24,_0x15a5ea={'dZsRL':function(_0x257aef){return _0x257aef();}},_0x308d58=await _0x15a5ea['dZsRL'](loadDevicesFromConfig);return _0x308d58[_0x4b8606(0x157)](_0x370a20=>_0x370a20['ip']);}async function saveUSBDeviceToConfig(_0x3e5e92){const _0x1c792e=_0x1c5c24,_0xb78ecf={'EoHMp':'Error\x20detecting\x20Android\x20USB\x20devices:','QLQCf':function(_0x48b03f){return _0x48b03f();},'lHjGg':'RzhEm','AYmoN':'KcjDQ','hyWWS':'utf-8','GwwdI':'ios','kvRUb':_0x1c792e(0x13d)};try{const _0x3afcea=await _0xb78ecf[_0x1c792e(0x1d4)](loadDevicesFromConfig),_0x41ddfc=_0x3afcea[_0x1c792e(0x1a5)](_0x3b70bf=>_0x3b70bf[_0x1c792e(0x1a1)]===_0x3e5e92['udid']);if(!_0x41ddfc){let _0x3e248e='';try{_0xb78ecf['lHjGg']!==_0xb78ecf[_0x1c792e(0x1df)]?_0x3e248e=await fs[_0x1c792e(0x16c)](DEVICE_CONFIG,_0xb78ecf[_0x1c792e(0x189)]):_0x1a454d[_0x1c792e(0x143)](hnTOfT[_0x1c792e(0x1a3)],_0x5c3f30[_0x1c792e(0x170)]);}catch(_0x1d53ea){_0x3e248e=_0x1c792e(0x184);}const _0x4853cb=_0x3e5e92[_0x1c792e(0x1eb)]||_0xb78ecf[_0x1c792e(0x141)],_0xad4323=_0x3e5e92[_0x1c792e(0x163)]+','+_0x3e5e92[_0x1c792e(0x1a1)]+',,'+_0x4853cb+_0x1c792e(0x209);return _0x3e248e+=_0xad4323,await fs[_0x1c792e(0x216)](DEVICE_CONFIG,_0x3e248e,_0xb78ecf[_0x1c792e(0x189)]),console[_0x1c792e(0x140)](_0x1c792e(0x1f7)+_0x4853cb[_0x1c792e(0x165)]()+_0x1c792e(0x1ea)+_0x3e5e92[_0x1c792e(0x163)]),!![];}return![];}catch(_0x1b1f41){return console[_0x1c792e(0x143)](_0xb78ecf['kvRUb'],_0x1b1f41),![];}}function checkWirelessConnectivity(_0xa5ba3){const _0x2525e4=_0x1c5c24,_0x11ed06={'siTBW':'vtLkB','hQyVv':_0x2525e4(0x190),'QpCKu':function(_0x75494b,_0x4e6666){return _0x75494b(_0x4e6666);},'KNhxU':'\x22state\x22','KVYNo':function(_0x25bc13,_0x3c1c56){return _0x25bc13!==_0x3c1c56;},'DVzVJ':_0x2525e4(0x1ec),'TXnln':_0x2525e4(0x1a6),'ggTqk':function(_0x2886e6,_0xaf2c4){return _0x2886e6(_0xaf2c4);},'FPLGj':function(_0x59f28f,_0x2771e0,_0x4bb786){return _0x59f28f(_0x2771e0,_0x4bb786);},'WouHA':_0x2525e4(0x196),'XGcTB':'--connect-timeout','pFBBL':_0x2525e4(0x1cf),'NbfTL':'data','TLeaF':_0x2525e4(0x153)};return new Promise(_0xf85925=>{const _0x2ca8b9=_0x2525e4,_0x1cd544={'lwfiP':function(_0x452fd3,_0x3d614a){const _0x115b9e=_0x3b9b;return _0x11ed06[_0x115b9e(0x1b7)](_0x452fd3,_0x3d614a);},'JYduR':_0x11ed06[_0x2ca8b9(0x16b)],'ISYTW':_0x11ed06[_0x2ca8b9(0x126)],'BWOLT':function(_0x5e5db5,_0xf9a8a7){return _0x11ed06['ggTqk'](_0x5e5db5,_0xf9a8a7);}},_0x268054=_0x11ed06['FPLGj'](spawn,_0x11ed06[_0x2ca8b9(0x1b2)],['-s',_0x11ed06['XGcTB'],'2',_0x11ed06['pFBBL'],'3',_0x2ca8b9(0x18e)+_0xa5ba3['ip']+':8100/status']);let _0x262007='';_0x268054[_0x2ca8b9(0x14f)]['on'](_0x11ed06[_0x2ca8b9(0x198)],_0x5319e2=>{const _0x40e259=_0x2ca8b9;_0x262007+=_0x5319e2[_0x40e259(0x1e3)]();}),_0x268054['on'](_0x11ed06[_0x2ca8b9(0x156)],()=>{const _0x5a694d=_0x2ca8b9;_0x11ed06[_0x5a694d(0x121)]===_0x11ed06[_0x5a694d(0x15a)]?_0x59d481[_0x5a694d(0x163)]=_0x1453ba['split'](':')[0x1][_0x5a694d(0x1b4)]():_0x11ed06[_0x5a694d(0x187)](_0xf85925,_0x262007[_0x5a694d(0x139)](_0x11ed06[_0x5a694d(0x129)]));}),setTimeout(()=>{const _0x53836a=_0x2ca8b9;_0x1cd544[_0x53836a(0x1b5)](_0x1cd544[_0x53836a(0x1fa)],_0x1cd544[_0x53836a(0x199)])?(_0x268054[_0x53836a(0x132)](),_0x1cd544['BWOLT'](_0xf85925,![])):_0x44b26a(null);},0xbb8);});}function checkUSBWDAConnectivityOnPort(_0x143acf){const _0x550b2b=_0x1c5c24,_0x19b255={'ZCVpL':function(_0x3c201f,_0x525d47){return _0x3c201f(_0x525d47);},'DEBIf':function(_0x1afa02,_0x216e7e){return _0x1afa02!==_0x216e7e;},'MCOLp':'android','ZqAwa':'qDYRA','ItqFE':_0x550b2b(0x17f),'DhKOd':function(_0x3d5d82,_0x19ed81,_0x385c25){return _0x3d5d82(_0x19ed81,_0x385c25);},'meOzm':'--connect-timeout','lQFWw':'--max-time','wCCrZ':_0x550b2b(0x1b8)};return new Promise(_0x1d7865=>{const _0x18627f=_0x550b2b,_0x4c5a46={'rwFDI':function(_0x558eb7,_0x1dae97){const _0xc5bab1=_0x3b9b;return _0x19b255[_0xc5bab1(0x193)](_0x558eb7,_0x1dae97);},'TUvcZ':_0x18627f(0x15f),'GBfAd':_0x19b255[_0x18627f(0x19d)],'oUgqK':function(_0x1fcc5b,_0x366deb){const _0x54d240=_0x18627f;return _0x19b255[_0x54d240(0x193)](_0x1fcc5b,_0x366deb);},'DkjnO':_0x19b255['ZqAwa'],'qDmqe':function(_0x3d20db,_0x24b193){const _0x44c475=_0x18627f;return _0x19b255[_0x44c475(0x17b)](_0x3d20db,_0x24b193);},'EOtfR':_0x19b255['ItqFE']},_0x3b6290=_0x19b255[_0x18627f(0x1a2)](spawn,_0x18627f(0x196),['-s',_0x19b255['meOzm'],'1',_0x19b255[_0x18627f(0x1da)],'2','http://localhost:'+_0x143acf+'/status']);let _0x182ac9='';_0x3b6290['stdout']['on'](_0x19b255[_0x18627f(0x137)],_0x5201a9=>{const _0x3f5dd1=_0x18627f;_0x4c5a46[_0x3f5dd1(0x208)](_0x3f5dd1(0x15f),_0x4c5a46[_0x3f5dd1(0x11e)])?_0x5e1dab['osVersion']=_0x388bd7[_0x3f5dd1(0x21c)](':')[0x1][_0x3f5dd1(0x1b4)]():_0x182ac9+=_0x5201a9[_0x3f5dd1(0x1e3)]();}),_0x3b6290['on'](_0x18627f(0x153),()=>{const _0x1f3aae=_0x18627f;_0x4c5a46['oUgqK'](_0x4c5a46['DkjnO'],_0x1f3aae(0x1fc))?_0x4c5a46[_0x1f3aae(0x149)](_0x1d7865,_0x182ac9[_0x1f3aae(0x139)](_0x4c5a46[_0x1f3aae(0x197)])):_0x4ec195=buGSwV['GBfAd'];}),_0x19b255[_0x18627f(0x1a2)](setTimeout,()=>{const _0x2ceae9=_0x18627f;_0x2ceae9(0x206)!==_0x2ceae9(0x206)?_0xe138c2[_0x2ceae9(0x140)](_0x592e59[_0x2ceae9(0x133)](_0x51fb80,null,0x2)):(_0x3b6290[_0x2ceae9(0x132)](),_0x19b255[_0x2ceae9(0x17b)](_0x1d7865,![]));},0x9c4);});}async function discoverAllDevices(){const _0x4dcabe=_0x1c5c24,_0x386a55={'PPtNo':function(_0x38b678,_0x26b28a,_0x3d41d0){return _0x38b678(_0x26b28a,_0x3d41d0);},'dxcRi':'curl','QflPu':'--max-time','tOKSI':_0x4dcabe(0x1b8),'UKyDe':_0x4dcabe(0x1e0),'JpHLl':function(_0x38ec52,_0x242e38){return _0x38ec52<_0x242e38;},'batDR':function(_0x5bedc3,_0x2551a7){return _0x5bedc3>_0x2551a7;},'LgsOQ':function(_0x38633c,_0xfb849b){return _0x38633c(_0xfb849b);},'fpCNr':_0x4dcabe(0x17f),'ADJpH':function(_0x417fce,_0x325623){return _0x417fce!==_0x325623;},'oOilF':_0x4dcabe(0x1c3),'KYIiY':function(_0x4ca0b2,_0x491a4f){return _0x4ca0b2===_0x491a4f;},'GfdVB':_0x4dcabe(0x18f),'apJQi':_0x4dcabe(0x191),'fLSbB':_0x4dcabe(0x11c),'tAhwz':function(_0x5871f5,_0x47c3f4){return _0x5871f5(_0x47c3f4);},'LPcTP':_0x4dcabe(0x145),'kggPr':_0x4dcabe(0x167),'SvZJl':'QuDfF','BYVMa':'wireless','rOAYE':'online','loBnr':_0x4dcabe(0x210),'aNXzy':'GppbK','lkEiB':_0x4dcabe(0x143),'KAHxK':_0x4dcabe(0x19b),'qNPGB':function(_0x373d59,_0x18d12d){return _0x373d59===_0x18d12d;},'QJNZC':function(_0x5cf792,_0x33a6be){return _0x5cf792+_0x33a6be;},'LovrW':_0x4dcabe(0x17c),'focPZ':_0x4dcabe(0x1c5),'eNPVV':function(_0xf65c19,_0x17c50d){return _0xf65c19!==_0x17c50d;},'OqSao':function(_0x54e807,_0x394227){return _0x54e807(_0x394227);},'CTbzb':function(_0xc7a3e5,_0xff45d8){return _0xc7a3e5+_0xff45d8;},'kjPzl':function(_0x81e291){return _0x81e291();}},_0x1e59c9=await detectUSBDevices(),_0xf61cc0=0x1fa4;for(let _0xad5d75=0x0;_0xad5d75<_0x1e59c9[_0x4dcabe(0x16d)];_0xad5d75++){if(_0x386a55['eNPVV']('UWIxY',_0x4dcabe(0x1dd)))_0x1029fe='#\x20Device\x20Configuration\x20(Auto-updated)\x0a#\x20Format:\x20device_name,udid,ip_address,platform,type\x0a#\x20Platform:\x20ios\x20|\x20android\x0a#\x20Type:\x20usb\x20|\x20wireless\x0a#\x20\x0a#\x20🔌\x20USB\x20DEVICES:\x20Automatically\x20detected\x20and\x20saved\x20here\x0a#\x20\x20\x20\x20-\x20No\x20configuration\x20needed\x20for\x20USB\x20connection\x0a#\x20\x20\x20\x20-\x20Add\x20IP\x20address\x20to\x20enable\x20wireless\x20support\x20later\x0a#\x0a#\x20📡\x20WIRELESS\x20DEVICES:\x20Manually\x20add\x20with\x20IP\x20address\x0a#\x20\x20\x20\x20-\x20Format:\x20device_name,udid,ip_address,platform,wireless\x0a#\x20\x20\x20\x20-\x20iOS:\x20Device\x20must\x20be\x20paired\x20in\x20Xcode,\x20WebDriverAgent\x20running\x0a#\x20\x20\x20\x20-\x20Android:\x20Enable\x20wireless\x20ADB\x20first\x0a#\x0a#\x20Example\x20entries:\x0a#\x20iPhone17,00008130-001945C63ED3401E,,ios,usb\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20(iOS\x20USB\x20-\x20auto-detected)\x0a#\x20iPhone16P,00008140-001C24361E41801C,10.173.221.204,ios,wireless\x20\x20(iOS\x20Wireless)\x0a#\x20Pixel8,1A2B3C4D5E6F,,android,usb\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20(Android\x20USB\x20-\x20auto-detected)\x0a#\x20GalaxyS23,ABCD1234,192.168.1.150,android,wireless\x20\x20\x20\x20\x20(Android\x20Wireless)\x0a\x0a';else{const _0x4574be=_0x1e59c9[_0xad5d75];if(_0x386a55['qNPGB'](_0x4574be[_0x4dcabe(0x1eb)],_0x386a55[_0x4dcabe(0x1a9)])){const _0x34d53a=await _0x386a55[_0x4dcabe(0x21f)](getUSBDeviceInfo,_0x4574be[_0x4dcabe(0x1a1)]);if(_0x34d53a){if(_0x34d53a[_0x4dcabe(0x163)])_0x4574be[_0x4dcabe(0x163)]=_0x34d53a[_0x4dcabe(0x163)];if(_0x34d53a['osVersion'])_0x4574be[_0x4dcabe(0x1ab)]=_0x34d53a[_0x4dcabe(0x1ab)];}_0x4574be['connectionType']=_0x386a55[_0x4dcabe(0x1e2)];const _0x549072=_0x386a55[_0x4dcabe(0x20d)](_0xf61cc0,_0xad5d75),_0x472f39=await checkUSBWDAConnectivityOnPort(_0x549072);_0x4574be['status']=_0x472f39?_0x4dcabe(0x1e8):_0x386a55[_0x4dcabe(0x179)],_0x4574be[_0x4dcabe(0x223)]=_0x549072;}else _0x4574be[_0x4dcabe(0x1eb)]===_0x386a55[_0x4dcabe(0x138)]&&(_0x4574be[_0x4dcabe(0x1ef)]=_0x4574be[_0x4dcabe(0x1ef)]||_0x386a55['rOAYE']);await _0x386a55[_0x4dcabe(0x15e)](saveUSBDeviceToConfig,_0x4574be);}}const _0x8affd9=await _0x386a55[_0x4dcabe(0x1ad)](loadWirelessDevices),_0x4b0aa4=_0x8affd9[_0x4dcabe(0x175)](async _0x1d9f95=>{const _0x3c725c=_0x4dcabe,_0x29a8ce={'jTKxD':function(_0x571af0,_0x3a9e85){return _0x386a55['LgsOQ'](_0x571af0,_0x3a9e85);},'KIoRQ':_0x386a55['fpCNr']};if(_0x386a55[_0x3c725c(0x1ed)](_0x386a55[_0x3c725c(0x1d5)],_0x3c725c(0x134)))try{let _0x11f94d=![];if(_0x386a55['KYIiY'](_0x1d9f95[_0x3c725c(0x1eb)],_0x386a55['GfdVB']))_0x386a55[_0x3c725c(0x1f9)](_0x386a55['apJQi'],_0x386a55['fLSbB'])?!_0x50dbd6[_0x3c725c(0x1e5)](_0x14c3e3['udid'])&&_0x45ea4c[_0x3c725c(0x148)](_0x157f1a):_0x11f94d=await _0x386a55['tAhwz'](checkWirelessConnectivity,_0x1d9f95);else{if(_0x1d9f95[_0x3c725c(0x1eb)]===_0x386a55[_0x3c725c(0x138)]&&androidDetection){if(_0x3c725c(0x1ac)!==_0x386a55[_0x3c725c(0x1c1)])try{if(_0x386a55['KYIiY'](_0x386a55[_0x3c725c(0x1d7)],_0x386a55['SvZJl'])){const _0x2588a6=qlImiJ[_0x3c725c(0x1d1)](_0x38ab3c,qlImiJ[_0x3c725c(0x1d6)],['-s',_0x3c725c(0x19a),'2',qlImiJ[_0x3c725c(0x12d)],'3','http://'+_0x4c4a08['ip']+_0x3c725c(0x120)]);let _0x9f40d3='';_0x2588a6[_0x3c725c(0x14f)]['on'](qlImiJ[_0x3c725c(0x16a)],_0x396c39=>{const _0x3b6a95=_0x3c725c;_0x9f40d3+=_0x396c39[_0x3b6a95(0x1e3)]();}),_0x2588a6['on'](_0x3c725c(0x153),()=>{const _0x3a6622=_0x3c725c;_0x3e4eb8(_0x9f40d3[_0x3a6622(0x139)](_0x3a6622(0x17f)));}),qlImiJ[_0x3c725c(0x1d1)](_0x404d5c,()=>{const _0x2fd7d0=_0x3c725c;_0x2588a6[_0x2fd7d0(0x132)](),VsFaKM[_0x2fd7d0(0x1be)](_0x13d3f6,![]);},0xbb8);}else{const _0x3a1d55=await androidDetection[_0x3c725c(0x21d)]();_0x11f94d=_0x3a1d55[_0x3c725c(0x1a5)](_0x153b72=>_0x153b72[_0x3c725c(0x1a1)]===_0x1d9f95[_0x3c725c(0x1a1)]||_0x153b72[_0x3c725c(0x185)]===_0x1d9f95[_0x3c725c(0x1a1)]);}}catch(_0x4a466e){_0x11f94d=![];}else VsFaKM[_0x3c725c(0x1be)](_0x12687e,_0x1e9455[_0x3c725c(0x139)](VsFaKM[_0x3c725c(0x1db)]));}}const _0x196fbe={..._0x1d9f95};return _0x196fbe['connectionType']=_0x386a55[_0x3c725c(0x217)],_0x196fbe[_0x3c725c(0x1ef)]=_0x11f94d?_0x386a55[_0x3c725c(0x1ae)]:_0x386a55[_0x3c725c(0x179)],_0x196fbe;}catch(_0x4b5605){if(_0x386a55['KYIiY'](_0x386a55[_0x3c725c(0x180)],_0x3c725c(0x11f))){const _0x2942a0={..._0x1d9f95};return _0x2942a0[_0x3c725c(0x1de)]=_0x386a55[_0x3c725c(0x217)],_0x2942a0['status']=_0x386a55[_0x3c725c(0x1c7)],_0x2942a0;}else{if(_0x1fcd87&&_0xf1f144[_0x3c725c(0x139)](':')&&_0x42e44b[_0x3c725c(0x127)](/^\d+\.\d+\.\d+\.\d+:\d+$/))_0x217441=qlImiJ['UKyDe'];else{if(_0x1ba9f1&&qlImiJ[_0x3c725c(0x178)](_0x4d4851[_0x3c725c(0x16d)],0x14)&&!_0x16ce14[_0x3c725c(0x139)]('-'))_0x433463=qlImiJ[_0x3c725c(0x138)];else _0x4c27ca&&_0x1adbd6[_0x3c725c(0x139)]('-')&&qlImiJ[_0x3c725c(0x1dc)](_0x585c50[_0x3c725c(0x16d)],0x1e)&&(_0x27424c='ios');}}}else _0x1c5b23+=_0x2e5f32['toString']();}),_0x2028e3=await Promise[_0x4dcabe(0x135)](_0x4b0aa4),_0x3ad2b2=[..._0x1e59c9],_0x1aa80f=new Set(_0x1e59c9[_0x4dcabe(0x175)](_0x25c033=>_0x25c033[_0x4dcabe(0x1a1)]));return _0x2028e3[_0x4dcabe(0x204)](_0x5c9e3f=>{const _0x3856f9=_0x4dcabe;if(_0x386a55[_0x3856f9(0x130)](_0x3856f9(0x14a),_0x3856f9(0x14a))){if(!_0x1aa80f['has'](_0x5c9e3f[_0x3856f9(0x1a1)])){if(_0x386a55[_0x3856f9(0x130)](_0x386a55[_0x3856f9(0x146)],_0x386a55[_0x3856f9(0x122)])){const _0x2a0d64={..._0x3109ac};return _0x2a0d64[_0x3856f9(0x1de)]=_0x386a55[_0x3856f9(0x217)],_0x2a0d64[_0x3856f9(0x1ef)]=_0x386a55[_0x3856f9(0x1c7)],_0x2a0d64;}else _0x3ad2b2[_0x3856f9(0x148)](_0x5c9e3f);}}else{const _0x113120=_0x2bb7e9[_0x3856f9(0x1eb)]||_0x386a55['GfdVB'],_0x654b07=_0x741336[_0x3856f9(0x1f5)]||_0x10d5ee[_0x3856f9(0x1de)]||_0x386a55[_0x3856f9(0x1e2)],_0x2b18eb=_0x386a55[_0x3856f9(0x130)](_0x113120,_0x386a55['GfdVB'])?'🍎':'🤖',_0xa580d5=_0x654b07===_0x386a55[_0x3856f9(0x1e2)]?'🔌':'📡',_0x493c27=_0x53c7a2[_0x3856f9(0x1ef)]===_0x386a55['rOAYE']?'✅':_0x386a55[_0x3856f9(0x130)](_0x39dcbd[_0x3856f9(0x1ef)],_0x3856f9(0x20a))?'✅':'⚠️';_0x1da106[_0x3856f9(0x140)](_0x386a55[_0x3856f9(0x168)](_0x5d018d,0x1)+'.\x20'+_0x2b18eb+'\x20'+_0xa580d5+'\x20'+_0x1f6add[_0x3856f9(0x163)]+'\x20('+_0x113120['toUpperCase']()+_0x3856f9(0x18d)+_0x654b07['toUpperCase']()+')\x20'+_0x493c27),_0x28f884[_0x3856f9(0x140)]('\x20\x20\x20UDID:\x20'+(_0x246913['udid']||_0x51d825[_0x3856f9(0x185)]));if(_0x5f2e19['ip'])_0x47a857[_0x3856f9(0x140)](_0x3856f9(0x1f4)+_0x1963ec['ip']);if(_0x240c29[_0x3856f9(0x123)])_0x1b5139[_0x3856f9(0x140)](_0x3856f9(0x1bb)+_0x20200b[_0x3856f9(0x123)]);_0x146edf[_0x3856f9(0x140)]('');}}),_0x3ad2b2;}require['main']===module&&((async()=>{const _0x12ce0a=_0x1c5c24,_0xe1eef7={};_0xe1eef7[_0x12ce0a(0x11b)]=_0x12ce0a(0x19b),_0xe1eef7[_0x12ce0a(0x1b9)]='ios',_0xe1eef7[_0x12ce0a(0x224)]=function(_0xe8f31c,_0x4023ca){return _0xe8f31c===_0x4023ca;},_0xe1eef7['WrmcR']=_0x12ce0a(0x1e8),_0xe1eef7[_0x12ce0a(0x15c)]=function(_0x414299,_0x7f1e81){return _0x414299===_0x7f1e81;},_0xe1eef7[_0x12ce0a(0x15b)]=_0x12ce0a(0x20a),_0xe1eef7[_0x12ce0a(0x218)]=function(_0x40bc38,_0xec2999){return _0x40bc38+_0xec2999;},_0xe1eef7[_0x12ce0a(0x1a0)]=_0x12ce0a(0x1e4),_0xe1eef7[_0x12ce0a(0x1c2)]=_0x12ce0a(0x186),_0xe1eef7[_0x12ce0a(0x1b6)]=_0x12ce0a(0x1cc),_0xe1eef7[_0x12ce0a(0x1d3)]=_0x12ce0a(0x19c),_0xe1eef7[_0x12ce0a(0x1f6)]=_0x12ce0a(0x1c9),_0xe1eef7[_0x12ce0a(0x177)]=_0x12ce0a(0x176),_0xe1eef7[_0x12ce0a(0x221)]=_0x12ce0a(0x131),_0xe1eef7[_0x12ce0a(0x194)]=_0x12ce0a(0x20f),_0xe1eef7[_0x12ce0a(0x174)]='\x20\x20Android:',_0xe1eef7[_0x12ce0a(0x1d0)]=_0x12ce0a(0x18c),_0xe1eef7['VRmou']=_0x12ce0a(0x21a);const _0x516a24=_0xe1eef7;console['log'](_0x516a24['XtLcc']);const _0x44ad24=await discoverAllDevices();if(_0x516a24[_0x12ce0a(0x15c)](_0x44ad24[_0x12ce0a(0x16d)],0x0)){const _0x1f9a6c=_0x12ce0a(0x1f3)[_0x12ce0a(0x21c)]('|');let _0x498106=0x0;while(!![]){switch(_0x1f9a6c[_0x498106++]){case'0':console['log'](_0x516a24[_0x12ce0a(0x1c2)]);continue;case'1':console['log'](_0x516a24[_0x12ce0a(0x1b6)]);continue;case'2':console[_0x12ce0a(0x140)](_0x12ce0a(0x173));continue;case'3':console['log'](_0x516a24['CTczj']);continue;case'4':process[_0x12ce0a(0x181)](0x1);continue;case'5':console[_0x12ce0a(0x140)](_0x516a24[_0x12ce0a(0x1f6)]);continue;case'6':console[_0x12ce0a(0x140)](_0x516a24[_0x12ce0a(0x177)]);continue;case'7':console['log'](_0x516a24[_0x12ce0a(0x221)]);continue;case'8':console['log'](_0x516a24[_0x12ce0a(0x194)]);continue;case'9':console['log'](_0x516a24[_0x12ce0a(0x174)]);continue;case'10':console[_0x12ce0a(0x140)](_0x516a24['YkUFH']);continue;}break;}}console[_0x12ce0a(0x140)](_0x12ce0a(0x12a)+_0x44ad24['length']+_0x12ce0a(0x205)),_0x44ad24[_0x12ce0a(0x204)]((_0x3340ba,_0x32b553)=>{const _0x146a6e=_0x12ce0a,_0x773631=_0x3340ba[_0x146a6e(0x1eb)]||_0x146a6e(0x18f),_0xb68682=_0x3340ba[_0x146a6e(0x1f5)]||_0x3340ba[_0x146a6e(0x1de)]||_0x516a24[_0x146a6e(0x11b)],_0x67b1c3=_0x773631===_0x516a24[_0x146a6e(0x1b9)]?'🍎':'🤖',_0x13155b=_0x516a24[_0x146a6e(0x224)](_0xb68682,_0x516a24['ESQeL'])?'🔌':'📡',_0x143530=_0x516a24[_0x146a6e(0x224)](_0x3340ba[_0x146a6e(0x1ef)],_0x516a24[_0x146a6e(0x13a)])?'✅':_0x516a24[_0x146a6e(0x15c)](_0x3340ba[_0x146a6e(0x1ef)],_0x516a24[_0x146a6e(0x15b)])?'✅':'⚠️';console['log'](_0x516a24[_0x146a6e(0x218)](_0x32b553,0x1)+'.\x20'+_0x67b1c3+'\x20'+_0x13155b+'\x20'+_0x3340ba['name']+'\x20('+_0x773631[_0x146a6e(0x165)]()+'\x20-\x20'+_0xb68682['toUpperCase']()+')\x20'+_0x143530),console['log'](_0x146a6e(0x1f0)+(_0x3340ba['udid']||_0x3340ba[_0x146a6e(0x185)]));if(_0x3340ba['ip'])console[_0x146a6e(0x140)](_0x146a6e(0x1f4)+_0x3340ba['ip']);if(_0x3340ba[_0x146a6e(0x123)])console[_0x146a6e(0x140)](_0x146a6e(0x1bb)+_0x3340ba[_0x146a6e(0x123)]);console['log']('');}),process[_0x12ce0a(0x1a4)][_0x12ce0a(0x139)]('--json')&&(_0x516a24[_0x12ce0a(0x14c)]!==_0x516a24[_0x12ce0a(0x14c)]?_0x3bb9ba=![]:console[_0x12ce0a(0x140)](JSON[_0x12ce0a(0x133)](_0x44ad24,null,0x2)));})());function _0x320e(){const _0x44ebe1=['tuXVrxi','zfDOsuW','zgLZy292zxjbBgXezxzPy2vZ','mtaXotrJuxP1wwq','AM9PBG','tNzsvMq','A09VAwu','zM9YrwfJAa','igrLDMLJzsHZktOk','ANH1zNy','mZaXmtm4mMPWCK5YuW','CNDgreK','lhvZyGO','y29UBMvJDgvK','lI4Vy29UzMLNl2rLDMLJzxmUy29UzG','ndaYmtbnCfP0Du0','q1rIEMi','tfHdwKS','twfRzsbZDxjLoG','B2zMBgLUzq','s3ziy1e','mtC5mJe2men2DwjpyW','wxfyrgO','CenvDvy','CLDpr1q','D3jPDgvgAwXL','qLLwtwe','t0fksKO','C3vIC3rYAw5N','r0njEKW','rffYs2u','C3bSAxq','zgv0zwn0v2LYzwXLC3nezxzPy2vZ','sxrTyNq','t3ftyw8','DuDjCwC','A1DmzxO','CuvyCKi','Cg9YDa','tM1WD3y','z3HNCw8','zxHWB3j0CW','rvnrzuW','ALnHv2K','Au9tlq','vfv2y1O','r3bWyKS','oJGXmdaVC3rHDhvZ','C2LuqLC','zM9JufO','yw5KCM9PzfzLCNnPB24','zgv0zwn0vvncrgv2AwnLCW','zKvRtwC','vfHUBg4','Bwf0y2G','z1bLzKC','s05OEfu','rM91BMqG','CePWseu','DNvVvha','uwzSuhu','zgv2AwnLCY5JB25M','mtyXmM9ry0HAyW','Cu5qr0i','icaGic0GqurcigLZigLUC3rHBgXLzdOGyNjLDYbPBNn0ywXSigfUzhjVAwqTCgXHDgzVCM0TDg9VBhmk','A2LSBa','C3rYAw5NAwz5','wvHruxC','ywXS','B2frvhi','D0ndCLO','vuT5rgu','Aw5JBhvKzxm','v3jTy1i','q09zALm','ruLPu3K','rMfPBgvKihrVihnHDMuGvvncigrLDMLJzsb0BYbJB25MAwC6','CgTHBeS','B2jvsNi','Bg9N','r3D3zeK','t0HKyLC','zxjYB3i','tNveALG','u0DtwLy','tg92CLC','Bg9HzfDPCMvSzxnZrgv2AwnLCW','ChvZAa','CurTCwu','AgPytMu','y2HLy2Tvu0jxrefdB25Uzwn0AxzPDhLpBLbVCNq','vLjTB3u','v1rAyLi','zxHPC3rZu3LUyW','C3rKB3v0','BMTNuNK','DxrMltG','ndK2mJe5mgPyvNrHAG','y2XVC2u','C3rHCNrZv2L0Aa','CuDlweu','veXLyuy','zMLSDgvY','zNvLDxq','u0nxv2e','Aff5vNy','yM9UDvK','vxnszw4','EfflEhq','DefOD3O','tfr2ugu','Ahr0CdOVl2XVy2fSAg9ZDdO','tffZq3u','CKzmBw4','BMfTzq','rxHXD3q','Dg9vChbLCKnHC2u','D2LYzwXLC3m','AvrSEKW','uuPowKm','mZvSr3vmueu','De9lu0K','rfz6vKO','CMvHzezPBgu','BgvUz3rO','z2v0vvncrgv2AwnLsw5MBW','zLrmvw4','BwvZC2fNzq','l3n0yxr1CW','Dw5RBM93BG','icaGic0GvvncigrLyNvNz2LUzYbPCYbLBMfIBgvK','wuLuDw8','BwfW','icaGic0GBgLIAw1VyMLSzwrLDMLJzsbPCYbPBNn0ywXSzwq6igjYzxCGAw5ZDgfSBcbSAwjPBw9IAwXLzgv2AwnL','txbxBMG','sNbitgW','Bg9cBNi','Ehb4thu','wKnwCeW','qNzuy2y','AfDTANK','uMTAz3y','iNn0yxrLiG','yu5yENK','zxHPDa','s1LUqKy','C2f2zvvtqKrLDMLJzvrVq29UzMLN','iYbezxzPy2uGq29UzMLNDxjHDgLVBIaOqxv0BY11CgrHDgvKkqOJiezVCM1HDdOGzgv2AwnLx25HBwuSDwrPzcXPCf9HzgrYzxnZlhbSyxrMB3jTlhr5CgukiYbqBgf0zM9YBtOGAw9ZihWGyw5KCM9PzaOJifr5Cgu6ihvZyIb8ihDPCMvSzxnZcImGcImG8j+uJcbvu0iGrevwsunfuZOGqxv0B21HDgLJywXSEsbKzxrLy3rLzcbHBMqGC2f2zwqGAgvYzqOJicaGic0GtM8Gy29UzMLNDxjHDgLVBIbUzwvKzwqGzM9YifvtqIbJB25Uzwn0Aw9UcImGicaGlsbbzgqGsvaGywrKCMvZCYb0BYbLBMfIBguGD2LYzwXLC3mGC3vWCg9YDcbSyxrLCGOJcImG8j+tOsbxsvjftevtuYbervzjq0vtoIbnyw51ywXSEsbHzgqGD2L0AcbjucbHzgrYzxnZcImGicaGlsbgB3jTyxq6igrLDMLJzv9Uyw1LlhvKAwqSAxbFywrKCMvZCYXWBgf0zM9YBsX3AxjLBgvZCWOJicaGic0GAu9toIbezxzPy2uGBxvZDcbIzsbWywLYzwqGAw4GwgnVzguSifDLyKrYAxzLCKfNzw50ihj1BM5PBMCkiYaGicaTiefUzhjVAwq6ievUywjSzsb3AxjLBgvZCYbbreiGzMLYC3qkiWOJiev4yw1WBguGzw50CMLLCZOkiYbPugHVBMuXnYWWmdaWodeZmc0Wmde5ndvdnJnfrdm0mdfflcXPB3mSDxnIicaGicaGicaGicaOAu9tifvtqIaTigf1Dg8Tzgv0zwn0zwqPcImGAvbOB25LmtzqldaWmda4mtqWltaWmumYndm2muu0mtGWmumSmtaUmtCZlJiYms4YmdqSAw9ZlhDPCMvSzxnZicaOAu9tifDPCMvSzxnZkqOJifbPEgvSocWXqtjcm0m0rdvfnKySlgfUzhjVAwqSDxnIicaGicaGicaGicaGicaGicaGicaGicHbBMrYB2LKifvtqIaTigf1Dg8Tzgv0zwn0zwqPcImGr2fSyxH5uZiZlefcq0qXmJm0lde5mI4XnJGUms4XntaSyw5KCM9PzcX3AxjLBgvZCYaGicaGkefUzhjVAwqGv2LYzwXLC3mPcGO','C2vYAwfS','icbPt1m6','uxbds3u','nde4nvjNAM5Wyq','AhLxv1m','tgvPBKy','s0HOuM8','icaGic0GvvncigrLDMLJzxmGyxjLignVBM5Ly3rLzcbHBMqGDhj1C3rLza','ic0G','Ahr0CdOVlW','Aw9Z','BfbRBKm','CMrzt2u','r3HeCg8','revcswy','tgDZuuy','Bg9HzerLDMLJzxngCM9Tq29UzMLN','y3vYBa','ru90zLi','tMjMveW','svnzvfC','ls1JB25Uzwn0lxrPBwvVDxq','DxnI','icaGic0Gv2LYzwXLC3mGzgv2AwnLCYbHCMuGy29UzMLNDxjLzcbPBIbKzxzPy2vZlMnVBMy','tunptha','lI9HBMrYB2LKrgv2AwnLrgv0zwn0Aw9U','yMfHvNG','whrmy2m','DwrPza','rgHlt2q','rw9itxa','yxjNDG','C29Tzq','CKXNAhe','t2DPwui','BNDcuwu','r2zKvKi','s2fiELC','B3nwzxjZAw9U','vhLnA3q','A2PqEMW','CK9bwuu','tgLnBuu','mJa2otm0zgXxrxnU','wxz2rfO','v291see','D2fYBG','DhjPBq','BhDMAva','ANnQuNe','s1zztM8','zgf0yq','wMv1zhq','rxfOBMG','icaGqw5KCM9PzdOG','y2HPBgrFChjVy2vZCW','rgLmtKG','ALrlEeq','AvrsB3q','ue1wAuy','tfbJvfa','sgvWyNG','t0TSy3O','B1nwEuS','zgzJAey','wurtBuK','BgTfAui','rwreq3i','icaGic0Grgv2AwnLigLZigf1DgHVCML6zwqGkgnOzwnRigrLDMLJzsbZy3jLzw4P','yuvgtwq','y29brKy','4P2mie5VigrLDMLJzxmGzM91BMqk','AM5XAKq','sxjzCem','ls1TyxGTDgLTzq','wwTvrKG','ufb0tM8','EMvRwMW','q1rJEMO','uuXrq2y','B09PBey','zhHJuMK','A2DNuhi','ue5jseS','AhHmywW','Bffgv3C','s0LVuLe','yMf0rfi','vvDjEfK','y29UBMvJDgLVBLr5Cgu','qvLTB04','yw5KCM9Pza','qw5KCM9PzcbKzxrLy3rPB24GBw9KDwXLig5VDcbHDMfPBgfIBgu','s0fiEeS','Dg9tDhjPBMC','8j+uJsbeAxnJB3zLCMLUzYbPt1mGjIbbBMrYB2LKigrLDMLJzxmUlI4k','AgfZ','otuYodaZuLHSBxrK','Cgf0Aa','B25SAw5L','u2z4Awm','ifvtqIbKzxzPy2uGDg8Gy29UzMLNoIa','CgXHDgzVCM0','q0fIuMG','qurkCeG','s1b4r1m','C3rHDhvZ','icaGvurjrdOG','rgv2AwnLtMfTztO','AwrLDMLJzv9Pza','mxW4Fdb8mtb8m3W2FdL8mNW1FdD8na','icaGsva6ia','DhLWzq','rLHIsfC','4PYfief1Dg8TC2f2zwqG','seXYrxe','s1LjAvK','sLLKDvi','qvv3q3y','rvf6rxG'];_0x320e=function(){return _0x44ebe1;};return _0x320e();}const _0x4a662f={};_0x4a662f[_0x1c5c24(0x124)]=detectUSBDevices,_0x4a662f[_0x1c5c24(0x16e)]=getUSBDeviceInfo,_0x4a662f[_0x1c5c24(0x195)]=loadDevicesFromConfig,_0x4a662f[_0x1c5c24(0x147)]=loadWirelessDevices,_0x4a662f['checkWirelessConnectivity']=checkWirelessConnectivity,_0x4a662f[_0x1c5c24(0x14b)]=checkUSBWDAConnectivityOnPort,_0x4a662f[_0x1c5c24(0x183)]=saveUSBDeviceToConfig,_0x4a662f[_0x1c5c24(0x1ff)]=discoverAllDevices,module[_0x1c5c24(0x226)]=_0x4a662f;
|
package/lib/devices.js
CHANGED
|
@@ -1,54 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* Device listing utility for Devicely CLI
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
// Import deviceDetection from appropriate location
|
|
6
|
-
let discoverAllDevices;
|
|
7
|
-
try {
|
|
8
|
-
({ discoverAllDevices } = require('./deviceDetection'));
|
|
9
|
-
} catch (err) {
|
|
10
|
-
({ discoverAllDevices } = require('../../deviceDetection'));
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
async function listDevices(options = {}) {
|
|
14
|
-
const devices = await discoverAllDevices();
|
|
15
|
-
|
|
16
|
-
if (!devices || devices.length === 0) {
|
|
17
|
-
console.log('\n⚠️ No devices found');
|
|
18
|
-
console.log('\n💡 Tips:');
|
|
19
|
-
console.log(' • For iOS: Connect device via USB or ensure Xcode pairing');
|
|
20
|
-
console.log(' • For Android: Enable USB debugging and connect device');
|
|
21
|
-
return;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
console.log(`\n✅ Found ${devices.length} device(s):\n`);
|
|
25
|
-
|
|
26
|
-
devices.forEach((device, index) => {
|
|
27
|
-
const status = device.status === 'online' ? '🟢' : '🔴';
|
|
28
|
-
const platform = device.platform === 'ios' ? '🍎' : '🤖';
|
|
29
|
-
|
|
30
|
-
console.log(`${index + 1}. ${status} ${platform} ${device.name}`);
|
|
31
|
-
|
|
32
|
-
if (options.verbose) {
|
|
33
|
-
console.log(` Platform: ${device.platform}`);
|
|
34
|
-
console.log(` UDID: ${device.udid}`);
|
|
35
|
-
console.log(` Type: ${device.type}`);
|
|
36
|
-
console.log(` Status: ${device.status}`);
|
|
37
|
-
if (device.osVersion) {
|
|
38
|
-
console.log(` OS Version: ${device.osVersion}`);
|
|
39
|
-
}
|
|
40
|
-
if (device.port) {
|
|
41
|
-
console.log(` Port: ${device.port}`);
|
|
42
|
-
}
|
|
43
|
-
console.log('');
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
|
|
47
|
-
if (!options.verbose) {
|
|
48
|
-
console.log('\n💡 Use --verbose for detailed information');
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
module.exports = {
|
|
53
|
-
listDevices
|
|
54
|
-
};
|
|
1
|
+
const _0x5a8cb1=_0x23bb;(function(_0x294b24,_0x321e01){const _0x15dda4=_0x23bb,_0x3aa220=_0x294b24();while(!![]){try{const _0xd6220a=-parseInt(_0x15dda4(0x171))/0x1+parseInt(_0x15dda4(0x17a))/0x2*(-parseInt(_0x15dda4(0x151))/0x3)+parseInt(_0x15dda4(0x154))/0x4+parseInt(_0x15dda4(0x170))/0x5+-parseInt(_0x15dda4(0x150))/0x6*(parseInt(_0x15dda4(0x152))/0x7)+-parseInt(_0x15dda4(0x159))/0x8+parseInt(_0x15dda4(0x153))/0x9*(parseInt(_0x15dda4(0x15b))/0xa);if(_0xd6220a===_0x321e01)break;else _0x3aa220['push'](_0x3aa220['shift']());}catch(_0x28b502){_0x3aa220['push'](_0x3aa220['shift']());}}}(_0x56d5,0xa77b2));function _0x56d5(){const _0x2aeb87=['DKfxzw4','lI9KzxzPy2vezxrLy3rPB24','q2LuvxG','cUkCHsbgB3vUzca','BMfTzq','B25SAw5L','vvr0EK8','DLLftwW','A0XYt0G','DMvYyM9Zzq','C3bSAxq','weLqte0','cVcFKQeGvxnLic0TDMvYyM9ZzsbMB3iGzgv0ywLSzwqGAw5MB3jTyxrPB24','Cg9YDa','icaGt1mGvMvYC2LVBJOG','mJyXnJK3mezkyvzcDG','mZK1mtm4AezKDhHw','DwrPza','mhW0Fdz8mxWZFdv8mG','cVcFKQeGvgLWCZO','BgXJCK4','zM9YrwfJAa','Bg9N','rgPJBxG','BgLZDerLDMLJzxm','nePuvvrdyq','vNrtzNq','yvDLCgG','icaG4OcIiezVCIbbBMrYB2LKoIbfBMfIBguGvvncigrLyNvNz2LUzYbHBMqGy29UBMvJDcbKzxzPy2u','icaGugXHDgzVCM06ia','C3rHDhvZ','CgXHDgzVCM0','tuDhyNm','B3nwzxjZAw9U','revhrM4','cUkAOo+4JYaGtM8Gzgv2AwnLCYbMB3vUza','wvvise0','icaGvurjrdOG','DhDZuu4','lI4VlI4Vzgv2AwnLrgv0zwn0Aw9U','icaGu3rHDhvZoIa','Dgf3qKS','icaGug9YDdOG','odq2DKTQEwfU','mtiYmZy5n2LpvMD1uW','ndi3rwHAs21S','oxvMv2nLsG','mZqWmdu2rMzfAvD4','zxrjDKO','t3vmwxi','BgvUz3rO','icaG4OcIiezVCIbPt1m6ienVBM5Ly3qGzgv2AwnLihzPysbvu0iGB3iGzw5ZDxjLifHJB2rLihbHAxjPBMC','mtuWnJqYnhb1tKzVuq','qMDcDgG','mtq4ntqZndb6wwvtrKC','icaGvhLWztOG','ywfPEfG','Du5ZAey','DhLWzq','BNjUweK'];_0x56d5=function(){return _0x2aeb87;};return _0x56d5();}let discoverAllDevices;try{({discoverAllDevices}=require(_0x5a8cb1(0x162)));}catch(_0x3a7d01){({discoverAllDevices}=require(_0x5a8cb1(0x14c)));}async function listDevices(_0x3b9767={}){const _0x11d6c9=_0x5a8cb1,_0x307e25={'vAWen':_0x11d6c9(0x17d),'vYEMl':_0x11d6c9(0x174),'VtSft':_0x11d6c9(0x158),'nrnXI':_0x11d6c9(0x173),'kLrOH':function(_0x25f984,_0x23e502){return _0x25f984===_0x23e502;},'twsQN':_0x11d6c9(0x166),'ToTXx':'ios','hAZWx':function(_0x4acaaf,_0x5483f4){return _0x4acaaf+_0x5483f4;},'aWeph':function(_0x5d4478,_0x44f249){return _0x5d4478!==_0x44f249;},'CiTUx':'AECIs','lNwYp':_0x11d6c9(0x15d),'uNshF':_0x11d6c9(0x14e),'YUHHM':function(_0x45da5b){return _0x45da5b();},'pAADS':_0x11d6c9(0x148),'UTtzO':_0x11d6c9(0x147),'MGGbs':_0x11d6c9(0x16d)},_0x233818=await _0x307e25[_0x11d6c9(0x149)](discoverAllDevices);if(!_0x233818||_0x307e25[_0x11d6c9(0x169)](_0x233818[_0x11d6c9(0x157)],0x0)){console['log'](_0x307e25['pAADS']),console['log'](_0x307e25[_0x11d6c9(0x168)]),console['log'](_0x307e25['VtSft']),console[_0x11d6c9(0x177)](_0x307e25[_0x11d6c9(0x161)]);return;}console[_0x11d6c9(0x177)](_0x11d6c9(0x164)+_0x233818[_0x11d6c9(0x157)]+'\x20device(s):\x0a'),_0x233818[_0x11d6c9(0x176)]((_0xd47e3a,_0x4ad1f6)=>{const _0x202236=_0x11d6c9,_0xae2d94={};_0xae2d94[_0x202236(0x16c)]=_0x202236(0x16d),_0xae2d94['OuLYr']=_0x307e25[_0x202236(0x161)],_0xae2d94[_0x202236(0x175)]=_0x307e25[_0x202236(0x168)],_0xae2d94[_0x202236(0x15a)]=_0x307e25[_0x202236(0x17b)],_0xae2d94[_0x202236(0x178)]=_0x307e25[_0x202236(0x160)];const _0x177338=_0xae2d94,_0x45c06d=_0x307e25['kLrOH'](_0xd47e3a[_0x202236(0x17f)],_0x307e25[_0x202236(0x14b)])?'🟢':'🔴',_0x550eec=_0x307e25[_0x202236(0x169)](_0xd47e3a[_0x202236(0x144)],_0x307e25['ToTXx'])?'🍎':'🤖';console[_0x202236(0x177)](_0x307e25['hAZWx'](_0x4ad1f6,0x1)+'.\x20'+_0x45c06d+'\x20'+_0x550eec+'\x20'+_0xd47e3a[_0x202236(0x165)]);if(_0x3b9767[_0x202236(0x16a)]){if(_0x307e25[_0x202236(0x17c)](_0x307e25['CiTUx'],_0x307e25[_0x202236(0x163)]))_0x26b030[_0x202236(0x177)](_0x177338[_0x202236(0x16c)]);else{console[_0x202236(0x177)](_0x202236(0x17e)+_0xd47e3a[_0x202236(0x144)]),console[_0x202236(0x177)](_0x202236(0x14a)+_0xd47e3a[_0x202236(0x172)]),console[_0x202236(0x177)](_0x202236(0x15c)+_0xd47e3a[_0x202236(0x15f)]),console[_0x202236(0x177)](_0x202236(0x14d)+_0xd47e3a[_0x202236(0x17f)]);if(_0xd47e3a[_0x202236(0x146)]){if(_0x307e25[_0x202236(0x17c)](_0x202236(0x155),_0x307e25['lNwYp']))console[_0x202236(0x177)](_0x202236(0x16f)+_0xd47e3a[_0x202236(0x146)]);else{const _0x5bd340='4|2|3|0|1'[_0x202236(0x16b)]('|');let _0x1d312c=0x0;while(!![]){switch(_0x5bd340[_0x1d312c++]){case'0':_0x2f02ff['log'](Wlrrqi[_0x202236(0x156)]);continue;case'1':return;case'2':_0x29b88[_0x202236(0x177)](Wlrrqi[_0x202236(0x175)]);continue;case'3':_0x4c7ad4[_0x202236(0x177)](Wlrrqi[_0x202236(0x15a)]);continue;case'4':_0x3479b2[_0x202236(0x177)](_0x202236(0x148));continue;}break;}}}if(_0xd47e3a['port']){if(_0x307e25[_0x202236(0x15e)]==='uuAVS'){const _0x4a89b0=_0x177338[_0x202236(0x178)][_0x202236(0x16b)]('|');let _0x57023c=0x0;while(!![]){switch(_0x4a89b0[_0x57023c++]){case'0':_0x3096af['log'](_0x202236(0x17e)+_0xf62aca[_0x202236(0x144)]);continue;case'1':_0x2d0332[_0x202236(0x177)](_0x202236(0x14d)+_0x274d0b[_0x202236(0x17f)]);continue;case'2':_0x31ce7c[_0x202236(0x177)]('');continue;case'3':_0x159a9d[_0x202236(0x146)]&&_0x55510b[_0x202236(0x177)](_0x202236(0x16f)+_0x505809[_0x202236(0x146)]);continue;case'4':_0x3047e4[_0x202236(0x177)](_0x202236(0x14a)+_0x58e670[_0x202236(0x172)]);continue;case'5':_0x5a82c7[_0x202236(0x16e)]&&_0x35fa97['log']('\x20\x20\x20Port:\x20'+_0x1bd0bf[_0x202236(0x16e)]);continue;case'6':_0x5735f4['log'](_0x202236(0x15c)+_0x445f26[_0x202236(0x15f)]);continue;}break;}}else console[_0x202236(0x177)](_0x202236(0x14f)+_0xd47e3a['port']);}console['log']('');}}}),!_0x3b9767[_0x11d6c9(0x16a)]&&(_0x307e25[_0x11d6c9(0x169)](_0x11d6c9(0x147),_0x307e25[_0x11d6c9(0x167)])?console['log'](_0x307e25[_0x11d6c9(0x145)]):_0x1ab37b[_0x11d6c9(0x177)](_0x11d6c9(0x16f)+_0x53f319[_0x11d6c9(0x146)]));}const _0x4551a4={};function _0x23bb(_0x571493,_0x392483){_0x571493=_0x571493-0x144;const _0x56d5fc=_0x56d5();let _0x23bb2f=_0x56d5fc[_0x571493];if(_0x23bb['PtBdMJ']===undefined){var _0x1af5b9=function(_0x4cbe66){const _0x41f08c='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x475be0='',_0x1f7891='';for(let _0x379b3d=0x0,_0x1da55f,_0xfcfef5,_0x3b5df3=0x0;_0xfcfef5=_0x4cbe66['charAt'](_0x3b5df3++);~_0xfcfef5&&(_0x1da55f=_0x379b3d%0x4?_0x1da55f*0x40+_0xfcfef5:_0xfcfef5,_0x379b3d++%0x4)?_0x475be0+=String['fromCharCode'](0xff&_0x1da55f>>(-0x2*_0x379b3d&0x6)):0x0){_0xfcfef5=_0x41f08c['indexOf'](_0xfcfef5);}for(let _0x51ca0c=0x0,_0x48a77b=_0x475be0['length'];_0x51ca0c<_0x48a77b;_0x51ca0c++){_0x1f7891+='%'+('00'+_0x475be0['charCodeAt'](_0x51ca0c)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x1f7891);};_0x23bb['MojhnY']=_0x1af5b9,_0x23bb['QkyJIv']={},_0x23bb['PtBdMJ']=!![];}const _0x352b69=_0x56d5fc[0x0],_0x35bdd9=_0x571493+_0x352b69,_0x2df2b5=_0x23bb['QkyJIv'][_0x35bdd9];return!_0x2df2b5?(_0x23bb2f=_0x23bb['MojhnY'](_0x23bb2f),_0x23bb['QkyJIv'][_0x35bdd9]=_0x23bb2f):_0x23bb2f=_0x2df2b5,_0x23bb2f;}_0x4551a4[_0x5a8cb1(0x179)]=listDevices,module['exports']=_0x4551a4;
|