@u4/adbkit
Version:
A Typescript client for the Android Debug Bridge.
16 lines • 469 B
JavaScript
import Command from '../../command.js';
const RE_OK = /restarting adbd as root/;
export default class RootCommand extends Command {
async execute() {
await this._send('root:');
await this.readOKAY();
const value = await this.parser.readAll();
if (RE_OK.test(value.toString())) {
return true;
}
else {
throw new Error(value.toString().trim());
}
}
}
//# sourceMappingURL=root.js.map