How to increase time limit of ADB screen record of Android Kitkat

后端 未结 5 843
北海茫月
北海茫月 2020-12-15 09:31

I was using screen record functionality of ADB to record video of my application. It is very convenient and useful. Only issue I found is maximum time limit of 3 minutes (18

5条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-15 10:14

    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!)

提交回复
热议问题