5,604,686 Members 37,418 Now Online
XDA Developers Android and Mobile Development Forum

[Q] Need a tad bit of help with using commands

Tip us?
 
milkydude12
Old
#1  
Junior Member - OP
Thanks Meter 0
Posts: 28
Join Date: Apr 2012
Default [Q] Need a tad bit of help with using commands

K, i've got a wii emulator, but i don't understand how to run these commands !!! +_+

To increase stability on Galaxy S4 and other Adreno 3xx devices with driver v14, you need to root and run the following commands on the device as root.
Code:
echo 0 > /sys/kernel/debug/kgsl/kgsl-3d0/fast_hang_detect
echo 0 > /sys/kernel/debug/kgsl/kgsl-3d0/ft_pagefault_policy
echo 0 > /sys/kernel/debug/kgsl/kgsl-3d0/ft_policy
echo 0 > /sys/kernel/debug/kgsl/kgsl-3d0/ib_check
echo 0 > /sys/kernel/debug/kgsl/kgsl-3d0/long_ib_detect

Can someone please educate me on how this is suppose to work? do i need an android terminal? or how do i go about running these commands?
(yes my phone is rooted)

Thanks

Ryan
 
fffft
Old
#2  
Senior Member
Thanks Meter 37
Posts: 103
Join Date: Jul 2013
Quote:
Originally Posted by milkydude12 View Post
i don't understand how to run these commands
These are system commands and you need to run them from the "command line". The easiest way to do that would be to install a terminal application. Android Terminal Emulator by Jack Palevich is one good choice. Or you could run an adb shell.

After you install terminal emulator, enter
Quote:
su [enter]
"su" is the command for superuser (root access). Then you can use the system configuration commands that you have for your wii emulator.

If any commands need to be reentered each time you use your emulator, then you could use a scripting app like gscript light which can be configured to enter these commands from a bookmark. i.e. just click on a bookmark and it will run a set of commands for you.


.
 
milkydude12
Old
#3  
Junior Member - OP
Thanks Meter 0
Posts: 28
Join Date: Apr 2012
Hi,

Thanks for replying!!! I've a problem though , after i enter su (enter) then grant superuser, i type in echo 0 > /sys/kernel/debug/kgsl/kgsl-3d0/fast_hang_detect
then i get no such file or directory , what am i doing wrong???
 
jd1639
Old
#4  
jd1639's Avatar
Recognized Contributor
Thanks Meter 2272
Posts: 7,456
Join Date: Sep 2012
Location: Minnetonka, MN
Quote:
Originally Posted by milkydude12 View Post
Hi,

Thanks for replying!!! I've a problem though , after i enter su (enter) then grant superuser, i type in echo 0 > /sys/kernel/debug/kgsl/kgsl-3d0/fast_hang_detect
then i get no such file or directory , what am i doing wrong???
Do you have those directories on your phone? Where did you get the commands to type in? Are they specific to the s4?
 
milkydude12
Old
#5  
Junior Member - OP
Thanks Meter 0
Posts: 28
Join Date: Apr 2012
Quote:
Originally Posted by jd1639 View Post
Do you have those directories on your phone? Where did you get the commands to type in? Are they specific to the s4?
I got the commands from here https://forums.dolphin-emu.org/Thread-opengl-es-3-guide i apologize if im not supposed to post link +_+
 
fffft
Old
(Last edited by fffft; 8th February 2014 at 05:02 AM.)
#6  
Senior Member
Thanks Meter 37
Posts: 103
Join Date: Jul 2013
I can't add much more than jd1639 already suggested. These commands would just make a temporary configuration change to half a dozen driver settings in aid of your emulator program. The "echo 0" command ensures that a particular setting is set to "0", if the target file exists.

Check for typos. If there weren't any typos, then it would seem likely that the information from the original thread is inaccurate or out of date. What model of phone are you trying this on? The original thread refers to the i9505 and similar phones. Is your phone a i9505? The fact that you're posting this in an AT&T, et al forum suggest that you might actually have a i337 /i337m phone. Depending on what model you actually have, your phone may have a Snapdragon 800 or Exynos processor rather than the Snapdragon 600.

The drivers may or may not be the same across different phones and processors. Or the drivers names may have changed in a subsequent firmware update. You check your filesystem to see if those paths exist or if the file names can be found elsewhere. Then look to the emulator thread for further guidance.

I had a quick look at a S3 and some, but not all of those files exist. If you find the same thing on your S4, then you'll have to refer to the emulator thread to discern if you need to have all of those items to enable your emulator or if a subset will suffice.

You can probably just create any "missing" files for a workable solution. They're just text files that the drivers refer to for guidance. It's something that I'd at least try in your place. However while I don't perceive any real risk in that i.e. worst case it wouldn't boot and you'd need to restore a backup.. don't look to me if your phone unexpectedly wimpers, fails or becomes sentient and disagrees. Anything you actually do is at your own risk.

You can search paths and file names as follows below. And you should be able to use the touch, mv or cp commands (or install a text editor) to create a missing file.

$ su
# cd /sys/kernel/debug/kgsl/kgsl-3d0
# ls -la
# find / -name fast_hang_detect


.
 
milkydude12
Old
#7  
Junior Member - OP
Thanks Meter 0
Posts: 28
Join Date: Apr 2012
Quote:
Originally Posted by fffft View Post
I can't add much more than jd1639 already suggested. These commands would just make a temporary configuration change to half a dozen driver settings in aid of your emulator program. The "echo 0" command ensures that a particular setting is set to "0", if the target file exists.

Check for typos. If there weren't any typos, then it would seem likely that the information from the original thread is inaccurate or out of date. What model of phone are trying this on? The original thread refers to the i9505 and similar phones. Is your phone a i9505? The fact that you're posting this in an AT&T, et al forum suggest that you might actually have a i337 /i337m phone. Depending on what model you actually have, your phone may have a Snapdragon 800 or Exynos processor rather than the Snapdragon 600.

The drivers may or may not be the same across different phones and processors. Or the drivers names may have changed in a subsequent firmware update. You should look at your filesystem as jd1639 suggested to see if those paths exist or if the file names can be found elsewhere. And if necessary, re-read the emulator thread for further guidance.

I had a quick look at a S3 and some, but not all of those files exist. If you find the same thing on your S4, then you'll have to refer to the emulator thread to discern if you need to have all of those items to enable your emulator or if a subset will suffice.

You can probably just create any "missing" files for a workable solution. They're just text files that the drivers refer to for guidance. It's something that I'd at least try in your place. However while I don't perceive any real risk in that i.e. worst case it wouldn't boot and you'd need to restore a backup.. don't look to me if your phone unexpectedly wimpers, fails or becomes sentient and disagrees. Anything you actually do is at your own risk.

You can search paths and file names as follows below. And you should be able to use the touch, mv or cp commands to create a missing file.

$ su
# cd /sys/kernel/debug/kgsl/kgsl-3d0
# ls -la
# find / -name fast_hang_detect


.
Hi, I have the I337m variety of the Samsung S4 will that make a difference?
 
fffft
Old
#8  
Senior Member
Thanks Meter 37
Posts: 103
Join Date: Jul 2013
Quote:
Originally Posted by milkydude12 View Post
Hi, I have the I337m variety of the Samsung S4 will that make a difference?
The answer to that will be in your emulator thread.

More to the point, you haven't done your homework yet. Do those paths and files exist on your phone? Does the emulator thread clarify if all of those settings are required? And did you try creating any missing files? People are trying to help you here, but we can't see what your phone screen actually shows. And you should be doing most of the work to see what does or doesn't work.


.
 
