• Stars
    star
    433
  • Rank 100,464 (Top 2 %)
  • Language
    C++
  • License
    Other
  • Created almost 8 years ago
  • Updated over 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

iOS Minicap provides a socket interface for streaming realtime screen capture data out of iOS devices.

Warning

This project along with other ones in OpenSTF organisation is provided as is for community, without active development.

You can check any other forks that may be actively developed and offer new/different features here.

Active development has been moved to DeviceFarmer organisation.

ios-minicap

iOS Minicap provides a socket interface for streaming realtime screen capture data out of iOS devices. It is built with AVFoundation and iOS Screen mirroring feature.

Requirements

  • brew install libjpeg-turbo (>=1.5 is required)
  • Xcode (for the Frameworks)
  • cmake
  • OS X Yosemite (10.9) or higher
  • iOS 8 or higher
  • Lightning cable. See the list of devices.

Building

./build.sh

You should now have the binaries available in ./build.

Usage

The minicap protocol is a simple push-based binary protocol. When you first connect to the socket, you get a global header followed by the first frame. The global header will not appear again. More frames keep getting sent until you stop minicap.

Before run, please, check that:

  • Node.js 6+ is used (required to run example app.js)
  • the computer is trusted by the phone
  • the phone screen is not turned off

You can try it using:

./run.sh

And in another window:

cd example
npm install
node app.js

Then open http://localhost:9002 in browser

When device have big FPS, minicap is sending frames to example app trough the localhost connection too quickly, so it could not draw it quick enough. That could cause frames to delay.

Global header binary format

Appears once.

Bytes Length Type Explanation
0 1 unsigned char Version (currently 1)
1 1 unsigned char Size of the header (from byte 0)
2-5 4 uint32 (low endian) Pid of the process
6-9 4 uint32 (low endian) Real display width in pixels
10-13 4 uint32 (low endian) Real display height in pixels
14-17 4 uint32 (low endian) Virtual display width in pixels
18-21 4 uint32 (low endian) Virtual display height in pixels
22 1 unsigned char Display orientation
23 1 unsigned char Quirk bitflags (see below)

Quirk bitflags

Currently, the following quirks may be reported:

Value Name Explanation
1 QUIRK_DUMB Frames will get sent even if there are no changes from the previous frame. Informative, doesn't require any actions on your part. You can limit the capture rate by reading frame data slower in your own code if you wish.
2 QUIRK_ALWAYS_UPRIGHT The frame will always be in upright orientation regardless of the device orientation. This needs to be taken into account when rendering the image.
4 QUIRK_TEAR Frame tear might be visible. Informative, no action required. Neither of our current two methods exhibit this behavior.

Frame binary format

Appears a potentially unlimited number of times.

Bytes Length Type Explanation
0-3 4 uint32 (low endian) Frame size in bytes (=n)
4-(n+4) n unsigned char[] Frame in JPG format

Generation for Xcode

Optionally you may want to use Xcode for developing or building. But still, you should use cmake as a build system.

./open_xcode.sh

More Repositories

1

stf

Control and manage Android devices from your browser.
JavaScript
13,308
star
2

minicap

Stream real-time screen capture data out of Android devices.
C++
1,715
star
3

adbkit

A pure Node.js client for the Android Debug Bridge.
CoffeeScript
826
star
4

minitouch

Minimal multitouch event producer for Android.
C
630
star
5

STFService.apk

Monitor and perform various actions on your Android device. Not meant for actual user devices.
Java
235
star
6

android-libjpeg-turbo

Standalone Android.mk configuration for libjpeg-turbo.
Makefile
152
star
7

adbkit-apkreader

Extracts information from APK files.
JavaScript
133
star
8

stf-appium-example

Run Appium test on OpenSTF Device
Ruby
110
star
9

stf-device-db

A JSON-based database of smartphones, tablets and wearables.
Makefile
73
star
10

docker-aosp

Docker images for checking out AOSP branches and building external code inside the source tree.
Shell
50
star
11

adbkit-monkey

A Node.js interface to the Android monkey tool.
CoffeeScript
47
star
12

setup-examples

STF Setup Examples using Vagrant and Docker
45
star
13

minirev

Minimal reverse port forwarding implementation for Android.
C
45
star
14

adbkit-logcat

A Node.js interface for working with Android's logcat output.
JavaScript
41
star
15

RotationWatcher.apk

Small CLI app for tracking Android rotation changes in real time.
Java
25
star
16

openstf.github.io

Public site for STF
JavaScript
22
star
17

stf-syrup

Provides a minimal Promise-based dependency injection framework for Node.js.
CoffeeScript
20
star
18

node-minicap

A minicap driver for Node.
JavaScript
15
star
19

stf-appium

Placeholder repository for any future stf-appium integration
11
star
20

docker-openstf-base

ABANDONED in favor of doing the whole thing in the main Dockerfile of openstf/stf.
6
star
21

stf-appstore-db

A small collection of different app stores for STF.
Makefile
6
star
22

docker-ambassador

Our own glorious ambassador to avoid external breakage.
Shell
3
star
23

stf-browser-db

A simple browser database for STF.
Makefile
3
star
24

eslint-config-stf

STF - ESLint Shareable Config
JavaScript
1
star