Screenshots » History » Revision 11
Revision 10 (dl lud, 01/24/2020 04:56 AM) → Revision 11/17 (dl lud, 01/24/2020 05:30 AM)
h1. Screenshots On Android, it is usually possible to take a screenshot by pressing simultaneously the @Volume Down@ and @Power@ buttons. A shortcut can also be added to the menu that pops up when long-pressing the @Power@ button. Unfortunately this doesn't These options only work out-of-the-box in on Replicant because [[GraphicsResearch#Android-software-renderer|libagl]], the software renderer used when [[Graphics|llvmpipe is enabled as renderer]] for SurfaceFlinger (screen compositor), has an incomplete OpenGL ES implementation. h2. Taking screenshots in Replicant It is possible to take screenshots from within Replicant by forcing SurfaceFlinger to use [[GraphicsResearch#Mesas-llvmpipe|llvmpipe]]. (the screen compositor). Be aware that this will make your system extremely slow and bring in [[Graphics#Known-issues-with-llvmpipe|rendering issue to there are issues with other apps such as Gallery and Orbot]]. h3. Replicant 6.0 0003 On Replicant 6.0 0003 it is only possible like Gallery. Furthermore, there doesn't seem to change the software renderer system-wide. Please follow the instructions at [[Graphics#Choosing-the-default-software-renderer| Graphics - Choosing the default software renderer]]. h3. Replicant 6.0 0004 As of Replicant 6.0 0004, llvmpipe is used as the default renderer. However, due to performance reasons, exist an exception is app in place F-Droid that forces SurfaceFlinger makes it possible to use libagl instead. Follow these steps to remove the exception: # Install [[ADB]] take screenshots on your computer. Make sure that it can access the device's [[ADB#Accessing-root-shell|root shell]] and that the [[ADB#Modifying-the-system-partition|system partition Replicant when llvmpipe is mounted as writable]]. # Remove the file that makes SurfaceFlinger use libagl: <pre> adb shell rm /system/etc/libGLES_android/system/bin/surfaceflinger </pre> # Reboot your device. # To revert, recreate the file (it is just an empty file): <pre> adb shell touch /system/etc/libGLES_android/system/bin/surfaceflinger </pre> not enabled. h2. Taking screenshots with a computer Regardless of which graphics renderer is enabled, it is possible to take screenshots when the device is connected to a computer through an PC with a USB cable. The following steps explain the procedure. # h2. Preparations Make sure [[ADB]] is installed on your computer and that it can access the device's [[ADB#Accessing-root-shell|root shell]] # running as root. Download this script: "screencap.sh":https://git.replicant.us/replicant/vendor_replicant-scripts/plain/screencap/screencap.sh # You need to have ffmpeg installed. If ffmpeg is not available on your GNU/Linux distribution system but avconv is (e.g. as part of libav-tools), you will have to change the line <pre> FFMEG="ffmpeg" </pre> to <pre> FFMEG="avconv" </pre> at the beginning of the script. # h2. Taking a screenshot Run the script to take a screenshot: <pre> ./screencap.sh -f OUTPUT.PNG </pre> @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 auto-detected. autodetected. If you want the script to be faster, take less time for a screenshot, you can add the screen size as another option, e.g.: <pre> ./screencap.sh -s 720x1280 -f OUTPUT.PNG </pre> h3. In recovery mode It is also possible to take screenshots in recovery mode with the script by running: <pre> ./screencap.sh -r -s SCREENSIZE -f OUTPUT.PNG </pre> Screen As screen size detection does not work in recovery mode. The mode, the screen size must needs to be specified.