How to record screen Android device M OS - android

I use command
adb shell screenrecord/sdcard/misscall.mp4
To record my screen. But affter 20-25s, it stop record
I want to record a video has duaration about 3 minute
Anyone can help me

Maybe do "screenrecord -d 180 /sdcard/thenameyouput.mp4

You can try screenrecording directly through Android Studio. When you plug in your device while Android Studio is open, the Android Monitor should appear for your device. On the left hand side of that panel, there is a green play button that you can click to screen record. As far as I know, you can start and stop the video on command as well as choose a place to save the file.

Related

Reboot Android Emulator

I have Android on a Pixel 5 on the standard Android Emulator inside Android Studio. I just want to restart the phone using the power button like a normal Android user. However, clicking the power button just makes the screen go blank like this:
Clicking it again just wakes it up, and holding it down brings this up:
Most of the documentation I've seen tells me to do a cold boot, but when I do, I see this.
So, I delete these two files and try cold boot again. Android Studio displays some text that says something like "Start AVD now" but nothing happens. The phone does not restart.
I cannot find any way to restart the OS. It's jammed in one spot. I've deleted and recreated image after image without any way to restart the phone. Any help would be much appreciated.
Clicking on the dots menu on the emulator row on Device Manager you will find the option Cold Boot Now.
Alternatively, you can use
adb reboot

How to record screen with Android Studio

I connect my phone to Android Studio and code. I want to record my phone screen. I saw this but that button is disabled in my Android Studio. I can capture screens but can't record. Can someone help me with this?
UPDATE
This is how it is there in my Android studio. The button is disabled
Now you can also record video from Android emulator to follow below option:
Select more option
Then select Record screen option.
Check below screenshot:
Go to your menu
View -> Tool Windows -> Android
You will find the record icon at the bottom left corner.
If you are using an AVD, make sure "Use host GPU" is disabled.
To take a video recording of your app:
Start your app as described in Run your App in Debug Mode.
Click Android to open the Android DDMS tool window.
Click Screen Record on the left side of the Android DDMS tool window.
Click Start Recording.
Interact with your app.
Click Stop Recording.
Enter a file name for the recording and click OK.
Source: https://developer.android.com/tools/debugging/ddms.html
Maybe your device does not support the screen recorder, there are many devices which does not support screen recorder thus this is device issue. If you want to record your app screen then simply run the app on android emulator or on genymotion and start your desktop screen recorder and adjust the desktop screen to fit emulator. There are many screen recorder for PC but i prefer cam studio 8.
Thanks
In newer versions of Android Studio it requires an external Android phone to record screen from preferably with a resolution of at least 720p. Since the internal runs on the virtual memory it can't be recorded and is therefore disabled as it can't both record and run emulator at same time.
I'm running Android Studio 2.3.2 which is the latest and the one I experienced this on. But when I closed the emulator and connected my HTC One M9 it automatically enabled recording button to record the phone instead of the emulated device.
Check the images below and the difference between them in the red circles:
First image, emulated device on the computer:
Second image, personal device connected to computer:
You can record videos from the command line into an .mp4 file:
adb shell screenrecord /sdcard/video.mp4
When you are done recording, press Ctrl+C.
Then you can copy the file to your computer (current folder)
adb pull /sdcard/video.mp4
If you want you can delete the file from the sdcard
adb shell rm /sdcard/video.mp4
Android SDK Emulators don't support recording:
https://code.google.com/p/android/issues/detail?id=61682
The screenrecord command is simply missing:
i:\>adb -e shell
root#generic_x86_64:/ # screenrecord
/system/bin/sh: screenrecord: not found
127|root#generic_x86_64:/ #
On Windows I suggest using the Fraps generic screen capture tool as an alternative. It's an awesome tool with too many years of history to count. I'm not affiliated with them, I just used it "back in the day" when I was gaming a lot. On the Movies tab add a Video Capture Hotkey and use that to start/stop the recording. The FPS counter will be red while recording.
Maybe you should just change a phone,like this:
When using HUAWEI,the screen record is disabled:
But when changing to Nubia, it works!
I had the same problem. It was solved when I didn't run but debugged de app.
Once you have debugged your app, the icon will be enabled even if you just run your app without debugging.
I guess this has to be done for each app you develop, as it must be a debugging feature or something like that.
*Note that at this image I'm using Android Studio post 2.0, but when this problem happened to me I was using pre 2.0, so that should not matter.
Open Android emilator,
Click to right sidebar more button "..."
Open new window, Record Screen and start record
It's OK
https://developer.android.com/studio/run/emulator.html
for those who never found screen recorder button or screenshot button. here you go
First, make sure you have LogCat open (Press F6, at least on OSx).
Then you might find that you still don't see any record button. Just hover on the tiny "overflow" arrow seen in the image below.
You should now see the record button, indicated in the image below.
Congratulations, if your device supports screen recording, just click the button and up will pop a dialog asking you to input resolution and bitrate
Record video from Android emulator
As a workaround for MacOS users
Open QuickTime Player -> File -> New Screen Recording
If you have a real device run it in debug mode and then go to the Logcat view there will be a screen recording button on the left.
stupid mistake I made was I had two android devices connected.
And I was recording off the locked one so my video was always 18mb and black screen and wouldnt play in quicktime.
On Android Studio Arctic Fox They have moved this functionality to the logcat
https://developer.android.com/studio/debug/am-video
In case of emulator I experienced that you should install DirectX End-User Runtime
Installed it for another application and luckily also Android Sceer Record is working fine and isn't greyed out!
Hope this help some other people