milkydude12
Old
#9  
Junior Member - OP
Thanks Meter 0
Posts: 28
Join Date: Apr 2012
u0_a283@jfltecan:/ $ su
root@jfltecan:/ # cd /sys/kernal/debugkgsl-3d0
tmp-mksh: cd: /sys/kernal/debugkgsl-3d0: No such file or directory
2|root@jfltecan:/ # ls -la
-rw-r--r-- root root 4721 1969-12-31 17:00 MSM8960_lpm.rc
drwxr-xr-x root root 1970-05-26 22:16 acct
drwxrwx--- system cache 2014-02-07 20:41 cache-rwxr-x--- root root 268036 1969-12-31 17:00 charger
dr-x------ root root 1970-05-26 22:16 config
lrwxrwxrwx root root 1970-05-26 22:16 d -> /sys/kernel/debug
drwxrwx--x system system 2014-02-07 19:42 data
drwxrwx--- system system 1970-05-26 22:16 data_1
drwxrwx--- system system 1970-05-26 22:16 data_2
drwxrwx--- system system 1970-05-26 22:16 data_3
-rw-r--r-- root root 165 1969-12-31 17:00 default.prop
drwxr-xr-x root root 2014-02-07 01:35 dev
drwxrwx--x system radio 2014-01-31 20:30 efs
lrwxrwxrwx root root 1970-05-26 22:16 etc -> /system/etc
-rw-r--r-- root root 21233 1969-12-31 17:00 file_contexts
dr-xr-x--- system system 1970-05-26 22:16 firmware
dr-xr-x--- system system 1970-05-26 22:16 firmware-mdm
-rw-r----- root root 1494 1969-12-31 17:00 fstab.qcom
-rwxr-x--- root root 171036 1969-12-31 17:00 init
-rwxr-x--- root root 3068 1969-12-31 17:00 init.carrier.rc
-rwxr-x--- root root 769 1969-12-31 17:00 init.container.rc
-rwxr-x--- root root 6737 1969-12-31 17:00 init.qcom.class_core.sh
-rwxr-x--- root root 2320 1969-12-31 17:00 init.qcom.class_main.sh
-rwxr-x--- root root 4266 1969-12-31 17:00 init.qcom.early_boot.sh
-rwxr-x--- root root 5142 1969-12-31 17:00 init.qcom.lpm_boot.sh
-rwxr-x--- root root 22920 1969-12-31 17:00 init.qcom.rc
-rwxr-x--- root root 3045 1969-12-31 17:00 init.qcom.ril.sh
-rwxr-x--- root root 4486 1969-12-31 17:00 init.qcom.sh
-rwxr-x--- root root 3830 1969-12-31 17:00 init.qcom.syspart_fixup.sh
-rwxr-x--- root root 35468 1969-12-31 17:00 init.qcom.usb.rc
-rwxr-x--- root root 6004 1969-12-31 17:00 init.qcom.usb.sh
-rwxr-x--- root root 41170 1969-12-31 17:00 init.rc
-rwxr-x--- root root 9314 1969-12-31 17:00 init.target.rc
-rwxr-x--- root root 1795 1969-12-31 17:00 init.trace.rc
-rwxr-x--- root root 3915 1969-12-31 17:00 init.usb.rc
drwxrwxr-x root system 1970-05-26 22:16 mnt
drwxrwxr-x root system 1970-05-26 22:16 mnt_1drwxr-xr-x system system 1970-05-26 22:16 persdata
drwxrwx--x system system 1970-05-26 22:16 preload
dr-xr-xr-x root root 1969-12-31 17:00 proc
-rw-r--r-- root root 2838 1969-12-31 17:00 property_contexts
drwxr-xr-x root root 1969-12-31 17:00 res
drwx------ root root 2013-11-15 08:26 root
drwxr-x--- root root 1969-12-31 17:00 sbin
lrwxrwxrwx root root 1970-05-26 22:16 sdcard -> /storage/emulated/legacy
-rw-r--r-- root root 3887 1969-12-31 17:00 seapp_contexts
-rw-r--r-- root root 610434 1969-12-31 17:00 sepolicy
-rw-r--r-- root root 207 1969-12-31 17:00 sepolicy_version
dr-xr-x--- system sdcard_r 1970-05-26 22:16 storage
dr-xr-xr-x root root 1970-05-26 22:16 sys
drwxr-xr-x root root 1970-03-21 22:11 system
drwxr-xr-x root root 2014-01-31 20:30 tmp-mksh
lrwxrwxrwx root root 1970-05-26 22:16 tombstones -> /data/tombstones
-rw-r--r-- root root 6662 1969-12-31 17:00 ueventd.qcom.rc
-rw-r--r-- root root 4794 1969-12-31 17:00 ueventd.rc
lrwxrwxrwx root root 1970-05-26 22:16 vendor -> /system/vendor
root@jfltecan:/ # find / -namefast_hang_detect
find: unrecognized: -namefast_hang_detect
BusyBox v1.21.1-Stericson (2013-09-26 14:33:26 BST) multi-call binary.

