How to enable Android’s built-in screen recorder on Google Pixel Devices - Google Pixel 2 XL Themes, Apps, and Mods

Has anyone been able to get this working. I went into TWRP, advanced then enabled "adb sideload"
I typed "adb devices" to make sure its running, which it is, then put in the command;
"adb shell settings put global settings_screenrecord_long_press true"
But it comes back stating; error: closed
Any ideas what im doing wrong here?
https://9to5google.com/2020/01/14/google-pixel-screen-recorder-enable/

@Badger50 Can you get this to work? Am i doing something wrong? See above!

@Badger50 Can you get this to work? Am i doing something wrong? See above!

warrencoakley said:
@Badger50 Can you get this to work? Am i doing something wrong? See above!
Click to expand...
Click to collapse
After you type in "adb shell" hit the return key on your keyboard, then type the rest of your command line.

Badger50 said:
After you type in "adb shell" hit the return key on your keyboard, then type the rest of your command line.
Click to expand...
Click to collapse
Ok I'll give that a try. Thanks

Badger50 said:
After you type in "adb shell" hit the return key on your keyboard, then type the rest of your command line.
Click to expand...
Click to collapse
Just used a terminal emulator on my phone and typed "su" then the command without the adb shell and bingo it's working.

warrencoakley said:
Just used a terminal emulator on my phone and typed "su" then the command without the adb shell and bingo it's working.
Click to expand...
Click to collapse
And there ya go. More than one way to skin a cat :good:
---------- Post added at 03:48 PM ---------- Previous post was at 03:05 PM ----------
warrencoakley said:
Just used a terminal emulator on my phone and typed "su" then the command without the adb shell and bingo it's working.
Click to expand...
Click to collapse
It also works with the adb commands. You just had to enter the shell like I stated earlier. Which is what you have to do with most all shell commands :good:

warrencoakley said:
Has anyone been able to get this working. I went into TWRP, advanced then enabled "adb sideload"
I typed "adb devices" to make sure its running, which it is, then put in the command;
"adb shell settings put global settings_screenrecord_long_press true"
But it comes back stating; error: closed
Any ideas what im doing wrong here?
https://9to5google.com/2020/01/14/google-pixel-screen-recorder-enable/
Click to expand...
Click to collapse
Thank you, that's worked for me!
Code:
adb shell settings put global settings_screenrecord_long_press true

vegetaz said:
Thank you, that's worked for me!
Code:
adb shell settings put global settings_screenrecord_long_press true
Click to expand...
Click to collapse
lucky you. my Pixel 2xl can enable the function, but nothing run when pressing "Start recording". Screen is turn off after that, and that is all.

Related

adb shell help

Hi everyone, i need a little help.
While in adb i was about to do some modding and i entered adb shell, so as soon as i het enter i also started typing su.
well now when i enter adb shell i dont just get the # sign.
mine looks like this ~ #
no commands can be found now.
How do i get back to the default directory?
Thanks
hackit said:
Hi everyone, i need a little help.
While in adb i was about to do some modding and i entered adb shell, so as soon as i het enter i also started typing su.
well now when i enter adb shell i dont just get the # sign.
mine looks like this ~ #
no commands can be found now.
How do i get back to the default directory?
Thanks
Click to expand...
Click to collapse
Type 'cd /' without the quotes.
Did the default.prop file get changed?

[Q] ADB Troubles

Hello, I am using a Droid Razr Maxx CDMA (XT912). I have Android version 4.2.2. I am using Cyanogen mod 10.1.
I am having problems opening ADB. When I turn my USB Debugging on under my dev. options, connect my device in PTP mode using the terminal emulator commands:
su
setprop persist.sys.usb.config mass_storage
reboot
I run the ADB program and a window comes up for a brief moment then closes. I am unable to open ADB. I have Java.
Thank You!
ADB Troubles Cont'd.
nathanielhall929 said:
Hello, I am using a Droid Razr Maxx CDMA (XT912). I have Android version 4.2.2. I am using Cyanogen mod 10.1.
I am having problems opening ADB. When I turn my USB Debugging on under my dev. options, connect my device in PTP mode using the terminal emulator commands:
su
setprop persist.sys.usb.config mass_storage
reboot
I run the ADB program and a window comes up for a brief moment then closes. I am unable to open ADB. I have Java.
Thank You!
Click to expand...
Click to collapse
Did adb kill-server and adb start-server several times in cmd with no avail. The device serial number shows up under adb devices, but ADB Program will still not open. I've tried to open ADB up in cmd also.
I also tried typing in the terminal emulator:
su
setprop persist.sys.usb.config mass_storage, adb
reboot
Thanks again!
Can someone please help me with this?
I even tried installing the Universal naked drivers and that wouldn't go through.
nathanielhall929 said:
I even tried installing the Universal naked drivers and that wouldn't go through.
Click to expand...
Click to collapse
I copied your command and pasted here. setprop persist.sys.usb.config mass_storage, adb
And what I find is posted here. setprop persist.sys.usb.config mass_storage,adb
And reboot afterwards.
Notice the extra space in your command before adb?
I found this command structure several locations and only one that reports failed has the space.
For ICS it also shows adb shell as in
adb shell setprop persist.sys.usb.config mass_storage,adb
adb reboot
I hope this helps.
Tried it without the space and still not working
tobdaryl said:
I copied your command and pasted here. setprop persist.sys.usb.config mass_storage, adb
And what I find is posted here. setprop persist.sys.usb.config mass_storage,adb
And reboot afterwards.
Notice the extra space in your command before adb?
I found this command structure several locations and only one that reports failed has the space.
For ICS it also shows adb shell as in
adb shell setprop persist.sys.usb.config mass_storage,adb
adb reboot
I hope this helps.
Click to expand...
Click to collapse
I just tried it without the space, rebooted, and nothing
I don't get it
nathanielhall929 said:
I just tried it without the space, rebooted, and nothing
Click to expand...
Click to collapse
The ADB Program just won't open up on this computer. It opens for a second spewing command info then closes. Is it my Java program?
nathanielhall929 said:
I just tried it without the space, rebooted, and nothing
Click to expand...
Click to collapse
Are you getting an error?
This is the other method I see being used but I'll break the command as I believe it should be.
adb shell
su
setprop persist.sys.usb.config mtp,adb
exit
adb reboot
My problem is I know nothing about your unit and I don't know whether it should be mtp or mass_storage. I see people failing with mass_storage are being told to use mtp.
in terminal it shows
su
setprop persist.sys.usb.config mass_storage,adb
reboot
or
su
setprop persist.sys.usb.config mtp,adb
reboot
To retrieve this info I used the top search that says Search All Forums and typed in your command then hit search. You may need to do the same and only go to the threads that suit your situation.
---------- Post added at 12:38 AM ---------- Previous post was at 12:26 AM ----------
nathanielhall929 said:
The ADB Program just won't open up on this computer. It opens for a second spewing command info then closes. Is it my Java program?
Click to expand...
Click to collapse
Are you opening cmd and going to the directory with adb and issue your commands or are you trying to click on adb and use it that way?
I'm trying to run it in cmd
I've been trying to fix this for two days now. I'll be back tomorrow.
Figured out
Ok, now I feel like I'm a real noob. I just realized that I was thinking too hard about all of this. Adb doesn't open up in a new window as a regular program would. I thought it did. Oops. Maybe I should have been more thourough in my research. I should have realized that I already opened adb by using the cmd prompt.
This is why my device was recognized under adb devices.
Maybe not...
I still can't figure out how to get this:
http://tricktactoe.com/howto/how-to-record-android-screen-without-screencast/attachment/path-adb/
window to come up.
This is what I'm tring to do
nathanielhall929 said:
I still can't figure out how to get this:
http://tricktactoe.com/howto/how-to-record-android-screen-without-screencast/attachment/path-adb/
window to come up.
Click to expand...
Click to collapse
This is what I am trying to do:
http://tricktactoe.com/howto/how-to-record-android-screen-without-screencast/
Figured out finally!!!
nathanielhall929 said:
This is what I am trying to do:
http://tricktactoe.com/howto/how-to-record-android-screen-without-screencast/
Click to expand...
Click to collapse
I finally figured this out!!!
I want to thank tobdaryl for his time.
Thank you for your time tobdaryl
nathanielhall929 said:
I finally figured this out!!!
I want to thank tobdaryl for his time.
Thank you for your time tobdaryl
Click to expand...
Click to collapse
You are welcome.
Can you help me?
Can you check out this thread.. Maybe you can help me.
http://forum.xda-developers.com/showthread.php?t=2260208

question about adb shell vs terminal on device.

