Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

adb-record-screen

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

adb-record-screen

Screen recording function using Android Debug Bridge (adb).

  • 1.16.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
200
decreased by-25.93%
Maintainers
1
Weekly downloads
 
Created
Source

adb record screen

Screen recording function using Android Debug Bridge (adb).

Contents

Requirements

This is a thin wrapper around adb and has no other dependencies.

Installation

npm install adb-record-screen

Usage

const recordScreen = require('adb-record-screen')

const recording = recordScreen('/tmp/test.mp4', {
  bugreport: true
})

recording.promise
  .then(result => {
    // Screen recording is done
    process.stdout.write(result.stdout)
    process.stderr.write(result.stderr)
  })
  .catch(error => {
    // Screen recording has failed
    console.error(error)
  })

// As an example, stop the screen recording after 5 seconds:
setTimeout(() => recording.stop(), 5000)

Options

const defaultOptions = {
  serial: undefined, // Use device with given serial
  transportID: undefined, // Use device with given transport ID
  hostname: undefined, // Android device hostname
  port: 5555, // Android device port
  waitTimeout: 5000, // Device wait timeout (ms), set to 0 to disable wait
  bugreport: undefined, // Set to `true` to add additional info to the video
  size: undefined, // WIDTHxHEIGHT, defaults to native device resolution
  bitRate: 4000000, // Bits per second, default is 4Mbps
  timeLimit: 180, // Time limit (s), maximum is 180 (3 mins)
  pullDelay: 200 // Delay (ms) before pulling the video file
}

Testing

  1. Start Docker.
  2. Start Android Emulator.
  3. Install development dependencies:
    npm install
    
  4. Run the tests:
    npm test
    

License

Released under the MIT license.

Author

Sebastian Tschan

Keywords

FAQs

Package last updated on 25 Sep 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc