Make Android screenshots of scrollable screen content

Overview

scrollscreenshot

Make Android screenshots of scrollable screen content - brought to you by PGS Software SA

This tool makes a number of screenshots, scrolling screen content automatically between each shot. By default status bar and navigation bar are included only once.

Illustration how images are merged

Documentation:

Usage: com.pgssoft.scrollscreenshot.ScrollScreenShot [options]
  Options:
    -c, --count
       Number of screenshot to take
       Default: 5
    -v, --device
       Device ID, first device is used if not specified (i.e. "4df1902336814fa6"
       or "192.168.56.102:5555")
    -d, --direction
       Swipe direction: topdown (default), leftright (implies "--stitch none")
       Default: topdown
    -h, --help
       Display this help
       Default: false
    -e, --inertia
       Inertia of content, how many pixels are required to start dragging. Use
       non-zero value if there are duplicated stripes.
       Default: 0
  * -i, --inputdevice
       Digitizer input device number, N in /dev/input/eventN
       Default: 1
    -n, --nameprefix
       Output filename prefix
       Default: out
    -p, --pathsdk
       Path to Android SDK
    -s, --stitch
       Stitch mode: full (smooth stitch), none (merged full screenshots),
       separate (separate files)
       Default: full

How to use

You need to know digitizer device input number, which is specific to every device and ROM.

Use command

adb shell getevent -l

and move finger on screen. You will see something like

/dev/input/event2: EV_SYN       SYN_REPORT           00000000
/dev/input/event2: EV_ABS       ABS_MT_WIDTH_MAJOR   00000014
/dev/input/event2: EV_ABS       ABS_MT_POSITION_X    00000247
/dev/input/event2: EV_ABS       ABS_MT_POSITION_Y    0000030c
/dev/input/event2: EV_ABS       ABS_MT_TOUCH_MAJOR   0000001a
/dev/input/event2: EV_ABS       ABS_MT_TOUCH_MINOR   0000000e
/dev/input/event2: EV_ABS       003c                 ffffffb3

In your case device you are looking for has number 2.

You can now start screen capturing. Download latest scrollscreenshot binary, unlock screen, start app you want to scroll-capture and type (replace 2 by your device input number):

java -cp scrollscreenshot-latest.jar com.pgssoft.scrollscreenshot.ScrollScreenShot -i 2

If eveything goes well, you will get file out.png with something like:

SAMPLE

Left-to-right mode will give you something like this:

SAMPLE

Todo:

  • scrolling in all 4 directions
  • automatic detection of scroll area edge

Changelog

  • 0.1 - initial release, only top-down scrolling for first device found by ADB
  • 0.2 - scrolling top-down and left-right, stitch now works in smooth/none/separate modes, ADB device can be choosen by id
  • 0.3 - fixed NPE when using separate stitch mode

Acknowledgments

Android Arsenal

License

scrollscreenshot for Android

Copyright (c) 2014 PGS Software SA

https://github.com/PGSSoft/scrollscreenshot

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Comments
  • Weird Output on Nexus 4 5.1.1

    Weird Output on Nexus 4 5.1.1

    Hi there,

    I found the idea of this tool great but I've difficulties to make it work:

    I receive something like this as result:

    out

    and I cannot figure out why... :cry:

    Does someone have an idea?

    Command was: java -cp scrollscreenshot-latest.jar com.pgssoft.scrollscreenshot.ScrollScreenShot -i 2 --pathsdk ~/Android_Dev/android-sdk-macosx/ -c 5

    Can it be because I have Android Studio opened and a debugger active ? Best

    opened by lolobosse 11
  • Issue on screen size.

    Issue on screen size.

    on certain devices, img.height are not equal to oneScreenImage.getHeight() and that makes summaryImage size not equal to the total size of stitched captured screenshot.

    opened by meldonization 5
  • Doesn't seem to work (java.io.IOException: EOF)

    Doesn't seem to work (java.io.IOException: EOF)

    $ java -cp scrollscreenshot-latest.jar com.pgssoft.scrollscreenshot.ScrollScreenShot -i 1 --pathsdk /tmp/android-studio
    Screenshot 1 of 5
    java.io.IOException: EOF
    

    Already tried J2SE 8u152 and 7u80. Does this application has preferences in regard to Android version, adb version, JavaSE version, etc.?

    Strace shows that it works but something is missing. On the phone itself I've noticed scrolling but just once.

    No files are being produced at all.

    opened by birdie-github 3
  • Merge gets a bit overlapped

    Merge gets a bit overlapped

    Thanks for this tool, just reporting a little issue while merging some images get overlapped, e.g. first posters, also see "The Aviator" card row, also "Seinfeld" header, I'm using a Nexus 5 VM from Genymotion

    out

    this is how the cards look normally

    device-2014-10-22-174955

    enhancement 
    opened by eveliotc 2
  • java.lang.NullPointerException: Cannot read field

    java.lang.NullPointerException: Cannot read field "width" because "img" is null

    Hi,

    I appreciate if you could help me, I'm using the command:

    java -cp scrollscreenshot-latest.jar com.pgssoft.scrollscreenshot.ScrollScreenShot -i 3

    And I have this issue.

    Screenshot 1 of 5 02:33:23 E/Screenshot: Unsupported protocol: 2 java.lang.NullPointerException: Cannot read field "width" because "img" is null

    Tested in Samsung Galaxy S20 - Android 11

    opened by Alberto2021 0
  • Please add continues scroll mode

    Please add continues scroll mode

    Please add continues screenshots mode. ie keep running and taking screenshots until I stop it(ctrl-c or similar interrupt). It's hard to judge how many screenshots I would need to take to capture everything. Sometimes it's not enough, sometimes it's too many.

    opened by mxxcon 0
  • Screen larger then some length is not captured.

    Screen larger then some length is not captured.

    For example if I open whatsapp then first ~x contact chats are displayed, not all. Open some large static webpage, only some content is copied What can be reason behind this?

    opened by rajkshah14 1
  • Stitching creating duplication and overlap

    Stitching creating duplication and overlap

    Normal Run

    java -cp scrollscreenshot-latest.jar com.pgssoft.scrollscreenshot.ScrollScreenShot -i 1
    

    out

    Separate Images

    java -cp scrollscreenshot-latest.jar com.pgssoft.scrollscreenshot.ScrollScreenShot -i 1 -c 4 -s separate -n c-sep
    

    c-sep0 c-sep1 c-sep2 c-sep3

    opened by ryancford 11
Owner
PGS Software
PGS Software
Custom content tool for The Ponies.

PoneCrafter A sneak preview of the custom content tool for The Ponies. The Ponies is a work in progress life simulator game. The game itself has not b

The Ponies 8 Feb 13, 2022
Taskbar puts a start menu and recent apps tray on top of your screen that's accessible at any time

Taskbar puts a start menu and recent apps tray on top of your screen that's accessible at any time, increasing your productivity and turning your Andr

Braden Farmer 551 Dec 31, 2022
Make mosaic effect on android

ProMosaic Make mosaic for image on android. Features Select Mode Follow finger Select rectangle Effect Mode Grid color based on original image Blur Im

dawson 359 Dec 29, 2022
Make mosaic effect on android

ProMosaic Make mosaic for image on android. Features Select Mode Follow finger Select rectangle Effect Mode Grid color based on original image Blur Im

dawson 359 Dec 29, 2022
A tool to install components of the Android SDK into a Maven repository or repository manager to use with the Android Maven Plugin, Gradle and other tools.

Maven Android SDK Deployer Original author including numerous fixes and changes: Manfred Moser [email protected] at simpligility technologies i

simpligility 1.4k Dec 27, 2022
A simple utility to remove unused resources in your Android app to lower the size of the APK. It's based on the Android lint tool output.

android-resource-remover android-resource-remover is utility that removes unused resources reported by Android Lint from your project. The goal is to

Keepsafe 1.3k Dec 16, 2022
This is a Android Studio/ IntelliJ IDEA plugin to localize your Android app, translate your string resources automactically.

#Android Localizationer This is a Android Studio/ IntelliJ IDEA plugin to localize your Android app, translate your string resources automactically. T

Wesley Lin 822 Dec 8, 2022
A tool to install components of the Android SDK into a Maven repository or repository manager to use with the Android Maven Plugin, Gradle and other tools.

Maven Android SDK Deployer Original author including numerous fixes and changes: Manfred Moser [email protected] at simpligility technologies i

simpligility 1.4k Dec 27, 2022
Automated-build-android-app-with-github-action - CI/CD Automated Build Android App Bundle / APK / Signed With Github Action

Automated Build Android With Using Github Action Project Github Action Script Us

Faisal Amir 34 Dec 19, 2022
proguard resource for Android by wechat team

AndResGuard Read this in other languages: English, 简体中文. AndResGuard is a tooling for reducing your apk size, it works like the ProGuard for Java sour

shwenzhang 8.1k Jan 9, 2023
A super fast build tool for Android, an alternative to Instant Run

Freeline Freeline is a super fast build tool for Android and an alternative to Instant Run. Caching reusable class files and resource indices, it enab

Alibaba 5.5k Jan 2, 2023
Command-line tool to count per-package methods in Android .dex files

dex-method-counts Simple tool to output per-package method counts in an Android DEX executable grouped by package, to aid in getting under the 65,536

Mihai Parparita 2.6k Nov 25, 2022
View Inspection Toolbar for Android Development

View Inspector Plugin View inspection toolbar for android development. Features Boundary show outlines show margins show paddings Layer Scalpel featur

Fumihiro Xue (Peter Hsieh) 2.2k Nov 14, 2022
🍼Debug Bottle is an Android runtime debug / develop tools written using kotlin language.

???? 中文 / ???? 日本語 / ???? English ?? Debug Bottle An Android debug / develop tools written using Kotlin language. All the features in Debug bottle are

Yuriel Arlencloyn 846 Nov 14, 2022
[] Dissect layout traversals on Android

Probe Dissect layout traversals on Android. Features Intercept View methods. onMeasure(int, int) onLayout(boolean, int, int, int, int) draw(Canvas) an

Lucas Rocha 555 Nov 25, 2022
Android Library Finder

alfi Android Library Finder Search through thousands of android libraries that can help you scale your projects elegantly Usage Search for something a

César Ferreira 509 Dec 8, 2022
Annotation based simple API flavored with AOP to handle new Android runtime permission model

Let Annotation based simple API flavoured with AOP to handle new Android runtime permission model. If you check Google's Samples about the new permiss

Can Elmas 530 Nov 25, 2022
Combines tools for fast android app devlopment

Android - Rapid Test Driven Development Combine tools to generate most of the boilerplate code. Examples how to test different aspects of an android a

Nico Küchler 379 Nov 25, 2022