Screenshots » History » Revision 9

Revision 8 (doak complex, 01/24/2020 12:16 AM) → Revision 9/17 (doak complex, 01/24/2020 12:21 AM)

h1. Screenshots 

 On Android, it is usually possible to take a screenshot by pressing the @Volume Down@ and @Power@ buttons. A shortcut can also be added to the menu that pops up when long-pressing the @Power@ _Power_ button. These options only work on Replicant _Replicant_ when [[Graphics|llvmpipe is enabled as renderer]] for SurfaceFlinger _SurfaceFlinger_ (the screen compositor). Be aware that there are issues with other apps like Gallery. _Gallery_. Furthermore, there doesn't seem to exist an app in F-Droid _F-Droid_ that makes it possible to take screenshots on Replicant _Replicant_ when llvmpipe _llvmpipe_ is not enabled. 

 Regardless of which graphics renderer is enabled, it is possible to take screenshots when the device is connected to a PC with a USB cable. The following steps explain the procedure. 

 h2. Preparations 

 Make sure [[ADB]] is running as root. 

 Download this script: "": 

 You need to have ffmpeg _ffmpeg_ installed. If ffmpeg _ffmpeg_ is not available on your GNU/Linux _GNU/Linux_ system but avconv _avconv_ is (e.g. as part of libav-tools), _libav-tools_), you will have to change the line 


 at the beginning of the script. 

 h2. Taking a screenshot 

 Run the script to take a screenshot: 
 ./ -f OUTPUT.PNG 

 @OUTPUT:PNG@ is the filename of the screenshot. The screenshot will be saved with this filename in the directory you are running the script in. The script only supports the PNG format for screenshots. 

 The display size in pixels is autodetected. If you want the script to take less time for a screenshot, you can add the screen size as another option, e.g.: 
 ./ -s 720x1280 -f OUTPUT.PNG 

 h3. In recovery mode 

 It is possible to take screenshots in recovery mode with the script by running: 

 As screen size detection does not work in recovery mode, the screen size needs to be specified.