devicely 2.2.4 → 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 -0
- 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 -20
- 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/lib/frontend/static/js/main.223106ce.js +0 -3
- package/lib/frontend/static/js/main.26a24c5c.js.LICENSE.txt +0 -48
- package/lib/frontend/static/js/main.31418566.js +0 -3
- package/lib/frontend/static/js/main.31418566.js.LICENSE.txt +0 -48
- package/lib/frontend/static/js/main.a507b3fc.js +0 -3
- package/lib/frontend/static/js/main.a507b3fc.js.LICENSE.txt +0 -48
- package/lib/frontend/static/js/main.e6f081bf.js +0 -3
- package/lib/frontend/static/js/main.e6f081bf.js.LICENSE.txt +0 -48
- package/scripts/compile-shell-scripts.js +0 -208
- package/scripts/encrypt-shell-simple.js +0 -75
- 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.223106ce.js.LICENSE.txt → main.4ff1ea70.js.LICENSE.txt} +0 -0
package/bin/devicely.js
CHANGED
|
@@ -1,107 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
* Devicely CLI Entry Point
|
|
5
|
-
* AI-Powered Device Pool
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
const { program } = require('commander');
|
|
9
|
-
const chalk = require('chalk');
|
|
10
|
-
const packageJson = require('../package.json');
|
|
11
|
-
const { startServer } = require('../lib/server');
|
|
12
|
-
const { listDevices } = require('../lib/devices');
|
|
13
|
-
const { checkDoctor } = require('../lib/doctor');
|
|
14
|
-
const { executeCommand } = require('../lib/executor');
|
|
15
|
-
|
|
16
|
-
// Configure CLI
|
|
17
|
-
program
|
|
18
|
-
.name('devicely')
|
|
19
|
-
.description('Devicely - One Command, All Devices. AI Powered Mobile Automation')
|
|
20
|
-
.version(packageJson.version, '-v, --version', 'Display version number')
|
|
21
|
-
.helpOption('-h, --help', 'Display help information');
|
|
22
|
-
|
|
23
|
-
// Start command - Launch server and open web UI
|
|
24
|
-
program
|
|
25
|
-
.command('start')
|
|
26
|
-
.description('Start Devicely server and open web interface')
|
|
27
|
-
.option('-p, --port <port>', 'Server port', '3001')
|
|
28
|
-
.option('--no-browser', 'Don\'t open browser automatically')
|
|
29
|
-
.option('--debug', 'Enable debug logging')
|
|
30
|
-
.option('--usb-only', 'Detect USB devices only')
|
|
31
|
-
.option('--wifi-only', 'Detect WiFi devices only')
|
|
32
|
-
.action(async (options) => {
|
|
33
|
-
try {
|
|
34
|
-
console.log(chalk.cyan.bold('\n🚀 Devicely - One Command, All Devices'));
|
|
35
|
-
console.log(chalk.gray(' AI Powered Mobile Automation'));
|
|
36
|
-
console.log(chalk.gray('━'.repeat(50)));
|
|
37
|
-
|
|
38
|
-
await startServer(options);
|
|
39
|
-
} catch (error) {
|
|
40
|
-
console.error(chalk.red('\n❌ Error:'), error.message);
|
|
41
|
-
process.exit(1);
|
|
42
|
-
}
|
|
43
|
-
});
|
|
44
|
-
|
|
45
|
-
// List command - Show connected devices
|
|
46
|
-
program
|
|
47
|
-
.command('list')
|
|
48
|
-
.description('List all connected iOS and Android devices')
|
|
49
|
-
.option('-v, --verbose', 'Show detailed device information')
|
|
50
|
-
.action(async (options) => {
|
|
51
|
-
try {
|
|
52
|
-
console.log(chalk.cyan.bold('\n📱 Scanning for devices...'));
|
|
53
|
-
console.log(chalk.gray('━'.repeat(50)));
|
|
54
|
-
|
|
55
|
-
await listDevices(options);
|
|
56
|
-
} catch (error) {
|
|
57
|
-
console.error(chalk.red('\n❌ Error:'), error.message);
|
|
58
|
-
process.exit(1);
|
|
59
|
-
}
|
|
60
|
-
});
|
|
61
|
-
|
|
62
|
-
// Doctor command - Check system requirements
|
|
63
|
-
program
|
|
64
|
-
.command('doctor')
|
|
65
|
-
.description('Check system requirements for iOS and Android automation')
|
|
66
|
-
.action(async () => {
|
|
67
|
-
try {
|
|
68
|
-
console.log(chalk.cyan.bold('\n🔍 Checking system requirements...'));
|
|
69
|
-
console.log(chalk.gray('━'.repeat(50)));
|
|
70
|
-
|
|
71
|
-
await checkDoctor();
|
|
72
|
-
} catch (error) {
|
|
73
|
-
console.error(chalk.red('\n❌ Error:'), error.message);
|
|
74
|
-
process.exit(1);
|
|
75
|
-
}
|
|
76
|
-
});
|
|
77
|
-
|
|
78
|
-
// Exec command - Execute command on devices
|
|
79
|
-
program
|
|
80
|
-
.command('exec <command>')
|
|
81
|
-
.description('Execute command on connected iOS/Android devices')
|
|
82
|
-
.option('-d, --device <name>', 'Execute on specific device')
|
|
83
|
-
.option('-a, --all', 'Execute on all devices (default)')
|
|
84
|
-
.action(async (command, options) => {
|
|
85
|
-
try {
|
|
86
|
-
console.log(chalk.cyan.bold('\n⚡ Executing command...'));
|
|
87
|
-
console.log(chalk.gray('━'.repeat(50)));
|
|
88
|
-
|
|
89
|
-
await executeCommand(command, options);
|
|
90
|
-
} catch (error) {
|
|
91
|
-
console.error(chalk.red('\n❌ Error:'), error.message);
|
|
92
|
-
process.exit(1);
|
|
93
|
-
}
|
|
94
|
-
});
|
|
95
|
-
|
|
96
|
-
// Parse arguments
|
|
97
|
-
program.parse(process.argv);
|
|
98
|
-
|
|
99
|
-
// Show help if no command provided
|
|
100
|
-
if (!process.argv.slice(2).length) {
|
|
101
|
-
program.outputHelp();
|
|
102
|
-
console.log(chalk.cyan('\n💡 Quick start:'));
|
|
103
|
-
console.log(chalk.gray(' devicely start ') + chalk.white('# Start the server'));
|
|
104
|
-
console.log(chalk.gray(' devicely list ') + chalk.white('# List devices'));
|
|
105
|
-
console.log(chalk.gray(' devicely doctor ') + chalk.white('# Check system'));
|
|
106
|
-
console.log('');
|
|
107
|
-
}
|
|
3
|
+
function _0x2c00(_0x1271bf,_0x500b45){_0x1271bf=_0x1271bf-0x10c;const _0x29aec3=_0x29ae();let _0x2c008c=_0x29aec3[_0x1271bf];if(_0x2c00['nssSad']===undefined){var _0x3462df=function(_0x5ade68){const _0x3193bd='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x5d107f='',_0x98180='';for(let _0x1d247b=0x0,_0x262158,_0x2d8c9b,_0x15fdaa=0x0;_0x2d8c9b=_0x5ade68['charAt'](_0x15fdaa++);~_0x2d8c9b&&(_0x262158=_0x1d247b%0x4?_0x262158*0x40+_0x2d8c9b:_0x2d8c9b,_0x1d247b++%0x4)?_0x5d107f+=String['fromCharCode'](0xff&_0x262158>>(-0x2*_0x1d247b&0x6)):0x0){_0x2d8c9b=_0x3193bd['indexOf'](_0x2d8c9b);}for(let _0x17fac7=0x0,_0x3bb96e=_0x5d107f['length'];_0x17fac7<_0x3bb96e;_0x17fac7++){_0x98180+='%'+('00'+_0x5d107f['charCodeAt'](_0x17fac7)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x98180);};_0x2c00['COyCUB']=_0x3462df,_0x2c00['XKnpvC']={},_0x2c00['nssSad']=!![];}const _0xebe81f=_0x29aec3[0x0],_0x30dd48=_0x1271bf+_0xebe81f,_0x1f3982=_0x2c00['XKnpvC'][_0x30dd48];return!_0x1f3982?(_0x2c008c=_0x2c00['COyCUB'](_0x2c008c),_0x2c00['XKnpvC'][_0x30dd48]=_0x2c008c):_0x2c008c=_0x1f3982,_0x2c008c;}function _0x29ae(){const _0x2e506d=['zxjYB3i','iYbtDgfYDcb0AguGC2vYDMvY','yxjNDG','CgfYC2u','uxjot2e','zg9JDg9Y','tgLZDcbHBgWGy29UBMvJDgvKigLpuYbHBMqGqw5KCM9PzcbKzxzPy2vZ','lxySic0TDMvYyM9Zzq','rw5HyMXLigrLyNvNigXVz2DPBMC','z3jHEq','AvHfv3e','ls13AwzPlw9UBhK','C3rHCNq','u3rHCNqGrgv2AwnLBhKGC2vYDMvYigfUzcbVCgvUihDLyIbPBNrLCMzHy2u','q09XDui','CNz5zLa','DMvYC2LVBG','Dw9jCxi','r0fPs3q','y3LHBG','CMvK','y29TBwfUza','rxHLy3v0zsbVBIbHBgWGzgv2AwnLCYaOzgvMyxvSDcK','D2HPDgu','mtCZmtjqEeDgwxm','uvvPBe4','lI4VBgLIl2rVy3rVCG','t3j2tK0','ntm3sw1XEKjJ','B3v0Chv0sgvSCa','ls11C2iTB25SEq','cUkDJcbfCNjVCJO','mta4uhvZuffJ','yNDdsge','rgv0zwn0ifDPrMKGzgv2AwnLCYbVBMX5','icbKzxzPy2vSEsbKB2n0B3iGica','lweSic0TywXS','lI4VBgLIl3nLCNzLCG','lwqSic0Tzgv2AwnLidXUyw1LpG','rg9Uj3qGB3bLBIbICM93C2vYigf1Dg9TyxrPy2fSBhK','ovvOCMHtBW','rgv0zwn0ifvtqIbKzxzPy2vZig9UBhK','r3flEwS','rgLZCgXHEsb2zxjZAw9Uig51BwjLCG','mtqXodmYCgThtuTK','mtCXEMnQrwrl','lwGSic0TAgvSCa','icaGquKGug93zxjLzcbnB2jPBguGqxv0B21HDgLVBG','u2vYDMvYihbVCNq','rMfKr3K','iYbdAgvJAYbZExn0zw0','AgvSCe9WDgLVBG','tfj1B1m','cVcFKQeGuxvPy2SGC3rHCNq6','D0DLs3i','lxaSic0TCg9YDca8Cg9YDd4','icbKzxzPy2vSEsbZDgfYDcaGica','nJa5nJyWChPUr0Hg','lI4VBgLIl2v4zwn1Dg9Y','wvr5uK8','s0DfuwW','ywn0Aw9U','lxySic0TDMvYC2LVBG','uvnitKm','zgvZy3jPChrPB24','B3b0Aw9U','nZaZotKYmeznAefjrW','rxHLy3v0zsbVBIbZCgvJAwzPyYbKzxzPy2u','mNWZFdb8nxW0Fde','mtaWmZbWtxvXC3y','D1P6wvu','t2vPt1G','zxHLyYa8y29TBwfUzd4','icbKzxzPy2vSEsbSAxn0icaGica','CMvWzwf0','zxHPDa','qwXbtMG','Bg9N','cVcFK7eGu2nHBM5PBMCGzM9YigrLDMLJzxmUlI4','BwvZC2fNzq','rgLZCgXHEsbOzwXWigLUzM9YBwf0Aw9U','cVcFMOaGrgv2AwnLBhKGlsbpBMuGq29TBwfUzcWGqwXSierLDMLJzxm','y29TBwfUzgvY','lI4VCgfJA2fNzs5QC29U','mtq3mZG2ohbyAeDKAq','zfvewvm','BgLZDa','yM9Sza','mJa1odDMuunsz2K','iYbmAxn0igrLDMLJzxm','z1votwW','s1zVAKe','EfnmyNy','rxHLy3v0zsbJB21Tyw5Kig9UignVBM5Ly3rLzcbPt1mVqw5KCM9PzcbKzxzPy2vZ','C2XPy2u','cUkAOsbfEgvJDxrPBMCGy29TBwfUzc4UlG','z2nABeu'];_0x29ae=function(){return _0x2e506d;};return _0x29ae();}const _0x55c7f5=_0x2c00;(function(_0x2d7cd3,_0x4e015c){const _0x376d87=_0x2c00,_0x1f1cc8=_0x2d7cd3();while(!![]){try{const _0x1779a2=parseInt(_0x376d87(0x146))/0x1*(-parseInt(_0x376d87(0x163))/0x2)+parseInt(_0x376d87(0x13a))/0x3*(parseInt(_0x376d87(0x136))/0x4)+parseInt(_0x376d87(0x157))/0x5+-parseInt(_0x376d87(0x13e))/0x6*(-parseInt(_0x376d87(0x115))/0x7)+parseInt(_0x376d87(0x14a))/0x8*(parseInt(_0x376d87(0x14b))/0x9)+-parseInt(_0x376d87(0x160))/0xa+-parseInt(_0x376d87(0x111))/0xb;if(_0x1779a2===_0x4e015c)break;else _0x1f1cc8['push'](_0x1f1cc8['shift']());}catch(_0x55ea90){_0x1f1cc8['push'](_0x1f1cc8['shift']());}}}(_0x29ae,0x62776));const {program}=require(_0x55c7f5(0x10f)),chalk=require('chalk'),packageJson=require(_0x55c7f5(0x110)),{startServer}=require(_0x55c7f5(0x143)),{listDevices}=require('../lib/devices'),{checkDoctor}=require(_0x55c7f5(0x138)),{executeCommand}=require(_0x55c7f5(0x158));program['name']('devicely')['description']('Devicely\x20-\x20One\x20Command,\x20All\x20Devices.\x20AI\x20Powered\x20Mobile\x20Automation')['version'](packageJson[_0x55c7f5(0x12e)],_0x55c7f5(0x15c),_0x55c7f5(0x149))[_0x55c7f5(0x151)](_0x55c7f5(0x14c),_0x55c7f5(0x10d)),program[_0x55c7f5(0x133)](_0x55c7f5(0x12a))[_0x55c7f5(0x15e)](_0x55c7f5(0x12b))[_0x55c7f5(0x15f)](_0x55c7f5(0x155),_0x55c7f5(0x14e),'3001')[_0x55c7f5(0x15f)]('--no-browser',_0x55c7f5(0x145))['option']('--debug',_0x55c7f5(0x126))[_0x55c7f5(0x15f)](_0x55c7f5(0x13c),_0x55c7f5(0x147))[_0x55c7f5(0x15f)](_0x55c7f5(0x129),_0x55c7f5(0x140))[_0x55c7f5(0x15b)](async _0x63d18e=>{const _0x54855d=_0x55c7f5,_0x477983={};_0x477983[_0x54855d(0x13f)]=_0x54855d(0x13d),_0x477983[_0x54855d(0x14f)]=function(_0x37538f,_0x7c7005){return _0x37538f===_0x7c7005;},_0x477983[_0x54855d(0x16a)]=_0x54855d(0x119),_0x477983[_0x54855d(0x130)]=_0x54855d(0x10e),_0x477983[_0x54855d(0x15a)]=_0x54855d(0x14d);const _0x22a44e=_0x477983;try{_0x22a44e[_0x54855d(0x14f)](_0x54855d(0x119),_0x22a44e[_0x54855d(0x16a)])?(console[_0x54855d(0x16b)](chalk[_0x54855d(0x131)][_0x54855d(0x114)](_0x22a44e[_0x54855d(0x130)])),console[_0x54855d(0x16b)](chalk['gray'](_0x22a44e[_0x54855d(0x15a)])),console[_0x54855d(0x16b)](chalk[_0x54855d(0x127)]('━'[_0x54855d(0x168)](0x32))),await startServer(_0x63d18e)):(_0x2d8c9b[_0x54855d(0x11e)](_0x15fdaa[_0x54855d(0x132)](_0x22a44e[_0x54855d(0x13f)]),_0x17fac7['message']),_0x3bb96e[_0x54855d(0x169)](0x1));}catch(_0x415fff){console[_0x54855d(0x11e)](chalk[_0x54855d(0x132)](_0x22a44e[_0x54855d(0x13f)]),_0x415fff['message']),process[_0x54855d(0x169)](0x1);}}),program[_0x55c7f5(0x133)](_0x55c7f5(0x113))['description'](_0x55c7f5(0x124))[_0x55c7f5(0x15f)](_0x55c7f5(0x125),'Show\x20detailed\x20device\x20information')[_0x55c7f5(0x15b)](async _0x379b09=>{const _0x1305cc=_0x55c7f5,_0x3faec1={'KVojA':_0x1305cc(0x16c),'gcZlE':function(_0x10f81c,_0x29e1f8){return _0x10f81c(_0x29e1f8);},'vPKMc':'\x0a❌\x20Error:'};try{console[_0x1305cc(0x16b)](chalk[_0x1305cc(0x131)][_0x1305cc(0x114)](_0x3faec1[_0x1305cc(0x118)])),console['log'](chalk[_0x1305cc(0x127)]('━'[_0x1305cc(0x168)](0x32))),await _0x3faec1[_0x1305cc(0x11d)](listDevices,_0x379b09);}catch(_0x2be89a){console[_0x1305cc(0x11e)](chalk['red'](_0x3faec1['vPKMc']),_0x2be89a['message']),process[_0x1305cc(0x169)](0x1);}}),program[_0x55c7f5(0x133)](_0x55c7f5(0x123))[_0x55c7f5(0x15e)]('Check\x20system\x20requirements\x20for\x20iOS\x20and\x20Android\x20automation')['action'](async()=>{const _0x10a2cd=_0x55c7f5,_0x1bd960={'QSHNC':'\x0a💡\x20Quick\x20start:','agCti':function(_0x1ecfd6,_0x579f8a){return _0x1ecfd6+_0x579f8a;},'dUDYS':_0x10a2cd(0x156),'QUilN':_0x10a2cd(0x167),'OrvNM':function(_0x833c94,_0x47d9f7){return _0x833c94+_0x47d9f7;},'wGeKr':'\x0a🔍\x20Checking\x20system\x20requirements...','COquB':function(_0x3f0c4a){return _0x3f0c4a();},'uoIqr':function(_0x261c75,_0x2ab9b4){return _0x261c75===_0x2ab9b4;},'xYpZM':_0x10a2cd(0x13d)};try{console[_0x10a2cd(0x16b)](chalk['cyan'][_0x10a2cd(0x114)](_0x1bd960[_0x10a2cd(0x154)])),console['log'](chalk[_0x10a2cd(0x127)]('━'[_0x10a2cd(0x168)](0x32))),await _0x1bd960[_0x10a2cd(0x12c)](checkDoctor);}catch(_0x79035f){_0x1bd960[_0x10a2cd(0x12f)](_0x10a2cd(0x164),_0x10a2cd(0x122))?(_0x387911[_0x10a2cd(0x13b)](),_0x8da9e0[_0x10a2cd(0x16b)](_0xfd9d81[_0x10a2cd(0x131)](_0x1bd960[_0x10a2cd(0x15d)])),_0x327c5b['log'](_0x1bd960['agCti'](_0x816ecb[_0x10a2cd(0x127)](_0x1bd960[_0x10a2cd(0x112)]),_0xffff4a[_0x10a2cd(0x135)](_0x10a2cd(0x11f)))),_0xaa0d32[_0x10a2cd(0x16b)](_0x13ef13[_0x10a2cd(0x127)](_0x1bd960[_0x10a2cd(0x137)])+_0x2cb7f0[_0x10a2cd(0x135)](_0x10a2cd(0x116))),_0x218b79[_0x10a2cd(0x16b)](_0x1bd960[_0x10a2cd(0x139)](_0x1b4790[_0x10a2cd(0x127)](_0x10a2cd(0x141)),_0x4300d9[_0x10a2cd(0x135)](_0x10a2cd(0x150)))),_0x1dc313[_0x10a2cd(0x16b)]('')):(console[_0x10a2cd(0x11e)](chalk['red'](_0x1bd960['xYpZM']),_0x79035f['message']),process[_0x10a2cd(0x169)](0x1));}}),program[_0x55c7f5(0x133)](_0x55c7f5(0x166))[_0x55c7f5(0x15e)](_0x55c7f5(0x11a))[_0x55c7f5(0x15f)](_0x55c7f5(0x144),_0x55c7f5(0x161))[_0x55c7f5(0x15f)](_0x55c7f5(0x142),_0x55c7f5(0x134))[_0x55c7f5(0x15b)](async(_0x3019e6,_0x290aab)=>{const _0x20505e=_0x55c7f5,_0x2e8ce4={'gUNMl':_0x20505e(0x13d),'GqKyk':_0x20505e(0x165),'rvyfP':_0x20505e(0x11c),'LRuoS':function(_0x44c3d3,_0x4f4ac6,_0x27e5aa){return _0x44c3d3(_0x4f4ac6,_0x27e5aa);},'YTyRO':function(_0x490627,_0x16ef00){return _0x490627===_0x16ef00;},'raxjg':_0x20505e(0x128)};try{_0x2e8ce4[_0x20505e(0x148)]==='OeiOX'?(console[_0x20505e(0x16b)](chalk[_0x20505e(0x131)][_0x20505e(0x114)](_0x2e8ce4[_0x20505e(0x12d)])),console['log'](chalk['gray']('━'[_0x20505e(0x168)](0x32))),await _0x2e8ce4[_0x20505e(0x152)](executeCommand,_0x3019e6,_0x290aab)):(_0x281a7a['error'](_0x5879ba[_0x20505e(0x132)](fzzZRs[_0x20505e(0x117)]),_0x1daee5[_0x20505e(0x10c)]),_0x362e22['exit'](0x1));}catch(_0x298141){_0x2e8ce4[_0x20505e(0x159)]('iXEWq',_0x2e8ce4['raxjg'])?(console['error'](chalk[_0x20505e(0x132)](_0x2e8ce4['gUNMl']),_0x298141[_0x20505e(0x10c)]),process['exit'](0x1)):(_0x6f50c4['error'](_0xeb7fa1['red'](fzzZRs[_0x20505e(0x117)]),_0x555d06[_0x20505e(0x10c)]),_0x4cc47f[_0x20505e(0x169)](0x1));}}),program[_0x55c7f5(0x121)](process[_0x55c7f5(0x120)]);if(!process['argv'][_0x55c7f5(0x11b)](0x2)['length']){const MXkkfk=_0x55c7f5(0x162)['split']('|');let oswVGJ=0x0;while(!![]){switch(MXkkfk[oswVGJ++]){case'0':console['log'](chalk[_0x55c7f5(0x127)]('\x20\x20devicely\x20start\x20\x20\x20\x20')+chalk['white'](_0x55c7f5(0x11f)));continue;case'1':console['log']('');continue;case'2':program[_0x55c7f5(0x13b)]();continue;case'3':console[_0x55c7f5(0x16b)](chalk[_0x55c7f5(0x131)](_0x55c7f5(0x153)));continue;case'4':console[_0x55c7f5(0x16b)](chalk[_0x55c7f5(0x127)](_0x55c7f5(0x141))+chalk[_0x55c7f5(0x135)](_0x55c7f5(0x150)));continue;case'5':console['log'](chalk[_0x55c7f5(0x127)](_0x55c7f5(0x167))+chalk[_0x55c7f5(0x135)](_0x55c7f5(0x116)));continue;}break;}}
|
package/config/devices.conf
CHANGED
|
@@ -1,24 +1,8 @@
|
|
|
1
1
|
# Device Configuration (Auto-updated)
|
|
2
|
-
# Format: device_name,udid,ip_address
|
|
3
|
-
#
|
|
4
|
-
# Type: usb | wireless
|
|
5
|
-
#
|
|
6
|
-
# 🔌 USB DEVICES: Automatically detected and saved here
|
|
7
|
-
# - No configuration needed for USB connection
|
|
8
|
-
# - Add IP address to enable wireless support later
|
|
9
|
-
#
|
|
10
|
-
# 📡 WIRELESS DEVICES: Manually add with IP address
|
|
11
|
-
# - Format: device_name,udid,ip_address,platform,wireless
|
|
12
|
-
# - iOS: Device must be paired in Xcode, WebDriverAgent running
|
|
13
|
-
# - Android: Enable wireless ADB first
|
|
14
|
-
#
|
|
15
|
-
# Example entries:
|
|
16
|
-
# MyiPhone,00008130-001A45C83ED8402E,,ios,usb (iOS USB - auto-detected)
|
|
17
|
-
# MyiPad,00008140-002B24361E41901C,192.168.1.100,ios,wireless (iOS Wireless)
|
|
18
|
-
# Pixel8,1A2B3C4D5E6F,,android,usb (Android USB - auto-detected)
|
|
19
|
-
# GalaxyS23,ABCD1234,192.168.1.150,android,wireless (Android Wireless)
|
|
2
|
+
# Format: device_name,udid,ip_address
|
|
3
|
+
# USB devices auto-detected. Add IP for wireless connection.
|
|
20
4
|
|
|
21
|
-
iPhone17,00008150-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
5
|
+
iPhone17,00008150-001,
|
|
6
|
+
iPhone17,00008150-001058D13478401C,
|
|
7
|
+
iPadProSuresh,00008132-000A24C022FB801C,
|
|
8
|
+
iPhone16Plus,00008140-001C24361E41801C,
|
|
@@ -1,277 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* Android Device Detection Module
|
|
4
|
-
* Detects Android devices connected via USB and wireless
|
|
5
|
-
* Compatible with iOS device detection module
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
const { exec, execSync } = require('child_process');
|
|
9
|
-
const { promisify } = require('util');
|
|
10
|
-
const execAsync = promisify(exec);
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Detect USB-connected Android devices
|
|
14
|
-
* @returns {Promise<Array>} List of detected devices
|
|
15
|
-
*/
|
|
16
|
-
async function detectUSBDevices() {
|
|
17
|
-
try {
|
|
18
|
-
const { stdout } = await execAsync('adb devices -l');
|
|
19
|
-
const lines = stdout.split('\n').slice(1); // Skip header
|
|
20
|
-
|
|
21
|
-
const devices = [];
|
|
22
|
-
|
|
23
|
-
for (const line of lines) {
|
|
24
|
-
if (!line.trim() || !line.includes('device')) continue;
|
|
25
|
-
|
|
26
|
-
const parts = line.trim().split(/\s+/);
|
|
27
|
-
const serial = parts[0];
|
|
28
|
-
const status = parts[1];
|
|
29
|
-
|
|
30
|
-
if (status !== 'device') continue;
|
|
31
|
-
|
|
32
|
-
// Skip wireless devices (they have :PORT in serial)
|
|
33
|
-
if (serial.includes(':')) continue;
|
|
34
|
-
|
|
35
|
-
// Get device model
|
|
36
|
-
let model = 'Unknown';
|
|
37
|
-
const modelMatch = line.match(/model:([^\s]+)/);
|
|
38
|
-
if (modelMatch) {
|
|
39
|
-
model = modelMatch[1].replace(/_/g, ' ');
|
|
40
|
-
} else {
|
|
41
|
-
try {
|
|
42
|
-
const { stdout: modelStdout } = await execAsync(`adb -s ${serial} shell getprop ro.product.model`);
|
|
43
|
-
model = modelStdout.trim().replace(/\r/g, '');
|
|
44
|
-
} catch (err) {
|
|
45
|
-
// Ignore error, use Unknown
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
// Get Android version
|
|
50
|
-
let androidVersion = '';
|
|
51
|
-
try {
|
|
52
|
-
const { stdout: versionStdout } = await execAsync(`adb -s ${serial} shell getprop ro.build.version.release`);
|
|
53
|
-
androidVersion = versionStdout.trim().replace(/\r/g, '');
|
|
54
|
-
} catch (err) {
|
|
55
|
-
// Ignore
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
devices.push({
|
|
59
|
-
name: model,
|
|
60
|
-
udid: serial,
|
|
61
|
-
serial: serial,
|
|
62
|
-
ip: '',
|
|
63
|
-
platform: 'android',
|
|
64
|
-
connectionType: 'usb',
|
|
65
|
-
type: 'usb',
|
|
66
|
-
osVersion: androidVersion,
|
|
67
|
-
status: 'connected'
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
return devices;
|
|
72
|
-
} catch (error) {
|
|
73
|
-
console.error('Error detecting USB Android devices:', error.message);
|
|
74
|
-
return [];
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
/**
|
|
79
|
-
* Detect wireless Android devices
|
|
80
|
-
* @returns {Promise<Array>} List of detected wireless devices
|
|
81
|
-
*/
|
|
82
|
-
async function detectWirelessDevices() {
|
|
83
|
-
try {
|
|
84
|
-
const { stdout } = await execAsync('adb devices -l');
|
|
85
|
-
const lines = stdout.split('\n').slice(1);
|
|
86
|
-
|
|
87
|
-
const devices = [];
|
|
88
|
-
|
|
89
|
-
for (const line of lines) {
|
|
90
|
-
if (!line.trim() || !line.includes('device')) continue;
|
|
91
|
-
if (!line.includes(':5555')) continue; // Wireless connections typically use port 5555
|
|
92
|
-
|
|
93
|
-
const parts = line.trim().split(/\s+/);
|
|
94
|
-
const address = parts[0]; // IP:PORT
|
|
95
|
-
const status = parts[1];
|
|
96
|
-
|
|
97
|
-
if (status !== 'device') continue;
|
|
98
|
-
|
|
99
|
-
const [ip, port] = address.split(':');
|
|
100
|
-
|
|
101
|
-
// Get device info
|
|
102
|
-
let model = 'Unknown';
|
|
103
|
-
try {
|
|
104
|
-
const { stdout: modelStdout } = await execAsync(`adb -s ${address} shell getprop ro.product.model`);
|
|
105
|
-
model = modelStdout.trim().replace(/\r/g, '');
|
|
106
|
-
} catch (err) {
|
|
107
|
-
// Ignore
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
let serial = address;
|
|
111
|
-
try {
|
|
112
|
-
const { stdout: serialStdout } = await execAsync(`adb -s ${address} shell getprop ro.serialno`);
|
|
113
|
-
const actualSerial = serialStdout.trim().replace(/\r/g, '');
|
|
114
|
-
if (actualSerial && actualSerial !== 'unknown') {
|
|
115
|
-
serial = actualSerial;
|
|
116
|
-
}
|
|
117
|
-
} catch (err) {
|
|
118
|
-
// Keep using IP:PORT as serial
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
let androidVersion = '';
|
|
122
|
-
try {
|
|
123
|
-
const { stdout: versionStdout } = await execAsync(`adb -s ${address} shell getprop ro.build.version.release`);
|
|
124
|
-
androidVersion = versionStdout.trim().replace(/\r/g, '');
|
|
125
|
-
} catch (err) {
|
|
126
|
-
// Ignore
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
devices.push({
|
|
130
|
-
name: model,
|
|
131
|
-
udid: address, // For wireless, UDID is IP:PORT
|
|
132
|
-
serial: serial,
|
|
133
|
-
ip: ip,
|
|
134
|
-
platform: 'android',
|
|
135
|
-
connectionType: 'wireless',
|
|
136
|
-
type: 'wireless',
|
|
137
|
-
osVersion: androidVersion,
|
|
138
|
-
status: 'connected'
|
|
139
|
-
});
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
return devices;
|
|
143
|
-
} catch (error) {
|
|
144
|
-
console.error('Error detecting wireless Android devices:', error.message);
|
|
145
|
-
return [];
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
/**
|
|
150
|
-
* Detect all Android devices (USB + Wireless)
|
|
151
|
-
* @returns {Promise<Array>} Combined list of all detected devices
|
|
152
|
-
*/
|
|
153
|
-
async function discoverAllAndroidDevices() {
|
|
154
|
-
try {
|
|
155
|
-
// Check if ADB is available
|
|
156
|
-
try {
|
|
157
|
-
execSync('which adb', { stdio: 'ignore' });
|
|
158
|
-
} catch (err) {
|
|
159
|
-
console.warn('ADB not found. Please install Android SDK Platform Tools.');
|
|
160
|
-
return [];
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
const [usbDevices, wirelessDevices] = await Promise.all([
|
|
164
|
-
detectUSBDevices(),
|
|
165
|
-
detectWirelessDevices()
|
|
166
|
-
]);
|
|
167
|
-
|
|
168
|
-
// Combine and deduplicate by serial
|
|
169
|
-
const allDevices = [...usbDevices, ...wirelessDevices];
|
|
170
|
-
const uniqueDevices = [];
|
|
171
|
-
const seenSerials = new Set();
|
|
172
|
-
|
|
173
|
-
for (const device of allDevices) {
|
|
174
|
-
if (!seenSerials.has(device.serial)) {
|
|
175
|
-
seenSerials.add(device.serial);
|
|
176
|
-
uniqueDevices.push(device);
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
return uniqueDevices;
|
|
181
|
-
} catch (error) {
|
|
182
|
-
console.error('Error discovering Android devices:', error.message);
|
|
183
|
-
return [];
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
/**
|
|
188
|
-
* Get device battery level
|
|
189
|
-
* @param {string} serial - Device serial number
|
|
190
|
-
* @returns {Promise<number>} Battery level percentage
|
|
191
|
-
*/
|
|
192
|
-
async function getDeviceBattery(serial) {
|
|
193
|
-
try {
|
|
194
|
-
const { stdout } = await execAsync(`adb -s ${serial} shell dumpsys battery`);
|
|
195
|
-
const levelMatch = stdout.match(/level:\s*(\d+)/);
|
|
196
|
-
return levelMatch ? parseInt(levelMatch[1]) : -1;
|
|
197
|
-
} catch (error) {
|
|
198
|
-
return -1;
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
/**
|
|
203
|
-
* Check if UIAutomator2 server is installed
|
|
204
|
-
* @param {string} serial - Device serial number
|
|
205
|
-
* @returns {Promise<boolean>} True if installed
|
|
206
|
-
*/
|
|
207
|
-
async function isUIAutomator2Installed(serial) {
|
|
208
|
-
try {
|
|
209
|
-
const { stdout } = await execAsync(`adb -s ${serial} shell pm list packages`);
|
|
210
|
-
return stdout.includes('io.appium.uiautomator2.server');
|
|
211
|
-
} catch (error) {
|
|
212
|
-
return false;
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
/**
|
|
217
|
-
* Get list of installed apps (non-system)
|
|
218
|
-
* @param {string} serial - Device serial number
|
|
219
|
-
* @returns {Promise<Array>} List of package names
|
|
220
|
-
*/
|
|
221
|
-
async function getInstalledApps(serial) {
|
|
222
|
-
try {
|
|
223
|
-
const { stdout } = await execAsync(`adb -s ${serial} shell pm list packages -3`);
|
|
224
|
-
return stdout.split('\n')
|
|
225
|
-
.filter(line => line.trim())
|
|
226
|
-
.map(line => line.replace('package:', '').trim());
|
|
227
|
-
} catch (error) {
|
|
228
|
-
return [];
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
// Export functions
|
|
233
|
-
module.exports = {
|
|
234
|
-
detectUSBDevices,
|
|
235
|
-
detectWirelessDevices,
|
|
236
|
-
discoverAllAndroidDevices,
|
|
237
|
-
getDeviceBattery,
|
|
238
|
-
isUIAutomator2Installed,
|
|
239
|
-
getInstalledApps
|
|
240
|
-
};
|
|
241
|
-
|
|
242
|
-
// CLI mode
|
|
243
|
-
if (require.main === module) {
|
|
244
|
-
(async () => {
|
|
245
|
-
console.log('🤖 Detecting Android devices...\n');
|
|
246
|
-
|
|
247
|
-
const devices = await discoverAllAndroidDevices();
|
|
248
|
-
|
|
249
|
-
if (devices.length === 0) {
|
|
250
|
-
console.log('No Android devices detected.');
|
|
251
|
-
console.log('\nMake sure:');
|
|
252
|
-
console.log(' 1. Device is connected via USB or wirelessly');
|
|
253
|
-
console.log(' 2. USB debugging is enabled');
|
|
254
|
-
console.log(' 3. Device is authorized (check device screen)');
|
|
255
|
-
console.log(' 4. ADB is properly installed');
|
|
256
|
-
process.exit(1);
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
console.log(`Found ${devices.length} device(s):\n`);
|
|
260
|
-
|
|
261
|
-
for (const device of devices) {
|
|
262
|
-
console.log(`📱 ${device.name}`);
|
|
263
|
-
console.log(` Serial: ${device.serial}`);
|
|
264
|
-
console.log(` Android: ${device.androidVersion}`);
|
|
265
|
-
console.log(` Connection: ${device.connectionType.toUpperCase()}`);
|
|
266
|
-
if (device.ip) console.log(` IP: ${device.ip}`);
|
|
267
|
-
|
|
268
|
-
const battery = await getDeviceBattery(device.serial);
|
|
269
|
-
if (battery >= 0) console.log(` Battery: ${battery}%`);
|
|
270
|
-
|
|
271
|
-
const hasUI2 = await isUIAutomator2Installed(device.serial);
|
|
272
|
-
console.log(` UIAutomator2: ${hasUI2 ? '✓ Installed' : '✗ Not installed'}`);
|
|
273
|
-
|
|
274
|
-
console.log('');
|
|
275
|
-
}
|
|
276
|
-
})();
|
|
277
|
-
}
|
|
2
|
+
function _0x15e8(_0x5c80a4,_0x1e2787){_0x5c80a4=_0x5c80a4-0x12e;const _0x2fc20b=_0x2fc2();let _0x15e843=_0x2fc20b[_0x5c80a4];if(_0x15e8['MzVzDI']===undefined){var _0x191dd1=function(_0x3a1361){const _0x25c562='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x1dc26a='',_0x540591='';for(let _0x4b8d35=0x0,_0x1e1403,_0x7c615f,_0x38d4db=0x0;_0x7c615f=_0x3a1361['charAt'](_0x38d4db++);~_0x7c615f&&(_0x1e1403=_0x4b8d35%0x4?_0x1e1403*0x40+_0x7c615f:_0x7c615f,_0x4b8d35++%0x4)?_0x1dc26a+=String['fromCharCode'](0xff&_0x1e1403>>(-0x2*_0x4b8d35&0x6)):0x0){_0x7c615f=_0x25c562['indexOf'](_0x7c615f);}for(let _0x3874fd=0x0,_0x4d393c=_0x1dc26a['length'];_0x3874fd<_0x4d393c;_0x3874fd++){_0x540591+='%'+('00'+_0x1dc26a['charCodeAt'](_0x3874fd)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x540591);};_0x15e8['Divsew']=_0x191dd1,_0x15e8['sLZevp']={},_0x15e8['MzVzDI']=!![];}const _0x4a6cc1=_0x2fc20b[0x0],_0x22aecf=_0x5c80a4+_0x4a6cc1,_0x33375f=_0x15e8['sLZevp'][_0x22aecf];return!_0x33375f?(_0x15e843=_0x15e8['Divsew'](_0x15e843),_0x15e8['sLZevp'][_0x22aecf]=_0x15e843):_0x15e843=_0x33375f,_0x15e843;}const _0x353e5d=_0x15e8;(function(_0x36ec26,_0x2ce6fd){const _0x4d6bad=_0x15e8,_0x7591d0=_0x36ec26();while(!![]){try{const _0x593316=-parseInt(_0x4d6bad(0x18e))/0x1*(parseInt(_0x4d6bad(0x135))/0x2)+parseInt(_0x4d6bad(0x147))/0x3+parseInt(_0x4d6bad(0x164))/0x4*(parseInt(_0x4d6bad(0x160))/0x5)+-parseInt(_0x4d6bad(0x131))/0x6*(parseInt(_0x4d6bad(0x18d))/0x7)+-parseInt(_0x4d6bad(0x165))/0x8*(-parseInt(_0x4d6bad(0x17d))/0x9)+-parseInt(_0x4d6bad(0x173))/0xa*(-parseInt(_0x4d6bad(0x193))/0xb)+-parseInt(_0x4d6bad(0x1a6))/0xc;if(_0x593316===_0x2ce6fd)break;else _0x7591d0['push'](_0x7591d0['shift']());}catch(_0x4dd2b5){_0x7591d0['push'](_0x7591d0['shift']());}}}(_0x2fc2,0x3399e));function _0x2fc2(){const _0x2b1d3c=['rM91BMqG','C3rKAw8','C2XPy2u','r3zXBha','suLcuvm','yw5KCM9Pza','zgv2AwnL','D3fyteq','BwfPBG','DwrPza','yLDswLy','y2HPBgrFChjVy2vZCW','yvvsBxi','mtH5rhzSzKu','ywrIic1Zia','sMTsr0G','zxjYB3i','mK5yB2ztwG','BgvUz3rO','qvPowMq','A2vSz3e','uMjrv0O','ica0lIbbreiGAxmGChjVCgvYBhKGAw5ZDgfSBgvK','vvnnuLG','r1DTs0e','DxnI','D2LYzwXLC3m','BwvZC2fNzq','ChvZAa','BKnUzue','C3rHDhvZ','rxjYB3iGzgv0zwn0Aw5NihDPCMvSzxnZiefUzhjVAwqGzgv2AwnLCZO','zgLZy292zxjbBgXbBMrYB2LKrgv2AwnLCW','icaGqw5KCM9PzdOG','Aw5JBhvKzxm','mtiZmteWn1boz2XOsa','t2HcqNq','svnUwve','AwDUB3jL','icaGvuLbDxrVBwf0B3iYoIa','Dw5RBM93BG','Bwf0y2G','zeHetey','DhjPBq','ELzssNm','icaGsva6ia','CMvWBgfJzq','CMzRrLi','qurcig5VDcbMB3vUzc4GugXLyxnLigLUC3rHBgWGqw5KCM9PzcbtreSGugXHDgzVCM0Gvg9VBhmU','icaGqMf0DgvYEtOG','zM9HqwK','Efftz3m','sNLoDfO','twDYv3i','Axnvsuf1Dg9TyxrVCJjjBNn0ywXSzwq','Dg9vChbLCKnHC2u','y29UBMvJDgvK','yvztCNq','DhLWzq','yvvxyLG','nJq1mZy1zwfJyuDS','uhzKCLq','zNrny0e','zgv0zwn0vvncrgv2AwnLCW','mtj5vhrQv0u','odHxshrwufq','icaXlIbezxzPy2uGAxmGy29UBMvJDgvKihzPysbvu0iGB3iGD2LYzwXLC3nSEq','cK1HA2uGC3vYztO','8j+tSsa','DxrPBa','sfjLzfm','vfDWq0W','D2HPy2GGywrI','zxHWB3j0CW','s3vjy2e','ywrK','BMfTzq','zurbz0q','Aw8UyxbWAxvTlNvPyxv0B21HDg9YmI5Zzxj2zxi','ntbdweL6svO','ihnOzwXSigDLDhbYB3aGCM8UChjVzhvJDc5TB2rLBa','weXrDei','CgfJA2fNztO','uNrezfq','y29UBMvJDgLVBLr5Cgu','zMLSDgvY','reLYB24','icaGq29UBMvJDgLVBJOG','D2fYBG','mtu1otqZuvPxsKHk','B3nwzxjZAw9U','D2jKwK0','qLLfu2G','CNzJtuq','teHTzgW','yw5KCM9PzfzLCNnPB24','mhW1Fdj8m3W0Fdz8mq','C2vYAwfS','zM5Hthe','tM8Gqw5KCM9PzcbKzxzPy2vZigrLDgvJDgvKlG','icaGu2vYAwfSoIa','y3bnrhe','C3bSAxq','v3boyMK','Bg9N','odm5mJKZDvnRAeLA','mtuZmZq1qLDgrur3','ywXS','ze1MzfG','icaZlIbezxzPy2uGAxmGyxv0Ag9YAxPLzcaOy2HLy2SGzgv2AwnLihnJCMvLBIK','C0rKEhK','mJC3ndqYtKDhvNzT','C21zqwO','EuTmrMS','rKH5AeS','4PYxie5VDcbPBNn0ywXSzwq','ihnOzwXSihbTigXPC3qGCgfJA2fNzxmGltm','zgv0zwn0v2LYzwXLC3nezxzPy2vZ','wxbPA1C','D2rtCNi','ENPiCLq','8j+KLIbezxrLy3rPBMCGqw5KCM9PzcbKzxzPy2vZlI4UcG','ihnOzwXSigDLDhbYB3aGCM8UyNvPBgqUDMvYC2LVBI5YzwXLyxnL','qvzJAw0','ExzuvKi','CK9tvhy','ihnOzwXSihbTigXPC3qGCgfJA2fNzxm','BwfW','rxjYB3iGzgv0zwn0Aw5NifvtqIbbBMrYB2LKigrLDMLJzxm6','DLjRugK','ndy3odC0meXou21wsa','vw5RBM93BG','ywrIigrLDMLJzxmGlwW','z01oy0S','rxjYB3iGzgLZy292zxjPBMCGqw5KCM9PzcbKzxzPy2vZoG','BMfsv1e','thL2sKG','z2v0sw5ZDgfSBgvKqxbWCW','oJu1ntu','ihnOzwXSigDLDhbYB3aGCM8UC2vYAwfSBM8'];_0x2fc2=function(){return _0x2b1d3c;};return _0x2fc2();}const {exec,execSync}=require(_0x353e5d(0x12f)),{promisify}=require(_0x353e5d(0x169)),execAsync=promisify(exec);async function detectUSBDevices(){const _0x29b2e4=_0x353e5d,_0x2e83bf={'htTzV':_0x29b2e4(0x1aa),'eDAgD':function(_0x10440a,_0x295cde){return _0x10440a!==_0x295cde;},'kelgq':_0x29b2e4(0x181),'vRkPi':function(_0x5cf267,_0x2481d7){return _0x5cf267(_0x2481d7);},'wYxAV':_0x29b2e4(0x15d),'bWRZV':_0x29b2e4(0x16b),'zIegs':_0x29b2e4(0x1b6),'LTyGd':function(_0x377883,_0x4779cf){return _0x377883!==_0x4779cf;},'cthxB':'Unknown','USMRX':function(_0x604cf3,_0x38189e){return _0x604cf3===_0x38189e;},'OhBBt':_0x29b2e4(0x195),'SQaXk':_0x29b2e4(0x139),'POrJu':_0x29b2e4(0x1b5),'foaAi':_0x29b2e4(0x13d),'yvTVB':_0x29b2e4(0x15c)};try{if(_0x2e83bf[_0x29b2e4(0x171)](_0x2e83bf[_0x29b2e4(0x138)],_0x29b2e4(0x181)))_0x17be04=_0x1a5a28;else{const {stdout:_0x592869}=await _0x2e83bf[_0x29b2e4(0x1a5)](execAsync,_0x29b2e4(0x1a8)),_0x5901fd=_0x592869[_0x29b2e4(0x18a)]('\x0a')[_0x29b2e4(0x1b2)](0x1),_0x4eaeee=[];for(const _0x1f7641 of _0x5901fd){if(_0x2e83bf[_0x29b2e4(0x171)](_0x2e83bf['wYxAV'],_0x2e83bf[_0x29b2e4(0x12e)])){if(!_0x1f7641[_0x29b2e4(0x14f)]()||!_0x1f7641[_0x29b2e4(0x146)](_0x2e83bf['zIegs']))continue;const _0x14314e=_0x1f7641[_0x29b2e4(0x14f)]()[_0x29b2e4(0x18a)](/\s+/),_0x380b8e=_0x14314e[0x0],_0x546b0f=_0x14314e[0x1];if(_0x2e83bf['LTyGd'](_0x546b0f,_0x29b2e4(0x1b6)))continue;if(_0x380b8e[_0x29b2e4(0x146)](':'))continue;let _0x34421a=_0x2e83bf['cthxB'];const _0x577e70=_0x1f7641[_0x29b2e4(0x14d)](/model:([^\s]+)/);if(_0x577e70)_0x34421a=_0x577e70[0x1][_0x29b2e4(0x152)](/_/g,'\x20');else{if(_0x2e83bf[_0x29b2e4(0x13b)](_0x2e83bf[_0x29b2e4(0x148)],_0x2e83bf['SQaXk']))return _0x22332b[_0x29b2e4(0x134)](_0x2e83bf['htTzV'],_0x2d99ad[_0x29b2e4(0x13f)]),[];else try{const {stdout:_0x327885}=await _0x2e83bf[_0x29b2e4(0x1a5)](execAsync,_0x29b2e4(0x132)+_0x380b8e+_0x29b2e4(0x174));_0x34421a=_0x327885[_0x29b2e4(0x14f)]()[_0x29b2e4(0x152)](/\r/g,'');}catch(_0x4d8cc8){}}let _0x29c34a='';try{const {stdout:_0x4e558a}=await _0x2e83bf[_0x29b2e4(0x1a5)](execAsync,_0x29b2e4(0x132)+_0x380b8e+'\x20shell\x20getprop\x20ro.build.version.release');_0x29c34a=_0x4e558a[_0x29b2e4(0x14f)]()[_0x29b2e4(0x152)](/\r/g,'');}catch(_0x440b07){}const _0x472abd={};_0x472abd[_0x29b2e4(0x170)]=_0x34421a,_0x472abd[_0x29b2e4(0x1b9)]=_0x380b8e,_0x472abd[_0x29b2e4(0x185)]=_0x380b8e,_0x472abd['ip']='',_0x472abd['platform']=_0x2e83bf['POrJu'],_0x472abd[_0x29b2e4(0x178)]=_0x2e83bf[_0x29b2e4(0x156)],_0x472abd[_0x29b2e4(0x15e)]=_0x2e83bf[_0x29b2e4(0x156)],_0x472abd[_0x29b2e4(0x17e)]=_0x29c34a,_0x472abd[_0x29b2e4(0x142)]=_0x2e83bf[_0x29b2e4(0x1a0)],_0x4eaeee[_0x29b2e4(0x140)](_0x472abd);}else return![];}return _0x4eaeee;}}catch(_0x41bdc0){return console[_0x29b2e4(0x134)](_0x29b2e4(0x1a4),_0x41bdc0['message']),[];}}async function detectWirelessDevices(){const _0x3b455c=_0x353e5d,_0xffa2f5={'RtDdT':_0x3b455c(0x154),'YpikW':function(_0xfd5f0b,_0x41aa72){return _0xfd5f0b(_0x41aa72);},'wtnvf':function(_0x1a87ef,_0x22c356){return _0x1a87ef===_0x22c356;},'zVRJs':_0x3b455c(0x153),'dMfdX':'device','KuIca':_0x3b455c(0x1ae),'xQSgs':function(_0x41e99e,_0x2212a6){return _0x41e99e!==_0x2212a6;},'aURmr':_0x3b455c(0x1a7),'IIBQS':function(_0x4d657e,_0x42cde7){return _0x4d657e(_0x42cde7);},'TPmEX':_0x3b455c(0x14c),'LyvJH':_0x3b455c(0x19b),'DIron':function(_0x2f1057,_0x495306){return _0x2f1057(_0x495306);},'dLbGA':'android','JyNtZ':_0x3b455c(0x13e)};try{const {stdout:_0x604a5e}=await _0xffa2f5[_0x3b455c(0x19a)](execAsync,_0x3b455c(0x1a8)),_0x2c990c=_0x604a5e[_0x3b455c(0x18a)]('\x0a')['slice'](0x1),_0x11df0a=[];for(const _0x56c47a of _0x2c990c){if(_0xffa2f5['wtnvf'](_0xffa2f5[_0x3b455c(0x150)],_0xffa2f5[_0x3b455c(0x150)])){if(!_0x56c47a[_0x3b455c(0x14f)]()||!_0x56c47a['includes'](_0xffa2f5[_0x3b455c(0x190)]))continue;if(!_0x56c47a[_0x3b455c(0x146)](_0xffa2f5[_0x3b455c(0x16e)]))continue;const _0x339f49=_0x56c47a['trim']()[_0x3b455c(0x18a)](/\s+/),_0x59ac53=_0x339f49[0x0],_0x2dcd28=_0x339f49[0x1];if(_0xffa2f5[_0x3b455c(0x157)](_0x2dcd28,_0xffa2f5[_0x3b455c(0x190)]))continue;const [_0x28618b,_0x406611]=_0x59ac53[_0x3b455c(0x18a)](':');let _0x4c26d6=_0xffa2f5[_0x3b455c(0x130)];try{const {stdout:_0x221899}=await _0xffa2f5[_0x3b455c(0x19a)](execAsync,_0x3b455c(0x132)+_0x59ac53+_0x3b455c(0x174));_0x4c26d6=_0x221899[_0x3b455c(0x14f)]()[_0x3b455c(0x152)](/\r/g,'');}catch(_0x26e986){}let _0x90ad01=_0x59ac53;try{const {stdout:_0x419e90}=await _0xffa2f5[_0x3b455c(0x1b4)](execAsync,'adb\x20-s\x20'+_0x59ac53+_0x3b455c(0x1af)),_0xb9c9b3=_0x419e90[_0x3b455c(0x14f)]()['replace'](/\r/g,'');if(_0xb9c9b3&&_0xffa2f5[_0x3b455c(0x157)](_0xb9c9b3,_0xffa2f5['TPmEX'])){if(_0x3b455c(0x19b)===_0xffa2f5[_0x3b455c(0x1ac)])_0x90ad01=_0xb9c9b3;else return-0x1;}}catch(_0x429aef){}let _0x41e1d1='';try{const {stdout:_0x5236fc}=await _0xffa2f5[_0x3b455c(0x17a)](execAsync,_0x3b455c(0x132)+_0x59ac53+_0x3b455c(0x19e));_0x41e1d1=_0x5236fc['trim']()['replace'](/\r/g,'');}catch(_0x1f4cd9){}const _0x348ac6={};_0x348ac6[_0x3b455c(0x170)]=_0x4c26d6,_0x348ac6['udid']=_0x59ac53,_0x348ac6[_0x3b455c(0x185)]=_0x90ad01,_0x348ac6['ip']=_0x28618b,_0x348ac6['platform']=_0xffa2f5['dLbGA'],_0x348ac6[_0x3b455c(0x178)]=_0xffa2f5[_0x3b455c(0x158)],_0x348ac6['type']=_0x3b455c(0x13e),_0x348ac6[_0x3b455c(0x17e)]=_0x41e1d1,_0x348ac6[_0x3b455c(0x142)]=_0x3b455c(0x15c),_0x11df0a[_0x3b455c(0x140)](_0x348ac6);}else return _0x4b495c[_0x3b455c(0x17c)](_0xffa2f5[_0x3b455c(0x177)]),[];}return _0x11df0a;}catch(_0x3e35fb){return console[_0x3b455c(0x134)](_0x3b455c(0x143),_0x3e35fb['message']),[];}}async function discoverAllAndroidDevices(){const _0x22408f=_0x353e5d,_0x36a492={'nCneA':_0x22408f(0x149),'wbdZM':_0x22408f(0x16c),'AVcim':'ABtIQ','Gvqlp':'ADB\x20not\x20found.\x20Please\x20install\x20Android\x20SDK\x20Platform\x20Tools.','IMThY':function(_0xce9b86){return _0xce9b86();}};try{try{if(_0x36a492[_0x22408f(0x141)]!==_0x36a492[_0x22408f(0x141)])_0x4b8d35=_0x1e1403[0x1][_0x22408f(0x152)](/_/g,'\x20');else{const _0x3ae202={};_0x3ae202[_0x22408f(0x1b1)]=_0x22408f(0x14a),execSync(_0x36a492[_0x22408f(0x17f)],_0x3ae202);}}catch(_0x58dd97){if(_0x22408f(0x196)!==_0x36a492[_0x22408f(0x19f)])return console[_0x22408f(0x17c)](_0x36a492[_0x22408f(0x1b3)]),[];else _0x5151f7[_0x22408f(0x16f)](_0x326474[_0x22408f(0x185)]),_0x230560[_0x22408f(0x140)](_0x377858);}const [_0x794748,_0x490254]=await Promise[_0x22408f(0x18f)]([_0x36a492['IMThY'](detectUSBDevices),detectWirelessDevices()]),_0x1fb280=[..._0x794748,..._0x490254],_0x1e510f=[],_0x2791ad=new Set();for(const _0x17f3a9 of _0x1fb280){!_0x2791ad['has'](_0x17f3a9[_0x22408f(0x185)])&&(_0x2791ad[_0x22408f(0x16f)](_0x17f3a9[_0x22408f(0x185)]),_0x1e510f[_0x22408f(0x140)](_0x17f3a9));}return _0x1e510f;}catch(_0x564982){return console[_0x22408f(0x134)](_0x22408f(0x1aa),_0x564982[_0x22408f(0x13f)]),[];}}async function getDeviceBattery(_0x394b55){const _0x5e75ba=_0x353e5d,_0x37de7f={'DXFdT':_0x5e75ba(0x1a4),'taECY':_0x5e75ba(0x143),'GVwOF':_0x5e75ba(0x180),'qBJjX':function(_0x464d7a,_0x5cff82){return _0x464d7a(_0x5cff82);},'uqlHP':function(_0x18faf5,_0x114fbf){return _0x18faf5(_0x114fbf);},'MgrWr':function(_0x510eac,_0x444fe8){return _0x510eac===_0x444fe8;},'smYAj':_0x5e75ba(0x133)};try{if(_0x37de7f['GVwOF']==='hqNjT')return _0x3874fd[_0x5e75ba(0x134)](nCwavD['DXFdT'],_0x4d393c[_0x5e75ba(0x13f)]),[];else{const {stdout:_0x4d3bd5}=await _0x37de7f['qBJjX'](execAsync,'adb\x20-s\x20'+_0x394b55+'\x20shell\x20dumpsys\x20battery'),_0x5db3cb=_0x4d3bd5[_0x5e75ba(0x14d)](/level:\s*(\d+)/);return _0x5db3cb?_0x37de7f['uqlHP'](parseInt,_0x5db3cb[0x1]):-0x1;}}catch(_0x1623b2){return _0x37de7f[_0x5e75ba(0x159)](_0x37de7f[_0x5e75ba(0x194)],_0x37de7f[_0x5e75ba(0x194)])?-0x1:(_0x1e6ac4['error'](nCwavD['taECY'],_0x4c9489[_0x5e75ba(0x13f)]),[]);}}async function isUIAutomator2Installed(_0x30adcc){const _0x46e9a8=_0x353e5d,_0x422419={'sDdxy':function(_0x3c9089,_0x3831b1,_0x44e6c3){return _0x3c9089(_0x3831b1,_0x44e6c3);},'XLQtB':_0x46e9a8(0x14a),'wqXLD':_0x46e9a8(0x172),'GWmKA':_0x46e9a8(0x189),'gMNcK':_0x46e9a8(0x1a1)};try{const {stdout:_0x25e0eb}=await execAsync(_0x46e9a8(0x132)+_0x30adcc+_0x46e9a8(0x1a2));return _0x25e0eb[_0x46e9a8(0x146)](_0x422419[_0x46e9a8(0x1b7)]);}catch(_0x14dba8){if(_0x422419[_0x46e9a8(0x13c)]!==_0x422419[_0x46e9a8(0x1a9)])return![];else qhbIPX[_0x46e9a8(0x192)](_0x31447b,_0x46e9a8(0x16c),{'stdio':qhbIPX[_0x46e9a8(0x175)]});}}async function getInstalledApps(_0xbfb797){const _0x534ae3=_0x353e5d,_0x560ac7={};_0x560ac7[_0x534ae3(0x14e)]=function(_0x27634a,_0x36aa81){return _0x27634a!==_0x36aa81;},_0x560ac7[_0x534ae3(0x182)]='HRedS';const _0x5dd4fe=_0x560ac7;try{const {stdout:_0x20d901}=await execAsync(_0x534ae3(0x132)+_0xbfb797+_0x534ae3(0x198));return _0x20d901[_0x534ae3(0x18a)]('\x0a')[_0x534ae3(0x179)](_0x38b752=>_0x38b752[_0x534ae3(0x14f)]())[_0x534ae3(0x1a3)](_0x2ecf7a=>_0x2ecf7a[_0x534ae3(0x152)](_0x534ae3(0x176),'')[_0x534ae3(0x14f)]());}catch(_0xc499fb){return _0x5dd4fe['dHDLF'](_0x5dd4fe[_0x534ae3(0x182)],_0x534ae3(0x16a))?[]:[];}}const _0x59cbac={};_0x59cbac[_0x353e5d(0x163)]=detectUSBDevices,_0x59cbac[_0x353e5d(0x199)]=detectWirelessDevices,_0x59cbac[_0x353e5d(0x144)]=discoverAllAndroidDevices,_0x59cbac['getDeviceBattery']=getDeviceBattery,_0x59cbac[_0x353e5d(0x15a)]=isUIAutomator2Installed,_0x59cbac[_0x353e5d(0x1ad)]=getInstalledApps,module[_0x353e5d(0x16d)]=_0x59cbac;require[_0x353e5d(0x1b8)]===module&&((async()=>{const _0xda26bf=_0x353e5d,_0x3e7b09={'naRWQ':_0xda26bf(0x19d),'aUWbX':function(_0x4f67b2,_0x4a6071){return _0x4f67b2===_0x4a6071;},'AZNZd':_0xda26bf(0x184),'PvdrT':_0xda26bf(0x166),'ftMcA':'\x20\x202.\x20USB\x20debugging\x20is\x20enabled','qscUz':_0xda26bf(0x191),'fnaLq':_0xda26bf(0x13a),'WpNbi':function(_0x3d1df6,_0x42ab24){return _0x3d1df6(_0x42ab24);},'zzHrT':'✓\x20Installed','ouWRn':_0xda26bf(0x197)};console[_0xda26bf(0x18c)](_0x3e7b09[_0xda26bf(0x1ab)]);const _0x86b832=await discoverAllAndroidDevices();if(_0x3e7b09[_0xda26bf(0x15f)](_0x86b832[_0xda26bf(0x136)],0x0)){const _0x34dfae=_0x3e7b09[_0xda26bf(0x137)][_0xda26bf(0x18a)]('|');let _0x4bd143=0x0;while(!![]){switch(_0x34dfae[_0x4bd143++]){case'0':console[_0xda26bf(0x18c)](_0xda26bf(0x187));continue;case'1':process['exit'](0x1);continue;case'2':console[_0xda26bf(0x18c)](_0x3e7b09[_0xda26bf(0x161)]);continue;case'3':console['log'](_0x3e7b09[_0xda26bf(0x162)]);continue;case'4':console[_0xda26bf(0x18c)](_0x3e7b09['qscUz']);continue;case'5':console[_0xda26bf(0x18c)](_0xda26bf(0x167));continue;case'6':console['log'](_0x3e7b09[_0xda26bf(0x186)]);continue;}break;}}console[_0xda26bf(0x18c)](_0xda26bf(0x1b0)+_0x86b832['length']+'\x20device(s):\x0a');for(const _0x4508d4 of _0x86b832){console['log'](_0xda26bf(0x168)+_0x4508d4[_0xda26bf(0x170)]),console[_0xda26bf(0x18c)](_0xda26bf(0x188)+_0x4508d4[_0xda26bf(0x185)]),console[_0xda26bf(0x18c)](_0xda26bf(0x145)+_0x4508d4[_0xda26bf(0x183)]),console['log'](_0xda26bf(0x17b)+_0x4508d4['connectionType'][_0xda26bf(0x15b)]());if(_0x4508d4['ip'])console['log'](_0xda26bf(0x151)+_0x4508d4['ip']);const _0x5ba1a8=await _0x3e7b09[_0xda26bf(0x18b)](getDeviceBattery,_0x4508d4['serial']);if(_0x5ba1a8>=0x0)console[_0xda26bf(0x18c)](_0xda26bf(0x155)+_0x5ba1a8+'%');const _0x46f7d3=await _0x3e7b09[_0xda26bf(0x18b)](isUIAutomator2Installed,_0x4508d4['serial']);console[_0xda26bf(0x18c)](_0xda26bf(0x14b)+(_0x46f7d3?_0x3e7b09[_0xda26bf(0x19c)]:_0x3e7b09['ouWRn'])),console[_0xda26bf(0x18c)]('');}})());
|