Skip to content
Discussion options

You must be logged in to vote

If shell commands all require the password, you might be able to patch the transport object to enter the password automatically:

import { Adb, AdbServerClient, decodeUtf8, encodeUtf8 } from "@yume-chan/adb";
import { AdbServerNodeTcpConnector } from "@yume-chan/adb-server-node-tcp";
import { TransformStream, WritableStream } from "@yume-chan/stream-extra";

// Get your transport object normally, here I used server transport as an example
async function getTransport() {
  const client = new AdbServerClient(
    new AdbServerNodeTcpConnector({ host: "127.0.0.1", port: 5037 })
  );
  const devices = await client.getDevices();
  if (!devices.length) {
    console.error("No devices found.");
    

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@dstarkoff
Comment options

@sagar2514
Comment options

Answer selected by dstarkoff
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants