screenrecord don't work with su - Samsung Galaxy S8 Questions and Answers

I have a Samsung Galaxy S8 and Samsung S8+, both with root.
I try run command "screenrecord /sdcard/video.mp4" with adb and it works.
If i try run "su -c screenrecord /sdcard/video.mp4" got an error:
ERROR: unable to get display characteristics
Why adb without root works and with root don't work?
Thanks in advance.

I have same problem!
Looks like su doesn't have full access to surfaceflinger.

screenrecord - message
j-pera said:
I have same problem!
Looks like su doesn't have full access to surfaceflinger.
Click to expand...
Click to collapse
Update:
when runs: su -c "screenrecord test.mp4"
Gives following error:
ERROR: unable to get display characteristics

Related

[SOLVED]Just flashed latest 0.3 ROM - no root?

EDIT: SOLVED
I just flashed the latest ROM but when I enable debugging and type "adb shell" im getting "$" instead of "#"...? I'm trying to remount the filesystem "mount -o rw,remount /dev/block/mtdblock3 /system" but am getting access denied because of this.
Do I need to try reflashing?
you need to adb shell then type "su" to get to a root shell i believe
EDIT: SOLVED! I was too blind to notice i had to allow the root request on my phone. thanks!
after i type 'adb shell' and get "$" everything i type next just gets echoed
ex:
Code:
$ su
su
test
test
etc
gohamstergo said:
EDIT: SOLVED! I was too blind to notice i had to allow the root request on my phone. thanks!
after i type 'adb shell' and get "$" everything i type next just gets echoed
ex:
Code:
$ su
su
test
test
etc
Click to expand...
Click to collapse
Usually if you have root, adb shell will automatically grant root access...the notification on the phone is a new one to me...
xsnipuhx said:
Usually if you have root, adb shell will automatically grant root access...the notification on the phone is a new one to me...
Click to expand...
Click to collapse
It seems to be caused by the "Superuser Permissions" app, included with the ROM

[Q] busybox throwing "precmd" errors after rooting ICS