How to record android screen with Android Studio?

I've installed Android Studio in the Applications folder on my Mac (I think the sdk is then in the package content), but now I want to record my screen for a demonstration video of an app with AShot.jar, and I have to give up the path to the SDK. When I give the path I think is right, it says the path Applications/Android\ Studio.app/sdk is not valid.
What to do?
Are there other ways to record your android screen?
Connect your Device with your pc via usb.
Open android studio.Ensure that device is connected with adb.
Start click Screen Recording.
Screen Record can record the device display for a maximum of 3 minutes.
Note:
The Screen Record Works with Real Android Device and some Emulators.
If the button is in grey and un-clickable means that device not supports video capture.
The Screenshots from my system:
For those of us who need a "Complete Idiot's Guide" in order to find the elusive "Screen Record" button, here it is:
First, make sure you have LogCat open (Press F6, at least on OSx).
Then you might find that you still don't see any record button. Just hover on the tiny "overflow" arrow seen in the image below.
You should now see the record button, indicated in the image below.
Congratulations, if your device supports screen recording, just click the button and up will pop a dialog asking you to input resolution and bitrate (since this is an "Idiot's Guide", just skip those and click "Start Recording"!).
If you are using Android 4.4 or higher you can use adb:
http://developer.android.com/tools/help/adb.html#screenrecord
It can be found in the platform-tools folder under your sdk install folder.
This point may be helpful for some one else
All device do not support screen video recording with android studio. In this regard you can use emulator.

How to take screenshot in android emulator

From Android 4.0, it supports volumn down+power key to take screenshot and saved in gallery. But how to do this in android emulator.
I know in eclipse, there is a 'take screenshot' button, but this is not what I want. I need it in the emulator and saved in emulator.
As seen in this post: Screenshot of the Nexus One from adb?, you can also take a screenshot using adb:
adb shell /system/bin/screencap -p /sdcard/screenshot.png
adb pull /sdcard/screenshot.png screenshot.png
just click in photo icon for take screenshot in android emulator
In new emulator you can do it by pushing camera icon. By default it saved in desktop.
Window > Show View > Other. In the newly opened dialog box, under Android category, select Devices.
Now on the Devices panel, Click the button as shown in the Image and your screenshot is ready.
You can use ddms which has option to take screen shot.
On DDMS -> Select Device -> Select Screen Capture
Edit
AFIK its not possible but this scenario will solely depend emulator image. Device hotkey might work on some OS images. Try same key combination from emulator link.
If your emulator uses factory or same images then it should be possible. You can download factory images for your emulator. see available nexus images from this link also it is possible to download images from manufacturer site.
Alternatively you can take screen shot following way,
View content = findViewById(R.id.myView);
content.setDrawingCacheEnabled(true);
Bitmap bitmap = content.getDrawingCache();
And later save this anywhere you like. This is not optimal solution and it will only print what you have inside your view.
Long Press on Power button from the left side menu. then you will have the option for the screenshot.
You can take a screenshot if you open the Android view "devices" (under Window --> Show View --> Other... --> Android --> Devices). Click on the device or emulator you want to take a screen shot of, then click the "Screen Capture" button (it looks like a little picture, and it should be next to a stop sign button). Occasionally the device won't immediately load the picture; sometimes you have to close/reopen the screen capture window.
This is equivalent to taking a picture via DDMS, but you can do it in Eclipse instead of opening another application.
#!/bin/bash -f
while : ; do
echo "press the number of the screenshot to capture";
read i
adb shell /system/bin/screencap -p /sdcard/screenshot.png
adb pull /sdcard/screenshot.png "${i}.png"
done
ctrl-c
You can simply press the shortcut key i.e. ctlr + S to take screenshot in the emulator.
Also there is a button given on the emulator to take the screenshot.
Simply press
this button button and you'll have a screenshot of the emulator.
Hope that it helped you.
Go to your emulator then press:
ctrl + s
to save your screenshot.
hope its work.

Android screen capture problem in Eclipse

I am having trouble using the "Screen Capture" function in Eclipse to capture an Android screen shot. I have the correct tab open, and when I click the screen capture icon, the box pops up and just stays on "Capturing..." but the display never changes from a white box with an X through it.
I have USB debugging turned on on the phone and I have the correct device selected in Eclipse..any other tips? Thanks!
Navigate to your android sdk install folder. Open the Tools folder and find DDMS. Run DDMS and use the Screen Capture option from the Device pull down menu. This is the native tool that Eclipse tries to use and it works better natively.
On the screen capture window, click done, then reopen the screen capture dialog. I have to go through this process every time I want screen caps, for some reason it doesn't connect to device on the first run.
This works for me, also when Logcat ceases to work: When I disable and re-enable the debug mode on the device, everything is working again.

Categories

Resources