Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rming/c783ce59fb26f6cd5e48dcb8ed1ef838 to your computer and use it in GitHub Desktop.
Save rming/c783ce59fb26f6cd5e48dcb8ed1ef838 to your computer and use it in GitHub Desktop.
How to increase time limit of ADB screen record of Android Kitkat

I encounter the same problem.

Here is my solution. Briefly speaking, it can be solved by recompiling the android source. Patients are needed.

1, Following the instruction here https://source.android.com/source/initializing.html to initialize a build environment.

2, Download the source code from git (Take about 1 hour with 10 M bandwidth).

3, Modify the path_to_working_directory/frameworks/av/cmds/screenrecord/screenrecord.cpp by changing the kMaxTimeLimitSec to 7200 (means 2 hours).

4, Compile the android (Take about 2 hours with Core i5-2500k and 8G RAM)

5, Copy the path_to_working_directory/out/target/product/flo/system/bin/screenrecord to /system/bin in your android phone (Remember to make backup of origin screenrecord in case!)

REF: https://stackoverflow.com/questions/21938948/how-to-increase-time-limit-of-adb-screen-record-of-android-kitkat

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment