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/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 _0x18c8(){const _0x3aaa42=['cUkDJcbfCNjVCJO','ywHHswm','C3bSAxq','BMfTzq','zxHPDa','lI4VBgLIl3nLCNzLCG','y3LHBG','ywn0Aw9U','CMvWzwf0','rgLZCgXHEsbOzwXWigLUzM9YBwf0Aw9U','shvdELG','A3nUvKO','cVcFLi0Gq2HLy2TPBMCGC3LZDgvTihjLCxvPCMvTzw50CY4UlG','oda0rgLytKH5','otq3oe1TBur2zq','icaGquKGug93zxjLzcbnB2jPBguGqxv0B21HDgLVBG','zgvZy3jPChrPB24','zg9JDg9Y','rxHLy3v0zsbJB21Tyw5Kig9UignVBM5Ly3rLzcbPt1mVqw5KCM9PzcbKzxzPy2vZ','u2vYDMvYihbVCNq','iYbdAgvJAYbZExn0zw0','ota4AhzWzwDU','lwGSic0TAgvSCa','lxySic0TDMvYyM9Zzq','lwqSic0Tzgv2AwnLidXUyw1LpG','rgv0zwn0ifDPrMKGzgv2AwnLCYbVBMX5','y29TBwfUza','B3v0Chv0sgvSCa','icbKzxzPy2vSEsbSAxn0icaGica','D2HPDgu','rxHLy3v0zsbVBIbHBgWGzgv2AwnLCYaOzgvMyxvSDcK','BgLZDa','icbKzxzPy2vSEsbZDgfYDcaGica','lI4VBgLIl2rLDMLJzxm','yxjNDG','mtKXnJu4n2vMA0XhEq','ndm1ntG2nuT5CM1ysq','lxaSic0TCg9YDca8Cg9YDd4','ls1Kzwj1zW','mtbSwujhyLq','tgLZDcbHBgWGy29UBMvJDgvKigLpuYbHBMqGqw5KCM9PzcbKzxzPy2vZ','zxHLyYa8y29TBwfUzd4','z3jHEq','rgLZCgXHEsb2zxjZAw9Uig51BwjLCG','mtqYndCXmtjWCfrOwLe','odi4nuXQvffgAa','C3rHCNq','lI4VCgfJA2fNzs5QC29U','CgfYC2u','cUkAOsbfEgvJDxrPBMCGy29TBwfUzc4UlG','BwvZC2fNzq','r3jVzxG','rw5HyMXLigrLyNvNigXVz2DPBMC','q2HLy2SGC3LZDgvTihjLCxvPCMvTzw50CYbMB3iGAu9tigfUzcbbBMrYB2LKigf1Dg9TyxrPB24','yM9Sza','zxjYB3i','Bg9N','CePPuwK','vw9hCvq','C2XPy2u','lI4VBgLIl2v4zwn1Dg9Y','mxWYFdb8nxWZFdq','lweSic0TywXS','wKzLt0K','CMvK','BgvUz3rO','B3b0Aw9U','ntiZndu0ChDKvxfI','cVcFMOaGrgv2AwnLBhKGlsbpBMuGq29TBwfUzcWGqwXSierLDMLJzxm','iYbmAxn0igrLDMLJzxm','DMvYC2LVBG','ndu1mdqYntb1DfnfsNO','rg9Uj3qGB3bLBIbICM93C2vYigf1Dg9TyxrPy2fSBhK','mtHPrM50C1u','svfuq2q','y2HHBgS','y29TBwfUzgvY'];_0x18c8=function(){return _0x3aaa42;};return _0x18c8();}const _0x436de3=_0x449b;(function(_0x32d85e,_0x5a3cd0){const _0x18079e=_0x449b,_0x4ab4b8=_0x32d85e();while(!![]){try{const _0x2efb1c=-parseInt(_0x18079e(0xb2))/0x1+parseInt(_0x18079e(0x85))/0x2*(parseInt(_0x18079e(0x8b))/0x3)+parseInt(_0x18079e(0xa4))/0x4*(-parseInt(_0x18079e(0xbc))/0x5)+parseInt(_0x18079e(0x9c))/0x6*(-parseInt(_0x18079e(0x9d))/0x7)+-parseInt(_0x18079e(0xbb))/0x8+parseInt(_0x18079e(0xb3))/0x9*(-parseInt(_0x18079e(0xb6))/0xa)+parseInt(_0x18079e(0x89))/0xb;if(_0x2efb1c===_0x5a3cd0)break;else _0x4ab4b8['push'](_0x4ab4b8['shift']());}catch(_0x55ae9d){_0x4ab4b8['push'](_0x4ab4b8['shift']());}}}(_0x18c8,0xec58c));function _0x449b(_0x3009dd,_0x4f3ff0){_0x3009dd=_0x3009dd-0x72;const _0x18c83b=_0x18c8();let _0x449bc1=_0x18c83b[_0x3009dd];if(_0x449b['yGbaAJ']===undefined){var _0x50e0d8=function(_0x69d112){const _0x6ae147='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0xa0a838='',_0x416c84='';for(let _0xe39891=0x0,_0x2455ea,_0x411ddb,_0xabb4a6=0x0;_0x411ddb=_0x69d112['charAt'](_0xabb4a6++);~_0x411ddb&&(_0x2455ea=_0xe39891%0x4?_0x2455ea*0x40+_0x411ddb:_0x411ddb,_0xe39891++%0x4)?_0xa0a838+=String['fromCharCode'](0xff&_0x2455ea>>(-0x2*_0xe39891&0x6)):0x0){_0x411ddb=_0x6ae147['indexOf'](_0x411ddb);}for(let _0x52781c=0x0,_0x934f0d=_0xa0a838['length'];_0x52781c<_0x934f0d;_0x52781c++){_0x416c84+='%'+('00'+_0xa0a838['charCodeAt'](_0x52781c)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x416c84);};_0x449b['LdJbxH']=_0x50e0d8,_0x449b['mwXjbW']={},_0x449b['yGbaAJ']=!![];}const _0xa90cb=_0x18c83b[0x0],_0x49d597=_0x3009dd+_0xa90cb,_0x1296cb=_0x449b['mwXjbW'][_0x49d597];return!_0x1296cb?(_0x449bc1=_0x449b['LdJbxH'](_0x449bc1),_0x449b['mwXjbW'][_0x49d597]=_0x449bc1):_0x449bc1=_0x1296cb,_0x449bc1;}const {program}=require(_0x436de3(0x8e)),chalk=require(_0x436de3(0x8d)),packageJson=require(_0x436de3(0xbe)),{startServer}=require(_0x436de3(0x94)),{listDevices}=require(_0x436de3(0xb0)),{checkDoctor}=require('../lib/doctor'),{executeCommand}=require(_0x436de3(0x7e));program[_0x436de3(0x92)]('devicely')[_0x436de3(0x9f)]('Devicely\x20-\x20One\x20Command,\x20All\x20Devices.\x20AI\x20Powered\x20Mobile\x20Automation')[_0x436de3(0x88)](packageJson[_0x436de3(0x88)],'-v,\x20--version',_0x436de3(0xba))['helpOption'](_0x436de3(0xa5),_0x436de3(0x98)),program['command'](_0x436de3(0xbd))['description']('Start\x20Devicely\x20server\x20and\x20open\x20web\x20interface')['option'](_0x436de3(0xb4),_0x436de3(0xa2),'3001')[_0x436de3(0x84)]('--no-browser',_0x436de3(0x8a))[_0x436de3(0x84)](_0x436de3(0xb5),_0x436de3(0x76))[_0x436de3(0x84)]('--usb-only','Detect\x20USB\x20devices\x20only')[_0x436de3(0x84)]('--wifi-only',_0x436de3(0xa8))[_0x436de3(0x96)](async _0x33f44f=>{const _0x2ed2e5=_0x436de3,_0x31a8f9={};_0x31a8f9['WXGcY']=_0x2ed2e5(0x86),_0x31a8f9[_0x2ed2e5(0x81)]=_0x2ed2e5(0x9e),_0x31a8f9[_0x2ed2e5(0x7b)]='\x0a❌\x20Error:';const _0x50164c=_0x31a8f9;try{console['log'](chalk[_0x2ed2e5(0x95)][_0x2ed2e5(0x78)](_0x50164c['WXGcY'])),console['log'](chalk[_0x2ed2e5(0xb9)](_0x50164c['ZFeOI'])),console[_0x2ed2e5(0x7a)](chalk[_0x2ed2e5(0xb9)]('━'[_0x2ed2e5(0x97)](0x32))),await startServer(_0x33f44f);}catch(_0x268180){console[_0x2ed2e5(0x79)](chalk[_0x2ed2e5(0x82)](_0x50164c[_0x2ed2e5(0x7b)]),_0x268180['message']),process[_0x2ed2e5(0x93)](0x1);}}),program[_0x436de3(0xa9)](_0x436de3(0xae))['description'](_0x436de3(0xb7))['option'](_0x436de3(0xa6),'Show\x20detailed\x20device\x20information')[_0x436de3(0x96)](async _0x2ba80d=>{const _0x5fe2dd=_0x436de3,_0x57f940={'ksnVJ':'\x0a📱\x20Scanning\x20for\x20devices...','HuCzX':function(_0x69a3c3,_0x538012){return _0x69a3c3(_0x538012);},'Groex':'\x0a❌\x20Error:'};try{console[_0x5fe2dd(0x7a)](chalk[_0x5fe2dd(0x95)][_0x5fe2dd(0x78)](_0x57f940[_0x5fe2dd(0x9a)])),console['log'](chalk[_0x5fe2dd(0xb9)]('━'[_0x5fe2dd(0x97)](0x32))),await _0x57f940[_0x5fe2dd(0x99)](listDevices,_0x2ba80d);}catch(_0x1cb73d){console[_0x5fe2dd(0x79)](chalk[_0x5fe2dd(0x82)](_0x57f940[_0x5fe2dd(0x75)]),_0x1cb73d[_0x5fe2dd(0x74)]),process[_0x5fe2dd(0x93)](0x1);}}),program[_0x436de3(0xa9)](_0x436de3(0xa0))['description'](_0x436de3(0x77))['action'](async()=>{const _0x3b1d53=_0x436de3,_0x2f542c={'wSJYe':_0x3b1d53(0x9b),'ReMMt':function(_0x253f87){return _0x253f87();}};try{console['log'](chalk[_0x3b1d53(0x95)][_0x3b1d53(0x78)](_0x2f542c['wSJYe'])),console['log'](chalk[_0x3b1d53(0xb9)]('━'[_0x3b1d53(0x97)](0x32))),await _0x2f542c['ReMMt'](checkDoctor);}catch(_0x275c2a){console['error'](chalk[_0x3b1d53(0x82)](_0x3b1d53(0x8f)),_0x275c2a[_0x3b1d53(0x74)]),process[_0x3b1d53(0x93)](0x1);}}),program[_0x436de3(0xa9)](_0x436de3(0xb8))[_0x436de3(0x9f)](_0x436de3(0xa1))[_0x436de3(0x84)](_0x436de3(0xa7),'Execute\x20on\x20specific\x20device')['option'](_0x436de3(0x80),_0x436de3(0xad))[_0x436de3(0x96)](async(_0x4ef475,_0xad9dc3)=>{const _0x53cd08=_0x436de3,_0x4eb25c={'UoGqT':_0x53cd08(0x73),'IQTCd':function(_0x2b9036,_0xd87fb,_0x1bfa5e){return _0x2b9036(_0xd87fb,_0x1bfa5e);},'ahaIc':'\x0a❌\x20Error:'};try{console[_0x53cd08(0x7a)](chalk['cyan'][_0x53cd08(0x78)](_0x4eb25c[_0x53cd08(0x7c)])),console['log'](chalk[_0x53cd08(0xb9)]('━'['repeat'](0x32))),await _0x4eb25c[_0x53cd08(0x8c)](executeCommand,_0x4ef475,_0xad9dc3);}catch(_0x305aa6){console[_0x53cd08(0x79)](chalk[_0x53cd08(0x82)](_0x4eb25c[_0x53cd08(0x90)]),_0x305aa6[_0x53cd08(0x74)]),process[_0x53cd08(0x93)](0x1);}}),program[_0x436de3(0x72)](process[_0x436de3(0xb1)]);if(!process[_0x436de3(0xb1)][_0x436de3(0x7d)](0x2)[_0x436de3(0x83)]){const ONtWxu=_0x436de3(0x7f)[_0x436de3(0x91)]('|');let qZNrVp=0x0;while(!![]){switch(ONtWxu[qZNrVp++]){case'0':console[_0x436de3(0x7a)](chalk[_0x436de3(0xb9)](_0x436de3(0xaf))+chalk['white']('#\x20Start\x20the\x20server'));continue;case'1':program[_0x436de3(0xaa)]();continue;case'2':console['log'](chalk[_0x436de3(0x95)]('\x0a💡\x20Quick\x20start:'));continue;case'3':console[_0x436de3(0x7a)](chalk[_0x436de3(0xb9)]('\x20\x20devicely\x20doctor\x20\x20\x20')+chalk[_0x436de3(0xac)](_0x436de3(0xa3)));continue;case'4':console[_0x436de3(0x7a)]('');continue;case'5':console['log'](chalk[_0x436de3(0xb9)](_0x436de3(0xab))+chalk['white'](_0x436de3(0x87)));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 _0x4f3b(_0x176ece,_0x4e1ad5){_0x176ece=_0x176ece-0x1ed;const _0x3576bf=_0x3576();let _0x4f3bd6=_0x3576bf[_0x176ece];if(_0x4f3b['EgysEq']===undefined){var _0x3d1cc8=function(_0x13d375){const _0x16f6ca='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x10f5c2='',_0x36785a='';for(let _0x384462=0x0,_0x18b1a6,_0x5a0270,_0x3a3aef=0x0;_0x5a0270=_0x13d375['charAt'](_0x3a3aef++);~_0x5a0270&&(_0x18b1a6=_0x384462%0x4?_0x18b1a6*0x40+_0x5a0270:_0x5a0270,_0x384462++%0x4)?_0x10f5c2+=String['fromCharCode'](0xff&_0x18b1a6>>(-0x2*_0x384462&0x6)):0x0){_0x5a0270=_0x16f6ca['indexOf'](_0x5a0270);}for(let _0x4c8618=0x0,_0x159a7c=_0x10f5c2['length'];_0x4c8618<_0x159a7c;_0x4c8618++){_0x36785a+='%'+('00'+_0x10f5c2['charCodeAt'](_0x4c8618)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x36785a);};_0x4f3b['JPlNtt']=_0x3d1cc8,_0x4f3b['DKIYLu']={},_0x4f3b['EgysEq']=!![];}const _0x3a72dd=_0x3576bf[0x0],_0x4e7a88=_0x176ece+_0x3a72dd,_0x433afa=_0x4f3b['DKIYLu'][_0x4e7a88];return!_0x433afa?(_0x4f3bd6=_0x4f3b['JPlNtt'](_0x4f3bd6),_0x4f3b['DKIYLu'][_0x4e7a88]=_0x4f3bd6):_0x4f3bd6=_0x433afa,_0x4f3bd6;}const _0x51d704=_0x4f3b;(function(_0x43d4c9,_0x42af66){const _0x49adf5=_0x4f3b,_0x6ae189=_0x43d4c9();while(!![]){try{const _0x4c6ac0=-parseInt(_0x49adf5(0x223))/0x1+parseInt(_0x49adf5(0x1f9))/0x2+parseInt(_0x49adf5(0x1f0))/0x3+-parseInt(_0x49adf5(0x26a))/0x4*(-parseInt(_0x49adf5(0x23a))/0x5)+-parseInt(_0x49adf5(0x267))/0x6+parseInt(_0x49adf5(0x25b))/0x7*(parseInt(_0x49adf5(0x219))/0x8)+-parseInt(_0x49adf5(0x1fa))/0x9;if(_0x4c6ac0===_0x42af66)break;else _0x6ae189['push'](_0x6ae189['shift']());}catch(_0x1d7a4e){_0x6ae189['push'](_0x6ae189['shift']());}}}(_0x3576,0x44b94));const {exec,execSync}=require(_0x51d704(0x233)),{promisify}=require(_0x51d704(0x23e)),execAsync=promisify(exec);async function detectUSBDevices(){const _0x4d9da8=_0x51d704,_0x342516={'SMabr':function(_0x9bb80c,_0x42f91b){return _0x9bb80c!==_0x42f91b;},'XnBuX':function(_0x27820e,_0x2cde1e){return _0x27820e(_0x2cde1e);},'HDYhL':'adb\x20devices\x20-l','HleVQ':_0x4d9da8(0x1f4),'vwemZ':_0x4d9da8(0x24a),'RZDea':function(_0x4b5285,_0x5a94bd){return _0x4b5285!==_0x5a94bd;},'WUgYm':_0x4d9da8(0x214),'dBfzT':_0x4d9da8(0x231),'clyYS':'usb','oFgzO':'connected','hSXgY':function(_0x4350cb,_0x34b854){return _0x4350cb===_0x34b854;},'YJcms':_0x4d9da8(0x1ff),'YWIRW':_0x4d9da8(0x208)};try{if(_0x342516[_0x4d9da8(0x248)](_0x4d9da8(0x22e),_0x4d9da8(0x218))){const {stdout:_0x4d6f8f}=await _0x342516[_0x4d9da8(0x205)](execAsync,_0x342516[_0x4d9da8(0x25e)]),_0x5d7cb9=_0x4d6f8f[_0x4d9da8(0x240)]('\x0a')[_0x4d9da8(0x264)](0x1),_0x7666e0=[];for(const _0x21d9ba of _0x5d7cb9){if(!_0x21d9ba[_0x4d9da8(0x249)]()||!_0x21d9ba[_0x4d9da8(0x222)](_0x342516[_0x4d9da8(0x221)]))continue;const _0x27a9bb=_0x21d9ba[_0x4d9da8(0x249)]()[_0x4d9da8(0x240)](/\s+/),_0x57fc22=_0x27a9bb[0x0],_0x471a13=_0x27a9bb[0x1];if(_0x471a13!==_0x342516['HleVQ'])continue;if(_0x57fc22['includes'](':'))continue;let _0x1e68ed=_0x342516[_0x4d9da8(0x258)];const _0x2c6ef8=_0x21d9ba[_0x4d9da8(0x23c)](/model:([^\s]+)/);if(_0x2c6ef8)_0x1e68ed=_0x2c6ef8[0x1][_0x4d9da8(0x1ef)](/_/g,'\x20');else{if(_0x342516[_0x4d9da8(0x22b)](_0x4d9da8(0x1f6),_0x342516[_0x4d9da8(0x1fe)]))try{const {stdout:_0x134468}=await execAsync(_0x4d9da8(0x253)+_0x57fc22+'\x20shell\x20getprop\x20ro.product.model');_0x1e68ed=_0x134468[_0x4d9da8(0x249)]()['replace'](/\r/g,'');}catch(_0x3ec3c2){}else _0x511592=_0x434153;}let _0x4d6f12='';try{const {stdout:_0xb1d76e}=await execAsync('adb\x20-s\x20'+_0x57fc22+_0x4d9da8(0x22f));_0x4d6f12=_0xb1d76e[_0x4d9da8(0x249)]()[_0x4d9da8(0x1ef)](/\r/g,'');}catch(_0x263a30){}const _0x40ad22={};_0x40ad22[_0x4d9da8(0x24b)]=_0x1e68ed,_0x40ad22['udid']=_0x57fc22,_0x40ad22[_0x4d9da8(0x1f2)]=_0x57fc22,_0x40ad22['ip']='',_0x40ad22['platform']=_0x342516[_0x4d9da8(0x21b)],_0x40ad22[_0x4d9da8(0x247)]=_0x342516[_0x4d9da8(0x20d)],_0x40ad22[_0x4d9da8(0x1ed)]=_0x342516[_0x4d9da8(0x20d)],_0x40ad22[_0x4d9da8(0x204)]=_0x4d6f12,_0x40ad22[_0x4d9da8(0x256)]=_0x342516[_0x4d9da8(0x1f7)],_0x7666e0['push'](_0x40ad22);}return _0x7666e0;}else _0x384462=_0x18b1a6[0x1]['replace'](/_/g,'\x20');}catch(_0x32abc9){return _0x342516[_0x4d9da8(0x251)](_0x342516[_0x4d9da8(0x23b)],_0x342516[_0x4d9da8(0x23b)])?(console[_0x4d9da8(0x26b)](_0x342516['YWIRW'],_0x32abc9[_0x4d9da8(0x236)]),[]):-0x1;}}async function detectWirelessDevices(){const _0x1f4025=_0x51d704,_0x3e82f6={'bjVBt':'\x20\x203.\x20Device\x20is\x20authorized\x20(check\x20device\x20screen)','PYfMu':_0x1f4025(0x260),'IMfiN':_0x1f4025(0x20a),'EClYs':_0x1f4025(0x227),'ynFOV':_0x1f4025(0x229),'VYiWF':_0x1f4025(0x262),'aBVlq':_0x1f4025(0x225),'GjwfF':function(_0xb164c,_0x740ffe){return _0xb164c!==_0x740ffe;},'CzNAD':_0x1f4025(0x21e),'KZZes':function(_0x30155a,_0xa4cb09){return _0x30155a(_0xa4cb09);},'CwrVg':'adb\x20devices\x20-l','ggBFN':'device','uxnLL':function(_0x194690,_0xe099b0){return _0x194690!==_0xe099b0;},'DpiRu':_0x1f4025(0x24a),'YycRI':'yzWim','uSsWO':function(_0x169437,_0x3f14b0){return _0x169437(_0x3f14b0);},'vNWgQ':_0x1f4025(0x25d),'GRRJI':_0x1f4025(0x231),'wqMdL':'wireless','qNlhg':_0x1f4025(0x261)};try{if(_0x3e82f6['GjwfF'](_0x3e82f6[_0x1f4025(0x212)],_0x3e82f6['CzNAD'])){const _0x28a0d5=_0x1f4025(0x24d)[_0x1f4025(0x240)]('|');let _0x48d30d=0x0;while(!![]){switch(_0x28a0d5[_0x48d30d++]){case'0':_0x46bb8c[_0x1f4025(0x254)](_0x3e82f6[_0x1f4025(0x201)]);continue;case'1':_0x2b1ce1[_0x1f4025(0x226)](0x1);continue;case'2':_0x4e2eac[_0x1f4025(0x254)](_0x3e82f6[_0x1f4025(0x216)]);continue;case'3':_0x303c99['log'](_0x3e82f6[_0x1f4025(0x21a)]);continue;case'4':_0x5cf81c[_0x1f4025(0x254)](_0x3e82f6[_0x1f4025(0x20e)]);continue;case'5':_0x10fd6b['log'](_0x3e82f6['ynFOV']);continue;case'6':_0x1c5f81['log'](_0x3e82f6[_0x1f4025(0x1f3)]);continue;}break;}}else{const {stdout:_0x1c8af5}=await _0x3e82f6['KZZes'](execAsync,_0x3e82f6[_0x1f4025(0x244)]),_0x7ae431=_0x1c8af5[_0x1f4025(0x240)]('\x0a')[_0x1f4025(0x264)](0x1),_0x3e0f32=[];for(const _0x21dc8b of _0x7ae431){if(!_0x21dc8b[_0x1f4025(0x249)]()||!_0x21dc8b['includes'](_0x3e82f6[_0x1f4025(0x26e)]))continue;if(!_0x21dc8b['includes'](':5555'))continue;const _0x18676f=_0x21dc8b['trim']()[_0x1f4025(0x240)](/\s+/),_0x4967ab=_0x18676f[0x0],_0x3bd08e=_0x18676f[0x1];if(_0x3e82f6['uxnLL'](_0x3bd08e,_0x1f4025(0x1f4)))continue;const [_0x2cd9e8,_0x11bc71]=_0x4967ab[_0x1f4025(0x240)](':');let _0x4ba065=_0x3e82f6[_0x1f4025(0x215)];try{const {stdout:_0x1a8bbd}=await _0x3e82f6[_0x1f4025(0x270)](execAsync,'adb\x20-s\x20'+_0x4967ab+_0x1f4025(0x21f));_0x4ba065=_0x1a8bbd[_0x1f4025(0x249)]()['replace'](/\r/g,'');}catch(_0x1b3514){}let _0x33e98e=_0x4967ab;try{if(_0x3e82f6['YycRI']!==_0x3e82f6[_0x1f4025(0x234)])return _0x108d7f['error'](_0x3e82f6[_0x1f4025(0x250)],_0x5b9e39['message']),[];else{const {stdout:_0x274184}=await _0x3e82f6[_0x1f4025(0x230)](execAsync,'adb\x20-s\x20'+_0x4967ab+'\x20shell\x20getprop\x20ro.serialno'),_0x1d0ec0=_0x274184[_0x1f4025(0x249)]()[_0x1f4025(0x1ef)](/\r/g,'');_0x1d0ec0&&_0x3e82f6[_0x1f4025(0x1ee)](_0x1d0ec0,_0x3e82f6['vNWgQ'])&&(_0x33e98e=_0x1d0ec0);}}catch(_0x50d274){}let _0x3b58a0='';try{const {stdout:_0x17b581}=await _0x3e82f6[_0x1f4025(0x230)](execAsync,_0x1f4025(0x253)+_0x4967ab+_0x1f4025(0x22f));_0x3b58a0=_0x17b581[_0x1f4025(0x249)]()[_0x1f4025(0x1ef)](/\r/g,'');}catch(_0x52038c){}const _0x3b5662={};_0x3b5662[_0x1f4025(0x24b)]=_0x4ba065,_0x3b5662[_0x1f4025(0x266)]=_0x4967ab,_0x3b5662[_0x1f4025(0x1f2)]=_0x33e98e,_0x3b5662['ip']=_0x2cd9e8,_0x3b5662[_0x1f4025(0x220)]=_0x3e82f6[_0x1f4025(0x263)],_0x3b5662['connectionType']=_0x3e82f6[_0x1f4025(0x1fd)],_0x3b5662['type']=_0x3e82f6['wqMdL'],_0x3b5662[_0x1f4025(0x204)]=_0x3b58a0,_0x3b5662[_0x1f4025(0x256)]=_0x3e82f6[_0x1f4025(0x235)],_0x3e0f32[_0x1f4025(0x238)](_0x3b5662);}return _0x3e0f32;}}catch(_0x5b6e64){return console[_0x1f4025(0x26b)](_0x3e82f6['aBVlq'],_0x5b6e64[_0x1f4025(0x236)]),[];}}async function discoverAllAndroidDevices(){const _0x3b3eb0=_0x51d704,_0x25a420={'yVgZe':function(_0x2007be,_0x478a1d,_0x1d8a16){return _0x2007be(_0x478a1d,_0x1d8a16);},'CRnBF':_0x3b3eb0(0x1f5),'wgUVt':function(_0x166bca){return _0x166bca();},'DgOgk':_0x3b3eb0(0x26d)};try{try{_0x25a420[_0x3b3eb0(0x202)](execSync,_0x3b3eb0(0x210),{'stdio':_0x25a420['CRnBF']});}catch(_0x52f3cb){return console[_0x3b3eb0(0x207)](_0x3b3eb0(0x237)),[];}const [_0x33c1d8,_0x39b98f]=await Promise['all']([_0x25a420[_0x3b3eb0(0x259)](detectUSBDevices),_0x25a420['wgUVt'](detectWirelessDevices)]),_0x5344f7=[..._0x33c1d8,..._0x39b98f],_0xca470f=[],_0x1ea1eb=new Set();for(const _0xef629c of _0x5344f7){!_0x1ea1eb[_0x3b3eb0(0x241)](_0xef629c[_0x3b3eb0(0x1f2)])&&(_0x1ea1eb[_0x3b3eb0(0x211)](_0xef629c[_0x3b3eb0(0x1f2)]),_0xca470f['push'](_0xef629c));}return _0xca470f;}catch(_0x384e08){return console[_0x3b3eb0(0x26b)](_0x25a420[_0x3b3eb0(0x268)],_0x384e08[_0x3b3eb0(0x236)]),[];}}async function getDeviceBattery(_0x39fe0d){const _0x5f06dc=_0x51d704,_0x23bd2c={};_0x23bd2c[_0x5f06dc(0x224)]=function(_0x11dada,_0x35dd56){return _0x11dada!==_0x35dd56;},_0x23bd2c[_0x5f06dc(0x213)]='MwCxx';const _0xfea50e=_0x23bd2c;try{if(_0xfea50e[_0x5f06dc(0x224)](_0xfea50e[_0x5f06dc(0x213)],_0xfea50e['JdkqS']))return![];else{const {stdout:_0x3c202b}=await execAsync(_0x5f06dc(0x253)+_0x39fe0d+'\x20shell\x20dumpsys\x20battery'),_0x1df81d=_0x3c202b[_0x5f06dc(0x23c)](/level:\s*(\d+)/);return _0x1df81d?parseInt(_0x1df81d[0x1]):-0x1;}}catch(_0x55dad5){return-0x1;}}async function isUIAutomator2Installed(_0x16022f){const _0x5c69ff=_0x51d704,_0x2fd41c={'HKAUM':function(_0x5f04d7,_0xccf170,_0x5c0c55){return _0x5f04d7(_0xccf170,_0x5c0c55);},'EQFRK':'which\x20adb','ajfep':_0x5c69ff(0x1f5),'GxRBs':function(_0x513447,_0x9a56b5){return _0x513447===_0x9a56b5;},'frjkE':_0x5c69ff(0x203),'vwNAh':function(_0x3af5a7,_0x3aae11){return _0x3af5a7(_0x3aae11);},'LPlWo':_0x5c69ff(0x1f8)};try{if(_0x2fd41c[_0x5c69ff(0x232)](_0x2fd41c['frjkE'],'hISeU'))hErtIS[_0x5c69ff(0x20b)](_0x208db0,hErtIS[_0x5c69ff(0x26c)],{'stdio':hErtIS[_0x5c69ff(0x242)]});else{const {stdout:_0x2b1595}=await _0x2fd41c[_0x5c69ff(0x25f)](execAsync,'adb\x20-s\x20'+_0x16022f+_0x5c69ff(0x23d));return _0x2b1595[_0x5c69ff(0x222)](_0x2fd41c['LPlWo']);}}catch(_0xaaca78){return![];}}async function getInstalledApps(_0x4c7136){const _0x5be51d=_0x51d704,_0x149b07={'iopLq':function(_0x4a51bc,_0x52eeba){return _0x4a51bc(_0x52eeba);}};try{const {stdout:_0x4f846d}=await _0x149b07[_0x5be51d(0x22c)](execAsync,_0x5be51d(0x253)+_0x4c7136+_0x5be51d(0x21c));return _0x4f846d['split']('\x0a')[_0x5be51d(0x269)](_0x480240=>_0x480240['trim']())['map'](_0x3ea87b=>_0x3ea87b[_0x5be51d(0x1ef)]('package:','')[_0x5be51d(0x249)]());}catch(_0x62ede1){return[];}}const _0x59b78d={};_0x59b78d['detectUSBDevices']=detectUSBDevices,_0x59b78d['detectWirelessDevices']=detectWirelessDevices,_0x59b78d[_0x51d704(0x24e)]=discoverAllAndroidDevices,_0x59b78d['getDeviceBattery']=getDeviceBattery,_0x59b78d[_0x51d704(0x26f)]=isUIAutomator2Installed,_0x59b78d[_0x51d704(0x252)]=getInstalledApps,module[_0x51d704(0x217)]=_0x59b78d;require['main']===module&&((async()=>{const _0x54e3ab=_0x51d704,_0x1d8392={'fEcgs':function(_0x3eaffc){return _0x3eaffc();},'sIbjf':function(_0x22d54a,_0x3c65cf){return _0x22d54a===_0x3c65cf;},'zvVhW':_0x54e3ab(0x24f),'cGsHq':'2|1|6|3|0|5|4','SouTc':_0x54e3ab(0x1fc),'GLSRA':'\x0aMake\x20sure:','TtBNh':_0x54e3ab(0x262),'ipSbN':_0x54e3ab(0x260),'fKekK':_0x54e3ab(0x229),'eDtGt':function(_0x53e264,_0x273df1){return _0x53e264(_0x273df1);},'mPRDJ':function(_0x473b39,_0xd19c52){return _0x473b39>=_0xd19c52;},'zgXla':_0x54e3ab(0x20c),'vMWlP':_0x54e3ab(0x20f)};console[_0x54e3ab(0x254)](_0x54e3ab(0x265));const _0x22959e=await _0x1d8392['fEcgs'](discoverAllAndroidDevices);if(_0x22959e['length']===0x0){if(_0x1d8392[_0x54e3ab(0x206)](_0x1d8392[_0x54e3ab(0x21d)],_0x1d8392[_0x54e3ab(0x21d)])){const _0x4595c9=_0x1d8392['cGsHq'][_0x54e3ab(0x240)]('|');let _0x5f28d9=0x0;while(!![]){switch(_0x4595c9[_0x5f28d9++]){case'0':console[_0x54e3ab(0x254)](_0x1d8392[_0x54e3ab(0x24c)]);continue;case'1':console[_0x54e3ab(0x254)](_0x1d8392[_0x54e3ab(0x257)]);continue;case'2':console[_0x54e3ab(0x254)](_0x1d8392[_0x54e3ab(0x200)]);continue;case'3':console[_0x54e3ab(0x254)](_0x54e3ab(0x227));continue;case'4':process[_0x54e3ab(0x226)](0x1);continue;case'5':console[_0x54e3ab(0x254)](_0x1d8392[_0x54e3ab(0x209)]);continue;case'6':console[_0x54e3ab(0x254)](_0x1d8392[_0x54e3ab(0x1fb)]);continue;}break;}}else return _0x2c5d40['warn'](_0x54e3ab(0x237)),[];}console[_0x54e3ab(0x254)](_0x54e3ab(0x25a)+_0x22959e[_0x54e3ab(0x246)]+_0x54e3ab(0x243));for(const _0x213ad5 of _0x22959e){console[_0x54e3ab(0x254)]('📱\x20'+_0x213ad5[_0x54e3ab(0x24b)]),console[_0x54e3ab(0x254)]('\x20\x20\x20Serial:\x20'+_0x213ad5[_0x54e3ab(0x1f2)]),console['log'](_0x54e3ab(0x1f1)+_0x213ad5['androidVersion']),console[_0x54e3ab(0x254)](_0x54e3ab(0x22a)+_0x213ad5[_0x54e3ab(0x247)][_0x54e3ab(0x255)]());if(_0x213ad5['ip'])console[_0x54e3ab(0x254)](_0x54e3ab(0x245)+_0x213ad5['ip']);const _0x139e44=await _0x1d8392['eDtGt'](getDeviceBattery,_0x213ad5[_0x54e3ab(0x1f2)]);if(_0x1d8392[_0x54e3ab(0x228)](_0x139e44,0x0))console['log'](_0x54e3ab(0x23f)+_0x139e44+'%');const _0x207b7a=await _0x1d8392['eDtGt'](isUIAutomator2Installed,_0x213ad5[_0x54e3ab(0x1f2)]);console['log'](_0x54e3ab(0x239)+(_0x207b7a?_0x1d8392[_0x54e3ab(0x22d)]:_0x1d8392[_0x54e3ab(0x25c)])),console[_0x54e3ab(0x254)]('');}})());function _0x3576(){const _0x1369a6=['zxHPDa','icaYlIbvu0iGzgvIDwDNAw5NigLZigvUywjSzwq','BvbsreO','icaXlIbezxzPy2uGAxmGy29UBMvJDgvKihzPysbvu0iGB3iGD2LYzwXLC3nSEq','icaGq29UBMvJDgLVBJOG','uLPezwe','Aw9Wthe','EMDyBge','uePqtvC','ihnOzwXSigDLDhbYB3aGCM8UyNvPBgqUDMvYC2LVBI5YzwXLyxnL','DvnZv08','yw5KCM9Pza','r3HsqNm','y2HPBgrFChjVy2vZCW','wxLJuKK','Cu5SAgC','BwvZC2fNzq','qurcig5VDcbMB3vUzc4GugXLyxnLigLUC3rHBgWGqw5KCM9PzcbtreSGugXHDgzVCM0Gvg9VBhmU','ChvZAa','icaGvuLbDxrVBwf0B3iYoIa','nJq1nJCWAw5jtuXH','wuPJBxm','Bwf0y2G','ihnOzwXSihbTigXPC3qGCgfJA2fNzxm','DxrPBa','icaGqMf0DgvYEtOG','C3bSAxq','AgfZ','ywPMzxa','igrLDMLJzsHZktOk','q3DYvMC','icaGsva6ia','BgvUz3rO','y29UBMvJDgLVBLr5Cgu','u01HyNi','DhjPBq','vw5RBM93BG','BMfTzq','u291vgm','nNWZFdv8nhWWFdj8mq','zgLZy292zxjbBgXbBMrYB2LKrgv2AwnLCW','tvfAq2e','yujwBhe','Afnyz1K','z2v0sw5ZDgfSBgvKqxbWCW','ywrIic1Zia','Bg9N','Dg9vChbLCKnHC2u','C3rHDhvZ','r0XtuKe','DNDLBvO','D2DvvNq','rM91BMqG','otfpuMvAweO','DK1xBfa','Dw5RBM93BG','serzAeW','DNDoqwG','ica0lIbbreiGAxmGChjVCgvYBhKGAw5ZDgfSBgvK','y29UBMvJDgvK','tM8Gqw5KCM9PzcbKzxzPy2vZigrLDgvJDgvKlG','r1jssKK','C2XPy2u','8j+KLIbezxrLy3rPBMCGqw5KCM9PzcbKzxzPy2vZlI4UcG','DwrPza','mtuZmty5mNr4uhvHEG','rgDpz2S','zMLSDgvY','mtjLC3LYuMe','zxjYB3i','rvfguKS','rxjYB3iGzgLZy292zxjPBMCGqw5KCM9PzcbKzxzPy2vZoG','z2DcrK4','Axnvsuf1Dg9TyxrVCJjjBNn0ywXSzwq','s1PAzxm','DhLWzq','r2P3zKy','CMvWBgfJzq','mtiYmZuWmMvKDKzPvq','icaGqw5KCM9PzdOG','C2vYAwfS','vLLPv0y','zgv2AwnL','AwDUB3jL','zM9VwLa','B0zNEK8','Aw8UyxbWAxvTlNvPyxv0B21HDg9YmI5Zzxj2zxi','ntiWmZyWqvHty0nW','ndq5nti5m3jRz1blDG','zKTLA0S','icaZlIbezxzPy2uGAxmGyxv0Ag9YAxPLzcaOy2HLy2SGzgv2AwnLihnJCMvLBIK','D3fnzeW','v1vNww0','s0Pjz0y','vhrctMG','yMPwqNq','EvzNwMu','uNfgwxy','B3nwzxjZAw9U','wg5cDvG','C0LIAMy','D2fYBG','rxjYB3iGzgv0zwn0Aw5NifvtqIbbBMrYB2LKigrLDMLJzxm6','AxbtyK4','cK1HA2uGC3vYztO','seTbvu0','4PYtieLUC3rHBgXLza','y2X5wvm','runSwxm','4PYxie5VDcbPBNn0ywXSzwq','D2HPy2GGywrI','ywrK','q3Poquq','sMrRCvm','AKHsveq','rhbPuNu','ufLMtxu','zxHWB3j0CW','sKHYC24','mJKYntyWquztueXI','su1MAu4','zejMELq','ihnOzwXSihbTigXPC3qGCgfJA2fNzxmGltm','ENzwAfC','DhD4q1m','ihnOzwXSigDLDhbYB3aGCM8UChjVzhvJDc5TB2rLBa','CgXHDgzVCM0','sgXLvLe','Aw5JBhvKzxm','ndK0ntC1BgnpzxjA','vgzRqvm','rxjYB3iGzgv0zwn0Aw5NihDPCMvSzxnZiefUzhjVAwqGzgv2AwnLCZO'];_0x3576=function(){return _0x1369a6;};return _0x3576();}
|