Hello,
Thanks for looking at this post! I wanted to post it to the rooting thread, but I'm too much of a noob to have access to developer threads. I searched around (both here and google), but couldn't find any useful info on my problem.
I'll get right to the point. I rooted my Acer A500 (after doing an OTA update to 4.0.3), as per the instructions on this thread:
http://forum.xda-developers.com/showthread.php?t=1546593
Everything seems to have worked well (I have root access, etc), but there is something quirky with Busybox. Every time I type a command in terminal (it doesn't matter which - I use both connectbot and terminal emulator), I get a "precmd: not found" message (even for simple things like directory changes). The odd thing is: the commands work, but I still get the message. For instance, if I ask for a directory listing, I'll get the listing, and at the end, it will say precmd: not found (usually with the name of the command it's referencing, e.g. bash: precmd: not found).
It seems to be looking for it in /system/xbin/bash, but bash is in /data/local; I tried creating a symlink but it didn't work ("link failed Cross-device link"). This is really a nuisance, and I'd like to try installing some linux user-land tools, but I fear the outcome might be disastrous if the busybox tools are misconfigured somehow.
I'd appreciate and help/suggestions. Many thanks.
mdhobbes said:
"precmd: not found" message
Click to expand...
Click to collapse
Connectbot seems to set shell variable 'PS1' to "$(precmd)[email protected]$HOSTNAME:${PWD:-?} $ ".
It means your shell (the busybox's ash applet) will try to use output from 'precmd' as a part of a command prompt.
So when 'precmd' was not provided, error messages will be generated wenever a prompt was to be shown.
Though the messages should be safe to ignore, you may get rid of them by setting something harmless to PS1 like:
PS1="> "​, or reset PS1 by:
unset PS1​from your (busybox) shell.
# The same method should work for terminal emulator.
precmd is a shell function.
To display it run this from the default shell:
Code:
typeset -f
You will see something like
Code:
function precmd {
typeset e=$?
let " e " && print -n "$e|"
}
If you add that to one of your shell's startup files (".profile", ".bashrc", etc.) you will have a working precmd.
It works (function runs), but shows nothing neither 0 or error code. What is it?
[edit]
Nvm, my fault, figured it out

get the inode of a file

i'm new here so first of all hello to everyone.
heres my problem. hopefully somebody can help me.
how can i get an inode of a file. that meens to read a
particular part in the data partition. of course that
could only be possible with su, thats clear.
You've got to use the command line for every root thing.
You can get the inode as described here: http://www.cyberciti.biz/faq/howto-print-inode-data-structure/
How to use root commands: http://forum.xda-developers.com/showthread.php?t=2226664
nikwen said:
You've got to use the command line for every root thing.
You can get the inode as described here: http://www.cyberciti.biz/faq/howto-print-inode-data-structure/
How to use root commands: http://forum.xda-developers.com/showthread.php?t=2226664
Click to expand...
Click to collapse
thanks for the quick response.
i find out that ls has no option -i on android to show inodes.
does anybody know another way to get them
xiyuo said:
i find out that ls has no option -i on android to show inodes.
does anybody know another way to get them
Click to expand...
Click to collapse
Compile or use a version of busybox which has it and use that one. Add it to your apps assets and copy it to the data directory of your app. Then use that binary for the ls command.
That part is very difficult on Android. On one device you have got the ls command but the output might look completely different on another phone. (Some time ago someone reported that he noticed "ls" being linked to "ls -l" on one phone. On another phone the option "-l" might be missing.
So it is recommended to use busybox for every root command.
..
nikwen said:
Compile or use a version of busybox which has it and use that one. Add it to your apps assets and copy it to the data directory of your app. Then use that binary for the ls command.
So it is recommended to use busybox for every root command.
Click to expand...
Click to collapse
i did that.
but with
./busybox ls -i
i get
cant execute permission denied.
even if i use su. how could that be?
does anybody know how i get the permission?
xiyuo said:
i did that.
but with
./busybox ls -i
i get
cant execute permission denied.
even if i use su. how could that be?
does anybody know how i get the permission?
Click to expand...
Click to collapse
In Linux you have to add the right to execute it first:
Code:
su
chmod 775 <filename>

[Q] ADB Permission Denied

I'm trying to follow this thread (http://forum.xda-developers.com/showthread.php?t=2515141) to get IR working on my MIUI 5.5.8 ROM. I have root permissions (SuperSU) and I have adb shell granted root permissions on SuperSU.
I'm trying to run this part:
adb root
adb shell "mkdir -p /data/local/userinit.d"
But that's what I get:
C:\Users\Leandro\Downloads\platform-tools>adb devices
List of devices attached
06902d4f16cf0d35 device
C:\Users\Leandro\Downloads\platform-tools>adb root
restarting adbd as root
C:\Users\Leandro\Downloads\platform-tools>adb shell "mkdir -p /data/local/userin
it.d
mkdir failed for /data/local/userinit.d/, Permission denied
What could I do to solve this?
Thank you.
Have you tried it like this
adb devices
adb shell
su
mkdir -p /data/local/userinit.d
Art Vanderlay said:
Have you tried it like this
adb devices
adb shell
su
mkdir -p /data/local/userinit.d
Click to expand...
Click to collapse
I'm trying to push TWRP and Loki flash tool via ADB but I'm getting permission denied. Do you know what I can to gain access?
It says root access when in download mode but I don't have root while OS is running. Does this mean my phone is semi rooted? What should I do now?
y300owner said:
I'm trying to push TWRP and Loki flash tool via ADB but I'm getting permission denied. Do you know what I can to gain access?
It says root access when in download mode but I don't have root while OS is running. Does this mean my phone is semi rooted? What should I do now?
Click to expand...
Click to collapse
What android version are you on?
Art Vanderlay said:
What android version are you on?
Click to expand...
Click to collapse
Was on Stock Verizon VS980_27A 4.4.2. Tried many ways. Didn't work. Stumproot.apk fixed the problem.

reboot disemmcwp doesnt work

Hi, "adb shell reboot disemmcwp" doesnt work for me on 2017G 7.1.1 (B05).
Some weeks ago i used a different command that worked. But i cant remember this command and cant find it anymore via google.
Does anyone know which command it is?!
thanks.
It depends on where you're doing this at. Are you using CMD or terminal on the phone?
nolimit78 said:
Are you using CMD or terminal on the phone?
Click to expand...
Click to collapse
cmd as admin and also with terminal (root).
Spillunke said:
cmd as admin and also with terminal (root).
Click to expand...
Click to collapse
I just used 'adb reboot disemmcwp' and it worked.
This command doesnt work for me.
No effect with CMD or terminal. There is an other similar command that works.
EDIT: im not sure, but is it maybe a problem of magisk? I use Magisk, not SuperSu. Would it work with SuperSu?
PUSH
Spillunke said:
PUSH
Click to expand...
Click to collapse
Did you try it? What was the error? Its very bad practise to just say "it did not work".
After booting up, i cant deinstall system apps for example.
Now i switched to an other stock rom and now i can deinstall systemapps, but there are still problems: cant delete files in system/ but this seems to be an magisk based issue.
Spillunke said:
After booting up, i cant deinstall system apps for example.
Now i switched to an other stock rom and now i can deinstall systemapps, but there are still problems: cant delete files in system/ but this seems to be an magisk based issue.
Click to expand...
Click to collapse
try mount -o rw,remount,rw /system (as root)
if that doesnt work, try this in terminal in twrp.
Zobat said:
try mount -o rw,remount,rw /system (as root)
if that doesnt work, try this in terminal in twrp.
Click to expand...
Click to collapse
All in one line or are this 3 single commands?
hi guys.
this simple process is so hard for me but somehow i managed to reboot disemmcwp
i learned that my ZTE HSUSB driver not properly installed (check through you device manager).
after properly installed it, i manage to pair with my laptop
before
C:\adb>adb shell
* daemon not running; starting now at tcp:5037
* daemon started successfully
error: device unauthorized.
after
C:\adb>adb shell
[email protected]:/ $
so just type
C:\adb>adb shell
[email protected]:/ $ reboot disemmcwp
colmanjr said:
hi guys.
this simple process is so hard for me but somehow i managed to reboot disemmcwp
i learned that my ZTE HSUSB driver not properly installed (check through you device manager).
after properly installed it, i manage to pair with my laptop
before
C:\adb>adb shell
* daemon not running; starting now at tcp:5037
* daemon started successfully
error: device unauthorized.
after
C:\adb>adb shell
[email protected]:/ $
so just type
C:\adb>adb shell
[email protected]:/ $ reboot disemmcwp
Click to expand...
Click to collapse
msm8974? you sure you have an axon7?

Categories

Resources