Mittwoch, 19. Februar 2014

#7 How to record the screen of an Android Device (KitKat 4.4 included)

Have you ever wanted to show something that was going on on your screen to someone else? But then you realized that a single picture wouldn't be enough to explain the point? That might be the moment when you start looking for apps on the Play Market and start to read about screen recording on the web.

Unfortunatly you might come the same conclusion that most others who did reserach came to: There is only one tool that is known to fullfill this job: Screencast. All other apps I tested (and apparently others too) were insufficent (screenrecorder,... eG). Low frame rates, bad quality and other annoying "features". Unfortunatly Screencast only works on NON-TEGRA devices (even though there are workarounds - maybe the new GLTools might help too). How ever. Since KitKat 4.4 Android has a build in screen caputring API (to read about on AndroidCentral). There are some ways how to take advantage of this new feature. But as far as I saw it, it's for now a stock feature for Nexus eG that is broken on most ROMs. But you could give it a try...

(Please note that it's your own responsibility to proceed further.
I can't come up for damages and can't always be there with personal advice.
The tutorial may be made on and for TF101 but should work on other devices
and versions too. Be careful. You pay what you destroy!)

WAY #1 via ADB
(Presuming you know ADB and have your driver installed - if not this is not for you until I find time to explain)
  • Install (UP TO DATE) Android SDK
  • Get yourself an up to date ADB with all needed files for your device
  • Connect your device
  • Open a CMD (with admin rights) and shoot following: 
    adb shell screenrecord /exSdCard/Movies/filename.mp4 
This will tell your device to start recording the screen. You are free to change the filename or folder. You could for example also save it to "/sdcard/file.mp4"
There is also an option for the bitrate (Mbps/sec) given:

adb shell screenrecord --bit-rate 8000000 /sdcard/yourfilename.mp4
Just push [CTRL] + [C] (or alternative key combo for aborting the operation in your adb shell) to abort the recording.

WAY #2 via APP
(Not working on OmnRom 4.4.2 unofficial 2014-02-16 or KatKiss 4.4.2 #19 / #20)
Downloading an app from the Store. There are many. But let me spare you some time and work: If you are on a custom ROM like KatKiss or OmniRom, then you won't be able to use them. Well... you can use them. And they all seem to record. But the outcome from any of them was a 0-Byte file. I hav tryed to change the folder for if it had to do with write-access reasons (but since he was able to creat the files... anyway). Me and others have the 0-Byte or force close issues with the following apps but you might try them on your own if you are on another ROM or Firmway. Maybe the Nexus5 Stock may work. Be careful ... some vendors seem to be very *cough cough* if you demand your money back. Watch the comments closly:
I do belief that these apps can use the new API under certain circumstances... but not in mine.
So... lets dump this for now. I'll have to do some research. Maybe it's pretty easy to fix. For now I will try myself on

It is to say that Screencast is the number one Choice for NON TEGRA users since it seems to be the only one to have an approberiate framerate. Haven't been able to test it.

WAY #3 via Android Studio
(This tutorial is not done yet. You may proceed anyway and try on yourself)
This means to directly use the new screen record API through ADB from your PC as in WAY #1 discriped. But here will try another easy way: Android Studio

There are some minor preparations to make:

You can get 0.4.2 from the official Webpage (490MB) here. But I wouldn't mind it and get the 0.4.5 from HERE. Also you will need an up to date Jave SE version. Grab it HERE.

From here you are for now on your own, till I finnish the article. Have a look here: 
But to quote: "And in case you're using Android Studio, there is a dedicated button to start the recording:"

From the official site

  1. Download the Android Studio package from above.
  2. Install Android Studio and the SDK tools: Windows:
    1. Launch the downloaded EXE file, android-studio-bundle-<version>.exe.
    2. Follow the setup wizard to install Android Studio.
      Known issue: On some Windows systems, the launcher script does not find where Java is installed. If you encounter this problem, you need to set an environment variable indicating the correct location.
      Select Start menu > Computer > System Properties > Advanced System Properties. Then open Advanced tab > Environment Variables and add a new system variable JAVA_HOME that points to your JDK folder, for example C:\Program Files\Java\jdk1.7.0_21.

      Starting a Project

      When you launch Android Studio for the first time, you'll see a Welcome screen that offers several ways to get started:
      • To start building a new app, click New Project. This starts the New Project wizard, which helps you set up a project using an app template.
      • To import an existing Android app project, click Import Project.
        Note: If you previously developed your Android project with Eclipse, you should first use the new export feature in the ADT plugin to prepare your project with the new Gradle build system. For more information, read Migrating from Eclipse.
      For additional help using Android Studio, read Tips and Tricks.
      As you continue developing apps, you may need to install additional versions of Android for the emulator and other packages such as the Android Support Library. To install more packages, use the SDK Manager, which you can open from Android Studio by clicking SDK Manager in the toolbar.
WAY 4: via exposed Framework:
(Presuming you know the Xposed stuff....)
Just Check THIS xda THREAD

Keine Kommentare:

Kommentar veröffentlichen