Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[Feature][ROM][4.4] Screen Recorder w/ Audio

OP 0xD34D

28th November 2013, 06:19 PM   |  #1  
0xD34D's Avatar
OP Senior Member
Flag San Diego
Thanks Meter: 2,048
 
459 posts
Join Date:Joined: Feb 2009
Donate to Me
More
As most of you probably already know, Android 4.4 comes with a binary that allows you to record the display. It's nice to have this feature available but it's not the most convenient method to use. It would be a whole lot nicer if it were exposed to the user through the framework. I did just that and am here today to share it with the masses. I took the original screenrecord code and turned it into a native library with JNI bindings to allow using it in Java.

I've added hooks into PhoneWindowManager which allows the user to press power + volume up start/stop screen recording. Once recording is started there is an ongoing notification that can be pressed to stop recording as well. For those that don't have volume rockers or don't like pressing those two buttons together, I have a couple commits for you to pick which will add an option to the global actions menu that is displayed when you hold down the power button.

Now for the stuff you'll need to get this up and running in your own ROM.

For the core functionality you'll need one commit from frameworks/base and one from Settings as well as the ScreenRecorder app which contains the service that does the majority of the work.
frameworks/base
9a994be91c0cd262b7a28d19e8c2beaa48ba2bd9
Settings
671e2b98bd835e799003a3d13949e407f189b1a1
Screen Recorder app
https://github.com/ChameleonOS/andro...ScreenRecorder

To get these built into your ROM you will need to add a couple products to PRODUCT_PACKAGES, you can decide where you want to add this.
Code:
# Screen recorder
PRODUCT_PACKAGES += \
    ScreenRecorder \
    libscreenrecorder
If you want to add the option to the global actions menu, here are the two commits you will need.
frameworks/base
10cb81031549d33f2103fe5bc15d883c9aee50c9
Settings
a72dc8451cd21e133f9235297cb114ef2fc3d503

NEW - Audio recording
I currently have 3 patches up for code review on github which add audio recording via the microphone. One for frameworks/base, one for Settings, and one for ScreenRecorder app. For those interested in trying out audio recording here are the links to the patches:
frameworks/base
f109bce6102931719e7baf778005da8748fa8d6b
Settings
64299a3556307354c6b4448cdcb8350d7ff2815b
ScreenRecorder
10866dcd8fc161cca55e6b3bc0470722722a2dc9
And if you want to test it out in the screenrecord binary, you can check out this patch.

And now I leave you with a couple of screenshots and a short video that was taken using this feature.






And a video showing off audio recording!
Note: I have no interest in working on back porting this to older versions of Android. If you want to give it a shot, knock yourself out but please don't reply to this thread or in PM about how to do it or how to overcome any obstacles you may face.
Last edited by 0xD34D; 28th December 2013 at 06:34 PM.
The Following 97 Users Say Thank You to 0xD34D For This Useful Post: [ View ]
King ov Hell
28th November 2013, 08:51 PM   |  #2  
Guest
Thanks Meter: 0
 
n/a posts
Very interesting
29th November 2013, 01:38 AM   |  #3  
TecknoFreak's Avatar
Recognized Contributor
Flag Deltona
Thanks Meter: 882
 
1,982 posts
Join Date:Joined: Feb 2011
Donate to Me
More
This is doupe. Lol
Is this open source so I can added to my ROM?
29th November 2013, 04:43 AM   |  #4  
0xD34D's Avatar
OP Senior Member
Flag San Diego
Thanks Meter: 2,048
 
459 posts
Join Date:Joined: Feb 2009
Donate to Me
More
Quote:
Originally Posted by SVLAN

This is doupe. Lol
Is this open source so I can added to my ROM?

That's why I posted it here. I provided the links to the various commits you would want to cherry pick plus the ScreenRecorder app which is open source as well. If you are working on a 4.4 based ROM, then feel free to incorporate it.
The Following 3 Users Say Thank You to 0xD34D For This Useful Post: [ View ]
29th November 2013, 08:02 AM   |  #5  
riteish08's Avatar
Member
Flag Mumbai
Thanks Meter: 19
 
63 posts
Join Date:Joined: Mar 2013
More
Thumbs up
Quote:
Originally Posted by 0xD34D

#OT

Which Font?
Last edited by riteish08; 29th November 2013 at 08:04 AM.
29th November 2013, 11:45 AM   |  #6  
Senior Member
Flag Pune
Thanks Meter: 10
 
154 posts
Join Date:Joined: Mar 2013
More
Is there a way we can have this on 4.2 or 4.3 devices?
29th November 2013, 12:52 PM   |  #7  
FantasticalX's Avatar
Senior Member
Flag here
Thanks Meter: 360
 
452 posts
Join Date:Joined: Jan 2013
Donate to Me
More
Question
Quote:
Originally Posted by itechengine

Is there a way we can have this on 4.2 or 4.3 devices?

Same question here
29th November 2013, 01:24 PM   |  #8  
lichti1901's Avatar
Recognized Contributor
Flag Riding my Bike
Thanks Meter: 5,344
 
3,418 posts
Join Date:Joined: Sep 2010
Donate to Me
More
Quote:
Originally Posted by itechengine

Is there a way we can have this on 4.2 or 4.3 devices?

No





Quote:
Originally Posted by abielzuliom

Same question here

No

Seems that both of you cant read the OP. Have a look at the red text!


Gesendet von meinem Nexus 5 mit Tapatalk
The Following 5 Users Say Thank You to lichti1901 For This Useful Post: [ View ]
30th November 2013, 11:52 AM   |  #9  
mgbotoe's Avatar
Senior Member
Flag Berkeley
Thanks Meter: 1,816
 
2,316 posts
Join Date:Joined: Jan 2013
Donate to Me
More
This is pretty sweet and congrats on making it to the portal ^.^

Look forward to cherry picking this!
30th November 2013, 12:55 PM   |  #10  
matheus_sc's Avatar
Senior Member
Flag Olimpia-SP
Thanks Meter: 333
 
1,397 posts
Join Date:Joined: Mar 2011
Donate to Me
can i download a .zip and flash in pa 4.0?

Post Reply Subscribe to Thread

Tags
kitkat 4.4, rom, screen record, screen recorder, screen recording
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes