@u4/adbkit
    Preparing search index...

    Class Utils

    Index
    • Concatenate an array of Buffers into a single Buffer.

      Parameters

      • buffs: Buffer<ArrayBufferLike>[]

      Returns Buffer

    • Parameters

      • name: string

      Returns Debugger

    • A delay promise

      Parameters

      • ms: number

        time to wait im ms

      Returns Promise<void> & { cancel: () => void }

      void

    • Parses an Android-formatted mincrypt public key (e.g. ~/.android/adbkey.pub).

      Parameters

      • keyString: string

        The key String or [Buffer][node-buffer] to parse. Not a filename.

      Returns Promise<ExtendedPublicKey>

      The key as a forge.pki public key. You may need node-forge for complicated operations.

    • Takes a [Stream][node-stream] and reads everything it outputs until the stream ends. Then it resolves with the collected output. Convenient with client.shell().

      Parameters

      • stream: Duplex

        The [Stream][node-stream] to read.

      Returns Promise<Buffer<ArrayBufferLike>>

      All the output as a [Buffer][node-buffer]. Use output.toString('utf-8') to get a readable string from it.

    • Promise waiter for a Duplex to be readable

      Parameters

      • Optionalduplex: Duplex | Readable | PromiseDuplex<Duplex> | PromiseReadable<Readable>

        a vanilla Duplex of a PromiseDuplex

      • timeout: number = 0

        do not wait more than timeout

      • _debugCtxt: string = ''

      Returns Promise<boolean>

      is the true is duplex is readable

    • Wait for a spesific text in the Duplex all text will be concatened in a single string to dean with segments.

      Parameters

      • duplex: PromiseDuplex<Duplex>
      • expected: RegExp

        regexp to match

      • timeout: number = 10000

      Returns Promise<string>

      matched text