forked from Toolify/Backbone
-
Notifications
You must be signed in to change notification settings - Fork 0
/
command_list.xml
119 lines (99 loc) · 6.87 KB
/
command_list.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2012 The CyanogenMod Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!--
The <CommandList> element should contain one or more <command> elements.
Every command should contain and unique id attribute an the follow
requiered attributes:
path: (string) The fully qualified path to the executable command
args: (string) The arguments that invoke the executable
The required exitcode element must have the required attributes commandId and commandPath
with the expected command for retrieve the exit code of the executed command
This file contains values that could be overlayed. This allow
configure special values for each device. Use overlay building folder on device tree
for overlay this values
-->
<CommandList xmlns="http://schemas.android.com/apk/res/com.brandroidtools.filemanager">
<!-- Start code (append to commands; for retrieve the exit code) -->
<startcode commandId="startcode" commandPath="/system/xbin/echo -n %1$s0%2$s ; "/>
<!-- Exit code (append to commands; for retrieve the exit code) -->
<exitcode commandId="exitcode" commandPath=" ; /system/xbin/echo -n %1$s$?%2$s"/>
<!-- Shell commands -->
<command commandId="bash" commandPath="/system/bin/sh" commandArgs=""/>
<command commandId="su" commandPath="/system/xbin/su" commandArgs=""/>
<!-- Console info -->
<command commandId="groups" commandPath="/system/xbin/groups" commandArgs=""/>
<command commandId="id" commandPath="/system/bin/id" commandArgs="-Gn"/>
<!-- FileSystem -->
<command commandId="mount" commandPath="/system/bin/mount" commandArgs="-o %1$s,remount -t %2$s %3$s"/>
<command commandId="mountpointinfo" commandPath="/system/bin/mount" commandArgs=""/>
<!-- List/Find/Info -->
<command commandId="ls" commandPath="/system/bin/ls"
commandArgs="%1$s 1> /dev/null && /system/xbin/stat -t %1$s.* %1$s* 2> /dev/null"/>
<command commandId="fileinfo" commandPath="/system/xbin/stat" commandArgs="-t %1$s"/>
<command commandId="find" commandPath="/system/xbin/find"
commandArgs="%1$s \\( -name %2$s -o -name %3$s -o -name %4$s -o -name %5$s -o -name %6$s \\) -exec /system/xbin/stat -t {} 2>&1 \\;"/>
<command commandId="quickfoldersearch" commandPath="/system/bin/ls"
commandArgs="-aFd %1$s.* %1$s* 2> /dev/null | /system/xbin/grep -e '^d' -e '^ld' | /system/xbin/cut -d" " -f2-"/>
<command commandId="readlink" commandPath="/system/bin/ls"
commandArgs="%1$s 1> /dev/null && /system/xbin/stat -tL %1$s 2>&1"/>
<!-- Operational -->
<command commandId="chmod" commandPath="/system/bin/chmod" commandArgs="%1$s %2$s"/>
<command commandId="chown" commandPath="/system/bin/chown" commandArgs="%1$s.%2$s %3$s"/>
<command commandId="cp" commandPath="/system/xbin/cp" commandArgs="-af %1$s %2$s"/>
<command commandId="link" commandPath="/system/bin/ln" commandArgs="-s %1$s %2$s"/>
<command commandId="mkdir" commandPath="/system/bin/mkdir" commandArgs="-p %1$s"/>
<command commandId="mv" commandPath="/system/bin/mv"
commandArgs="%1$s %2$s || ( /system/xbin/cp -af %1$s %2$s && /system/bin/rm -R %1$s )"/>
<command commandId="rm" commandPath="/system/bin/rm" commandArgs="%1$s"/>
<command commandId="rmdir" commandPath="/system/bin/rm" commandArgs="-R %1$s"/>
<!-- Usage -->
<command commandId="diskusage" commandPath="/system/bin/df" commandArgs="%1$s"/>
<command commandId="diskusageall" commandPath="/system/bin/df" commandArgs=""/>
<command commandId="folderusage" commandPath="/system/xbin/busybox" commandArgs="ls -alR %1$s 2> /dev/null"/>
<!-- I/O -->
<command commandId="read" commandPath="/system/bin/cat" commandArgs="%1$s"/>
<command commandId="touch" commandPath="/system/xbin/echo" commandArgs="-n '' >> %1$s"/>
<command commandId="write" commandPath="/system/bin/dd" commandArgs="bs=4k of=%1$s"/>
<!-- Run -->
<command commandId="exec" commandPath="/system/bin/sh" commandArgs="%1$s"/>
<!-- Misc -->
<command commandId="dirname" commandPath="/system/xbin/dirname" commandArgs="%1$s"/>
<command commandId="echo" commandPath="/system/xbin/echo" commandArgs="%1$s"/>
<command commandId="checksum" commandPath="/system/xbin/md5sum"
commandArgs="%1$s && /system/xbin/sha1sum %1$s"/>
<!-- Process control and info -->
<command commandId="pid_shell" commandPath="/system/xbin/echo" commandArgs="$$"/>
<command commandId="pid_shell_cmds" commandPath="/system/bin/ps"
commandArgs="| /system/xbin/grep -w %1$s | /system/xbin/awk '{print $2}' | /system/xbin/grep -v -w %1$s"/>
<command commandId="pid_cmd" commandPath="/system/bin/ps"
commandArgs="| /system/xbin/grep %1$s | /system/xbin/grep -w %2$s | /system/xbin/awk '{print $2}'"/>
<command commandId="sendsignal" commandPath="/system/bin/kill" commandArgs="-%1$s %2$s"/>
<command commandId="terminate" commandPath="/system/bin/kill" commandArgs="%1$s"/>
<!-- Compress -->
<command commandId="tar" commandPath="/system/xbin/tar" commandArgs="-C%1$s -%2$scvf %3$s [@]"/>
<command commandId="gzip" commandPath="/system/bin/gzip" commandArgs="%1$s"/>
<command commandId="bzip" commandPath="/system/xbin/bzip2" commandArgs="-f %1$s"/>
<command commandId="zip" commandPath="cd"
commandArgs="%1$s && ( /system/xbin/zip -9 -r -y %2$s [@] || cd /)"/>
<!-- Uncompress -->
<command commandId="untar" commandPath="/system/bin/mkdir"
commandArgs="-p %2$s && /system/xbin/tar -C %2$s -%1$sxvf %3$s"/>
<command commandId="unzip" commandPath="/system/bin/mkdir"
commandArgs="-p %1$s && /system/xbin/unzip -o %2$s -d %1$s"/>
<command commandId="gunzip" commandPath="/system/xbin/gunzip" commandArgs="-f %1$s"/>
<command commandId="bunzip" commandPath="/system/xbin/bunzip2" commandArgs="-f %1$s"/>
<command commandId="unlzma" commandPath="/system/xbin/unlzma" commandArgs="-f %1$s"/>
<command commandId="uncompress" commandPath="/system/xbin/uncompress" commandArgs="-f %1$s"/>
<command commandId="unxz" commandPath="/system/xbin/unxz" commandArgs="-f %1$s"/>
<command commandId="unrar" commandPath="/system/xbin/unrar" commandArgs="x -ry -c- -cfg- -kb -p- -o+ %2$s %1$s"/>
</CommandList>