devicely 2.2.5 → 2.2.7
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.81eae090.js} +3 -3
- package/lib/frontend/static/js/main.81eae090.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.81eae090.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 _0x13ec13=_0x1182;(function(_0x1fbe58,_0x47ebf9){const _0xd7d830=_0x1182,_0x42776b=_0x1fbe58();while(!![]){try{const _0x1ebb63=-parseInt(_0xd7d830(0x1a6))/0x1+-parseInt(_0xd7d830(0x1b0))/0x2*(parseInt(_0xd7d830(0x183))/0x3)+-parseInt(_0xd7d830(0xf6))/0x4+parseInt(_0xd7d830(0x152))/0x5*(parseInt(_0xd7d830(0xdf))/0x6)+parseInt(_0xd7d830(0x11a))/0x7+parseInt(_0xd7d830(0x18f))/0x8+-parseInt(_0xd7d830(0x1a2))/0x9;if(_0x1ebb63===_0x47ebf9)break;else _0x42776b['push'](_0x42776b['shift']());}catch(_0x5c5734){_0x42776b['push'](_0x42776b['shift']());}}}(_0x219e,0x1d6cd));const {spawn}=require(_0x13ec13(0x149)),fs=require('fs')[_0x13ec13(0x12b)],path=require('path');let DEVICE_CONFIG=path[_0x13ec13(0xe7)](__dirname,_0x13ec13(0x1b4));!require('fs')[_0x13ec13(0x113)](DEVICE_CONFIG)&&(DEVICE_CONFIG=path[_0x13ec13(0xe7)](__dirname,'../config/devices.conf'));let androidDetection;try{androidDetection=require(_0x13ec13(0x171));}catch(_0x3404de){console['warn']('Android\x20detection\x20module\x20not\x20available'),androidDetection=null;}function _0x219e(){const _0x34e9ba=['DLD4uMO','uM96zwK','vgLgCxy','zxD0tgO','D25LweS','rLD1AMy','mtu1ntu0n0XAvenAqq','svLgyuq','yLvnu3m','C3rKB3v0','ls1TyxGTDgLTzq','vhHvvuW','Dxf1Cvi','BuLIELy','Au9tlq','CgrpAMe','Dg9tDhjPBMC','qvjNsNO','sxfiwMi','rgv2AwnLtMfTztO','CeHsEuW','Ahr0CdOVl2XVy2fSAg9ZDdO','DxnI','ChjVBwLZzxm','D2LYzwXLC3m','reLYzMW','rwLNBeq','r1borMy','AhPlu1C','A3j1rhe','D2fYBG','BKXLuKG','y2HLy2Tvu0jxrefdB25Uzwn0AxzPDhLpBLbVCNq','uMrbEeG','zff6Aha','rM91BMqG','v0jhvfe','B1bcvfm','Ahr0CdOVlW','AvrKrxq','y2HLy2TxAxjLBgvZC0nVBM5Ly3rPDML0Eq','DhLWzq','vgv0r0q','CMvHzezPBgu','q052rui','zM9YrwfJAa','vLvnsvy','ifvtqIbKzxzPy2uGDg8Gy29UzMLNoIa','C3rHCNrZv2L0Aa','4PYfief1Dg8TC2f2zwqG','wNzWqNe','z0fJt0e','vMfwthq','y2HPBgrFChjVy2vZCW','BNncBvq','y3vYBa','y2LMueS','C3rYAw5NAwz5','AwrLDMLJzv9Pza','ruXAtLm','EvzxtNe','Bwf0y2G','mtCYmgDsyNDHCa','quj4Agq','AfPRAhO','tLnxyNq','rvfjz20','vLzSwK4','DwrPza','ls1QC29U','CKH1z1e','D0vjuMO','v2TRrxu','BwvZC2fNzq','C2vYAwfS','DeDNvgi','Dw5RBM93BG','A1zyq0G','Aw9Z','vePWq3e','wvrUwNG','CLPAqw4','BuzVEMO','Egn6zKi','zgv0zwn0vvncrgv2AwnLCW','AK9tB2O','y2XVC2u','D2fLtLK','oJGXmdaVC3rHDhvZ','AgXuCNi','wKnHvhy','Cevgr1q','CMrfzvi','lI9HBMrYB2LKrgv2AwnLrgv0zwn0Aw9U','AwrLDMLJzwLUzM8','D2jKExG','D1n0D0C','tNDotwm','wKPjwfy','yw5KCM9Pza','EfD5rwq','zxHPDa','qwvVr0q','C3rHDhvZ','D1jmq24','uvjtweG','ic0G','BufMzhi','rNrRu1C','AMnrs2G','zgLZy292zxjbBgXezxzPy2vZ','ndC0mtuZrevdDefT','CuL4vwK','wxzoqvq','sMvZtKe','rxjYB3iGzgv0zwn0Aw5NiefUzhjVAwqGvvncigrLDMLJzxm6','icbbBMrYB2LKoG','zLLruLO','A1jdqLq','zgf0yq','ug96Aw4','DezozLa','B3nwzxjZAw9U','mtaYnZCWngL3zMLzDa','DMnxv1q','AgfZ','zgvhrvq','CgXHDgzVCM0','EKjqEwq','BgvUz3rO','Aw5byMq','t1DjAMS','CwXxB1m','D2f2Chu','ChvZAa','zxjYB3i','suXKEue','D3jPDgvgAwXL','AKD4r2m','uw9mu2C','Dgv1r24','Eez3yMC','ode0nZa3zwjVuKfi','C3Lcte8','qLfryLe','icaGsva6ia','otKWn3r6t09REq','rMfPBgvKihrVihnHDMuGvvncigrLDMLJzsb0BYbJB25MAwC6','rhrHwNu','u0HWwNC','tNj2CwO','BwfW','A0XOCvO','t1Hur24','r0XjsKy','wvPOvK8','mNDqr2HpBW','C3bSAxq','C2f2zvvtqKrLDMLJzvrVq29UzMLN','AMDluMK','zgv2AwnLCY5JB25M','icaGvurjrdOG','AeLPrwC','D1jzqvG','rhHuALe','tffbtuS','y1bSD3C','CengquS','B1HOB0G','DhjPBq','8j+uJsbeAxnJB3zLCMLUzYbPt1mGjIbbBMrYB2LKigrLDMLJzxmUlI4k','v1H4ve0','D0LNvwq','q1vpuwq','ELz4EgC','rfLkwgu','vgvTC2q','DfLfvfC','lI4Vy29UzMLNl2rLDMLJzxmUy29UzG','AfHtAwG','C3rgy1q','y29UBMvJDgLVBLr5Cgu','zvLju2S','ls1JB25Uzwn0lxrPBwvVDxq','Bg9N','C0zABKm','s25Yz1i','zxHWB3j0CW','C2vHshm','EuDgCxe','A2LSBa','terbq00','s0j1r2W','tgjjvvy','AuHACfe','Aw5JBhvKzxm','q212q08','AKLjreG','qKjksLy','BMfTzq','AujVs0q','rML6tvy','iNn0yxrLiG','qKjss1q','se5rtMm','CK9IsLC','sMvHq3y','txnzC3a','mZK1neLowuz1wa','y0Phq1O','zMLSDgvY','C0XWwwe','ELDrBw8','r1HSthC','Dg9vChbLCKnHC2u','BKDzwgG','AM9PBG','l3n0yxr1CW','Bg9HzerLDMLJzxngCM9Tq29UzMLN','t2DpDuq','B25SAw5L','DxrMltG','rwH2zfK','u2ntuvG','ywvXyNy','zgv0zwn0v2LYzwXLC3nezxzPy2vZ','icaGqw5KCM9PzdOG','ufDHD2m','DuncrgW','C2f5s2m','uhjVzhvJDfzLCNnPB246','nZKZndK2wfDougL2','wMP0CfK','icaGic0GvvncigrLDMLJzxmGyxjLignVBM5Ly3rLzcbHBMqGDhj1C3rLza','Bg9HzfDPCMvSzxnZrgv2AwnLCW','ANHZvKq','vKDTueq','twfRzsbZDxjLoG','BLz3q2W','C3vIC3rYAw5N','quLABha','AxDurNG','EvDzz0W','iYbezxzPy2uGq29UzMLNDxjHDgLVBIaOqxv0BY11CgrHDgvKkqOJiezVCM1HDdOGzgv2AwnLx25HBwuSDwrPzcXPCf9HzgrYzxnZlhbSyxrMB3jTlhr5CgukiYbqBgf0zM9YBtOGAw9ZihWGyw5KCM9PzaOJifr5Cgu6ihvZyIb8ihDPCMvSzxnZcImGcImG8j+uJcbvu0iGrevwsunfuZOGqxv0B21HDgLJywXSEsbKzxrLy3rLzcbHBMqGC2f2zwqGAgvYzqOJicaGic0GtM8Gy29UzMLNDxjHDgLVBIbUzwvKzwqGzM9YifvtqIbJB25Uzwn0Aw9UcImGicaGlsbbzgqGsvaGywrKCMvZCYb0BYbLBMfIBguGD2LYzwXLC3mGC3vWCg9YDcbSyxrLCGOJcImG8j+tOsbxsvjftevtuYbervzjq0vtoIbnyw51ywXSEsbHzgqGD2L0AcbjucbHzgrYzxnZcImGicaGlsbgB3jTyxq6igrLDMLJzv9Uyw1LlhvKAwqSAxbFywrKCMvZCYXWBgf0zM9YBsX3AxjLBgvZCWOJicaGic0GAu9toIbezxzPy2uGBxvZDcbIzsbWywLYzwqGAw4GwgnVzguSifDLyKrYAxzLCKfNzw50ihj1BM5PBMCkiYaGicaTiefUzhjVAwq6ievUywjSzsb3AxjLBgvZCYbbreiGzMLYC3qkiWOJiev4yw1WBguGzw50CMLLCZOkiYbPugHVBMuXnYWWmdaWodeZmc0Wmde5ndvdnJnfrdm0mdfflcXPB3mSDxnIicaGicaGicaGicaOAu9tifvtqIaTigf1Dg8Tzgv0zwn0zwqPcImGAvbOB25LmtzqldaWmda4mtqWltaWmumYndm2muu0mtGWmumSmtaUmtCZlJiYms4YmdqSAw9ZlhDPCMvSzxnZicaOAu9tifDPCMvSzxnZkqOJifbPEgvSocWXqtjcm0m0rdvfnKySlgfUzhjVAwqSDxnIicaGicaGicaGicaGicaGicaGicaGicHbBMrYB2LKifvtqIaTigf1Dg8Tzgv0zwn0zwqPcImGr2fSyxH5uZiZlefcq0qXmJm0lde5mI4XnJGUms4XntaSyw5KCM9PzcX3AxjLBgvZCYaGicaGkefUzhjVAwqGv2LYzwXLC3mPcGO','uLHKrwW','qw5KCM9PzcbKzxrLy3rPB24GBw9KDwXLig5VDcbHDMfPBgfIBgu','z2nIthK','icaGic0GBgLIAw1VyMLSzwrLDMLJzsbPCYbPBNn0ywXSzwq6igjYzxCGAw5ZDgfSBcbSAwjPBw9IAwXLzgv2AwnL','qNb5DwO','t0Tnz08','C29Tzq','rg1oBxG','BwfPBG','icaGic0GqurcigLZigLUC3rHBgXLzdOGyNjLDYbPBNn0ywXSigfUzhjVAwqTCgXHDgzVCM0TDg9VBhmk','icbPt1m6','icaGic0Gv2LYzwXLC3mGzgv2AwnLCYbHCMuGy29UzMLNDxjLzcbPBIbKzxzPy2vZlMnVBMy','tMPhqKK','uK9syM0','y1HJsMG','DxrothC','zxHPC3rZu3LUyW'];_0x219e=function(){return _0x34e9ba;};return _0x219e();}async function detectIOSUSBDevices(){const _0x40191f=_0x13ec13,_0x453588={'mIbzV':'ios','oPBTS':_0x40191f(0x12a),'BBOtV':function(_0x4e2da9,_0x15d12e){return _0x4e2da9!==_0x15d12e;},'BQQbQ':_0x40191f(0x189),'aeqbv':function(_0x83a63f,_0x23f3f2){return _0x83a63f===_0x23f3f2;},'iHZpQ':'MsYsp','stFcT':function(_0x4f377d,_0x54f994){return _0x4f377d(_0x54f994);},'KBuGl':_0x40191f(0x14e),'lmOLu':_0x40191f(0x18b),'gIyun':'close','zVxxg':_0x40191f(0x19b)};return new Promise(_0x53e889=>{const _0x1bb9fd=_0x40191f,_0x4ba604={};_0x4ba604[_0x1bb9fd(0x114)]='ios';const _0x347649=_0x4ba604,_0x120baf=[],_0x26f795=spawn(_0x453588[_0x1bb9fd(0x1d4)],['-l']);let _0x5b2f34='';_0x26f795[_0x1bb9fd(0x11d)]['on'](_0x453588['lmOLu'],_0x820e47=>{const _0x55930f=_0x1bb9fd;_0x5b2f34+=_0x820e47[_0x55930f(0x124)]();}),_0x26f795['on'](_0x453588['gIyun'],_0x494c01=>{const _0x3d9633=_0x1bb9fd,_0x2d459e={};_0x2d459e[_0x3d9633(0x148)]=_0x453588[_0x3d9633(0x121)],_0x2d459e['Bpyuj']=_0x453588[_0x3d9633(0x139)];const _0x3d52b8=_0x2d459e;if(_0x453588['BBOtV'](_0x453588[_0x3d9633(0x1a4)],_0x3d9633(0x163))){if(_0x453588[_0x3d9633(0xef)](_0x494c01,0x0)&&_0x5b2f34[_0x3d9633(0x1bd)]()){if(_0x3d9633(0xde)===_0x453588[_0x3d9633(0x1d6)]){const _0x56edff=_0x5b2f34['trim']()['split']('\x0a')[_0x3d9633(0xe1)](Boolean);_0x56edff[_0x3d9633(0x141)](_0x50d1bc=>{const _0x13a5a8=_0x3d9633;_0x120baf[_0x13a5a8(0x19a)]({'name':_0x13a5a8(0x122)+_0x50d1bc[_0x13a5a8(0xfe)](0x0,0x8),'udid':_0x50d1bc[_0x13a5a8(0x1bd)](),'platform':_0x3d52b8[_0x13a5a8(0x148)],'type':_0x3d52b8[_0x13a5a8(0x107)],'connectionType':_0x3d52b8[_0x13a5a8(0x107)],'status':_0x13a5a8(0x160)});});}else return[];}_0x453588[_0x3d9633(0x1c8)](_0x53e889,_0x120baf);}else _0x17f9d1=_0x347649[_0x3d9633(0x114)];}),_0x26f795['on'](_0x453588[_0x1bb9fd(0x1c2)],()=>{const _0x225e36=_0x1bb9fd;_0x453588[_0x225e36(0x1c8)](_0x53e889,[]);});});}async function detectUSBDevices(){const _0x45a498=_0x13ec13,_0x28c96e={'tYETW':function(_0x4ebd5e){return _0x4ebd5e();},'nLeRH':_0x45a498(0x187)},_0x543991=await _0x28c96e[_0x45a498(0x1c5)](detectIOSUSBDevices);let _0x3d979c=[];if(androidDetection)try{_0x3d979c=await androidDetection[_0x45a498(0x168)]();}catch(_0xb5b06a){console[_0x45a498(0x19b)](_0x28c96e[_0x45a498(0x133)],_0xb5b06a['message']);}return[..._0x543991,..._0x3d979c];}async function getUSBDeviceInfo(_0x3da877){const _0x5eeb94=_0x13ec13,_0x5cbcba={'wavpu':function(_0x46636c,_0x1182d5){return _0x46636c===_0x1182d5;},'iBoKD':function(_0x10c4e3,_0x4b071d){return _0x10c4e3(_0x4b071d);},'xFwbg':_0x5eeb94(0x15b),'Pozin':_0x5eeb94(0x127),'xoyBZ':_0x5eeb94(0xf5),'VVlZN':function(_0x427660,_0x4766a8,_0x4d83d1){return _0x427660(_0x4766a8,_0x4d83d1);},'YvNAT':'curl','hzKSW':'--max-time','jxsVD':_0x5eeb94(0x18b),'EiglD':_0x5eeb94(0x16a),'IiRvg':function(_0x5b2731,_0x1edf83){return _0x5b2731===_0x1edf83;},'rObJW':_0x5eeb94(0x166),'ILdyA':'ios','kVtIA':function(_0xf94de4,_0x392914){return _0xf94de4!==_0x392914;},'NjGBI':_0x5eeb94(0xe6),'OkGWk':_0x5eeb94(0x172),'TxUUL':_0x5eeb94(0x19b)};return new Promise(_0xa1a4f9=>{const _0x4abdf3=_0x5eeb94,_0x2c7d6e={'kruDq':function(_0x212f84,_0x4c2a96){const _0x14a695=_0x1182;return _0x5cbcba[_0x14a695(0xd7)](_0x212f84,_0x4c2a96);},'PWawc':function(_0x27d6b3,_0x717d80){return _0x27d6b3(_0x717d80);},'uquqR':function(_0x2bc71d,_0x3603fd){return _0x2bc71d!==_0x3603fd;},'YZhVO':_0x5cbcba[_0x4abdf3(0x1a1)],'Temsd':_0x4abdf3(0x156),'ELZNS':_0x5cbcba[_0x4abdf3(0x18c)],'UrFIo':_0x5cbcba['xoyBZ'],'ScSQX':function(_0x6e9140,_0x32571e){return _0x6e9140===_0x32571e;},'LDACM':_0x4abdf3(0x118),'WkkEu':_0x4abdf3(0x175),'DtaZu':function(_0x3150f2,_0x4fd900,_0x521739){const _0x1d1291=_0x4abdf3;return _0x5cbcba[_0x1d1291(0x157)](_0x3150f2,_0x4fd900,_0x521739);},'ABxhd':_0x5cbcba[_0x4abdf3(0x185)],'GLIJF':_0x5cbcba[_0x4abdf3(0x130)],'UUubR':_0x5cbcba[_0x4abdf3(0xfa)],'Nrvqj':_0x5cbcba['EiglD'],'hZkhz':function(_0x58af35,_0x7c42da,_0x5b73a5){return _0x5cbcba['VVlZN'](_0x58af35,_0x7c42da,_0x5b73a5);},'DwbMA':_0x4abdf3(0x177),'tGgTb':function(_0x154bac,_0x2262aa){return _0x5cbcba['IiRvg'](_0x154bac,_0x2262aa);},'OKMgO':_0x5cbcba[_0x4abdf3(0xdc)],'sayKc':_0x5cbcba[_0x4abdf3(0x19c)]};if(_0x5cbcba['kVtIA'](_0x5cbcba['NjGBI'],_0x5cbcba[_0x4abdf3(0x10f)]))_0x2c7d6e[_0x4abdf3(0x131)](_0x411f27,null);else{const _0x47cd8d=spawn(_0x5cbcba['OkGWk'],['-u',_0x3da877]);let _0x4d802b='';_0x47cd8d[_0x4abdf3(0x11d)]['on'](_0x5cbcba[_0x4abdf3(0xfa)],_0x2586a7=>{const _0x4ef4ea=_0x4abdf3;_0x4d802b+=_0x2586a7[_0x4ef4ea(0x124)]();}),_0x47cd8d['on'](_0x5cbcba[_0x4abdf3(0x12e)],_0x1eebb1=>{const _0x4bc4da=_0x4abdf3,_0x25f83d={'TXvjr':_0x2c7d6e[_0x4bc4da(0x14f)],'RXdEl':_0x2c7d6e['UrFIo'],'ARgJz':function(_0x407027,_0x107b22){return _0x407027(_0x107b22);},'sLpYa':function(_0x26c622,_0xb3a854,_0x337b69){const _0x231c37=_0x4bc4da;return _0x2c7d6e[_0x231c37(0x1a8)](_0x26c622,_0xb3a854,_0x337b69);},'VzkdJ':_0x2c7d6e[_0x4bc4da(0x153)],'Wmspv':_0x4bc4da(0x1cb),'AIZlp':_0x2c7d6e[_0x4bc4da(0x1ae)],'xTxOr':_0x2c7d6e['UUubR'],'SHpZw':_0x2c7d6e[_0x4bc4da(0x1aa)],'kRCBT':function(_0x47addb,_0x417ebe,_0xdb380a){const _0x1ac9cf=_0x4bc4da;return _0x2c7d6e[_0x1ac9cf(0x154)](_0x47addb,_0x417ebe,_0xdb380a);},'QRSXH':_0x2c7d6e['DwbMA']};if(_0x2c7d6e[_0x4bc4da(0x15f)](_0x1eebb1,0x0)&&_0x4d802b[_0x4bc4da(0x1bd)]()){if(_0x2c7d6e[_0x4bc4da(0x120)]('HzcKx',_0x4bc4da(0x11b))){const _0x51d02e={},_0x2acd47=_0x4d802b[_0x4bc4da(0x1b1)]('\x0a');_0x2acd47[_0x4bc4da(0x141)](_0xec7f9a=>{const _0x3a7ef6=_0x4bc4da,_0x46c750={'pCFAK':function(_0x3aa1cf,_0x503250){const _0x27c41d=_0x1182;return _0x2c7d6e[_0x27c41d(0xf2)](_0x3aa1cf,_0x503250);}};_0x2c7d6e[_0x3a7ef6(0x120)](_0x2c7d6e[_0x3a7ef6(0x1af)],_0x2c7d6e[_0x3a7ef6(0x1c4)])?(_0xec7f9a[_0x3a7ef6(0xd2)](_0x2c7d6e[_0x3a7ef6(0x14f)])&&(_0x51d02e[_0x3a7ef6(0xd6)]=_0xec7f9a[_0x3a7ef6(0x1b1)](':')[0x1][_0x3a7ef6(0x1bd)]()),_0xec7f9a[_0x3a7ef6(0xd2)](_0x2c7d6e['UrFIo'])&&(_0x2c7d6e[_0x3a7ef6(0xee)](_0x2c7d6e[_0x3a7ef6(0x1d3)],_0x2c7d6e[_0x3a7ef6(0x15c)])?_0x46c750[_0x3a7ef6(0x1bb)](_0x417ecb,null):_0x51d02e[_0x3a7ef6(0x18e)]=_0xec7f9a[_0x3a7ef6(0x1b1)](':')[0x1][_0x3a7ef6(0x1bd)]())):(_0xd63f81[_0x3a7ef6(0xd2)](_0x25f83d['TXvjr'])&&(_0x56a586[_0x3a7ef6(0xd6)]=_0x584a31[_0x3a7ef6(0x1b1)](':')[0x1]['trim']()),_0x1406c7[_0x3a7ef6(0xd2)](_0x25f83d[_0x3a7ef6(0x103)])&&(_0x29190c[_0x3a7ef6(0x18e)]=_0xe4f595[_0x3a7ef6(0x1b1)](':')[0x1][_0x3a7ef6(0x1bd)]()));}),_0x2c7d6e[_0x4bc4da(0xf2)](_0xa1a4f9,_0x51d02e);}else{const _0x4feb3f={'utNLw':function(_0x13ae23,_0x44b3d0){return _0x13ae23(_0x44b3d0);}},_0x26097d=_0x25f83d[_0x4bc4da(0xe2)](_0x3035d2,_0x25f83d['VzkdJ'],['-s',_0x25f83d['Wmspv'],'1',_0x25f83d[_0x4bc4da(0xff)],'2','http://localhost:'+_0x151b5e+_0x4bc4da(0xe8)]);let _0x15569d='';_0x26097d[_0x4bc4da(0x11d)]['on'](_0x25f83d['xTxOr'],_0x58dff5=>{const _0x34b6a4=_0x4bc4da;_0x15569d+=_0x58dff5[_0x34b6a4(0x124)]();}),_0x26097d['on'](_0x25f83d[_0x4bc4da(0x1a9)],()=>{const _0x248151=_0x4bc4da;_0x4feb3f[_0x248151(0x112)](_0x47c01d,_0x15569d['includes'](_0x248151(0xd9)));}),_0x25f83d[_0x4bc4da(0x18a)](_0x199bba,()=>{const _0x48793c=_0x4bc4da;_0x26097d['kill'](),_0x25f83d[_0x48793c(0x125)](_0x383e40,![]);},0x9c4);}}else _0x4bc4da(0x198)===_0x2c7d6e[_0x4bc4da(0x108)]?_0x14f768=_0x25f83d[_0x4bc4da(0x17d)]:_0x2c7d6e[_0x4bc4da(0x131)](_0xa1a4f9,null);}),_0x47cd8d['on'](_0x5cbcba[_0x4abdf3(0x11f)],()=>{const _0x3fbfe2=_0x4abdf3;_0x5cbcba[_0x3fbfe2(0x199)]('NbvkO','EvstY')?_0x1a4c34[_0x3fbfe2(0x19a)]({'name':_0x3fbfe2(0x122)+_0x194204[_0x3fbfe2(0xfe)](0x0,0x8),'udid':_0x5f2338[_0x3fbfe2(0x1bd)](),'platform':UJoExr[_0x3fbfe2(0xf4)],'type':_0x3fbfe2(0x12a),'connectionType':_0x3fbfe2(0x12a),'status':'unknown'}):_0x5cbcba[_0x3fbfe2(0xd7)](_0xa1a4f9,null);});}});}async function loadDevicesFromConfig(){const _0x45830c=_0x13ec13,_0x5031c4={'DReYb':function(_0x4377dd,_0x43872e){return _0x4377dd(_0x43872e);},'nsBmT':function(_0x320c14,_0x9b3a52){return _0x320c14||_0x9b3a52;},'RdAxH':_0x45830c(0x162),'UCsCA':function(_0x148c24,_0x3953a4){return _0x148c24!==_0x3953a4;},'wIgUd':'dDqfk','ewtLj':_0x45830c(0x177),'bTdhW':function(_0x1a6fdf,_0x57787e){return _0x1a6fdf<_0x57787e;},'OWIjk':function(_0x184609,_0x22820c){return _0x184609===_0x22820c;},'teuGn':_0x45830c(0xdb),'seaHs':function(_0x10733a,_0x574e38){return _0x10733a>_0x574e38;},'CmvCO':_0x45830c(0x14c),'VUMIV':'unknown','LpVGg':_0x45830c(0xec),'ZLyxs':_0x45830c(0x15a),'hIiEg':'xmQNd'};try{const _0x4c786b=await fs[_0x45830c(0x13f)](DEVICE_CONFIG,_0x5031c4['LpVGg']),_0x4b008a=_0x4c786b[_0x45830c(0x1b1)]('\x0a')[_0x45830c(0xe1)](_0x269c49=>_0x269c49[_0x45830c(0x1bd)]()&&!_0x269c49[_0x45830c(0x144)]('#'))[_0x45830c(0x1ab)](_0x203e19=>{const _0x166b1b=_0x45830c,_0x3e5bd8=_0x203e19[_0x166b1b(0x1b1)](',')['map'](_0x33f91f=>_0x33f91f[_0x166b1b(0x1bd)]()),[_0x2e1b75,_0x1ca8c7,_0x6adcc4,_0x7085b5,_0x39d1be]=_0x3e5bd8;let _0x3087d9=_0x5031c4[_0x166b1b(0x14a)](_0x7085b5,_0x5031c4[_0x166b1b(0x135)]);if(!_0x7085b5){if(_0x5031c4['UCsCA'](_0x5031c4[_0x166b1b(0x1c0)],'yUYsW')){if(_0x1ca8c7&&_0x1ca8c7[_0x166b1b(0xd2)](':')&&_0x1ca8c7[_0x166b1b(0x151)](/^\d+\.\d+\.\d+\.\d+:\d+$/))_0x3087d9=_0x5031c4[_0x166b1b(0x117)];else{if(_0x1ca8c7&&_0x5031c4['bTdhW'](_0x1ca8c7['length'],0x14)&&!_0x1ca8c7[_0x166b1b(0xd2)]('-'))_0x5031c4[_0x166b1b(0x197)](_0x5031c4[_0x166b1b(0x1a0)],_0x5031c4['teuGn'])?_0x3087d9=_0x5031c4[_0x166b1b(0x117)]:(_0x13d156[_0x166b1b(0x1d2)](),_0x5031c4['DReYb'](_0x1fed46,![]));else _0x1ca8c7&&_0x1ca8c7[_0x166b1b(0xd2)]('-')&&_0x5031c4[_0x166b1b(0x1d0)](_0x1ca8c7[_0x166b1b(0x195)],0x1e)&&(_0x5031c4[_0x166b1b(0x197)](_0x166b1b(0x14c),_0x5031c4[_0x166b1b(0xd3)])?_0x3087d9=_0x5031c4[_0x166b1b(0x135)]:_0x295ddf[_0x166b1b(0x18e)]=_0x2b44e5[_0x166b1b(0x1b1)](':')[0x1][_0x166b1b(0x1bd)]());}}else _0x48a113[_0x166b1b(0x1cc)](_0xb5374b[_0x166b1b(0x14d)](_0x3afba5,null,0x2));}const _0x1706e1=_0x39d1be||(_0x6adcc4?_0x166b1b(0x12c):'usb');return{'name':_0x2e1b75,'udid':_0x1ca8c7,'ip':_0x5031c4[_0x166b1b(0x14a)](_0x6adcc4,''),'platform':_0x3087d9,'type':_0x1706e1,'connectionType':_0x1706e1,'status':_0x5031c4[_0x166b1b(0x142)]};});return _0x4b008a;}catch(_0x58d1cf){if(_0x5031c4['ZLyxs']!==_0x5031c4[_0x45830c(0x1b6)])return[];else _0x41d8a8=_0x293f3a[_0x45830c(0xe7)](_0x57a23f,_0x45830c(0x1c6));}}async function loadWirelessDevices(){const _0x2a17f0=_0x13ec13,_0x21aabb={'bURsh':function(_0x3890af){return _0x3890af();}},_0x347c78=await _0x21aabb['bURsh'](loadDevicesFromConfig);return _0x347c78[_0x2a17f0(0xe1)](_0x52a82a=>_0x52a82a['ip']);}async function saveUSBDeviceToConfig(_0x52ffe6){const _0x17971e=_0x13ec13,_0x22335a={'FWujf':_0x17971e(0x104),'xczfB':function(_0x55c305,_0x1693e2){return _0x55c305(_0x1693e2);},'kVXCH':function(_0x1f1e19,_0x311763){return _0x1f1e19(_0x311763);},'OtqWf':_0x17971e(0xd9),'nvJGk':function(_0x43b8a7,_0x53a2d4,_0x16de39){return _0x43b8a7(_0x53a2d4,_0x16de39);},'kLhqZ':_0x17971e(0x14b),'zWQmo':'--connect-timeout','DYJXe':'--max-time','yWYgL':'data','cPlww':function(_0x35b171,_0x2b6375,_0xe7cfd9){return _0x35b171(_0x2b6375,_0xe7cfd9);},'WBGTQ':function(_0x8b1de2,_0x4934f8){return _0x8b1de2===_0x4934f8;},'jOSoj':_0x17971e(0x111),'OgOuD':function(_0xfa42a){return _0xfa42a();},'iwTFx':function(_0x4d5938,_0x465bb5){return _0x4d5938!==_0x465bb5;},'nVwCl':'ADFBe','ZvpBq':_0x17971e(0xec),'hlTrr':function(_0x449488,_0x438707){return _0x449488===_0x438707;},'rZZAn':_0x17971e(0x1d1),'rdEeR':'Failed\x20to\x20save\x20USB\x20device\x20to\x20config:'};try{if(_0x22335a[_0x17971e(0x138)]('cXcJh',_0x22335a[_0x17971e(0x169)])){const _0x2f90c6=await _0x22335a[_0x17971e(0xea)](loadDevicesFromConfig),_0x1f8e50=_0x2f90c6['some'](_0xeddd08=>_0xeddd08['udid']===_0x52ffe6[_0x17971e(0x158)]);if(!_0x1f8e50){if(_0x22335a[_0x17971e(0x100)](_0x22335a[_0x17971e(0xfd)],_0x22335a['nVwCl']))_0x3e6872[_0x17971e(0x132)](YJJMkN[_0x17971e(0x119)]),_0x42a386=null;else{let _0x53b4e3='';try{_0x53b4e3=await fs[_0x17971e(0x13f)](DEVICE_CONFIG,_0x22335a[_0x17971e(0x146)]);}catch(_0x134624){_0x22335a[_0x17971e(0x16d)](_0x22335a[_0x17971e(0x165)],_0x22335a[_0x17971e(0x165)])?_0x53b4e3='#\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':_0x71b013+=_0x19d4f4[_0x17971e(0x124)]();}const _0x9d3c46=_0x52ffe6[_0x17971e(0x193)]||_0x17971e(0x162),_0x34001c=_0x52ffe6[_0x17971e(0xd6)]+','+_0x52ffe6['udid']+',,'+_0x9d3c46+',usb\x0a';return _0x53b4e3+=_0x34001c,await fs[_0x17971e(0x19d)](DEVICE_CONFIG,_0x53b4e3,_0x22335a[_0x17971e(0x146)]),console['log'](_0x17971e(0x145)+_0x9d3c46['toUpperCase']()+_0x17971e(0x143)+_0x52ffe6['name']),!![];}}return![];}else{const _0x5000d7={'EUDRP':function(_0xa7bb33,_0x5e64f6){const _0x2ff665=_0x17971e;return _0x22335a[_0x2ff665(0x161)](_0xa7bb33,_0x5e64f6);},'inAbd':_0x22335a['OtqWf']},_0x7d7f1d=_0x22335a['nvJGk'](_0x218657,_0x22335a[_0x17971e(0x1ac)],['-s',_0x22335a[_0x17971e(0xe3)],'2',_0x22335a[_0x17971e(0x1c3)],'3',_0x17971e(0x13a)+_0x332486['ip']+_0x17971e(0x16c)]);let _0x35a238='';_0x7d7f1d[_0x17971e(0x11d)]['on'](_0x22335a[_0x17971e(0x101)],_0xf014f3=>{const _0x3e13fb=_0x17971e;_0x35a238+=_0xf014f3[_0x3e13fb(0x124)]();}),_0x7d7f1d['on'](_0x17971e(0x16a),()=>{const _0x3c5c45=_0x17971e;_0x5000d7['EUDRP'](_0x2cd0ab,_0x35a238[_0x3c5c45(0xd2)](_0x5000d7[_0x3c5c45(0x196)]));}),_0x22335a[_0x17971e(0x1ba)](_0x5b5475,()=>{const _0x19cf3b=_0x17971e;_0x7d7f1d[_0x19cf3b(0x1d2)](),_0x22335a[_0x19cf3b(0x167)](_0x5a7704,![]);},0xbb8);}}catch(_0x2503cf){return console[_0x17971e(0x19b)](_0x22335a[_0x17971e(0x170)],_0x2503cf),![];}}function checkWirelessConnectivity(_0x3582b8){const _0x27f48c=_0x13ec13,_0x236095={'nyMgn':_0x27f48c(0x1a7),'zBPyd':'hMBWo','KnrgR':_0x27f48c(0xd9),'jcQKh':function(_0x185476,_0x2edf05){return _0x185476>_0x2edf05;},'otQVp':_0x27f48c(0x162),'ZCaTv':function(_0x4ba80b,_0x3d77cf){return _0x4ba80b!==_0x3d77cf;},'qIxUi':_0x27f48c(0x13e),'syBLO':function(_0x3c3809,_0x237e5e,_0x3b782b){return _0x3c3809(_0x237e5e,_0x3b782b);},'Rozei':_0x27f48c(0x18b),'iTdEt':_0x27f48c(0x16a)};return new Promise(_0x25ae8c=>{const _0x12ef13=_0x27f48c,_0xce0a89={'GOAIW':_0x236095['nyMgn'],'CNvEB':_0x236095[_0x12ef13(0x194)],'DIrfl':function(_0x8f6bc6,_0x3edc43){return _0x8f6bc6(_0x3edc43);},'RORbm':_0x236095[_0x12ef13(0x1ce)],'JesNA':'android','GXlLw':function(_0x548287,_0x118632){const _0x55df1e=_0x12ef13;return _0x236095[_0x55df1e(0x181)](_0x548287,_0x118632);},'hwlvz':_0x236095['otQVp']};if(_0x236095[_0x12ef13(0x16e)](_0x12ef13(0x18d),_0x236095[_0x12ef13(0x184)])){const _0x1a63d0=_0x236095[_0x12ef13(0x1a3)](spawn,_0x12ef13(0x14b),['-s',_0x12ef13(0x1cb),'2',_0x12ef13(0x11e),'3',_0x12ef13(0x13a)+_0x3582b8['ip']+_0x12ef13(0x16c)]);let _0x32e6e5='';_0x1a63d0[_0x12ef13(0x11d)]['on'](_0x236095[_0x12ef13(0x115)],_0x44d3e5=>{const _0x1c6a13=_0x12ef13;_0x32e6e5+=_0x44d3e5[_0x1c6a13(0x124)]();}),_0x1a63d0['on'](_0x236095[_0x12ef13(0x13b)],()=>{const _0x2926f1=_0x12ef13;if(_0xce0a89[_0x2926f1(0x140)]!==_0xce0a89[_0x2926f1(0x140)])return _0x1df92b[_0x2926f1(0x19b)](NhbPsw['GOAIW'],_0x5c5ecc),![];else _0xce0a89[_0x2926f1(0x12d)](_0x25ae8c,_0x32e6e5[_0x2926f1(0xd2)](_0xce0a89[_0x2926f1(0x110)]));}),_0x236095[_0x12ef13(0x1a3)](setTimeout,()=>{const _0x5da498=_0x12ef13;_0x1a63d0[_0x5da498(0x1d2)](),_0xce0a89[_0x5da498(0x12d)](_0x25ae8c,![]);},0xbb8);}else{if(_0x31565d&&_0x4edc36[_0x12ef13(0xd2)](':')&&_0x3cf048[_0x12ef13(0x151)](/^\d+\.\d+\.\d+\.\d+:\d+$/))_0x56bc94=NhbPsw[_0x12ef13(0x186)];else{if(_0x50ff99&&_0x4b6973['length']<0x14&&!_0xc97dca[_0x12ef13(0xd2)]('-'))_0x17a687=_0x12ef13(0x177);else _0x1f49ed&&_0x5ce0b6[_0x12ef13(0xd2)]('-')&&NhbPsw[_0x12ef13(0xe4)](_0x3af109[_0x12ef13(0x195)],0x1e)&&(_0x5561f1=NhbPsw['hwlvz']);}}});}function checkUSBWDAConnectivityOnPort(_0x2b1067){const _0x31ebe5=_0x13ec13,_0x1f4117={'jgKRi':function(_0x5ad005,_0x187c21){return _0x5ad005!==_0x187c21;},'LQAMK':_0x31ebe5(0xfb),'pEFGT':function(_0x3a78c3,_0x5f25d6){return _0x3a78c3(_0x5f25d6);},'FizMV':_0x31ebe5(0xd9),'QoLSg':function(_0x105219,_0x50492d){return _0x105219(_0x50492d);},'jGxGc':function(_0x1a11b8,_0x2cf4dd,_0x2fa359){return _0x1a11b8(_0x2cf4dd,_0x2fa359);},'sFZnC':_0x31ebe5(0x1cb),'fUqrp':'--max-time'};return new Promise(_0x183238=>{const _0x3dac3f=_0x31ebe5,_0x3b2aa7={'BfRdn':function(_0x394a6d,_0x42c2a8){const _0x3d31c2=_0x1182;return _0x1f4117[_0x3d31c2(0x19f)](_0x394a6d,_0x42c2a8);}},_0x533f15=_0x1f4117['jGxGc'](spawn,_0x3dac3f(0x14b),['-s',_0x1f4117[_0x3dac3f(0x1cd)],'1',_0x1f4117['fUqrp'],'2',_0x3dac3f(0x129)+_0x2b1067+_0x3dac3f(0xe8)]);let _0x1c852a='';_0x533f15[_0x3dac3f(0x11d)]['on'](_0x3dac3f(0x18b),_0x1e3adb=>{const _0x16cb30=_0x3dac3f;_0x1f4117[_0x16cb30(0x1b3)](_0x1f4117['LQAMK'],_0x1f4117[_0x16cb30(0x1b9)])?_0x33ba43=_0x16cb30(0x102):_0x1c852a+=_0x1e3adb[_0x16cb30(0x124)]();}),_0x533f15['on']('close',()=>{const _0x180bcd=_0x3dac3f;_0x1f4117[_0x180bcd(0x16f)](_0x183238,_0x1c852a[_0x180bcd(0xd2)](_0x1f4117[_0x180bcd(0xd8)]));}),_0x1f4117[_0x3dac3f(0x19e)](setTimeout,()=>{const _0x5a2357=_0x3dac3f;_0x533f15[_0x5a2357(0x1d2)](),_0x3b2aa7['BfRdn'](_0x183238,![]);},0x9c4);});}function _0x1182(_0xf79d58,_0x3dc0e5){_0xf79d58=_0xf79d58-0xd2;const _0x219e30=_0x219e();let _0x118252=_0x219e30[_0xf79d58];if(_0x1182['NWxSfk']===undefined){var _0x2610b0=function(_0x207d07){const _0x3b4ed5='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x14e4c7='',_0xeed028='';for(let _0x557ae8=0x0,_0x41d8a8,_0x293f3a,_0x57a23f=0x0;_0x293f3a=_0x207d07['charAt'](_0x57a23f++);~_0x293f3a&&(_0x41d8a8=_0x557ae8%0x4?_0x41d8a8*0x40+_0x293f3a:_0x293f3a,_0x557ae8++%0x4)?_0x14e4c7+=String['fromCharCode'](0xff&_0x41d8a8>>(-0x2*_0x557ae8&0x6)):0x0){_0x293f3a=_0x3b4ed5['indexOf'](_0x293f3a);}for(let _0x2cc3e6=0x0,_0x44b36f=_0x14e4c7['length'];_0x2cc3e6<_0x44b36f;_0x2cc3e6++){_0xeed028+='%'+('00'+_0x14e4c7['charCodeAt'](_0x2cc3e6)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0xeed028);};_0x1182['vnEnya']=_0x2610b0,_0x1182['OucPuK']={},_0x1182['NWxSfk']=!![];}const _0x52cdb2=_0x219e30[0x0],_0x21762d=_0xf79d58+_0x52cdb2,_0x127c0d=_0x1182['OucPuK'][_0x21762d];return!_0x127c0d?(_0x118252=_0x1182['vnEnya'](_0x118252),_0x1182['OucPuK'][_0x21762d]=_0x118252):_0x118252=_0x127c0d,_0x118252;}async function discoverAllDevices(){const _0x49e419=_0x13ec13,_0x4337ec={'psoVE':_0x49e419(0x187),'NSWbt':_0x49e419(0x162),'DxTjQ':_0x49e419(0x160),'gAcOA':function(_0x195c5a,_0x3b2821){return _0x195c5a===_0x3b2821;},'wRYAX':function(_0x22c3ce,_0x647330){return _0x22c3ce(_0x647330);},'wbdyx':function(_0x346557,_0x4129ac){return _0x346557===_0x4129ac;},'waeNY':function(_0x36bfaa,_0x1a8cc7){return _0x36bfaa!==_0x1a8cc7;},'JMnWr':_0x49e419(0x126),'OXTGn':_0x49e419(0x12c),'BBJJV':_0x49e419(0xeb),'DmNmx':'offline','yVWNq':_0x49e419(0x105),'kbfIm':_0x49e419(0x1ca),'ZJIXV':_0x49e419(0x19b),'jIIDH':function(_0x1ce054){return _0x1ce054();},'deGET':function(_0xda81ee,_0x11ba2e){return _0xda81ee!==_0x11ba2e;},'uCBDl':'xqDAe','AeoGD':'votdO','cJGCZ':function(_0xa27bb4,_0x525963){return _0xa27bb4+_0x525963;},'bUMSs':function(_0x165dc5,_0x180076){return _0x165dc5===_0x180076;},'UwXmR':function(_0x4430d4){return _0x4430d4();}},_0x5a96ed=await _0x4337ec[_0x49e419(0xd4)](detectUSBDevices),_0x202795=0x1fa4;for(let _0x19e65d=0x0;_0x19e65d<_0x5a96ed[_0x49e419(0x195)];_0x19e65d++){if(_0x4337ec[_0x49e419(0x192)](_0x4337ec[_0x49e419(0xf3)],_0x4337ec['uCBDl']))_0x228e49['error'](eccZPw['psoVE'],_0x4ad891[_0x49e419(0x15d)]);else{const _0x3bc308=_0x5a96ed[_0x19e65d];if(_0x4337ec[_0x49e419(0x173)](_0x3bc308[_0x49e419(0x193)],_0x4337ec[_0x49e419(0x155)])){if(_0x49e419(0xed)!==_0x4337ec[_0x49e419(0x17a)]){const _0x26a5e4=await _0x4337ec[_0x49e419(0x1b7)](getUSBDeviceInfo,_0x3bc308[_0x49e419(0x158)]);if(_0x26a5e4){if(_0x26a5e4[_0x49e419(0xd6)])_0x3bc308[_0x49e419(0xd6)]=_0x26a5e4[_0x49e419(0xd6)];if(_0x26a5e4['osVersion'])_0x3bc308['osVersion']=_0x26a5e4['osVersion'];}_0x3bc308[_0x49e419(0x1c9)]=_0x49e419(0x12a);const _0x4a5f43=_0x4337ec[_0x49e419(0xe0)](_0x202795,_0x19e65d),_0xb574d6=await _0x4337ec[_0x49e419(0x1b7)](checkUSBWDAConnectivityOnPort,_0x4a5f43);_0x3bc308['status']=_0xb574d6?_0x4337ec[_0x49e419(0xd5)]:_0x4337ec[_0x49e419(0x10a)],_0x3bc308['port']=_0x4a5f43;}else{const _0x49589c={};_0x49589c[_0x49e419(0x178)]=eccZPw['NSWbt'],_0x49589c['FtkSW']=eccZPw[_0x49e419(0x1b8)];const _0xde7d0a=_0x49589c,_0x23e110=_0x1ba981[_0x49e419(0x1bd)]()[_0x49e419(0x1b1)]('\x0a')[_0x49e419(0xe1)](_0x4c70ea);_0x23e110[_0x49e419(0x141)](_0x434f36=>{const _0x8f3dcb=_0x49e419;_0xcea35e[_0x8f3dcb(0x19a)]({'name':'iOS-'+_0x434f36[_0x8f3dcb(0xfe)](0x0,0x8),'udid':_0x434f36[_0x8f3dcb(0x1bd)](),'platform':_0xde7d0a['xWyEd'],'type':'usb','connectionType':_0x8f3dcb(0x12a),'status':_0xde7d0a[_0x8f3dcb(0x180)]});});}}else _0x4337ec[_0x49e419(0x11c)](_0x3bc308[_0x49e419(0x193)],_0x49e419(0x177))&&(_0x3bc308[_0x49e419(0x17b)]=_0x3bc308[_0x49e419(0x17b)]||_0x4337ec[_0x49e419(0xd5)]);await saveUSBDeviceToConfig(_0x3bc308);}}const _0x249acf=await _0x4337ec['UwXmR'](loadWirelessDevices),_0x5b654a=_0x249acf[_0x49e419(0x1ab)](async _0x4d09f7=>{const _0x5837dc=_0x49e419;try{let _0x4efd93=![];if(_0x4337ec[_0x5837dc(0x147)](_0x4d09f7[_0x5837dc(0x193)],_0x4337ec['NSWbt']))_0x4efd93=await _0x4337ec['wRYAX'](checkWirelessConnectivity,_0x4d09f7);else{if(_0x4337ec[_0x5837dc(0x173)](_0x4d09f7[_0x5837dc(0x193)],_0x5837dc(0x177))&&androidDetection){if(_0x4337ec[_0x5837dc(0x16b)](_0x4337ec['JMnWr'],_0x5837dc(0x174)))try{const _0x289bdd=await androidDetection[_0x5837dc(0xf0)]();_0x4efd93=_0x289bdd[_0x5837dc(0x109)](_0x2d4188=>_0x2d4188[_0x5837dc(0x158)]===_0x4d09f7['udid']||_0x2d4188[_0x5837dc(0x15e)]===_0x4d09f7[_0x5837dc(0x158)]);}catch(_0x24de94){_0x4efd93=![];}else!_0x4cc5ee[_0x5837dc(0x191)](_0x1b9bb9['udid'])&&_0x1de953[_0x5837dc(0x19a)](_0x1e41c1);}}const _0x543e81={..._0x4d09f7};return _0x543e81[_0x5837dc(0x1c9)]=_0x4337ec[_0x5837dc(0x1ad)],_0x543e81[_0x5837dc(0x17b)]=_0x4efd93?_0x4337ec[_0x5837dc(0xd5)]:_0x4337ec[_0x5837dc(0x10a)],_0x543e81;}catch(_0x37b7dc){if(_0x4337ec[_0x5837dc(0x173)](_0x4337ec[_0x5837dc(0x150)],_0x4337ec['kbfIm']))_0x17e131+=_0x35a159['toString']();else{const _0xe2e584={..._0x4d09f7};return _0xe2e584[_0x5837dc(0x1c9)]=_0x4337ec[_0x5837dc(0x1ad)],_0xe2e584[_0x5837dc(0x17b)]=_0x4337ec[_0x5837dc(0x176)],_0xe2e584;}}}),_0x4e6d59=await Promise['all'](_0x5b654a),_0x671159=[..._0x5a96ed],_0x593f7a=new Set(_0x5a96ed[_0x49e419(0x1ab)](_0x162ba0=>_0x162ba0[_0x49e419(0x158)]));return _0x4e6d59[_0x49e419(0x141)](_0x48869b=>{const _0x21aba0=_0x49e419;!_0x593f7a[_0x21aba0(0x191)](_0x48869b[_0x21aba0(0x158)])&&_0x671159[_0x21aba0(0x19a)](_0x48869b);}),_0x671159;}require[_0x13ec13(0x10b)]===module&&((async()=>{const _0xb26299=_0x13ec13,_0x485f33={'pdOja':function(_0x4495a7,_0x292763){return _0x4495a7(_0x292763);},'ZjtpY':'./androidDeviceDetection','BBRKT':_0xb26299(0x162),'GPNFf':_0xb26299(0x12a),'haRHo':function(_0x357c80,_0x204884){return _0x357c80===_0x204884;},'dBoCE':'online','WXxTM':'connected','pHRyL':function(_0x256246,_0x29a0ef){return _0x256246+_0x29a0ef;},'eewHT':function(_0x1ab455){return _0x1ab455();},'TiFqv':_0xb26299(0xdd),'SUILx':'❌\x20No\x20devices\x20found\x0a','vcWWT':_0xb26299(0xfc),'xsFWy':_0xb26299(0x10d),'mAfdr':_0xb26299(0xf8),'YTnZx':_0xb26299(0x188),'wRLCn':'\x20\x20\x20\x20-\x20USB\x20debugging\x20is\x20enabled','LcnBR':'\x20\x20\x20\x20-\x20Device\x20is\x20authorized\x20(check\x20device\x20screen)','kprKO':_0xb26299(0x10c),'LbIUV':_0xb26299(0x159),'oXhoH':_0xb26299(0x1c1),'hXSih':_0xb26299(0x136)};console[_0xb26299(0x1cc)](_0xb26299(0x1be));const _0x1673aa=await _0x485f33['eewHT'](discoverAllDevices);_0x1673aa[_0xb26299(0x195)]===0x0&&(_0x485f33[_0xb26299(0x116)]===_0x485f33['TiFqv']?(console[_0xb26299(0x1cc)](_0x485f33['SUILx']),console[_0xb26299(0x1cc)](_0x485f33[_0xb26299(0x190)]),console['log'](_0x485f33['xsFWy']),console[_0xb26299(0x1cc)](_0x485f33[_0xb26299(0x17f)]),console[_0xb26299(0x1cc)](_0xb26299(0x10e)),console[_0xb26299(0x1cc)](_0xb26299(0x106)),console[_0xb26299(0x1cc)](_0x485f33[_0xb26299(0x164)]),console[_0xb26299(0x1cc)](_0x485f33[_0xb26299(0x17c)]),console[_0xb26299(0x1cc)](_0x485f33['LcnBR']),console[_0xb26299(0x1cc)](_0x485f33['kprKO']),process[_0xb26299(0x179)](0x1)):_0x38cd0a=ygwXJC[_0xb26299(0x123)](_0x437d95,ygwXJC[_0xb26299(0xf7)])),console['log'](_0xb26299(0x137)+_0x1673aa[_0xb26299(0x195)]+'\x20device(s):\x0a'),_0x1673aa[_0xb26299(0x141)]((_0x557953,_0x8e3963)=>{const _0x4d249a=_0xb26299,_0x26fc82=_0x557953[_0x4d249a(0x193)]||_0x485f33[_0x4d249a(0xda)],_0x49996d=_0x557953[_0x4d249a(0x13d)]||_0x557953['connectionType']||_0x485f33[_0x4d249a(0x12f)],_0x158490=_0x485f33['haRHo'](_0x26fc82,_0x485f33['BBRKT'])?'🍎':'🤖',_0x947663=_0x49996d===_0x485f33[_0x4d249a(0x12f)]?'🔌':'📡',_0x46b973=_0x557953[_0x4d249a(0x17b)]===_0x485f33['dBoCE']?'✅':_0x557953[_0x4d249a(0x17b)]===_0x485f33[_0x4d249a(0x1bf)]?'✅':'⚠️';console[_0x4d249a(0x1cc)](_0x485f33[_0x4d249a(0x128)](_0x8e3963,0x1)+'.\x20'+_0x158490+'\x20'+_0x947663+'\x20'+_0x557953['name']+'\x20('+_0x26fc82['toUpperCase']()+_0x4d249a(0x17e)+_0x49996d[_0x4d249a(0xe5)]()+')\x20'+_0x46b973),console['log'](_0x4d249a(0x1b5)+(_0x557953[_0x4d249a(0x158)]||_0x557953[_0x4d249a(0x15e)]));if(_0x557953['ip'])console['log'](_0x4d249a(0x1a5)+_0x557953['ip']);if(_0x557953['androidVersion'])console[_0x4d249a(0x1cc)](_0x4d249a(0xf1)+_0x557953['androidVersion']);console[_0x4d249a(0x1cc)]('');}),process['argv']['includes'](_0x485f33[_0xb26299(0x1d5)])&&(_0x485f33[_0xb26299(0x1bc)]===_0x485f33[_0xb26299(0x1c7)]?_0x573da4=![]:console['log'](JSON[_0xb26299(0x14d)](_0x1673aa,null,0x2)));})());const _0x2e9527={};_0x2e9527[_0x13ec13(0x168)]=detectUSBDevices,_0x2e9527['getUSBDeviceInfo']=getUSBDeviceInfo,_0x2e9527[_0x13ec13(0xe9)]=loadDevicesFromConfig,_0x2e9527[_0x13ec13(0xf9)]=loadWirelessDevices,_0x2e9527[_0x13ec13(0x13c)]=checkWirelessConnectivity,_0x2e9527[_0x13ec13(0x134)]=checkUSBWDAConnectivityOnPort,_0x2e9527[_0x13ec13(0x1b2)]=saveUSBDeviceToConfig,_0x2e9527[_0x13ec13(0x182)]=discoverAllDevices,module[_0x13ec13(0x1cf)]=_0x2e9527;
|
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 _0xde9100=_0x5881;(function(_0x4f55f0,_0x2ee40b){const _0x52d3a5=_0x5881,_0x4763be=_0x4f55f0();while(!![]){try{const _0x2244b1=-parseInt(_0x52d3a5(0x140))/0x1+-parseInt(_0x52d3a5(0x168))/0x2*(-parseInt(_0x52d3a5(0x162))/0x3)+parseInt(_0x52d3a5(0x14d))/0x4*(parseInt(_0x52d3a5(0x14a))/0x5)+parseInt(_0x52d3a5(0x159))/0x6*(-parseInt(_0x52d3a5(0x15d))/0x7)+parseInt(_0x52d3a5(0x14e))/0x8*(-parseInt(_0x52d3a5(0x14c))/0x9)+parseInt(_0x52d3a5(0x155))/0xa*(parseInt(_0x52d3a5(0x144))/0xb)+parseInt(_0x52d3a5(0x163))/0xc;if(_0x2244b1===_0x2ee40b)break;else _0x4763be['push'](_0x4763be['shift']());}catch(_0x259c35){_0x4763be['push'](_0x4763be['shift']());}}}(_0x39bc,0xbaa4a));let discoverAllDevices;try{({discoverAllDevices}=require('./deviceDetection'));}catch(_0x53ae1f){({discoverAllDevices}=require('../../deviceDetection'));}function _0x5881(_0x5e74a0,_0x2fac95){_0x5e74a0=_0x5e74a0-0x13b;const _0x39bc7e=_0x39bc();let _0x588188=_0x39bc7e[_0x5e74a0];if(_0x5881['XssZbT']===undefined){var _0x3fc1e6=function(_0x271eda){const _0x3a09da='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x2d5502='',_0x38a55d='';for(let _0x1290bd=0x0,_0x261ba3,_0x446af7,_0x596303=0x0;_0x446af7=_0x271eda['charAt'](_0x596303++);~_0x446af7&&(_0x261ba3=_0x1290bd%0x4?_0x261ba3*0x40+_0x446af7:_0x446af7,_0x1290bd++%0x4)?_0x2d5502+=String['fromCharCode'](0xff&_0x261ba3>>(-0x2*_0x1290bd&0x6)):0x0){_0x446af7=_0x3a09da['indexOf'](_0x446af7);}for(let _0x5873bf=0x0,_0x518ffc=_0x2d5502['length'];_0x5873bf<_0x518ffc;_0x5873bf++){_0x38a55d+='%'+('00'+_0x2d5502['charCodeAt'](_0x5873bf)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x38a55d);};_0x5881['pXlcYU']=_0x3fc1e6,_0x5881['GZPOYT']={},_0x5881['XssZbT']=!![];}const _0x288d13=_0x39bc7e[0x0],_0x1ed70a=_0x5e74a0+_0x288d13,_0x252d49=_0x5881['GZPOYT'][_0x1ed70a];return!_0x252d49?(_0x588188=_0x5881['pXlcYU'](_0x588188),_0x5881['GZPOYT'][_0x1ed70a]=_0x588188):_0x588188=_0x252d49,_0x588188;}function _0x39bc(){const _0x2f14ff=['tKvjDgG','m3fHtMHrqq','mJy0ota5otzIyM1oDLq','BgvUz3rO','mxWYFdr8m3WW','DLPXvKm','B3nwzxjZAw9U','nZG1ndq2DhjMtenn','igrLDMLJzsHZktOk','DhLWzq','cUkCHsbgB3vUzca','ChbjC0m','icaGvurjrdOG','mtiWmJC0nhblqNj3ua','icaGug9YDdOG','sgfYEfG','B25SAw5L','mtfOr0vqsvi','t2jsBK4','zu5eELK','Bg9N','zxHWB3j0CW','C3bSAxq','mtv3q0DfC3a','wNrJA08','ndvSvvf0Egq','otuZodbTDgL5sgO','mtyWnJa2nefVB2jjsG','AKHOtxC','cVcFKQeGvgLWCZO','wuj4wNy','lI9KzxzPy2vezxrLy3rPB24','DwrPza','DMvYyM9Zzq','mtm1mtiXnZbVuvjQz3a','CgXHDgzVCM0','Cg9YDa','icaGugXHDgzVCM06ia','oda0C21dBMnJ','Cefbwfe','icaG4OcIiezVCIbbBMrYB2LKoIbfBMfIBguGvvncigrLyNvNz2LUzYbHBMqGy29UBMvJDcbKzxzPy2u','cVcFKQeGvxnLic0TDMvYyM9ZzsbMB3iGzgv0ywLSzwqGAw5MB3jTyxrPB24','ntq5ntDWCxjTDvC','icaGu3rHDhvZoIa','C3rHDhvZ','wvDTtfu'];_0x39bc=function(){return _0x2f14ff;};return _0x39bc();}async function listDevices(_0x51085c={}){const _0x41bdbb=_0x5881,_0x76edcd={'kGqrn':_0x41bdbb(0x165),'YBxZv':'\x0a⚠️\x20\x20No\x20devices\x20found','ppIsC':_0x41bdbb(0x150),'HarxX':_0x41bdbb(0x15b),'YWmLU':'\x20\x20\x20•\x20For\x20iOS:\x20Connect\x20device\x20via\x20USB\x20or\x20ensure\x20Xcode\x20pairing','SQjZb':function(_0x47ef28,_0x1b0e23){return _0x47ef28!==_0x1b0e23;},'RJCOa':_0x41bdbb(0x166),'ObRnN':function(_0x2a05e5,_0x46d4fa){return _0x2a05e5===_0x46d4fa;},'xVQXz':'ios','jHhMw':function(_0x133478,_0x3b5934){return _0x133478+_0x3b5934;},'YONkb':'1|2|4|3|6|5|0','QvAnZ':function(_0x33c607,_0x4ca32d){return _0x33c607(_0x4ca32d);},'pAAXQ':_0x41bdbb(0x152),'xAGwy':function(_0x10133c){return _0x10133c();},'TpXRv':_0x41bdbb(0x146),'NEIth':_0x41bdbb(0x14b)},_0x4d753b=await _0x76edcd['xAGwy'](discoverAllDevices);if(!_0x4d753b||_0x4d753b['length']===0x0){console[_0x41bdbb(0x147)](_0x76edcd[_0x41bdbb(0x151)]),console[_0x41bdbb(0x147)]('\x0a💡\x20Tips:'),console['log'](_0x76edcd[_0x41bdbb(0x160)]),console['log'](_0x76edcd[_0x41bdbb(0x142)]);return;}console[_0x41bdbb(0x147)](_0x41bdbb(0x13d)+_0x4d753b[_0x41bdbb(0x164)]+_0x41bdbb(0x13b)),_0x4d753b['forEach']((_0x18af9c,_0x52c6e5)=>{const _0x44c784=_0x41bdbb;if(_0x76edcd['SQjZb'](_0x44c784(0x166),_0x76edcd['RJCOa'])){const _0x368e2c=_0x76edcd['kGqrn'][_0x44c784(0x149)]('|');let _0x203bad=0x0;while(!![]){switch(_0x368e2c[_0x203bad++]){case'0':return;case'1':_0x45bc78[_0x44c784(0x147)](_0x76edcd[_0x44c784(0x151)]);continue;case'2':_0x475d22[_0x44c784(0x147)](_0x76edcd[_0x44c784(0x13e)]);continue;case'3':_0xf4d0d7[_0x44c784(0x147)](_0x76edcd[_0x44c784(0x142)]);continue;case'4':_0x4c9066[_0x44c784(0x147)](_0x76edcd[_0x44c784(0x160)]);continue;}break;}}else{const _0x3a2ae5=_0x76edcd[_0x44c784(0x145)](_0x18af9c[_0x44c784(0x15f)],_0x44c784(0x143))?'🟢':'🔴',_0x307167=_0x18af9c[_0x44c784(0x156)]===_0x76edcd['xVQXz']?'🍎':'🤖';console[_0x44c784(0x147)](_0x76edcd[_0x44c784(0x14f)](_0x52c6e5,0x1)+'.\x20'+_0x3a2ae5+'\x20'+_0x307167+'\x20'+_0x18af9c['name']);if(_0x51085c[_0x44c784(0x154)]){const _0x59a30d=_0x76edcd['YONkb'][_0x44c784(0x149)]('|');let _0x2b198a=0x0;while(!![]){switch(_0x59a30d[_0x2b198a++]){case'0':console[_0x44c784(0x147)]('');continue;case'1':console['log'](_0x44c784(0x158)+_0x18af9c[_0x44c784(0x156)]);continue;case'2':console['log'](_0x44c784(0x13f)+_0x18af9c[_0x44c784(0x153)]);continue;case'3':console['log'](_0x44c784(0x15e)+_0x18af9c[_0x44c784(0x15f)]);continue;case'4':console[_0x44c784(0x147)]('\x20\x20\x20Type:\x20'+_0x18af9c[_0x44c784(0x13c)]);continue;case'5':_0x18af9c[_0x44c784(0x157)]&&console[_0x44c784(0x147)](_0x44c784(0x141)+_0x18af9c[_0x44c784(0x157)]);continue;case'6':_0x18af9c[_0x44c784(0x167)]&&console[_0x44c784(0x147)]('\x20\x20\x20OS\x20Version:\x20'+_0x18af9c[_0x44c784(0x167)]);continue;}break;}}}}),!_0x51085c[_0x41bdbb(0x154)]&&(_0x76edcd['SQjZb'](_0x76edcd['TpXRv'],_0x76edcd[_0x41bdbb(0x161)])?console['log'](_0x41bdbb(0x15c)):{discoverAllDevices:_0x1290bd}=ShuhFV['QvAnZ'](_0x261ba3,ShuhFV[_0x41bdbb(0x15a)]));}const _0x3daf1f={};_0x3daf1f['listDevices']=listDevices,module[_0xde9100(0x148)]=_0x3daf1f;
|