Usage: find [PATH]... [OPTIONS] [ACTIONS]

Search for files and perform actions on them.
First failed action stops processing of current file.
Defaults: PATH is current directory, action is '-print'

-follow Follow symlinks
-xdev Don't descend directories on other filesystems
-maxdepth N Descend at most N levels. -maxdepth 0 applies
actions to command line arguments only
-mindepth N Don't act on first N levels
-depth Act on directory *after* traversing it

Actions:
( ACTIONS ) Group actions for -o / -a
! ACT Invert ACT's success/failure
ACT1 [-a] ACT2 If ACT1 fails, stop, else do ACT2
ACT1 -o ACT2 If ACT1 succeeds, stop, else do ACT2 Note: -a has higher priority than -o -name PATTERN Match file name (w/o directory name) to PATTERN
-iname PATTERN Case insensitive -name
-path PATTERN Match path to PATTERN
-ipath PATTERN Case insensitive -path
-regex PATTERN Match path to regex PATTERN
-type X File type is X (one of: f,d,l,b,c,...)
-perm MASK At least one mask bit (+MASK), all bits (-MASK),
or exactly MASK bits are set in file's mode
-mtime DAYS mtime is greater than (+N), less than (-N),
or exactly N days in the past
-mmin MINS mtime is greater than (+N), less than (-N),
or exactly N minutes in the past
-newer FILE mtime is more recent than FILE's
-inum N File has inode number N
-user NAME/ID File is owned by given user
-group NAME/ID File is owned by given group
-size N[bck] File size is N (c:bytes,k:kbytes,b:512 bytes(def.))
+/-N: file size is bigger/smaller than N
-links N Number of links is greater than (+N), less than (-N),
or exactly N
-prune If current file is directory, don't descend into it
If none of the following actions is specified, -print is assumed
-print Print file name
-print0 Print file name, NUL terminated
-exec CMD ARG ; Run CMD with all instances of {} replaced by
file name. Fails if CMD exits with nonzero
-delete Delete current file/directory. Turns on -depth option

1|root@jfltecan:/ #




That is what i get, for the life of me i can't figure out if that means i have it or i don't. "On the Thread it says To increase stability on Galaxy S4 and other Adreno 3xx devices with driver v14, you need to root and run the following commands on the device as root."
So I'm assuming i require all of them to work in order for any difference. Certain sites list the I337m varient as one of which supports Open Gl ES 3 so i assume it would work
 
fffft
Old
#10  
Senior Member
Thanks Meter 37
Posts: 103
Join Date: Jul 2013
All right, I can understand how a lot of this might be a challenge to understand if you have no experience with linux. But you at least need to make sure that you aren't making typos when using these commands.

e.g.
Quote:
root@jfltecan:/ # find / -namefast_hang_detect
You missed a space between -name and the actual file name. And yes, that is critical. Nothing here is likely to work if you have typos. Try the following and paste the results back here. And I or someone else will better understand what is going on::

$ su
# cd /sys/kernel/debug/kgsl/kgsl-3d0
# ls -la

(exactly as above and paste the result for us).

If you are ambitious then also try the following for any "missing" files and let us know if that succeeds in getting your emulator up and running.

e.g.
# touch /sys/kernel/debug/kgsl/kgsl-3d0/fast_hang_detect
# echo 0 > /sys/kernel/debug/kgsl/kgsl-3d0/fast_hang_detect


.

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


XDA PORTAL POSTS

Microsoft Finally Brings Remote Desktop to Windows Phone

You may recall that back in October of last year, Microsoft released itsofficial … more

SideControl Gains New Powers through Xposed

You may recall that a little overa month ago, we first talked about SideCutsby XDA Forum … more

Leak Points to Windows Start Menu’s Return as Soon as August

About a month ago at this year’s Build conference, Microsoft … more

Wearables Walkthrough: Tasker on the Samsung Galaxy Gear – XDA Developer TV

The future certainly looks like it is full of wearables. … more