hi,
quick question..
i put "setprop service.adb.tcp.port 5555" in file.txt, and save this to /sdcard.
if i run "sh /sdcard/file.txt" from adb shell, on pc, then it works and getprop confirms.
if i run "sh /sdcard/file.txt" from terminal emulator, on phone, it says "could not set property".
can someone explain this behaviour? tahnk you.
in addition, where should you save shell scripts on your phone?
do you guys use shell scripts? can you give examples of what you use them for?
MrPresident said:
hi,
quick question..
i put "setprop service.adb.tcp.port 5555" in file.txt, and save this to /sdcard.
if i run "sh /sdcard/file.txt" from adb shell, on pc, then it works and getprop confirms.
if i run "sh /sdcard/file.txt" from terminal emulator, on phone, it says "could not set property".
can someone explain this behaviour? tahnk you.
in addition, where should you save shell scripts on your phone?
do you guys use shell scripts? can you give examples of what you use them for?
Click to expand...
Click to collapse
Try "su" command first and grant root access to terminal app
minimale_ldz said:
Try "su" command first and grant root access to terminal app
Click to expand...
Click to collapse
thanks for the reply, minimale.
okay. so, as you suggested, it works when i do it as root from the terminal app.
but couple of things.
1) Why can i run it from adbshell without 'su' command. through adb shell it still works as "[email protected]:/ $" instead of "[email protected]:/ #"
2) how come, without 'su', I can access "/sdcard" (as "[email protected]: / $"). but, as root, I have to go through "/data/media/0"
MrPresident said:
thanks for the reply, minimale.
okay. so, as you suggested, it works when i do it as root from the terminal app.
but couple of things.
1) Why can i run it from adbshell without 'su' command. through adb shell it still works as "[email protected]:/ $" instead of "[email protected]:/ #"
2) how come, without 'su', I can access "/sdcard" (as "[email protected]: / $"). but, as root, I have to go through "/data/media/0"
Click to expand...
Click to collapse
I'm glad I helped, but have no idea where the differences between ADB and terminal emulator come from. It's beyond my current knowledge.
minimale_ldz said:
I'm glad I helped, but have no idea where the differences between ADB and terminal emulator come from. It's beyond my current knowledge.
Click to expand...
Click to collapse
no worries. i got what i need.

Device won't respond to "adb shell wm" even though "wm" exists in /system/bin

Device won't respond to "adb shell wm" even though "wm" exists in /system/bin
I'm trying to change the pixel density on my unrooted RN3P using the "adb shell wm density XXX" command.
I'm running Krexus-CAF ROM.
ADB is set up and working, and I can open a shell on the device.
The problem is that `wm` cannot be found, even though it exists on the device at `/system/bin/wm`. I cannot do this with the "adb shell wm density XXX" command, nor if I open a shell on the device and type "wm density"
The output is:
Code:
~/Library/Android/sdk/platform-tools $ adb shell wm density 400
/system/bin/sh: /system/bin/wm: /bin/sh: No such file or directory
Has anyone had success with this, or can tell me why the "wm" command cannot be found, even though it exists in the directory that the device looks in?
Cheers
DoubleDroz said:
I'm trying to change the pixel density on my unrooted RN3P using the "adb shell wm density XXX" command.
I'm running Krexus-CAF ROM.
ADB is set up and working, and I can open a shell on the device.
The problem is that `wm` cannot be found, even though it exists on the device at `/system/bin/wm`. I cannot do this with the "adb shell wm density XXX" command, nor if I open a shell on the device and type "wm density"
The output is:
Has anyone had success with this, or can tell me why the "wm" command cannot be found, even though it exists in the directory that the device looks in?
Cheers
Click to expand...
Click to collapse
First check for "adb devices". If it doesn't show then check for the drivers. After that set path of adb in windows to default. Try again with debugging enabled.
mehulchirania said:
First check for "adb devices". If it doesn't show then check for the drivers. After that set path of adb in windows to default. Try again with debugging enabled.
Click to expand...
Click to collapse
thank you for taking time out to try help.
i'd just say that your solution isn't what the OP is looking for.
mainly because if you read the post he tried adb shell wm.....
but also tried on the phone inside terminal app typing the command..
i personally don't have a solution but i thought i'd try help you try maybe another suggestion?
for example, i can now go and tell the OP to download and install angry bird or busybox etc but it won't make a difference.
mehulchirania said:
First check for "adb devices". If it doesn't show then check for the drivers. After that set path of adb in windows to default. Try again with debugging enabled.
Click to expand...
Click to collapse
As noted in the question, I can definitely find my device, as I was running the shell on the device with ADB. The problem was that I could not execute `wm`, even though it was listed in the directory.
I ended up switching ROMs, and could use `wm` without issue - I'm not sure what it was about the ROM I was using that meant I couldn't use the files listed.
Oh well.

ADB + Linux error: device unauthorized

Hi
First of all, sorry for my bad english.
It has been several hours that i'm trying to find a solution to my problem.
I want to wake my nvidia shield via adb command throught network.
I installed android tools on my raspberry pi, and when i connect to it via command line everything work, i can wake up the Shield.
But when i put my command line in a bash script
Code:
#!/bin/bash
adb kill-server
adb start-server
adb connect 192.168.1.38:5555
adb shell input keyevent KEYCODE_WAKEUP
adb kill-server
i have this error :
Code:
error: device unauthorized.
This adb server's $ADB_VENDOR_KEYS is not set
Try 'adb kill-server' if that seems wrong.
Otherwise check for a confirmation dialog on your device.
I dont know why, when i am execute the command line in a bash script it can't find the rsa key, who is there and should be used.
Any ideas
Thanks in advance.
darkouz said:
Hi
First of all, sorry for my bad english.
It has been several hours that i'm trying to find a solution to my problem.
I want to wake my nvidia shield via adb command throught network.
I installed android tools on my raspberry pi, and when i connect to it via command line everything work, i can wake up the Shield.
But when i put my command line in a bash script
Code:
#!/bin/bash
adb kill-server
adb start-server
adb connect 192.168.1.38:5555
adb shell input keyevent KEYCODE_WAKEUP
adb kill-server
i have this error :
Code:
error: device unauthorized.
This adb server's $ADB_VENDOR_KEYS is not set
Try 'adb kill-server' if that seems wrong.
Otherwise check for a confirmation dialog on your device.
I dont know why, when i am execute the command line in a bash script it can't find the rsa key, who is there and should be used.
Any ideas
Thanks in advance.
Click to expand...
Click to collapse
Normally on Windows the first time you turn on usb debugging it will pop up and ask you to accept the adb key. This is what is preventing you, I haven't had to resolve this in Linux, but essentially you need to go to C:\\Users\You\.android\ (in Windows, path will be different in Linux) and copy the file adbkey. Now you need to move it to data/misc/adb/
This will most likely require root or TWRP. Good luck, my friend.
Sent from my KYOCERA-C6745 using Tapatalk
Hi
Thanks for your quick response.
I couldn't make the connection via USB my adb tells me that there is no emulated device. But it work with network And yeah the first time I made the connection, the authorization pop up appeared on my shield. I checked, always authorized this device.
I have the key in /root/.android on my raspberry pi
I don't think I have the access to the /data/ folder in my shield.
But what I don't understand is why when I execute the command in a terminal like that, it work and when it's from the bash script it won't work anymore
darkouz said:
Hi
Thanks for your quick response.
I couldn't make the connection via USB my adb tells me that there is no emulated device. But it work with network And yeah the first time I made the connection, the authorization pop up appeared on my shield. I checked, always authorized this device.
I have the key in /root/.android on my raspberry pi
I don't think I have the access to the /data/ folder in my shield.
But what I don't understand is why when I execute the command in a terminal like that, it work and when it's from the bash script it won't work anymore
Click to expand...
Click to collapse
Option B would be to dump your boot.img and use Assayed's kitchen to add insecure kernel and adb direct root, then the adbkey doesn't need to be on the device.
Sent from my KYOCERA-C6745 using Tapatalk
RealWelder said:
Option B would be to dump your boot.img and use Assayed's kitchen to add insecure kernel and adb direct root, then the adbkey doesn't need to be on the device.
Sent from my KYOCERA-C6745 using Tapatalk
Click to expand...
Click to collapse
Yeah as you said in your previous post, i think the solution is to root the nvidia shield cause the rsa key doesny copy itself on the device.
But would you able to explain to me why if i execute those command individually in the terminal it works.
But if i put them all in a bash script that i execute it doesnt work anymore, what's the difference between those two procedure ?
darkouz said:
Yeah as you said in your previous post, i think the solution is to root the nvidia shield cause the rsa key doesny copy itself on the device.
But would you able to explain to me why if i execute those command individually in the terminal it works.
But if i put them all in a bash script that i execute it doesnt work anymore, what's the difference between those two procedure ?
Click to expand...
Click to collapse
How are you executing the script? There's some (hopefully) helpful info here.
https://community.spiceworks.com/topic/433656-command-not-running-in-batch-but-will-run-in-cmd
Sent from my KYOCERA-C6745 using Tapatalk
RealWelder said:
How are you executing the script? There's some (hopefully) helpful info here.
https://community.spiceworks.com/topic/433656-command-not-running-in-batch-but-will-run-in-cmd
Sent from my KYOCERA-C6745 using Tapatalk
Click to expand...
Click to collapse
i m doing : sh script.sh
i m gonna read that, thanks
I found the solution.
I don't really understand why, but adding
Code:
sleep 1
before
Code:
adb shell input keyevent KEYCODE_BACK
resolved the problem, maybe the script execution was to fast for adb to adjust, dont know.
All i know is, that works
darkouz said:
I found the solution.
I don't really understand why, but adding
Code:
sleep 1
before
Code:
adb shell input keyevent KEYCODE_BACK
resolved the problem, maybe the script execution was to fast for adb to adjust, dont know.
All i know is, that works
Click to expand...
Click to collapse
Glad you got it.
Sent from my KYOCERA-C6745 using Tapatalk
sudo rm -rf /home/(username)/.android
that worked with my kde neon machine

Categories

Resources