[BASH4.1+][SCRIPT HELPER][LIBRARY]semi-native function library - T-Mobile Samsung Galaxy S II SGH-T989

Hello XDA users, deciding to post this here because i figured it could get some use/i could get some feedback
(Placing it in general because i honestly dont think it could work anywhere else)
Basicly over the past few months ive been taking my multiple script for android, & rewriting/compressing into 1 library
& adding features/functionality that i consider useful. This script has never touched a PC, & only been written on android
(BTEP & DroidEdit Pro), & is designed to:
A.) Extend the basic terminals functionality.
B.) Extend customized scripts, & making scripting semi-easier.
C.) Offer multi-device compatibility while keeping origional functionality.
The script is capable of determining all critical variables on initialization, from
partitions (both mount name, & partition number can be easily obtained), OS/ANDROID version/type
Execution mode (source/exec), Autodetect instigator (Eg: boot, script, shell, etc.) If present, Execution level,
Etc, seamlessly before scripts execution, & modify its own execution accordingly.
The script can be used in a similar method to busybox (Eg, can be called directly, or through symlink
(Symbolic link) using functions name, & allows adding multiple switches at runtime which can totaly
Customize execution without touching a configuration (yes, it does support configurations).
Or for script/shell, can be sourced for max performance & increased functionality.
This script is designed to be as native as possible, & only requires busybox/toolbox, & bash (4.1+)
(Systems default/sh) is not sufficient.
Readme (1/2, Read 2nd post):
Code:
----------------------------------------------------------------------------------------------------
Table of contents:
1.) Basic information
2.) Installation
3.) Usage
3a.) Basic commandline switches
4.) Included functions & definitions (Execution)
4a.) Included functions & definitions (Source only)
##########################################################################################################
Basic Information 1.
SuperBox is a multi-call, multi-execution function library (think busybox with bash & sourcing),
built on ANDROID, For ANDROID, Designed to increase script efficiency, & offer "unstandard"
multi-device functionality, & some functionality considered "missing" from ANDROID/Linux by default.
##########################################################################################################
Installation 2.
Superbox is designed to be easy to install/use, and requires very few steps/dependancies to install.
Before installing, please check this small list of prerequisites & insure you have the required
dependancies to ensure correct installation, the following are required:
a.) BASH 4.x (4.0+) installed & linked to '/system/bin' & '/system/xbin', Systems default is not
sufficient & cannot support SuperBox in all needed areas.
b.) BusyBox 1.18+ (tested on v1.19.4), Please ensure toolbox is also fully installed.
c.) Device must be rooted & running S-off (insecure kernel, read kernel documentation)
This part can be bypassed if installing through recovery. Some features will be limited.
d.) SuperBox is a terminal/script expansion toolkit, as such, a terminal emulator (Such as BTEP aka:
Better Terminal Emulator Pro, or similar) is recommended for optimal usage.
if your device can meet the above requirements, you are ready to install.
To install, simply move the downloaded script (superbox, or superbox.txt) to either '/system/bin', or
'/system/xbin', if the downloaded file has an extension, remove it.
Set permissions to 755 (rwxr-xr-x), Once complete, open your preferred terminal, & type 'su -c bash'
once in bash, type 'superbox' (or whatever you named the script), or 'superbox --info', if the operation
succeeded without error, you can begin full installation, Simply type either:
'superbox --install', or 'superbox --install <FUNCTION> to fully install, or install specific function.
See section 3a (Basic commandline switches) for full list of available switches, or section 4
(Included functions) for list of executable functions.
##########################################################################################################
Usage: 3.
SuperBox allows multiple methods of execution, & preferred method is left completely up to the user.
Sourcing:
SuperBox can be sourced either in terminal, or script, using something similar to
'. superbox', or '. ./superbox' if kept in unstandard path. if sourcing in terminal & script appears
to continue to execute, Try adding '--noboot' switch (see section 3a).
Script allows extra functionality not typically available in execution mode.
Execution:
this is the most typical use for superbox, & as easy as typing 'superbox <function>' or '<function>'
when fully installed. For list of all available functions, use 'superbox --list' to generate full list
of available applets, Please note that when using '--list' or even app count when using '--info' is
only listing execution type applets, Source functions are NOT included in this list.
----------------------------------------------------------------------------------------------------------
Basic commandline switches 3a.
SuperBox allows adding additional variables through commandline to modify per-execution variables,
Without editing a configuration, or worrying about recurrent changes. These variables effect a wide
range of scripts functions, & are available in 2 levels,
1.) SuperBox switches:
These switches effect the script as a whole, & are listed/added by the double-hyphon prefix ('--')
These are the only switches listed in this readme, for individual functions switches, please use
'superbox <function> --help' or '<function> --help' if fully installed.
1.) Function switches:
These switches only effect the function being processed, & are listed by a single-hyphon ("-"),
These are not available in all functions. Function switches should be used after superbox switches.
SuperBox switches:
The following MUST be passed as MODE & must be called directly from SuperBox, Eg:
'superbox --<MODE>', Not capable of being passed as variable.
install | Usage: '--install <FUNCTION> --installto={PATH}', Generates symbolic link for FUNCTION in
| PATH, if no FUNCTION specified, installs all, if no path, Default is used.
remove | Usage: '--remove <FUNCTION>', Opposite of above, Removes link for specified function.
| Scans system to find symbolic link, use '--full' switch to scan full recursive.
chkbb | Checks install status of busybox, & capable of generating missing links, use '--fix' to
| auto repair any/all missing links.
version | Displays installed SuperBox's version.
list | Lists all included execution-capable functions included in current version.
The following are to be used after mode (function listing), Eg: 'superbox <MODE> --<SWITCH>' or
'<MODE> --<SWITCH> when fully installed.
debug | Forces debugging on script (uses 'set -x' command), applies to script as a whole.
bb/tb | Pre-determines which busybox/toolbox versions to use, Must be used as '--bb=/path/to/file'
| or '--bb/path/to/file', Specifying invalid input will restore defaults when executing.
color | Default Colors for modes allowing color. sets color based on position in strings, Eg:
| '012345678' (upto 9 characters) where: 0=Error, 1=Note/Highlight, 2=Note2, 3=Normal,
| 4=File, 5=Path, 6=Link, 7=Background, 8=border, use pound (#) in place of unused spacing.
| for full listing of colors, Please see 'manfunc Col'
nocolor | Overrides above switch, & disables color in all segments.
installto | Modify install location for current component. (Used as '--installto={PATH}')
| MUST be used after install mode (Effects most file-based sections).
file | Usage: '--file="{/FULL/PATH/TO/FILE}"', used to set file path/name for specific segments
| Only effects segments where single-file processing is key.
local | Usage: '--local=\"{PATH\"', Assign path to use as local directory.
home | Usage: '--home=\"{PATH\"', Assign path to use as home directory, Use above over this.
time | Usage: "--time='{FORMAT}'", Specify time format (see '--timef'), (used for Lecho, etc.).
timefull | Usage: "--timef='{FORMAT}'", Specify full time/date format for script. %Y=4-digit year,
| %m=2-digit month, %d=2-digit day, %H=2-digit hr (24hr), %l=hour (12hr), %M=2-digit min,
| %S=2-digit seconds, %h=print month, %l=hour (12hr), %a=3-char day, %c=full (default).
log | Usage: '--log=<LEVEL>', set logging level/mode for script. *BROKEN, DONT USE*
logfile | Can only be used with '--log' greater then 1. Usage '--logfile=\"{PATH/FILE}\"'
tmpfile | specify temporary file to use for processing some segments.
tmppath | specify temporary path to use when needed for processing some segments.
list | Lists all included execution-level functions in current build.
help | Use immediately after <APPLET> to display information & usage on selected applet, Some
| applets will only display partial information by default, Use '--full' after help to
| display full information on specified function.
fix | Multipurpose switch, Allows bypassing non-critical errors, allows repairing any/all
| fixable errors, & serves to aid some functions.
silent/q | silences most (non-critical) output from STDOUT.
##########################################################################################################
*NOTE
some functions might not be considered 'main stream' or correct, but through trial & error, seem to work
Best with the chosen method.
Some functions are a WiP, might not be functioning correctly.
If you experience an issue, or have a suggestion, Please let me know.
**EDIT**
Updated, most functions should work correctly now.

Readme (2/2):
Code:
Included Functions (Execution) 4.
alignapk <file>
> Automaticly align <file> if specified, or all installed apks otherwise. can specify specific apk, or
simply apk name if apk is installed. Ex: 'alignapk systemui' is equivalent to
'alignapk /system/app/SystemUI.apk", extension (apk) is not needed, if path is specified, must be case
specific, otherwise alignapk will attempt to process case insensitive. Script will generate a SQL
database by default, but can specify text-based database with customized settings (See default config)
bam <Process1> <Process2>...
> kill any running processes matching specified input. Partial matches are supported, Eg:
'bam media' can kill 'android.process.media', aswell as any/all packagenames including 'media'
baseext <FILE> <MODE>
> echos the base extension of <FILE> if no MODE specified, or filename without extension if <MODE> is 1.
Anything else will display File with 'MODE' as extension, Eg: 'baseext ex ample' will return ex.ample
bar <var1> <var2> <var3>..
> displays accurate progress bar on screen, with the default terminal width as overall length.
Supports multiple customizable parameters. Only supports duration & strict percentage in current
build, More uses will be added in future builds (Eg: watch process, count, etc). Supported switches:
-t | Specify total time to run the bar, Usage: '-t=' where '' is scripts duration.
-p | Specify strict percentage to display (dont count) Eg: '-p60' will display 60% progress & quit.
-e | Specify displayed text when running the bar, multiline supported, can use script variables.
-d | Specify ASCII character to use for generating progress bar. default is '='.
-w | Override default width to use when processing bar, default is terminals width.
-n | Show progress Percentage (%) rather then progress bar (-b works as the oppisite)
-s | Display incrementing progress bar (jumps by ~1%) rather then the per-increment jump.
-k | same as '-s', but shows percentage at end of bar. (will increase exec time)
basepath <PATH>
> echos the base path or mount point (closest to rootfs) of <PATH>
byte <BYTES>
> Automagicly calculates Bytes(B)/kilobytes (Kb)/Megabytes (Mb)/Gigabytes (Gb) based on
on given Number in 'BYTES' on the *1024 principle, Eg: 'byte 1024 = 1Kb', Supports decimal places,
& maximum decimal points can be modified by 'MaxDec=' variable. Uses rounding to strip access.
Using '0' as 2nd variable will remove non-numaric characters from return (Eg: 'Kb/Mb/Gb/etc.).
Using '1' as 2nd variable will seperate non-numaric & numaric characters (Eg: '1Kb' would b '1 Kb').
calc <VAL EXPR VAL> or echo "VAL EXPR VAL"|calc
> similar basic functionality to 'bc', mini calculator script using 'awk' & 'printf', Supports Piping,
(function|function), float integers (decimals) & multiple types of arithmatic.
chrg_type <MODE>
> Quickly determines where the device is currently getting power from. Following modes are supported:
0 = Quiet output, returns 0-2 for Battery/AC/USB respectively.
1 = similar to '0', but displays code Aswell as return code.
2 = displays source (Eg: Battery/AC/USB), all other modes will simply display string.
chkdir <PATH> <PERM> <OWNER.GROUP>
> Checks existance of <PATH>, calls 'mkdir -p' if not exist, & sets permissions <PERM>
(numaric) when creating, & sets owner/group if spedified.
chksize <MOUNT> <CHECK> <ECHO>
> Checks if <MOUNT> has <CHECK> mb free (good for checking before extracting/installing). Returns 1/0
accordingly. set <ECHO> to 0 to use errorcode & disable echoing to STDOUT (if statment, (echo $?))
chkstate <INPUT> <EXEC_CMD>
> Determines if <INPUT> is available for script use, able to detect functions, aliases, links, binaries,
files, Variables, etc. specify <EXEC_CMD> to exwcute <INPUT> if detected. (binaries/functions/etc.)
Col <STRING> <MODE> or Col <STRING>
> Used for colored text Replace 'Col' with either: Bla(ck), Blu(e), Red, Gre(en), Whi(te), Mag(enta),
Cya(n), Yel(low). Ex: 'Bla "sample text" 1', Available modes are: 1=Bold, 2=Underline, 3=colorfill
(switches background/text), 4=no newline, 5=bold (no newline), 6=underline (no newline).
columns <MODE>"
> prints available columns, Set <MODE> to 1 to print number of lines (height of prompt).
conv <celsius|fahrenheit> <TEMP>, or conv <F> <T> "<STRING>"
> a rather bloated conversion script capable of converting tempuratures, or string to various formats.
-When converting tempuratures, both 'conv c 100', & 'conv 100c' are correct & will output sum
-When converting string, 'F' (From) & 'T' (To) must be specified to begin calculation.
'F' & 'T' can be one of the following: 'a' (ascii) (normal text), 'b' (binary, outputs 8-digit binary
code for each character specified), or 'h' (hexadecimal), when processing from hex, 4th variable
specifies preceeding character(s) to add to each return (default is '\x'), if set to 0, no characters
are added to string, only 2-digit hex is returned, For example: 'conv a h hello' (no 4th variable)
returns '\x68\x65\x6C\x6C\x6F', while 'conv a h hello 0' returns '68656C6C6F'.
divider <LENGTH> or divider -d<CHAR> <LENGTH>
> generates a bar (String of character(s) or CHAR if set), <LENGTH> characters long, if no LENGTH set,
total width of terminal window is used. Use '-d<CHAR> to customize character, Default is pound ('')
Eco <ABCDE> "TEXT"
> Echos <TEXT> with specific atributes, based on <ABCDE>, where: A=Line only [0|1], B=no newline[0|1],
C=(Bold[1], Underline[2], None[0]), D=Text color, E=Background color. Valid colors include:
0 - black, 1 - Red, 2 - Green, 3 - Yellow, 4 - Blue, 5 - Magenta, 6 - Cyan, 7 - White
ex <path/to/file>
> Extract archive to designated path, & even allows recompiling. use '--help' for more information.
exist <INPUT>
> Attempts to detect input & gives return code depending on findings Eg: 3=Dir, 2=Link, 1=File, 0=none.
fdate <INPUT>
> Same usability as 'busybox date -r', Returns modified date of <INPUT> Output can be adjusted
using '--timef' switch.
FixCl
> Returns color to normal, regardless of user-preset defaults.
getblock <MOUNT_NAME>
> Simply echos the block ID of requested point, saves a lot on scripting & allows true multi-device
compatibility. Usage as: 'getblock system'
gnasty <OPTIONS> <PATH>, Or 'gnasty <PATH>'
> Searches for files/paths with names containing invalid characters such as
[+ { ; " \ = ? ~ ( ) < > & * | $], Prints any/all links, includes full path by default. Modes include:
-d - specify directory, used as '-d={PATH}', not needed in most cases.
-m - Max search depth from directory, cannot be less then 1 (default). Usage: '-m' or '-m='.
-i - Display files inode (index number), useful for looping output to irm.
ipath <path>
> Will auto-correct <path> to case-sensitive (if exist) when input does not match case
(case-insensitive path correction through function)
irm [-irRfna] FILE, or 'irm FILE'
> remove (unlink) FILE using inode (index number). used for files/paths with illegal
characters in the name, (Eg: '+ { ; \" \\ = ? ~ ( ) < > & * | $'). The following modes are supported:
-i - Always prompt before removal | -f - Never prompt before removal
-r|-R - Remove file(s)/path recursively | -a - Only use name (no inode, replicating busybox rm)
-n - Ignored, used solely for script use.
is_num <STRING>
> Checks if 'STRING' is numaric (Contains only numbers), Returns 0 if true, 1 otherwise.
Can use '1' as second variable to echo result aswell as return code, eg 'is_num <STR> 1'.
lc "<INPUT>"
> Switches input to all lowercase, supports whitespace/newline, no limitations.
Lecho <MODE> <TEXT> <FILE1> <FILE2>
> Used to pipe text to log (while removing color/string data) & terminal.
If no file specified, Simply replicates echo with log header. Supports the following headers:
1=' : ' (default), 2='[!]' (error), 3=' > ' (note), 4=' ' (continuation).
lperm <PATH|FILE> <MODE>
> Execute user pre-generated configurations (mperm) based on input, can choose to either restore whole
path to configured state, or simply process 1 file from said config.
set <MODE> to 0 to disable recursive loading (dont descend into subdirectories).
manfunc <function>
> Displays available information for selected function, Operates identical to: '<function> --help'.
many <TEST> <STRING>
> Determine how many times <TEST> appears in <STRING>
md5 <string>
> Generates md5 hash from string (or filename).
mk <path/to/directory_or_file_to_archive>
> Use 7-Zip to build specified archive efficiently through script. While keeping full functionality
(and even adding), Supports 7z, zip, xz, bzip2, gzip, tar, & wim archive types. use '--help' for info
mod <OPTION> <var1> <var2>
> Modifies particular segments of device: Following options are supported:
b | brightness Modifies LCD (Display) brightness NOT supported on some devices.
display | Modify current pixal density, Eccepts numarical value (like lcd.density in build.prop),
Changes are made on the fly, & will reset all open applications, use with caution, can use
'reset' to reload default density from build.prop, Usage: 'mod density <value>'.
mperm <PATH|FILE> <MODE>
> Generate configuration for specified input, recording type, Permissions, Owner & Group, These configs
can then be loaded at any point specified, or ondemand using lperm, Supports the following modes:
0=non-recursive, 1=ignore errors,
myip
Display devices current IP, using nothing but wget, making it the trimmest ip oneliner around :)
ofcourse, internet connection is required.
nocl <STRING>
> Removes color variables from <STRING> to allow recording dato to log.
pinfo <NAME> <MODE>
> Neatly Prints process information for specified <NAME>, Supports the following modes:
1=Display PID (replicating pgrep), 2=Displays processes full Name, 3=Displays Parent Ppid,
4=display all options, 5=Display processes adj lvl, 6=Displays current State, S=sleeping, R=running,
7=Displays Owner, 8=Displays the Group (if set).
pos <VAL> <STRING>
> Displays start point(s) of 'VAL' in string, If multiple instances are detected, prints all starting
points seperated by customizable delimiter (Default is " " (whitespace)). If using custom delimiter,
('-d' switch), switch MUST be passed as first variable & specified as '-d%' where '%' is the new
character to use, Eg: instead of: 'pos hi hellohiwatup', Use: 'pos -d% hi hellohiwatup'.
Only effects multiple occurences of 'VAR'.
printl <FILE> <START> <END>
> Prints specific line(s) from FILE, If END is unspecified, prints 1 line, Otherwise prints from 'START'
to 'END', Using 'EOF' for 'END' will print to end of 'FILE', Using 'C' for 'START' will count lines.
pwr <mode>
> Advanced power control, with additional modes, which should work on multiple devices, Available modes:
reboot | reboot device, can use 'reset' aswell with same effect. can use 'hot' as 3rd variable to
perform hot reboot (still performs sync), simply reboots OS without rebooting kernel.
off | shutdown device, does exactly as stated.
download| Reboot into download mode. Might not be supported on some devices.
recovery| Reboot into recovery mode. Might not be supported on some devices.
wipe | Wipes cache/dalvik, then performs full reboot.
fc | Set fast-charge mode (needs kernel support), Eg: 'pwr fc 1' to enable, 'pwr fc 0' to disable
Using 'pwr fc' will display status, or support if unsupported.
rand <LENGTH> <MODE>
> Output random string 'LENGTH' characters long (Default is 32), if 'Mode' is unspecified, or is
Invalid, Output will consist of all printable characters. The following modes are available:
0 - Only print Letters (Upper & lower case) & digits
1 - Only print Letters (Upper & lower case)
2 - Only print digits
3 - Only print letters (Upper case)
4 - Only print letters (Lower case)
readperm <STRING>
> Opposite of 'showperm', displays permissions level from readable string. Easier to use switch
(& even switch again). Sticky/"special" fully supported. Again, 'switch' is easier/cleaner to manage.
remount <MODE> <0|1>
> remounts system & rootfs in specified mode, Second variable in string is unneeded But determines
check state, 1 will use rootfs as check, 0 will use '$System' (default), Use '--help' for more info
rootrw/rootro
> Mounts 'rootfs' as R/W (Read/Write) & R/O (Read/Only) respectively, similar to miniscripts included
in most Roms, With the exception that it utilizes the autodetection available in script, & should
work on any device/rom.
setlength "<STRING>" <POSITION> <LENGTH>
> displays the adjusted value of <STRING>, & should be under <LENGTH>,
autocorrects/centers based on given input, If no length is specified, 'Cw' (Common width) is used,
or scripts cefault. for position, -1 is right, 0 is left, 1 is center.
setown <FILE|PATH> <OWNER.GROUP>
> Glorified chown, With logging support.
setperm <FILE|PATH> <PERM>
> Glorified chmod, With logging support.
setprops
> Similar functionality to 'sysctl' Set system properties from configuration.
Can use '--file' to Specify reference file.
setval <VARNAME> <POINT> <FORCE> <POINT2> <FALLBACK_VALUE>
> Set values on system files, up to 2 points can be set for a variable, Can also specify fallback
If no value set in VARNAME. and no default, VARNAME, is used to reference the variable in error
sha256/sha512 <string>
> Generates sha512/sha256 encoded hash from string, similar to 'md5' function.
showperm <PERM_STRING>
> Displays permissions string in readable form from input, sticky/"special" notes are fully supported.
Switch is easier to use & capable of doing both.
size <MODE> <POINT> <[1,MB|2,AUTO|*,KB]>
> Echos the value of specified mode on specified <POINT> (modes 1-4 are for mount points).
If incorrect mount specified, Returns errorcode. Automaticly fixes missing '/' on specified mount if
not present. Third variable specifys out format. 1 is Mb, 2 is auto (kb/mb/gb with tags), * is kb
only (default), Following Modes are supported: 1=Full size, 2=Used space, 3=Used %, 4=Free space,
5=Size (use for files/paths, will not work on mounts, added '5' on request).
stype <INPUT>
> Defines file type & offers return code based on existance. Returns the following:
0=no input, 1=File, 2=Function, 3=Keyword, 4=Builtin, 5=Directory, 6=Variable, 7=Unknown/not exist.
switch <STRING>
> Switch permissions string from either human readable (rwxrwxrwx) or Numaric (777), or vice versa.
sysrw/sysro
> Mounts '/system' as R/W (Read/Write) & R/O (Read/Only) respectively, similar to miniscripts included
in most Roms, With the exception that it utilizes the autodetection available in script, & should
work on any device/rom.
sput <mode> <option1> <option2>
> large function resembling 'tput', rebuilt for 'light' or dumb terminals, should work for most scripts
requiring tput, use 'sput --help' for more information on available options.
toggle <string>
> Checks if <string> can be considered a "true or false" statement, eg: 'toggle 1' would be '0',
'toggle yes' is 'no', 'toggle on' is off, etc. Uses 'togglevars' string. case inspecific.
tree <path>, or tree --arguments -triggers <path>
> Displays directory information based on user input, if no input specified, Current path is used.
Allows using 'tree.cfg' in '$LocalPath' directory. Use '--help --full' for more information.
truncp [-f] <path> <length> <symbol>
> Truncate <path> to <length>, & prepend <symbol> to beginning when truncated. Default <symbol> is ".."
If '-f' switch is used, Path is truncated to <length> specificly, no exceptions, otherwise splits at
closest base to <length> (default length is 20), Eg: 'truncp /system/etc/SuperBox 12' will return:
'../SuperBox', & 'truncp -f /system/etc/SuperBox 12' will return '..c/SuperBox' (12chars precisely)
Output must never exceed <value>, Truncation does not occur unless <path> is over <length>.
uc "<INPUT>"
> Switches input to all uppercase, supports whitespace/newline, no limitations.
Included Functions (Source Only) 4a.
Please note that the functions listed here might not be a complete list of available applets for use in
source mode, & the applets listed here are unavailable in execution mode due to limitations of bash
script handling (Only available when sourced or sourced through script).
cd <path>, or cd <var> <path>
> works as a replacement/extension to shell's builtin. can auto-cd to files path if file is specified
& supports additional (unstandard) functionality, while keeping origional functionality fully intact.
Supports the following variables:
> -l | follow links to home path. (eg: 'cd /etc' would cd to '/system/etc'), defaults as on.
> -p | dont follow links to home path (oppisite of above, cds to given input).
> -c | process case insensitive (Eg: 'cd /SYSTEM/ETC' would cd to '/system/etc') Default is off.
> -m | make path if path doesnt exist, then cd to created path (nofail cd).
Variables can be passed either united, or seperate, & in any order, Eg: '-l -p -m -c' or '-lpmc'
error <id> <string1> <string2>..
> prints error message to stderr based on error 'id'. available ids can vary with build & it is not
recommended to call this function, for compatibility reasons, only ids that are garunteed to remain
unchanged are, '-1' (self-defined, no error notice), & '3' (self-defined with error notice).
Error ID & definitions start at line ~157, & continue to 'END_ERR' & can be previewed with 'printl'.
getsizes <base-size>
> used for generating spacing when generating menus in a uniform fashion, if 'base-size' is unspecified,
Script will use terminal width instead. Exports the following variables:
Cw - Custom width, overall width of panel (base-size, or columns)
Ws - Workspace, Width of 'Cw' Minus borders (Side1/Side2 & Edge) (if set).
Side - Width of sides ('Ws'/3), Use for left/right on 3-column menu.
Middle - Width of middle ('Ws'/3 & adjusted for uneven width), Use for left/right on 3-column menu.
Left - Width of left ('Ws'/2'), use for 2-column menu.
Right - Width of right ('Ws'/2 & adjusted for uneven width), Use for 2-column menu.
getvals $*
> used for functions eccepting runtime variables, & offers extended customizations when compared to
using 'shift' & 'if/case' statements. Only requires a nested 'ctrigs' function determining all
applicable switches, & a note to 'ctrigerr $1' on undefined. all additional variables passed to this
function are exported to V{1..20}. (script allows up to 20 variable/switch combinations by default).
'getvals' will auto-clean all previous user-variables before start, & clean all unused when done.
inpth <VARIABLENAME> <DEFAULTPATH>
> Checks if 'VARIABLENAME' has a directory, if not, sets 'VARIABLENAME' to 'DEFAULTPATH/VARIABLE'
used for defaulting files to correct locations, 'VARIABLENAME' must be variables name, & must be set,
setclock <mode>
> can pass variable as mode, allows '0/1' as values, exports either 12hr (0), or 24hr (1) formatted
variable (variable name 'Time') for use with 'date' Eg: 'date +$Time'
up <path> <count>
> replicates 'cd ..', if no variable passed, cd's up one level from current directory, if 'path' is
specified, cd's up 1 level from 'path', or 'count' levels up from either.
Use as either 'up', 'up <count>', 'up <path>', or 'up <path> <count>'.

Configurations:
Configurations are unneeded for execution, but can be used to set default values
To use during execution
By default, configurations are read from:
'/system/etc/SuperBox' > main (system) configurations.
'/data/local/SuperBox' > user (writable) configurations.
User configurations will override system configurations if exist.
Main configuration (SuperBox.cfg):
Code:
#======================================================================#
# __ #
# Main configuration for: /\ \ #
# ____ __ __ _____ __ _ __\ \ \____ ___ __ _ #
# / ,__\/\ \/\ \/\ __`\ /'__`\/\`'__\ \ '__`\ / __`\/\ \/ \ #
# /\__, `\ \ \_\ \ \ \_\ \/\ __/\ \ \/ \ \ \_\ \/\ \_\ \/> </ #
# \/\____/\ \____/\ \ ,__/\ \____\\ \_\ \ \_,__/\ \____//\_/\_\ #
# \/___/ \/___/ \ \ \/ \/____/ \/_/ \/___/ \/___/ \//\/_/ #
# \ \_\ By: YupitsMine420 #
# \/_/ #
#======================================================================#
# File definitions: #
# can use full path, or script variable to define. not read by default.#
# #
# Used for 'setprops', Similar functionality to sysctl, sets system #
# properties from configuration file. #
# Prop_File: $LocalPath/SystemProps.cfg #
# #
# Used for chkbb, when generating missing links, all links generated #
# are written to this file for easy uninstall #
# BusyBox_File: $LocalPath/BusyBox_Add.cfg #
# #
# Specify custom BusyBox/ToolBox binaries for script to use #
# #
##Use_BusyBox: $System/etc/SuperBox/bin/busybox1210 #
# Use_ToolBox: $System/stest/Data/bin/toolbox #
# #
#======================================================================#
#
# Permissions configurations
#
# Paths:
Perm_Src_Dir=755 # Source paths.
Perm_Cfg_Dir=644 # Configuration paths.
Perm_Bin_Dir=775 # Binary (executable) paths.
#
# Files:
Perm_Src_File=644 # Sourcable files.
Perm_Cfg_File=644 # Configuration files.
Perm_Bin_File=755 # Binary (executable) files.
#
DefOwner=root # Default owner.
DefGroup=root # Default group
#
#======================================================================#
#
# Basic configurations:
#
# User configuration path, should be R/W by default (usually '/data').
# Configurations in this path will override base configurations.
LocalPath='$Data/local/SuperBox'
#
# Set scripts clock format, 0=12hr, 1=24hr.
use_24hr=1
#
# Enable/Disable colors in all segments. 1=enable, 0=disable
ColorMode=1
#
# Specify default Colours for modes allowing colour. Format is:
# '0 1 2 3 4 5 6 7 8', where: 0=Error, 1=Note/Highlight, 2=Note2,
# 3=Normal, 4=File, 5=Path, 6=Link, 7=Background, 8=Borders.
DefaultColors=(1 3 6 2 6 4 5 0 5)
#
# Set how many decimal points to allow in arithmatic calculations,
# used in (most) filesize segments. Default value is "2"
# Set to '0' to disable float integers (round to closest full number)
MaxDec=2
#
# Sets path used to store/load permissions configurations for 'm/lperm'
# these configurations are device specific & should not be ported or
# re-used outside of this ROM. Path set below should be constantly R/W.
PermDir="$LocalPath/Perms"
#
#======================================================================#
#
# SuperBox specific Configurations:
#
# Scripts default log method, 0=disabled, 1=critical, 2=full.
sbox_log_level=0
#
# sloggers default log method, '%' fits to width,'-' quiets output.
# (only outputs to log) only effects terminal.
sbox_log_mode=
#
# Specify if date should be appended to log name when generating.
# string is manipulated with 'sbox_log_tag' variable
# With the default value of '%a-%h-%d_%H-%M'
sbox_log_usedate=0
#
# if old log exists, append new data to the end when enabled.
sbox_log_append=1
#
# Allow superbox to be called by cron (startup), 1=Enable, 0=Disable.
sbox_allow_boot=1
#
# specify if SuperBox requires administrator on launch.
sbox_need_admin=1
#
# Link names that will be treated as direct call to SuperBox, Eg:
# Wont be treated as execution mode (links must be manually generated).
sbox_null_links="sbox2 superbox sbox.old sbox.new"
#
#======================================================================#
#
# cd (icd) Configurations:
#
# Specify if 'cd' should check match path/name case-sensitively
# Default is '1' (true), should use '-c' instead of changing this.
icd_usecase=1
#
#======================================================================#
#
# alignapk (zipalign) configurations:
#
# Zip alignment configurations:
# Zip default alignment level, 0 = disabled, 1 = auto, 2 = forced.
align_level=2
#
# Use MD5 sum for each file when processing align. 1=true, 0=false
align_usemd5=0
#
# Use SQL table for storing data, 1 = true, 0 = text database
align_usesql=1
#
# SQL table name to store configurations
align_table=zipalign
#
#======================================================================#
#
# Other (Misc.) Configurations:
#
Tree configration (tree.cfg) (can be appended to main configuration):
Code:
#======================================================================#
# __ #
# Tree configuration for: /\ \ #
# ____ __ __ _____ __ _ __\ \ \____ ___ __ _ #
# / ,__\/\ \/\ \/\ __`\ /'__`\/\`'__\ \ '__`\ / __`\/\ \/ \ #
# /\__, `\ \ \_\ \ \ \_\ \/\ __/\ \ \/ \ \ \_\ \/\ \_\ \/> </ #
# \/\____/\ \____/\ \ ,__/\ \____\\ \_\ \ \_,__/\ \____//\_/\_\ #
# \/___/ \/___/ \ \ \/ \/____/ \/_/ \/___/ \/___/ \//\/_/ #
# \ \_\ By: YupitsMine420 #
# \/_/ #
#======================================================================#
#
# Directories script will avoid, script supports partial matches when
# processing these paths. individual entries should be seperated by (":").
# 'bad_files' & 'bad_links' variables can also be defined to ignore said entry
tree_bad_dirs=":/proc:/dev:/sys:/:"
#
# Force processing any input, even if entry exists in 'tree_bad_*' variable(s)
tree_skip_check=0
#
#
# Used to connect same-depth paths when processing sub-directories &
# files, Default is "|", should be quoted.
tree_ui_con="|"
#
# Used as padding for filenames/etc. to match depth.
tree_ui_dep="+=>"
#
# Seperates file/link/date/size information when displaying tree.
tree_ui_sep="-->"
#
# Specify how tree will process links when detected.
# 0 = Normal, 1 = Ignore link, 2 = ignore all (dont display).
tree_link_mode=0
#
# Enable to Display directory info/size & file/link/dir count, etc.
tree_show_info=True
#
# Show size information when procesing files/links.
tree_show_size=1
#
# Show last modified date when procesing all files/dirs/links.
tree_show_date=1
#
# Enabling will stop script from processing more then 1 directory
# deep into base path.
tree_no_recurs=0
#
# Default Colormode for tree, Mode is '0 1 2 3 4 5 6 7 8 9' where:
# 0 = file, 1 = link, 2=directory, 3=note, 4=background, 5=connector,
# 6=depth, 7=seperator, 8=time, 9=size.
tree_color_mode=(1 3 6 2 0 6 3 8 4)
#
To see what variables are exported when script is sourced, you can create a small script such as:
Code:
export > /cache/1
. sbox
export > /cache/2
cat /cache/2|while IFS= read -r i;do
[[ "$(grep "$i" /cache/1)" ]] || echo "$i"
done
$bb rm -f /cache/{1,2}
save & run, will display all re-usable variables generated by superbox.
*NOTE
Change '. sbox' to '. <name_of_script>' depending on what you named it
adding switches after '. sbox' will enable the variable associated with said switches

My phone does neat stuff!
Sent from my SAMSUNG-SGH-T989 using xda app-developers app

kj2112 said:
My phone does neat stuff!
Sent from my SAMSUNG-SGH-T989 using xda app-developers app
Click to expand...
Click to collapse
Yep, playing with terminal is fun xD
Not quite a full terminal, but close
Ive managed to replicate some missing binaries in script, & modify some standards to suite my needs xD
Uploading a bash 4.1.0 binary for those who want it, the 1 thing this script relies on thats not standard
Just rename to 'bash', move to '/system/bin' & chmod 755 (rwxr-xr-x), then create symlink in xbin for compatability
(some scripts will use /system/xbin/bash, while others will use /system/bin/bash, easy to resolve with symlink)
Default bashrc (/etc/bash/bashrc)
Code:
# /etc/bash/bashrc
#
# This file is sourced by all *interactive* bash shells on startup,
# including some apparently interactive shells such as scp and rcp
# that can't tolerate any output. So make sure this doesn't display
# anything or bad things will happen !
#
# Test for an interactive shell. There is no need to set anything
# past this point for scp and rcp, and it's important to refrain from
# outputting anything in those cases.
[[ $- == *i* ]] || return
#
# Bash won't get SIGWINCH if another process is in the foreground.
# Enable checkwinsize so that bash will check the terminal size when
# it regains control. http://cnswww.cns.cwru.edu/~chet/bash/FAQ (E11)
shopt -s checkwinsize
#
# Enable history appending instead of overwriting.
shopt -s histappend
#
# set some environment variables
TERMINFO=/system/etc/terminfo
MANPATH=/system/etc/man:/system/man:/data/local/man
INFOPATH="$MANPATH"
HOME=/sdcard
TERM=xterm
#
# Enable color
CLICOLOR=1
#
# Control history location/format/etc.
HISTFILE="/system/etc/bash/bash_history"
HISTFILESIZE=3000
HISTCONTROL=ignoreboth
HISTSIZE=10000
#
# Prompt color codes
txtblk='\e[0;30m' # Black - Regular
txtred='\e[0;31m' # Red
txtgrn='\e[0;32m' # Green
txtylw='\e[0;33m' # Yellow
txtblu='\e[0;34m' # Blue
txtpur='\e[0;35m' # Purple
txtcyn='\e[0;36m' # Cyan
txtwht='\e[0;37m' # White
bldblk='\e[1;30m' # Black - Bold
bldred='\e[1;31m' # Red
bldgrn='\e[1;32m' # Green
bldylw='\e[1;33m' # Yellow
bldblu='\e[1;34m' # Blue
bldpur='\e[1;35m' # Purple
bldcyn='\e[1;36m' # Cyan
bldwht='\e[1;37m' # White
unkblk='\e[4;30m' # Black - Underline
undred='\e[4;31m' # Red
undgrn='\e[4;32m' # Green
undylw='\e[4;33m' # Yellow
undblu='\e[4;34m' # Blue
undpur='\e[4;35m' # Purple
undcyn='\e[4;36m' # Cyan
undwht='\e[4;37m' # White
bakblk='\e[40m' # Black - Background
bakred='\e[41m' # Red
badgrn='\e[42m' # Green
bakylw='\e[43m' # Yellow
bakblu='\e[44m' # Blue
bakpur='\e[45m' # Purple
bakcyn='\e[46m' # Cyan
bakwht='\e[47m' # White
txtrst='\e[0m' # Text Reset
#
# specify name of prompt
PROMPT_COMMAND='echo -ne ""'
#
# layout for coloring prompt command, if using color use this method only
# or get used to the blank prompt after executing command
if [ ${EUID} -eq 0 ];then
PS1="bash-4.1\[$txtred\]# \[\e[m\]"
else
PS1="bash-4.1\[$txtgrn\]$ \[\e[m\]"
fi
PS2='> '
PS4='+ '
#
# Set up a a few aliases to make commandline processing
# slightly easier.
for i in cat chmod chown df insmod ln lsmod mkdir more mount mv rm rmdir rmmod umount vi;do
eval alias ${i}=\"busybox ${i}\"
done
alias ls='busybox ls --color=auto'
alias sysro='mount -o remount,ro /system'
alias sysrw='mount -o remount,rw /system'
#
# Fix some 'change directory' aliases.
alias cd..='cd ..'
alias cdl='cd -L'
alias ..='cd ..'
alias ...='cd ../..'
#
# Annoyed by 'su' sending you to shell (sh)?
# Uncomment the following.
# alias su='su -c bash'
#
# Enable cmd style clear
alias cls='clear'
#
# Sudo semi-fix
alias sudo='su -c'
#
# Allow pulling command from history easily
alias hist='history|grep '
#

Updated for those few who download, fixed most broken functions & changed most default configuration names
If using configurations, you must use the new templates, original defaults still apply
If you have any issues using this build, please let me know, also, few new functions, & partially updated readme for
better definitions on new/existing options. included makeshift changelog for those who want it.
BTW. found a few binaries that work on our device, with all dependancies,
Such as:
7z (including 7za)
bc
GNU dc
GNU nano
GNU tput (with all dependancies such as terminfo db)
& various others (totaling about 30 GNU applications), just pm me if you want em. shouldnt upload as they aint my builds

Related

Toggle my PND on/off in accordance to given AC power supply

Hello all, first post here.
I've been working with Mortscript for a while now and I'm very happy with it.
Here's my attempt at a 3-script-pack. It should toggle my PND on/off in accordance to given AC power supply. But it doesn't work as expected,
especially the RunAt() seems not to work: only one event (the notify set in script ON_AC_POWER_LOSS) is executed by the scheduler, the notify set
in script ON_AC_POWER_DAEMON obviously is never executed by the scheduler. Anyone an idea?
Code:
# ON_AC_POWER_LOSS.mscr
#
# jwoegerbauer 09/04/2009
# GNU General Public License (GPL), Version 2, June 1991
#
#
# NO ERROR CHECKING IS DONE !!!
#
#ErrorLevel("off")
#
# Before using this script ensure file PowerNotifyFlags.ini
# is present and contains the following lines:
#
# [PowerOnOff]
# ACPower=1/0
#
#
Local()
#
#
# check for sufficient power or don't run anything and don't resubmit
If (BatteryPercentage() <= 35)
SleepMessage(5, "Battery level is low: " & BatteryPercentage(), "Power Warning", 1))
Exit
EndIf
#
# adjust to your needs
Set WAIT_SECS, 0
Set CHECK_BACK_SECS, 30 #must be equal or greater 10
Set PLAY_SOUND, 1
Set WAV_FILE, "\My Flash Disk\programme\TroNikPowerNotifier\chime_down.wav"
Set REG_POWER_HIVE, "HKLM"
Set REG_POWER_PATH, \
"System\CurrentControlSet\Control\Power"
Set INI, \
"\My Flash Disk\programme\TroNikPowerNotifier\PowerNotifyFlags.ini"
Set INI_SECTION, "PowerOnOff"
Set INI_KEY, "ACPower"
Sleep 100
#
# assume the device is running on external power and we unplug
# the usb-powered cable or engined off, and the power is re-supplied
# we should Cancel this script automatically.
# IMO this is a useful case when we use the device in the car in
# ignition mode and then start the engine.
#
# hence we implement now an additional power state listener (a sec timer)
While(%WAIT_SECS% > 0)
#
# yield 1 second
Sleep 1000
#
# query current power state
acPower = ExternalPowered()
If (acPower = TRUE )
# power is re-supplied
# therefore we don't go into Standby
Exit
EndIf
%WAIT_SECS% = %WAIT_SECS% - 1
EndWhile
#
#
If (not ExternalPowered())
#
#
Set ON_AC_POWER_DAEMON, "\My Flash Disk\programme\MortScript\ON_AC_POWER_DAEMON.exe"
#
# note: the turn OFF exe here defined must be the same as defined in file
# POWERNOTIFIER_PROMPT.mscr
#
#
Set TURN_OFF, "\My Flash Disk\SystemProgs\Sleep.exe"
Set TOGGLE_DISPLAY, "\My Flash Disk\SystemProgs\ToggleDisplay.exe"
Sleep 100
If ( %PLAY_SOUND % )
PlaySound( %WAV_FILE% )
EndIf
#
# On suspend mode we set ACPower=0 (OFF)
IniWrite( %INI%, %INI_SECTION%, %INI_KEY%, "0" )
Sleep 100
%INI_KEY% = "ExtPowerOff"
#
# read in registry value
ExtPowerOff = \
RegRead (%REG_POWER_HIVE%, %REG_POWER_PATH%, \
%INI_KEY%)
Sleep 100
#
# remember this value
IniWrite( %INI%, %INI_SECTION%, %INI_KEY%, ExtPowerOff )
Sleep 100
#
# set our corresponding registry value
# i.e. always turn off device in 1 second even if AC powered
# note:
# this will be revised laterly with ON_AC_POWER_RESUME script
RegWriteDword (%REG_POWER_HIVE%, %REG_POWER_PATH%, \
%INI_KEY%, 4)
Sleep 100
#
# kill old notification(s) to prevent overlap
RemoveNotifications( %ON_AC_POWER_DAEMON% )
#
# set new notify (will be processed in CHECK_BACK_SECS from now on)
ReRun = TimeStamp() + %CHECK_BACK_SECS%
RunAt( ReRun, %ON_AC_POWER_DAEMON% )
Sleep 100
#
#
# turn device into standby
Run( %TURN_OFF% )
#
#
EndIf
#
#
Exit
# ON_AC_POWER_DAEMON.mscr
#
# jwoegerbauer 09/04/2009
# GNU General Public License (GPL), Version 2, June 1991
#
#
#
# NO ERROR CHECKING IS DONE !!!
#
#ErrorLevel("off")
Local()
#
#
# adjust to your needs (seconds !!!!)
Set CHECK_BACK_SECS, 15
#
#
Set ON_AC_POWER_DAEMON, "\My Flash Disk\programme\MortScript\ON_AC_POWER_DAEMON.exe"
Set ON_AC_POWER_RESUME, "\My Flash Disk\programme\MortScript\ON_AC_POWER_RESUME.exe"
Set TURN_OFF, "\My Flash Disk\SystemProgs\Sleep.exe"
Sleep 100
#
#
# kill old notification(s) to prevent overlap
RemoveNotifications( %ON_AC_POWER_DAEMON% )
Sleep 100
#
# check AC power line state
If( NOT ExternalPowered() )
#
# set new notify (will be processed in CHECK_BACK_SECS from now on)
ReRun = TimeStamp() + %CHECK_BACK_SECS%
RunAt( ReRun, %ON_AC_POWER_DAEMON% )
Sleep 100
#
# set another new notify
ReRun = TimeStamp() + 5
RunAt( ReRun, %TURN_OFF% )
#
#
Else
#
# call our application (script)
RunWait( %ON_AC_POWER_RESUME% )
#
#
EndIf
#
#
Exit
# ON_AC_POWER_RESUME.mscr
#
# jwoegerbauer 09/04/2009
# GNU General Public License (GPL), Version 2, June 1991
#
#
#
# NO ERROR CHECKING IS DONE !!!
#
ErrorLevel("off")
#
# Before using this script ensure file PowerNotifyFlags.ini
# is present and contains the following lines:
#
# [PowerOnOff]
# ACPower=1/0
#
Local()
#
#
# adjust to your needs
Set PLAY_SOUND, 1
Set WAV_FILE, "\My Flash Disk\programme\TroNikPowerNotifier\chime_up.wav"
Sleep 50
#
# prevent ourselves from doing things more than once
If (ExternalPowered())
#
#
If (%PLAY_SOUND% )
PlaySound( %WAV_FILE% )
EndIf
#
#
Set INI, "\My Flash Disk\programme\TroNikPowerNotifier\PowerNotifyFlags.ini"
Set INI_SECTION, "PowerOnOff"
Set INI_KEY, "ACPower"
Sleep 100
#
# Read PowerFlag value
ACPower = IniRead( %INI%, %INI_SECTION%, %INI_KEY% )
#
#
If(0 = ACPower)
#
# set ACPower=1 (ON)
IniWrite( %INI%, %INI_SECTION%, %INI_KEY%, "1" )
Sleep 100
#
#
EndIf
#
#
EndIf
#
#
Exit
THX in advance
get dotfred's taskmanager here and check if your event gets installed.
your script seems to be very complex anyway. what do want to achieve?
@egoist6
Thanks for the advise: i'll test the TaskMgr you told me - hopely it runs
on Windows CE 5.0 Core too.
The goal of my scripts is to turn my PND into sleep mode when AC power
is gone off, and wake the device up when AC power is re-supplied.
[ Vielleicht treffen wir uns zufällig unbekannterweise auf der Wies'n? ]
jwoegerbauer said:
@egoist6
Thanks for the advise: i'll test the TaskMgr you told me - hopely it runs
on Windows CE 5.0 Core too.
The goal of my scripts is to turn my PND into sleep mode when AC power
is gone off, and wake the device up when AC power is re-supplied.
[ Vielleicht treffen wir uns zufällig unbekannterweise auf der Wies'n? ]
Click to expand...
Click to collapse
what is pnd?
the script should turn the device off when device runs on battery and goes below a specific bettery percentage level?
regarding wakup the device:
doesn't your device automatically wake up when acpowered?
there should be a registry key available.
apart from that your script does not run when switched off at least it runs for about 5 minutes after switching off, then the WM OS stops running apps.
[logisch - bin auf der wiesn - prosit!]
@egoist6 (and all people around the world)
PND is my abbreviation for PersonalNavigationDevice, sometimes also referred to as PNA i.e. PersonalNavigationAssistant.
The 3-scripts-package should turn the device off, regardless to current battery state or current registry settings ( and
without the need of pressing the power-button ), and reverse. All should be accomplished by software in reason for commodity.
All seems to work well, but the first time the device wakes up the display is turned on too, even when no external AC power is
supplied.
The debug-version of the scripts-package summarizes the actions performed as follows:
1253358425 ON_AC_POWER_LOSS entered
1253358427 ON_AC_POWER_DAEMON started
1253358427 ON_AC_POWER_LOSS exited
1253358533 ON_AC_POWER_DAEMON entered
1253358534 External power supply detected
1253358534 ON_AC_POWER_RESUME started
1253358534 ON_AC_POWER_RESUME entered
1253358535 ON_AC_POWER_RESUME exited
1253358536 ON_AC_POWER_DAEMON exited
Hence it's obvious that in script ON_AC_POWER_DAEMON in branch
If (NOT ExternalPowered())
...
Else
the instruction
# turn device again into standby
Run( %TURN_OFF% )
never will be executed - and that's my question: WHY NOT?
---------------------
BTW: dotfred's taskmanager isn't Windows CE 5.0 Core compatible.
try with longer delay between adding those two notification events.
maybe the second events does not get installed.
Dear jwoegerbauer,
Thank you very much for your inspiration. I have been trying to find a not so difficult way to implement a similar solution in my PND. After seeing your work, it seems Mortscript would be a wonderful solution.
I usually run IGO8 on my PND and IGO8 has a built-in Standby function when external power off. Hence, I am more interested in the "external power on resume" part of your script. Just wondering whether I can run "ON_AC_POWER_DAEMON" and "ON_AC_POWER_RESUME" independently from "ON_AC_POWER_LOSS".
In addition, there is some mentioning of
1 POWERNOTIFIER_PROMPT.mscr
2 Sleep.exe
3 ToggleDisplay.exe
in your scripts. I did several Google search, but cannot find any source of those executables. Is it possible to pack a full working version (include all the scripts and executables used) for me to try and appreciate your amazing work please?
Thanks in advance.
http://www.mediafire.com/file/jodzwgn5tnc/ON_AC_POWER_TEST.zip
Many thanks for sharing the package. I have further modified them to make the DAEMON running continuously. The scripts will now perform as follows:
Ask the user whether they want to activate this Auto Power On feature.
If yes
The device goes to Sleep when no external power applies; and
The DAEMON will keep searching until external power detected and
Wake up the device
p.s. to exit from the loop, I use the Power Button to turn off and restart the device.
Code:
# ON_AC_POWER_MENU.mscr
# Implemented on MortScript (www.sto-helit.de)
# 2009-12-07
# Karako
# GNU General Public License (GPL), Version 2, June 1991
ErrorLevel("off")
Local()
Set ON_AC_POWER_DAEMON, "\SDMMC\ON_AC_POWER\ON_AC_POWER_DAEMON.exe"
Set RUN_APP, "\SDMMC\igo8\igo8.exe"
Set LOOP_SECS, 11
options[1] = "Skip Auto On/Off"
options[2] = " "
options[3] = "Engage Auto On/Off"
Sleep 100
SetChoiceEntryFormat(20, 16, "Verdana")
Choice("Auto_On_Off_Option", \
"^NL^AC Power Auto On/Off^NL^Choose whether you want the GPS device to be^NL^automatically fired up when External Power is supplied^NL^^NL^", \
options)
Case( 1 )
# do nothing
#
Case( 2 )
# do nothing
#
Case( 3 )
# kill old notification(s) to prevent overlap
RemoveNotifications( %ON_AC_POWER_DAEMON% )
Sleep 100
# run application
Run( %RUN_APP% )
# Wait for APP finish loading
Sleep 45000
ReRun = TimeStamp() + %LOOP_SECS%
RunAt( ReRun, %ON_AC_POWER_DAEMON% )
Sleep 100
Exit
EndChoice
# kill old notification(s) to disable this function
RemoveNotifications( %ON_AC_POWER_DAEMON% )
Sleep 100
Run( %RUN_APP% )
Exit
# ON_AC_POWER_DAEMON.mscr
# Implemented on MortScript (www.sto-helit.de)
# based on the script from jwoegerbauer 09/04/2009
# GNU General Public License (GPL), Version 2, June 1991
# modified by Karako 2009-12-07
ErrorLevel("off")
Local()
# adjust to your needs (must > 10 seconds !!!!)
Set LOOP_SECS, 11
Set ON_AC_POWER_DAEMON, "\SDMMC\ON_AC_POWER\ON_AC_POWER_DAEMON.exe"
Set ON_AC_POWER_RESUME, "\SDMMC\ON_AC_POWER\ON_AC_POWER_RESUME.exe"
Set TURN_OFF, "\SDMMC\ON_AC_POWER\Sleep.exe"
Sleep 300
# kill old notification(s) to prevent overlap
RemoveNotifications( %ON_AC_POWER_DAEMON% )
Sleep 500
# check AC power line state
If( NOT ExternalPowered() )
# set new notification queue
ReRun = TimeStamp() + %LOOP_SECS%
RunAt( ReRun, %ON_AC_POWER_DAEMON% )
Sleep 100
# turn device again into standby
Run( %TURN_OFF% )
Else
# call resume script
RunWait( %ON_AC_POWER_RESUME% )
Sleep 1500
EndIf
Exit
# ON_AC_POWER_RESUME.mscr
# Implemented on MortScript (www.sto-helit.de)
# based on the script from jwoegerbauer 09/04/2009
# GNU General Public License (GPL), Version 2, June 1991
# modified by Karako 2009-12-07
ErrorLevel("off")
Local()
# adjust to your needs ( must > 10 secs)
Set LOOP_SECS, 11
Set ON_AC_POWER_DAEMON, "\SDMMC\ON_AC_POWER\ON_AC_POWER_DAEMON.exe"
Set PLAY_SOUND, 0
Set WAV_FILE, "\SDMMC\ON_AC_POWER\notify.wav"
Sleep 100
If (ExternalPowered())
If (%PLAY_SOUND% )
PlaySound( %WAV_FILE% )
EndIf
# set new notification queue
ReRun = TimeStamp() + %LOOP_SECS%
RunAt( ReRun, %ON_AC_POWER_DAEMON% )
Sleep 100
#
EndIf
Exit
However, I experienced the same problem that the display will turn on and off itself for about 1 to 2 seconds in every cycle (about 10 seconds in my settings) when external power is not attached.
Is it possible to do a Registry tweak to force the display off when the device just wakes up by the Daemon to check for external power please?
I am thinking Registry keys like
HKLM\SYSTEM\CurrentControlSet\Control\Power\State\BacklightOff
or
HKLM\SYSTEM\CurrentControlSet\Control\Power\State\ScreenOff
Since I seldom work with Registry, really appreciate for anybody's guidance and hints.
@karako,
First of all you got the logic! You experienced the same inadequacies as me.
Secondly here's why I startet the project: For reason of comfort (when in car) I wanted to have my PND automatically put into sleep mode, when external power supply is lost, and in reverse put back again into active mode if external power is re-supplied, all this without the need to press the device's power button and regardless to device's power settings. Hence I didn't implement a menu.
Hope with you things will get working!
Hi jwoegerbauer,
Further research on the subject and review again deeply on your previous advice and work, gives me a strong feeling that the CeRunAtEvent could be a much better and straight forward approach in terms of power management.
Then I found this interesting article with sample codes:
http://www.codeproject.com/KB/mobil...&noise=3&sort=Position&view=Quick&fr=26#xx0xx
Unfortunately, when I execute the sample program (WakeUpStart.exe) in my WinCE 5.0 PND (Compact Framework 2.0 installed) and Windows Mobile 5.0 PDA phone (Compact Framework 3.5 installed), both experienced the same problem - the ACCEPT button doesn't work in the program and hence I cannot execute it.
The program was written in C#, a new language for me. I will try to trace the problem, but without Visual Studio IDE, I am afraid I can hardly debug it myself.
Let's see if anybody would be interested to carry on from here.
Oops. Apparently, some experts had already found that:
- ... not every event can be handled with CeRunAppAtEvent
- ... I assume it is OEM related and the implementation of these events is not mandatory
- ... did try to use ON_AC_POWER and it did not work
above extracted from the thread: http://forum.xda-developers.com/showthread.php?t=558152
This takes us back to the "check the PowerStatus structure for ON AC POWER" approach.
@karako,
there is a (freeware) tool for observing and fixing notification event queue on Windows Smartphone and Windows PocketPC devices: HooverNI.
http://code.google.com/p/hoover-ni/
Hope this hint will be useful for you.
any news on this issue? i am considering changing my GPS. and i think of WIN CE device. only thing that bothers me is automatic turn on and off with car ignition.
Hi, did anyone figure this one out? I have pocket navi with Windows CE 6 and the last script on 1st page works perfectly .. but only in Windows desktop, when I change to GPS overlay it doesnt work anymore, how can I make it work?

How to reconstruct a binary identical I9000XWJP6 kernel image, and more

The idea of this exercise is (at least) to get a stable starting point for kernel development. The thing which is currently missing is a proper working .config. I have reconstructed it using differential analysis and in the process hoped to find which components have actually been activated and to uncover changes (or Easter eggs) in the sources which have not been advertised. Having a working and identical I9000XWJP6 kernel also means that open development can continue from the current official public release. From there the things possible are only limited by your imagination.
The following is a walk-through on how to build the kernel, description of pitfalls that will cause changes in .config to break, and some annotations on discoveries made in the process.
The things you need are:
Mandatory:
- I9000XWJP6 zImage : from your favorite location
- Source tree : opensource•samsung•com the GT-I9000 OpenSource Froyo Update JPM.zip
- Sourcery G++: www•codesourcery•com/sgpp/lite/arm/portal/release1039
- Tweak-Kit : <attached>
Optional:
- Arm enabled GCC and binutils, including a development libbfd.
- Lots of your favorite beverage
The md5sum of the zImage should be: 26e9d5d206baf1515144c6b8de6f10d2
It is critical that the Sourcery G++ version is 2009q3-67.
The Tweak-Kit contains the following components:
Readme.txt - You're reading it
mkvmlinux.cc - convert zImage to vmlinux and extract the init ramdisk image
I9000XWJP6_defconfig - default .config
stamp.patch - set date/time and such to original
style.patch - fix style related warnings
prototype.patch - fix prototype related warnings
error.patch - Recoverable errors
houston.patch - Unrecoverable errors
shadow.patch - Fixate data structures
I9000XWJP6.h - Fixated macros
I9000XWJP6.c - Entry point stubs
SOME THINGS I ENCOUNTERED IN THE PROCESS:
a) What I absolutely did not expect was that I found two different encodings of the build timestamp. I could deduce that the timezone was central Europe. I had the assumption it would be Asia or America.
b) What was to be expected is that the source tree is incomplete. The directories drivers/fsr and fs/rfs are missing. You can still compile the kernel as the missing files are used to build modules. Problems start when you change the config. Doing so will change entry points and data structures and your kernel might die a horrible death when it loads modules who are unaware on these changes. There is a workaround which I will explain later.
c) The weirdest thing I encountered were the functions enable_hlt() and disable_hlt(). The are located deep in the unwind tables, a section not intended for code. I spent many hours trying to figure out how they got there or why but I still have no clue. I found exactly only one way to reproduce this behaviour and it is certainly not due to a typo, accident or ignorance.
d) The kernel is not a production but a debug version. It has nearly all tracking/tracing/debug bells and whistles switched on. If the energy required to maintain the statistics where to emit light, you could use your Galaxy as a Christmas tree. Function profiling is enabled and has a considerable negative effect on performance, code is not optimized for size but speed, and unwind tables have been enabled which are not used. These have a really bad impact on footprint size. I really hope that the same compiler and settings are not used for the Android layer. Changing the config into a production version will not work (and crash) as the non-native modules expect the debugging hooks which will no longer exist. But the same workaround as above can be used.
e) The functionality of the power management domains have been optimized to oblivion due to the excessive placing of code disabling comments in large parts of the clock, power management and mach-aries.c. Maybe because the Galaxy hardware is too different than the evaluation boards, or the hardware is buggy and disabling the code makes it less unstable, or there was just not enough time to get the code working. Anyway, at this moment I have no oversight into what degree the absence of power domains influence battery usage.
f) When I started examining the binary code I was puzzled by snippets of code I could not reproduce. Even worse, I encountered snippets that were just questionable. Unusual instruction sequences, and resister usage. Thinking I bumped into a GCC bug, I started debugging the compiler and even tweaked instruction scheduling weights but with no satisfying outcome. I know that GCC is very stubborn with regard to saving and clobbering registers in/across function calls and the code I saw was just incorrect. I knew a different compiler was used and I suddenly realized that it may be more different than what first meets the eye. The culprit turned out to be Sourcery G++. It is a private maintained branch of GCC for reasons I have not investigated. Even the Sourcery assembler is tainted as it played a nasty trick on me with the enable_hlt/disable_hlt thing. I do not like the code I see and I am aiming into getting the sources stock GCC friendly with a working kernel. However, GCC and Sourcery generate code which seem difficult to mix, but I'm getting closer.
g) Compiler warnings. Many of the Samsung sources generate warnings, something I really dislike. In my opinion a warning is emitted for a piece of code which can be interpreted in several ways, leaving the compiler to choose which. Usually it will choose the wrong one. Most warnings were related to coding style shortcuts, a couple of incorrect function prototype resulting in functions that should return int to return random or falsely ignoring return values. There were also a couple of nasties like deference of uninitialized pointers, accessing out-of-bound data and mixing clock data-structures of different types. Included are a number of patches to fix them.
h) I looked deeper into why GCC and Sourcery won't mix and discovered that they have different implementations with regard to constant definition within enum declarations. Google points to the staring point "GCC bug 30260" where is written that the behaviour of enumeration constants has changed to becoming signed int. I have noticed that even explicit unsigned values will change to signed.
Here is an example of what is going wrong:
Take following declaration
Code:
enum rt_class_t { RT_TABLE_MAX=0xFFFFFFFF }
. GCC will consider RT_TABLE_MAX to be -1, and Sourcery will consider it 4294967295. Now, in net/ipv4/fib_rules.c there is this code snippet
Code:
for (u32 id = 1; id <= RT_TABLE_MAX; id++)
GCC will skip the loop, and Sourcery will have a hard time doing nothing.
There are more examples like calculating the location of physical memory or signed/unsigned comparisons. The compiler switches -fwrapv and -fstrict-overflow might influence things, but it general the behaviour is hardcoded and both compilers have a different flavour. I think it would be wiser to choose the GCC flavour as it is more widespread and thus better tested (and fixed).
i) GCC. I noticed that early versions of kernels compiled with GCC would not start. At first I thought it was because of Sourcery /GCC code generating differences. After a number of buxfixes (in error.patch) I suddenly noticed that the GCC kernel is working. My phone is running a GCC compiled production configured kernel for nearly a week.
j) "Houston, we've had a problem" with the light sensor. One of the compiler warnings brought me to the file drivers/sensor/optical/gp2a.c. There within are located two routines which read the light and proximity sensor. They seem copy-pasted identical, however the sensor value types are different as the proximity value is a char and the light intensity a double. What is more convenient than to simply change the data type of the supplied buffer in the function prototype. Now headache starts as the semantics of the read (and write) call say that the unit size is byte. So returning "1" indicates that only the first byte of the sensor value is copied. Also, there is no bounds/access checking so supplying an invalid pointer to the call will crash the kernel. So, assuming this is all one big mistake, I redesigned the function to do better (see houston.patch) and built a new kernel with it. To my utter surprise my battery charge extended from <24 hours to 2 days and 20 hours.
However... I also noticed that my backlight intensity level was constant at it's lowest although the setting was set to auto. I needed to know how the caller invokes the call, but after an extensive search of internet and android sources it is still something I have not found. Heuristics show that the reading the light sensor is called with a buffer length of 1, and the returned value is only accepted when returning a 1 and that the sensor value type is a double (8 bytes). This is wrong: read() semantics require that you supply a length of 8, and expect a return value of 8. This may be the base of many light sensor issues I found when Googling.
Anyway, I returned the code to it's original faulty behaviour, and being illuminated I disabled the auto backlight intensity and changed it to it's lowest setting to enjoy a longer life between battery charges.
TO CREATE YOUR KERNEL:
1) Prepare a working environment
1a) Unpack Sourcery G++. No installation needed, unpacking is sufficient
1b) Unpack the Samsung sources and cd to the location of the top-level Makefile.
1c) Unpack the zImage and the contents of the Tweak-Kit to the same location
1d) Make sure the zImage is called zImage.I9000XWJP6
2) The ramdisk image is required and can be extracted from zImage.I9000XWJP6
2a) Create an uncompressed image Image.I9000XWJP6
Code:
gcc scripts/binoffset.c -o scripts/binoffset
ofs=`scripts/binoffset zImage.I9000XWJP6 0x1f 0x8b 0x08 0x00 2>/dev/null`
dd ibs=$ofs skip=1 <zImage.I9000XWJP6 | gzip -c -d >Image.I9000XWJP6
2b) The Tweak-Kit includes mkvmlinux which converts the uncompressed binary image into a bfd object. You need an Arm enabled libbfd to get it working. This does not get installed by default so you need to deeplink into binutils. mkvmlinux locates and decodes the kallsym data and econstructs the symbol table. It then uses the values of __initramfs_start/end to extract the initramfs. If you are not bothered with the hassle, just use dd with hardcoded values.
Code:
g++ mkvmlinux.cc -o mkvmlinux -lbfd -liberty -lz [-I and -L that deeplink into binutils]
./mkvmlinux Image.I9000XWJP6 vmlinux.I9000XWJP6 -r initramfs.cpio
or
Code:
dd if=Image.I9000XWJP6 of=initramfs.cpio bs=1 count=2739712 skip=165568
3) Patch date/time and other environmental issues to the moment of original creation
Code:
patch -p1 <stamp.patch
4) Make your computer happy
Code:
# edit Makefile line 184 and update the macro CROSS_COMPILE=
cp I9000XWJP6_defconfig arch/arm/configs/I9000XWJP6_defconfig
make I9000XWJP6_defconfig
make
5) Verify that the kernel is identical
Code:
diff zImage.I9000XWJP6 arch/arm/boot/zImage
AND NOW FOR SOMETHING COMPLETELY DIFFERENT...
Tweaking the configuration will build you a new kernel but when your Galaxy powers on it will either die silently (hang) or experience a horrible death (reboot). The problem is that there are modules built from sources located in the removed directories drivers/fsr and fs/rfs. These modules were compiled with a specific data structure layout and entry points. These will surely change when re-configuring. The way to keep the non-native modules happy is to keep the structures and entry points intact.
The structure layout is influenced by the CONFIG_ macros. The structures can be fixed to reflect the state of the I9000XWJP6 kernel by replacing the CONFIG_ macro's by something that does not change after reconfiguration. For that I use a collection of 'shadow' macro's which have SHADOW_ as prefix. Because the data structures cannot expand, you cannot (easily) enable configure functionality which require extra fields in the data structures. Reducing functionality is highly seldom a problem.
If changing kernel functionality results in removal of entry points, then stubs are required for those entry points needed by the non-native modules
There are automated methods to verify that a new kernel abides to the above constraints. For the data structures the compiler must generate gstabs debug information. This is human readable and includes detailed structure descriptions. This information should be identical across re-configuration. However, the scripts get confused by anonymous structs which are by product of "typedef struct {" constructions. These need to be named, something shadow.patch also does.
The kernel modules have easily-readable symbol tables containing needed kernel entry points. These should all be present in all re-configured kernels. Validation tests that fail emit enough information to further fix data structures and entry points. The Tweak-Kit contains two files: I9000XWJP6.h containing the SHADOW_ macro's and I9000XWJP6.c for the stubs. Both were constructed in an on-demand basis for the reconfiguration I am currently using and both serve as good examples on what to do when validation fails.
Before reconfiguring, rebuild the kernel for usage as a validation checkpoint.
1) Undo the timestamp patches
Code:
patch -R -p1 <stamp.patch
2) Fix the warnings
Code:
patch -p1 <style.patch # style related issues
patch -p1 <prototype.patch # prototype related issues
patch -p1 <error.patch # bug fixing
3) Apply datastructure fixation, entrypoint stubbing and Makefile tweaking
Code:
patch -p1 <shadow.patch
cp I9000XWJP6.c arch/arm/plat-samsung
4) Before recompiling everything, you need to issue "make clean" first. However, the missing directories will now pose a problem as "make clean" will include their Makefiles and will fail if it can't. Just create empties to keep the build happy.
Code:
mkdir -p drivers/fsr fs/rfs
touch drivers/fsr/Makefile fs/rfs/Makefile
5) Optionally change the Makefile to point to your favorite compiler/toolchain. Please note that I am using GCC 4.4.5. GCC 4.5.1 is bumping into problems I haven't looked into yet.
Code:
# edit Makefile line 184 and update the macro CROSS_COMPILE
6) This build will generate gstab debug information. Unexpectingly, this might bite when combined with function profiling, so disable that. But do not CONFIG_FUNCTION_TRACER yet as that does more.
Code:
# edit Makefile line 553, disable the line containing KBUILD_CFLAGS += -pg
7) Unpack the initramfs image. The directory /lib/modules needs to be examined/updated
Code:
mkdir initramfs.dir
cd initramfs.dir
cpio -i --make-directories --preserve-modification-time --no-absolute-filenames <../initramfs.cpio
cd ..
8) Repack initfs as a tarball, as make clean will erase all the modules
Code:
tar cf initramfs.tar initramfs.dir
9) The initramfs image will contain new kernel modules. Make sure a new version will get generated.
Code:
# in .config line 80 point to the unpacked initram location
CONFIG_INITRAMFS_SOURCE="initramfs.dir"
# in .config lines 86-89, select your favourite compression
CONFIG_INITRAMFS_COMPRESSION_NONE=N
CONFIG_INITRAMFS_COMPRESSION_GZIP=Y
10) Build a new kernel
Code:
# not cleaning will confuse the verification
make clean
make CONFIG_DEBUG_INFO=y
# install the modules
tar xf initramfs.tar
cp `find drivers -name '*.ko'` initramfs.dir/lib/modules
# rebuild with a fresh new ramdisk image
rm usr/initramfs_data.cpio*
make CONFIG_DEBUG_INFO=y
11) Checkpoint structure/entrypoint information. This is architecture independent.
Code:
# extract structures. They are the entries with :T
objdump -G vmlinux | awk '{ print $7 }' | grep :T | sed 's/([^)]*)/()/g' | sed 's/=\*()//g' | sort -u > gstabs.ckp
# extract the entrypoints
nm vmlinux | grep 'r __ksymtab_' | awk '{ print $3 }' | sort > ksymtab.ckp
12) Do a test-run. Pack zImage and flash with Odin. If your Galaxy is up and running, I strongly suggest you make a backup of your environment. If you later change something and it breaks, then this is the best place to restart.
Code:
cp arch/arm/boot/zImage .
tar cf I9000XWJP6-2.6.32.9-test.tar zImage
13) Make your re-configuration. I really suggest you do not make too many changes in one go because it gives more work when the structure/entrypoint verification fails.
Code:
# re-configure. For this exercise, change the kernel to a more production version
CONFIG_CC_OPTIMIZE_FOR_SIZE=Y
CONFIG_DM_DEBUG=N
CONFIG_S3C_KEYPAD_DEBUG=N
CONFIG_DEBUG_FS=N
CONFIG_DEBUG_KERNEL=N
CONFIG_LATENCYTOP=N
CONFIG_FTRACE=N
CONFIG_ARM_UNWIND=N
CONFIG_DEBUG_USER=N
14) Build a new kernel
Code:
# not cleaning will confuse the verification
make clean
make CONFIG_DEBUG_INFO=y
# install the modules
tar xf initramfs.tar
cp `find drivers -name '*.ko'` initramfs.dir/lib/modules
# rebuild with a fresh new ramdisk image
rm usr/initramfs_data.cpio*
make CONFIG_DEBUG_INFO=y
You get "struct has no member named" errors if you have enabled subsystems that require data structures to change which are incompatible with the non-native modules.
15) Verify structure/entrypoint checkpoint
Code:
# extract/verify structures
objdump -G vmlinux | awk '{ print $7 }' | grep :T | sed 's/([^)]*)/()/g' | sed 's/=\*()//g' | sort -u > gstabs.t
# new/changed structures are tagged with '+'. Display only the changed ones
diff -U0 gstabs.ckp gstabs.t | grep '+' | grep ':T' | sed 's/+//' | sed 's/:T.*/:T/' | while read s; do
grep -q "$s" gstabs.ckp
if [ $? -eq 0 ]; then
echo $s;
fi
done
# extract/verify entrypoints
nm vmlinux | grep 'r __ksymtab_' | awk '{ print $3 }' | sort >ksymtab.t
# extract all entrypoints needed by the modules
nm `find initramfs.dir/ -name '*.ko'` >allkosym
# some symbols are referenced in other modules. Cross-reference and remove from list
grep ' U ' allkosym | sort -u | awk '{ print $2 }' | while read s; do
if ! egrep -q "^[0-9a-f]* . $s\$" allkosym; then
echo $s;
fi
done > allusym
# check that kernel has entrypoints for all final undefined symbols
cat allusym | while read s; do
if ! egrep -q "^__ksymtab_$s\$" ksymtab.t; then
echo $s;
fi
done
Both scripts will generate output if you have enabled subsystems that require datastructures to change. These do not necessarily have to be data structures needed by non-native modules. However, missing entrypoints are those used by the modules. If it's about datastructures, your best chance is to lookup the data type and see if there any #ifdef CONFIG_ macros that need to be changed into #ifdef SHADOW_. If it's a missing entry point, you need to add a stub in I9000XWJP6.c.
16) Do a test-run. Pack zImage and flash with Odin.
Code:
cp arch/arm/boot/zImage .
tar cf I9000XWJP6-2.6.32.9-test.tar zImage
17) If you want more, jump to step 13
18) When you are really done, rebuild a final and fresh kernel and initramfs image with debugging stuff removed. The -gstabs compiler switch slightly influences code generation.
Code:
# not cleaning will confuse the verification
make clean
make
# install the modules
tar xf initramfs.tar
cp `find drivers -name '*.ko'` initramfs.dir/lib/modules
# rebuild with a fresh new ramdisk image
rm usr/initramfs_data.cpio*
make
My uncompressed image has now shrunk from 14700623 to 11822559 bytes.
Happy Hacking...
[...and now to find a better workaround for those non-native modules.]
WoW, Nice work !! very good info for beginners like me
thx a lot for this tut and i've learnt a lot
btw, seems there r some typos or something is missing. i did it with (XXJPO):
Hexabit said:
make I9000XWJP6_defconfig
Click to expand...
Click to collapse
make defconfig I9000XWJP6_defconfig
- modified include/linux/a.out.h by removing the 2nd def for SEGMENT
- changed the boolean to lowercase for .config
PS i use the cpio extracted by myself coz i couldnt enable libbfd on my ubuntu x64
Good tips. Thanks.
Really insightful i hope the dev take all the tweaks into consideration and make a new optimized kernel
good job here!
I think it's the most amazing first post ever! It should be sticked or kept somewhere safe.
Awesome first post. Will have to work through this.
Great post with very interesting findings!
I'm no expert, so maybe my question is a bit silly:
Is Samsung's published code just a buggy and incomplete pre-release debug version? Then how can e.g. Voodoo get a good working kernel?
Or is the official firmware really built of this, so possibly full of strange bugs and missing optimizations?

init.d performance startup script

I've adapted the original performance tweaks by 'hardcore' @ XDA for my overclocked/undervolted Galaxy Tab. The tweaked values are pretty much the same as the ones recommended by the original poster, but my simple init.d/ script allows me to log default system values when pushing new values, which is useful for debugging. The script also contains comments to describe the role of each setting. Note that if you don't have init.d/ support in your kernel / initramfs, you can still run the script manually at each system start (use an app like GScript).
Code:
#!/system/bin/sh
#
# Original tweaks by 'hardcore' @ XDA
# http://forum.xda-developers.com/showthread.php?t=813309
# This is a startup script designed for /system/etc/init.d/.
# Note that "run-parts" support (for init.d/ scripts) is normally provided by custom a initramfs,
# which should bundle busybox in /sbin/. The /sbin/run-parts.sh script should take care of
# running init scripts (by calling /sbin/runparts), and it should subsequently trigger
# the device startup (using "setprop filesystem.ready 1", or similar).
# Note that the recovery mode typically doesn't run /system/etc/init.d/ startup scripts.
# Ensure /sbin/busybox takes precedence.
# Normally this is redundant, because the /init.rc startup script already sets the correct path.
export PATH=/sbin:$PATH
# Logging of old/new sysfs values, useful for double-checking.
logFile=/data/local/tmp/S_perf_tweaks.log
if [ -f $logFile ]
then
rm $logFile
fi
touch $logFile
# This function logs the old value and writes the new value.
echo_()
{
echo '' >> $logFile
echo -n "${2}${3} (${1}): " >> $logFile
#head -1 ${2}${3} >> $logFile
#read $firstLine < ${2}${3}
#echo -n $firstLine >> $logFile
contents=`echo -n $(cat ${2}${3})`
echo -n $contents >> $logFile
echo -n " ---> " >> $logFile
echo $1 > ${2}${3}
contents=`echo -n $(cat ${2}${3})`
echo -n $contents >> $logFile
}
# Note that the settings pushed by VoltageControl.apk
# could also be managed here (this only applies to kernels with clock/frequency tables and undervolt sysfs support):
#echo_ "50 50 50 25 25 25 25 " "/sys/devices/system/cpu/cpu0/cpufreq" "/UV_mV_table"
#echo_ 1400000 "/sys/devices/system/cpu/cpu0/cpufreq" "/scaling_max_freq"
echo "---------" >> $logFile
# Remount all partitions that use relatime with noatime and nodiratime instead.
# Note: atime generates a write-after-every-read, relatime is an optimized version of atime.
for k in $(mount | grep relatime | cut -d " " -f3)
do
echo "mount -o remount,noatime,nodiratime $k" >> $logFile
sync
mount -o remount,noatime $k
done
# Here is a sample test to measure read/write performance on rfs partitions:
### test for write: dd if=/dev/zero of=/data/test count=30000
### test for read: dd if=/data/test of=/dev/zero
echo "---------" >> $logFile
# Log the mount table
mount >> $logFile
echo "---------" >> $logFile
# Optimize the cfq/bfq I/O scheduler for flash memory (defaults are designed for spinning harddisks).
# Lower the idle wait, re-enable the low latency mode, remove the penalty for back-seeks,
# and explicitly tell the kernel that the storage is not a spinning disk.
for i in $(ls -1 /sys/block/stl*) $(ls -1 /sys/block/mmc*) $(ls -1 /sys/block/bml*) $(ls -1 -d /sys/block/tfsr*)
#for i in `ls /sys/block/stl* /sys/block/mmc* /sys/block/bml* /sys/block/tfsr*`;
do
# DEF noop anticipatory deadline cfq [bfq]
echo_ "bfq" $i "/queue/scheduler"
# DEF 1 ?
echo_ "0" $i "/queue/rotational"
# DEF 1 ?
echo_ "1" $i "/queue/iosched/low_latency"
# DEF 2 ?
echo_ "1" $i "/queue/iosched/back_seek_penalty"
# DEF 16384 ?
echo_ "1000000000" $i "/queue/iosched/back_seek_max"
# DEF 6 ?
echo_ "3" $i "/queue/iosched/slice_idle"
sync
done
# Set tendency of kernel to swap to minimum, since swap isn't used anyway.
# (swap = move portions of RAM data to disk partition or file, to free-up RAM)
# (a value of 0 means "do not swap unless out of free RAM", a value of 100 means "swap whenever possible")
# (the default is 60 which is okay for normal Linux installations)
# DEF 60
echo_ "0" "/proc/sys/vm" "/swappiness"
# Lower the amount of unwritten write cache to reduce lags when a huge write is required.
# DEF 20
echo_ "10" "/proc/sys/vm" "/dirty_ratio"
# Increase minimum free memory, in theory this should make the kernel less likely to suddenly run out of memory.
# DEF 3102
echo_ "4096" "/proc/sys/vm" "/min_free_kbytes"
# Increase tendency of kernel to keep block-cache to help with slower RFS filesystem.
# DEF 100
echo_ "1000" "/proc/sys/vm" "/vfs_cache_pressure"
# Increase the write flush timeouts to save some battery life.
# DEF 250
echo_ "2000" "/proc/sys/vm" "/dirty_writeback_centisecs"
# DEF 200
echo_ "1000" "/proc/sys/vm" "/dirty_expire_centisecs"
# Make the task scheduler more 'fair' when multiple tasks are running,
# which improves user-interface and application responsiveness.
# DEF 10000000
echo_ "20000000" "/proc/sys/kernel" "/sched_latency_ns"
# DEF 2000000
echo_ "2000000" "/proc/sys/kernel" "/sched_wakeup_granularity_ns"
# DEF 1000000
echo_ "1000000" "/proc/sys/kernel" "/sched_min_granularity_ns"
sync
# Miscellaneous tweaks
setprop dalvik.vm.startheapsize 8m
#setprop wifi.supplicant_scan_interval 90
echo '' >> $logFile
echo "---------" >> $logFile
#This apply a tweaked deadline scheduler to all RFS (and ext2/3/4, if existent) partitions.
#for i in /sys/block/*
#do
# DEF noop anticipatory deadline cfq [bfq]
#echo deadline > $i/queue/scheduler
#echo 4 > $i/queue/iosched/writes_starved
#echo 1 > $i/queue/iosched/fifo_batch
#echo 256 > $i/queue/nr_requests
#done
Thanks for this Daniel - since I know absolutely nothing about anything Android, all I can say is that I have 2 questions
1 - Would this script be any benefit to someone running a custom ROM (Overcome 1.1.3 in my case) and a custom kernel (Richard Trip's 1.4gHz EXT4)? I ask because I don't know if these guys have already including these tweaks or not... but maybe I should ask them instead...
2 - Is there any way you could put that script - in its most efficient, non-debugging form - in to a script file that us speed-freaks can just toss in to init.d and reboot?
Please do forgive me for any newbishness I have displayed here.
So should I put this script in /system/etc/init.d/ ?
UPDATE: Ok, I've done the script(without extension at the back of the file name) and put it in ~/init.d/, it runs well. I comment out the remount and logging function tho Tested it on some games that required load time like gangstar which lags alot previously, now just dnt have any lag time in it! Thanks!
Anyway, im running Overcome rom with richard's kernel, other than voltage script, i saw 2 more script that does the following:
10fixsh does:
"#!/system/bin/sh
busybox mount -o remount,rw /
find /sbin -maxdepth 1 -type l -exec rm {} \;
busybox mount -o remount,ro /
"
99done does:
"#!/system/bin/sh
sync;
setprop mcr.filesystem.ready 1;
"
So I just add your script as userinit since they do not have conflicting calls
Personally thinks that similar tweaks should be included in custom kernels so that those who wish to do more extreme settings can go with it while those who just wants increased performance as it is can still have the boost provided by such init script.
fastcx said:
Personally thinks that similar tweaks should be included in custom kernels so that those who wish to do more extreme settings can go with it while those who just wants increased performance as it is can still have the boost provided by such init script.
Click to expand...
Click to collapse
so basically just copy and paste the whole "code" in the first post, and create it as userinit.sh and put the userinit.sh file in /system/etc/init.d ?
am i right?
kay_kiat88 said:
so basically just copy and paste the whole "code" in the first post, and create it as userinit.sh and put the userinit.sh file in /system/etc/init.d ?
am i right?
Click to expand...
Click to collapse
still need more time to test, after some verification, none of the "/proc/sys/kernel" setting works with any of the kernel i'm using. thats y i need more time to rectify..
used richard's kernel and overcome kernel, both dont do anything now..perhaps wrong command in the script? Cause run-parts.sh does specify where to run script, and init.d does have 2 script in there that runs. So i'll need more time to make sure it works now..
Dont need to have .sh as extension, just a name for your script like the other 2 script that i posted in previous reply. And I did not copy the whole script to run, as the script seems questionable in some part..
fastcx said:
still need more time to test, after some verification, none of the "/proc/sys/kernel" setting works with any of the kernel i'm using. thats y i need more time to rectify..
used richard's kernel and overcome kernel, both dont do anything now..perhaps wrong command in the script? Cause run-parts.sh does specify where to run script, and init.d does have 2 script in there that runs. So i'll need more time to make sure it works now..
Dont need to have .sh as extension, just a name for your script like the other 2 script that i posted in previous reply. And I did not copy the whole script to run, as the script seems questionable in some part..
Click to expand...
Click to collapse
okay.. so basically just copy everything under the "code" and create it as userinit?
edit: hmmm okay thanks for you help. i don't think it's of any use for me now as my tab is quite fast and i don't do any intensive stuff on it. thanks anyway!
kay_kiat88 said:
okay.. so basically just copy everything under the "code" and create it as userinit?
edit: hmmm okay thanks for you help. i don't think it's of any use for me now as my tab is quite fast and i don't do any intensive stuff on it. thanks anyway!
Click to expand...
Click to collapse
Now i'm editing init.rc file instead, but it's not the safest thing to do
Wow all the best.. lol.
Sent from my GT-P1000 using Tapatalk
fastcx said:
Now i'm editing init.rc file instead, but it's not the safest thing to do
Click to expand...
Click to collapse
The init.rc file gets extracted from the initramfs ramdisc (packaged inside the zImage kernel) at each device startup. Changing this file's content is not a good idea. Regards, Dan
fastcx said:
So should I put this script in /system/etc/init.d/ ?
UPDATE: Ok, I've done the script(without extension at the back of the file name) and put it in ~/init.d/, it runs well.
Click to expand...
Click to collapse
Yes, the filename of the startup script must start with "S_" and must not end with ".sh". This is standard Linux stuff.
fastcx said:
find /sbin -maxdepth 1 -type l -exec rm {}
Click to expand...
Click to collapse
Removing the symlinks from "/sbin/" ... why ?
Normally Busybox should be installed properly in "/sbin/" by your kernel provider, you shouldn't have to touch this folder.
fastcx said:
99done does:
"#!/system/bin/sh
sync;
setprop mcr.filesystem.ready 1;
"
Click to expand...
Click to collapse
The "mcr.filesystem.ready" is only relevant if the "init.rc" file in the kernel zImage's initramfs ramdisc responds to a change to the "mcr.filesystem.ready" property (for example, when its value changes from 0 to 1). This is typically used to start the device normally, after *all* of the "/system/etc/init.d/" startup scripts have been executed.
The line of code "setprop mcr.filesystem.ready 1" is therefore typically included in "/sbin/runparts.sh", not in one of the "S_startup_scripts" (as this may trigger the device normal startup prematurely).
It really depends on your kernel, so it should be documented by your kernel provider.
daniel.weck said:
Yes, the filename of the startup script must start with "S_" and must not end with ".sh". This is standard Linux stuff.
It really depends on your kernel, so it should be documented by your kernel provider.
Click to expand...
Click to collapse
Great! thanks for clarifying! Sadly none of the kernel provider states any info on such matter. Will try your script again, as previously running thru gscript not all command works..
Copied your script 100%, put it in init.d with chmod 755, named it S_userinit, doesnt run..i double checked by cat value that I stated to change in the script.
Help? It obviously runs the UV script in init.d tho.
EDIT: Got it to work by editing the UV script, now settings are in! Great! Time to test anyway, nodiratime is not needed, noatime already has it
So how can I use this script - I want to
Hi, Just connected to my galaxy tab running froyo, and went looking in my filesystem for the init.d folder and yeah there isn't one
do i create one? where? and what permissions?
I try to keep this brief and not waste too much of your time.
many thanks for the script
Ttime & effort ++
andytof46 said:
Hi, Just connected to my galaxy tab running froyo, and went looking in my filesystem for the init.d folder and yeah there isn't one
do i create one? where? and what permissions?
I try to keep this brief and not waste too much of your time.
many thanks for the script
Ttime & effort ++
Click to expand...
Click to collapse
you will need a kernel that support init script, after that, /etc/init.d(or /system/etc/init.d) will be created
fastcx said:
Copied your script 100%, put it in init.d with chmod 755, named it S_userinit, doesnt run..i double checked by cat value that I stated to change in the script.
Help? It obviously runs the UV script in init.d tho.
EDIT: Got it to work by editing the UV script, now settings are in! Great! Time to test anyway, nodiratime is not needed, noatime already has it
Click to expand...
Click to collapse
Don't suppose you could post a copy of your trimmed & tweaked version of Daniel's script for us to use?
Cuz I, for example, have no idea what's useful in the original script, and what's not useful. But I at least know how to edit the UV script, heh.
jeebspawnshop said:
Don't suppose you could post a copy of your trimmed & tweaked version of Daniel's script for us to use?
Cuz I, for example, have no idea what's useful in the original script, and what's not useful. But I at least know how to edit the UV script, heh.
Click to expand...
Click to collapse
LOL here it goes
Code:
#!/system/bin/sh
#set UV
echo "0 0 0 0 0 0 0 0 " > /sys/devices/system/cpu/cpu0/cpufreq/UV_mV_table
echo 1000000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
#select enabled states
echo "0 0 0 0 0 0 0 0 " > /sys/devices/system/cpu/cpu0/cpufreq/states_enabled_table
#set scheduler for stl, bml and mmc
for i in `ls /sys/block/stl*` /sys/block/bml* /sys/block/mmcblk*
do
echo "bfq" > $i/queue/scheduler
echo "0" > $i/queue/rotational
echo "1" > $i/queue/iosched/low_latency
echo "1" > $i/queue/iosched/back_seek_penalty
echo "1000000000" > $i/queue/iosched/back_seek_max
echo "3" > $i/queue/iosched/slice_idle
done
# Remount all partitions with noatime
for k in $(busybox mount | grep relatime | cut -d " " -f3)
do
sync
busybox mount -o remount,noatime $k
done
# Tweak kernel VM management
echo "0" > /proc/sys/vm/swappiness
echo "10" > /proc/sys/vm/dirty_ratio
echo "4096" > /proc/sys/vm/min_free_kbytes
# Tweak kernel scheduler, less aggressive settings
echo "18000000" > /proc/sys/kernel/sched_latency_ns
echo "3000000" > /proc/sys/kernel/sched_wakeup_granularity_ns
echo "1500000" > /proc/sys/kernel/sched_min_granularity_ns
# Misc tweaks for battery life
echo "2000" > /proc/sys/vm/dirty_writeback_centisecs
echo "1000" > /proc/sys/vm/dirty_expire_centisecs
# Miscellaneous tweaks
setprop dalvik.vm.startheapsize 8m
done
NOTE: If you change any settings in uv app, u'll revert S_volt_scheduler to ONLY UV settings, so It's recommended to edit your UV setting on this file instead of using uv app from now on if you wants to keep your other settings
Thanks dude!
I hit your Thanks Button too.
jeebspawnshop said:
Thanks dude!
I hit your Thanks Button too.
Click to expand...
Click to collapse
Thanks U should thanks the thread starter too U should just take it as reference, modify any that you feels ok, and perhaps post here as feedback on which makes things better, especially disc scheduler and task scheduler settings.
UPDATE: Made some changes to suggested value by daniel for "fairness", these setting really deals with multitasking better
echo "20000000" > /proc/sys/kernel/sched_latency_ns
echo "2000000" > /proc/sys/kernel/sched_wakeup_granularity_ns
echo "1000000" > /proc/sys/kernel/sched_min_granularity_ns
hey fastcx, i copied and pasted your script in the UV scheduler file in init.d but it seems that it's not working as the values don't apply. any ideas why?

A few tricks with stock ROM J510FN (Android 6.0.1)

Here are a few tricks that work with stock ROM and some apps I use. Maybe you find something you like to use too.
Little note on text here, sometimes you see " " (spaces) appear in text/code. They shouldn't be there. You will know when you see them. Ignore!
A very quick summary.
What type of values can you find/change in Android?
0) Linux sysclt values, use sysctl -a to list them (stored in /proc/sys/...)
1) Android properties, use getprop en setprop, you find them in /etc/build.prop
2) Android Settings databases, use settings list [system][global][secure] etc
3) Samsung CSC values, specific for Samsung to hide or show extra GUI elements in /system/csc/feature.xml or /etc/feauture_default.xml
4) Samsung Floating features, like above in /etc/floating_feature.xml
How to find them (1+3)?
- root your phone (install busybox on Android 4 or less)
- goto adb shell and su
- find /system -type f -exec strings -f {} \; | grep "persist\."
if you are looking for perstist. variables. Or to find CSC values use "CscFeature_"
Caveats: some "persist." values are stored in /data/property folder. Keep that in mind.
For some you need to change /system/build.prop, some are Samsung CSC features with the /system/csc/feauture.xml file or Android system settings db.
For some I cannot remember if it was already visible without tweaks. Anyway lets go
I put feature.xml (with a lot of nonworking csc features too!!!), build.prop and disabled_services.txt in attachement.
Reboot after putting new feature.xml in /system/csc folder. Permissions of the file: root.root 644, same for build.prop
If your Samsung ROM has no csc feature create /system/csc and put content in other.xml instead of feature.xml
Call Recording: <CscFeature_VoiceCall_ConfigRecording>RecordingAllowed</CscFeature_VoiceCall_ConfigRecording>
Call blocking: <CscFeature_Setting_EnableMenuBlockCallMsg>TRUE</CscFeature_Setting_EnableMenuBlockCallMsg>
Voice Recorder Quality: <CscFeature_VoiceRecorder_SupportRecordingQualitySetting>TRUE</CscFeature_VoiceRecorder_SupportRecordingQualitySetting>
Camera Shutter Sound:
build.prop ro.camera.sound.forced=0
<CscFeature_Camera_ShutterSoundMenu>TRUE</CscFeature_Camera_ShutterSoundMenu>
Data Usage on Quickpanel: <CscFeature_SystemUI_SupportDataUsageViewOnQuickPanel>TRUE</CscFeature_SystemUI_SupportDataUsageViewOnQuickPanel>
Multi Window: (sort of working, use recent apps button to see effect, landscape and portrait)
build.prop persist.sys.debug.multi_window=1 or setprop persist.sys.debug.multi_window 1
<CscFeature_Framework_ConfigMultiWindowTrayBarFunction>TRUE</CscFeature_Framework_ConfigMultiWindowTrayBarFunction>
Smart Manager:
<CscFeature_SmartManager_ConfigDashboard>dual_dashboard</CscFeature_SmartManager_ConfigDashboard>
<CscFeature_SmartManager_ConfigSubFeatures>autoclean|trafficmanager|trafficmanager_auto|storageclean|devicesecurity|autolaunch|cstyle|powerplanning</CscFeature_SmartManager_ConfigSubFeatures>
<CscFeature_SmartManager_DisableAntiMalware>TRUE</CscFeature_SmartManager_DisableAntiMalware>
ps: don't use "backgroundapp", it will FC RAM Management button
FM Radio Hybrid mode (inet) and EPG
Add support for Auto Follow and inet Hybryd support. Edit /etc/floating_feature.xml
<SEC_FLOATING_FEATURE_FMRADIO_REMOVE_AF_MENU>FALSE</SEC_FLOATING_FEATURE_FMRADIO_REMOVE_AF_MENU><SEC_FLOATING_FEATURE_FMRADIO_SUPPORT_HYBRID_RADIO>TRUE</SEC_FLOATING_FEATURE_FMRADIO_SUPPORT_HYBRID_RADIO>
<SEC_FLOATING_FEATURE_FMRADIO_SUPPORT_RDS>TRUE</SEC_FLOATING_FEATURE_FMRADIO_SUPPORT_RDS>
Smooth scroll of surface flinger
In /etc/floating_feature.xml
<SEC_FLOATING_FEATURE_FRAMEWORK_SUPPORT_SMOOTH_SCROLL>TRUE</SEC_FLOATING_FEATURE_FRAMEWORK_SUPPORT_SMOOTH_SCROLL>
Google installer overlay permission fix
For annoying overlay warning if using Lux for example (only for 6.0.1): here on xda
Apps that I use:
Xperia Keyboard: https://forum.xda-developers.com/android/apps-games/app-sony-xperia-keyboard-phones-t3346736
ZenUI Weather: http://www.apkmirror.com/apk/zenui-asus-computer-inc/
Samsung Apps: https://www.sammobile.com/apk/
Next Camera: https://forum.xda-developers.com/oneplus-one/themes-apps/app-cameranext-gallery-cm13-t3305917/page12
See attachement for comparisson Stock, Next and OpenCam.
Dalvik JIT for dex: build.prop: [size=+2]debug.usejit=true[/size]
adb commands: stop cd /data/dal*/arm rm * sync reboot
RIL wakelock optimalisation: build.prop: [size=+2]ro.ril.wake_lock_timeout=10000[/size]
Edit Quick Menu:
settings put secure sysui_qs_tiles "Wifi,Location,SilentMode,Flashlight,Bluetooth,MobileData,PowerSaving,UltraPowerSaving,RotationLock,AirplaneMode,DormantMode,WifiHotspot,Nfc,Sync,SFinder"
Tried to add SmartStay,MultiWindow,PersonalMode,AllShareCast but no tiles in Framework res.
I disabled a lot of bloatware using the pm disable command (too much for you I guess). Also in attachment.
Some hidden Activities you can find with QuickShortcutMaker (playstore):
- GPS Satellites (search for gps)
- SoundAlive Equalizer (search for alive) EDIT: not working for other than gmusic. SA will bypass for others. Need edit in SoundAlive apk.
Cheers
EDIT 19-01-2016: Added stock Camera from J7 which produces better quality picture.
Code:
- download SamsungCamera4_ESS_J7.apk
- adb push SamsungCamera4_ESS_J7.apk /sdcard/
- adb shell
- su
- mount -o remount,rw /system
- cd /system/priv-app/SamsungCamera4_ESS
- mv SamsungCamera4_ESS.apk SamsungCamera4_ESS.apk.J5
- mv oat oat.J5
- cp /sdcard/SamsungCamera4_ESS_J7.apk .
- chmod 644 SamsungCamera4_ESS_J7.apk
- stop
- sync
- reboot
After reboot start camera and clear settings first! Then do camera settings.
Remove Knox
To disable all Samsung Knox packages:
Code:
for p in $(pm list packages |grep nox) ; do echo $p | busybox awk -F ":" '{print $2}' | xargs pm disable ; done
pm disable com.samsung.klmsagent
pm disable com.policydm
To remove all Samsung Knox packages:
Code:
for p in $(pm list packages -f|grep nox) ; do echo $p | busybox awk -F "/" '{print "/"$2"/"$3"/"$4}' | xargs rm -r ; done
To remove all data from disabled packages:
Code:
for p in $(pm list packages -d) ; do echo $p | busybox awk -F ':' '{print "/data/data/" $2}' | xargs rm -r ; done
Disable Knox (hidden) services
Code:
stop
mv /system/container /system/container.OFF
rm /data/dal*/arm/*
sync
reboot
EDIT 09-02-2017: Added /etc/mixer-paths.xml for increased volume on speaker, headphone and handset speaker.
Finding the proper loudness values can be done from the shell command line with tinymix command.
example:
Code:
tinymix (see all audio objects)
tinymix "RX1 Digital Volume" (see all possible values for this audio object)
tinymix "RX1 Digital Volume" 86
Note that a value of 83 represents 0dB.
Some extra settings for system, global and secure db (/data/system/users/0/settings_system.xml etc)
Find yours with settings list system, global or secure. These settings are Android version (API23 in this case)
related. Beware of that when copying it from xda or anywhere else.
Code:
settings put system enable_mtp_settings 1
settings put system intelligent_sleep_mode 1
settings put system white_lockscreen_statusbar 0
#settings put system white_lockscreen_wallpaper 1
settings put system lockscreen_wallpaper_transparent 0 (1=hard to see statusbar)
settings put system adaptive_fast_charging 1
settings put system simple_status_bar 0
settings put system data_powersaving_mode 0
settings put system data_usage_on_lockscreen_sim1 1
settings put system min_minder 1
settings put system csc_pref_camera_quality_key 0
settings put system csc_pref_camera_videoquality_key 0
settings put system csc_pref_camera_burstshot_key 1
settings put system csc_pref_camera_autonightdetection_key 1
settings put system csc_pref_camera_forced_shuttersound_key 0
settings put global ble_scan_always_enabled 0
settings put global bluetooth_discoverable_timeout 120
settings put global wifi_watchdog_poor_network_test_enabled 0
settings put global wifi_scan_always_enabled 0 (0)
settings put global wifi_idle_ms 1800000 (def is 900000=15min)
settings put global wifi_suspend_optimizations_enabled 1
settings put global wifi_networks_available_notification_on 0
settings put global wifi_max_dhcp_retry_count 3
settings put global wifi_mobile_data_transition_wakelock_timeout_ms 5000
#settings put global heads_up_snooze_length_ms 2000
#settings delete global heads_up_snooze_length_ms
settings put global heads_up_notifications_enabled 1
settings put global low_power_back_data_off 1 (drop data conn if low pwr
settings put global low_power_trigger_level 5 (5% batt is low pwr)
settings put secure button_key_light 0
settings put secure long_press_timeout 300
settings put secure location_mode 2
#0 = LOCATION_MODE_OFF
#1 = LOCATION_MODE_SENSORS_ONLY
#2 = LOCATION_MODE_BATTERY_SAVING
#3 = LOCATION_MODE_HIGH_ACCURACY
PS: Don't quote this post. Is is considered useless and annoying.
PS2: more Samsung MM mods/tweaks can be found in this xda thread.
PS3: added meizu camera mod apk with very good image quality (Smaller version here https://forum.xda-developers.com/moto-g/themes-apps/camera-app-t3283962)
tweakradje said:
Here are a few tricks that work with stock ROM. For some you need to change /system/build.prop, some are Samsung CSC features with the /system/csc/feauture.xml file or Android system settings db.
For some I cannot remember if it was already visible without tweaks. Anyway lets go
I put feature.xml (with a lot of nonworking csc features too!!!), build.prop and disabled_services.txt in attachement.
Reboot after putting new feature.xml in /system/csc folder. Permissions of the file: root.root 644, same for build.prop
Call Recording: <CscFeature_VoiceCall_ConfigRecording>RecordingAllowed</CscFeature_VoiceCall_ConfigRecording>
Call blocking: <CscFeature_Setting_EnableMenuBlockCallMsg>TRUE</CscFeature_Setting_EnableMenuBlockCallMsg>
Voice Recorder Quality: <CscFeature_VoiceRecorder_SupportRecordingQualitySetting>TRUE</CscFeature_VoiceRecorder_SupportRecordingQualitySetting>
Camera Shutter Sound:
build.prop ro.camera.sound.forced=0
<CscFeature_Camera_ShutterSoundMenu>TRUE</CscFeature_Camera_ShutterSoundMenu>
Data Usage on Quickpanel: <CscFeature_SystemUI_SupportDataUsageViewOnQuickPanel>TRUE</CscFeature_SystemUI_SupportDataUsageViewOnQuickPanel>
Multi Window: (sort of working, use recent apps button to see effect, landscape and portrait)
build.prop persist.sys.debug.multi_window=1
<CscFeature_Framework_ConfigMultiWindowTrayBarFunction>TRUE</CscFeature_Framework_ConfigMultiWindowTrayBarFunction>
I disabled a lot of bloatware using the pm disable command (too much for you I guess). Also in attachement.
Cheers
Click to expand...
Click to collapse
Cool, but when multi window is enabled, don.t you get the scroll bug in recents apps? (especially in the bottom part of the screen)
Yes the bug is there. Pull down notifications corrects it shortly. Multi Window on small screens is not my thing anyway.
Can I enable multi-window in J500F the same way? Would love to have two apps on screen simultaneously.
Perhaps, what's the scroll bug?
Added information of how to increase volume on different audio outputs with /etc/mixer-paths.xml and test it with the tinymix command.
tweakradje said:
Added information of how to increase volume on different audio outputs with /etc/mixer-paths.xml and test it with the tinymix command.
Click to expand...
Click to collapse
tinymix "RX1 Digital Volume" 86 gives me tinymix is not executable.
chmod 755 does not return error but still not executable.
putting <ctl name="RX1/2/3 Digital Volume" value="86"/> or even 90 in the mixer_paths.xml and reboot does't increase the volume.
I'm missing something ?
What ROM are you on then? I have stock.
Dude I don't understand how to use this. Please help me. I really want these features.
Added my latest build.prop and init.qcom.post_boot.sh
Antutu score with stock ROM and Cherry Kernel 3.10.94
Hi how to remove "system unauthorised action "when i'am instal custom kernel on stockrom
adf18224 said:
Hi how to remove "system unauthorised action "when i'am instal custom kernel on stockrom
Click to expand...
Click to collapse
The notification or smart manager alert?
Wizardlysense said:
The notification or smart manager alert?
Click to expand...
Click to collapse
Smart manager sir

How To Guide Mapping Out The G20's Internals

NOKIA G20 ALL ADB SHELL COMMANDS
=========================================
Hello Friends, Welcome To.... My Book~! xD
=====================
Spoiler: HOW TO SEE ALL FOLDERS AND PROGRAMS ON YOUR ANDROID DEVICE
This is a map for NOKIA G20 using the ADB Shell
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
To Get here,
Open Command Prompt.
type:
adb shell
then:
ls
This lists the files and folders you can access through the ADB Shell.
Spoiler: SHOW
acct
apex
bin
bugreports
cache
config
d
data
data_mirror
debug_ramdisk
default.prop
dev
etc
init
init.environ.rc
linkerconfig
lost+found
metadata
mnt
odm
oem
postinstall
proc
product
sdcard
storage
sys
system
system_ext
vendor
wt_custom
We can switch to any "Directory" or "Folder" listed above by typing the command "cd"... followed by the folder name.
Now we can learn what each system does by typing the system name, followed by --help -help or -h
We can Read A File by using the command "cat" followed by the File Name.
Spoiler: G20 INTERNALS
Spoiler: ACCT
Spoiler: SHOW TEXT FOR COPYING
cgroup.clone_children
cgroup.procs
cgroup.sane_behavior
cpuacct.stat
cpuacct.usage
cpuacct.usage_all
cpuacct.usage_percpu
cpuacct.usage_percpu_sys
cpuacct.usage_percpu_user
cpuacct.usage_sys
cpuacct.usage_user
notify_on_release
release_agent
tasks
uid
uid_0
uid_1000
uid_1001
uid_1002
uid_10056
uid_10057
uid_10059
uid_10061
uid_10063
uid_10064
uid_10070
uid_10071
uid_10072
uid_10074
uid_10088
uid_10091
uid_10093
uid_1010
uid_10100
uid_10108
uid_10109
uid_10110
uid_10111
uid_10112
uid_10113
uid_10114
uid_10115
uid_10116
uid_10117
uid_10118
uid_10119
uid_10120
uid_10121
uid_10122
uid_10123
uid_10125
uid_10127
uid_10129
uid_1013
uid_10130
uid_10132
uid_10133
uid_10134
uid_10135
uid_10136
uid_10137
uid_10139
uid_10140
uid_10141
uid_10145
uid_10146
uid_10148
uid_10154
uid_10155
uid_10158
uid_10159
uid_10162
uid_10163
uid_10165
uid_10167
uid_10168
uid_10169
uid_1017
uid_10170
uid_10173
uid_10174
uid_10176
uid_10177
uid_10178
uid_10180
uid_10181
uid_10182
uid_10183
uid_10185
uid_10186
uid_10187
uid_10189
uid_1019
uid_10190
uid_1021
uid_1027
uid_1036
uid_1037
uid_1040
uid_1041
uid_1046
uid_1047
uid_1053
uid_1058
uid_1066
uid_1067
uid_1068
uid_1069
uid_1072
uid_1073
uid_1076
uid_2000
uid_9999
Spoiler: ACCT KNOWLEDGE
ACCT is the CPU Accounting Controller Folder~!
https://www.kernel.org/doc/Documentation/cgroup-v1/cpuacct.txt
Spoiler: APEX
Permission denied
Spoiler: BIN
Spoiler: SHOW TEXT FOR COPYING
AudioSetParam
abb
acpi
am
apexd
app_process
app_process32
app_process64
appops
appwidget
atrace
audioserver
auditctl
awk
badblocks
base64
basename
batterywarning
bc
bcc
blank_screen
blkid
blockdev
bmgr
boot_logo_updater
bootanimation
bootstat
bootstrap
boringssl_self_test32
boringssl_self_test64
bpfloader
bu
bugreport
bugreportz
bunzip2
bzcat
bzip2
cal
camerapostalgo
cameraserver
cat
charger
chattr
chcon
chgrp
chmod
chown
chroot
chrt
cksum
clatd
clear
cmd
cmp
comm
content
cp
cpio
cppreopts.sh
crash_dump32
crash_dump64
credstore
cut
dalvikvm
date
dd
debuggerd
defrag.f2fs
device_config
devmem
dex2oat
df
diff
dirname
disable-verity
dmctl
dmesg
dnsmasq
dos2unix
dpm
drmserver
du
dump.f2fs
dumpstate
dumpsys
e2freefrag
e2fsck
e2fsdroid
echo
egrep
enable-verity
env
expand
expr
fallocate
false
fgrep
file
find
flags_health_check
flock
fmt
free
fsck.f2fs
fsck_msdos
fsverity_init
fsync
gatekeeperd
getconf
getenforce
getevent
getprop
gpuservice
grep
groups
gsi_tool
gsid
gunzip
gzip
head
heapprofd
hid
hostname
hw
hwclock
hwservicemanager
i2cdetect
i2cdump
i2cget
i2cset
iconv
id
idmap2
idmap2d
ifconfig
ime
incident
incident-helper-cmd
incident_helper
incidentd
init
inotifyd
input
insmod
install
installd
ionice
iorap.cmd.compiler
iorap.cmd.maintenance
iorap.inode2filename
iorap.prefetcherd
iorapd
iorenice
ip
ip-wrapper-1.0
ip6tables
ip6tables-restore
ip6tables-save
ip6tables-wrapper-1.0
iptables
iptables-restore
iptables-save
iptables-wrapper-1.0
keystore
keystore_cli_v2
kill
killall
kpoc_charger
lbs_dbg
lcdc_screen_cap
ld.mc
ldd
librank
linker
linker64
linker_asan
linker_asan64
linkerconfig
lmkd
ln
load_policy
locksettings
log
logcat
logd
logname
logwrapper
losetup
lpdump
lpdumpd
ls
lsattr
lshal
lsmod
lsof
lspci
lsusb
make_f2fs
md5sum
mdnsd
mediaextractor
mediametrics
mediaserver
microcom
mifunctiontest
migrate_legacy_obb_data.sh
mini-keyctl
mkdir
mke2fs
mkfifo
mkfs.ext2
mkfs.ext3
mkfs.ext4
mknod
mkswap
mktemp
modinfo
modprobe
monkey
more
mount
mountpoint
move_widevine_data.sh
mtk_plpath_utils
mtpd
mv
nc
ndc
ndc-wrapper-1.0
netcat
netd
netstat
netutils-wrapper-1.0
newfs_msdos
nice
nl
nohup
notify_traceur.sh
nproc
nsenter
od
oem-iptables-init.sh
otapreopt
otapreopt_chroot
otapreopt_script
otapreopt_slot
paste
patch
perfetto
pgrep
pidof
ping
ping6
pkill
pm
pmap
pppd
preloads_copy.sh
preloads_copy_ext.sh
preopt2cachename
printenv
printf
procrank
ps
pwd
racoon
readelf
readlink
realpath
reboot
recovery-persist
recovery-refresh
renice
requestsync
resize.f2fs
resize2fs
restorecon
rm
rmdir
rmmod
rss_hwm_reset
run-as
runcon
schedtest
screencap
screenrecord
sdcard
secdiscard
secilc
sed
sendevent
sensorservice
seq
service
servicemanager
set-verity-state
setenforce
setprop
setsid
settings
sgdisk
sh
sha1sum
sha224sum
sha256sum
sha384sum
sha512sum
showmap
simpleperf
simpleperf_app_runner
sleep
sload_f2fs
sm
snapshotctl
sort
split
ss
start
stat
stop
storaged
strings
stty
surfaceflinger
svc
swapoff
swapon
sync
sysctl
tac
tail
tar
taskset
tc
tc-wrapper-1.0
tcpdump
tee
telecom
terservice
test
thermald
time
timeout
tombstoned
toolbox
top
touch
toybox
tr
traced
traced_perf
traced_probes
trigger_perfetto
true
truncate
tty
tune2fs
tzdatacheck
ueventd
uiautomator
ulimit
umount
uname
uncrypt
uniq
unix2dos
unlink
unshare
unzip
update_engine
update_verifier
uptime
usbd
usleep
uudecode
uuencode
uuidgen
vdc
viewcompiler
vmstat
vold
vold_prepare_subdirs
vr
vtservice
wait_for_keymaster
watch
watchdogd
wc
which
whoami
wificond
wm
xargs
xxd
yes
zcat
zipinfo
ziptool
Spoiler: ALL BIN PROGRAMS BREAK DOWN
This is the beginning, the rest will be added in the comments below, in alphabetical order, as the site only allows 20 image attachments at a time.
Spoiler: AUDIOSETPARAM
AudioSetParam
Spoiler: AUDIOSETPARAM COMMANDS
please enter command... example: 'GET_XXX_ENABLE', 'SET_XXX_ENABLE=0', 'SET_XXX_ENABLE=1', and '0' for exit
Spoiler: AUDIOSETPARAM KNOWLEDGE
Audio HAL | Android Open Source Project
source.android.com
Spoiler: ABB
abb
Spoiler: ABB KNOWLEDGE
Currently unsure what this command is used for. It does nothing when typed.
Here's some research on the ABB company
ABB Finland powers up with Nokia Lumia
ABB Finland has deployed more than 2200 Nokia Lumia smartphones to its employees and the count is still rising. The company, one of the world’s biggest suppliers of power and robotics technologies, employs around 6600 people in Finland across 30 locations. They create everything from huge...
blogs.windows.com
ABB - Wikipedia
en.wikipedia.org
Spoiler: ACPI
acpi
Spoiler: ACPI COMMANDS
usage: acpi [-abctV]
Show status of power sources and thermal devices.
-a Show power adapters
-b Show batteries
-c Show cooling device state
-t Show temperatures
-V Show everything
Spoiler: ACPI KNOWLEDGE
Preexisting ACPI Specifications | Unified Extensible Firmware Interface Forum
Spoiler: AM
am
Spoiler: SHELL VIDEO
The commands are too large to screenshot, here is a video that you may peruse and pause at your own convience.
This is the only command like this... I'M NOT LAZY
Spoiler: AM COMMANDS
help
Prints this help text.
Spoiler: START ACTIVITY
start-activity
Spoiler: START ACTIVITY COMMANDS
[-D] [-N] [-W] [-P <FILE>] [--start-profiler <FILE>]
[--sampling INTERVAL] [--streaming] [-R COUNT] [-S]
[--track-allocation] [--user <USER_ID> | current] <INTENT>
Starts an Activity.
Spoiler: OPTIONS
Spoiler: -D
-D
enable debugging
Spoiler: -N
-N
enable native debugging
Spoiler: -W
-W
wait for launch to complete
Spoiler: --START-PROFILER
--start-profiler <FILE>
start profiler and send results to <FILE>
Spoiler: --SAMPLING INTERVAL
--sampling INTERVAL
use sample profiling with INTERVAL microseconds between samples
(use with --start-profiler)
Spoiler: --STREAMING
--streaming
stream the profiling output to the specified file
(use with --start-profiler)
Spoiler: STREAMING-IDLE
-P <FILE>-
like --streaming above, but profiling stops when app goes idle
Spoiler: --ATTACH-AGENT
--attach-agent <agent>
attach the given agent before binding
Spoiler: ATTACH-AGENT-BIND
--attach-agent-bind <agent>
attach the given agent during binding
Spoiler: -R
-R
repeat the activity launch <COUNT> times.
Prior to each repeat, the top activity will be finished.
Spoiler: -S
-S
force stop the target app before starting the activity
Spoiler: --TRACK-ALLOCATION
--track-allocation
enable tracking of object allocations
Spoiler: --USER
--user <USER_ID> | current
Specify which user to run as.. if not specified then run as the current user.
Spoiler: --WINDOWINGMODE
--windowingMode <WINDOWING_MODE>
The windowing mode to launch the activity into.
Spoiler: --ACTIVITYTYPE
--activityType <ACTIVITY_TYPE>
The activity type to launch the activity as.
Spoiler: --DISPLAY
--display <DISPLAY_ID>
The display to launch the activity into.
Spoiler: START-SERVICE
start-service [--user <USER_ID> | current] <INTENT>
Start a Service.
Spoiler: OPTIONS
--user <USER_ID> | current
Specify which user to run as; if not specified then run as the current user.
Spoiler: START-FOREGROUND-SERVICE
start-foreground-service [--user <USER_ID> | current] <INTENT>
Start a foreground Service.
Spoiler: OPTIONS
--user <USER_ID> | current
Specify which user to run as; if not specified then run as current user.
Spoiler: STOP-SERVICE
stop-service [--user <USER_ID> | current] <INTENT>
Stop a Service.
Spoiler: OPTIONS
--user <USER_ID> | current
Specify which user to run as; if not specified then run as current user.
Spoiler: BROADCAST
broadcast [--user <USER_ID> | all | current] <INTENT>
Send a broadcast Intent.
Spoiler: OPTIONS
--user <USER_ID> | all | current
Specify which user to send to; if not specified then send to all users.
--receiver-permission <PERMISSION>
Require receiver to hold permission.
--allow-background-activity-starts
The receiver may start activities, even if in the background.
Spoiler: INSTRUMENT
instrument [-r] [-e <NAME> <VALUE>] [-p <FILE>] [-w]
[--user <USER_ID> | current]
[--no-hidden-api-checks [--no-test-api-access]]
[--no-isolated-storage]
[--no-window-animation] [--abi <ABI>] <COMPONENT>
Start an Instrumentation. Typically this target <COMPONENT>
is in the form <TEST_PACKAGE>/<RUNNER_CLASS>
or only <TEST_PACKAGE> if there is only one instrumentation.
Spoiler: OPTIONS
Spoiler: -R: PRINT RAW RESULTS
-r
print raw results (otherwise decode REPORT_KEY_STREAMRESULT).
Use with [-e perf true] to generate raw output for performance measurements.
Spoiler: -E: SET ARGUMENT NAME TO VALUE
-e <NAME> <VALUE>
set argument <NAME> to <VALUE>
For test runners, a common form is [-e <testrunner_flag> <value>[,<value>...]]
Spoiler: -P: WRITE PROFILING DATA
-p <FILE>
Write profiling data to <FILE>
Spoiler: MACHINE READABLE OUTPUT
-m
Write output as protobuf to stdout (machine readable)
Spoiler: MACHINE READBLE OUTPUT FILE PATH
-f <Optional PATH/TO/FILE>
Write output as protobuf to a file (machine readable). If path is not specified..
Then default directory and file name will be used:
/sdcard/instrument-logs/log-yyyyMMdd-hhmmss-SSS.instrumentation_data_proto
Spoiler: WAIT
-w
wait for instrumentation to finish before returning. Required for test runners.
Spoiler: USER
--user <USER_ID> | current
Specify user instrumentation runs in; current user if not specified.
Spoiler: DISABLE HIDDEN API RESTRICTIONS
--no-hidden-api-checks
disable restrictions on use of hidden API.
Spoiler: BAN ALL API TEST ACCESS
--no-test-api-access
do not allow access to test APIs, if hidden API checks are enabled.
Spoiler: MOUNT FULL EXTERNAL STORAGE, NO SANDBOX
--no-isolated-storage
don't use isolated storage sandbox and mount full external storage
Spoiler: TURN OFF WINDOW ANIMATIONS
--no-window-animation
turn off window animations while running.
Spoiler: LAUCH PROCESS ABI
--abi <ABI>
Launch the instrumented process with the selected ABI. This assumes that the process supports the selected ABI.
Spoiler: TRACE-IPC TRANSACTIONS
trace-ipc [start|stop] [--dump-file <FILE>]
Trace IPC transactions.
Spoiler: OPTIONS
start
start tracing IPC transactions.
stop
stop tracing IPC transactions and dump the results to file.
--dump-file <FILE>
Specify the file the trace should be dumped to.
Spoiler: START PROFILER
profile start [--user <USER_ID> current] [--sampling INTERVAL | --streaming] <PROCESS> <FILE>
Start profiler on a process. The given <PROCESS> argument may be either a process name or pid.
Spoiler: OPTIONS
--user <USER_ID> | current
When supplying a process name, specify user of process to profile; uses current user if not specified.
--sampling INTERVAL
use sample profiling with INTERVAL microseconds between samples.
--streaming
stream the profiling output to the specified file.
Spoiler: STOP PROFILER
profile stop [--user <USER_ID> current] <PROCESS>
Stop profiler on a process. The given <PROCESS> argument may be either a process name or pid.
Spoiler: OPTIONS
--user <USER_ID> | current: When supplying a process name, specify user of process to profile; uses current user, if not specified.
Spoiler: DUMPHEAP
dumpheap [--user <USER_ID> current] [-n] [-g] <PROCESS> <FILE>
Dump the heap of a process.
The given <PROCESS> argument may be either a process name or pid.
Spoiler: OPTIONS
-n: dump native heap instead of managed heap
-g: force GC before dumping the heap
--user <USER_ID> | current: When supplying a process name, specify user of process to dump; uses current user if not specified.
Spoiler: SET-DEBUG-APP
set-debug-app [-w] [--persistent] <PACKAGE>
Set application <PACKAGE> to debug.
Spoiler: OPTIONS
-w: wait for debugger when application starts
--persistent: retain this value
Spoiler: CLEAR-DEBUG-APP
clear-debug-app
Clear the previously set-debug-app.
Spoiler: SET-WATCH-HEAP
set-watch-heap <PROCESS> <MEM-LIMIT>
Start monitoring pss size of <PROCESS>, if it is at or above <HEAP-LIMIT> then a heap dump is collected for the user to report.
Spoiler: CLEAR-WATCH-HEAP
clear-watch-heap
Clear the previously set-watch-heap.
Spoiler: CLEAR-EXIT-INFO
clear-exit-info [--user <USER_ID> | all | current] [package]
Clear the process exit-info for given package
Spoiler: BUG-REPORT
bug-report [--progress | --telephony]
Request bug report generation; will launch a notification when done to select where it should be delivered.
Spoiler: OPTIONS
--progress: will launch a notification right away to show its progress.
--telephony: will dump only telephony sections.
Spoiler: FORCE-STOP
force-stop [--user <USER_ID> | all | current] <PACKAGE>
Completely stop the given application package.
Spoiler: CRASH
crash [--user <USER_ID>] <PACKAGE|PID>
Induce a VM crash in the specified package or process
Spoiler: KILL
kill [--user <USER_ID> | all | current] <PACKAGE>
Kill all background processes associated with the given application.
Spoiler: KILL-ALL
kill-all
Kill all processes that are safe to kill (cached, etc).
Spoiler: MAKE-UID-IDLE
make-uid-idle [--user <USER_ID> | all | current] <PACKAGE>
If the given application's uid is in the background and waiting to become idle (not allowing background services), do that now.
Spoiler: MONITOR
monitor [--gdb <port>]
Start monitoring for crashes or ANRs.
Spoiler: OPTIONS
--gdb: start gdbserv on the given port at crash/ANR
Spoiler: WATCH-UIDS
watch-uids [--oom <uid>]
Start watching for and reporting uid state changes.
Spoiler: OOM
--oom: specify a uid for which to report detailed change messages.
Spoiler: HANG
hang [--allow-restart]
Hang the system.
Spoiler: ALLOW-RESTART
--allow-restart: allow watchdog to perform normal system restart
Spoiler: RESTART
restart
Restart the user-space system.
Spoiler: IDLE-MAINTENANCE
idle-maintenance
Perform idle maintenance now.
screen-compat [on|off] <PACKAGE>
Control screen compatibility mode of <PACKAGE>.
package-importance <PACKAGE>
Print current importance of <PACKAGE>.
to-uri [INTENT]
Print the given Intent specification as a URI.
to-intent-uri [INTENT]
Print the given Intent specification as an intent: URI.
to-app-uri [INTENT]
Print the given Intent specification as an android-app: URI.
switch-user <USER_ID>
Switch to put USER_ID in the foreground, starting
execution of that user if it is currently stopped.
get-current-user
Returns id of the current foreground user.
start-user [-w] <USER_ID>
Start USER_ID in background if it is currently stopped;
use switch-user if you want to start the user in foreground.
-w: wait for start-user to complete and the user to be unlocked.
unlock-user <USER_ID> [TOKEN_HEX]
Attempt to unlock the given user using the given authorization token.
stop-user [-w] [-f] <USER_ID>
Stop execution of USER_ID, not allowing it to run any
code until a later explicit start or switch to it.
-w: wait for stop-user to complete.
-f: force stop even if there are related users that cannot be stopped.
is-user-stopped <USER_ID>
Returns whether <USER_ID> has been stopped or not.
get-started-user-state <USER_ID>
Gets the current state of the given started user.
track-associations
Enable association tracking.
untrack-associations
Disable and clear association tracking.
get-uid-state <UID>
Gets the process state of an app given its <UID>.
attach-agent <PROCESS> <FILE>
Attach an agent to the specified <PROCESS>, which may be either a process name or a PID.
get-config [--days N] [--device] [--proto] [--display <DISPLAY_ID>]
Retrieve the configuration and any recent configurations of the device.
--days: also return last N days of configurations that have been seen.
--device: also output global device configuration info.
--proto: return result as a proto; does not include --days info.
--display: Specify for which display to run the command; if not
specified then run for the default display.
supports-multiwindow
Returns true if the device supports multiwindow.
supports-split-screen-multi-window
Returns true if the device supports split screen multiwindow.
suppress-resize-config-changes <true|false>
Suppresses configuration changes due to user resizing an activity/task.
set-inactive [--user <USER_ID>] <PACKAGE> true|false
Sets the inactive state of an app.
get-inactive [--user <USER_ID>] <PACKAGE>
Returns the inactive state of an app.
set-standby-bucket [--user <USER_ID>] <PACKAGE> active|working_set|frequent|rare
Puts an app in the standby bucket.
get-standby-bucket [--user <USER_ID>] <PACKAGE>
Returns the standby bucket of an app.
send-trim-memory [--user <USER_ID>] <PROCESS>
[HIDDEN|RUNNING_MODERATE|BACKGROUND|RUNNING_LOW|MODERATE|RUNNING_CRITICAL|COMPLETE]
Send a memory trim event to a <PROCESS>. May also supply a raw trim int level.
display [COMMAND] [...]: sub-commands for operating on displays.
move-stack <STACK_ID> <DISPLAY_ID>
Move <STACK_ID> from its current display to <DISPLAY_ID>.
stack [COMMAND] [...]: sub-commands for operating on activity stacks.
move-task <TASK_ID> <STACK_ID> [true|false]
Move <TASK_ID> from its current stack to the top (true) or
bottom (false) of <STACK_ID>.
resize-docked-stack <LEFT,TOP,RIGHT,BOTTOM> [<TASK_LEFT,TASK_TOP,TASK_RIGHT,TASK_BOTTOM>]
Change docked stack to <LEFT,TOP,RIGHT,BOTTOM>
and supplying temporary different task bounds indicated by
<TASK_LEFT,TOP,RIGHT,BOTTOM>
move-top-activity-to-pinned-stack: <STACK_ID> <LEFT,TOP,RIGHT,BOTTOM>
Moves the top activity from
<STACK_ID> to the pinned stack using <LEFT,TOP,RIGHT,BOTTOM> for the
bounds of the pinned stack.
positiontask <TASK_ID> <STACK_ID> <POSITION>
Place <TASK_ID> in <STACK_ID> at <POSITION>
list
List all of the activity stacks and their sizes.
info <WINDOWING_MODE> <ACTIVITY_TYPE>
Display the information about activity stack in <WINDOWING_MODE> and <ACTIVITY_TYPE>.
remove <STACK_ID>
Remove stack <STACK_ID>.
task [COMMAND] [...]: sub-commands for operating on activity tasks.
lock <TASK_ID>
Bring <TASK_ID> to the front and don't allow other tasks to run.
lock stop
End the current task lock.
resizeable <TASK_ID> [0|1|2|3]
Change resizeable mode of <TASK_ID> to one of the following:
0: unresizeable
1: crop_windows
2: resizeable
3: resizeable_and_pipable
resize <TASK_ID> <LEFT,TOP,RIGHT,BOTTOM>
Makes sure <TASK_ID> is in a stack with the specified bounds.
Forces the task to be resizeable and creates a stack if no existing stack
has the specified bounds.
update-appinfo <USER_ID> <PACKAGE_NAME> [<PACKAGE_NAME>...]
Update the ApplicationInfo objects of the listed packages for <USER_ID>
without restarting any processes.
write
Write all pending state to storage.
compat [COMMAND] [...]: sub-commands for toggling app-compat changes.
enable|disable|reset <CHANGE_ID|CHANGE_NAME> <PACKAGE_NAME>
Toggles a change either by id or by name for <PACKAGE_NAME>.
It kills <PACKAGE_NAME> (to allow the toggle to take effect).
enable-all|disable-all <targetSdkVersion> <PACKAGE_NAME
Toggles all changes that are gated by <targetSdkVersion>.
reset-all <PACKAGE_NAME>
Removes all existing overrides for all changes for
<PACKAGE_NAME> (back to default behaviour).
It kills <PACKAGE_NAME> (to allow the toggle to take effect).
<INTENT> specifications include these flags and arguments:
[-a <ACTION>] [-d <DATA_URI>] [-t <MIME_TYPE>] [-i <IDENTIFIER>]
[-c <CATEGORY> [-c <CATEGORY>] ...]
[-n <COMPONENT_NAME>]
[-e|--es <EXTRA_KEY> <EXTRA_STRING_VALUE> ...]
[--esn <EXTRA_KEY> ...]
[--ez <EXTRA_KEY> <EXTRA_BOOLEAN_VALUE> ...]
[--ei <EXTRA_KEY> <EXTRA_INT_VALUE> ...]
[--el <EXTRA_KEY> <EXTRA_LONG_VALUE> ...]
[--ef <EXTRA_KEY> <EXTRA_FLOAT_VALUE> ...]
[--eu <EXTRA_KEY> <EXTRA_URI_VALUE> ...]
[--ecn <EXTRA_KEY> <EXTRA_COMPONENT_NAME_VALUE>]
[--eia <EXTRA_KEY> <EXTRA_INT_VALUE>[,<EXTRA_INT_VALUE...]]
(mutiple extras passed as Integer[])
[--eial <EXTRA_KEY> <EXTRA_INT_VALUE>[,<EXTRA_INT_VALUE...]]
(mutiple extras passed as List<Integer>)
[--ela <EXTRA_KEY> <EXTRA_LONG_VALUE>[,<EXTRA_LONG_VALUE...]]
(mutiple extras passed as Long[])
[--elal <EXTRA_KEY> <EXTRA_LONG_VALUE>[,<EXTRA_LONG_VALUE...]]
(mutiple extras passed as List<Long>)
[--efa <EXTRA_KEY> <EXTRA_FLOAT_VALUE>[,<EXTRA_FLOAT_VALUE...]]
(mutiple extras passed as Float[])
[--efal <EXTRA_KEY> <EXTRA_FLOAT_VALUE>[,<EXTRA_FLOAT_VALUE...]]
(mutiple extras passed as List<Float>)
[--esa <EXTRA_KEY> <EXTRA_STRING_VALUE>[,<EXTRA_STRING_VALUE...]]
(mutiple extras passed as String[]; to embed a comma into a string,
escape it using "\,")
[--esal <EXTRA_KEY> <EXTRA_STRING_VALUE>[,<EXTRA_STRING_VALUE...]]
(mutiple extras passed as List<String>; to embed a comma into a string,
escape it using "\,")
[-f <FLAG>]
[--grant-read-uri-permission] [--grant-write-uri-permission]
[--grant-persistable-uri-permission] [--grant-prefix-uri-permission]
[--debug-log-resolution] [--exclude-stopped-packages]
[--include-stopped-packages]
[--activity-brought-to-front] [--activity-clear-top]
[--activity-clear-when-task-reset] [--activity-exclude-from-recents]
[--activity-launched-from-history] [--activity-multiple-task]
[--activity-no-animation] [--activity-no-history]
[--activity-no-user-action] [--activity-previous-is-top]
[--activity-reorder-to-front] [--activity-reset-task-if-needed]
[--activity-single-top] [--activity-clear-task]
[--activity-task-on-home] [--activity-match-external]
[--receiver-registered-only] [--receiver-replace-pending]
[--receiver-foreground] [--receiver-no-abort]
[--receiver-include-background]
[--selector]
[<URI> | <PACKAGE> | <COMPONENT>]
Spoiler: AM KNOWLEDGE
Instrumentation Tests | Android Open Source Project
source.android.com
Testing Multiple Users | Android Open Source Project
source.android.com
Spoiler: BIN KNOWLEDGE
bin is the folder that holds the OEM's installed systems and programs~! We can Use These In The ADB Shell~!
/bin definition by The Linux Information Project (LINFO)
Spoiler: BUGREPORTS
Will only exist if a report has been generated.
Spoiler: CACHE
Permission denied
Spoiler: CONFIG
Permission denied
Spoiler: D
No such file or directory
Spoiler: DATA
Permission denied
Spoiler: DATA_MIRROR
Permission denied
Spoiler: DEBUG_RAMDISK
Is an empty, Readable, Folder.
Spoiler: DEFAULT.PROP
inaccessible or not found
Spoiler: DEV
Spoiler: SHOW TEXT FOR COPYING
CAM_CAL_DRV
MAINAF
MTK_SMI
MT_pmic_adc_cali
RT_Monitor
Vcodec
Vcodec2
__properties__
aal_als
aed0
aed1
alarm
als_ps
ashmem
ashmemc59e461e-bb88-4c52-acb2-aff0c4fa47f8
atf_log
atf_raw_buf
binder
binderfs
blkio
block
boringssl
btif
bus
camera-dpe
camera-fdvt
camera-isp
ccci_aud
ccci_bip
ccci_c2k_agps
ccci_c2k_ppp
ccci_ccb_ctrl
ccci_ccb_dhl
ccci_ccb_md_monitor
ccci_ccb_meta
ccci_fs
ccci_imsa
ccci_imsc
ccci_imsdc
ccci_imsem
ccci_imsm
ccci_imsv
ccci_ioctl0
ccci_ioctl1
ccci_ioctl2
ccci_ioctl3
ccci_ioctl4
ccci_ipc_1220_0
ccci_ipc_2
ccci_ipc_4
ccci_ipc_5
ccci_ipc_9
ccci_it
ccci_lb_it
ccci_md1_sta
ccci_md2_sta
ccci_md3_sta
ccci_md_log_ctrl
ccci_mdl_monitor
ccci_mdx_sta
ccci_monitor
ccci_raw_audio
ccci_raw_dhl
ccci_raw_mdm
ccci_raw_netd
ccci_raw_usb
ccci_rpc
ccci_ss_xcap
ccci_woa
ccu
cg2_bpf
cgroup_info
console
cpu_dma_latency
cpu_loading
cpu_variant:arm
cpu_variant:arm64
cpuctl
cpuset
device-mapper
dri
event-log-tags
fd
flashlight
fm
fpsensor
freezer
fscklogs
full
fuse
fw_log_bt
fw_log_gps
fw_log_wifi
fw_log_wmt
gpiochip0
gps_emi
graphics
gsensor
gyroscope
gz_kree
hardwareinfo
hw_random
hwbinder
iio:device0
iio:device1
iio:device2
input
ion
kd_camera_hw
kmsg
loop-control
m_acc_misc
m_als_misc
m_gyro_misc
m_ps_misc
m_situ_misc
m_step_c_misc
mdp_sync
memcg
memory_bandwidth
mmcblk0rpmb
mmp
mobicore
mobicore-user
mtk_cmdq
mtk_disp
mtk_disp_mgr
mtp_usb
nanohub
nanohub_comms
net
network_latency
network_throughput
null
ppp
ptmx
pts
pvr_sync
radio
random
rfkill
rpmb0
rtc0
scp
sec
sensorlist
sia81xx_tuning_if
snd
socket
sspm
st21nfc
stderr
stdin
stdout
stpbt
stpgps
stpwmt
stune
touch
tpd_em_log
tty
ttyC0
ttyC1
ttyC2
ttyC3
ttyC5
ttyC6
ttyGS0
ttyGS1
ttyGS2
ttyGS3
ttyS0
ttyS1
tun
uhid
uinput
urandom
usb-ffs
usb_accessory
vndbinder
vsock
watchdog
watchdog0
wlan
wmtWifi
wmtdetect
zero
Spoiler: WHAT IS IT?
Currently I am unable to view what any of these files are, I will work out a fix. This is some study information on the Dev block in Linux Filesystem Hierarchy
https://tldp.org/LDP/Linux-Filesystem-Hierarchy/html/dev
Spoiler: ETC
Spoiler: SHOW TEXT FOR COPYING
NOTICE.xml.gz
a2dp_audio_policy_configuration.xml
a2dp_in_audio_policy_configuration.xml
aiworks_night_config_ronin.xml
aiworks_night_config_ronin2.xml
ams_aal_config.xml
apns-conf.xml
audio_effects.conf
audio_policy_configuration.xml
audio_policy_configuration_bluetooth_legacy_hal.xml
audio_policy_configuration_stub.xml
audio_policy_engine_configuration.xml
audio_policy_engine_default_stream_volumes.xml
audio_policy_engine_product_strategies.xml
audio_policy_engine_stream_volumes.xml
audio_policy_volumes.xml
bluetooth
bluetooth_audio_policy_configuration.xml
boot-image.bprof
boot-image.prof
bpf
cgroups.json
clatd.conf
compatconfig
default_volume_tables.xml
dirty-image-objects
event-log-tags
fonts.xml
fonts_cust.xml
fs_config_dirs
fs_config_files
fstab.postinstall
gps_debug.conf
graphic_ll_cfg.json
group
hearing_aid_audio_policy_configuration.xml
hosts
init
ixitdata.xml
media_profiles_V1_0.dtd
mke2fs.conf
mkshrc
morpho_ronin.xml
morpho_ronin2.xml
mtklog-config.prop
nfcee_access.xml
passwd
permissions
ppp
preloaded-classes
prop.default
protolog.conf.json.gz
public.libraries-mtk.txt
public.libraries-trustonic.txt
public.libraries.txt
r_submix_audio_policy_configuration.xml
resolution_tuner_app_list.xml
sanitizer.libraries.txt
seccomp_policy
security
selinux
sensors
spotify.preload
sysconfig
task_profiles.json
ueventd.rc
updatable-bcp-packages.txt
usb_audio_policy_configuration.xml
vintf
vndkcorevariant.libraries.txt
white_balance_data.txt
xtables.lock
Spoiler: ETC KNOWLEDGE
Linux directory structure explained:/etc folder - Linux.com
ETC is a folder which contain all your system configuration files in it. Then why the etc name? “etc” is an English word which means etcetera i.e in layman words it is “and so on”. The naming convention of this folder is having some interesting history. The history /etc folder in Linux/Unix In...
www.linux.com
Spoiler: INIT
Permission denied
Spoiler: INIT.ENVIRON.RC
inaccessible or not found
Spoiler: LINKERCONFIG
Permission denied
Spoiler: LOST+FOUND
Permission denied
Spoiler: METADATA
Permission denied
Spoiler: MNT
Spoiler: SHOW TEXT FOR COPYING
androidwritable
appfuse
asec
cd-rom
elabel
expand
hmd_custom_amx
installer
media_rw
obb
pass_through
product
runtime
sdcard
secure
user
vendor
Spoiler: ODM
Spoiler: SHOW TEXT FOR COPYING
AMX
empty
etc
FD
lost+found
TKDN
Spoiler: OEM
Doesn't seem to list anything, seems like it can take commands only
Spoiler: POSTINSTALL
Permission denied
Spoiler: PROC
Spoiler: SHOW TEXT FOR COPYING
1
10
100
102
103
104
105
106
107
108
109
11
110
112
1130
114
116
117
11720
118
12
120
1234
1263
13
1375
14143
145
15
1530
1554
1555
1556
1561
1582
16
16402
1696
17
1714
1722
1734
1752
1779
18
1890
190
191
192
193
194
195
196
19631
197
1976
198
199
2
200
201
202
203
205
206
20750
208
209
2096
21
210
211
212
213
214
215
216
217
2173
218
219
22
220
221
222
2227
223
224
225
226
2268
227
228
229
23
230
231
232
233
234
23411
235
236
237
2370
238
239
240
241
242
243
244
245
2463
247
24753
248
24800
24820
24846
249
2498
250
252
253
25357
254
25471
255
25530
25581
256
2566
257
259
2592
26
260
261
262
2625
26313
264
26448
265
266
2665
267
268
2685
27
270
2708
271
272
273
27305
2736
274
27496
275
2753
276
277
278
2780
279
28
280
2802
281
282
284
2840
285
28558
286
287
288
289
290
291
292
293
294
295
296
298
29803
299
3
300
301
302
3066
31
311
313
314
31629
31747
31752
31811
32
321
322
32261
323
324
325
32552
32589
326
327
328
329
33
330
331
332
333
340
341
342
343
344
346
347
3474
348
349
352
3528
354
3549
36
366
367
368
369
37
370
371
372
373
374
376
377
378
38
386
387
388
389
392
393
394
395
396
4
404
405
407
41
414
415
42
422
423
427
428
43
432
433
437
438
440
441
4414
444
447
448
451
46
461
463
469
47
470
48
480
481
482
4822
483
484
485
486
487
488
489
490
491
492
493
4932
494
495
496
497
498
4989
499
500
501
5014
502
503
504
505
506
507
508
509
51
510
511
512
5124
513
514
515
516
517
518
519
52
520
521
522
523
524
525
526
527
528
529
53
530
531
532
5324
533
534
535
536
5364
537
538
5382
539
540
541
542
543
5439
544
545
546
547
548
549
55
550
551
552
553
56
563
564
5660
5684
57
570
5718
575
576
577
578
5782
5818
5819
582
583
5834
584
585
586
587
588
589
5891
59
590
591
592
5925
5926
593
594
595
596
597
598
599
5994
60
600
601
602
603
604
605
606
607
6075
608
61
610
611
6110
612
614
615
617
619
62
620
6204
622
624
625
63
64
6441
6477
65
6564
66
6613
67
6733
68
6889
69
692
693
695
696
6997
70
705
706
707
71
7196
72
7244
7299
73
74
741
742
743
744
745
746
748
749
75
750
751
752
753
754
755
756
757
76
763
764
765
766
767
768
7688
77
778
78
783
784
785
787
789
7893
79
790
793
794
795
797
798
8
80
8024
81
810
812
813
815
82
822
8258
827
828
829
83
831
8318
8319
832
834
8349
835
836
837
838
84
840
842
843
846
848
849
85
850
851
8540
8554
8568
8581
8582
8583
8587
8598
86
8611
8648
8649
8653
8660
8675
8677
8678
8693
8694
8695
87
88
8832
8865
8869
89
9
90
9032
91
9134
92
93
94
95
96
97
971
973
976
977
978
979
98
980
985
99
aed
asound
atf_log
bat_per_pt
battery_status
bcctlmt
blocktag
bootdevice
bootprof
buddyinfo
bus
ccci_dump
ccci_log
cgroups
chipone_selftest
clkmgr
cmdline
cmdq_test
config.gz
consoles
cpu_loading
cpufreq
cpuhvfs
cpuinfo
crypto
ddr_info
devapc_dbg
device-tree
devices
diskstats
disp
displowpower
dispsys
dpe
driver
dynamic_debug
eem
execdomains
fb
fbconfig
filesystems
fm
fs
ged
gpufreq
gpulog
icn85xx_tool
interrupts
iomem
ion
ioports
irq
isp_p2
kallsyms
key-users
keys
kmsg
kpagecgroup
kpagecount
kpageflags
leakage
loadavg
locks
m4u
m4u_dbg
mcdi
mdpm
meminfo
misc
mobile_tm
modules
mounts
msdc_debug
msdc_help
mtk_battery_cmd
mtk_cmdq_debug
mtk_jpeg
mtk_lpm
mtk_pm_qos
mtkcooler
mtkfb
mtktz
mtprintk
net
pagetypeinfo
partitions
pbm
perfmgr
picachu
pl_lk
ppm
pressure
pvr
rid
sched_debug
schedstat
scp_dvfs
sd_tray_gpio_value
sdcard_intr_gpio_value
secboot_fuse_reg
self
serial_num
softirqs
stat
swaps
sys
sysrq-trigger
tee_sanity
thermlmt
thread-self
timer_list
tmem0
touchscreen
ttpct
tty
udi
uid_concurrent_active_time
uid_concurrent_policy_time
uid_cputime
uid_io
uid_procstat
uid_time_in_state
upower
uptime
version
vmallocinfo
vmstat
wmt_tm
zoneinfo
Spoiler: PRODUCT
Spoiler: SHOW TEXT FOR COPYING
app
bin
build.prop
etc
framework
lost+found
overlay
priv-app
usr
Spoiler: SDCARD
Spoiler: SHOW TEXT FOR COPYING
Alarms
Android
Audiobooks
CarrierConfig
DCIM
Documents
Download
Movies
Music
Notifications
Pictures
Podcasts
Recordings
Ringtones
Spoiler: STORAGE
Spoiler: SHOW TEXT FOR COPYING
emulated
self
Spoiler: SYS
Spoiler: SHOW TEXT FOR COPYING
block
bootinfo
bus
chipone-tddi
class
dcm
dev
devices
firmware
fs
kernel
module
power
Spoiler: SYSTEM
Spoiler: SHOW TEXT FOR COPYING
apex
app
bin
build.prop
claro
etc
flex
fonts
framework
lib
lib64
media
operator
preload_apps
priv-app
product
ro.prop
russia
rw.prop
skuid
system_ext
telcel
usp
usr
vendor
Spoiler: SYSTEM_EXT
Spoiler: SHOW TEXT FOR COPYING
app
build.prop
etc
framework
lib
lib64
priv-app
Spoiler: VENDOR
Spoiler: SHOW TEXT FOR COPYING
app
bin
build.prop
data
default.prop
etc
firmware
framework
lib
lib64
lost+found
odm
overlay
res
ro.prop
rw.prop
ueventd.rc
Spoiler: WT_CUSTOM
Permission denied
Sorry for all the colors. Idk why but it helped me at the time to study and I removed some of the obnoxious ones.
There's 398 systems in the binary folder. I am unable to add All Of the explanations to the main BIN spoiler tree, so I am going to branch that out here in the comments. That being said...
Spoiler: IMAGE
The following messages will pickup Mapping out the G20's system Binaries, in alphabetical order, from where I left off in the picture above.​
Spoiler: ALL BIN SYSTEMS CONTINUED PART 1 (A-B)
Spoiler: APEXD
apexd
inaccessible or not found
Spoiler: APEX KNOWLEDGE
What’s the deal with APEX then?​Well with all the information we get, APEX file format is Google’s approach for Project Mainline.
Android Pony Express (APEX) is a new package type that’s similar to an APK. Instead of housing an Android application, however, APEX is home to a native or class library, pre-compiled code that can be called by Android apps, Hardware Abstraction Layers (HAL), and the Android Run-time (ART). Like the APK, APEX packages can be served to users over traditional package installation methods in Android: the Google Play Store/package manager or ADB.
this will be used in the install flow for lower-level system modules. This format facilitates the updates of system components that don’t fit into the standard Android application model. Some example components are native services and libraries, hardware abstraction layers (HALs), runtime (ART), and class libraries.
APEX — Android’s new file format
Android Pony EXpress (APEX) what’s new in the security game?
saketupadhyay.medium.com
APEX File Format | Android Open Source Project
source.android.com
Spoiler: APP_PROCESS
app_process
app_process32
app_process64
Error changing dalvik-cache ownership : Permission denied
Aborted
Spoiler: APPOPS
appops
Spoiler: APPOPS COMMANDS
help
Print this help text.
Spoiler: START
start [--user <USER_ID>] [--attribution <ATTRIBUTION_TAG>] <PACKAGE | UID> <OP>
Starts a given operation for a particular application.
Spoiler: STOP
stop [--user <USER_ID>] [--attribution <ATTRIBUTION_TAG>] <PACKAGE | UID> <OP>
Stops a given operation for a particular application.
Spoiler: SET
set [--user <USER_ID>] <[--uid] PACKAGE | UID> <OP> <MODE>
Set the mode for a particular application and operation.
Spoiler: GET
get [--user <USER_ID>] [--attribution <ATTRIBUTION_TAG>] <PACKAGE | UID> [<OP>]
Return the mode for a particular application and optional operation.
Spoiler: QUERY-OP
query-op [--user <USER_ID>] <OP> [<MODE>]
Print all packages that currently have the given op in the given mode.
Spoiler: RESET
reset [--user <USER_ID>] [<PACKAGE>]
Reset the given application or all applications to default modes.
Spoiler: WRITE-SETTINGS
write-settings
Immediately write pending changes to storage.
Spoiler: READ-SETTINGS
read-settings
Read the last written settings, replacing current state in RAM.
Spoiler: OPTIONS
Spoiler: PACKAGE
<PACKAGE> an Android package name or its UID if prefixed by --uid
Spoiler: OP
<OP> an AppOps operation.
Spoiler: MODE
<MODE> one of allow, ignore, deny, or default
Spoiler: USER_ID
<USER_ID> the user id under which the package is installed. If --user is not specified, the current user is assumed.
Spoiler: APPOPS KNOWLEGE
AppOps
www.appops.org
Spoiler: APPWIDGET
appwidget
Spoiler: APPWIDGET COMMANDS
usage:
adb shell appwidget [subcommand] [options]
Spoiler: GRANTBIND
usage:
adb shell appwidget grantbind --package <PACKAGE> [--user <USER_ID> | current]
Spoiler: PACKAGE
<PACKAGE> an Android package name.
Spoiler: USER_ID
<USER_ID> The user id under which the package is installed.
Spoiler: EXAMPLE
adb shell grantbind --package foo.bar.baz --user current
Grant the "foo.bar.baz" package to bind app widgets for the current user.
Spoiler: REVOKEBIND
usage:
adb shell appwidget revokebind --package <PACKAGE> [--user <USER_ID> | current]
Spoiler: PACKAGE
<PACKAGE> an Android package name.
Spoiler: USER_ID
<USER_ID> The user id under which the package is installed.
Spoiler: EXAMPLE
adb shell revokebind --package foo.bar.baz --user current
Revoke the permission to bind app widgets from the "foo.bar.baz" package.
Spoiler: APPWIDGET KNOWLEDGE
Create a simple widget | Android Developers
App Widgets are miniature application views that can be embedded in other applications (such as the home screen) and receive periodic updates. These views are referred to as Widgets in the user interface, and you can publish one with a widget provider…
developer.android.com
AppWidgetProvider Class (Android.Appwidget)
A convenience class to aid in implementing an AppWidget provider.
docs.microsoft.com
Spoiler: ATRACE
atrace
Spoiler: ATRACE COMMANDS
usage: atrace [options] [categories...]
Spoiler: OPTIONS INCLUDE
Spoiler: -A
-a appname
enable app-level tracing for a comma separated list of cmdlines; * is a wildcard matching any process
Spoiler: -B
-b N
use a trace buffer size of N KB
Spoiler: -C
-c
trace into a circular buffer
Spoiler: -F
-f filename
use the categories written in a file as space-separated values in a line
Spoiler: -K
-k fname,...
trace the listed kernel functions
Spoiler: -N
-n
ignore signals
Spoiler: -S
-s N
sleep for N seconds before tracing [default 0]
Spoiler: -T
-t N
trace for N seconds [default 5]
Spoiler: -Z
-z
compress the trace dump
Spoiler: --ASYNC_START
--async_start
start circular trace and return immediately
Spoiler: --ASYNC_DUMP
--async_dump
dump the current contents of circular trace buffer
Spoiler: --ASYNC_STOP
--async_stop
stop tracing and dump the current contents of circular trace buffer
Spoiler: --STREAM
--stream
stream trace to stdout as it enters the trace buffer
Note: this can take significant CPU time, and is best used for measuring things that are not affected by CPU performance, like pagecache usage.
Spoiler: --LIST
--list_categories
list the available tracing categories
Spoiler: -O
-o filename
write the trace to the specified file instead of stdout.
Spoiler: PRINTS THIS
capturing trace... done
TRACE:
# tracer: nop
#
# entries-in-buffer/entries-written: 2/2 #P:8
# enabled events:
# kernel time now: 34793.070936
# UTC time: 2022-03-17 09:33:02.523448
# android time: 2022-03-17 04:33:02.523448
#
# _-----=> irqs-off
# / _----=> need-resched
# | / _---=> hardirq/softirq
# || / _--=> preempt-depth
# ||| / delay
# TASK-PID TGID CPU# |||| TIMESTAMP FUNCTION
# | | | | |||| | |
atrace-24473 (24473) [000] .... 78794.431008: tracing_mark_write: trace_event_clock_sync: parent_ts=34788.132812
atrace-24473 (24473) [000] .... 78794.431023: tracing_mark_write: trace_event_clock_sync: realtime_ts=1647509577521
Spoiler: ATRACE KNOWLEGE
https://developer.android.com/reference/android/os/Trace
ATrace: Android system and app trace events - Perfetto Tracing Docs
perfetto.dev
Spoiler: AUDIOSERVER
audioserver
inaccessible or not found
Spoiler: AUDITCTL
auditctl
inaccessible or not found
Spoiler: AWK
awk
Spoiler: AWK COMMANDS
usage:
awk [-F fs] [-v var=value] [-f progfile | 'prog'] [file ...]
Spoiler: AWK KNOWLEDGE
AWK - Wikipedia
en.wikipedia.org
Spoiler: BADBLOCKS
badblocks
Spoiler: BADBLOCKS COMMANDS
Usage:
badblocks [-b block_size] [-i input_file] [-o output_file] [-svwnfBX]
[-c blocks_at_once] [-d delay_factor_between_reads] [-e max_bad_blocks]
[-p num_passes] [-t test_pattern [-t test_pattern [...]]]
device [last_block [first_block]]
Spoiler: BADBLOCKS KNOWLEDGE
badblocks - Wikipedia
en.wikipedia.org
Spoiler: BASE64
base64
Spoiler: BASE64 COMMANDS
usage: base64 [-di] [-w COLUMNS] [FILE...]
Encode or decode in base64.
-d Decode
-i Ignore non-alphabetic characters
-w Wrap output at COLUMNS (default 76 or 0 for no wrap)
Spoiler: BASE64 KNOWLEDGE
https://developer.android.com/reference/android/util/Base64
Spoiler: BASENAME
basename
Spoiler: BASENAME COMMANDS
usage:
basename [-a] [-s SUFFIX] NAME... | NAME [SUFFIX]
Return non-directory portion of a pathname, removing suffix.
Spoiler: OPTIONS
-a All arguments are names
-s SUFFIX Remove suffix (implies -a)
Spoiler: BASENAME KNOWLEDGE
basename - Wikipedia
en.wikipedia.org
Spoiler: THE LINGUISTICS BEHIND SUFFIX
Suffix - Wikipedia
en.wikipedia.org
Morpheme - Wikipedia
en.wikipedia.org
Affix - Wikipedia
en.wikipedia.org
Spoiler: BATTERYWARNING
batterywarning
inaccessible or not found
Spoiler: BC
bc
Spoiler: SHELL PICTURES CONTINUED
Spoiler: BC COMMANDS
usage: bc [options] [file...]
bc is a command-line, arbitrary-precision calculator with a Turing-complete
language. For details, use `man bc`.
This bc is compatible with both the GNU bc and the POSIX bc spec. See the GNU bc
manual (https://www.gnu.org/software/bc/manual/bc.html) and bc spec
(http://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html)
for details.
This bc has three differences to the GNU bc:
1) Arrays can be passed to the builtin "length" function to get the number of
elements currently in the array. The following example prints "1":
a[0] = 0
length(a[])
2) The precedence of the boolean "not" operator (!) is equal to that of the
unary minus (-), or negation, operator. This still allows POSIX-compliant
scripts to work while somewhat preserving expected behavior (versus C) and
making parsing easier.
3) This bc has many more extensions than the GNU bc does. For details, see the
man page.
Options:
-e expr --expression=expr
Run "expr" and quit. If multiple expressions or files (see below) are
given, they are all run before executing from stdin.
-f file --file=file
Run the bc code in "file" and exit. See above as well.
-g --global-stacks
Turn scale, ibase, and obase into stacks. This makes the value of each be
be restored on returning from functions. See the man page for more
details.
-h --help
Print this usage message and exit.
-i --interactive
Force interactive mode.
-l --mathlib
Use predefined math routines:
s(expr) = sine of expr in radians
c(expr) = cosine of expr in radians
a(expr) = arctangent of expr, returning radians
l(expr) = natural log of expr
e(expr) = raises e to the power of expr
j(n, x) = Bessel function of integer order n of x
-P --no-prompt
Disable the prompt in interactive mode.
-q --quiet
Don't print version and copyright.
-s --standard
Error if any non-POSIX extensions are used.
-w --warn
Warn if any non-POSIX extensions are used.
-v --version
Print version information and copyright and exit.
Spoiler: BC KNOWLEDGE
GITHUB REPO
GitHub - gavinhoward/bc: An implementation of the POSIX bc calculator with GNU extensions and dc, moved away from GitHub. Finished, but well-maintained.
An implementation of the POSIX bc calculator with GNU extensions and dc, moved away from GitHub. Finished, but well-maintained. - GitHub - gavinhoward/bc: An implementation of the POSIX bc calculat...
github.com
WHAT IS "TURING COMPLETENESS"
Turing completeness - Wikipedia
en.wikipedia.org
Spoiler: BCC
bcc
Spoiler: BCC COMMANDS
USAGE:
bcc [subcommand] [options] <input bitcode files>
Spoiler: OPTIONS
Spoiler: -C
-C
Alias for -mtriple
Spoiler: -O
-O=<char>
Optimization level. [-O0, -O1, -O2, or -O3]
(default: -O3)
Spoiler: -AARCH64-NEON-SYNTAX
-aarch64-neon-syntax
Choose style of NEON code to emit from AArch64 backend
Spoiler: OPTIONS
Spoiler: GENERIC
=generic
Emit generic NEON assembly
Spoiler: APPLE
=apple
Emit Apple-style NEON assembly
Spoiler: -BCLIB
-bclib=<bclib>
Specify the bclib filename
Spoiler: -BCLIB_RELAXED
-bclib_relaxed=<bclib_relaxed>
Specify the bclib filename optimized for relaxed precision floating point maths
Spoiler: -BOUNDS-CHECKING-SINGLE-TRAP
-bounds-checking-single-trap
Use one trap block per function
Spoiler: -BUILD-CHECKSUM
-build-checksum=<checksum>
Embed a checksum of this compiler invocation for cache invalidation at a later time
Spoiler: -COLOR
-color
use colored syntax highlighting (default=autodetect)
Spoiler: -EMBEDRSINFO
-embedRSInfo
Embed RS Info into the object file instead of generating a separate .o.info file
Spoiler: -EMIT-LLVM
-emit-llvm
Emit an LLVM-IR version of the generated program
Spoiler: -ENABLE-IMPLICIT-NULL-CHECKS
-enable-implicit-null-checks
Fold null checks into faulting memory operations
Spoiler: -ENABLE-LOAD-PRE
-enable-load-pre
description left blank by author
Spoiler: -ENABLE-NAME-COMPRESSION
-enable-name-compression
Enable name string compression
Spoiler: -ENABLE--OBJC-ARC-OPTS
-enable-objc-arc-opts
enable/disable all ARC Optimizations
Spoiler: -ENABLE-SCOPED-NOALIAS
-enable-scoped-noalias
description left blank by author
Spoiler: -ENABLE-TBAA
-enable-tbaa
description left blank by author
Spoiler: -EXHAUSTIVE-REGISTER-SEARCH
-exhaustive-register-search
Exhaustive Search for registers bypassing the depth and interference cutoffs of last chance recoloring
Spoiler: -EXPENSIVE-COMBINES
-expensive-combines
Enable expensive instruction combines
Spoiler: -FPIC
-fPIC
Generate fully relocatable, position independent code
Spoiler: -FILTER-PRINT-FUNCS
-filter-print-funcs=<function names>
Only print IR for functions whose name match this for all print-[before|after][-all] options
Spoiler: -IMP-NULL-CHECK-PAGE-SIZE
-imp-null-check-page-size=<int>
The page size of the target in bytes
Spoiler: -INTERNALIZE-PUBLIC-API-FILE
-internalize-public-api-file=<filename>
A file containing list of symbol names to preserve
Spoiler: -INTERNALIZE-PUBLIC-API-LIST
-internalize-public-api-list=<list>
A list of symbol names to preserve
Spoiler: -INVOKE
-invoke=<string>
Invocable functions
Spoiler: -JOIN-LIVEINTERVALS
-join-liveintervals
Coalesce copies (default=true)
Spoiler: -LIMIT-FLOAT-PRECISION
-limit-float-precision=<uint>
Generate low-precision inline sequences for some float libcalls
Spoiler: -LOAD
-load=<pluginfilename>
Load the specified plugin
Spoiler: -MERGE
-merge=<string>
Lists of kernels to merge (as source-and-slot pairs) and names for the final merged kernels
Spoiler: -MTRIPLE
-mtriple=<triple>
Specify the target triple (default: aarch64-none-linux-gnueabi)
Spoiler: -NO-DISCRIIMINATORS
-no-discriminators
Disable generation of discriminator information.
Spoiler: -O
-o=<filename>
Specify the output filename
Spoiler: -OUTPUT_PATH
-output_path=<output path>
Specify the output path
Spoiler: -PLUGIN
-plugin=<pluginfilename>
Load the specified vendor plugin. Use this instead of the -load option
Spoiler: -PRINT-AFTER-ALL
-print-after-all
Print IR after each pass
Spoiler: -PRINT-BEFORE-ALL
-print-before-all
Print IR before each pass
Spoiler: -PRINT-MACHINEINSTRS
-print-machineinstrs=<pass-name>
Print machine instrs
Spoiler: -REGALLOC
-regalloc
[
Spoiler: OPTIONS
Register allocator to use
Spoiler: =DEFAULT
=default
pick register allocator based on -O option
Spoiler: =PBQP
=pbqp
PBQP register allocator
Spoiler: =GREEDY
=greedy
greedy register allocator
Spoiler: =FAST
=fast
fast register allocator
Spoiler: =BASIC
=basic
basic register allocator
-rewrite-map-file=<filename> - Symbol Rewrite Map
-rng-seed=<seed> - Seed for the random number generator
-rs-debug-ctx - Enable build to work with a RenderScript debug context
-rs-global-info - Embed information about global variables in the code
-rs-global-info-skip-constant - Skip embedding information about constant global variables in the code
-sample-profile-check-record-coverage=<N> - Emit a warning if less than N% of records in the input profile are matched to the IR.
-sample-profile-check-sample-coverage=<N> - Emit a warning if less than N% of samples in the input profile are matched to the IR.
-sample-profile-inline-hot-threshold=<N> - Inlined functions that account for more than N% of all samples collected in the parent function, will be inlined again.
-sample-profile-max-propagate-iterations=<uint> - Maximum number of iterations to go through when propagating sample block/edge weights through the CFG.
-stackmap-version=<int> - Specify the stackmap encoding version (default = 1)
-static-func
/-full-module-prefix - Use full module build paths in the profile counter names for static functions.
-stats - Enable statistics output from program (available with Asserts)
-stats-json - Display statistics as json data
-summary-file=<string> - The summary file to use for function importing.
-threads=<int> -
-time-passes - Time each pass, printing elapsed time for each on exit
-verify-debug-info -
-verify-dom-info - Verify dominator info (time consuming)
-verify-loop-info - Verify loop info (time consuming)
-verify-machine-dom-info - Verify machine dominator info (time consuming)
-verify-regalloc - Verify during register allocation
-verify-region-info - Verify region info (time consuming)
-verify-scev - Verify ScalarEvolution's backedge taken counts (slow)
-verify-scev-maps - Verify no dangling value in ScalarEvolution's ExprValueMap (slow)
-vp-counters-per-site=<number> - The average number of profile counters allocated per value profiling site.
-vp-static-alloc - Do static counter allocation for value profiler
Generic Options:
-help - Display available options (-help-hidden for more)
-help-list - Display list of available options (-help-list-hidden for more)
-version - Display the version of this program
Spoiler: BLANK_SCREEN
blank_screen
inaccessible or not found
Spoiler: BLKID
blkid
inaccessible or not found
Spoiler: BLOCKDEV
blockdev
Spoiler: BLOCKDEV COMMANDS
usage: blockdev --OPTION... BLOCKDEV...
Call ioctl(s) on each listed block device
--setro Set read only
--setrw Set read write
--getro Get read only
--getss Get sector size
--getbsz Get block size
--setbsz BYTES Set block size
--getsz Get device size in 512-byte sectors
--getsize Get device size in sectors (deprecated)
--getsize64 Get device size in bytes
--getra Get readahead in 512-byte sectors
--setra SECTORS Set readahead
--flushbufs Flush buffers
--rereadpt Reread partition table
Spoiler: BLOCKDEV KNOWLEDGE
blockdev(8) - Linux manual page
What is "IOCTL"
ioctl(2) - Linux manual page
Spoiler: BMGR
bmgr
Spoiler: SHELL PICTURES CONTINUED
Spoiler: BACKUP MANAGER COMMANDS
usage: bmgr [--user <userId>] [backup|restore|list|transport|run]
bmgr backup PACKAGE
bmgr enable BOOL
bmgr enabled
bmgr list transports [-c]
bmgr list sets
bmgr transport WHICH|-c WHICH_COMPONENT
bmgr restore TOKEN
bmgr restore TOKEN PACKAGE...
bmgr run
bmgr wipe TRANSPORT PACKAGE
bmgr fullbackup PACKAGE...
bmgr backupnow [--monitor|--monitor-verbose] --all|PACKAGE...
bmgr cancel backups
bmgr init TRANSPORT...
bmgr activate BOOL
bmgr activated
bmgr autorestore BOOL
The '--user' option specifies the user on which the operation is run.
It must be the first argument before the operation.
The default value is 0 which is the system user.
The 'backup' command schedules a backup pass for the named package.
Note that the backup pass will effectively be a no-op if the package
does not actually have changed data to store.
The 'enable' command enables or disables the entire backup mechanism.
If the argument is 'true' it will be enabled, otherwise it will be
disabled. When disabled, neither backup or restore operations will
be performed.
The 'enabled' command reports the current enabled/disabled state of
the backup mechanism.
The 'list transports' command reports the names of the backup transports
BackupManager is currently bound to. These names can be passed as arguments
to the 'transport' and 'wipe' commands. The currently active transport
is indicated with a '*' character. If -c flag is used, all available
transport components on the device are listed. These can be used with
the component variant of 'transport' command.
The 'list sets' command reports the token and name of each restore set
available to the device via the currently active transport.
The 'transport' command designates the named transport as the currently
active one. This setting is persistent across reboots. If -c flag is
specified, the following string is treated as a component name.
The 'restore' command when given just a restore token initiates a full-system
restore operation from the currently active transport. It will deliver
the restore set designated by the TOKEN argument to each application
that had contributed data to that restore set.
The 'restore' command when given a token and one or more package names
initiates a restore operation of just those given packages from the restore
set designated by the TOKEN argument. It is effectively the same as the
'restore' operation supplying only a token, but applies a filter to the
set of applications to be restored.
The 'run' command causes any scheduled backup operation to be initiated
immediately, without the usual waiting period for batching together
data changes.
The 'wipe' command causes all backed-up data for the given package to be
erased from the given transport's storage. The next backup operation
that the given application performs will rewrite its entire data set.
Transport names to use here are those reported by 'list transports'.
The 'fullbackup' command induces a full-data stream backup for one or more
packages. The data is sent via the currently active transport.
The 'backupnow' command runs an immediate backup for one or more packages.
--all flag runs backup for all eligible packages.
--monitor flag prints monitor events.
--monitor-verbose flag prints monitor events with all keys.
For each package it will run key/value or full data backup
depending on the package's manifest declarations.
The data is sent via the currently active transport.
The 'cancel backups' command cancels all running backups.
The 'init' command initializes the given transports, wiping all data
from their backing data stores.
The 'activate' command activates or deactivates the backup service.
If the argument is 'true' it will be activated, otherwise it will be
deactivated. When deactivated, the service will not be running and no
operations can be performed until activation.
The 'activated' command reports the current activated/deactivated
state of the backup mechanism.
The 'autorestore' command enables or disables automatic restore when
a new package is installed.
Spoiler: BOOT_LOGO_UPDATER
boot_logo_updater
inaccessible or not found
Spoiler: BOOTANIMATION
bootanimation
inaccessible or not found
Spoiler: BOOTSTAT
bootstat
inaccessible or not found
Spoiler: BOOTSTRAP
bootstrap is a folder, opening it produces
Spoiler: THIS
linker
linker64
linker_asan
linker_asan64
Which when ran, Produces
Spoiler: THIS
Spoiler: BORINGSSL_SELF_TEST32
boringssl_self_test32
inaccessible or not found
Spoiler: BORINGSSL_SELF_TEST64
boringssl_self_test64
inaccessible or not found
Spoiler: BPFLOADER
bpfloader
inaccessible or not found
Spoiler: BU
bu
Spoiler: BU COMMANDS
backup [-user USER_ID] [-f FILE] [-apk|-noapk] [-obb|-noobb] [-shared|-noshared]
[-all] [-system|-nosystem] [-keyvalue|-nokeyvalue] [PACKAGE...]
write an archive of the device's data to FILE [default=backup.adb]
package list optional if -all/-shared are supplied
-user: user ID for which to perform the operation (default - system user)
-apk/-noapk: do/don't back up .apk files (default -noapk)
-obb/-noobb: do/don't back up .obb files (default -noobb)
-shared|-noshared: do/don't back up shared storage (default -noshared)
-all: back up all installed applications
-system|-nosystem: include system apps in -all (default -system)
-keyvalue|-nokeyvalue: include apps that perform key/value backups.
(default -nokeyvalue)
restore [-user USER_ID] FILE restore device contents from FILE
-user: user ID for which to perform the operation (default - system user)
Spoiler: BUGREPORT
bugreport
Floods you with a TREMENDOUS amount of information.
Spoiler: VISUAL EXAMPLE
The video shown was not sped up, only trimmed.
Spoiler: BUGREPORTZ
bugreportz
Spoiler: BUGREPORTZ COMMANDS
usage: bugreportz [-h | -v]
-h: to display this help message
-p: display progress
-v: to display the version
or no arguments to generate a zipped bugreport
Spoiler: BUNZIP2, BZCAT, BZIP2
bunzip2
bzcat
bzip2
Spoiler: BUNZIP COMMANDS
bunzip2: I won't read compressed data from a terminal.
bunzip2: For help, type: `bunzip2 --help'.
1|RNN_sprout:/bin $ bunzip2 --help
bzip2, a block-sorting file compressor. Version 1.0.6, 6-Sept-2010.
usage: bunzip2 [flags and input files in any order]
-h --help print this message
-d --decompress force decompression
-z --compress force compression
-k --keep keep (don't delete) input files
-f --force overwrite existing output files
-t --test test compressed file integrity
-c --stdout output to standard out
-q --quiet suppress noncritical error messages
-v --verbose be verbose (a 2nd -v gives more)
-L --license display software version & license
-V --version display software version & license
-s --small use less memory (at most 2500k)
-1 .. -9 set block size to 100k .. 900k
--fast alias for -1
--best alias for -9
If invoked as `bzip2', default action is to compress.
as `bunzip2', default action is to decompress.
as `bzcat', default action is to decompress to stdout.
If no file names are given, bzip2 compresses or decompresses
from standard input to standard output. You can combine
short flags, so `-v -4' means the same as -v4 or -4v, &c.
Spoiler: ALL BIN SYSTEMS CONTINUED PART 2 (C-D)
Spoiler: CAL
cal
Displays a literal calendar~!
Spoiler: CAL COMMANDS
usage: cal [[MONTH] YEAR]
Print a calendar.
With one argument, prints all months of the specified year.
With two arguments, prints calendar for month and year.
-h Don't highlight today
Spoiler: SHOW TEXT
March 2022
Su Mo Tu We Th Fr Sa
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
Spoiler: CAMERAPOSTALGO
camerapostalgo
inaccessible or not found
Spoiler: CAMERASERVER
cameraserver
inaccessible or not found
Spoiler: CAT
cat
Spoiler: CAT COMMANDS
usage: cat [-etuv] [FILE...]
Copy (concatenate) files to stdout. If no files listed, copy from stdin.
Filename "-" is a synonym for stdin.
-e Mark each newline with $
-t Show tabs as ^I
-u Copy one byte at a time (slow)
-v Display nonprinting characters as escape sequences with M-x for
high ascii characters (>127), and ^x for other nonprinting chars
Spoiler: VISUAL EXAMPLE
Spoiler: CHARGER
charger
inaccessible or not found
Spoiler: CHATTR
chattr
Spoiler: CHATTR COMMANDS
usage: chattr [-R] [-+=AacDdijsStTu] [-p PROJID] [-v VERSION] [FILE...]
Change file attributes on a Linux file system.
-R Recurse
-p Set the file's project number
-v Set the file's version/generation number
Operators:
'-' Remove attributes
'+' Add attributes
'=' Set attributes
Attributes:
A No atime a Append only
C No COW c Compression
D Synchronous dir updates d No dump
E Encrypted e Extents
F Case-insensitive (casefold)
I Indexed directory i Immutable
j Journal data
N Inline data in inode
P Project hierarchy
S Synchronous file updates s Secure delete
T Top of dir hierarchy t No tail-merging
u Allow undelete
V Verity
Spoiler: CHATTR KNOWLEDGE
chattr command in Linux with examples - GeeksforGeeks
A Computer Science portal for geeks. It contains well written, well thought and well explained computer science and programming articles, quizzes and practice/competitive programming/company interview Questions.
www.geeksforgeeks.org
Spoiler: CHCON
chcon
Spoiler: CHCON COMMANDS
usage: chcon [-hRv] CONTEXT FILE...
Change the SELinux security context of listed file.
-h Change symlinks instead of what they point to
-R Recurse into subdirectories
-v Verbose
Spoiler: CHCON LIST
ls -lZ
DISPLAYS THIS:
dr-xr-xr-x 93 root root ubject_r:cgroup:s0 0 2022-07-28 00:54 acct
drwxr-xr-x 46 root root ubject_r:apex_mnt_dir:s0 920 2022-07-28 00:54 apex
lrw-r--r-- 1 root root ubject_r:rootfs:s0 11 2008-12-31 18:00 bin -> /system/bin
lrw-r--r-- 1 root root ubject_r:rootfs:s0 50 2008-12-31 18:00 bugreports -> /data/user_de/0/com.android.shell/files/bugreports
l????????? ? ? ? ? ? ? cache -> ?
drwxr-xr-x 5 root root ubject_r:configfs:s0 0 2022-07-28 00:54 config
lrw-r--r-- 1 root root ubject_r:rootfs:s0 17 2008-12-31 18:00 d -> /sys/kernel/debug
drwxrwx--x 48 system system ubject_r:system_data_root_file:s0 4096 2022-07-28 00:54 data
d????????? ? ? ? ? ? ? data_mirror
drwxr-xr-x 2 root root ubject_r:tmpfs:s0 4096 2008-12-31 18:00 debug_ramdisk
lrw------- 1 root root ubject_r:rootfs:s0 23 2008-12-31 18:00 default.prop -> system/etc/prop.default
drwxr-xr-x 25 root root ubject_r:device:s0 3780 2022-07-28 00:54 dev
lrw-r--r-- 1 root root ubject_r:rootfs:s0 11 2008-12-31 18:00 etc -> /system/etc
l????????? ? ? ? ? ? ? init -> ?
-????????? ? ? ? ? ? ? init.environ.rc
d????????? ? ? ? ? ? ? linkerconfig
drwx------ 2 root root ubject_r:rootfs:s0 16384 2008-12-31 18:00 lost+found
d????????? ? ? ? ? ? ? metadata
drwxr-xr-x 18 root system ubject_r:tmpfs:s0 380 2022-07-28 00:54 mnt
drwxr-xr-x 8 root root ubject_r:vendor_file:s0 4096 2008-12-31 18:00 odm
drwxr-xr-x 2 root root ubject_remfs:s0 4096 2008-12-31 18:00 oem
d????????? ? ? ? ? ? ? postinstall
dr-xr-xr-x 615 root root ubject_rroc:s0 0 1969-12-31 18:00 proc
drwxr-xr-x 10 root root ubject_r:system_file:s0 4096 2008-12-31 18:00 product
lrw-r--r-- 1 root root ubject_r:rootfs:s0 21 2008-12-31 18:00 sdcard -> /storage/self/primary
drwx--x--- 4 shell everybody ubject_r:mnt_user_file:s0 80 2022-07-28 00:54 storage
dr-xr-xr-x 14 root root ubject_r:sysfs:s0 0 2022-07-28 00:54 sys
drwxr-xr-x 22 root root ubject_r:system_file:s0 4096 2008-12-31 18:00 system
lrw-r--r-- 1 root root ubject_r:system_file:s0 18 2008-12-31 18:00 system_ext -> /system/system_ext
drwxr-xr-x 13 root shell ubject_r:vendor_file:s0 4096 2008-12-31 18:00 vendor
d????????? ? ? ? ? ? ? wt_custom
Spoiler: CHCON KNOWLEDGE
15 SELinux chcon Command Examples to Change Security Context
In SELinux, one of the frequent task that you may do is to change the security context of an object. For this, you’ll use chcon command. chcon stands for Change Context. This command is used to change the SELinux security context of a file. This tutorial explains the following chcon command...
www.thegeekstuff.com
Spoiler: CHGRP
chgrp
Spoiler: CHGRP COMMANDS
usage: chgrp/chown [-RHLP] [-fvh] GROUP FILE...
Change group of one or more files.
-f Suppress most error messages
-h Change symlinks instead of what they point to
-R Recurse into subdirectories (implies -h)
-H With -R change target of symlink, follow command line symlinks
-L With -R change target of symlink, follow all symlinks
-P With -R change symlink, do not follow symlinks (default)
-v Verbose
Spoiler: CHGRP KNOWLEDGE
chgrp - Unix, Linux Command
chgrp Unix Linux Command - chgrp - To change group ownership.
www.tutorialspoint.com
Spoiler: CHMOD
chmod
Spoiler: CHMOD COMMANDS
chmod: Need 2 arguments (see "chmod --help")
1|RNN_sprout:/bin $ chmod --help
usage: chmod [-R] MODE FILE...
Change mode of listed file (recursively with -R).
MODE can be (comma-separated) stanzas: [ugoa][+-=][rwxstXugo]
Stanzas are applied in order: For each category (u = user,
g = group, o = other, a = all three, if none specified default is a),
set (+), clear (-), or copy (=), r = read, w = write, x = execute.
s = u+s = suid, g+s = sgid, o+s = sticky. (+t is an alias for o+s).
suid/sgid: execute as the user/group who owns the file.
sticky: can't delete files you don't own out of this directory
X = x for directories or if any category already has x set.
Or MODE can be an octal value up to 7777 ug uuugggooo top +
bit 1 = o+x, bit 1<<8 = u+w, 1<<11 = g+1 sstrwxrwxrwx bottom
Examples:
chmod u+w file - allow owner of "file" to write to it.
chmod 744 file - user can read/write/execute, everyone else read only
Spoiler: CHMOD KNOWLEDGE
chmod command in Linux with examples
In this tutorial, we show how to use the chmod command in Linux through command line examples and frequently used options.
linuxconfig.org
Spoiler: CHOWN
chown
Spoiler: CHOWN COMMANDS
usage: chgrp/chown [-RHLP] [-fvh] GROUP FILE...
Change group of one or more files.
-f Suppress most error messages
-h Change symlinks instead of what they point to
-R Recurse into subdirectories (implies -h)
-H With -R change target of symlink, follow command line symlinks
-L With -R change target of symlink, follow all symlinks
-P With -R change symlink, do not follow symlinks (default)
-v Verbose
Spoiler: CHOWN KNOWLEDGE
How to Use the chown Command on Linux
Files and directories in Linux systems all belong to someone. You can change their ownership with the chown command. We show you how.
www.howtogeek.com
Spoiler: CHROOT
chroot
Spoiler: CHROOT COMMANDS
usage: chroot NEWROOT [COMMAND [ARG...]]
Run command within a new root directory. If no command, run /bin/sh.
Spoiler: CHROOT KNOWLEDGE
chroot - ArchWiki
wiki.archlinux.org
Spoiler: CHRT
chrt
Spoiler: CHRT COMMANDS
usage: chrt [-Rmofrbi] {-p PID [PRIORITY] | [PRIORITY COMMAND...]}
Get/set a process' real-time scheduling policy and priority.
-p Set/query given pid (instead of running COMMAND)
-R Set SCHED_RESET_ON_FORK
-m Show min/max priorities available
Set policy (default -r):
-o SCHED_OTHER -f SCHED_FIFO -r SCHED_RR
-b SCHED_BATCH -i SCHED_IDLE
Spoiler: CHRT KNOWLEDGE
chrt command in Linux with examples - GeeksforGeeks
A Computer Science portal for geeks. It contains well written, well thought and well explained computer science and programming articles, quizzes and practice/competitive programming/company interview Questions.
www.geeksforgeeks.org
Spoiler: CKSUM
cksum
Spoiler: CKSUM COMMANDS
usage: cksum [-IPLN] [FILE...]
For each file, output crc32 checksum value, length and name of file.
If no files listed, copy from stdin. Filename "-" is a synonym for stdin.
-H Hexadecimal checksum (defaults to decimal)
-L Little endian (defaults to big endian)
-P Pre-inversion
-I Skip post-inversion
-N Do not include length in CRC calculation (or output)
Spoiler: CLATD
clatd
inaccessible or not found
Spoiler: CLEAR
clear
clears the shell's screen. cls does not work in shell so we use this instead
Spoiler: CMD
cmd
Spoiler: CMD-L
Currently running services:
DockObserver
HMDEnterpriseService
SurfaceFlinger
accessibility
account
activity
activity_task
adb
alarm
android.hardware.light.ILights/default
android.hardware.power.IPower/default
android.hardware.vibrator.IVibrator/default
android.os.UpdateEngineService
android.security.identity
android.security.keystore
anrmanager
app_binding
app_integrity
app_prediction
appops
appwidget
audio
auth
autoboot
autofill
backup
battery
batteryproperties
batterystats
binder_calls_stats
biometric
blob_store
bluetooth_manager
bugreport
cacheinfo
carrier_config
clipboard
color_display
com.wos.android.face.IFaceDaemon
companiondevice
connectivity
connmetrics
consumer_ir
content
country_detector
cpuinfo
crossprofileapps
dataloader_manager
dbinfo
device_config
device_identifiers
device_policy
deviceidle
devicestoragemonitor
diskstats
display
dreams
drm.drmManager
dropbox
dynamic_system
emergency_affordance
ethernet
external_vibrator_service
file_integrity
fingerprint
gfxinfo
gpu
graphicsstats
hardware_properties
imms
imtksms
incidentcompanion
incremental
input
input_method
inputflinger
ions
iphonesubinfo
iphonesubinfoEx
ipsec
isms
isub
isubstub
jobscheduler
launcherapps
lights
location
lock_settings
looper_stats
manager
media.VTS
media.audio_flinger
media.audio_policy
media.camera
media.camera.proxy
media.extractor
media.metrics
media.player
media.resource_manager
media_projection
media_resource_monitor
media_router
media_session
meminfo
midi
mount
mtkIms
mtk_telecom
mtkconnmetrics
mtksimphonebook
mwis
netd_listener
netpolicy
netstats
network_management
network_score
network_stack
network_time_update_service
network_watchlist
nfc
nfc.st_ext
nfc_settings
notification
oem_lock
otadexopt
overlay
package
package_native
permission
permissionmgr
permrecords
persistent_data_block
phone
phoneEx
pinner
platform_compat
platform_compat_native
power
power_hal_mgr_service
print
processinfo
procstats
recovery
restrictions
role
rollback
runtime
scheduling_policy
search
search_engine_service
sec_key_att_app_id_provider
secure_element
sensor_privacy
sensorservice
serial
servicediscovery
settings
shortcut
simphonebook
slice
soundtrigger
soundtrigger_middleware
stats
statscompanion
statsmanager
statusbar
storaged
storaged_pri
storagestats
system_config
system_update
telecom
telephony.mtkregistry
telephony.registry
telephony_ims
testharness
tethering
textclassification
textservices
thermalservice
time_detector
time_zone_detector
trust
uimode
updatelock
uri_grants
usagestats
usb
user
vibrator
voiceinteraction
vow_bridge
wallpaper
webviewupdate
wifi
wifinl80211
wifip2p
wifiscanner
window
wos.face
Spoiler: COMM
comm
Spoiler: COMM COMMANDS
usage: comm [-123] FILE1 FILE2
Read FILE1 and FILE2, which should be ordered, and produce three text
columns as output: lines only in FILE1; lines only in FILE2; and lines
in both files. Filename "-" is a synonym for stdin.
-1 Suppress the output column of lines unique to FILE1
-2 Suppress the output column of lines unique to FILE2
-3 Suppress the output column of lines duplicated in FILE1 and FILE2
Spoiler: CONTENT
content
Spoiler: CONTENT COMMANDS
usage: adb shell content [subcommand] [options]
usage: adb shell content insert --uri <URI> [--user <USER_ID>] --bind <BINDING> [--bind <BINDING>...] [--extra <BINDING>...]
<URI> a content provider URI.
<BINDING> binds a typed value to a column and is formatted:
<COLUMN_NAME>:<TYPE>:<COLUMN_VALUE> where:
<TYPE> specifies data type such as:
b - boolean, s - string, i - integer, l - long, f - float, d - double, n - null
Note: Omit the value for passing an empty string, e.g column:s:
Example:
# Add "new_setting" secure setting with value "new_value".
adb shell content insert --uri content://settings/secure --bind name:s:new_setting --bind value:s:new_value
usage: adb shell content update --uri <URI> [--user <USER_ID>] [--where <WHERE>] [--extra <BINDING>...]
<WHERE> is a SQL style where clause in quotes (You have to escape single quotes - see example below).
Example:
# Change "new_setting" secure setting to "newer_value".
adb shell content update --uri content://settings/secure --bind value:s:newer_value --where "name='new_setting'"
usage: adb shell content delete --uri <URI> [--user <USER_ID>] --bind <BINDING> [--bind <BINDING>...] [--where <WHERE>] [--extra <BINDING>...]
Example:
# Remove "new_setting" secure setting.
adb shell content delete --uri content://settings/secure --where "name='new_setting'"
usage: adb shell content query --uri <URI> [--user <USER_ID>] [--projection <PROJECTION>] [--where <WHERE>] [--sort <SORT_ORDER>] [--extra <BINDING>...]
<PROJECTION> is a list of colon separated column names and is formatted:
<COLUMN_NAME>[:<COLUMN_NAME>...]
<SORT_ORDER> is the order in which rows in the result should be sorted.
Example:
# Select "name" and "value" columns from secure settings where "name" is equal to "new_setting" and sort the result by name in ascending order.
adb shell content query --uri content://settings/secure --projection name:value --where "name='new_setting'" --sort "name ASC"
usage: adb shell content call --uri <URI> --method <METHOD> [--arg <ARG>]
[--extra <BINDING> ...]
<METHOD> is the name of a provider-defined method
<ARG> is an optional string argument
<BINDING> is like --bind above, typed data of the form <KEY>:{b,s,i,l,f,d}:<VAL>
usage: adb shell content read --uri <URI> [--user <USER_ID>]
Example:
adb shell 'content read --uri content://settings/system/ringtone_cache' > host.ogg
usage: adb shell content write --uri <URI> [--user <USER_ID>]
Example:
adb shell 'content write --uri content://settings/system/ringtone_cache' < host.ogg
usage: adb shell content gettype --uri <URI> [--user <USER_ID>]
Example:
adb shell content gettype --uri content://media/internal/audio/media/
[ERROR] Unsupported operation: null
Spoiler: CONTENT KNOWLEDGE
Content provider basics | Android Developers
developer.android.com
WHAT IS A URI
URI: The Uniform Resource Identifier Explained
With the Uniform Resource Identifier, various resources on the Internet can be identified. For this to happen, each URI follows a predefined syntax.
www.ionos.com
Spoiler: CP
cp
Spoiler: CP COMMANDS
usage: cp [--preserve=motcxa] [-adfHiLlnPpRrsTv] SOURCE... DEST
Copy files from SOURCE to DEST. If more than one SOURCE, DEST must
be a directory.
-v Verbose
-T DEST always treated as file, max 2 arguments
-s Symlink instead of copy
-r Synonym for -R
-R Recurse into subdirectories (DEST must be a directory)
-p Preserve timestamps, ownership, and mode
-P Do not follow symlinks [default]
-n No clobber (don't overwrite DEST)
-l Hard link instead of copy
-L Follow all symlinks
-i Interactive, prompt before overwriting existing DEST
-H Follow symlinks listed on command line
-f Delete destination files we can't write to
-F Delete any existing destination file first (--remove-destination)
-d Don't dereference symlinks
-D Create leading dirs under DEST (--parents)
-a Same as -dpr
--preserve takes either a comma separated list of attributes, or the first
letter(s) of:
mode - permissions (ignore umask for rwx, copy suid and sticky bit)
ownership - user and group
timestamps - file creation, modification, and access times.
context - security context
xattr - extended attributes
all - all of the above
Spoiler: CPIO
cpio
Spoiler: CPIO COMMANDS
usage: cpio -{o|t|i|p DEST} [-v] [--verbose] [-F FILE] [--no-preserve-owner]
[ignored: -mdu -H newc]
Copy files into and out of a "newc" format cpio archive.
-F FILE Use archive FILE instead of stdin/stdout
-p DEST Copy-pass mode, copy stdin file list to directory DEST
-i Extract from archive into file system (stdin=archive)
-o Create archive (stdin=list of files, stdout=archive)
-t Test files (list only, stdin=archive, stdout=list of files)
-v Verbose
--no-preserve-owner (don't set ownership during extract)
--trailer Add legacy trailer (prevents concatenation)
Spoiler: CPIO KNOWLEDGE
10+ cpio command examples in Linux [Cheat Sheet] | GoLinuxCloud
cpio reads the name of files from the standard input to perform the operation. So, cpio command is mostly used with ls or find command to select the files for
www.golinuxcloud.com
Spoiler: CPPREOPTS.SH
cppreopts.sh
inaccessible or not found
Spoiler: CRASH_DUMP32
crash_dump32
not sure what it did. did not halt shell
Spoiler: CRASH_DUMP64
crash_dump64
did nothing, did not halt shell
Spoiler: CREDSTORE
credstore
inaccessible or not found
Spoiler: CUT
cut
Spoiler: CUT COMMANDS
usage: cut [-Ds] [-bcfF LIST] [-dO DELIM] [FILE...]
Print selected parts of lines from each FILE to standard output.
Each selection LIST is comma separated, either numbers (counting from 1)
or dash separated ranges (inclusive, with X- meaning to end of line and -X
from start). By default selection ranges are sorted and collated, use -D
to prevent that.
-b Select bytes
-c Select UTF-8 characters
-C Select unicode columns
-d Use DELIM (default is TAB for -f, run of whitespace for -F)
-D Don't sort/collate selections or match -fF lines without delimiter
-f Select fields (words) separated by single DELIM character
-F Select fields separated by DELIM regex
-O Output delimiter (default one space for -F, input delim for -f)
-s Skip lines without delimiters
Spoiler: DALVIKVM
dalvikvm
Spoiler: SHELL PICTURES CONTINUED
Spoiler: DALVIKVM COMMANDS
dalvikvm: [options] class [argument ...]
The following standard options are supported:
-classpath classpath (-cp classpath)
-Dproperty=value
-verbose:tag[,tag...] (currently valid tags: 'agents', 'class',
'collector', 'compiler', 'deopt', 'dex', 'gc', 'heap', 'image',
'interpreter', 'jdwp', 'jit', 'jni', 'monitor', 'oat', 'profiler',
'signals', 'simulator', 'startup', 'systrace-locks',
'third-party-jni', 'threads', 'verifier', 'verifier-debug')
-showversion
-help
-agentpath:library_path=options (Experimental feature, requires
-Xexperimental:agent, some features might not be supported)
The following extended options are supported:
-Xbootclasspath:bootclasspath
-Xcheck:tag (e.g. 'jni')
-XmsN (min heap, must be multiple of 1K, >= 1MB)
-XmxN (max heap, must be multiple of 1K, >= 2MB)
-XssN (stack size)
-Xint
The following Dalvik options are supported:
-Xzygote
-Xjnitrace:substring (eg NativeClass or nativeMethod)
-Xgc:[no]preverify
-Xgc:[no]postverify
-XX:HeapGrowthLimit=N
-XX:HeapMinFree=N
-XX:HeapMaxFree=N
-XX:NonMovingSpaceCapacity=N
-XX:HeapTargetUtilization=doublevalue
-XX:ForegroundHeapGrowthMultiplier=doublevalue
-XX:LowMemoryMode
-Xprofile:{threadcpuclock,wallclock,dualclock}
-Xjitthreshold:integervalue
The following unique to ART options are supported:
-Xgc:[no]preverify_rosalloc
-Xgc:[no]postsweepingverify_rosalloc
-Xgc:[no]postverify_rosalloc
-Xgc:[no]presweepingverify
-Xgc:[no]generational_cc
-Ximage:filename
-Xbootclasspath-locations:bootclasspath
(override the dex locations of the -Xbootclasspath files)
-XX:+DisableExplicitGC
-XXarallelGCThreads=integervalue
-XX:ConcGCThreads=integervalue
-XX:FinalizerTimeoutMs=integervalue
-XX:MaxSpinsBeforeThinLockInflation=integervalue
-XX:LongPauseLogThreshold=integervalue
-XX:LongGCLogThreshold=integervalue
-XX:ThreadSuspendTimeout=integervalue
-XXumpGCPerformanceOnShutdown
-XXumpJITInfoOnShutdown
-XX:IgnoreMaxFootprint
-XX:UseTLAB
-XX:BackgroundGC=none
-XX:LargeObjectSpace={disabled,map,freelist}
-XX:LargeObjectThreshold=N
-XX:StopForNativeAllocs=N
-XXumpNativeStackOnSigQuit=booleanvalue
-XX:MadviseRandomAccess:booleanvalue
-XX:SlowDebug={false,true}
-Xmethod-trace
-Xmethod-trace-file:filename
-Xmethod-trace-file-size:integervalue
-Xps-min-save-period-ms:integervalue
-Xps-save-resolved-classes-delay-ms:integervalue
-Xps-hot-startup-method-samples:integervalue
-Xps-min-methods-to-save:integervalue
-Xps-min-classes-to-save:integervalue
-Xps-min-notification-before-wake:integervalue
-Xps-max-notification-before-wake:integervalue
-Xps-profile-path:file-path
-Xcompiler:filename
-Xcompiler-option dex2oat-option
-Ximage-compiler-option dex2oat-option
-Xusejit:booleanvalue
-Xjitinitialsize:N
-Xjitmaxsize:N
-Xjitwarmupthreshold:integervalue
-Xjitosrthreshold:integervalue
-Xjitprithreadweight:integervalue
-X[no]relocate
-X[no]dex2oat (Whether to invoke dex2oat on the application)
-X[no]image-dex2oat (Whether to create and use a boot image)
-Xno-dex-file-fallback (Don't fall back to dex files without oat files)
-Xplugin:<library.so> (Load a runtime plugin, requires -Xexperimental:runtime-plugins)
-Xexperimental:runtime-plugins(Enable new and experimental agent support)
-Xexperimental:agents(Enable new and experimental agent support)
-Xopaque-jni-ids:{true,false,swapable}(Use opauque integers for jni ids, yes, no or punt for later)
The following previously supported Dalvik options are ignored:
-ea[:<package name>... |:<class name>]
-da[:<package name>... |:<class name>]
(-enableassertions, -disableassertions)
-esa
-dsa
(-enablesystemassertions, -disablesystemassertions)
-Xverify:{none,remote,all,softfail}
-Xrs
-Xintortable, -Xint:fast, -Xint:jit
-Xdexopt:{none,verified,all,full}
-Xnoquithandler
-Xjniopts:{warnonly,forcecopy}
-Xjnigreflimit:integervalue
-Xgc:[no]precise
-Xgc:[no]verifycardtable
-X[no]genregmap
-Xverifyopt:[no]checkmon
-Xcheckdexsum
-Xincludeselectedop
-Xjitop:hexopvalue[-endvalue][,hexopvalue[-endvalue]]*
-Xincludeselectedmethod
-Xjitblocking
-Xjitmethod:signature[,signature]* (eg Ljava/lang/String\;replace)
-Xjitclass:classname[,classname]*
-Xjitcodecachesize:N
-Xjitoffsetffset[,offset]
-Xjitconfig:filename
-Xjitcheckcg
-Xjitverbose
-Xjitprofile
-Xjitdisableopt
-Xjitsuspendpoll
-XX:mainThreadStackSize=N
Spoiler: DALVIKVM KNOWLEDGE
Android Dalvik VM - eLinux.org
elinux.org
Controlling the Embedded VM
Spoiler: DATE
date
Spoiler: DATE COMMANDS
usage: date [-u] [-r FILE] [-d DATE] [+DISPLAY_FORMAT] [-D SET_FORMAT] [SET]
Set/get the current date/time. With no SET shows the current date.
-d Show DATE instead of current time (convert date format)
-D +FORMAT for SET or -d (instead of MMDDhhmm[[CC]YY][.ss])
-r Use modification time of FILE instead of current date
-u Use UTC instead of current timezone
Supported input formats:
MMDDhhmm[[CC]YY][.ss] POSIX
@UNIXTIME[.FRACTION] seconds since midnight 1970-01-01
YYYY-MM-DD [hh:mm[:ss]] ISO 8601
hh:mm[:ss] 24-hour time today
All input formats can be preceded by TZ="id" to set the input time zone
separately from the output time zone. Otherwise $TZ sets both.
+FORMAT specifies display format string using strftime(3) syntax:
%% literal % %n newline %t tab
%S seconds (00-60) %M minute (00-59) %m month (01-12)
%H hour (0-23) %I hour (01-12) %p AM/PM
%y short year (00-99) %Y year %C century
%a short weekday name %A weekday name %u day of week (1-7, 1=mon)
%b short month name %B month name %Z timezone name
%j day of year (001-366) %d day of month (01-31) %e day of month ( 1-31)
%N nanosec (output only)
%U Week of year (0-53 start sunday) %W Week of year (0-53 start monday)
%V Week of year (1-53 start monday, week < 4 days not part of this year)
%F "%Y-%m-%d" %R "%H:%M" %T "%H:%M:%S" %z numeric timezone
%D "%m/%d/%y" %r "%I:%M:%S %p" %h "%b" %s unix epoch time
%x locale date %X locale time %c locale date/time
Spoiler: ALL BIN SYSTEMS CONTINUED PART 3 (D-E)
Spoiler: DD
dd
Spoiler: DD COMMANDS
usage: dd [if=FILE] [of=FILE] [ibs=N] [obs=N] [iflag=FLAGS] [oflag=FLAGS]
[bs=N] [count=N] [seek=N] [skip=N]
[conv=notrunc|noerror|sync|fsync] [status=noxfer|none]
Copy/convert files.
if=FILE Read from FILE instead of stdin
of=FILE Write to FILE instead of stdout
bs=N Read and write N bytes at a time
ibs=N Input block size
obs=N Output block size
count=N Copy only N input blocks
skip=N Skip N input blocks
seek=N Skip N output blocks
iflag=FLAGS Set input flags
oflag=FLAGS Set output flags
conv=notrunc Don't truncate output file
conv=noerror Continue after read errors
conv=sync Pad blocks with zeros
conv=fsync Physically write data out before finishing
status=noxfer Don't show transfer rate
status=none Don't show transfer rate or records in/out
FLAGS is a comma-separated list of:
count_bytes (iflag) interpret count=N in bytes, not blocks
seek_bytes (oflag) interpret seek=N in bytes, not blocks
skip_bytes (iflag) interpret skip=N in bytes, not blocks
Numbers may be suffixed by c (*1), w (*2), b (*512), kD (*1000), k (*1024),
MD (*1000*1000), M (*1024*1024), GD (*1000*1000*1000) or G (*1024*1024*1024).
Spoiler: DD KNOWLEDGE
Android Forensics: imaging android filesystem using ADB and DD
Let's starting a series of article related to digital forensic focused on mobile devices. In this first post i'd like to share some thoughts about image acquisition on android devices. On android devices we can perform two kind of image acquisition: Live acquisition: performed on a running...
andreafortuna.org
Spoiler: DEBUGGERD
debuggerd
Spoiler: DEBUGGERD COMMANDS
usage: debuggerd [-bj] PID
-b, --backtrace just a backtrace rather than a full tombstone
-j collect java traces
Spoiler: DEBUGGERD KNOWLEDGE
Debugging Native Android Platform Code | Android Open Source Project
source.android.com
Spoiler: DEFRAG.F2FS
defrag.f2fs
inaccessible or not found
Spoiler: DEVICE_CONFIG
device_config
Spoiler: DEVICE_CONFIG COMMANDS
Device Config (device_config) commands:
help
Print this help text.
get NAMESPACE KEY
Retrieve the current value of KEY from the given NAMESPACE.
put NAMESPACE KEY VALUE [default]
Change the contents of KEY to VALUE for the given NAMESPACE.
{default} to set as the default value.
delete NAMESPACE KEY
Delete the entry for KEY for the given NAMESPACE.
list [NAMESPACE]
Print all keys and values defined, optionally for the given NAMESPACE.
reset RESET_MODE [NAMESPACE]
Reset all flag values, optionally for a NAMESPACE, according to RESET_MODE.
RESET_MODE is one of {untrusted_defaults, untrusted_clear, trusted_defaults}
NAMESPACE limits which flags are reset if provided, otherwise all flags are reset
Spoiler: DEVICE CONFIG LIST
activity_manager_native_boot/offload_queue_enabled=false
app_compat/hidden_api_access_log_sampling_rate=0
app_compat/hidden_api_access_statslog_sampling_rate=0
autofill/augmented_autofill_mode=1
autofill/smart_suggestion_supported_modes=1
configuration/flag=false
connectivity/data_stall_consecutive_dns_timeout_threshold=5
connectivity/dhcp_init_reboot_enabled=false
connectivity/dhcp_init_reboot_version=0
connectivity/dhcp_ip_conflict_detect_version=0
connectivity/dhcp_ipv6_only_preferred_version=0
connectivity/dhcp_rapid_commit_enabled=false
connectivity/dhcp_rapid_commit_version=1
connectivity/dhcp_restart_configuration_delay=1000
connectivity/dhcp_server_decline_version=0
connectivity/ip_reachability_mcast_resolicit_version=999999999
connectivity/ipclient_garp_na_roaming_version=999999999
content_capture/enable_contentcapture=false
content_capture/service_explicitly_enabled=default
device_personalization_services/Captions__enable=false
device_personalization_services/Captions__enable_clearcut_logging=true
device_personalization_services/Captions__enable_punctuations=true
device_personalization_services/Captions__enable_setting_page=false
device_personalization_services/Captions__enable_westworld_logging=false
device_personalization_services/Captions__enable_zero_day=false
device_personalization_services/Captions__manifest_url_template=https://storage.googleapis.com/captions/%{NAMESPACE}_%{VERSION}_manifest.json
device_personalization_services/Captions__model_version_v1=20190613
device_personalization_services/Captions__model_version_v1_2=20200112
device_personalization_services/Captions__speech_threshold=0.2
device_personalization_services/Captions__surface_sound_events=true
device_personalization_services/Captions__visibility_playing_duration_millis=5000
device_personalization_services/Captions__visibility_stopped_duration_millis=1500
device_personalization_services/Overview__enable_lens=false
device_personalization_services/VisualCortex__enable=true
device_personalization_services/VisualCortex__enable_whitelist_packages=true
exo/app_streaming_allowed_components=
exo/app_streaming_blocked_components=
exo/app_streaming_task_navigation_allowed_components=
exo/app_streaming_task_navigation_blocked_components=
exo/include_default_browser_in_allowed_task_navigation_components=false
exo/log_exo_metrics=false
exo/tile_is_available=false
exo/use_encrypted_transport=false
intelligence_bubbles/intelligence_bubbles_webref_superpacks_manifest_url_template=https://gstatic.com/matchmaker/demo/bubbles/20051000/2/en-us/superpacks_manifest.zip
intelligence_bubbles/intelligence_bubbles_webref_superpacks_manifest_version=20051000
launcher/ENABLE_SMARTSPACE_ENHANCED=false
location/adas_settings_allowlist=
netd_native/dns_event_subsample_map=default:6 0:400 2:110 4:110 7:110
netd_native/doh=1
netd_native/doh_session_resumption=0
netd_native/dot_async_handshake=0
netd_native/dot_connect_timeout_ms=127000
netd_native/dot_maxtries=3
netd_native/dot_query_timeout_ms=-1
netd_native/dot_validation_latency_factor=3
netd_native/dot_validation_latency_offset_ms=100
netd_native/keep_listening_udp=0
netd_native/max_queries_global=2147483647
netd_native/parallel_lookup=0
netd_native/parallel_lookup_sleep_time=2
netd_native/retransmission_time_interval=5000
netd_native/retry_count=2
netd_native/sort_nameservers=0
notification_assistant/generate_actions=false
notification_assistant/generate_replies=false
odad/binary_transparency_log_signature_verification_key=
odad/enable_sample_param=false
privacy/location_access_check_enabled=true
privacy/location_accuracy_enabled=false
privacy/permissions_hub_enabled=false
runtime_native/use_app_image_startup_cache=true
runtime_native_boot/disable_lock_profiling=false
runtime_native_boot/iorap_blacklisted_packages=
runtime_native_boot/iorap_perfetto_enable=false
runtime_native_boot/iorap_readahead_enable=false
runtime_native_boot/iorapd_options=
settings_stats/GlobalFeature__boolean_whitelist=Cgd3aWZpX29uCgxibHVldG9vdGhfb24KC21vYmlsZV9kYXRhChBhaXJwbGFuZV9tb2RlX29uCglhdXRvX3RpbWUKDmF1dG9fdGltZV96b25lCglsb3dfcG93ZXIKFWFkZF91c2Vyc193aGVuX2xvY2tlZAoYd2lmaV9zY2FuX2Fsd2F5c19lbmFibGVkChdibGVfc2Nhbl9hbHdheXNfZW5hYmxlZAoPd2ZjX2ltc19lbmFibGVkCgxkYXRhX3JvYW1pbmcKEHZvbHRlX3Z0X2VuYWJsZWQKHGRldmVsb3BtZW50X3NldHRpbmdzX2VuYWJsZWQKI2FkYXB0aXZlX2JhdHRlcnlfbWFuYWdlbWVudF9lbmFibGVkChphdXRvbWF0aWNfcG93ZXJfc2F2ZXJfbW9kZQoUbm90aWZpY2F0aW9uX2J1YmJsZXMKEmRldmljZV9wcm92aXNpb25lZAoSc3lzdWlfZGVtb19hbGxvd2VkChtub3RpZmljYXRpb25fc25vb3plX29wdGlvbnMKDWF3YXJlX2FsbG93ZWQKFGhkbWlfY29udHJvbF9lbmFibGVkChRhcHBseV9yYW1waW5nX3JpbmdlcgoWd2luZG93X2FuaW1hdGlvbl9zY2FsZQoadHJhbnNpdGlvbl9hbmltYXRpb25fc2NhbGUKF2FuaW1hdG9yX2R1cmF0aW9uX3NjYWxl
settings_stats/GlobalFeature__float_whitelist=
settings_stats/GlobalFeature__integer_whitelist=Chdsb3dfcG93ZXJfdHJpZ2dlcl9sZXZlbAoMd2ZjX2ltc19tb2RlChdwcmVmZXJyZWRfbmV0d29ya19tb2RlMQobcHJlZmVycmVkX25ldHdvcmtfbW9kZTFfaW50Cgh6ZW5fbW9kZQoLbW9kZV9yaW5nZXIKF3Bvd2VyX2J1dHRvbl9sb25nX3ByZXNz
settings_stats/GlobalFeature__string_whitelist=ChR6ZW5fbW9kZV9jb25maWdfZXRhZw
settings_stats/SecureFeature__boolean_whitelist=CihjYW1lcmFfZG91YmxlX3RhcF9wb3dlcl9nZXN0dXJlX2Rpc2FibGVkCgxkb3plX2VuYWJsZWQKHmxvY2tfc2NyZWVuX3Nob3dfbm90aWZpY2F0aW9ucwonbG9ja19zY3JlZW5fYWxsb3dfcHJpdmF0ZV9ub3RpZmljYXRpb25zChdpbnN0YWxsX25vbl9tYXJrZXRfYXBwcwoVYWNjZXNzaWJpbGl0eV9lbmFibGVkCiBhY2Nlc3NpYmlsaXR5X2NhcHRpb25pbmdfZW5hYmxlZAoxYWNjZXNzaWJpbGl0eV9tYWduaWZpY2F0aW9uX2ZvbGxvd190eXBpbmdfZW5hYmxlZAorYWNjZXNzaWJpbGl0eV9kaXNwbGF5X21hZ25pZmljYXRpb25fZW5hYmxlZAoaaGlnaF90ZXh0X2NvbnRyYXN0X2VuYWJsZWQKHGluY2FsbF9wb3dlcl9idXR0b25fYmVoYXZpb3IKK2hpZGVfcm90YXRpb25fbG9ja190b2dnbGVfZm9yX2FjY2Vzc2liaWxpdHkKDnNwZWFrX3Bhc3N3b3JkCitlbmFibGVfYWNjZXNzaWJpbGl0eV9nbG9iYWxfZ2VzdHVyZV9lbmFibGVkCidhY2Nlc3NpYmlsaXR5X2Rpc3BsYXlfaW52ZXJzaW9uX2VuYWJsZWQKKGFjY2Vzc2liaWxpdHlfZGlzcGxheV9kYWx0b25pemVyX2VuYWJsZWQKGGFzc2lzdF9zdHJ1Y3R1cmVfZW5hYmxlZAoZYXNzaXN0X3NjcmVlbnNob3RfZW5hYmxlZAoOYmFja3VwX2VuYWJsZWQKE2JhY2t1cF9hdXRvX3Jlc3RvcmUKFm5mY19wYXltZW50X2ZvcmVncm91bmQKFXNwZWxsX2NoZWNrZXJfZW5hYmxlZAoOZG96ZV9hbHdheXNfb24KFWRvemVfcHVsc2Vfb25fcGlja191cAoYZG96ZV9wdWxzZV9vbl9kb3VibGVfdGFwCht1c2VyX2Z1bGxfZGF0YV9iYWNrdXBfYXdhcmUKF2JhY2t1cF9lbmFibGVkX2NhbGxfbG9nChZiYWNrdXBfc2V0dGluZ3Nfb3B0X2luChduaWdodF9kaXNwbGF5X2FjdGl2YXRlZAoWYXNzaXN0X2dlc3R1cmVfZW5hYmxlZAolYXNzaXN0X2dlc3R1cmVfc2lsZW5jZV9hbGVydHNfZW5hYmxlZAobYXNzaXN0X2dlc3R1cmVfd2FrZV9lbmFibGVkCh1hc3Npc3RfZ2VzdHVyZV9zZXR1cF9jb21wbGV0ZQoOYWRhcHRpdmVfc2xlZXAKLmJhY2t1cF9lbmFibGVkOmNvbS5hbmRyb2lkLnByb3ZpZGVycy50ZWxlcGhvbnkKHWRpc3BsYXlfd2hpdGVfYmFsYW5jZV9lbmFibGVkChJzZWVuX3R1bmVyX3dhcm5pbmcKE3VzZXJfc2V0dXBfY29tcGxldGUKEGNvbnRyb2xzX2VuYWJsZWQKDWF3YXJlX2VuYWJsZWQKGWRvemVfd2FrZV9kaXNwbGF5X2dlc3R1cmUKDHNraXBfZ2VzdHVyZQoPc2lsZW5jZV9nZXN0dXJlCgt0YXBfZ2VzdHVyZQocbm90aWZpY2F0aW9uX2hpc3RvcnlfZW5hYmxlZAoZYWRhcHRpdmVfY2hhcmdpbmdfZW5hYmxlZAoecmVkdWNlX2JyaWdodF9jb2xvcnNfYWN0aXZhdGVkCh5mYWNlX3VubG9ja19kaXNtaXNzZXNfa2V5Z3VhcmQKCnNtYXJ0c3BhY2UKE3FzX21lZGlhX3Jlc3VtcHRpb24KEnFzX21lZGlhX3JlY29tbWVuZAoXY29udGVudF9jYXB0dXJlX2VuYWJsZWQKIGFjY2Vzc2liaWxpdHlfbGFyZ2VfcG9pbnRlcl9pY29uCh5yZWR1Y2VfYnJpZ2h0X2NvbG9yc19hY3RpdmF0ZWQ
settings_stats/SecureFeature__float_whitelist=Chphc3Npc3RfZ2VzdHVyZV9zZW5zaXRpdml0eQ
settings_stats/SecureFeature__integer_whitelist=Chpsb2NhdGlvbl9wcm92aWRlcnNfYWxsb3dlZAoSbG9uZ19wcmVzc190aW1lb3V0CiBhY2Nlc3NpYmlsaXR5X2Rpc3BsYXlfZGFsdG9uaXplcgoebG9ja19zY3JlZW5fbG9ja19hZnRlcl90aW1lb3V0ChB0dHNfZGVmYXVsdF9yYXRlChduaWdodF9kaXNwbGF5X2F1dG9fbW9kZQoPbmF2aWdhdGlvbl9tb2RlCg11aV9uaWdodF9tb2RlCh9uaWdodF9kaXNwbGF5X2NvbG9yX3RlbXBlcmF0dXJlCh1uaWdodF9kaXNwbGF5X2N1c3RvbV9lbmRfdGltZQofbmlnaHRfZGlzcGxheV9jdXN0b21fc3RhcnRfdGltZQoWc2tpcF9nZXN0dXJlX2RpcmVjdGlvbgoacmVkdWNlX2JyaWdodF9jb2xvcnNfbGV2ZWwKK3JlZHVjZV9icmlnaHRfY29sb3JzX3BlcnNpc3RfYWNyb3NzX3JlYm9vdHMKJmFjY2Vzc2liaWxpdHlfbWFnbmlmaWNhdGlvbl9jYXBhYmlsaXR5ChFjYW1lcmFfYXV0b3JvdGF0ZQoWdWlfdHJhbnNsYXRpb25fZW5hYmxlZAoWZm9udF93ZWlnaHRfYWRqdXN0bWVudAoWZGlzcGxheV9kZW5zaXR5X2ZvcmNlZA
settings_stats/SecureFeature__string_whitelist=Ch5lbmFibGVkX2FjY2Vzc2liaWxpdHlfc2VydmljZXMKCWFzc2lzdGFudAoaZGlhbGVyX2RlZmF1bHRfYXBwbGljYXRpb24KF3Ntc19kZWZhdWx0X2FwcGxpY2F0aW9uChRkZWZhdWx0X2lucHV0X21ldGhvZAoWZW5hYmxlZF9wcmludF9zZXJ2aWNlcwoeZW5hYmxlZF9ub3RpZmljYXRpb25fbGlzdGVuZXJzCitlbmFibGVkX25vdGlmaWNhdGlvbl9wb2xpY3lfYWNjZXNzX3BhY2thZ2VzCh5lbmFibGVkX25vdGlmaWNhdGlvbl9hc3Npc3RhbnQKIWxvY2F0aW9uX3Byb3ZpZGVyc19hbGxvd2VkX3N0cmluZwokdGhlbWVfY3VzdG9taXphdGlvbl9vdmVybGF5X3BhY2thZ2VzCh1sb2NrX3NjcmVlbl9jdXN0b21fY2xvY2tfZmFjZQoOaWNvbl9ibGFja2xpc3QKDnN5c3VpX3FzX3RpbGVz
settings_stats/SystemFeature__boolean_whitelist=ChZzY3JlZW5fYnJpZ2h0bmVzc19tb2RlChZhY2NlbGVyb21ldGVyX3JvdGF0aW9uCgp2aWJyYXRlX29uChR2aWJyYXRlX3doZW5fcmluZ2luZwoUYXBwbHlfcmFtcGluZ19yaW5nZXIKF2hhcHRpY19mZWVkYmFja19lbmFibGVkChhub3RpZmljYXRpb25fbGlnaHRfcHVsc2UKE2xvY2tfdG9fYXBwX2VuYWJsZWQKF2xvY2tfdG9fYXBwX2V4aXRfbG9ja2VkCglkdG1mX3RvbmUKGWxvY2tzY3JlZW5fc291bmRzX2VuYWJsZWQKF2NoYXJnaW5nX3NvdW5kc19lbmFibGVkChVzb3VuZF9lZmZlY3RzX2VuYWJsZWQKF2hhcHRpY19mZWVkYmFja19lbmFibGVkCg1zaG93X3Bhc3N3b3JkCh9zdGF0dXNfYmFyX3Nob3dfYmF0dGVyeV9wZXJjZW50ChFwZWFrX3JlZnJlc2hfcmF0ZQ
settings_stats/SystemFeature__float_whitelist=ChpzY3JlZW5fYXV0b19icmlnaHRuZXNzX2FkagoKZm9udF9zY2FsZQ
settings_stats/SystemFeature__integer_whitelist=ChFzY3JlZW5fYnJpZ2h0bmVzcwoUdm9sdW1lX211c2ljX3NwZWFrZXIKFHZvbHVtZV9hbGFybV9zcGVha2VyChN2b2x1bWVfcmluZ19zcGVha2VyChJzY3JlZW5fb2ZmX3RpbWVvdXQKCnRpbWVfMTJfMjQKDXBvaW50ZXJfc3BlZWQKEmRpc3BsYXlfY29sb3JfbW9kZQoZYWxhcm1fdmlicmF0aW9uX2ludGVuc2l0eQoZbWVkaWFfdmlicmF0aW9uX2ludGVuc2l0eQogbm90aWZpY2F0aW9uX3ZpYnJhdGlvbl9pbnRlbnNpdHkKGHJpbmdfdmlicmF0aW9uX2ludGVuc2l0eQoZaGFwdGljX2ZlZWRiYWNrX2ludGVuc2l0eQ
settings_stats/SystemFeature__string_whitelist=
statsd_java/include_certificate_hash=false
storage_native_boot/fuse_enabled=1
system_scheduler/EnableFastMetricsCollection__dummy_flag=true
systemui/apply_sharing_app_limits_in_sysui=true
systemui/enable_screenshot_corner_flow=false
systemui/enable_screenshot_scrolling=false
systemui/nas_generate_actions=true
systemui/nas_generate_replies=true
systemui/nas_max_messages_to_extract=5
systemui/nas_max_suggestions=3
systemui/predict_using_people_service_share=true
systemui/share_sheet_direct_share_timeout=1500
systemui/ssin_edit_choices_before_sending=false
systemui/ssin_enabled=true
systemui/ssin_max_num_actions=-1
systemui/ssin_max_squeeze_remeasure_attempts=3
systemui/ssin_min_num_system_generated_replies=0
systemui/ssin_requires_targeting_p=true
systemui/ssin_show_in_heads_up=true
telephony/ramping_ringer_duration=10000
telephony/ramping_ringer_enabled=false
telephony/ramping_ringer_vibration_duration=5000
textclassifier/generate_links_max_text_length=10000
textclassifier/manifest_download_max_attempts=3
textclassifier/manifest_download_required_network_type=UNMETERED
textclassifier/manifest_url_actions_suggestions_de-ch=https://www.gstatic.com/android/text_classifier/actions/q/v103/de_CH.model.manifest
textclassifier/manifest_url_actions_suggestions_de-li=https://www.gstatic.com/android/text_classifier/actions/q/v103/de_CH.model.manifest
textclassifier/manifest_url_actions_suggestions_de=https://www.gstatic.com/android/text_classifier/actions/q/v103/de.model.manifest
textclassifier/manifest_url_actions_suggestions_en=https://www.gstatic.com/android/text_classifier/actions/q/v104/en.model.manifest
textclassifier/manifest_url_actions_suggestions_es=https://www.gstatic.com/android/text_classifier/actions/q/v103/es.model.manifest
textclassifier/manifest_url_actions_suggestions_fr=https://www.gstatic.com/android/text_classifier/actions/q/v103/fr.model.manifest
textclassifier/manifest_url_actions_suggestions_it=https://www.gstatic.com/android/text_classifier/actions/q/v103/it.model.manifest
textclassifier/manifest_url_actions_suggestions_ja=https://www.gstatic.com/android/text_classifier/actions/q/v103/ja.model.manifest
textclassifier/manifest_url_actions_suggestions_ko=https://www.gstatic.com/android/text_classifier/actions/q/v103/ko.model.manifest
textclassifier/manifest_url_actions_suggestions_pt-br=https://www.gstatic.com/android/text_classifier/actions/q/v103/pt_BR.model.manifest
textclassifier/manifest_url_actions_suggestions_universal=https://www.gstatic.com/android/text_classifier/actions/q/v103/default.model.manifest
textclassifier/manifest_url_actions_suggestions_zh-hant=
textclassifier/manifest_url_actions_suggestions_zh=
textclassifier/manifest_url_annotator_ar=https://www.gstatic.com/android/text_classifier/s/v902/ar.fb.manifest
textclassifier/manifest_url_annotator_da=https://www.gstatic.com/android/text_classifier/s/v902/da.fb.manifest
textclassifier/manifest_url_annotator_de=https://www.gstatic.com/android/text_classifier/s/v902/de.fb.manifest
textclassifier/manifest_url_annotator_en=https://www.gstatic.com/android/text_classifier/s/v902/en.fb.manifest
textclassifier/manifest_url_annotator_es=https://www.gstatic.com/android/text_classifier/s/v902/es.fb.manifest
textclassifier/manifest_url_annotator_fr=https://www.gstatic.com/android/text_classifier/s/v902/fr.fb.manifest
textclassifier/manifest_url_annotator_it=https://www.gstatic.com/android/text_classifier/s/v902/it.fb.manifest
textclassifier/manifest_url_annotator_ja=https://www.gstatic.com/android/text_classifier/s/v902/ja.fb.manifest
textclassifier/manifest_url_annotator_ko=https://www.gstatic.com/android/text_classifier/s/v902/ko.fb.manifest
textclassifier/manifest_url_annotator_nb=https://www.gstatic.com/android/text_classifier/s/v902/no.fb.manifest
textclassifier/manifest_url_annotator_nl=https://www.gstatic.com/android/text_classifier/s/v902/nl.fb.manifest
textclassifier/manifest_url_annotator_nn=https://www.gstatic.com/android/text_classifier/s/v902/no.fb.manifest
textclassifier/manifest_url_annotator_no=https://www.gstatic.com/android/text_classifier/s/v902/no.fb.manifest
textclassifier/manifest_url_annotator_pl=https://www.gstatic.com/android/text_classifier/s/v902/pl.fb.manifest
textclassifier/manifest_url_annotator_pt=https://www.gstatic.com/android/text_classifier/s/v902/pt.fb.manifest
textclassifier/manifest_url_annotator_ru=https://www.gstatic.com/android/text_classifier/s/v902/ru.fb.manifest
textclassifier/manifest_url_annotator_sv=https://www.gstatic.com/android/text_classifier/s/v902/sv.fb.manifest
textclassifier/manifest_url_annotator_th=https://www.gstatic.com/android/text_classifier/s/v902/th.fb.manifest
textclassifier/manifest_url_annotator_tr=https://www.gstatic.com/android/text_classifier/s/v902/tr.fb.manifest
textclassifier/manifest_url_annotator_universal=https://www.gstatic.com/android/text_classifier/s/v902/universal.fb.manifest
textclassifier/manifest_url_annotator_zh=https://www.gstatic.com/android/text_classifier/s/v902/zh.fb.manifest
textclassifier/manifest_url_lang_id_universal=https://www.gstatic.com/android/text_classifier/langid/q/v1/model.smfb.manifest
textclassifier/model_download_backoff_delay_in_millis=3600000
textclassifier/model_download_manager_enabled=true
textclassifier/model_download_worker_max_attempts=5
textclassifier/model_url_blocklist=
textclassifier/textclassifier_service_package_override=
wallpaper_content/G_WALLPAPER_GALLERY=false
wifi/abnormal_connection_failure_bugreport_enabled=true
wifi/abnormal_disconnection_bugreport_enabled=false
wifi/assoc_rejection_count_min=8
wifi/assoc_rejection_high_thr_percent=40
wifi/assoc_timeout_count_min=8
wifi/assoc_timeout_high_thr_percent=40
wifi/auth_failure_count_min=8
wifi/auth_failure_high_thr_percent=40
wifi/bug_report_min_window_ms=144000000
wifi/connection_failure_count_min=16
wifi/connection_failure_disconnection_count_min=6
wifi/connection_failure_disconnection_high_thr_percent=20
wifi/connection_failure_high_thr_percent=80
wifi/disconnection_nonlocal_count_min=5
wifi/disconnection_nonlocal_high_thr_percent=20
wifi/health_monitor_fw_alert_valid_time_ms=-1
wifi/health_monitor_min_num_connection_attempt=5
wifi/health_monitor_min_rssi_thr_dbm=-60
wifi/health_monitor_ratio_thr_numerator=8
wifi/health_monitor_rssi_poll_valid_time_ms=2700
wifi/health_monitor_short_connection_duration_thr_ms=20000
wifi/nonstationary_scan_rssi_valid_time_ms=5000
wifi/report_bug_report_threshold_extra_ratio=2
wifi/short_connection_nonlocal_count_min=3
wifi/short_connection_nonlocal_high_thr_percent=15
wifi/stationary_scan_rssi_valid_time_ms=30000
window_manager/system_gesture_exclusion_log_debounce_millis=1500
Spoiler: DEVICE_CONFIG KNOWLEDGE
Time Overview | Android Open Source Project
source.android.com
Boot Image Profiles | Android Open Source Project
source.android.com
Adding a New Device | Android Open Source Project
source.android.com
FUSE Passthrough | Android Open Source Project
source.android.com
Spoiler: DEVMEM
devmem
Spoiler: DEVMEM COMMANDS
usage: devmem ADDR [WIDTH [DATA]]
Read/write physical address via /dev/mem.
WIDTH is 1, 2, 4, or 8 bytes (default 4).
Spoiler: DEVMEM KNOWLEDGE
Accessing physical addresses through devmem
Catalog 1. Write in front 2.devmem use 3. application layer 4. kernel layer 1. Write in front Recently, when debugging, physical memory needs to be accessed at the user level, and it is found that the application layer can use devmem tools to access physical addresses. Looking at the source...
programmer.group
Spoiler: DEX2OAT
dex2oat
inaccessible or not found
Spoiler: DF
df
Spoiler: DF COMMANDS
usage: df [-HPkhi] [-t type] [FILE...]
The "disk free" command shows total/used/available disk space for
each filesystem listed on the command line, or all currently mounted
filesystems.
-a Show all (including /proc and friends)
-P The SUSv3 "Pedantic" option
-k Sets units back to 1024 bytes (the default without -P)
-h Human readable (K=1024)
-H Human readable (k=1000)
-i Show inodes instead of blocks
-t type Display only filesystems of this type
Pedantic provides a slightly less useful output format dictated by Posix,
and sets the units to 512 bytes instead of the default 1024 bytes.
Spoiler: PRODUCES THIS TEXT
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/block/dm-8 1650112 1645120 0 100% /
tmpfs 1958332 2016 1956316 1% /dev
tmpfs 1958332 0 1958332 0% /mnt
/dev/block/dm-9 432920 431604 0 100% /vendor
/dev/block/dm-10 1741652 1736440 0 100% /product
/dev/block/dm-11 146720 146280 0 100% /odm
tmpfs 1958332 0 1958332 0% /apex
/dev/block/mmcblk0p51 6800 40 6424 1% /mnt/elabel
/dev/block/dm-13 111117644 11761032 99209156 11% /data
/dev/block/dm-12 5720 5692 0 100% /apex/[email protected]
/dev/block/dm-14 712 684 16 98% /apex/[email protected]
/dev/block/dm-15 6132 6104 0 100% /apex/[email protected]
/dev/block/dm-16 18900 18872 0 100% /apex/[email protected]
/dev/block/dm-17 4376 4344 0 100% /apex/[email protected]
/dev/block/dm-18 11408 11376 0 100% /apex/[email protected]
/dev/block/dm-19 692 664 16 98% /apex/[email protected]
/dev/block/dm-20 3824 3796 0 100% /apex/[email protected]
/dev/block/dm-21 7936 7908 0 100% /apex/[email protected]
/dev/block/dm-22 12796 12768 0 100% /apex/[email protected]
/dev/block/dm-23 1856 1828 0 100% /apex/[email protected]
/dev/block/dm-24 6468 6436 0 100% /apex/[email protected]
/dev/block/dm-25 4940 4912 0 100% /apex/[email protected]
/dev/block/dm-26 2764 2736 0 100% /apex/[email protected]
/dev/block/dm-27 844 816 12 99% /apex/[email protected]
/dev/block/dm-28 8500 8468 0 100% /apex/[email protected]
/dev/block/loop22 85004 84972 0 100% /apex/[email protected]
/dev/block/loop23 232 92 136 41% /apex/[email protected]
/dev/block/loop24 24640 24608 0 100% /apex/[email protected]
/dev/block/loop25 111160 111132 0 100% /apex/[email protected]
/dev/block/loop26 5112 5076 0 100% /apex/[email protected]
/dev/fuse 111117644 11761032 99209156 11% /storage/emulated
Spoiler: DIFF
diff
Spoiler: DIFF COMMANDS
usage: diff [-abBdiNqrTstw] [-L LABEL] [-S FILE] [-U LINES] FILE1 FILE2
-a Treat all files as text
-b Ignore changes in the amount of whitespace
-B Ignore changes whose lines are all blank
-d Try hard to find a smaller set of changes
-i Ignore case differences
-L Use LABEL instead of the filename in the unified header
-N Treat absent files as empty
-q Output only whether files differ
-r Recurse
-S Start with FILE when comparing directories
-T Make tabs line up by prefixing a tab when necessary
-s Report when two files are the same
-t Expand tabs to spaces in output
-u Unified diff
-U Output LINES lines of context
-w Ignore all whitespace
--color Colored output
--strip-trailing-cr Strip trailing '\r's from input lines
Spoiler: DIRNAME
dirname
Spoiler: DIRNAME COMMANDS
usage: dirname PATH...
Show directory portion of path.
Spoiler: DISABLE-VERITY
disable-verity
verity cannot be disabled/enabled - USER build
Spoiler: DISABLE-VERITY KNOWLEDGE
An Introduction to dm-verity on Android | Kynetics - Technical Notes
Learn about Android's implementation of verified boot - dm-verity.
www.kynetics.com
Spoiler: DMCTL
dmctl
Spoiler: DMCTL COMMANDS
usage: dmctl <command> [command options]
dmctl -f file
commands:
create <dm-name> [-ro] <targets...>
delete <dm-name>
list <devices | targets> [-v]
getpath <dm-name>
info <dm-name>
status <dm-name>
resume <dm-name>
suspend <dm-name>
table <dm-name>
help
-f file reads command and all parameters from named file
Target syntax:
<target_type> <start_sector> <num_sectors> [target_data]
Spoiler: DMCTL KNOWLEDGE
dmctl(8) [netbsd man page]
dmctl works with the device-mapper kernel driver. It can send and receive information and commands from the dm driver. version Print driver and lib version. targets List available kernel targets. create Create device with [dm devi
www.unix.com
Spoiler: DMESG
dmesg
Spoiler: DMESG COMMANDS
usage: dmesg [-Cc] [-r|-t|-T] [-n LEVEL] [-s SIZE] [-w]
Print or control the kernel ring buffer.
-C Clear ring buffer without printing
-c Clear ring buffer after printing
-n Set kernel logging LEVEL (1-9)
-r Raw output (with <level markers>)
-S Use syslog(2) rather than /dev/kmsg
-s Show the last SIZE many bytes
-T Human readable timestamps
-t Don't print timestamps
-w Keep waiting for more output (aka --follow)
Spoiler: DMESG KNOWLEDGE
What is dmesg in Linux, And How Do I Use It?
dmesg, the handy kernel log message, can be used for troubleshooting many issues with a Linux computer system. Learn more about what it is, how it works and how to access it in this article.
linuxconfig.org
Spoiler: DNSMASQ
dnsmasq
inaccessible or not found
Spoiler: DOS2UNIX
dos2unix
Spoiler: DOS2UNIX COMMANDS
usage: dos2unix [FILE...]
Convert newline format from dos "\r\n" to unix "\n".
If no files listed copy from stdin, "-" is a synonym for stdin.
Spoiler: DOS2UNIX KNOWLEDGE
DOS to Unix: Commands and Examples {6 Methods Explained}
6 ways to convert a DOS to Unix file by removing the r line ending or replacing it with just line feeds. Convert DOS to Unix and vice versa.
phoenixnap.com
Spoiler: DPM
dpm
Spoiler: DPM COMMANDS
usage: dpm [subcommand] [options]
usage: dpm set-active-admin [ --user <USER_ID> | current ] <COMPONENT>
usage: dpm set-device-owner [ --user <USER_ID> | current *EXPERIMENTAL* ] [ --name <NAME> ] <COMPONENT>
usage: dpm set-profile-owner [ --user <USER_ID> | current ] [ --name <NAME> ] <COMPONENT>
usage: dpm remove-active-admin [ --user <USER_ID> | current ] [ --name <NAME> ] <COMPONENT>
dpm set-active-admin: Sets the given component as active admin for an existing user.
dpm set-device-owner: Sets the given component as active admin, and its package as device owner.
dpm set-profile-owner: Sets the given component as active admin and profile owner for an existing user.
dpm remove-active-admin: Disables an active admin, the admin must have declared android:testOnly in the application in its manifest. This will also remove device and profile owners.
dpm clear-freeze-period-record: clears framework-maintained record of past freeze periods that the device went through. For use during feature development to prevent triggering restriction on setting freeze periods.
dpm force-network-logs: makes all network logs available to the DPC and triggers DeviceAdminReceiver.onNetworkLogsAvailable() if needed.
dpm force-security-logs: makes all security logs available to the DPC and triggers DeviceAdminReceiver.onSecurityLogsAvailable() if needed.
usage: dpm mark-profile-owner-on-organization-owned-device: [ --user <USER_ID> | current ] <COMPONENT>
Spoiler: DPM KNOWLEDGE
adbcommand.com - adbcommand Resources and Information.
adbcommand.com is your first and best source for all of the information you’re looking for. From general topics to more of what you would expect to find here, adbcommand.com has it all. We hope you find what you are searching for!
adbcommand.com
https://developer.android.com/reference/android/app/admin/DevicePolicyManager
Spoiler: DRMSERVER
drmserver
inaccessible or not found
Spoiler: DU
du
Spoiler: DU COMMANDS
usage: du [-d N] [-askxHLlmc] [FILE...]
Show disk usage, space consumed by files and directories.
Size in:
-k 1024 byte blocks (default)
-K 512 byte blocks (posix)
-m Megabytes
-h Human readable (e.g., 1K 243M 2G)
What to show:
-a All files, not just directories
-H Follow symlinks on cmdline
-L Follow all symlinks
-s Only total size of each argument
-x Don't leave this filesystem
-c Cumulative total
-d N Only depth < N
-l Disable hardlink filter
Spoiler: DUMP.F2FS
dump.f2fs
inaccessible or not found
Spoiler: DUMPSTATE
dumpstate
inaccessible or not found
Spoiler: DUMPSYS
dumpsys
Spoiler: DUMPSYS COMMANDS
usage: dumpsys
To dump all services.
or:
dumpsys [-t TIMEOUT] [--priority LEVEL] [--pid] [--help | -l | --skip SERVICES | SERVICE [ARGS]]
--help: shows this help
-l: only list services, do not dump them
-t TIMEOUT_SEC: TIMEOUT to use in seconds instead of default 10 seconds
-T TIMEOUT_MS: TIMEOUT to use in milliseconds instead of default 10 seconds
--pid: dump PID instead of usual dump
--proto: filter services that support dumping data in proto format. Dumps
will be in proto format.
--priority LEVEL: filter services based on specified priority
LEVEL must be one of CRITICAL | HIGH | NORMAL
--skip SERVICES: dumps all services but SERVICES (comma-separated list)
SERVICE [ARGS]: dumps only service SERVICE, optionally passing ARGS to it
Spoiler: DUMPSYS VISUAL
Currently unsure what this is Actually doing, will update later when I know~!
Spoiler: E2FREEFRAG
e2freefrag
usage: e2freefrag [-c chunksize in kb] [-h] device_name
Spoiler: E2FSCK
e2fsck
inaccessible or not found
Spoiler: E2FSDROID
e2fsdroid
inaccessible or not found
Spoiler: ECHO
echo
typical echo command
Spoiler: EGREP
egrep
Spoiler: EGREP COMMANDS
usage: grep [-EFrivwcloqsHbhn] [-ABC NUM] [-m MAX] [-e REGEX]... [-MS PATTERN]... [-f REGFILE] [FILE]...
Show lines matching regular expressions. If no -e, first argument is
regular expression to match. With no files (or "-" filename) read stdin.
Returns 0 if matched, 1 if no match found, 2 for command errors.
-e Regex to match. (May be repeated.)
-f File listing regular expressions to match.
file search:
-r Recurse into subdirectories (defaults FILE to ".")
-R Recurse into subdirectories and symlinks to directories
-M Match filename pattern (--include)
-S Skip filename pattern (--exclude)
--exclude-dir=PATTERN Skip directory pattern
-I Ignore binary files
match type:
-A Show NUM lines after -B Show NUM lines before match
-C NUM lines context (A+B) -E extended regex syntax
-F fixed (literal match) -a always text (not binary)
-i case insensitive -m match MAX many lines
-v invert match -w whole word (implies -E)
-x whole line -z input NUL terminated
display modes: (default: matched line)
-c count of matching lines -l show only matching filenames
-o only matching part -q quiet (errors only)
-s silent (no error msg) -Z output NUL terminated
output prefix (default: filename if checking more than 1 file)
-H force filename -b byte offset of match
-h hide filename -n line number of match
Spoiler: REGEX EXAMPLES
For the time being, I do not quite understand. Here is further study material.
Regular Expression (Regex) Tutorial
www3.ntu.edu.sg
Spoiler: ENABLE-VERITY
enable-verity
verity cannot be disabled/enabled - USER build
Spoiler: ENV
env
Spoiler: ENV COMMANDS
usage: env [-i] [-u NAME] [NAME=VALUE...] [COMMAND...]
Set the environment for command invocation, or list environment variables.
-i Clear existing environment
-u NAME Remove NAME from the environment
-0 Use null instead of newline in output
Spoiler: PRODUCES THIS TEXT
ANDROID_DATA=/data
ANDROID_ART_ROOT=/apex/com.android.art
HOME=/
ANDROID_TZDATA_ROOT=/apex/com.android.tzdata
SYSTEMSERVERCLASSPATH=/system/framework/com.android.location.provider.jar:/system/framework/services.jar:/system/framework/ethernet-service.jar:/apex/com.android.permission/javalib/service-permission.jar:/apex/com.android.wifi/javalib/service-wifi.jar:/apex/com.android.ipsec/javalib/android.net.ipsec.ike.jar
TERM=xterm-256color
ANDROID_SOCKET_adbd=18
ANDROID_STORAGE=/storage
EXTERNAL_STORAGE=/sdcard
DOWNLOAD_CACHE=/data/cache
LOGNAME=shell
ANDROID_ASSETS=/system/app
DEX2OATBOOTCLASSPATH=/apex/com.android.art/javalib/core-oj.jar:/apex/com.android.art/javalib/core-libart.jar:/apex/com.android.art/javalib/core-icu4j.jar:/apex/com.android.art/javalib/okhttp.jar:/apex/com.android.art/javalib/bouncycastle.jar:/apex/com.android.art/javalib/apache-xml.jar:/system/framework/framework.jar:/system/framework/ext.jar:/system/framework/telephony-common.jar:/system/framework/voip-common.jar:/system/framework/ims-common.jar:/system/framework/framework-atb-backward-compatibility.jar:/system/framework/mediatek-telephony-base.jar:/system/framework/mediatek-telephony-common.jar:/system/framework/mediatek-common.jar:/system/framework/mediatek-framework.jar:/system/framework/mediatek-ims-common.jar:/system/framework/mediatek-ims-base.jar:/system/framework/mediatek-telecom-common.jar
BOOTCLASSPATH=/apex/com.android.art/javalib/core-oj.jar:/apex/com.android.art/javalib/core-libart.jar:/apex/com.android.art/javalib/core-icu4j.jar:/apex/com.android.art/javalib/okhttp.jar:/apex/com.android.art/javalib/bouncycastle.jar:/apex/com.android.art/javalib/apache-xml.jar:/system/framework/framework.jar:/system/framework/ext.jar:/system/framework/telephony-common.jar:/system/framework/voip-common.jar:/system/framework/ims-common.jar:/system/framework/framework-atb-backward-compatibility.jar:/system/framework/mediatek-telephony-base.jar:/system/framework/mediatek-telephony-common.jar:/system/framework/mediatek-common.jar:/system/framework/mediatek-framework.jar:/system/framework/mediatek-ims-common.jar:/system/framework/mediatek-ims-base.jar:/system/framework/mediatek-telecom-common.jar:/apex/com.android.conscrypt/javalib/conscrypt.jar:/apex/com.android.media/javalib/updatable-media.jar:/apex/com.android.mediaprovider/javalib/framework-mediaprovider.jar:/apex/com.android.os.statsd/javalib/framework-statsd.jar:/apex/com.android.permission/javalib/framework-permission.jar:/apex/com.android.sdkext/javalib/framework-sdkextensions.jar:/apex/com.android.wifi/javalib/framework-wifi.jar:/apex/com.android.tethering/javalib/framework-tethering.jar
SHELL=/bin/sh
ANDROID_BOOTLOGO=1
ASEC_MOUNTPOINT=/mnt/asec
HOSTNAME=RNN_sprout
USER=shell
TMPDIR=/data/local/tmp
PATH=/product/bin:/apex/com.android.runtime/bin:/apex/com.android.art/bin:/system_ext/bin:/system/bin:/system/xbin:/odm/bin:/vendor/bin:/vendor/xbin
ANDROID_ROOT=/system
ANDROID_I18N_ROOT=/apex/com.android.i18n
Spoiler: EXPAND
expand
Spoiler: EXPAND COMMANDS
usage: expand [-t TABLIST] [FILE...]
Expand tabs to spaces according to tabstops.
-t TABLIST
Specify tab stops, either a single number instead of the default 8,
or a comma separated list of increasing numbers representing tabstop
positions (absolute, not increments) with each additional tab beyond
that becoming one space.
Spoiler: EXPR
expr
Spoiler: EXPR COMMANDS
usage: expr ARG1 OPERATOR ARG2...
Evaluate expression and print result. For example, "expr 1 + 2".
The supported operators are (grouped from highest to lowest priority):
( ) : * / % + - != <= < >= > = & |
Each constant and operator must be a separate command line argument.
All operators are infix, meaning they expect a constant (or expression
that resolves to a constant) on each side of the operator. Operators of
the same priority (within each group above) are evaluated left to right.
Parentheses may be used (as separate arguments) to elevate the priority
of expressions.
Calling expr from a command shell requires a lot of \( or '*' escaping
to avoid interpreting shell control characters.
The & and | operators are logical (not bitwise) and may operate on
strings (a blank string is "false"). Comparison operators may also
operate on strings (alphabetical sort).
Constants may be strings or integers. Comparison, logical, and regex
operators may operate on strings (a blank string is "false"), other
operators require integers.
Spoiler: ALL BIN SYSTEMS CONTINUED PART 4 (F-G)
Spoiler: FALLOCATE
fallocate
Spoiler: FILE SYSTEM ALLOCATE COMMANDS
usage: fallocate [-l size] [-o offset] file
Tell the filesystem to allocate space for a file
Spoiler: FALSE
false
does nothing, does not halt shell
Spoiler: FGREP
fgrep
Same as "EGREP"
Spoiler: FILE
file
Spoiler: FILE COMMANDS
usage: file [-bhLs] [FILE...]
Examine the given files and describe their content types.
-b Brief (no filename)
-h Don't follow symlinks (default)
-L Follow symlinks
-s Show block/char device contents
Spoiler: FIND
find
Spoiler: FIND COMMANDS
usage: find [-HL] [DIR...] [<options>]
Search directories for matching files.
Default: search ".", match all, -print matches.
-H Follow command line symlinks -L Follow all symlinks
Match filters:
-name PATTERN filename with wildcards (-iname case insensitive)
-path PATTERN path name with wildcards (-ipath case insensitive)
-user UNAME belongs to user UNAME -nouser user ID not known
-group GROUP belongs to group GROUP -nogroup group ID not known
-perm [-/]MODE permissions (-=min /=any) -prune ignore dir contents
-size N[c] 512 byte blocks (c=bytes) -xdev only this filesystem
-links N hardlink count -atime N accessed N units ago
-ctime N created N units ago -mtime N modified N units ago
-newer FILE newer mtime than FILE -mindepth N at least N dirs down
-depth ignore contents of dir -maxdepth N at most N dirs down
-inum N inode number N -empty empty files and dirs
-type [bcdflps] type is (block, char, dir, file, symlink, pipe, socket)
-true always true -false always false
-context PATTERN security context
-newerXY FILE X=acm time > FILE's Y=acm time (Y=t: FILE is literal time)
Numbers N may be prefixed by a - (less than) or + (greater than). Units for
-Xtime are d (days, default), h (hours), m (minutes), or s (seconds).
Combine matches with:
!, -a, -o, ( ) not, and, or, group expressions
Actions:
-print Print match with newline -print0 Print match with null
-exec Run command with path -execdir Run command in file's dir
-ok Ask before exec -okdir Ask before execdir
-delete Remove matching file/dir -printf FORMAT Print using format string
Commands substitute "{}" with matched file. End with ";" to run each file,
or "+" (next argument after "{}") to collect and run with multiple files.
-printf FORMAT characters are \ escapes and:
%b 512 byte blocks used
%f basename %g textual gid %G numeric gid
%i decimal inode %l target of symlink %m octal mode
%M ls format type/mode %p path to file %P path to file minus DIR
%s size in bytes %[email protected] mod time as unixtime
%u username %U numeric uid %Z security context
Spoiler: PRINTED THIS
./AudioSetParam
./abb
./acpi
./am
find: './apexd': Permission denied
./app_process
./app_process32
./app_process64
./appops
./appwidget
./atrace
find: './audioserver': Permission denied
find: './auditctl': Permission denied
./awk
./badblocks
./base64
./basename
find: './batterywarning': Permission denied
./bc
./bcc
find: './blank_screen': Permission denied
find: './blkid': Permission denied
./blockdev
./bmgr
find: './boot_logo_updater': Permission denied
find: './bootanimation': Permission denied
find: './bootstat': Permission denied
./bootstrap
./bootstrap/linker_asan
./bootstrap/linker_asan64
./bootstrap/linker64
./bootstrap/linker
find: './boringssl_self_test32': Permission denied
find: './boringssl_self_test64': Permission denied
find: './bpfloader': Permission denied
./bu
./bugreport
./bugreportz
./bunzip2
./bzcat
./bzip2
./cal
find: './camerapostalgo': Permission denied
find: './cameraserver': Permission denied
./cat
find: './charger': Permission denied
./chattr
./chcon
./chgrp
./chmod
./chown
./chroot
./chrt
./cksum
find: './clatd': Permission denied
./clear
./cmd
./cmp
./comm
./content
./cp
./cpio
find: './cppreopts.sh': Permission denied
./crash_dump32
./crash_dump64
find: './credstore': Permission denied
./cut
./dalvikvm
./date
./dd
./debuggerd
./defrag.f2fs
./device_config
./devmem
find: './dex2oat': Permission denied
./df
./diff
./dirname
./disable-verity
./dmctl
./dmesg
find: './dnsmasq': Permission denied
./dos2unix
./dpm
find: './drmserver': Permission denied
./du
./dump.f2fs
find: './dumpstate': Permission denied
./dumpsys
./e2freefrag
find: './e2fsck': Permission denied
find: './e2fsdroid': Permission denied
./echo
./egrep
./enable-verity
./env
./expand
./expr
./fallocate
./false
./fgrep
./file
./find
find: './flags_health_check': Permission denied
./flock
./fmt
./free
find: './fsck.f2fs': Permission denied
find: './fsck_msdos': Permission denied
find: './fsverity_init': Permission denied
./fsync
find: './gatekeeperd': Permission denied
./getconf
./getenforce
./getevent
./getprop
find: './gpuservice': Permission denied
./grep
./groups
./gsi_tool
find: './gsid': Permission denied
./gunzip
./gzip
./head
find: './heapprofd': Permission denied
./hid
./hostname
./hw
find: './hw/[email protected]': Permission denied
find: './hw/[email protected]': Permission denied
./hwclock
find: './hwservicemanager': Permission denied
./i2cdetect
./i2cdump
./i2cget
./i2cset
./iconv
./id
find: './idmap2': Permission denied
find: './idmap2d': Permission denied
./ifconfig
./ime
./incident
./incident-helper-cmd
find: './incident_helper': Permission denied
find: './incidentd': Permission denied
find: './init': Permission denied
./inotifyd
./input
./insmod
./install
find: './installd': Permission denied
./ionice
./iorap.cmd.compiler
./iorap.cmd.maintenance
find: './iorap.inode2filename': Permission denied
find: './iorap.prefetcherd': Permission denied
find: './iorapd': Permission denied
./iorenice
./ip
./ip-wrapper-1.0
./ip6tables
./ip6tables-restore
./ip6tables-save
./ip6tables-wrapper-1.0
./iptables
./iptables-restore
./iptables-save
./iptables-wrapper-1.0
find: './keystore': Permission denied
./keystore_cli_v2
./kill
./killall
find: './kpoc_charger': Permission denied
find: './lbs_dbg': Permission denied
./lcdc_screen_cap
./ld.mc
./ldd
./librank
./linker
./linker64
./linker_asan
./linker_asan64
find: './linkerconfig': Permission denied
find: './lmkd': Permission denied
./ln
./load_policy
./locksettings
./log
./logcat
find: './logd': Permission denied
./logname
./logwrapper
./losetup
./lpdump
find: './lpdumpd': Permission denied
./ls
./lsattr
./lshal
./lsmod
./lsof
./lspci
./lsusb
find: './make_f2fs': Permission denied
./md5sum
find: './mdnsd': Permission denied
find: './mediaextractor': Permission denied
find: './mediametrics': Permission denied
find: './mediaserver': Permission denied
./microcom
./mifunctiontest
find: './migrate_legacy_obb_data.sh': Permission denied
./mini-keyctl
./mkdir
find: './mke2fs': Permission denied
./mkfifo
./mkfs.ext2
./mkfs.ext3
./mkfs.ext4
./mknod
./mkswap
./mktemp
./modinfo
./modprobe
./monkey
./more
./mount
./mountpoint
./move_widevine_data.sh
find: './mtk_plpath_utils': Permission denied
find: './mtpd': Permission denied
./mv
./nc
./ndc
./ndc-wrapper-1.0
./netcat
find: './netd': Permission denied
./netstat
./nice
find: './netutils-wrapper-1.0': Permission denied
./newfs_msdos
./nl
./nohup
find: './notify_traceur.sh': Permission denied
./nproc
./nsenter
./od
./oem-iptables-init.sh
./otapreopt
find: './otapreopt_chroot': Permission denied
./otapreopt_script
find: './otapreopt_slot': Permission denied
./paste
./patch
./perfetto
./pgrep
./pidof
./ping
./ping6
./pkill
./pm
./pmap
find: './pppd': Permission denied
find: './preloads_copy.sh': Permission denied
find: './preloads_copy_ext.sh': Permission denied
find: './preopt2cachename': Permission denied
./printenv
./printf
./procrank
./ps
./pwd
find: './racoon': Permission denied
./readelf
./readlink
./realpath
./reboot
find: './recovery-persist': Permission denied
find: './recovery-refresh': Permission denied
./renice
./requestsync
find: './resize.f2fs': Permission denied
find: './resize2fs': Permission denied
./restorecon
./rm
./rmdir
./rmmod
find: './rss_hwm_reset': Permission denied
./run-as
./runcon
./schedtest
./screencap
./screenrecord
find: './sdcard': Permission denied
./secdiscard
./secilc
./sed
./sendevent
./sensorservice
./seq
./service
find: './servicemanager': Permission denied
./set-verity-state
./setenforce
./setprop
./setsid
./settings
find: './sgdisk': Permission denied
./sh
./sha1sum
./sha224sum
./sha256sum
./sha384sum
./sha512sum
./showmap
./simpleperf
./simpleperf_app_runner
./sleep
find: './sload_f2fs': Permission denied
./sm
find: './snapshotctl': Permission denied
./sort
./split
./ss
./start
./stat
./stop
find: './storaged': Permission denied
./strings
./stty
find: './surfaceflinger': Permission denied
./svc
./swapoff
./swapon
./sync
./sysctl
./tac
./tail
./tar
./taskset
./tc
./tc-wrapper-1.0
find: './tcpdump': Permission denied
./tee
./telecom
find: './terservice': Permission denied
./test
find: './thermald': Permission denied
./time
./timeout
find: './tombstoned': Permission denied
./toolbox
./top
./touch
./toybox
./tr
find: './traced': Permission denied
find: './traced_perf': Permission denied
find: './traced_probes': Permission denied
./trigger_perfetto
./true
./truncate
./tty
find: './tune2fs': Permission denied
./tzdatacheck
./ueventd
./uiautomator
./ulimit
./umount
./uname
find: './uncrypt': Permission denied
./uniq
./unix2dos
./unlink
./unshare
./unzip
find: './update_engine': Permission denied
find: './update_verifier': Permission denied
./uptime
find: './usbd': Permission denied
./usleep
./uudecode
./uuencode
./uuidgen
find: './vdc': Permission denied
find: './viewcompiler': Permission denied
./vmstat
find: './vold': Permission denied
find: './vold_prepare_subdirs': Permission denied
./vr
find: './vtservice': Permission denied
find: './wait_for_keymaster': Permission denied
./watch
find: './watchdogd': Permission denied
./wc
./which
./whoami
find: './wificond': Permission denied
./wm
./xargs
./xxd
./yes
./zcat
./zipinfo
./ziptool
Spoiler: FLAGS_HEALTH_CHECK
flags_health_check
inaccessible or not found
Spoiler: FLOCK
Spoiler: FILE LOCK COMMANDS
usage: flock [-sxun] fd
Manage advisory file locks.
-s Shared lock
-x Exclusive lock (default)
-u Unlock
-n Non-blocking: fail rather than wait for the lock
Spoiler: FMT
fmt
Spoiler: FMT COMMANDS
usage: fmt [-w WIDTH] [FILE...]
Reformat input to wordwrap at a given line length, preserving existing
indentation level, writing to stdout.
-w WIDTH Maximum characters per line (default 75)
Spoiler: FREE
free
Spoiler: FREE COMMANDS
usage: free [-bkmgt]
Display the total, free and used amount of physical memory and swap space.
-bkmgt Output units (default is bytes)
-h Human readable (K=1024)
Spoiler: FSCK.F2FS
fsck.f2fs
inaccessible or not found
Spoiler: FSCK_MSDOS
fsck_msdos
inaccessible or not found
Spoiler: FSVERITY_INIT
fsverity_init
inaccessible or not found
Spoiler: FSYNC
fsync
Spoiler: FILE SYNC COMMANDS
usage: fsync [-d] [FILE...]
Synchronize a file's in-core state with storage device.
-d Avoid syncing metadata
Spoiler: FSYNC KNOWLEDGE
fsync(2) - Linux man page
fsync() transfers ("flushes") all modified in-core data of (i.e., modified buffer cache pages for) the file referred to by the file descriptor fd to the ...
linux.die.net
Spoiler: GATEKEEPERD
gatekeeprd
inaccessible or not found
Spoiler: GETENFORCE
getenforce
Spoiler: GETENFORCE COMMANDS
usage: getenforce
Shows whether SELinux is disabled, enforcing, or permissive.
Spoiler: GETENFORCE KNOWLEDGE
SELinux/Tutorials/Permissive versus enforcing - Gentoo Wiki
wiki.gentoo.org
Spoiler: GETEVENT
getevent
Spoiler: GETEVENT COMMANDS
Usage: getevent [-t] [-n] [-s switchmask] [-S] [-v [mask]] [-d] [-p] [-i] [-l] [-q] [-c count] [-r] [device]
-t: show time stamps
-n: don't print newlines
-s: print switch states for given bits
-S: print all switch states
-v: verbosity mask (errs=1, dev=2, name=4, info=8, vers=16, pos. events=32, props=64)
-d: show HID descriptor, if available
-p: show possible events (errs, dev, name, pos. events)
-i: show all device info and possible events
-l: label event types and names in plain text
-q: quiet (clear verbosity mask)
-c: print given number of events then exit
-r: print rate events are received
Spoiler: GETPROP
getprop
Spoiler: GETPROP COMMADS
usage: getprop [-TZ] [NAME [DEFAULT]]
Gets an Android system property, or lists them all.
-T Show property types instead of values
-Z Show property contexts instead of values
Spoiler: GETPROP KNOWLEDGE
An example of getprop in action:
Install Android 11 GSI for App Testing | Android Developers
In this codelab, you will install Android 11 Generic System Image (GSI) to Android 9 (Pie) devices. After that, you can develop and validate your application with the new OS!
developer.android.com
Spoiler: ALL BIN SYSTEMS CONTINUED PART 5 (G-I)
Spoiler: GPUSERVICE
gpuservice
inaccessible or not found
Spoiler: GREP
grep
Spoiler: GREP COMMANDS
usage: grep [-EFrivwcloqsHbhn] [-ABC NUM] [-m MAX] [-e REGEX]... [-MS PATTERN]... [-f REGFILE] [FILE]...
Show lines matching regular expressions. If no -e, first argument is
regular expression to match. With no files (or "-" filename) read stdin.
Returns 0 if matched, 1 if no match found, 2 for command errors.
-e Regex to match. (May be repeated.)
-f File listing regular expressions to match.
file search:
-r Recurse into subdirectories (defaults FILE to ".")
-R Recurse into subdirectories and symlinks to directories
-M Match filename pattern (--include)
-S Skip filename pattern (--exclude)
--exclude-dir=PATTERN Skip directory pattern
-I Ignore binary files
match type:
-A Show NUM lines after -B Show NUM lines before match
-C NUM lines context (A+B) -E extended regex syntax
-F fixed (literal match) -a always text (not binary)
-i case insensitive -m match MAX many lines
-v invert match -w whole word (implies -E)
-x whole line -z input NUL terminated
display modes: (default: matched line)
-c count of matching lines -l show only matching filenames
-o only matching part -q quiet (errors only)
-s silent (no error msg) -Z output NUL terminated
output prefix (default: filename if checking more than 1 file)
-H force filename -b byte offset of match
-h hide filename -n line number of match
Spoiler: GROUPS
groups
Print the groups a user is in.
Spoiler: GROUPS LIST
shell input log adb sdcard_rw sdcard_r ext_data_rw ext_obb_rw net_bt_admin net_bt inet net_bw_stats readproc uhid
Spoiler: GSI_TOOL
gsi_tool
Spoiler: GSI_TOOL COMMANDS
gsi_tool - command-line tool for installing GSI images.
Usage:
gsi_tool <disable|install|wipe|status> [options]
disable Disable the currently installed GSI.
enable [-s, --single-boot]
[-d, --dsuslot slotname]
Enable a previously disabled GSI.
install Install a new GSI. Specify the image size with
--gsi-size and the desired userdata size with
--userdata-size (the latter defaults to 8GiB)
--wipe (remove old gsi userdata first)
wipe Completely remove a GSI and its associated data
wipe-data Ensure the GSI's userdata will be formatted
cancel Cancel the installation
status Show status
Spoiler: GSITOOL ANDROID.COM SOURCE
Generic system images | Android Open Source Project
source.android.com
Spoiler: GSID
gsid
inaccessible or not found
Spoiler: GUNZIP
gunzip
Spoiler: GUNZIP COMMANDS
usage: gunzip [-cfk] [FILE...]
Decompress files. With no files, decompresses stdin to stdout.
On success, the input files are removed and replaced by new
files without the .gz suffix.
-c Output to stdout (act as zcat)
-f Force: allow read from tty
-k Keep input files (default is to remove)
Spoiler: GZIP
gzip
Spoiler: GZIP COMMANDS
usage: gzip [-19cdfk] [FILE...]
Compress files. With no files, compresses stdin to stdout.
On success, the input files are removed and replaced by new
files with the .gz suffix.
-c Output to stdout
-d Decompress (act as gunzip)
-f Force: allow overwrite of output file
-k Keep input files (default is to remove)
-# Compression level 1-9 (1:fastest, 6:default, 9:best)
Spoiler: HEAD
head
Spoiler: HEAD COMMANDS
usage: head [-n NUM] [FILE...]
Copy first lines from files to stdout. If no files listed, copy from
stdin. Filename "-" is a synonym for stdin.
-n Number of lines to copy
-c Number of bytes to copy
-q Never print headers
-v Always print headers
Spoiler: HEAPPROFD
heapprofd
inaccessible or not found
Spoiler: HID
hid
does nothing, does not halt shell
Spoiler: HOSTNAME
hostname
Spoiler: HOSTNAME COMMANDS
usage: hostname [-bdsf] [-F FILENAME] [newname]
Get/set the current hostname.
-b Set hostname to 'localhost' if otherwise unset
-d Show DNS domain name (no host)
-f Show fully-qualified name (host+domain, FQDN)
-F Set hostname to contents of FILENAME
-s Show short host name (no domain)
Spoiler: HW
hw
Is a folder
[email protected] [email protected]
Both say "inaccessible or not found"
Spoiler: HWCLOCK
hwclock
Spoiler: HWCLOCK COMMANDS
usage: hwclock [-rswtluf]
Get/set the hardware clock.
-f FILE Use specified device file instead of /dev/rtc (--rtc)
-l Hardware clock uses localtime (--localtime)
-r Show hardware clock time (--show)
-s Set system time from hardware clock (--hctosys)
-t Set the system time based on the current timezone (--systz)
-u Hardware clock uses UTC (--utc)
-w Set hardware clock from system time (--systohc)
Spoiler: HWSERVICEMANAGER
hwservicemanager
inaccessible or not found
Spoiler: I2CDETECT
i2cdetect
Spoiler: I2CDETECT COMMANDS
usage: i2cdetect [-ary] BUS [FIRST LAST]
usage: i2cdetect -F BUS
usage: i2cdetect -l
Detect i2c devices.
-a All addresses (0x00-0x7f rather than 0x03-0x77)
-F Show functionality
-l List all buses
-r Probe with SMBus Read Byte
-y Answer "yes" to confirmation prompts (for script use)
Spoiler: I2CDUMP
i2cdump
Spoiler: I2CDUMP COMMANDS
usage: i2cdump [-fy] BUS CHIP
Dump i2c registers.
-f Force access to busy devices
-y Answer "yes" to confirmation prompts (for script use)
Spoiler: I2CGET
i2cget
Spoiler: I2CGET COMMANDS
usage: i2cget [-fy] BUS CHIP ADDR
Read an i2c register.
-f Force access to busy devices
-y Answer "yes" to confirmation prompts (for script use)
Spoiler: I2CSET
i2cset
Spoiler: I2CSET COMMANDS
i2cset: Need 4 arguments (see "i2cset --help")
1|RNN_sprout:/bin $ i2cset --help
usage: i2cset [-fy] BUS CHIP ADDR VALUE... MODE
Write an i2c register. MODE is b for byte, w for 16-bit word, i for I2C block.
-f Force access to busy devices
-y Answer "yes" to confirmation prompts (for script use)
Spoiler: ICONV
iconv
Spoiler: ICONV COMMANDS
usage: iconv [-f FROM] [-t TO] [FILE...]
Convert character encoding of files.
-c Omit invalid chars
-f Convert from (default UTF-8)
-t Convert to (default UTF-8)
Spoiler: ID
id
Spoiler: ID COMMANDS
usage: id [-GZgnru] [USER...]
Print user and group ID.
-G Show all group IDs
-Z Show only security context
-g Show only the effective group ID
-n Print names instead of numeric IDs (to be used with -Ggu)
-r Show real ID instead of effective ID
-u Show only the effective user ID
Spoiler: ID KNOWLEDGE
IDs present on the G20
uid=2000(shell) gid=2000(shell) groups=2000(shell),1004(input),1007(log),1011(adb),1015(sdcard_rw),1028(sdcard_r),1078(ext_data_rw),1079(ext_obb_rw),3001(net_bt_admin),3002(net_bt),3003(inet),3006(net_bw_stats),3009(readproc),3011(uhid) context=u:r:shell:s0
How to Use the chown Command on Linux
Files and directories in Linux systems all belong to someone. You can change their ownership with the chown command. We show you how.
www.howtogeek.com
Spoiler: IDMAP
idmap
inaccessible or not found
Spoiler: IDMAP2
idmap2
inaccessible or not found
Spoiler: IDMAP2D
idmap2d
inaccessible or not found
Spoiler: IFCONFIG
ifconfig
Spoiler: IFCONFIG COMMANDS
usage: ifconfig [-aS] [INTERFACE [ACTION...]]
Display or configure network interface.
With no arguments, display active interfaces. First argument is interface
to operate on, one argument by itself displays that interface.
-a All interfaces displayed, not just active ones
-S Short view, one line per interface
Standard ACTIONs to perform on an INTERFACE:
ADDR[/MASK] - set IPv4 address (1.2.3.4/5) and activate interface
add|del ADDR[/LEN] - add/remove IPv6 address (1111::8888/128)
up|down - activate or deactivate interface
Advanced ACTIONs (default values usually suffice):
default - remove IPv4 address
netmask ADDR - set IPv4 netmask via 255.255.255.0 instead of /24
txqueuelen LEN - number of buffered packets before output blocks
mtu LEN - size of outgoing packets (Maximum Transmission Unit)
broadcast ADDR - Set broadcast address
pointopoint ADDR - PPP and PPPOE use this instead of "route add default gw"
hw TYPE ADDR - set hardware (mac) address (type = ether|infiniband)
Flags you can set on an interface (or -remove by prefixing with -):
arp - don't use Address Resolution Protocol to map LAN routes
promisc - don't discard packets that aren't to this LAN hardware address
multicast - force interface into multicast mode if the driver doesn't
allmulti - promisc for multicast packets
Spoiler: IME
ime
Spoiler: IME COMMANDS
ime <command>:
list [-a] [-s]
prints all enabled input methods.
-a: see all input methods
-s: only a single summary line of each
enable [--user <USER_ID>] <ID>
allows the given input method ID to be used.
--user <USER_ID>: Specify which user to enable. Assumes the current user if not specified.
disable [--user <USER_ID>] <ID>
disallows the given input method ID to be used.
--user <USER_ID>: Specify which user to disable. Assumes the current user if not specified.
set [--user <USER_ID>] <ID>
switches to the given input method ID.
--user <USER_ID>: Specify which user to enable. Assumes the current user if not specified.
reset [--user <USER_ID>]
reset currently selected/enabled IMEs to the default ones as if the device is initially booted w
ith the current locale.
--user <USER_ID>: Specify which user to reset. Assumes the current user if not specified.
Spoiler: INCIDENT
incident
Spoiler: INCIDENT COMMANDS
usage: incident OPTIONS [SECTION...]
Takes an incident report.
OPTIONS
-l list available sections
-p privacy spec, LOCAL, EXPLICIT or AUTOMATIC. Default AUTOMATIC.
-r REASON human readable description of why the report is taken.
-z gzip the incident report, i.e. pipe the output through gzip.
and one of these destinations:
-b (default) print the report to stdout (in proto format)
-d send the report into dropbox
-u print a full report to stdout for dumpstate to zip as a bug
report. SECTION is ignored. Should only be called by dumpstate.
-s PKG/CLS send broadcast to the broadcast receiver.
SECTION the field numbers of the incident report fields to include
Spoiler: DOES THIS
Spoiler: INCIDENT-HELPER-CMD
incidient-helper-cmd
Spoiler: TEXT
This command is not designed to be run manually.
Usage:
run [sectionName]
Spoiler: INCIDENT_HELPER
incident_helper
inaccessible or not found
Spoiler: INCIDENTD
incidentd
inaccessible or not found
Spoiler: INIT
init
inaccessible or not found
Spoiler: INOTIFYD
inotifyd
Spoiler: INOTIFYD COMMANDS
usage: inotifyd PROG FILE[:MASK] ...
When a filesystem event matching MASK occurs to a FILE, run PROG as:
PROG EVENTS FILE [DIRFILE]
If PROG is "-" events are sent to stdout.
This file is:
a accessed c modified e metadata change w closed (writable)
r opened D deleted M moved 0 closed (unwritable)
u unmounted o overflow x unwatchable
A file in this directory is:
m moved in y moved out n created d deleted
When x event happens for all FILEs, inotifyd exits (after waiting for PROG).
Spoiler: INPUT
input
Spoiler: INPUT COMMANDS
Usage: input [<source>] [-d DISPLAY_ID] <command> [<arg>...]
The sources are:
dpad
keyboard
mouse
touchpad
gamepad
touchnavigation
joystick
touchscreen
stylus
trackball
-d: specify the display ID.
(Default: -1 for key event, 0 for motion event if not specified.)
The commands and default sources are:
text <string> (Default: touchscreen)
keyevent [--longpress] <key code number or name> ... (Default: keyboard)
tap <x> <y> (Default: touchscreen)
swipe <x1> <y1> <x2> <y2> [duration(ms)] (Default: touchscreen)
draganddrop <x1> <y1> <x2> <y2> [duration(ms)] (Default: touchscreen)
press (Default: trackball)
roll <dx> <dy> (Default: trackball)
motionevent <DOWN|UP|MOVE> <x> <y> (Default: touchscreen)
Spoiler: ALL BIN SYSTEMS CONTINUED PART 6 (I-L)
Spoiler: INSMOD
insmod
Spoiler: INSMOD COMMANDS
usage: insmod MODULE [MODULE_OPTIONS]
Load the module named MODULE passing options if given.
Spoiler: INSTALL
install
Spoiler: INSTALL COMMANDS
usage: install [-dDpsv] [-o USER] [-g GROUP] [-m MODE] [SOURCE...] DEST
Copy files and set attributes.
-d Act like mkdir -p
-D Create leading directories for DEST
-g Make copy belong to GROUP
-m Set permissions to MODE
-o Make copy belong to USER
-p Preserve timestamps
-s Call "strip -p"
-v Verbose
Spoiler: INSTALLD
installd
inaccessible or not found
Spoiler: IONICE
ionice
Spoiler: IONICE COMMANDS
usage: ionice [-t] [-c CLASS] [-n LEVEL] [COMMAND...|-p PID]
Change the I/O scheduling priority of a process. With no arguments
(or just -p), display process' existing I/O class/priority.
-c CLASS = 1-3: 1(realtime), 2(best-effort, default), 3(when-idle)
-n LEVEL = 0-7: (0 is highest priority, default = 5)
-p Affect existing PID instead of spawning new child
-t Ignore failure to set I/O priority
System default iopriority is generally -c 2 -n 4.
Spoiler: IORAP.CMD.COMPILER
iorap.cmd.compiler
Spoiler: IORAP.CMD.COMPILER COMMANDS
Usage: iorap.cmd.compiler [--output-proto=output.pb] input1.pb [input2.pb ...]
Request a compilation of multiple inputs (format: PerfettoTraceProto).
The result is a TraceFile, representing a merged compiled trace with inodes resolved.
Optional flags:
--help,-h Print this Usage.
--blacklist-filter,-bf Specify regex acting as a blacklist filter.
Filepaths matching this regex are removed from the output file.
--output-text,-ot Output ascii text instead of protobuf (default off).
--output-proto $,-op $ TraceFile tracebuffer output file (default stdout).
--inode-textcache $,-it $ Resolve inode->filename from textcache (disables diskscan).
--verbose,-v Set verbosity (default off).
--wait,-w Wait for key stroke before continuing (default off).
--timestamp_limit_ns,-tl Set the limit timestamp in nanoseconds for the compiled trace. The order and size of the timestamp should match that of the input trace files. If not specified at all, All ofthe timestamps are set to max.
Spoiler: IORAPD
iorapd
inaccessible or not found
Spoiler: IORENICE
iorenice
Spoiler: IORENICE COMMANDS
usage: iorenice PID [CLASS] [PRIORITY]
Display or change I/O priority of existing process. CLASS can be
"rt" for realtime, "be" for best effort, "idle" for only when idle, or
"none" to leave it alone. PRIORITY can be 0-7 (0 is highest, default 4).
Spoiler: IP
ip
Spoiler: IP COMMANDS
Usage: ip [ OPTIONS ] OBJECT { COMMAND | help }
ip [ -force ] -batch filename
where OBJECT := { link | address | addrlabel | route | rule | neigh | ntable |
tunnel | tuntap | maddress | mroute | mrule | monitor | xfrm |
netns | l2tp | fou | macsec | tcp_metrics | token | netconf | ila |
vrf | sr }
OPTIONS := { -V[ersion] | -s[tatistics] | -d[etails] | -r[esolve] |
-h[uman-readable] | -iec |
-f[amily] { inet | inet6 | ipx | dnet | mpls | bridge | link } |
-4 | -6 | -I | -D | -B | -0 |
-l[oops] { maximum-addr-flush-attempts } | -br[ief] |
-o[neline] | -t[imestamp] | -ts[hort] | -b[atch] [filename] |
-rc[vbuf] [size] | -n[etns] name | -a[ll] | -c[olor]}
Spoiler: IP-WRAPPER-1.0
ip-wrapper-1.0
inaccessible or not found
Spoiler: IP6TABLES
ip6tables
Spoiler: SHELL PICTURES CONTINUED
Spoiler: IP6TABLES COMMANDS
ip6tables v1.8.4
Usage: ip6tables -[ACD] chain rule-specification [options]
ip6tables -I chain [rulenum] rule-specification [options]
ip6tables -R chain rulenum rule-specification [options]
ip6tables -D chain rulenum [options]
ip6tables -[LS] [chain [rulenum]] [options]
ip6tables -[FZ] [chain] [options]
ip6tables -[NX] chain
ip6tables -E old-chain-name new-chain-name
ip6tables -P chain target [options]
ip6tables -h (print this help information)
Commands:
Either long or short options are allowed.
--append -A chain Append to chain
--check -C chain Check for the existence of a rule
--delete -D chain Delete matching rule from chain
--delete -D chain rulenum
Delete rule rulenum (1 = first) from chain
--insert -I chain [rulenum]
Insert in chain as rulenum (default 1=first)
--replace -R chain rulenum
Replace rule rulenum (1 = first) in chain
--list -L [chain [rulenum]]
List the rules in a chain or all chains
--list-rules -S [chain [rulenum]]
Print the rules in a chain or all chains
--flush -F [chain] Delete all rules in chain or all chains
--zero -Z [chain [rulenum]]
Zero counters in chain or all chains
--new -N chain Create a new user-defined chain
--delete-chain
-X [chain] Delete a user-defined chain
--policy -P chain target
Change policy on chain to target
--rename-chain
-E old-chain new-chain
Change chain name, (moving any references)
Options:
--ipv4 -4 Error (line is ignored by ip6tables-restore)
--ipv6 -6 Nothing (line is ignored by iptables-restore)
[!] --protocol -p proto protocol: by number or name, eg. `tcp'
[!] --source -s address[/mask][,...]
source specification
[!] --destination -d address[/mask][,...]
destination specification
[!] --in-interface -i input name[+]
network interface name ([+] for wildcard)
--jump -j target
target for rule (may load target extension)
--goto -g chain
jump to chain with no return
--match -m match
extended match (may load extension)
--numeric -n numeric output of addresses and ports
[!] --out-interface -o output name[+]
network interface name ([+] for wildcard)
--table -t table table to manipulate (default: `filter')
--verbose -v verbose mode
--wait -w [seconds] maximum wait to acquire xtables lock before give up
--wait-interval -W [usecs] wait time to try to acquire xtables lock
interval to wait for xtables lock
default is 1 second
--line-numbers print line numbers when listing
--exact -x expand numbers (display exact values)
--modprobe=<command> try to insert modules using this command
--set-counters PKTS BYTES set the counter during insert/append
[!] --version -V print package version.
Spoiler: IP6TABLES-RESTORE
ip6tables-restore
Spoiler: IP6TABLES-RESTORE COMMANDS
Usage: ip6tables-restore [-c] [-v] [-V] [-t] [-h] [-n] [-w secs] [-W usecs] [-T table] [-M command] [file]
[ --counters ]
[ --verbose ]
[ --version]
[ --test ]
[ --help ]
[ --noflush ]
[ --wait=<seconds>
[ --wait-interval=<usecs>
[ --table=<TABLE> ]
[ --modprobe=<command> ]
Spoiler: IP6TABLES-SAVE
ip6tables-save
Failed to list table names in /proc/net/ip6_tables_names: Permission denied
Spoiler: IP6TABLES-WRAPPER-1.0
ip6tables-wrapper-1.0
inaccessible or not found
Spoiler: IPTABLES
iptables
Spoiler: SHELL PICTURES CONTINUED
Spoiler: IPTABLES COMMANDS
Usage: iptables -[ACD] chain rule-specification [options]
iptables -I chain [rulenum] rule-specification [options]
iptables -R chain rulenum rule-specification [options]
iptables -D chain rulenum [options]
iptables -[LS] [chain [rulenum]] [options]
iptables -[FZ] [chain] [options]
iptables -[NX] chain
iptables -E old-chain-name new-chain-name
iptables -P chain target [options]
iptables -h (print this help information)
Commands:
Either long or short options are allowed.
--append -A chain Append to chain
--check -C chain Check for the existence of a rule
--delete -D chain Delete matching rule from chain
--delete -D chain rulenum
Delete rule rulenum (1 = first) from chain
--insert -I chain [rulenum]
Insert in chain as rulenum (default 1=first)
--replace -R chain rulenum
Replace rule rulenum (1 = first) in chain
--list -L [chain [rulenum]]
List the rules in a chain or all chains
--list-rules -S [chain [rulenum]]
Print the rules in a chain or all chains
--flush -F [chain] Delete all rules in chain or all chains
--zero -Z [chain [rulenum]]
Zero counters in chain or all chains
--new -N chain Create a new user-defined chain
--delete-chain
-X [chain] Delete a user-defined chain
--policy -P chain target
Change policy on chain to target
--rename-chain
-E old-chain new-chain
Change chain name, (moving any references)
Options:
--ipv4 -4 Nothing (line is ignored by ip6tables-restore)
--ipv6 -6 Error (line is ignored by iptables-restore)
[!] --protocol -p proto protocol: by number or name, eg. `tcp'
[!] --source -s address[/mask][...]
source specification
[!] --destination -d address[/mask][...]
destination specification
[!] --in-interface -i input name[+]
network interface name ([+] for wildcard)
--jump -j target
target for rule (may load target extension)
--goto -g chain
jump to chain with no return
--match -m match
extended match (may load extension)
--numeric -n numeric output of addresses and ports
[!] --out-interface -o output name[+]
network interface name ([+] for wildcard)
--table -t table table to manipulate (default: `filter')
--verbose -v verbose mode
--wait -w [seconds] maximum wait to acquire xtables lock before give up
--wait-interval -W [usecs] wait time to try to acquire xtables lock
default is 1 second
--line-numbers print line numbers when listing
--exact -x expand numbers (display exact values)
[!] --fragment -f match second or further fragments only
--modprobe=<command> try to insert modules using this command
--set-counters PKTS BYTES set the counter during insert/append
[!] --version -V print package version.
Spoiler: IPTABLES-RESTORE
iptables-restore
Spoiler: IPTABLES-RESTORE COMMANDS
Usage: iptables-restore [-c] [-v] [-V] [-t] [-h] [-n] [-w secs] [-W usecs] [-T table] [-M command] [file]
[ --counters ]
[ --verbose ]
[ --version]
[ --test ]
[ --help ]
[ --noflush ]
[ --wait=<seconds>
[ --wait-interval=<usecs>
[ --table=<TABLE> ]
[ --modprobe=<command> ]
Spoiler: IPTABLES-SAVE
iptables-save
Failed to list table names in /proc/net/ip_tables_names: Permission denied
Look at manual page `iptables-save.8' for more information.
Spoiler: IPTABLES-WRAPPER-1.0
iptables-wrapper-1.0
inaccessible or not found
Spoiler: KEYSTORE
keystore
inaccessible or not found
Spoiler: KEYSTORE_CLI_V2
keystore_cli_v2
Spoiler: KEYSTORE_CLI_V2 COMMANDS
Commands: brillo-platform-test [--prefix=<test_name_prefix>] [--test_for_0_3]
list-brillo-tests
add-entropy --input=<entropy> [--seclevel=software|strongbox|tee(default)]
generate --name=<key_name> [--seclevel=software|strongbox|tee(default)]
get-chars --name=<key_name>
export --name=<key_name>
delete --name=<key_name>
delete-all
exists --name=<key_name>
list [--prefix=<key_name_prefix>]
list-apps-with-keys
sign-verify --name=<key_name>
[en|de]crypt --name=<key_name> --in=<file> --out=<file>
[--seclevel=software|strongbox|tee(default)]
confirmation --prompt_text=<PromptText> --extra_data=<hex>
--locale=<locale> [--ui_options=<list_of_ints>]
--cancel_after=<seconds>
Spoiler: KILL
kill
Spoiler: KILL COMMANDS
usage: kill [-s signame | -signum | -signame] { job | pid | pgrp } ...
kill -l [exit_status ...]
Spoiler: KILLALL
killall
Spoiler: KILLALL COMMANDS
usage: killall [-l] [-iqv] [-SIGNAL|-s SIGNAL] PROCESS_NAME...
Send a signal (default: TERM) to all processes with the given names.
-i Ask for confirmation before killing
-l Print list of all available signals
-q Don't print any warnings or error messages
-s Send SIGNAL instead of SIGTERM
-v Report if the signal was successfully sent
-w Wait until all signaled processes are dead
Spoiler: KPOC_CHARGER
kpoc_charger
inaccessible or not found
Spoiler: LBS_DBG
lbs_dbg
inaccessible or not found
Spoiler: LCDC_SCREEN_CAP
lcdc_screen_cap
did not halt shell, not immediately evident what it did
Spoiler: LD.MC
ld.mc
Spoiler: SHELL PICTURES CONTINUED
Spoiler: LD.MC COMMANDS
OVERVIEW: MCLinker
USAGE: ld.mc [options] <inputs>
DYNAMIC OPTIONS:
--allow-multiple-definition
Allow multiple definitions
-Bgroup Info the dynamic linker to lookup only inside the group
-Bsymbolic Bind references within the shared library
--dynamic-linker=<value>
Set the name of the dynamic linker
--enable-new-dtags Enable use of DT_RUNPATH and DT_FLAGS
--entry=<value> Use the explicit symbol as the entrance of your program
--no-undefined Do not allow unresolved references
-soname=<value> Set internal name of shared library
--spare-dynamic-tags <value>
Set the number of spare dyanmic tags (DT_NULL)
-z <value> Extensions for GNU ld compatibility
OPTIMIZATION OPTIONS:
--gc-sections Enable garbage collection of unused input sections
--icf-iterations <value>
Set number of iterations to do ICF
--icf=<value> Identical Code Folding
--ld-generated-unwind-info
Request creation of unwind info for linker generated code sections like PLT
--no-gc-sections Disable garbage collection of unused input sections
--no-ld-generated-unwind-info
Don't create unwind info for linker generated sections to save size
--no-print-gc-sections Do not list sections removed by garbage collection
--no-print-icf-sections Do not list sections folded by ICF
--print-gc-sections List all sections removed by garbage collection
--print-icf-sections List all sections folded by ICF
OUTPUT OPTIONS:
-Bdynamic Link against dynamic library
-Bstatic Link against static library
--discard-all Discard all local symbols
--discard-debug Discard all temporary local symbols
--eh-frame-hdr Request creation of .eh_frame_hdr section and PT_GNU_EH_FRAME segment
--exclude-libs <value> Allow linking together mismatched input files
--export-dynamic Export all dynamic symbols
--format=<value> Specify the binary format for input object files that follow this option on the command line
--hash-style=<value> Set the type of linker's hash table(s)
--nmagic Do not page align data
--no-export-dynamic Not export all dynamic symbols
--no-warn-mismatch Allow linking together mismatched input files
--oformat=<value> Output format
--omagic Do not page align data, do not make text readonly
-o <value> Output filename
-pie Emit a position-independent executable file
--relocatable Generate relocatable output
-shared Create a shared library
--strip-all Omit all symbol information from the output file
--strip-debug Omit debugger symbol information from the output file
POSITIONAL OPTIONS:
--add-needed Deprecated
--as-needed Add the dynamic libraries mentioned to DT_NEEDED where there is a non-weak undefined symbol reference from
--copy-dt-needed-entries
Add the dynamic libraries mentioned to DT_NEEDED
--end-group Stop recording a group of archives
--library=<value> Add the archive or object file specified by namespec to the list of files to link
--no-add-needed Deprecated
--no-as-needed Turn off the effect of the --as-needed
--no-copy-dt-needed-entries
Turn off the effect of the --copy-dt-needed-entries
--no-whole-archive Turn off the effect of the --whole-archive option
--script=<value> Use the given file as the linker script
--start-group Start to record a group of archives
--whole-archive Include every object file in the archive in the link
PREFERENCE OPTIONS:
--color=<value> Surround the result strings with the marker
--error-limit=<value> Set the maximum limit of errors
--fatal-warnings Turn all warnings into errors
-help Display available options (to standard output)
--no-fatal-warnings Do not turn all warnings into errors
--trace Print the names of the input files as ld processes them
--verbose=<value> Set linker diagnostic output level
--version Display MCLinker version
--warn-shared-textrel Warn if there is a text relocation in the output shared object
--warning-limit=<value> Set the maximum limit of warnings
SCRIPT OPTIONS:
--defsym=<value> Define a symbol
--portable=<value> Use a portable function for the symbol
--section-start=<value> Locate a output section at the given absolute address
-Tbss=<value> Set the address of the bss segment
-Tdata=<value> Set the address of the data segment
-Ttext=<value> Set the address of the text segment
--wrap=<value> Use a wrap function for the symbol
SEARCHPATH OPTIONS:
--library-path=<value> Add the given directory to the list of search paths
-nostdlib Only search lib dirs explicitly specified on cmdline
-rpath=<value> Add a directory to the runtime library search path
--sysroot=<value> Use the given directory as the location of the sysroot
SYMBOL OPTIONS:
-d Define common symbol
--undefined=<value> Force symbol to be undefined in the output file
TARGET OPTIONS:
--fix-cortex-a53-835769 Enable fix for cortex a53 erratum 835769
--fix-cortex-a53-843419 Enable fix for cortex a53 erratum 843419
--gpsize=<value> Set the maximum size of objects to be optimized using GP
-march=<value> Architecture to generate code for
-mcpu=<value> Set a specific cpu type
-mtriple=<value> Override target triple for module
-m <value> Set GNU linker emulation
--stub-group-size=<value>
Set the group size to place stubs between sections
Spoiler: ALL BIN SYSTEMS CONTINUED PART 7 (L)
Spoiler: LDD
ldd
Spoiler: LDD COMMANDS
usage: ldd FILE
file: No 'h' with 'L' (see "file --help")
Spoiler: LIBRANK
librank
Spoiler: LIBRANK COMMANDS
Usage: librank [ -P | -L ] [ -v | -r | -p | -u | -s | -h ]
Sort options:
-v Sort processes by VSS.
-r Sort processes by RSS.
-p Sort processes by PSS.
-u Sort processes by USS.
-s Sort processes by swap.
(Default sort order is PSS.)
-a Show all mappings, including stack, heap and anon.
-P /path Limit libraries displayed to those in path.
-R Reverse sort order (default is descending).
-m [r][w][x] Only list pages that exactly match permissions
-c Only show cached (storage backed) pages
-C Only show non-cached (ram/swap backed) pages
-k Only show pages collapsed by KSM
-h Display this help screen.
Spoiler: PRINTED THIS
RSStot VSS RSS PSS USS Name/PID
Spoiler: LINKER
linker
Spoiler: LINKER COMMANDS
Usage: linker [--list] PROGRAM [ARGS-FOR-PROGRAM...]
linker [--list] path.zip!/PROGRAM [ARGS-FOR-PROGRAM...]
A helper program for linking dynamic executables. Typically, the kernel loads
this program because it's the PT_INTERP of a dynamic executable.
This program can also be run directly to load and run a dynamic executable. The
executable can be inside a zip file if it's stored uncompressed and at a
page-aligned offset.
The --list option gives behavior equivalent to ldd(1) on other systems.
Spoiler: LINKER KNOWLEDGE
Introduction of Compiler Design - GeeksforGeeks
A Computer Science portal for geeks. It contains well written, well thought and well explained computer science and programming articles, quizzes and practice/competitive programming/company interview Questions.
www.geeksforgeeks.org
Linker - GeeksforGeeks
A Computer Science portal for geeks. It contains well written, well thought and well explained computer science and programming articles, quizzes and practice/competitive programming/company interview Questions.
www.geeksforgeeks.org
Linker Namespace | Android Open Source Project
source.android.com
Spoiler: LINKER64
linker64
Spoiler: LINKER64 COMMANDS
Usage: linker64 [--list] PROGRAM [ARGS-FOR-PROGRAM...]
linker64 [--list] path.zip!/PROGRAM [ARGS-FOR-PROGRAM...]
A helper program for linking dynamic executables. Typically, the kernel loads
this program because it's the PT_INTERP of a dynamic executable.
This program can also be run directly to load and run a dynamic executable. The
executable can be inside a zip file if it's stored uncompressed and at a
page-aligned offset.
The --list option gives behavior equivalent to ldd(1) on other systems.
Spoiler: LINKER_ASAN
linker_asan
Spoiler: LINKER_ASAN COMMANDS
Usage: linker_asan [--list] PROGRAM [ARGS-FOR-PROGRAM...]
linker_asan [--list] path.zip!/PROGRAM [ARGS-FOR-PROGRAM...]
A helper program for linking dynamic executables. Typically, the kernel loads
this program because it's the PT_INTERP of a dynamic executable.
This program can also be run directly to load and run a dynamic executable. The
executable can be inside a zip file if it's stored uncompressed and at a
page-aligned offset.
The --list option gives behavior equivalent to ldd(1) on other systems.
Spoiler: LINKER_ASAN64
linker_asan64
Spoiler: LINKER_ASAN64 COMMANDS
Usage: linker_asan64 [--list] PROGRAM [ARGS-FOR-PROGRAM...]
linker_asan64 [--list] path.zip!/PROGRAM [ARGS-FOR-PROGRAM...]
A helper program for linking dynamic executables. Typically, the kernel loads
this program because it's the PT_INTERP of a dynamic executable.
This program can also be run directly to load and run a dynamic executable. The
executable can be inside a zip file if it's stored uncompressed and at a
page-aligned offset.
The --list option gives behavior equivalent to ldd(1) on other systems.
Spoiler: LINKERCONFIG
linkerconfig
inaccessible or not found
Spoiler: LMKD
lmkd
inaccessible or not found
Spoiler: LN
ln
Spoiler: LN COMMANDS
usage: ln [-sfnv] [-t DIR] [FROM...] TO
Create a link between FROM and TO.
One/two/many arguments work like "mv" or "cp".
-s Create a symbolic link
-f Force the creation of the link, even if TO already exists
-n Symlink at TO treated as file
-r Create relative symlink from -> to
-t Create links in DIR
-T TO always treated as file, max 2 arguments
-v Verbose
Spoiler: LOAD_POLICY
load_policy
Spoiler: LOAD_POLICY COMMANDS
usage: load_policy FILE
Load the specified SELinux policy file.
Spoiler: LOCKSETTINGS
locksettings
Spoiler: LOCKSETTINGS COMMANDS
usage: locksettings set-pattern [--old OLD_CREDENTIAL] NEW_PATTERN
locksettings set-pin [--old OLD_CREDENTIAL] NEW_PIN
locksettings set-password [--old OLD_CREDENTIAL] NEW_PASSWORD
locksettings clear [--old OLD_CREDENTIAL]
locksettings verify [--old OLD_CREDENTIAL]
locksettings set-disabled DISABLED
locksettings get-disabled
flags:
--user USER_ID: specify the user, default value is current user
locksettings set-pattern: sets a pattern
A pattern is specified by a non-separated list of numbers that index the cell
on the pattern in a 1-based manner in left to right and top to bottom order,
i.e. the top-left cell is indexed with 1, whereas the bottom-right cell
is indexed with 9. Example: 1234
locksettings set-pin: sets a PIN
locksettings set-password: sets a password
locksettings clear: clears the unlock credential
locksettings verify: verifies the credential and unlocks the user
locksettings set-disabled: sets whether the lock screen should be disabled
locksettings get-disabled: retrieves whether the lock screen is disabled
Spoiler: LOG
log
Spoiler: LOG COMMANDS
usage: log [-p PRI] [-t TAG] MESSAGE...
Logs message to logcat.
-p Use the given priority instead of INFO:
d: DEBUG e: ERROR f: FATAL i: INFO v: VERBOSE w: WARN s: SILENT
-t Use the given tag instead of "log"
Spoiler: LOGCAT
logcat
floods screen with lots of info
Spoiler: LOGD
logd
inaccessible or not found
Spoiler: LOGNAME
logname
Spoiler: LOGNAME COMMANDS
usage: logname
Print the current user name.
THE CURRENT USERNAME IS:
shell
Spoiler: LOGWRAPPER
logwrapper
Spoiler: LOGWRAPPER COMMANDS
Usage: logwrapper [-a] [-d] [-k] BINARY [ARGS ...]
Forks and executes BINARY ARGS, redirecting stdout and stderr to
the Android logging system. Tag is set to BINARY, priority is
always LOG_INFO.
-a: Causes logwrapper to do abbreviated logging.
This logs up to the first 4K and last 4K of the command
being run, and logs the output when the command exits
-d: Causes logwrapper to SIGSEGV when BINARY terminates
fault address is set to the status of wait()
-k: Causes logwrapper to log to the kernel log instead of
the Android system log
Spoiler: LOSETUP
losetup
Spoiler: LOSETUP COMMANDS
usage: losetup [-cdrs] [-o OFFSET] [-S SIZE] {-d DEVICE...|-j FILE|-af|{DEVICE FILE}}
Associate a loopback device with a file, or show current file (if any)
associated with a loop device.
Instead of a device:
-a Iterate through all loopback devices
-f Find first unused loop device (may create one)
-j FILE Iterate through all loopback devices associated with FILE
existing:
-c Check capacity (file size changed)
-d DEV Detach loopback device
-D Detach all loopback devices
new:
-s Show device name (alias --show)
-o OFF Start association at offset OFF into FILE
-r Read only
-S SIZE Limit SIZE of loopback association (alias --sizelimit)
Spoiler: LPDUMP
lpdump
Spoiler: LPDUMP COMMANDS
lpdump - command-line tool for dumping Android Logical Partition images.
Usage:
lpdump [-s <SLOT#>|--slot=<SLOT#>] [-j|--json] [FILE|DEVICE]
Options:
-s, --slot=N Slot number or suffix.
-j, --json Print in JSON format.
-d, --dump-metadata-size
Print the space reserved for metadata to stdout
in bytes.
-a, --all Dump all slots (not available in JSON mode).
Spoiler: PRINTS THIS
Slot 1:
Metadata version: 10.2
Metadata size: 1264 bytes
Metadata max size: 65536 bytes
Metadata slot count: 3
Header flags: virtual_ab_device
Partition table:
------------------------
Name: product_b
Group: main_b
Attributes: readonly,updated
Extents:
0 .. 3230439 linear super 2048
3230440 .. 3539863 linear super 7767304
------------------------
Name: vendor_b
Group: main_b
Attributes: readonly,updated
Extents:
0 .. 880751 linear super 3233792
880752 .. 880967 linear super 7767088
880968 .. 880975 linear super 8076728
------------------------
Name: odm_b
Group: main_b
Attributes: readonly,updated
Extents:
0 .. 298447 linear super 4116480
------------------------
Name: system_b
Group: main_b
Attributes: readonly,updated
Extents:
0 .. 3201423 linear super 4485120
3201424 .. 3202727 linear super 3232488
3202728 .. 3204663 linear super 4114544
3204664 .. 3274855 linear super 4414928
3274856 .. 3355399 linear super 7686544
3355400 .. 3355599 linear super 8076736
------------------------
Name: product_b-cow
Group: cow
Attributes: none
Extents:
0 .. 201039 linear super 8076936
------------------------
Name: vendor_b-cow
Group: cow
Attributes: none
Extents:
0 .. 633871 linear super 8277976
------------------------
Name: odm_b-cow
Group: cow
Attributes: none
Extents:
0 .. 6615 linear super 8911848
------------------------
Name: system_b-cow
Group: cow
Attributes: none
Extents:
0 .. 2103783 linear super 8918464
------------------------
Super partition layout:
------------------------
super: 2048 .. 3232488: product_b (3230440 sectors)
super: 3232488 .. 3233792: system_b (1304 sectors)
super: 3233792 .. 4114544: vendor_b (880752 sectors)
super: 4114544 .. 4116480: system_b (1936 sectors)
super: 4116480 .. 4414928: odm_b (298448 sectors)
super: 4414928 .. 4485120: system_b (70192 sectors)
super: 4485120 .. 7686544: system_b (3201424 sectors)
super: 7686544 .. 7767088: system_b (80544 sectors)
super: 7767088 .. 7767304: vendor_b (216 sectors)
super: 7767304 .. 8076728: product_b (309424 sectors)
super: 8076728 .. 8076736: vendor_b (8 sectors)
super: 8076736 .. 8076936: system_b (200 sectors)
super: 8076936 .. 8277976: product_b-cow (201040 sectors)
super: 8277976 .. 8911848: vendor_b-cow (633872 sectors)
super: 8911848 .. 8918464: odm_b-cow (6616 sectors)
super: 8918464 .. 11022248: system_b-cow (2103784 sectors)
------------------------
Block device table:
------------------------
Partition name: super
First sector: 2048
Size: 6442450944 bytes
Flags: none
------------------------
Group table:
------------------------
Name: default
Maximum size: 0 bytes
Flags: none
------------------------
Name: main_b
Maximum size: 6440353792 bytes
Flags: none
------------------------
Name: cow
Maximum size: 0 bytes
Flags: none
------------------------
Spoiler: LPDUMP INFO
OTA for A/B Devices with Dynamic Partitions | Android Open Source Project
source.android.com
""""You can use the lpdump tool (source code under system/extras/partition_tools) to dump the metadata on your device. For example:
lpdump --slot 0 /dev/block/bootdevice/by-name/super
lpdump --slot 1 /dev/block/bootdevice/by-name/super""""
Spoiler: LPDUMPD
lpdumpd
inaccessible or not found
Spoiler: LS
ls
lists the files and folders in the current directory
Spoiler: LSATTR
lsattr
Spoiler: LSATTR COMMANDS
usage: lsattr [-Radlpv] [FILE...]
List file attributes on a Linux file system.
Flag letters are defined in chattr help.
-R Recursively list attributes of directories and their contents
-a List all files in directories, including files that start with '.'
-d List directories like other files, rather than listing their contents
-l List long flag names
-p List the file's project number
-v List the file's version/generation number
Spoiler: PRINTS THIS
--------------e----- ./AudioSetParam
--------------e----- ./abb
--------------e----- ./acpi
--------------e----- ./am
lsattr: ./apexd: Permission denied
--------------e----- ./app_process
--------------e----- ./app_process32
--------------e----- ./app_process64
--------------e----- ./appops
--------------e----- ./appwidget
--------------e----- ./atrace
lsattr: ./audioserver: Permission denied
lsattr: ./auditctl: Permission denied
--------------e----- ./awk
--------------e----- ./badblocks
--------------e----- ./base64
--------------e----- ./basename
lsattr: ./batterywarning: Permission denied
--------------e----- ./bc
--------------e----- ./bcc
lsattr: ./blank_screen: Permission denied
lsattr: ./blkid: Permission denied
--------------e----- ./blockdev
--------------e----- ./bmgr
lsattr: ./boot_logo_updater: Permission denied
lsattr: ./bootanimation: Permission denied
lsattr: ./bootstat: Permission denied
--------------e----- ./bootstrap
lsattr: ./boringssl_self_test32: Permission denied
lsattr: ./boringssl_self_test64: Permission denied
lsattr: ./bpfloader: Permission denied
--------------e----- ./bu
--------------e----- ./bugreport
--------------e----- ./bugreportz
--------------e----- ./bunzip2
--------------e----- ./bzcat
--------------e----- ./bzip2
--------------e----- ./cal
lsattr: ./camerapostalgo: Permission denied
lsattr: ./cameraserver: Permission denied
--------------e----- ./cat
lsattr: ./charger: Permission denied
--------------e----- ./chattr
--------------e----- ./chcon
--------------e----- ./chgrp
--------------e----- ./chmod
--------------e----- ./chown
--------------e----- ./chroot
--------------e----- ./chrt
--------------e----- ./cksum
lsattr: ./clatd: Permission denied
--------------e----- ./clear
--------------e----- ./cmd
--------------e----- ./cmp
--------------e----- ./comm
--------------e----- ./content
--------------e----- ./cp
--------------e----- ./cpio
lsattr: ./cppreopts.sh: Permission denied
--------------e----- ./crash_dump32
--------------e----- ./crash_dump64
lsattr: ./credstore: Permission denied
--------------e----- ./cut
--------------e----- ./dalvikvm
--------------e----- ./date
--------------e----- ./dd
--------------e----- ./debuggerd
lsattr: reading './defrag.f2fs': Permission denied
--------------e----- ./device_config
--------------e----- ./devmem
lsattr: ./dex2oat: Permission denied
--------------e----- ./df
--------------e----- ./diff
--------------e----- ./dirname
--------------e----- ./disable-verity
--------------e----- ./dmctl
--------------e----- ./dmesg
lsattr: ./dnsmasq: Permission denied
--------------e----- ./dos2unix
--------------e----- ./dpm
lsattr: ./drmserver: Permission denied
--------------e----- ./du
lsattr: reading './dump.f2fs': Permission denied
lsattr: ./dumpstate: Permission denied
--------------e----- ./dumpsys
--------------e----- ./e2freefrag
lsattr: ./e2fsck: Permission denied
lsattr: ./e2fsdroid: Permission denied
--------------e----- ./echo
--------------e----- ./egrep
--------------e----- ./enable-verity
--------------e----- ./env
--------------e----- ./expand
--------------e----- ./expr
--------------e----- ./fallocate
--------------e----- ./false
--------------e----- ./fgrep
--------------e----- ./file
--------------e----- ./find
lsattr: ./flags_health_check: Permission denied
--------------e----- ./flock
--------------e----- ./fmt
--------------e----- ./free
lsattr: ./fsck.f2fs: Permission denied
lsattr: ./fsck_msdos: Permission denied
lsattr: ./fsverity_init: Permission denied
--------------e----- ./fsync
lsattr: ./gatekeeperd: Permission denied
--------------e----- ./getconf
--------------e----- ./getenforce
--------------e----- ./getevent
--------------e----- ./getprop
lsattr: ./gpuservice: Permission denied
--------------e----- ./grep
--------------e----- ./groups
--------------e----- ./gsi_tool
lsattr: ./gsid: Permission denied
--------------e----- ./gunzip
--------------e----- ./gzip
--------------e----- ./head
lsattr: ./heapprofd: Permission denied
--------------e----- ./hid
--------------e----- ./hostname
--------------e----- ./hw
--------------e----- ./hwclock
lsattr: ./hwservicemanager: Permission denied
--------------e----- ./i2cdetect
--------------e----- ./i2cdump
--------------e----- ./i2cget
--------------e----- ./i2cset
--------------e----- ./iconv
--------------e----- ./id
lsattr: ./idmap2: Permission denied
lsattr: ./idmap2d: Permission denied
--------------e----- ./ifconfig
--------------e----- ./ime
--------------e----- ./incident
--------------e----- ./incident-helper-cmd
lsattr: ./incident_helper: Permission denied
lsattr: ./incidentd: Permission denied
lsattr: ./init: Permission denied
--------------e----- ./inotifyd
--------------e----- ./input
--------------e----- ./insmod
--------------e----- ./install
lsattr: ./installd: Permission denied
--------------e----- ./ionice
--------------e----- ./iorap.cmd.compiler
--------------e----- ./iorap.cmd.maintenance
lsattr: ./iorap.inode2filename: Permission denied
lsattr: ./iorap.prefetcherd: Permission denied
lsattr: ./iorapd: Permission denied
--------------e----- ./iorenice
--------------e----- ./ip
lsattr: reading './ip-wrapper-1.0': Permission denied
--------------e----- ./ip6tables
--------------e----- ./ip6tables-restore
--------------e----- ./ip6tables-save
lsattr: reading './ip6tables-wrapper-1.0': Permission denied
--------------e----- ./iptables
--------------e----- ./iptables-restore
--------------e----- ./iptables-save
lsattr: reading './iptables-wrapper-1.0': Permission denied
lsattr: ./keystore: Permission denied
--------------e----- ./keystore_cli_v2
--------------e----- ./kill
--------------e----- ./killall
lsattr: ./kpoc_charger: Permission denied
lsattr: ./lbs_dbg: Permission denied
--------------e----- ./lcdc_screen_cap
--------------e----- ./ld.mc
--------------e----- ./ldd
--------------e----- ./librank
--------------e----- ./linker
--------------e----- ./linker64
--------------e----- ./linker_asan
--------------e----- ./linker_asan64
lsattr: ./linkerconfig: Permission denied
lsattr: ./lmkd: Permission denied
--------------e----- ./ln
--------------e----- ./load_policy
--------------e----- ./locksettings
--------------e----- ./log
--------------e----- ./logcat
lsattr: ./logd: Permission denied
--------------e----- ./logname
--------------e----- ./logwrapper
--------------e----- ./losetup
--------------e----- ./lpdump
lsattr: ./lpdumpd: Permission denied
--------------e----- ./ls
--------------e----- ./lsattr
--------------e----- ./lshal
--------------e----- ./lsmod
--------------e----- ./lsof
--------------e----- ./lspci
--------------e----- ./lsusb
lsattr: ./make_f2fs: Permission denied
--------------e----- ./md5sum
lsattr: ./mdnsd: Permission denied
lsattr: ./mediaextractor: Permission denied
lsattr: ./mediametrics: Permission denied
lsattr: ./mediaserver: Permission denied
--------------e----- ./microcom
--------------e----- ./mifunctiontest
lsattr: ./migrate_legacy_obb_data.sh: Permission denied
--------------e----- ./mini-keyctl
--------------e----- ./mkdir
lsattr: ./mke2fs: Permission denied
--------------e----- ./mkfifo
lsattr: reading './mkfs.ext2': Permission denied
lsattr: reading './mkfs.ext3': Permission denied
lsattr: reading './mkfs.ext4': Permission denied
--------------e----- ./mknod
--------------e----- ./mkswap
--------------e----- ./mktemp
--------------e----- ./modinfo
--------------e----- ./modprobe
--------------e----- ./monkey
--------------e----- ./more
--------------e----- ./mount
--------------e----- ./mountpoint
--------------e----- ./move_widevine_data.sh
lsattr: ./mtk_plpath_utils: Permission denied
lsattr: ./mtpd: Permission denied
--------------e----- ./mv
--------------e----- ./nc
--------------e----- ./ndc
lsattr: reading './ndc-wrapper-1.0': Permission denied
--------------e----- ./netcat
lsattr: ./netd: Permission denied
--------------e----- ./netstat
--------------e----- ./nice
lsattr: ./netutils-wrapper-1.0: Permission denied
--------------e----- ./newfs_msdos
--------------e----- ./nl
--------------e----- ./nohup
lsattr: ./notify_traceur.sh: Permission denied
--------------e----- ./nproc
--------------e----- ./nsenter
--------------e----- ./od
--------------e----- ./oem-iptables-init.sh
--------------e----- ./otapreopt
lsattr: ./otapreopt_chroot: Permission denied
--------------e----- ./otapreopt_script
lsattr: ./otapreopt_slot: Permission denied
--------------e----- ./paste
--------------e----- ./patch
--------------e----- ./perfetto
--------------e----- ./pgrep
--------------e----- ./pidof
--------------e----- ./ping
--------------e----- ./ping6
--------------e----- ./pkill
--------------e----- ./pm
--------------e----- ./pmap
lsattr: ./pppd: Permission denied
lsattr: ./preloads_copy.sh: Permission denied
lsattr: ./preloads_copy_ext.sh: Permission denied
lsattr: ./preopt2cachename: Permission denied
--------------e----- ./printenv
--------------e----- ./printf
--------------e----- ./procrank
--------------e----- ./ps
--------------e----- ./pwd
lsattr: ./racoon: Permission denied
--------------e----- ./readelf
--------------e----- ./readlink
--------------e----- ./realpath
--------------e----- ./reboot
lsattr: ./recovery-persist: Permission denied
lsattr: ./recovery-refresh: Permission denied
--------------e----- ./renice
--------------e----- ./requestsync
lsattr: ./resize.f2fs: Permission denied
lsattr: ./resize2fs: Permission denied
--------------e----- ./restorecon
--------------e----- ./rm
--------------e----- ./rmdir
--------------e----- ./rmmod
lsattr: ./rss_hwm_reset: Permission denied
--------------e----- ./run-as
--------------e----- ./runcon
--------------e----- ./schedtest
--------------e----- ./screencap
--------------e----- ./screenrecord
lsattr: ./sdcard: Permission denied
--------------e----- ./secdiscard
lsattr: reading './secilc': Permission denied
--------------e----- ./sed
--------------e----- ./sendevent
--------------e----- ./sensorservice
--------------e----- ./seq
--------------e----- ./service
lsattr: ./servicemanager: Permission denied
--------------e----- ./set-verity-state
--------------e----- ./setenforce
--------------e----- ./setprop
--------------e----- ./setsid
--------------e----- ./settings
lsattr: ./sgdisk: Permission denied
--------------e----- ./sh
--------------e----- ./sha1sum
--------------e----- ./sha224sum
--------------e----- ./sha256sum
--------------e----- ./sha384sum
--------------e----- ./sha512sum
--------------e----- ./showmap
--------------e----- ./simpleperf
--------------e----- ./simpleperf_app_runner
--------------e----- ./sleep
lsattr: ./sload_f2fs: Permission denied
--------------e----- ./sm
lsattr: ./snapshotctl: Permission denied
--------------e----- ./sort
--------------e----- ./split
--------------e----- ./ss
--------------e----- ./start
--------------e----- ./stat
--------------e----- ./stop
lsattr: ./storaged: Permission denied
--------------e----- ./strings
--------------e----- ./stty
lsattr: ./surfaceflinger: Permission denied
--------------e----- ./svc
--------------e----- ./swapoff
--------------e----- ./swapon
--------------e----- ./sync
--------------e----- ./sysctl
--------------e----- ./tac
--------------e----- ./tail
--------------e----- ./tar
--------------e----- ./taskset
--------------e----- ./tc
lsattr: reading './tc-wrapper-1.0': Permission denied
lsattr: ./tcpdump: Permission denied
--------------e----- ./tee
--------------e----- ./telecom
lsattr: ./terservice: Permission denied
--------------e----- ./test
lsattr: ./thermald: Permission denied
--------------e----- ./time
--------------e----- ./timeout
lsattr: ./tombstoned: Permission denied
--------------e----- ./toolbox
--------------e----- ./top
--------------e----- ./touch
--------------e----- ./toybox
--------------e----- ./tr
lsattr: ./traced: Permission denied
lsattr: ./traced_perf: Permission denied
lsattr: ./traced_probes: Permission denied
--------------e----- ./trigger_perfetto
--------------e----- ./true
--------------e----- ./truncate
--------------e----- ./tty
lsattr: ./tune2fs: Permission denied
--------------e----- ./tzdatacheck
lsattr: reading './ueventd': Permission denied
--------------e----- ./uiautomator
--------------e----- ./ulimit
--------------e----- ./umount
--------------e----- ./uname
lsattr: ./uncrypt: Permission denied
--------------e----- ./uniq
--------------e----- ./unix2dos
--------------e----- ./unlink
--------------e----- ./unshare
--------------e----- ./unzip
lsattr: ./update_engine: Permission denied
lsattr: ./update_verifier: Permission denied
--------------e----- ./uptime
lsattr: ./usbd: Permission denied
--------------e----- ./usleep
--------------e----- ./uudecode
--------------e----- ./uuencode
--------------e----- ./uuidgen
lsattr: ./vdc: Permission denied
lsattr: ./viewcompiler: Permission denied
--------------e----- ./vmstat
lsattr: ./vold: Permission denied
lsattr: ./vold_prepare_subdirs: Permission denied
--------------e----- ./vr
lsattr: ./vtservice: Permission denied
lsattr: ./wait_for_keymaster: Permission denied
--------------e----- ./watch
lsattr: ./watchdogd: Permission denied
--------------e----- ./wc
--------------e----- ./which
--------------e----- ./whoami
lsattr: ./wificond: Permission denied
--------------e----- ./wm
--------------e----- ./xargs
--------------e----- ./xxd
--------------e----- ./yes
--------------e----- ./zcat
--------------e----- ./zipinfo
--------------e----- ./ziptool
Spoiler: LSHAL
lshal
Spoiler: SHELL PICTURES CONTINUED
Spoiler: LSHAL COMMANDS
lshal: List and debug HALs.
commands:
list List HALs.
debug Debug a specified HAL.
help Print help message.
wait Wait for HAL to start if it is not already started.
If no command is specified, `list` is the default.
list:
lshal
lshal list
List all hals with default ordering and columns (`lshal list -Vliepc`)
lshal list [-h|--help]
-h, --help: Print help message for list (`lshal help list`)
lshal
[OPTIONS...]
-i, --interface: print the instance name column
-l, --released: print the 'is released?' column
(Y=released, N=unreleased, ?=unknown)
-t, --transport: print the transport mode column
-r, --arch: print the bitness column
-s, --hash: print hash of the interface
-p, --pid: print the server PID, or server cmdline if -m is set
-a, --address: print the server object address column
-c, --clients: print the client PIDs, or client cmdlines if -m is set
-e, --threads: print currently used/available threads
(note, available threads created lazily)
-m, --cmdline: print cmdline instead of PIDs
-d[=<arg>], --debug[=<arg>]: Emit debug info from
IBase::debug with empty options. Cannot be used with --neat.
Writes to specified file if 'arg' is provided, otherwise stdout.
-V, --vintf: print VINTF info. This column contains a comma-separated list of:
- DM: if the HAL is in the device manifest
- DC: if the HAL is in the device compatibility matrix
- FM: if the HAL is in the framework manifest
- FC: if the HAL is in the framework compatibility matrix
- X: if the HAL is in none of the above lists
-S, --service-status: print service status column. Possible values are:
- alive: alive and running hwbinder service;
- registered;dead: registered to hwservicemanager but is not responsive;
- declared: only declared in VINTF manifest but is not registered to hwservicemanager;
- N/A: no information for passthrough HALs.
--init-vintf: form a skeleton HAL manifest to specified file,
or stdout if no file specified.
--init-vintf-partition=<arg>: Specify the partition of the HAL manifest
generated by --init-vintf.
Valid values are 'system', 'vendor', and 'odm'. Default is 'vendor'.
--sort=<arg>: sort by a column. 'arg' can be (i|interface) or (p|pid).
--neat: output is machine parsable (no explanatory text).
Cannot be used with --debug.
--types=<arg>: comma-separated list of one or more sections.
The output is restricted to the selected section(s). Valid options
are: (b|binderized), (c|passthrough_clients), (l|passthrough_libs), (v|vintf), and (z|lazy).
Default is `bcl`.
debug:
lshal debug [-E] <interface> [options [options [...]]]
Print debug information of a specified interface.
-E: excludes debug output if HAL is actually a subclass.
<interface>: Format is `[email protected]::IFoo/default`.
If instance name is missing `default` is used.
options: space separated options to IBase::debug.
help:
lshal -h
lshal --help
lshal help
Print this help message
lshal help list
Print help message for list
lshal help debug
Print help message for debug
lshal help help
Print help message for help
lshal help wait
Print help message for wait
wait:
lshal wait <interface/instance>
For a HAL that is on the device, wait for the HAL to start.
This will not start a HAL unless it is configured as a lazy HAL.
<interface>: Format is `[email protected]::IFoo/default`.
If instance name is missing `default` is used.
Spoiler: PRINTS THIS
RNN_sprout:/ $ lshal listWarning: Skipping "android.frameworks.cameraservice.s - Pastebin.com
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
pastebin.com
Spoiler: ALL BIN SYSTEMS CONTINUED PART 8 (L-M)
Spoiler: LSMOD
lsmod
Spoiler: LSMOD COMMANDS
usage: lsmod
Display the currently loaded modules, their sizes and their dependencies.
Spoiler: PRINTS THIS
Display the currently loaded modules, their sizes and their dependencies.
Module Size Used by
wlan_drv_gen4m 1945600 0
wmt_chrdev_wifi 24576 1 wlan_drv_gen4m
gps_drv 61440 0
fmradio_drv 172032 0
bt_drv 36864 1
wmt_drv 1138688 6 wlan_drv_gen4m,wmt_chrdev_wifi,gps_drv,fmradio_drv,bt_drv
fpsgo 811008 0
trace_mmstat 16384 0
mt6357_accdet 36864 0
Spoiler: LSMOD KNOWLEDGE
How to Use lsmod in Linux (With a Practical Example)
The Linux Kernel is a mystery to most, but it need not be! Welcome to the exciting world of lsmod, a tool that lets you peek at what modules the Kernel is using, and more!
www.howtogeek.com
Spoiler: LSOF
lsof
Spoiler: LSOF COMMANDS
usage: lsof [-lt] [-p PID1,PID2,...] [FILE...]
List all open files belonging to all active processes, or processes using
listed FILE(s).
-l list uids numerically
-p for given comma-separated pids only (default all pids)
-t terse (pid only) output
Spoiler: PRINTS THIS
Spoiler: LSPCI
lspci
Spoiler: LSPCI COMMANDS
usage: lspci [-ekm]
List PCI devices.
-e Print all 6 digits in class
-k Print kernel driver
-m Machine parseable format
Spoiler: LSUSB
lsusb
List USB hosts/devices.
Spoiler: MAKE_F2FS
make_f2fs
inaccessible or not found
Spoiler: MD5SUM
md5sum
Spoiler: MD5SUM COMMANDS
usage: md5sum [-bcs] [FILE]...
Calculate md5 hash for each input file, reading from stdin if none.
Output one hash (32 hex digits) for each input file, followed by filename.
-b Brief (hash only, no filename)
-c Check each line of each FILE is the same hash+filename we'd output
-s No output, exit status 0 if all hashes match, 1 otherwise
Spoiler: MDNSD
mdnsd
inaccessible or not found
Spoiler: MEDIAEXTRACTOR
mediaextractor
inaccessible or not found
Spoiler: MEDIAMETRICS
mediametrics
inaccessible or not found
Spoiler: MEDIASERVER
mediaserver
inaccessible or not found
Spoiler: MICROCOM
microcom
Spoiler: MICROCOM COMMANDS
usage: microcom [-s SPEED] [-X] DEVICE
Simple serial console.
-s Set baud rate to SPEED
-X Ignore ^@ (send break) and ^] (exit)
Spoiler: MICROCOM KNOWLEDGE
GitHub - pengutronix/microcom: minimalistic terminal program for communicating with devices over a serial connection
minimalistic terminal program for communicating with devices over a serial connection - GitHub - pengutronix/microcom: minimalistic terminal program for communicating with devices over a serial con...
github.com
Ubuntu Manpage: microcom - A minimalistic terminal program
manpages.ubuntu.com
Spoiler: MIFUNCTIONTEST
mifunctiontest
Spoiler: MIGRATE_LEGACY_OBB_DATA.SH
migrate_legacy_obb_data.sh
inaccessible or not found
Spoiler: MINI-KEYCTL
mini-keyctl
Spoiler: MINI-KEYCTL COMMANDS
usage: mini-keyctl <action> [args,]
mini-keyctl add <type> <desc> <data> <keyring>
mini-keyctl padd <type> <desc> <keyring>
mini-keyctl unlink <key> <keyring>
mini-keyctl restrict_keyring <keyring>
mini-keyctl security <key>
Spoiler: MKDIR
mkdir
Spoiler: MKDIR COMMANDS
usage: mkdir [-vp] [-m MODE] [DIR...]
Create one or more directories.
-m Set permissions of directory to mode
-p Make parent directories as needed
-v Verbose
Spoiler: MKE2FS
mke2fs
inaccessible or not found
Spoiler: MKFIFO
mkfifo
Spoiler: MKFIFO COMMANDS
usage: mkfifo [-Z CONTEXT] [NAME...]
Create FIFOs (named pipes).
-Z Security context
Spoiler: MKFS.EXT2, MKFS.EXT3, MKFS.EXT4
mkfs.ext2
mkfs.ext3
mkfs.ext4
inaccessible or not found
Spoiler: MKNOD
mknod
Spoiler: MKNOD COMMANDS
usage: mknod [-m MODE] NAME TYPE [MAJOR MINOR]
Create a special file NAME with a given type. TYPE is b for block device,
c or u for character device, p for named pipe (which ignores MAJOR/MINOR).
-m Mode (file permissions) of new device, in octal or u+x format
Spoiler: MKSWAP
mkswap
Spoiler: MKSWAP COMMANDS
usage: mkswap [-L LABEL] DEVICE
Set up a Linux swap area on a device or file.
Spoiler: MKTEMP
mktemp
Spoiler: MKTEMP COMMANDS
usage: mktemp [-dqu] [-p DIR] [TEMPLATE]
Safely create a new file "DIR/TEMPLATE" and print its name.
-d Create directory instead of file (--directory)
-p Put new file in DIR (--tmpdir)
-q Quiet, no error messages
-t Prefer $TMPDIR > DIR > /tmp (default DIR > $TMPDIR > /tmp)
-u Don't create anything, just print what would be created
Each X in TEMPLATE is replaced with a random printable character. The
default TEMPLATE is tmp.XXXXXXXXXX.
Spoiler: MODINFO
modinfo
Spoiler: MODINFO COMMANDS
usage: modinfo [-0] [-b basedir] [-k kernel] [-F field] [module|file...]
Display module fields for modules specified by name or .ko path.
-F Only show the given field
-0 Separate fields with NUL rather than newline
-b Use <basedir> as root for /lib/modules/
-k Look in given directory under /lib/modules/
Spoiler: MODPROBE
modprobe
Spoiler: MODPROBE COMMANDS
Usage:
modprobe [-alrqvsDb] [-d DIR] [MODULE]+
modprobe [-alrqvsDb] [-d DIR] MODULE [symbol=value][...]
Options:
-b: Apply blocklist to module names too
-d: Load modules from DIR, option may be used multiple times
-D: Print dependencies for modules only, do not load -h: Print this help
-l: List modules matching pattern
-r: Remove MODULE (multiple modules may be specified)
-q: Quiet
-v: Verbose
Spoiler: MONKEY
monkey
Spoiler: MONKEY COMMANDS
usage: monkey [-p ALLOWED_PACKAGE [-p ALLOWED_PACKAGE] ...]
[-c MAIN_CATEGORY [-c MAIN_CATEGORY] ...]
[--ignore-crashes] [--ignore-timeouts]
[--ignore-security-exceptions]
[--monitor-native-crashes] [--ignore-native-crashes]
[--kill-process-after-error] [--hprof]
[--match-description TEXT]
[--pct-touch PERCENT] [--pct-motion PERCENT]
[--pct-trackball PERCENT] [--pct-syskeys PERCENT]
[--pct-nav PERCENT] [--pct-majornav PERCENT]
[--pct-appswitch PERCENT] [--pct-flip PERCENT]
[--pct-anyevent PERCENT] [--pct-pinchzoom PERCENT]
[--pct-permission PERCENT]
[--pkg-blacklist-file PACKAGE_BLACKLIST_FILE]
[--pkg-whitelist-file PACKAGE_WHITELIST_FILE]
[--wait-dbg] [--dbg-no-events]
[--setup scriptfile] [-f scriptfile [-f scriptfile] ...]
[--port port]
[-s SEED] [-v [-v] ...]
[--throttle MILLISEC] [--randomize-throttle]
[--profile-wait MILLISEC]
[--device-sleep-time MILLISEC]
[--randomize-script]
[--script-log]
[--bugreport]
[--periodic-bugreport]
[--permission-target-system]
COUNT
Spoiler: MORE
more
Spoiler: MORE COMMANDS
usage: more [FILE...]
View FILE(s) (or stdin) one screenfull at a time.
Spoiler: ALL BIN SYSTEMS CONTINUED PART 9 (M-P)
Spoiler: MOUNT
mount
Spoiler: MOUNT COMMANDS
usage: mount [-afFrsvw] [-t TYPE] [-o OPTION,] [[DEVICE] DIR]
Mount new filesystem(s) on directories. With no arguments, display existing
mounts.
-a Mount all entries in /etc/fstab (with -t, only entries of that TYPE)
-O Only mount -a entries that have this option
-f Fake it (don't actually mount)
-r Read only (same as -o ro)
-w Read/write (default, same as -o rw)
-t Specify filesystem type
-v Verbose
OPTIONS is a comma separated list of options, which can also be supplied
as --longopts.
Autodetects loopback mounts (a file on a directory) and bind mounts (file
on file, directory on directory), so you don't need to say --bind or --loop.
You can also "mount -a /path" to mount everything in /etc/fstab under /path,
even if it's noauto. DEVICE starting with UUID= is identified by blkid -U.
Spoiler: MOUNT KNOWLEDGE
mount(8): mount filesystem - Linux man page
mount -a [-t type] [-O optlist] (usually given in a bootscript) causes all filesystems mentioned in fstab (of the proper type and/or having or not having ...
linux.die.net
Spoiler: MOUNTPOINT
mountpoint
Spoiler: MOUNTPOINT COMMANDS
usage: mountpoint [-qd] DIR
mountpoint [-qx] DEVICE
Check whether the directory or device is a mountpoint.
-q Be quiet, return zero if directory is a mountpoint
-d Print major/minor device number of the directory
-x Print major/minor device number of the block device
Spoiler: MOUNTPOINT KNOWLEDGE
What Is Mount Point In Linux Install? – Systran Box
www.systranbox.com
Spoiler: MOVE_WIDEVINE_DATA.sh
move_widevine_data.sh
Spoiler: PRINTS THIS
SELinux: Loaded file_contexts
SELinux: Could not stat /data/vendor/mediadrm: Permission denied.
/system/bin/move_widevine_data.sh[29]: can't create /data/vendor/mediadrm/files_moved: Permission denied
Spoiler: MTK_PLPATH_UTILS
mtk_plpath_utils
inaccessible or not found
Spoiler: MTPD
mtpd
inaccessible or not found
Spoiler: MV
mv
Spoiler: MOVE COMMANDS
usage: mv [-finTv] SOURCE... DEST
-f Force copy by deleting destination file
-i Interactive, prompt before overwriting existing DEST
-n No clobber (don't overwrite DEST)
-T DEST always treated as file, max 2 arguments
-v Verbose
Spoiler: NC
nc
Spoiler: NETCAT COMMANDS
NC IS THE SHORTCUT FOR "NETCAT" YOU CAN USE EITHER NC OR NETCAT
usage: netcat [-46Ut] [-lL COMMAND...] [-u] [-wpq #] [-s addr] {IPADDR PORTNUM|-f FILENAME}
Forward stdin/stdout to a file or network connection.
-4 Force IPv4
-6 Force IPv6
-L Listen for multiple incoming connections (server mode)
-U Use a UNIX domain socket
-W SECONDS timeout for more data on an idle connection
-f Use FILENAME (ala /dev/ttyS0) instead of network
-l Listen for one incoming connection
-p Local port number
-q Quit SECONDS after EOF on stdin, even if stdout hasn't closed yet
-s Local source address
-t Allocate tty (must come before -l or -L)
-u Use UDP
-w SECONDS timeout to establish connection
Use "stty 115200 -F /dev/ttyS0 && stty raw -echo -ctlecho" with
netcat -f to connect to a serial port.
The command line after -l or -L is executed (as a child process) to handle
each incoming connection. If blank -l waits for a connection and forwards
it to stdin/stdout. If no -p specified, -l prints port it bound to and
backgrounds itself (returning immediately).
For a quick-and-dirty server, try something like:
netcat -s 127.0.0.1 -p 1234 -tL /bin/bash -l
Spoiler: NDC
ndc
Usage: ndc (<cmd> [arg ...])
Spoiler: NDC-WRAPPER-1.0
ndc-wrapper-1.0
inaccessible or not found
Spoiler: NETCAT
netcat
Spoiler: NETCAT COMMANDS
usage: netcat [-46Ut] [-lL COMMAND...] [-u] [-wpq #] [-s addr] {IPADDR PORTNUM|-f FILENAME}
Forward stdin/stdout to a file or network connection.
-4 Force IPv4
-6 Force IPv6
-L Listen for multiple incoming connections (server mode)
-U Use a UNIX domain socket
-W SECONDS timeout for more data on an idle connection
-f Use FILENAME (ala /dev/ttyS0) instead of network
-l Listen for one incoming connection
-p Local port number
-q Quit SECONDS after EOF on stdin, even if stdout hasn't closed yet
-s Local source address
-t Allocate tty (must come before -l or -L)
-u Use UDP
-w SECONDS timeout to establish connection
Use "stty 115200 -F /dev/ttyS0 && stty raw -echo -ctlecho" with
netcat -f to connect to a serial port.
The command line after -l or -L is executed (as a child process) to handle
each incoming connection. If blank -l waits for a connection and forwards
it to stdin/stdout. If no -p specified, -l prints port it bound to and
backgrounds itself (returning immediately).
For a quick-and-dirty server, try something like:
netcat -s 127.0.0.1 -p 1234 -tL /bin/bash -l
Spoiler: NETD
netd
inaccessible or not found
Spoiler: NETSTAT
netstat
Spoiler: NETSTAT COMMANDS
usage: netstat [-pWrxwutneal]
Display networking information. Default is netstat -tuwx
-r Routing table
-a All sockets (not just connected)
-l Listening server sockets
-t TCP sockets
-u UDP sockets
-w Raw sockets
-x Unix sockets
-e Extended info
-n Don't resolve names
-W Wide display
-p Show PID/program name of sockets
Spoiler: PRINTS THIS
Spoiler: NETUTILS-WRAPPER-1.0
netutils-wrapper-1.0
inaccessible or not found
Spoiler: NEWFS_MSDOS
newfs_msdos
Spoiler: NEWFS_MSDOS COMMANDS
usage: newfs_msdos [ -options ] special [disktype]
where the options are:
[email protected] Offset in device
-A Attempt to cluster align root directory
-B Bootstrap file
-C Create file
-F FAT type (12, 16, or 32)
-I Volume ID
-L Volume Label
-N Don't create filesystem, print params only
-O OEM string
-S Bytes per sector
-T Timestamp
-a Sectors per FAT
-b Block size
-c Sectors per cluster
-e Directory entries
-f Standard format floppies (160,180,320,360,640,720,1200,1232,1440,2880)
-h Drive heads
-i Info sector
-k Backup sector
-m Media descriptor
-n Number of FATs
-o Hidden sectors
-r Reserved sectors
-s File System size
-u Sectors per track
Spoiler: NICE
nice
Spoiler: NICE COMMANDS
usage: nice [-n PRIORITY] COMMAND...
Run a command line at an increased or decreased scheduling priority.
Higher numbers make a program yield more CPU time, from -20 (highest
priority) to 19 (lowest). By default processes inherit their parent's
niceness (usually 0). By default this command adds 10 to the parent's
priority. Only root can set a negative niceness level.
Spoiler: NL
nl
Spoiler: NL COMMANDS
usage: nl [-E] [-l #] [-b MODE] [-n STYLE] [-s SEPARATOR] [-v #] [-w WIDTH] [FILE...]
Number lines of input.
-E Use extended regex syntax (when doing -b pREGEX)
-b Which lines to number: a (all) t (non-empty, default) pREGEX (pattern)
-l Only count last of this many consecutive blank lines
-n Number STYLE: ln (left justified) rn (right justified) rz (zero pad)
-s Separator to use between number and line (instead of TAB)
-v Starting line number for each section (default 1)
-w Width of line numbers (default 6)
Spoiler: NOHUP
nohup
Spoiler: NOHUP COMMANDS
usage: nohup COMMAND...
Run a command that survives the end of its terminal.
Redirect tty on stdin to /dev/null, tty on stdout to "nohup.out".
Spoiler: NOTIFY_TRACEUR.SH
notify_traceur.sh
inaccessible or not found
Spoiler: NPROC
nproc
Spoiler: NPROC COMMANDS
usage: nproc [--all]
Print number of processors.
--all Show all processors, not just ones this task can run on
IT SHOWED 8 FOR THIS DEVICE
Spoiler: NSENTER
nsenter
Spoiler: NSENTER COMMANDS
usage: nsenter [-t pid] [-F] [-i] [-m] [-n] [-p] [-u] [-U] COMMAND...
Run COMMAND in an existing (set of) namespace(s).
-t PID to take namespaces from (--target)
-F don't fork, even if -p is used (--no-fork)
The namespaces to switch are:
-i SysV IPC: message queues, semaphores, shared memory (--ipc)
-m Mount/unmount tree (--mount)
-n Network address, sockets, routing, iptables (--net)
-p Process IDs and init, will fork unless -F is used (--pid)
-u Host and domain names (--uts)
-U UIDs, GIDs, capabilities (--user)
If -t isn't specified, each namespace argument must provide a path
to a namespace file, ala "-i=/proc/$PID/ns/ipc"
Spoiler: OD
od
Spoiler: OD COMMANDS
usage: od [-bcdosxv] [-j #] [-N #] [-w #] [-A doxn] [-t acdfoux[#]]
Dump data in octal/hex.
-A Address base (decimal, octal, hexadecimal, none)
-j Skip this many bytes of input
-N Stop dumping after this many bytes
-t Output type a(scii) c(har) d(ecimal) f(loat) o(ctal) u(nsigned) (he)x
plus optional size in bytes
aliases: -b=-t o1, -c=-t c, -d=-t u2, -o=-t o2, -s=-t d2, -x=-t x2
-v Don't collapse repeated lines together
-w Total line width in bytes (default 16)
Spoiler: OEM-IPTABLES-INIT.SH
oem-iptables-init.sh
No such file or directory
Spoiler: OTAPREOPT
otapreopt
does nothing but does not halt shell
Spoiler: OTAPREOPT_CHROOT
otapreopt_chroot
inaccessible or not found
Spoiler: OTAPREOPT_SCRIPT
otapreopt_script
Unknown target slot
Spoiler: OTAPREOPT_SLOT
otapreopt_slot
inaccessible or not found
Spoiler: PASTE
paste
Spoiler: PASTE COMMANDS
usage: paste [-s] [-d DELIMITERS] [FILE...]
Merge corresponding lines from each input file.
-d List of delimiter characters to separate fields with (default is \t)
-s Sequential mode: turn each input file into one line of output
Spoiler: PATCH
patch
Spoiler: PATCH COMMANDS
usage: patch [-d DIR] [-i PATCH] [-p DEPTH] [-F FUZZ] [-Rlsu] [--dry-run] [FILE [PATCH]]
Apply a unified diff to one or more files.
-d Modify files in DIR
-i Input patch file (default=stdin)
-l Loose match (ignore whitespace)
-p Number of '/' to strip from start of file paths (default=all)
-R Reverse patch
-s Silent except for errors
-u Ignored (only handles "unified" diffs)
--dry-run Don't change files, just confirm patch applies
This version of patch only handles unified diffs, and only modifies
a file when all hunks to that file apply. Patch prints failed hunks
to stderr, and exits with nonzero status if any hunks fail.
A file compared against /dev/null (or with a date <= the epoch) is
created/deleted as appropriate.
Spoiler: PERFETTO
perfetto
Spoiler: PERFETTO COMMANDS
268.634 perfetto_cmd.cc:187
Usage: perfetto
--background -d : Exits immediately and continues tracing in
background
--config -c : /path/to/trace/config/file or - for stdin
--out -o : /path/to/out/trace/file or - for stdout
--upload : Upload field trace (Android only)
--dropbox TAG : DEPRECATED: Use --upload instead
TAG should always be set to 'perfetto'
--no-guardrails : Ignore guardrails triggered when using --dropbox
(for testing).
--txt : Parse config as pbtxt. Not for production use.
Not a stable API.
--reset-guardrails : Resets the state of the guardails and exits
(for testing).
--query : Queries the service state and prints it as
human-readable text.
--query-raw : Like --query, but prints raw proto-encoded bytes
of tracing_service_state.proto.
--help -h
light configuration flags: (only when NOT using -c/--config)
--time -t : Trace duration N[s,m,h] (default: 10s)
--buffer -b : Ring buffer size N[mb,gb] (default: 32mb)
--size -s : Max file size N[mb,gb] (default: in-memory ring-buffer only)
ATRACE_CAT : Record ATRACE_CAT (e.g. wm)
FTRACE_GROUP/FTRACE_NAME : Record ftrace event (e.g. sched/sched_switch)
FTRACE_GROUP/* : Record all events in group (e.g. sched/*)
statsd-specific flags:
--alert-id : ID of the alert that triggered this trace.
--config-id : ID of the triggering config.
--config-uid : UID of app which registered the config.
--subscription-id : ID of the subscription that triggered this trace.
Detach mode. DISCOURAGED, read https://docs.perfetto.dev/#/detached-mode :
--detach=key : Detach from the tracing session with the given key.
--attach=key [--stop] : Re-attach to the session (optionally stop tracing once reattached).
--is_detached=key : Check if the session can be re-attached (0:Yes, 2:No, 1:Error).
Spoiler: ALL BIN SYSTEMS CONTINUED PART 10 (P-R)
Spoiler: PGREP
pgrep
Spoiler: PGREP COMMANDS
usage: pgrep [-clfnovx] [-d DELIM] [-L SIGNAL] [PATTERN] [-G GID,] [-g PGRP,] [-P PPID,] [-s SID,] [-t TERM,] [-U UID,] [-u EUID,]
Search for process(es). PATTERN is an extended regular expression checked
against command names.
-c Show only count of matches
-d Use DELIM instead of newline
-L Send SIGNAL instead of printing name
-l Show command name
-f Check full command line for PATTERN
-G Match real Group ID(s)
-g Match Process Group(s) (0 is current user)
-n Newest match only
-o Oldest match only
-P Match Parent Process ID(s)
-s Match Session ID(s) (0 for current)
-t Match Terminal(s)
-U Match real User ID(s)
-u Match effective User ID(s)
-v Negate the match
-x Match whole command (not substring)
Spoiler: PIDOF
pidof
Spoiler: PIDOF COMMANDS
usage: pidof [-s] [-o omitpid[,omitpid...]] [NAME]...
Print the PIDs of all processes with the given names.
-s Single shot, only return one pid
-o Omit PID(s)
-x Match shell scripts too
Spoiler: PING
ping
Spoiler: PING COMMANDS
Usage: ping [-aAbBdDfhLnOqrRUvV] [-c count] [-i interval] [-I interface]
[-m mark] [-M pmtudisc_option] [-l preload] [-p pattern] [-Q tos]
[-s packetsize] [-S sndbuf] [-t ttl] [-T timestamp_option]
[-w deadline] [-W timeout] [hop1 ...] destination
Spoiler: PING6
ping6
Spoiler: PING6 COMMANDS
Usage: ping6 [-aAbBdDfhLnOqrRUvV] [-c count] [-i interval] [-I interface]
[-l preload] [-m mark] [-M pmtudisc_option]
[-N nodeinfo_option] [-p pattern] [-Q tclass] [-s packetsize]
[-S sndbuf] [-t ttl] [-T timestamp_option] [-w deadline]
[-W timeout] destination
Spoiler: PKILL
pkill
Spoiler: PKILL COMMANDS
usage: pkill [-fnovx] [-SIGNAL|-l SIGNAL] [PATTERN] [-G GID,] [-g PGRP,] [-P PPID,] [-s SID,] [-t TERM,] [-U UID,] [-u EUID,]
-l Send SIGNAL (default SIGTERM)
-V Verbose
-f Check full command line for PATTERN
-G Match real Group ID(s)
-g Match Process Group(s) (0 is current user)
-n Newest match only
-o Oldest match only
-P Match Parent Process ID(s)
-s Match Session ID(s) (0 for current)
-t Match Terminal(s)
-U Match real User ID(s)
-u Match effective User ID(s)
-v Negate the match
-x Match whole command (not substring)
Spoiler: PM
pm
Spoiler: SHELL PICTURES CONTINUED
Spoiler: PACKAGE MANAGER COMMANDS
Package manager (package) commands:
help
Print this help text.
path [--user USER_ID] PACKAGE
Print the path to the .apk of the given PACKAGE.
dump PACKAGE
Print various system state associated with the given PACKAGE.
has-feature FEATURE_NAME [version]
Prints true and returns exit status 0 when system has a FEATURE_NAME,
otherwise prints false and returns exit status 1
list features
Prints all features of the system.
list instrumentation [-f] [TARGET-PACKAGE]
Prints all test packages; optionally only those targeting TARGET-PACKAGE
Options:
-f: dump the name of the .apk file containing the test package
list libraries
Prints all system libraries.
list packages [-f] [-d] [-e] [-s] [-3] [-i] [-l] [-u] [-U]
[--show-versioncode] [--apex-only] [--uid UID] [--user USER_ID] [FILTER]
Prints all packages; optionally only those whose name contains
the text in FILTER. Options are:
-f: see their associated file
-a: all known packages (but excluding APEXes)
-d: filter to only show disabled packages
-e: filter to only show enabled packages
-s: filter to only show system packages
-3: filter to only show third party packages
-i: see the installer for the packages
-l: ignored (used for compatibility with older releases)
-U: also show the package UID
-u: also include uninstalled packages
--show-versioncode: also show the version code
--apex-only: only show APEX packages
--uid UID: filter to only show packages with the given UID
--user USER_ID: only list packages belonging to the given user
list permission-groups
Prints all known permission groups.
list permissions [-g] [-f] [-d] [-u] [GROUP]
Prints all known permissions; optionally only those in GROUP. Options are:
-g: organize by group
-f: print all information
-s: short summary
-d: only list dangerous permissions
-u: list only the permissions users will see
list staged-sessions [--only-ready] [--only-sessionid] [--only-parent]
Prints all staged sessions.
--only-ready: show only staged sessions that are ready
--only-sessionid: show only sessionId of each session
--only-parent: hide all children sessions
list users
Prints all users.
resolve-activity [--brief] [--components] [--query-flags FLAGS]
[--user USER_ID] INTENT
Prints the activity that resolves to the given INTENT.
query-activities [--brief] [--components] [--query-flags FLAGS]
[--user USER_ID] INTENT
Prints all activities that can handle the given INTENT.
query-services [--brief] [--components] [--query-flags FLAGS]
[--user USER_ID] INTENT
Prints all services that can handle the given INTENT.
query-receivers [--brief] [--components] [--query-flags FLAGS]
[--user USER_ID] INTENT
Prints all broadcast receivers that can handle the given INTENT.
install [-rtfdgw] [-i PACKAGE] [--user USER_ID|all|current]
[-p INHERIT_PACKAGE] [--install-location 0/1/2]
[--install-reason 0/1/2/3/4] [--originating-uri URI]
[--referrer URI] [--abi ABI_NAME] [--force-sdk]
[--preload] [--instant] [--full] [--dont-kill]
[--enable-rollback]
[--force-uuid internal|UUID] [--pkg PACKAGE] [-S BYTES]
[--apex] [--wait TIMEOUT]
[PATH [SPLIT...]|-]
Install an application. Must provide the apk data to install, either as
file path(s) or '-' to read from stdin. Options are:
-R: disallow replacement of existing application
-t: allow test packages
-i: specify package name of installer owning the app
-f: install application on internal flash
-d: allow version code downgrade (debuggable packages only)
-p: partial application install (new split on top of existing pkg)
-g: grant all runtime permissions
-S: size in bytes of package, required for stdin
--user: install under the given user.
--dont-kill: installing a new feature split, don't kill running app
--restrict-permissions: don't whitelist restricted permissions at install
--originating-uri: set URI where app was downloaded from
--referrer: set URI that instigated the install of the app
--pkg: specify expected package name of app being installed
--abi: override the default ABI of the platform
--instant: cause the app to be installed as an ephemeral install app
--full: cause the app to be installed as a non-ephemeral full app
--install-location: force the install location:
0=auto, 1=internal only, 2=prefer external
--install-reason: indicates why the app is being installed:
0=unknown, 1=admin policy, 2=device restore,
3=device setup, 4=user request
--force-uuid: force install on to disk volume with given UUID
--apex: install an .apex file, not an .apk
--wait: when performing staged install, wait TIMEOUT milliseconds
for pre-reboot verification to complete. If TIMEOUT is not
specified it will wait for 60000 milliseconds.
install-existing [--user USER_ID|all|current]
[--instant] [--full] [--wait] [--restrict-permissions] PACKAGE
Installs an existing application for a new user. Options are:
--user: install for the given user.
--instant: install as an instant app
--full: install as a full app
--wait: wait until the package is installed
--restrict-permissions: don't whitelist restricted permissions
install-create [-lrtsfdg] [-i PACKAGE] [--user USER_ID|all|current]
[-p INHERIT_PACKAGE] [--install-location 0/1/2]
[--install-reason 0/1/2/3/4] [--originating-uri URI]
[--referrer URI] [--abi ABI_NAME] [--force-sdk]
[--preload] [--instant] [--full] [--dont-kill]
[--force-uuid internal|UUID] [--pkg PACKAGE] [--apex] [-S BYTES]
[--multi-package] [--staged]
Like "install", but starts an install session. Use "install-write"
to push data into the session, and "install-commit" to finish.
install-write [-S BYTES] SESSION_ID SPLIT_NAME [PATH|-]
Write an apk into the given install session. If the path is '-', data
will be read from stdin. Options are:
-S: size in bytes of package, required for stdin
install-remove SESSION_ID SPLIT...
Mark SPLIT(s) as removed in the given install session.
install-add-session MULTI_PACKAGE_SESSION_ID CHILD_SESSION_IDs
Add one or more session IDs to a multi-package session.
install-commit SESSION_ID
Commit the given active install session, installing the app.
install-abandon SESSION_ID
Delete the given active install session.
set-install-location LOCATION
Changes the default install location. NOTE this is only intended for debugging;
using this can cause applications to break and other undersireable behavior.
LOCATION is one of:
0 [auto]: Let system decide the best location
1 [internal]: Install on internal device storage
2 [external]: Install on external media
get-install-location
Returns the current install location: 0, 1 or 2 as per set-install-location.
move-package PACKAGE [internal|UUID]
move-primary-storage [internal|UUID]
uninstall [-k] [--user USER_ID] [--versionCode VERSION_CODE]
PACKAGE [SPLIT...]
Remove the given package name from the system. May remove an entire app
if no SPLIT names specified, otherwise will remove only the splits of the
given app. Options are:
-k: keep the data and cache directories around after package removal.
--user: remove the app from the given user.
--versionCode: only uninstall if the app has the given version code.
clear [--user USER_ID] PACKAGE
Deletes all data associated with a package.
enable [--user USER_ID] PACKAGE_OR_COMPONENT
disable [--user USER_ID] PACKAGE_OR_COMPONENT
disable-user [--user USER_ID] PACKAGE_OR_COMPONENT
disable-until-used [--user USER_ID] PACKAGE_OR_COMPONENT
default-state [--user USER_ID] PACKAGE_OR_COMPONENT
These commands change the enabled state of a given package or
component (written as "package/class").
hide [--user USER_ID] PACKAGE_OR_COMPONENT
unhide [--user USER_ID] PACKAGE_OR_COMPONENT
suspend [--user USER_ID] TARGET-PACKAGE
Suspends the specified package (as user).
unsuspend [--user USER_ID] TARGET-PACKAGE
Unsuspends the specified package (as user).
grant [--user USER_ID] PACKAGE PERMISSION
revoke [--user USER_ID] PACKAGE PERMISSION
These commands either grant or revoke permissions to apps. The permissions
must be declared as used in the app's manifest, be runtime permissions
(protection level dangerous), and the app targeting SDK greater than Lollipop MR1.
reset-permissions
Revert all runtime permissions to their default state.
set-permission-enforced PERMISSION [true|false]
get-privapp-permissions TARGET-PACKAGE
Prints all privileged permissions for a package.
get-privapp-deny-permissions TARGET-PACKAGE
Prints all privileged permissions that are denied for a package.
get-oem-permissions TARGET-PACKAGE
Prints all OEM permissions for a package.
set-app-link [--user USER_ID] PACKAGE {always|ask|never|undefined}
get-app-link [--user USER_ID] PACKAGE
trim-caches DESIRED_FREE_SPACE [internal|UUID]
Trim cache files to reach the given free space.
list users
Lists the current users.
create-user [--profileOf USER_ID] [--managed] [--restricted] [--ephemeral]
[--guest] [--pre-create-only] [--user-type USER_TYPE] USER_NAME
Create a new user with the given USER_NAME, printing the new user identifier
of the user.
USER_TYPE is the name of a user type, e.g. android.os.usertype.profile.MANAGED.
If not specified, the default user type is android.os.usertype.full.SECONDARY.
--managed is shorthand for '--user-type android.os.usertype.profile.MANAGED'.
--restricted is shorthand for '--user-type android.os.usertype.full.RESTRICTED'.
--guest is shorthand for '--user-type android.os.usertype.full.GUEST'.
remove-user USER_ID
Remove the user with the given USER_IDENTIFIER, deleting all data
associated with that user
set-user-restriction [--user USER_ID] RESTRICTION VALUE
get-max-users
get-max-running-users
compile [-m MODE | -r REASON] [-f] [-c] [--split SPLIT_NAME]
[--reset] [--check-prof (true | false)] (-a | TARGET-PACKAGE)
Trigger compilation of TARGET-PACKAGE or all packages if "-a". Options are:
-a: compile all packages
-c: clear profile data before compiling
-f: force compilation even if not needed
-m: select compilation mode
MODE is one of the dex2oat compiler filters:
assume-verified
extract
verify
quicken
space-profile
space
speed-profile
speed
everything
-r: select compilation reason
REASON is one of:
first-boot
boot
install
bg-dexopt
ab-ota
inactive
shared
--reset: restore package to its post-install state
--check-prof (true | false): look at profiles when doing dexopt?
--secondary-dex: compile app secondary dex files
--split SPLIT: compile only the given split name
--compile-layouts: compile layout resources for faster inflation
force-dex-opt PACKAGE
Force immediate execution of dex opt for the given PACKAGE.
bg-dexopt-job
Execute the background optimizations immediately.
Note that the command only runs the background optimizer logic. It may
overlap with the actual job but the job scheduler will not be able to
cancel it. It will also run even if the device is not in the idle
maintenance mode.
reconcile-secondary-dex-files TARGET-PACKAGE
Reconciles the package secondary dex files with the generated oat files.
dump-profiles TARGET-PACKAGE
Dumps method/class profile files to
/data/misc/profman/TARGET-PACKAGE.txt
snapshot-profile TARGET-PACKAGE [--code-path path]
Take a snapshot of the package profiles to
/data/misc/profman/TARGET-PACKAGE[-code-path].prof
If TARGET-PACKAGE=android it will take a snapshot of the boot image
set-home-activity [--user USER_ID] TARGET-COMPONENT
Set the default home activity (aka launcher).
TARGET-COMPONENT can be a package name (com.package.my) or a full
component (com.package.my/component.name). However, only the package name
matters: the actual component used will be determined automatically from
the package.
set-installer PACKAGE INSTALLER
Set installer package name
get-instantapp-resolver
Return the name of the component that is the current instant app installer.
set-harmful-app-warning [--user <USER_ID>] <PACKAGE> [<WARNING>]
Mark the app as harmful with the given warning message.
get-harmful-app-warning [--user <USER_ID>] <PACKAGE>
Return the harmful app warning message for the given app, if present
uninstall-system-updates [<PACKAGE>]
Removes updates to the given system application and falls back to its
/system version. Does nothing if the given package is not a system app.
If no package is specified, removes updates to all system applications.
get-moduleinfo [--all | --installed] [module-name]
Displays module info. If module-name is specified only that info is shown
By default, without any argument only installed modules are shown.
--all: show all module info
--installed: show only installed modules
log-visibility [--enable|--disable] <PACKAGE>
Turns on debug logging when visibility is blocked for the given package.
--enable: turn on debug logging (default)
--disable: turn off debug logging
<INTENT> specifications include these flags and arguments:
[-a <ACTION>] [-d <DATA_URI>] [-t <MIME_TYPE>] [-i <IDENTIFIER>]
[-c <CATEGORY> [-c <CATEGORY>] ...]
[-n <COMPONENT_NAME>]
[-e|--es <EXTRA_KEY> <EXTRA_STRING_VALUE> ...]
[--esn <EXTRA_KEY> ...]
[--ez <EXTRA_KEY> <EXTRA_BOOLEAN_VALUE> ...]
[--ei <EXTRA_KEY> <EXTRA_INT_VALUE> ...]
[--el <EXTRA_KEY> <EXTRA_LONG_VALUE> ...]
[--ef <EXTRA_KEY> <EXTRA_FLOAT_VALUE> ...]
[--eu <EXTRA_KEY> <EXTRA_URI_VALUE> ...]
[--ecn <EXTRA_KEY> <EXTRA_COMPONENT_NAME_VALUE>]
[--eia <EXTRA_KEY> <EXTRA_INT_VALUE>[,<EXTRA_INT_VALUE...]]
(mutiple extras passed as Integer[])
[--eial <EXTRA_KEY> <EXTRA_INT_VALUE>[,<EXTRA_INT_VALUE...]]
(mutiple extras passed as List<Integer>)
[--ela <EXTRA_KEY> <EXTRA_LONG_VALUE>[,<EXTRA_LONG_VALUE...]]
(mutiple extras passed as Long[])
[--elal <EXTRA_KEY> <EXTRA_LONG_VALUE>[,<EXTRA_LONG_VALUE...]]
(mutiple extras passed as List<Long>)
[--efa <EXTRA_KEY> <EXTRA_FLOAT_VALUE>[,<EXTRA_FLOAT_VALUE...]]
(mutiple extras passed as Float[])
[--efal <EXTRA_KEY> <EXTRA_FLOAT_VALUE>[,<EXTRA_FLOAT_VALUE...]]
(mutiple extras passed as List<Float>)
[--esa <EXTRA_KEY> <EXTRA_STRING_VALUE>[,<EXTRA_STRING_VALUE...]]
(mutiple extras passed as String[]; to embed a comma into a string,
escape it using "\,")
[--esal <EXTRA_KEY> <EXTRA_STRING_VALUE>[,<EXTRA_STRING_VALUE...]]
(mutiple extras passed as List<String>; to embed a comma into a string,
escape it using "\,")
[-f <FLAG>]
[--grant-read-uri-permission] [--grant-write-uri-permission]
[--grant-persistable-uri-permission] [--grant-prefix-uri-permission]
[--debug-log-resolution] [--exclude-stopped-packages]
[--include-stopped-packages]
[--activity-brought-to-front] [--activity-clear-top]
[--activity-clear-when-task-reset] [--activity-exclude-from-recents]
[--activity-launched-from-history] [--activity-multiple-task]
[--activity-no-animation] [--activity-no-history]
[--activity-no-user-action] [--activity-previous-is-top]
[--activity-reorder-to-front] [--activity-reset-task-if-needed]
[--activity-single-top] [--activity-clear-task]
[--activity-task-on-home] [--activity-match-external]
[--receiver-registered-only] [--receiver-replace-pending]
[--receiver-foreground] [--receiver-no-abort]
[--receiver-include-background]
[--selector]
[<URI> | <PACKAGE> | <COMPONENT>]
Spoiler: PACKAGE MANAGER KNOWLEDGE
adbcommand.com - adbcommand Resources and Information.
adbcommand.com is your first and best source for all of the information you’re looking for. From general topics to more of what you would expect to find here, adbcommand.com has it all. We hope you find what you are searching for!
adbcommand.com
Difference between adb "install" command and "pm install" command?
What's the difference between installing an app using the install command and using the package manager's pm install command? Do they do the exact same job? Does one command actually call the other...
stackoverflow.com
Android Package Manager (pm) Cheat Sheet
How to use the Android Package Manager (pm)
cheatography.com
Installing an APK using pm command
I tried updating an APK using this code: Process process; process = Runtime.getRuntime().exec(new String[] {"su", "-c", "pm install -r -d"+MyApk.apk}); but it does not work. This works well when...
stackoverflow.com
Spoiler: PMAP
pmap
Spoiler: PMAP COMMANDS
usage: pmap [-xq] [pids...]
Report the memory map of a process or processes.
-x Show the extended format
-q Do not display some header/footer lines
Spoiler: PPPD
pppd
inaccessible or not found
Spoiler: PRELOADS_COPY.sh
preloads_copy.sh
inaccessible or not found
Spoiler: PRELOADS_COPY_EXT.sh
preloads_copy_ext.sh
inaccessible or not found
Spoiler: PREOPT2CACHENAME
preopt2cachename
inaccessible or not found
Spoiler: PRINTENV
printenv
Spoiler: PRINTENV COMMANDS
usage: printenv [-0] [env_var...]
Print environment variables.
-0 Use \0 as delimiter instead of \n
Spoiler: PRINTS THIS
ANDROID_DATA=/data
ANDROID_ART_ROOT=/apex/com.android.art
HOME=/
ANDROID_TZDATA_ROOT=/apex/com.android.tzdata
SYSTEMSERVERCLASSPATH=/system/framework/com.android.location.provider.jar:/system/framework/services.jar:/system/framework/ethernet-service.jar:/apex/com.android.permission/javalib/service-permission.jar:/apex/com.android.wifi/javalib/service-wifi.jar:/apex/com.android.ipsec/javalib/android.net.ipsec.ike.jar
TERM=xterm-256color
ANDROID_SOCKET_adbd=18
ANDROID_STORAGE=/storage
EXTERNAL_STORAGE=/sdcard
DOWNLOAD_CACHE=/data/cache
LOGNAME=shell
ANDROID_ASSETS=/system/app
DEX2OATBOOTCLASSPATH=/apex/com.android.art/javalib/core-oj.jar:/apex/com.android.art/javalib/core-libart.jar:/apex/com.android.art/javalib/core-icu4j.jar:/apex/com.android.art/javalib/okhttp.jar:/apex/com.android.art/javalib/bouncycastle.jar:/apex/com.android.art/javalib/apache-xml.jar:/system/framework/framework.jar:/system/framework/ext.jar:/system/framework/telephony-common.jar:/system/framework/voip-common.jar:/system/framework/ims-common.jar:/system/framework/framework-atb-backward-compatibility.jar:/system/framework/mediatek-telephony-base.jar:/system/framework/mediatek-telephony-common.jar:/system/framework/mediatek-common.jar:/system/framework/mediatek-framework.jar:/system/framework/mediatek-ims-common.jar:/system/framework/mediatek-ims-base.jar:/system/framework/mediatek-telecom-common.jar
BOOTCLASSPATH=/apex/com.android.art/javalib/core-oj.jar:/apex/com.android.art/javalib/core-libart.jar:/apex/com.android.art/javalib/core-icu4j.jar:/apex/com.android.art/javalib/okhttp.jar:/apex/com.android.art/javalib/bouncycastle.jar:/apex/com.android.art/javalib/apache-xml.jar:/system/framework/framework.jar:/system/framework/ext.jar:/system/framework/telephony-common.jar:/system/framework/voip-common.jar:/system/framework/ims-common.jar:/system/framework/framework-atb-backward-compatibility.jar:/system/framework/mediatek-telephony-base.jar:/system/framework/mediatek-telephony-common.jar:/system/framework/mediatek-common.jar:/system/framework/mediatek-framework.jar:/system/framework/mediatek-ims-common.jar:/system/framework/mediatek-ims-base.jar:/system/framework/mediatek-telecom-common.jar:/apex/com.android.conscrypt/javalib/conscrypt.jar:/apex/com.android.media/javalib/updatable-media.jar:/apex/com.android.mediaprovider/javalib/framework-mediaprovider.jar:/apex/com.android.os.statsd/javalib/framework-statsd.jar:/apex/com.android.permission/javalib/framework-permission.jar:/apex/com.android.sdkext/javalib/framework-sdkextensions.jar:/apex/com.android.wifi/javalib/framework-wifi.jar:/apex/com.android.tethering/javalib/framework-tethering.jar
SHELL=/bin/sh
ANDROID_BOOTLOGO=1
ASEC_MOUNTPOINT=/mnt/asec
HOSTNAME=RNN_sprout
USER=shell
TMPDIR=/data/local/tmp
PATH=/product/bin:/apex/com.android.runtime/bin:/apex/com.android.art/bin:/system_ext/bin:/system/bin:/system/xbin:/odm/bin:/vendor/bin:/vendor/xbin
ANDROID_ROOT=/system
ANDROID_I18N_ROOT=/apex/com.android.i18n
Spoiler: PRINTF
printf
Spoiler: PRINTF COMMANDS
usage: printf FORMAT [ARGUMENT...]
Format and print ARGUMENT(s) according to FORMAT, using C printf syntax
(% escapes for cdeEfgGiosuxX, \ escapes for abefnrtv0 or \OCTAL or \xHEX).
Spoiler: PROCRANK
procrank
Spoiler: PROCRANK COMMADS
usage: printf FORMAT [ARGUMENT...]
Format and print ARGUMENT(s) according to FORMAT, using C printf syntax
(% escapes for cdeEfgGiosuxX, \ escapes for abefnrtv0 or \OCTAL or \xHEX).
ZRAM: 0K physical used for 1525156K in swap (2097148K total swap)
RAM: 3917560K total, 245192K free, 63824K buffers, 1382364K cached, 27672K shmem, 295508K slab
Usage: procrank [ -W ] [ -v | -r | -p | -u | -s | -h ]
-v Sort by VSS.
-r Sort by RSS.
-p Sort by PSS.
-u Sort by USS.
-s Sort by swap.
(Default sort order is PSS.)
-R Reverse sort order (default is descending).
-c Only show cached (storage backed) pages
-C Only show non-cached (ram/swap backed) pages
-k Only show pages collapsed by KSM
-w Display statistics for working set only.
-W Reset working set of all processes.
-o Show and sort by oom score against lowmemorykiller thresholds.
-h Display this help screen.
Spoiler: PS
ps
Spoiler: PS COMMANDS
usage: ps [-AadefLlnwZ] [-gG GROUP,] [-k FIELD,] [-o FIELD,] [-p PID,] [-t TTY,] [-uU USER,]
List processes.
Which processes to show (-gGuUpPt selections may be comma separated lists):
-A All -a Has terminal not session leader
-d All but session leaders -e Synonym for -A
-g In GROUPs -G In real GROUPs (before sgid)
-p PIDs (--pid) -P Parent PIDs (--ppid)
-s In session IDs -t Attached to selected TTYs
-T Show threads also -u Owned by selected USERs
-U Real USERs (before suid)
Output modifiers:
-k Sort FIELDs (-FIELD to reverse) -M Measure/pad future field widths
-n Show numeric USER and GROUP -w Wide output (don't truncate fields)
Which FIELDs to show. (-o HELP for list, default = -o PID,TTY,TIME,CMD)
-f Full listing (-o USER:12=UID,PID,PPID,C,STIME,TTY,TIME,ARGS=CMD)
-l Long listing (-o F,S,UID,PID,PPID,C,PRI,NI,ADDR,SZ,WCHAN,TTY,TIME,CMD)
-o Output FIELDs instead of defaults, each with optional :size and =title
-O Add FIELDS to defaults
-Z Include LABEL
Spoiler: PWD
pwd
unsure
Spoiler: RACOON
racoon
inaccessible or not found
Spoiler: READELF
readelf
Spoiler: READELF COMMANDS
usage: readelf [-adhlnSsW] [-p SECTION] [-x SECTION] [file...]
Displays information about ELF files.
-a Equivalent to -dhlnSs
-d Show dynamic section
-h Show ELF header
-l Show program headers
-n Show notes
-p S Dump strings found in named/numbered section
-S Show section headers
-s Show symbol tables (.dynsym and .symtab)
-W Don't truncate fields (default in toybox)
-x S Hex dump of named/numbered section
--dyn-syms Show just .dynsym symbol table
Spoiler: ALL BIN SYSTEMS CONTINUED PART 11 (R-S)
Spoiler: READLINK
readlink
Spoiler: READLINK COMMANDS
usage: readlink FILE...
With no options, show what symlink points to, return error if not symlink.
Options for producing canonical paths (all symlinks/./.. resolved):
-e Canonical path to existing entry (fail if missing)
-f Full path (fail if directory missing)
-m Ignore missing entries, show where it would be
-n No trailing newline
-q Quiet (no output, just error code)
Spoiler: REALPATH
realpath
Spoiler: REALPATH COMMANDS
usage: realpath FILE...
Display the canonical absolute pathname
Spoiler: REBOOT
reboot
Just typing "Reboot" Resets the Phone, and Closes the Shell
Spoiler: REBOOT COMMANDS
usage: reboot [-p] [rebootcommand]
Spoiler: RECOVERY-PERSIST
recovery-persist
says inaccessible, but I think may be for the "rebootcommand" under "reboot"
Spoiler: RECOVERY-REFRESH
recovery-refresh
says inaccessible, but I think may be for the "rebootcommand" under "reboot"
Spoiler: RENICE
renice
Spoiler: RENICE COMMANDS
usage: renice [-gpu] -n INCREMENT ID...
Spoiler: REQUESTSYNC
requestsync
Spoiler: REQUESTSYNC COMMANDS
Usage:
requestsync [options]
With no options, a sync will be requested for all account and all sync
authorities with no extras.
Basic options:
-h|--help: Display this message
-n|--account-name <ACCOUNT-NAME>
-t|--account-type <ACCOUNT-TYPE>
-a|--authority <AUTHORITY>
App-standby related options
-f|--foreground (cause WORKING_SET, FREQUENT sync adapters to run immediately)
-F|--top (cause even RARE sync adapters to run immediately)
ContentResolver extra options:
--is|--ignore-settings: Add SYNC_EXTRAS_IGNORE_SETTINGS
--ib|--ignore-backoff: Add SYNC_EXTRAS_IGNORE_BACKOFF
--dd|--discard-deletions: Add SYNC_EXTRAS_DISCARD_LOCAL_DELETIONS
--nr|--no-retry: Add SYNC_EXTRAS_DO_NOT_RETRY
--ex|--expedited: Add SYNC_EXTRAS_EXPEDITED
-i|--initialize: Add SYNC_EXTRAS_INITIALIZE
--m|--manual: Add SYNC_EXTRAS_MANUAL
--od|--override-deletions: Add SYNC_EXTRAS_OVERRIDE_TOO_MANY_DELETIONS
-u|--upload-only: Add SYNC_EXTRAS_UPLOAD
--rc|--require-charging: Add SYNC_EXTRAS_REQUIRE_CHARGING
Custom extra options:
-e|--es|--extra-string <KEY> <VALUE>
--esn|--extra-string-null <KEY>
--ei|--extra-int <KEY> <VALUE>
--el|--extra-long <KEY> <VALUE>
--ef|--extra-float <KEY> <VALUE>
--ed|--extra-double <KEY> <VALUE>
--ez|--extra-bool <KEY> <VALUE>
requestsync add-periodic INTERVAL-SECOND [options]
requestsync remove-periodic [options]
Mandatory options:
-n|--account-name <ACCOUNT-NAME>
-t|--account-type <ACCOUNT-TYPE>
-a|--authority <AUTHORITY>
Also takes the above extra options.
Spoiler: RESIZE.F2FS
resize.f2fs
inaccessible or not found
Spoiler: RESIZE2FS
resize2fs
inaccessible or not found
Spoiler: RESTORECON
restorecon
Spoiler: RESTORECON COMMANDS
usage: restorecon [-D] [-F] [-R] [-n] [-v] FILE...
Restores the default security contexts for the given files.
-D Apply to /data/data too
-F Force reset
-R Recurse into directories
-n Don't make any changes; useful with -v to see what would change
-v Verbose
Spoiler: RM
rm
Spoiler: RM COMMANDS
usage: rm [-fiRrv] FILE...
Remove each argument from the filesystem.
-f Force: remove without confirmation, no error if it doesn't exist
-i Interactive: prompt for confirmation
-rR Recursive: remove directory contents
-v Verbose
Spoiler: RM KNOWLEDGE
Learn How to Use the rm Command
Delete files or directories in Linux
pimylifeup.com
Spoiler: RMDIR
rmdir
Spoiler: RMDIR COMMANDS
usage: rmdir [-p] [DIR...]
Remove one or more directories.
-p Remove path
--ignore-fail-on-non-empty Ignore failures caused by non-empty directories
Spoiler: RMMOD
rmmod
Spoiler: RMMOD COMMANDS
usage: rmmod [-wf] [MODULE]
Unload the module named MODULE from the Linux kernel.
-f Force unload of a module
-w Wait until the module is no longer used
Spoiler: RSS_HWM_RESET
rss_hwm_reset
inaccessible or not found
Spoiler: RUN-AS
run-as
Spoiler: RUN-AS COMMANDS
run-as: usage: run-as <package-name> [--user <uid>] <command> [<args>]
Spoiler: RUNCON
runcon
Spoiler: RUNCON COMMANDS
usage: runcon CONTEXT COMMAND [ARGS...]
Run a command in a specified security context.
Spoiler: SCHEDTEST
schedtest
Spoiler: SCREENCAP
screencap
Spoiler: SCREENCAP COMMANDS
usage: screencap [-hp] [-d display-id] [FILENAME]
-h: this message
-p: save the file as a png.
-d: specify the physical display ID to capture (default: 0)
see "dumpsys SurfaceFlinger --display-id" for valid display IDs.
If FILENAME ends with .png it will be saved as a png.
If FILENAME is not given, the results will be printed to stdout.
Spoiler: SCREENRECORD
screenrecord
Spoiler: SCREENRECORD COMMANDS
Usage: screenrecord [options] <filename>
Android screenrecord v1.3. Records the device's display to a .mp4 file.
Options:
--size WIDTHxHEIGHT
Set the video size, e.g. "1280x720". Default is the device's main
display resolution (if supported), 1280x720 if not. For best results,
use a size supported by the AVC encoder.
--bit-rate RATE
Set the video bit rate, in bits per second. Value may be specified as
bits or megabits, e.g. '4000000' is equivalent to '4M'. Default 20Mbps.
--bugreport
Add additional information, such as a timestamp overlay, that is helpful
in videos captured to illustrate bugs.
--time-limit TIME
Set the maximum recording time, in seconds. Default / maximum is 180.
--display-id ID
specify the physical display ID to record. Default is the primary display.
see "dumpsys SurfaceFlinger --display-id" for valid display IDs.
--verbose
Display interesting information on stdout.
--help
Show this message.
Recording continues until Ctrl-C is hit or the time limit is reached.
Spoiler: SDCARD
sdcard
inaccessible or not found
Spoiler: SECDISCARD
secdiscard
Spoiler: SECDISCARD COMMANDS
Usage: secdiscard [--no-unlink] -- <absolute path> ...
Spoiler: SECILC
secilc
can't execute: Permission denied
Spoiler: SED
sed
Spoiler: SHELL PICTURES CONTINUED
Spoiler: SED COMMANDS
usage: sed [-inrzE] [-e SCRIPT]...|SCRIPT [-f SCRIPT_FILE]... [FILE...]
Stream editor. Apply one or more editing SCRIPTs to each line of input
(from FILE or stdin) producing output (by default to stdout).
-e Add SCRIPT to list
-f Add contents of SCRIPT_FILE to list
-i Edit each file in place (-iEXT keeps backup file with extension EXT)
-n No default output (use the p command to output matched lines)
-r Use extended regular expression syntax
-E POSIX alias for -r
-s Treat input files separately (implied by -i)
-z Use \0 rather than \n as the input line separator
A SCRIPT is a series of one or more COMMANDs separated by newlines or
semicolons. All -e SCRIPTs are concatenated together as if separated
by newlines, followed by all lines from -f SCRIPT_FILEs, in order.
If no -e or -f SCRIPTs are specified, the first argument is the SCRIPT.
Each COMMAND may be preceded by an address which limits the command to
apply only to the specified line(s). Commands without an address apply to
every line. Addresses are of the form:
[ADDRESS[,ADDRESS]][!]COMMAND
The ADDRESS may be a decimal line number (starting at 1), a /regular
expression/ within a pair of forward slashes, or the character "$" which
matches the last line of input. (In -s or -i mode this matches the last
line of each file, otherwise just the last line of the last file.) A single
address matches one line, a pair of comma separated addresses match
everything from the first address to the second address (inclusive). If
both addresses are regular expressions, more than one range of lines in
each file can match. The second address can be +N to end N lines later.
REGULAR EXPRESSIONS in sed are started and ended by the same character
(traditionally / but anything except a backslash or a newline works).
Backslashes may be used to escape the delimiter if it occurs in the
regex, and for the usual printf escapes (\abcefnrtv and octal, hex,
and unicode). An empty regex repeats the previous one. ADDRESS regexes
(above) require the first delimiter to be escaped with a backslash when
it isn't a forward slash (to distinguish it from the COMMANDs below).
Sed mostly operates on individual lines one at a time. It reads each line,
processes it, and either writes it to the output or discards it before
reading the next line. Sed can remember one additional line in a separate
buffer (using the h, H, g, G, and x commands), and can read the next line
of input early (using the n and N command), but other than that command
scripts operate on individual lines of text.
Each COMMAND starts with a single character. The following commands take
no arguments:
! Run this command when the test _didn't_ match.
{ Start a new command block, continuing until a corresponding "}".
Command blocks may nest. If the block has an address, commands within
the block are only run for lines within the block's address range.
} End command block (this command cannot have an address)
d Delete this line and move on to the next one
(ignores remaining COMMANDs)
D Delete one line of input and restart command SCRIPT (same as "d"
unless you've glued lines together with "N" or similar)
g Get remembered line (overwriting current line)
G Get remembered line (appending to current line)
h Remember this line (overwriting remembered line)
H Remember this line (appending to remembered line, if any)
l Print line, escaping \abfrtv (but not newline), octal escaping other
nonprintable characters, wrapping lines to terminal width with a
backslash, and appending $ to actual end of line.
n Print default output and read next line, replacing current line
(If no next line available, quit processing script)
N Append next line of input to this line, separated by a newline
(This advances the line counter for address matching and "=", if no
next line available quit processing script without default output)
p Print this line
P Print this line up to first newline (from "N")
q Quit (print default output, no more commands processed or lines read)
x Exchange this line with remembered line (overwrite in both directions)
= Print the current line number (followed by a newline)
The following commands (may) take an argument. The "text" arguments (to
the "a", "b", and "c" commands) may end with an unescaped "\" to append
the next line (for which leading whitespace is not skipped), and also
treat ";" as a literal character (use "\;" instead).
a [text] Append text to output before attempting to read next line
b [label] Branch, jumps to :label (or with no label, to end of SCRIPT)
c [text] Delete line, output text at end of matching address range
(ignores remaining COMMANDs)
i [text] Print text
r [file] Append contents of file to output before attempting to read
next line.
s/S/R/F Search for regex S, replace matched text with R using flags F.
The first character after the "s" (anything but newline or
backslash) is the delimiter, escape with \ to use normally.
The replacement text may contain "&" to substitute the matched
text (escape it with backslash for a literal &), or \1 through
\9 to substitute a parenthetical subexpression in the regex.
You can also use the normal backslash escapes such as \n and
a backslash at the end of the line appends the next line.
The flags are:
[0-9] A number, substitute only that occurrence of pattern
g Global, substitute all occurrences of pattern
i Ignore case when matching
p Print the line if match was found and replaced
w [file] Write (append) line to file if match replaced
t [label] Test, jump to :label only if an "s" command found a match in
this line since last test (replacing with same text counts)
T [label] Test false, jump only if "s" hasn't found a match.
w [file] Write (append) line to file
y/old/new/ Change each character in 'old' to corresponding character
in 'new' (with standard backslash escapes, delimiter can be
any repeated character except \ or \n)
: [label] Labeled target for jump commands
# Comment, ignore rest of this line of SCRIPT
Deviations from POSIX: allow extended regular expressions with -r,
editing in place with -i, separate with -s, NUL-separated input with -z,
printf escapes in text, line continuations, semicolons after all commands,
2-address anywhere an address is allowed, "T" command, multiline
continuations for [abc], \; to end [abc] argument before end of line.
Spoiler: ALL BIN SYSTEMS CONTINUED PART 12 (S)
Spoiler: SENDEVENT
sendevent
Spoiler: SENDEVENT COMMANDS
usage: sendevent DEVICE TYPE CODE VALUE
Sends a Linux input event.
Spoiler: SENSORSERVICE
sensorservice
halts the shell
Spoiler: SEQ
seq
Spoiler: SEQ COMMANDS
usage: seq [-w|-f fmt_str] [-s sep_str] [first] [increment] last
Count from first to last, by increment. Omitted arguments default
to 1. Two arguments are used as first and last. Arguments can be
negative or floating point.
-f Use fmt_str as a printf-style floating point format string
-s Use sep_str as separator, default is a newline character
-w Pad to equal width with leading zeroes
Spoiler: SERVICE
service
Spoiler: SERVICE COMMANDS
Usage: service [-h|-?]
service list
service check SERVICE
service call SERVICE CODE [i32 N | i64 N | f N | d N | s16 STR | null | fd f | nfd n | afd f ] ...
Options:
i32: Write the 32-bit integer N into the send parcel.
i64: Write the 64-bit integer N into the send parcel.
f: Write the 32-bit single-precision number N into the send parcel.
d: Write the 64-bit double-precision number N into the send parcel.
s16: Write the UTF-16 string STR into the send parcel.
null: Write a null binder into the send parcel.
fd: Write a file descriptor for the file f to the send parcel.
nfd: Write file descriptor n to the send parcel.
afd: Write an ashmem file descriptor for a region containing the data from file f to the send parcel.
Spoiler: SERVICEMANAGER
servicemanager
inaccessible or not found
Spoiler: SET-VERITY-STATE
set-verity-state
Spoiler: SET-VERITY-STATE COMMANDS
usage: set-verity-state [1|0]
Spoiler: SETENFORCE
setenforce
Spoiler: SETENFORCE COMMANDS
usage: setenforce [enforcing|permissive|1|0]
Sets whether SELinux is enforcing (1) or permissive (0).
Spoiler: SETENFORCE KNOWLEDGE
SELinux/Tutorials/Permissive versus enforcing - Gentoo Wiki
wiki.gentoo.org
Spoiler: SETPROP
setprop
Spoiler: SETPROP COMMANDS
usage: setprop NAME VALUE
Sets an Android system property.
Spoiler: SETSID
setsid
Spoiler: SETID COMMANDS
usage: setsid [-cdw] command [args...]
Run process in a new session.
-d Detach from tty
-c Control tty (become foreground process & receive keyboard signals)
-w Wait for child (and exit with its status)
Spoiler: SETTINGS
settings
Spoiler: SETTINGS COMMANDS
help
Print this help text.
get [--user <USER_ID> | current] NAMESPACE KEY
Retrieve the current value of KEY.
put [--user <USER_ID> | current] NAMESPACE KEY VALUE [TAG] [default]
Change the contents of KEY to VALUE.
TAG to associate with the setting.
{default} to set as the default, case-insensitive only for global/secure namespace
delete [--user <USER_ID> | current] NAMESPACE KEY
Delete the entry for KEY.
reset [--user <USER_ID> | current] NAMESPACE {PACKAGE_NAME | RESET_MODE}
Reset the global/secure table for a package with mode.
RESET_MODE is one of {untrusted_defaults, untrusted_clear, trusted_defaults}, case-insensitive
list [--user <USER_ID> | current] NAMESPACE
Print all defined keys.
NAMESPACE is one of {system, secure, global}, case-insensitive
Spoiler: SGDISK
sgdisk
Spoiler: SH
sh
Spoiler: SHA1SUM, SHA224SUM, SHA256SUM, SHA512SUM
sha1sum
sha224sum
sha256sum
sha512sum
Spoiler: SHA?SUM COMMANDS
usage: sha?sum [-bcs] [FILE]...
Calculate sha hash for each input file, reading from stdin if none. Output
one hash (40 hex digits for sha1, 56 for sha224, 64 for sha256, 96 for sha384,
and 128 for sha512) for each input file, followed by filename.
-b Brief (hash only, no filename)
-c Check each line of each FILE is the same hash+filename we'd output
-s No output, exit status 0 if all hashes match, 1 otherwise
Spoiler: SHOWMAP
showmap
Spoiler: SHOWMAP COMMANDS
showmap [-aqtv] [-f FILE] PID
-a addresses (show virtual memory map)
-q quiet (don't show error if map could not be read)
-t terse (show only items with private pages)
-v verbose (don't coalesce maps with the same name)
-f FILE (read from input from FILE instead of PID)
Spoiler: SIMPLEPERF
simpleperf
Spoiler: SIMPLEPERF COMMANDS
Usage: simpleperf [common options] subcommand [args_for_subcommand]
common options:
-h/--help Print this help information.
--log <severity> Set the minimum severity of logging. Possible severities
include verbose, debug, warning, info, error, fatal.
Default is info.
--log-to-android-buffer Write log to android log buffer instead of stderr.
--version Print version of simpleperf.
subcommands:
api-collect Collect recording data generated by app api
api-prepare Prepare recording via app api
debug-unwind Debug/test offline unwinding.
dump dump perf record file
help print help information for simpleperf
inject convert etm instruction tracing data into instr ranges
kmem collect kernel memory allocation information
list list available event types
record record sampling info in perf.data
report report sampling information in perf.data
report-sample report raw sample information in perf.data
stat gather performance counter information
trace-sched Trace system-wide process runtime events.
Spoiler: SIMPLEPERF_APP_RUNNER
simpleperf_app_runner
Spoiler: SIMPLEPERF_APP_RUNNER COMMANDS
simpleperf_app_runner: usage: simpleperf_app_runner package_name simpleperf_cmd simpleperf_cmd_args...
Spoiler: SLEEP
sleep
Spoiler: SLEEP COMMANDS
usage: sleep DURATION
Wait before exiting.
DURATION can be a decimal fraction. An optional suffix can be "m"
(minutes), "h" (hours), "d" (days), or "s" (seconds, the default).
Spoiler: SLOAD_F2FS
sload_f2fs
inaccessible or not found
Spoiler: SM
sm
Spoiler: SM COMMANDS
usage: sm list-disks [adoptable]
sm list-volumes [public|private|emulated|stub|all]
sm has-adoptable
sm get-primary-storage-uuid
sm set-force-adoptable [on|off|default]
sm set-virtual-disk [true|false]
sm partition DISK [public|private|mixed] [ratio]
sm mount VOLUME
sm unmount VOLUME
sm format VOLUME
sm benchmark VOLUME
sm idle-maint [run|abort]
sm fstrim
sm forget [UUID|all]
sm set-emulate-fbe [true|false]
sm set-isolated-storage [on|off|default]
sm start-checkpoint <num-retries>
sm supports-checkpoint
Spoiler: SM KNOWLEDGE
sm(1) [suse man page]
The INN storage manager is the subsystem that stores and keeps track of all of the articles and what storage backend they're in. All stored articles are assigned a storage API token. sm is a command-line interface to that sto
www.unix.com
Spoiler: SNAPSHOTCTL
snapshotctl
inaccessible or not found
Spoiler: ALL BIN SYSTEMS CONTINUED PART 13 (S-T)
Spoiler: SORT
sort
Spoiler: SORT COMMANDS
usage: sort [-Mbcdfginrsuz] [FILE...] [-k#[,#[x]] [-t X]] [-o FILE]
Sort all lines of text from input files (or stdin) to stdout.
-M Month sort (jan, feb, etc)
-V Version numbers (name-1.234-rc6.5b.tgz)
-b Ignore leading blanks (or trailing blanks in second part of key)
-c Check whether input is sorted
-d Dictionary order (use alphanumeric and whitespace chars only)
-f Force uppercase (case insensitive sort)
-g General numeric sort (double precision with nan and inf)
-i Ignore nonprinting characters
-k Sort by "key" (see below)
-n Numeric order (instead of alphabetical)
-o Output to FILE instead of stdout
-r Reverse
-s Skip fallback sort (only sort with keys)
-t Use a key separator other than whitespace
-u Unique lines only
-x Hexadecimal numerical sort
-z Zero (null) terminated lines
Sorting by key looks at a subset of the words on each line. -k2 uses the
second word to the end of the line, -k2,2 looks at only the second word,
-k2,4 looks from the start of the second to the end of the fourth word.
-k2.4,5 starts from the fourth character of the second word, to the end
of the fifth word. Specifying multiple keys uses the later keys as tie
breakers, in order. A type specifier appended to a sort key (such as -2,2n)
applies only to sorting that key.
Spoiler: SPLIT
split
Spoiler: SPLIT COMMANDS
usage: split [-a SUFFIX_LEN] [-b BYTES] [-l LINES] [INPUT [OUTPUT]]
Copy INPUT (or stdin) data to a series of OUTPUT (or "x") files with
alphabetically increasing suffix (aa, ab, ac... az, ba, bb...).
-a Suffix length (default 2)
-b BYTES/file (10, 10k, 10m, 10g...)
-l LINES/file (default 1000)
Spoiler: SS
ss
Spoiler: SS COMMANDS
Usage: ss [ OPTIONS ]
ss [ OPTIONS ] [ FILTER ]
-h, --help this message
-V, --version output version information
-n, --numeric don't resolve service names
-r, --resolve resolve host names
-a, --all display all sockets
-l, --listening display listening sockets
-o, --options show timer information
-e, --extended show detailed socket information
-m, --memory show socket memory usage
-p, --processes show process using socket
-i, --info show internal TCP information
-s, --summary show socket usage summary
-b, --bpf show bpf filter socket information
-E, --events continually display sockets as they are destroyed
-Z, --context display process SELinux security contexts
-z, --contexts display process and socket SELinux security contexts
-N, --net switch to the specified network namespace name
-4, --ipv4 display only IP version 4 sockets
-6, --ipv6 display only IP version 6 sockets
-0, --packet display PACKET sockets
-t, --tcp display only TCP sockets
-S, --sctp display only SCTP sockets
-u, --udp display only UDP sockets
-d, --dccp display only DCCP sockets
-w, --raw display only RAW sockets
-x, --unix display only Unix domain sockets
-f, --family=FAMILY display sockets of type FAMILY
FAMILY := {inet|inet6|link|unix|netlink|help}
-K, --kill forcibly close sockets, display what was closed
-H, --no-header Suppress header line
-A, --query=QUERY, --socket=QUERY
QUERY := {all|inet|tcp|udp|raw|unix|unix_dgram|unix_stream|unix_seqpacket|packet|netlink}[,QUERY]
-D, --diag=FILE Dump raw information about TCP sockets to FILE
-F, --filter=FILE read filter information from FILE
FILTER := [ state STATE-FILTER ] [ EXPRESSION ]
STATE-FILTER := {all|connected|synchronized|bucket|big|TCP-STATES}
TCP-STATES := {established|syn-sent|syn-recv|fin-wait-{1,2}|time-wait|closed|close-wait|last-ack|listening|closing}
connected := {established|syn-sent|syn-recv|fin-wait-{1,2}|time-wait|close-wait|last-ack|closing}
synchronized := {established|syn-recv|fin-wait-{1,2}|time-wait|close-wait|last-ack|closing}
bucket := {syn-recv|time-wait}
big := {established|syn-sent|fin-wait-{1,2}|closed|close-wait|last-ack|listening|closing}
Spoiler: START
start
"Must be root"
Spoiler: STOP
stop
"Must be root"
Spoiler: STORAGED
storaged
inaccessible or not found
Spoiler: STRINGS
strings
Spoiler: STRINGS COMMANDS
usage: strings [-fo] [-t oxd] [-n LEN] [FILE...]
Display printable strings in a binary file
-f Show filename
-n At least LEN characters form a string (default 4)
-o Show offset (ala -t d)
-t Show offset type (o=octal, d=decimal, x=hexadecimal)
Spoiler: STRINGS KNOWLEDGE
strings(1) - Linux man page
strings is mainly useful for determining the contents of non-text files.
linux.die.net
How to Discover Hidden Fastboot Commands
There are many hidden fastboot commands on your device. In order to find them, we will need to dump the bootloader and examine the contents!
www.xda-developers.com
Spoiler: STTY
stty
Spoiler: STTY COMMANDS
usage: stty [-ag] [-F device] SETTING...
Get/set terminal configuration.
-F Open device instead of stdin
-a Show all current settings (default differences from "sane")
-g Show all current settings usable as input to stty
Special characters (syntax ^c or undef): intr quit erase kill eof eol eol2
swtch start stop susp rprnt werase lnext discard
Control/input/output/local settings as shown by -a, '-' prefix to disable
Combo settings: cooked/raw, evenp/oddp/parity, nl, ek, sane
N set input and output speed (ispeed N or ospeed N for just one)
cols N set number of columns
rows N set number of rows
line N set line discipline
min N set minimum chars per read
time N set read timeout
speed show speed only
size show size only
Spoiler: SURFACEFLINGER
surfaceflinger
inaccessible or not found
Spoiler: SVC
svc
Spoiler: SVC COMMANDS
Available commands:
help Show information about the subcommands
power Control the power manager
usb Control Usb state
nfc Control NFC functions
bluetooth Control Bluetooth service
system-server System server process related command
Spoiler: SWAPOFF
swapoff
Spoiler: SWAPOFF COMMANDS
usage: swapoff swapregion
Disable swapping on a given swapregion.
Spoiler: SWAPON
swapon
Spoiler: SWAPON COMMANDS
usage: swapon [-d] [-p priority] filename
Enable swapping on a given device/file.
-d Discard freed SSD pages
-p Priority (highest priority areas allocated first)
Spoiler: SYNC
sync
Spoiler: SYNC COMMANDS
usage: sync
Write pending cached data to disk (synchronize), blocking until done.
Spoiler: SYSCTL
sysctl
Spoiler: SYSCTL COMMANDS
usage: sysctl [-aAeNnqw] [-p [FILE] | KEY[=VALUE]...]
Read/write system control data (under /proc/sys).
-a,A Show all values
-e Don't warn about unknown keys
-N Don't print key values
-n Don't print key names
-p Read values from FILE (default /etc/sysctl.conf)
-q Don't show value after write
-w Only write values (object to reading)
Spoiler: TAC
tac
Spoiler: TAC COMMANDS
usage: tac [FILE...]
Output lines in reverse order.
Spoiler: TAIL
tail
Spoiler: TAIL COMMANDS
usage: tail [-n|c NUMBER] [-f] [FILE...]
Copy last lines from files to stdout. If no files listed, copy from
stdin. Filename "-" is a synonym for stdin.
-n Output the last NUMBER lines (default 10), +X counts from start
-c Output the last NUMBER bytes, +NUMBER counts from start
-f Follow FILE(s), waiting for more data to be appended
Spoiler: TAR
tar
Spoiler: TAR COMMANDS
usage: tar [-cxt] [-fvohmjkOS] [-XTCf NAME] [FILE...]
Create, extract, or list files in a .tar (or compressed t?z) file.
Options:
c Create x Extract t Test (list)
f tar FILE (default -) C Change to DIR first v Verbose display
o Ignore owner h Follow symlinks m Ignore mtime
J xz compression j bzip2 compression z gzip compression
O Extract to stdout X exclude names in FILE T include names in FILE
--exclude FILENAME to exclude --full-time Show seconds with -tv
--mode MODE Adjust modes --mtime TIME Override timestamps
--owner NAME Set file owner to NAME --group NAME Set file group to NAME
--sparse Record sparse files
--restrict All archive contents must extract under one subdirctory
--numeric-owner Save/use/display uid and gid, not user/group name
--no-recursion Don't store directory contents
Spoiler: TASKSET
taskset
Spoiler: TASKSET COMMANDS
usage: taskset [-ap] [mask] [PID | cmd [args...]]
Launch a new task which may only run on certain processors, or change
the processor affinity of an existing PID.
Mask is a hex string where each bit represents a processor the process
is allowed to run on. PID without a mask displays existing affinity.
-p Set/get the affinity of given PID instead of a new command
-a Set/get the affinity of all threads of the PID
Spoiler: TC
tc
Spoiler: TC COMMANDS
Usage: tc [ OPTIONS ] OBJECT { COMMAND | help }
tc [-force] -batch filename
where OBJECT := { qdisc | class | filter | action | monitor | exec }
OPTIONS := { -s[tatistics] | -d[etails] | -r[aw] | -p[retty] | -b[atch] [filename] | -n[etns] name |
-nm | -nam[es] | { -cf | -conf } path }
Spoiler: TC-WRAPPER-1.0
tc-wrapper-1.0
inaccessible or not found
Spoiler: TCPDUMP
tcpdump
inaccessible or not found
Spoiler: TEE
tee
Spoiler: TEE COMMANDS
usage: tee [-ai] [FILE...]
Copy stdin to each listed file, and also to stdout.
Filename "-" is a synonym for stdout.
-a Append to files
-i Ignore SIGINT
Spoiler: TELECOM
telecom
Spoiler: TELECOM COMMANDS
usage: telecom [subcommand] [options]
usage: telecom set-phone-account-enabled <COMPONENT> <ID> <USER_SN>
usage: telecom set-phone-account-disabled <COMPONENT> <ID> <USER_SN>
usage: telecom register-phone-account <COMPONENT> <ID> <USER_SN> <LABEL>
usage: telecom register-sim-phone-account [-e] <COMPONENT> <ID> <USER_SN> <LABEL>: registers a PhoneAccount with CAPABILITY_SIM_SUBSCRIPTION and optionally CAPABILITY_PLACE_EMERGENCY_CALLS if "-e" is provided
usage: telecom set-user-selected-outgoing-phone-account [-e] <COMPONENT> <ID> <USER_SN>
usage: telecom set-test-call-redirection-app <PACKAGE>
usage: telecom set-test-call-screening-app <PACKAGE>
usage: telecom set-phone-acct-suggestion-component <COMPONENT>
usage: telecom add-or-remove-call-companion-app <PACKAGE> <1/0>
usage: telecom register-sim-phone-account <COMPONENT> <ID> <USER_SN> <LABEL> <ADDRESS>
usage: telecom unregister-phone-account <COMPONENT> <ID> <USER_SN>
usage: telecom set-default-dialer <PACKAGE>
usage: telecom get-default-dialer
usage: telecom get-system-dialer
usage: telecom wait-on-handlers
usage: telecom set-sim-count <COUNT>
usage: telecom get-sim-config
usage: telecom get-max-phones
usage: telecom stop-block-suppression: Stop suppressing the blocked number provider after a call to emergency services.
usage: telecom set-emer-phone-account-filter <PACKAGE>
telecom set-phone-account-enabled: Enables the given phone account, if it has already been registered with Telecom.
telecom set-phone-account-disabled: Disables the given phone account, if it has already been registered with telecom.
telecom set-default-dialer: Sets the override default dialer to the given component; this will override whatever the dialer role is set to.
telecom get-default-dialer: Displays the current default dialer.
telecom get-system-dialer: Displays the current system dialer.
telecom set-system-dialer: Set the override system dialer to the given component. To remove the override, send "default"
telecom wait-on-handlers: Wait until all handlers finish their work.
telecom set-sim-count: Set num SIMs (2 for DSDS, 1 for single SIM. This may restart the device.
telecom get-sim-config: Get the mSIM config string. "DSDS" for DSDS mode, or "" for single SIM
telecom get-max-phones: Get the max supported phones from the modem.
telecom set-test-emergency-phone-account-package-filter <PACKAGE>: sets a package name that will be used for test emergency calls. To clear, send an empty package name. Real emergency calls will still be placed over Telephony.
Spoiler: TERSERVICE
terservice
inaccessible or not found
Spoiler: TEST
test
Spoiler: THERMALD
thermald
inaccessible or not found
Spoiler: TIME
time
0m00.75s user 0m00.53s system
Spoiler: ALL BIN SYSTEMS CONTINUED PART 14 (T-V)
Spoiler: TIMEOUT
timeout
Spoiler: TIMEOUT COMMANDS
usage: timeout [-k DURATION] [-s SIGNAL] DURATION COMMAND...
Run command line as a child process, sending child a signal if the
command doesn't exit soon enough.
DURATION can be a decimal fraction. An optional suffix can be "m"
(minutes), "h" (hours), "d" (days), or "s" (seconds, the default).
-s Send specified signal (default TERM)
-k Send KILL signal if child still running this long after first signal
-v Verbose
--foreground Don't create new process group
--preserve-status Exit with the child's exit status
Spoiler: TOMBSTONED
tombstoned
inaccessible or not found
Spoiler: TOOLBOX
toolbox
getprop modprobe setprop start stop toolbox
Spoiler: GETPROP
getprop - Pastebin.com
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
pastebin.com
Spoiler: MODPROBE
No modules given.
Usage:
modprobe [-alrqvsDb] [-d DIR] [MODULE]+
modprobe [-alrqvsDb] [-d DIR] MODULE [symbol=value][...]
Options:
-b: Apply blocklist to module names too
-d: Load modules from DIR, option may be used multiple times
-D: Print dependencies for modules only, do not load -h: Print this help
-l: List modules matching pattern
-r: Remove MODULE (multiple modules may be specified)
-q: Quiet
-v: Verbose
Spoiler: SETPROP
usage: setprop NAME VALUE
Spoiler: TOOLBOX KNOWLEDGE
Android toolbox - eLinux.org
elinux.org
Spoiler: TOP
top
Spoiler: TOP COMMANDS
usage: top [-Hbq] [-k FIELD,] [-o FIELD,] [-s SORT] [-n NUMBER] [-m LINES] [-d SECONDS] [-p PID,] [-u USER,]
Show process activity in real time.
-H Show threads
-k Fallback sort FIELDS (default -S,-%CPU,-ETIME,-PID)
-o Show FIELDS (def PID,USER,PR,NI,VIRT,RES,SHR,S,%CPU,%MEM,TIME+,CMDLINE)
-O Add FIELDS (replacing PR,NI,VIRT,RES,SHR,S from default)
-s Sort by field number (1-X, default 9)
-b Batch mode (no tty)
-d Delay SECONDS between each cycle (default 3)
-m Maximum number of tasks to show
-n Exit after NUMBER iterations
-p Show these PIDs
-u Show these USERs
-q Quiet (no header lines)
Cursor LEFT/RIGHT to change sort, UP/DOWN move list, space to force
update, R to reverse sort, Q to exit.
Spoiler: TOUCH
touch
Spoiler: TOUCH COMMANDS
usage: touch [-amch] [-d DATE] [-t TIME] [-r FILE] FILE...
Update the access and modification times of each FILE to the current time.
-a Change access time
-m Change modification time
-c Don't create file
-h Change symlink
-d Set time to DATE (in YYYY-MM-DDThh:mm:SS[.frac][tz] format)
-t Set time to TIME (in [[CC]YY]MMDDhhmm[.ss][frac] format)
-r Set time same as reference FILE
Spoiler: TOYBOX
toybox
Spoiler: TOYBOX COMMANDS
usage: toybox [--long | --help | --version | [command] [arguments...]]
With no arguments, shows available commands. First argument is
name of a command to run, followed by any arguments to that command.
--long Show path to each command
To install command symlinks with paths, try:
for i in $(/bin/toybox --long); do ln -s /bin/toybox $i; done
or all in one directory:
for i in $(./toybox); do ln -s toybox $i; done; PATH=$PWD:$PATH
Most toybox commands also understand the following arguments:
--help Show command help (only)
--version Show toybox version (only)
The filename "-" means stdin/stdout, and "--" stops argument parsing.
Numerical arguments accept a single letter suffix for
kilo, mega, giga, tera, peta, and exabytes, plus an additional
"d" to indicate decimal 1000's instead of 1024.
Durations can be decimal fractions and accept minute ("m"), hour ("h"),
or day ("d") suffixes (so 0.1m = 6s).
Spoiler: TOYBOX KNOWLEDGE
toybox news
Spoiler: TR
tr
Spoiler: TR COMMANDS
usage: tr [-cds] SET1 [SET2]
Translate, squeeze, or delete characters from stdin, writing to stdout
-c/-C Take complement of SET1
-d Delete input characters coded SET1
-s Squeeze multiple output characters of SET2 into one character
Spoiler: TRACED
traced
inaccessible or not found
Spoiler: TRACED_PERF
traced_perf
inaccessible or not found
Spoiler: TRACED_PROBES
traced_probes
inaccessible or not found
Spoiler: TRIGGER_PERFETTO
trigger_perfetto
Spoiler: TRIGGER_PERFETTO COMMANDS
Usage: trigger_perfetto TRIGGER...
-h|--help Show this message
Spoiler: TRUE
true
Spoiler: TRUNCATE
truncate
Spoiler: TRUNCATE COMMANDS
usage: truncate [-c] -s SIZE file...
Set length of file(s), extending sparsely if necessary.
-c Don't create file if it doesn't exist
-s New size (with optional prefix and suffix)
SIZE prefix: + add, - subtract, < shrink to, > expand to,
/ multiple rounding down, % multiple rounding up
SIZE suffix: k=1024, m=1024^2, g=1024^3, t=1024^4, p=1024^5, e=1024^6
Spoiler: TTY
tty
Spoiler: TTY COMMANDS
usage: tty [-s]
Show filename of terminal connected to stdin.
Prints "not a tty" and exits with nonzero status if no terminal
is connected to stdin.
-s Silent, exit code only
Spoiler: TUNE2FS
tune2fs
inaccessible or not found
Spoiler: TZDATACHECK
tzdatacheck
Spoiler: TZDATACHECK
Usage: tzdatacheck BASE_TZ_DIR DATA_TZ_DIR
Checks whether any timezone update distro in DATA_TZ_DIR is compatible with the
current Android release and better than or the same as base timezone rules in
BASE_TZ_DIR. If the timezone rules in BASE_TZ_DIR are a higher version than the
one in DATA_TZ_DIR the DATA_TZ_DIR is renamed and then deleted.
Spoiler: UEVENTD
ueventd
inaccessible or not found
Spoiler: UIAUTOMATER
uiautomater
inaccessible or not found
Spoiler: ULIMIT
ulimit
usage: ulimit [-acdefHilmnpqrSstv] [value]
Spoiler: UMOUNT
umount
Spoiler: UMOUNT COMMANDS
usage: umount [-a [-t TYPE[,TYPE...]]] [-vrfD] [DIR...]
Unmount the listed filesystems.
-a Unmount all mounts in /proc/mounts instead of command line list
-D Don't free loopback device(s)
-f Force unmount
-l Lazy unmount (detach from filesystem now, close when last user does)
-n Don't use /proc/mounts
-r Remount read only if unmounting fails
-t Restrict "all" to mounts of TYPE (or use "noTYPE" to skip)
-v Verbose
Spoiler: UNAME
uname
Spoiler: UNAME COMMANDS
usage: uname [-asnrvm]
Print system information.
-s System name
-n Network (domain) name
-r Kernel Release number
-v Kernel Version
-m Machine (hardware) name
-a All of the above
Spoiler: UNCRYPT
uncrypt
Spoiler: UNIQ
uniq
Spoiler: UNIX2DOS
unix2dos
Spoiler: UNLINK
unlink
inaccessible or not found
Spoiler: UNSHARE
unshare
Spoiler: UNSHARE COMMANDS
usage: unshare [-imnpuUr] COMMAND...
Create new container namespace(s) for this process and its children, so
some attribute is not shared with the parent process.
-f Fork command in the background (--fork)
-i SysV IPC (message queues, semaphores, shared memory) (--ipc)
-m Mount/unmount tree (--mount)
-n Network address, sockets, routing, iptables (--net)
-p Process IDs and init (--pid)
-r Become root (map current euid/egid to 0/0, implies -U) (--map-root-user)
-u Host and domain names (--uts)
-U UIDs, GIDs, capabilities (--user)
A namespace allows a set of processes to have a different view of the
system than other sets of processes.
Spoiler: UNZIP
unzip
Spoiler: UNZIP COMMANDS
usage: unzip [-d DIR] [-lnopqv] ZIP [FILE...] [-x FILE...]
Extract FILEs from ZIP archive. Default is all files. Both the include and
exclude (-x) lists use shell glob patterns.
-d DIR Extract into DIR
-l List contents (-lq excludes archive name, -lv is verbose)
-n Never overwrite files (default: prompt)
-o Always overwrite files
-p Pipe to stdout
-q Quiet
-v List contents verbosely
-x FILE Exclude files
Spoiler: UPDATE_ENGINE
update_engine
inaccessible or not found
Spoiler: UPDATE_VERIFIER
update_verifier
inaccessible or not found
Spoiler: UPTIME
uptime
Spoiler: UPTIME COMMANDS
usage: uptime [-ps]
Tell the current time, how long the system has been running, the number
of users, and the system load averages for the past 1, 5 and 15 minutes.
-p Pretty (human readable) uptime
-s Since when has the system been up?
Spoiler: USBD
usbd
inaccessible or not found
Spoiler: USLEEP
usleep
Spoiler: USLEEP COMMANDS
usage: usleep MICROSECONDS
Pause for MICROSECONDS microseconds.
Spoiler: UUDECODE
uudecode
Spoiler: UUDECODE COMMANDS
usage: uudecode [-o OUTFILE] [INFILE]
Decode file from stdin (or INFILE).
-o Write to OUTFILE instead of filename in header
Spoiler: UUIDGEN
uuidgen
Spoiler: UUIDGEN COMMANDS
usage: uuidgen
Create and print a new RFC4122 random UUID.
Spoiler: VDC
vdc
inaccessible or not found
Spoiler: VIEWCOMPILER
viewcompiler
inaccessible or not found
Spoiler: VMSTAT
vmstat
Spoiler: VMSTAT COMMANDS
usage: vmstat [-n] [DELAY [COUNT]]
Print virtual memory statistics, repeating each DELAY seconds, COUNT times.
(With no DELAY, prints one line. With no COUNT, repeats until killed.)
Show processes running and blocked, kilobytes swapped, free, buffered, and
cached, kilobytes swapped in and out per second, file disk blocks input and
output per second, interrupts and context switches per second, percent
of CPU time spent running user code, system code, idle, and awaiting I/O.
First line is since system started, later lines are since last line.
-n Display the header only once
Spoiler: VOLD
vold
inaccessible or not found
Spoiler: VOLD_PREPARE_SUBDIRS
vold_prepare_subdirs
inaccessible or not found
Spoiler: ALL BIN SYSTEMS CONTINUED PART 15 (V-Z)
Spoiler: VR
vr
Spoiler: VR COMMANDS
usage: vr [subcommand]
usage: vr set-persistent-vr-mode-enabled [true|false]
usage: vr set-display-props [width] [height] [dpi]
usage: vr enable-virtual-display [true|false]
Error: Could not access the Vr Manager. Is the system running?
Spoiler: VTSERVICE
vtservice
inaccessible or not found
Spoiler: WAIT_FOR_KEYMASTER
wait_for_keymaster
inaccessible or not found
Spoiler: WATCH
watch
Spoiler: WATCH COMMANDS
usage: watch [-teb] [-n SEC] PROG ARGS
Run PROG every -n seconds, showing output. Hit q to quit.
-n Loop period in seconds (default 2)
-t Don't print header
-e Exit on error
-b Beep on command error
-x Exec command directly (vs "sh -c")
Spoiler: WATCHDOGD
watchdogd
inaccessible or not found
Spoiler: WC
wc
Spoiler: WC COMMANDS
usage: wc -lwcm [FILE...]
Count lines, words, and characters in input.
-l Show lines
-w Show words
-c Show bytes
-m Show characters
By default outputs lines, words, bytes, and filename for each
argument (or from stdin if none). Displays only either bytes
or characters.
Spoiler: WHICH
which
Spoiler: WHICH COMMANDS
usage: which [-a] filename ...
Search $PATH for executable files matching filename(s).
-a Show all matches
Spoiler: WHOAMI
whoami
Spoiler: WHOAMI COMMANDS
usage: logname
Print the current user name.
Spoiler: WIFICOND
wificond
inaccessible or not found
Spoiler: WM
wm
Spoiler: WM COMMANDS
Window manager (window) commands:
help
Print this help text.
size [reset|WxH|WdpxHdp] [-d DISPLAY_ID]
Return or override display size.
width and height in pixels unless suffixed with 'dp'.
density [reset|DENSITY] [-d DISPLAY_ID]
Return or override display density.
folded-area [reset|LEFT,TOP,RIGHT,BOTTOM]
Return or override folded area.
scaling [off|auto] [-d DISPLAY_ID]
Set display scaling mode.
dismiss-keyguard
Dismiss the keyguard, prompting user for auth if necessary.
set-user-rotation [free|lock] [-d DISPLAY_ID] [rotation]
Set user rotation mode and user rotation.
dump-visible-window-views
Dumps the encoded view hierarchies of visible windows
set-fix-to-user-rotation [-d DISPLAY_ID] [enabled|disabled]
Spoiler: XARGS
xargs
Spoiler: XARGS COMMANDS
usage: xargs [-0prt] [-s NUM] [-n NUM] [-E STR] COMMAND...
Run command line one or more times, appending arguments from stdin.
If COMMAND exits with 255, don't launch another even if arguments remain.
-0 Each argument is NULL terminated, no whitespace or quote processing
-E Stop at line matching string
-n Max number of arguments per command
-o Open tty for COMMAND's stdin (default /dev/null)
-p Prompt for y/n from tty before running each command
-r Don't run command with empty input (otherwise always run command once)
-s Size in bytes per command line
-t Trace, print command line to stderr
Spoiler: XXD
xxd
Spoiler: XXD COMMANDS
usage: xxd [-c n] [-g n] [-i] [-l n] [-o n] [-p] [-r] [-s n] [file]
Hexdump a file to stdout. If no file is listed, copy from stdin.
Filename "-" is a synonym for stdin.
-c n Show n bytes per line (default 16)
-g n Group bytes by adding a ' ' every n bytes (default 2)
-i Include file output format (comma-separated hex byte literals)
-l n Limit of n bytes before stopping (default is no limit)
-o n Add n to display offset
-p Plain hexdump (30 bytes/line, no grouping)
-r Reverse operation: turn a hexdump into a binary file
-s n Skip to offset n
Spoiler: YES
yes
Spoiler: YES COMMANDS
usage: yes [args...]
Repeatedly output line until killed. If no args, output 'y'.
Spoiler: ZCAT
zcat
Spoiler: ZCAT COMMANDS
usage: zcat [FILE...]
Decompress files to stdout. Like `gzip -dc`.
-f Force: allow read from tty
Spoiler: ZIPINFO
zipinfo
Spoiler: ZIPINFO COMMANDS
usage: zipinfo [-1] ZIP [FILE...] [-x FILE...]
Show information about FILEs from ZIP archive. Default is all files.
Both the include and exclude (-x) lists use shell glob patterns.
-1 Show filenames only, one per line
-x FILE Exclude files
Spoiler: ZIPTOOL
ziptool
run as ziptool with unzip or zipinfo as the first argument, or symlink
The Bin Folder Has Been Purged, and the basic --help commands put up for each system that allowed us to do so. We Will Investigate All the "Inaccessible" options, in the future.
I am unable to access the options in the dev folder for the time being, for reasons presently, i can only speculate on, so the next comments will Pick up mapping out the "ETC" Folder and contents~! This will involve the use of the "cat" System we learned from the BIN folder~! and "unzip" xD
-----this comment is mostly a place holder to be able to have at least one more space for the Bin Chapters
jenneh said:
-----this comment is mostly a place holder to be able to have at least one more space for the Binary Chapters
Click to expand...
Click to collapse
You wouldn't require any placeholders. If you require a post to be inserted at any location in your thread for your own personal use, just advise the moderators team (e.g. via the report function), and we're happy to support you and to provide you with an additional reserved post.
Regards
Oswald Boelcke
Senior Moderator
Spoiler: ALL ETC CONTENT PART 1 (A2DP - AIWORKS)
Spoiler: NOTICE.XML.GZ
NOTICE.xml.gz
Spoiler: A2DP_AUDIO_POLICY_CONFIGURATION.XML
a2dp_audio_policy_configuration.xml
Spoiler: TEXT
<?xml version="1.0" encoding="UTF-8"?>
<!-- A2dp Audio HAL Audio Policy Configuration file -->
<module name="a2dp" halVersion="2.0">
<mixPorts>
<mixPort name="a2dp output" role="source"/>
<mixPort name="a2dp input" role="sink">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="44100,48000"
channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO"/>
</mixPort>
</mixPorts>
<devicePorts>
<devicePort tagName="BT A2DP Out" type="AUDIO_DEVICE_OUT_BLUETOOTH_A2DP" role="sink">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="44100"
channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
</devicePort>
<devicePort tagName="BT A2DP Headphones" type="AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES" role="sink">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="44100"
channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
</devicePort>
<devicePort tagName="BT A2DP Speaker" type="AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER" role="sink">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="44100"
channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
</devicePort>
<devicePort tagName="BT A2DP In" type="AUDIO_DEVICE_IN_BLUETOOTH_A2DP" role="source">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="44100,48000"
channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO"/>
</devicePort>
</devicePorts>
<routes>
<route type="mix" sink="BT A2DP Out"
sources="a2dp output"/>
<route type="mix" sink="BT A2DP Headphones"
sources="a2dp output"/>
<route type="mix" sink="BT A2DP Speaker"
sources="a2dp output"/>
<route type="mix" sink="a2dp input"
sources="BT A2DP In"/>
</routes>
</module>
Spoiler: A2DP_IN_AUDIO_POLICY_CONFIGURATION.XML
a2dp_in_audio_policy_configuration.xml
Spoiler: TEXT
<?xml version="1.0" encoding="UTF-8"?>
<!-- Bluetooth Input Audio HAL Audio Policy Configuration file -->
<module name="a2dp" halVersion="2.0">
<mixPorts>
<mixPort name="a2dp input" role="sink">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="44100,48000"
channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO"/>
</mixPort>
</mixPorts>
<devicePorts>
<devicePort tagName="BT A2DP In" type="AUDIO_DEVICE_IN_BLUETOOTH_A2DP" role="source">
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
samplingRates="44100,48000"
channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO"/>
</devicePort>
</devicePorts>
<routes>
<route type="mix" sink="a2dp input"
sources="BT A2DP In"/>
</routes>
</module>
Spoiler: AIWORKS_NIGHT_CONFIG_RONIN.XML
aiworks_night_config_ronin.xml
Spoiler: SHOW MORE SHELL PHOTOS
Spoiler: TEXT
WE WILL DECRYPT THE TOP TEXT IN DUE TIME, AND LEARN HOW TO MAKE THE SHELL SHOW THE CHARACTERS BELOW~!
<Config>
<ExpConfig id="0">
<!-- 项目识别码 -->
<productName>"HMD_RONIN_MAIN"</productName>
<!-- 曝光参数限定:
曝光时间,ISO,数字增益:adb shell dumpsys media.camera获取,可能和实际的不一致所以还是以具体为准。示例:
android.sensor.info.exposureTimeRange (f0003): int64[2]
[16534 400000000 ]
android.sensor.info.sensitivityRange (f0001): int32[2]
[100 1600 ]
android.control.postRawSensitivityBoostRange (10027): int32[2]
[100 3199 ]
-->
<maxExp>140000000</maxExp>
<minExp>100000</minExp>
<maxSensitity>4800</maxSensitity>
<minSensitity>100</minSensitity>
<maxDgain>120</maxDgain>
<minDgain>100</minDgain>
<!-- smooth曝光策略
"Ytarget":一幅画面的目标亮度,LOWLIGHT算法用,计算preview平均亮度,小于Ytarget把亮度提到Ytarget,大于Ytarget认为足够亮不需要提亮操作
"lowLightMeanYthr":LOWLIGHT_HDR算法提亮用,低亮部分平均亮度的threshold,统计得出低亮的平均亮度
"lowLighYtarget":LOWLIGHT_HDR算法提亮用,表示要把低亮的平均亮度提到此目标亮度,小于lowLighYtarget把亮度提到lowLighYtarget,大于lowLighYtarget认为足够亮不需要提亮操作
"highLightMeanYthr":LOWLIGHT_HDR算法欠曝用,高亮部分平均亮度的threshold,统计得出高亮部分的平均亮度
"highLighYtarget":LOWLIGHT_HDR算法欠曝用,表示要把高亮降到此目标亮度
-->
<Ytarget>95</Ytarget>
<lowLightMeanYthr>80</lowLightMeanYthr>
<lowLighYtarget>80</lowLighYtarget>
<highLightMeanYthr>220</highLightMeanYthr>
<highLighYtarget>60</highLighYtarget>
<!--
histHighLightLevel/histLowLightLevel定义预览直方图高亮/低亮,并计算出高亮和低亮的占比,根据这两个占比走不同的算法
if (histHightlightPercent < histHightLightPercentAlgo && lowlightPercent > histLowLightPercentAlgo) {
histAlgo = CaptureType.LOWLIGHT;
} else if (histHightlight255Percent < histHightLight255PercentAlgo) {
histAlgo = CaptureType.LOWLIGHT;
} else if (mMeanHistY > Ytarget && histHightlight255Percent < highLight255RealPercentAlgo) {
histAlgo = CaptureType.LOWLIGHT;
} else {
histAlgo = CaptureType.LOWLIGHT_HDR;
}
-->
<histHighLightLevel>220</histHighLightLevel>
<histLowLightLevel>70</histLowLightLevel>
<histHightLightPercentAlgo>0.001</histHightLightPercentAlgo>
<histLowLightPercentAlgo>0.90</histLowLightPercentAlgo>
<histHightLight255PercentAlgo>0.0005</histHightLight255PercentAlgo>
<highLight255Thr>251</highLight255Thr>
<highLight255RealPercentAlgo>0.02</highLight255RealPercentAlgo>
<!-- 曝光策略
"HfpsBrightenTimes":高帧率场景基准提亮倍数
"LfpsBrightenTimes":低帧率场景基准提亮倍数
"minBrightenTimes":所有场景的最低提亮倍数
"brighten_rate":提亮倍数变化的曲率,值越大,较亮场景提亮的倍数越小
"darkenTimes": 欠曝的变暗基准倍数
"darken_rate": 欠曝倍数的变化曲率,值越大,高光平均亮度低的场景欠曝倍数越小
"ExpISO_ratio": 基础曝光时间和ISO的比例
"darkenExpISO_ratio": 欠曝时,倍数用来减少曝光和ISO的比例,如0.8,则曝光时间欠曝0.8倍数,ISO欠曝0.2倍数
"darkenMinISO":欠曝取图的最小ISO,区分于minSensitity,增加欠曝的可调空间
"Lfps_HightlightThr": 高光占比阈值,用于避免高光多的场景提亮过大
"Lfps_ExptimeThr": 判定高帧率和低帧率场景的曝光时间阈值
"balanceISPExp": 是否需要平衡ISP gain和曝光时间的极限值补充
"balanceISOExp": 是否需要平衡ISO和曝光时间的极限值补充
"dGainReduce": dGain按固定比例缩减,但不小于minDgain
"lowlightAdaptiveExpThredhold": Lowlight但高光占比超过该数值,采用曝光自适应
"lowlightAdaptiveExpTimes": Lowlight自适应曝光最高提亮倍数
"faceDarkTimes": 逆光场景人脸压暗参数
-->
<HfpsBrightenTimes>1.9</HfpsBrightenTimes>
<LfpsBrightenTimes>1.95</LfpsBrightenTimes>
<minBrightenTimes>1.85</minBrightenTimes>
<brighten_rate>0.6</brighten_rate>
<darkenTimes>3</darkenTimes>
<darken_rate>0.6</darken_rate>
<ExpISO_ratio>1.6</ExpISO_ratio>
<darkenExpISO_ratio>0.2</darkenExpISO_ratio>
<darkenMinISO>100</darkenMinISO>
<Lfps_HightlightThr>0.045</Lfps_HightlightThr>
<Lfps_ExptimeThr>35000000</Lfps_ExptimeThr>
<balanceISPExp>true</balanceISPExp>
<balanceISOExp>true</balanceISOExp>
<dGainReduce>1</dGainReduce>
<lowlightAdaptiveExpThredhold>-1</lowlightAdaptiveExpThredhold>
<lowlightAdaptiveExpTimes>2</lowlightAdaptiveExpTimes>
<faceDarkTimes>0.1</faceDarkTimes>
<!-- ISP 图像增强部分 -->
<noiseReductionMode>-1</noiseReductionMode>
<edgeMode>-1</edgeMode>
<sharpness>-1</sharpness>
<saturation>-1</saturation>
<contrast>-1</contrast>
<mfnr>1</mfnr>
<mfnr_minExp>0</mfnr_minExp>
</ExpConfig>
<ExpConfig id="3">
<!-- 项目识别码 -->
<productName>"HMD_RONIN_WIDE"</productName>
<!-- 曝光参数限定:
曝光时间,ISO,数字增益:adb shell dumpsys media.camera获取,可能和实际的不一致所以还是以具体为准。示例:
android.sensor.info.exposureTimeRange (f0003): int64[2]
[16534 400000000 ]
android.sensor.info.sensitivityRange (f0001): int32[2]
[100 1600 ]
android.control.postRawSensitivityBoostRange (10027): int32[2]
[100 3199 ]
-->
<maxExp>200000000</maxExp>
<minExp>100000</minExp>
<maxSensitity>2800</maxSensitity>
<minSensitity>100</minSensitity>
<maxDgain>120</maxDgain>
<minDgain>100</minDgain>
<!-- smooth曝光策略
"Ytarget":一幅画面的目标亮度,LOWLIGHT算法用,计算preview平均亮度,小于Ytarget把亮度提到Ytarget,大于Ytarget认为足够亮不需要提亮操作
"lowLightMeanYthr":LOWLIGHT_HDR算法提亮用,低亮部分平均亮度的threshold,统计得出低亮的平均亮度
"lowLighYtarget":LOWLIGHT_HDR算法提亮用,表示要把低亮的平均亮度提到此目标亮度,小于lowLighYtarget把亮度提到lowLighYtarget,大于lowLighYtarget认为足够亮不需要提亮操作
"highLightMeanYthr":LOWLIGHT_HDR算法欠曝用,高亮部分平均亮度的threshold,统计得出高亮部分的平均亮度
"highLighYtarget":LOWLIGHT_HDR算法欠曝用,表示要把高亮降到此目标亮度
-->
<Ytarget>90</Ytarget>
<lowLightMeanYthr>80</lowLightMeanYthr>
<lowLighYtarget>80</lowLighYtarget>
<highLightMeanYthr>220</highLightMeanYthr>
<highLighYtarget>60</highLighYtarget>
<!--
histHighLightLevel/histLowLightLevel定义预览直方图高亮/低亮,并计算出高亮和低亮的占比,根据这两个占比走不同的算法
if (histHightlightPercent < histHightLightPercentAlgo && lowlightPercent > histLowLightPercentAlgo) {
histAlgo = CaptureType.LOWLIGHT;
} else if (histHightlight255Percent < histHightLight255PercentAlgo) {
histAlgo = CaptureType.LOWLIGHT;
} else if (mMeanHistY > Ytarget && histHightlight255Percent < highLight255RealPercentAlgo) {
histAlgo = CaptureType.LOWLIGHT;
} else {
histAlgo = CaptureType.LOWLIGHT_HDR;
}
-->
<histHighLightLevel>220</histHighLightLevel>
<histLowLightLevel>70</histLowLightLevel>
<histHightLightPercentAlgo>0.001</histHightLightPercentAlgo>
<histLowLightPercentAlgo>0.90</histLowLightPercentAlgo>
<histHightLight255PercentAlgo>0.0005</histHightLight255PercentAlgo>
<highLight255Thr>251</highLight255Thr>
<highLight255RealPercentAlgo>0.02</highLight255RealPercentAlgo>
<!-- 曝光策略
"HfpsBrightenTimes":高帧率场景基准提亮倍数
"LfpsBrightenTimes":低帧率场景基准提亮倍数
"minBrightenTimes":所有场景的最低提亮倍数
"brighten_rate":提亮倍数变化的曲率,值越大,较亮场景提亮的倍数越小
"darkenTimes": 欠曝的变暗基准倍数
"darken_rate": 欠曝倍数的变化曲率,值越大,高光平均亮度低的场景欠曝倍数越小
"ExpISO_ratio": 基础曝光时间和ISO的比例
"darkenExpISO_ratio": 欠曝时,倍数用来减少曝光和ISO的比例,如0.8,则曝光时间欠曝0.8倍数,ISO欠曝0.2倍数
"darkenMinISO":欠曝取图的最小ISO,区分于minSensitity,增加欠曝的可调空间
"Lfps_HightlightThr": 高光占比阈值,用于避免高光多的场景提亮过大
"Lfps_ExptimeThr": 判定高帧率和低帧率场景的曝光时间阈值
"balanceISPExp": 是否需要平衡ISP gain和曝光时间的极限值补充
"balanceISOExp": 是否需要平衡ISO和曝光时间的极限值补充
"dGainReduce": dGain按固定比例缩减,但不小于minDgain
"lowlightAdaptiveExpThredhold": Lowlight但高光占比超过该数值,采用曝光自适应
"lowlightAdaptiveExpTimes": Lowlight自适应曝光最高提亮倍数
"faceDarkTimes": 逆光场景人脸压暗参数
-->
<HfpsBrightenTimes>1.8</HfpsBrightenTimes>
<LfpsBrightenTimes>1.9</LfpsBrightenTimes>
<minBrightenTimes>1.7</minBrightenTimes>
<brighten_rate>0.7</brighten_rate>
<darkenTimes>2.5</darkenTimes>
<darken_rate>1.1</darken_rate>
<ExpISO_ratio>1.6</ExpISO_ratio>
<darkenExpISO_ratio>0.2</darkenExpISO_ratio>
<darkenMinISO>100</darkenMinISO>
<Lfps_HightlightThr>0.035</Lfps_HightlightThr>
<Lfps_ExptimeThr>35000000</Lfps_ExptimeThr>
<balanceISPExp>true</balanceISPExp>
<balanceISOExp>true</balanceISOExp>
<dGainReduce>1</dGainReduce>
<lowlightAdaptiveExpThredhold>-1</lowlightAdaptiveExpThredhold>
<lowlightAdaptiveExpTimes>2</lowlightAdaptiveExpTimes>
<faceDarkTimes>0.1</faceDarkTimes>
<!-- ISP 图像增强部分 -->
<noiseReductionMode>-1</noiseReductionMode>
<edgeMode>-1</edgeMode>
<sharpness>-1</sharpness>
<saturation>-1</saturation>
<contrast>-1</contrast>
<mfnr>1</mfnr>
<mfnr_minExp>0</mfnr_minExp>
</ExpConfig>
<!-- 夜景算法配置参数 -->
<!-- iso分段: 从小往大搜索,当前iso<=iso velue时,使用该分段的参数 -->
<!-- night_exposure_time: 1为标准提亮帧、-1为标准欠爆帧,默认首个提亮帧为baseIndex -->
<!-- night_exposure_iso: 1为标准提亮帧、-1为标准欠爆帧 -->
<!-- night_lnrLevel: chrom降噪强度,取值范围 1-10 -->
<!-- night_nrLevel: luma降噪强度,取值范围 1-10 -->
<!-- night_tmoLevel: 亮度等级,取值范围 1-10 -->
<!-- night_ceLevel: 对比度强度,取值范围 0.0f-1.0f -->
<!-- night_spLevel: 锐化强度,取值范围 0.0f-1.0f -->
<NightParam id="0">
<night_iso value="200">
<night_exposure_time>1;-0.35;-1</night_exposure_time>
<night_exposure_iso>1;-0.1;-1</night_exposure_iso>
<night_ceLevel>0</night_ceLevel>
<night_lnrLevel>0</night_lnrLevel>
<night_nrLevel>0</night_nrLevel>
<night_spLevel>0</night_spLevel>
<night_tmoLevel>4</night_tmoLevel>
</night_iso>
<night_iso value="400">
<night_exposure_time>1;-0.23;-1.1</night_exposure_time>
<night_exposure_iso>1;-0.1;-1</night_exposure_iso>
<night_ceLevel>0</night_ceLevel>
<night_lnrLevel>0</night_lnrLevel>
<night_nrLevel>0</night_nrLevel>
<night_spLevel>0</night_spLevel>
<night_tmoLevel>2</night_tmoLevel>
</night_iso>
<night_iso value="1000">
<night_exposure_time>1;-0.23;-1.2</night_exposure_time>
<night_exposure_iso>1;-0.1;-1</night_exposure_iso>
<night_ceLevel>0</night_ceLevel>
<night_lnrLevel>0</night_lnrLevel>
<night_nrLevel>0</night_nrLevel>
<night_spLevel>0</night_spLevel>
<night_tmoLevel>0</night_tmoLevel>
</night_iso>
<night_iso value="1800">
<night_exposure_time>1;-0.3;-1.2</night_exposure_time>
<night_exposure_iso>1;-0.1;-1</night_exposure_iso>
<night_ceLevel>0</night_ceLevel>
<night_lnrLevel>0</night_lnrLevel>
<night_nrLevel>0</night_nrLevel>
<night_spLevel>0.1</night_spLevel>
<night_tmoLevel>0</night_tmoLevel>
</night_iso>
<night_iso value="3300">
<night_exposure_time>1;-0.35;-1.4</night_exposure_time>
<night_exposure_iso>1;-0.1;-0.9</night_exposure_iso>
<night_ceLevel>0</night_ceLevel>
<night_lnrLevel>0</night_lnrLevel>
<night_nrLevel>0</night_nrLevel>
<night_spLevel>0.2</night_spLevel>
<night_tmoLevel>0</night_tmoLevel>
</night_iso>
<night_iso value="4400">
<night_exposure_time>1;-0.5;-2.0</night_exposure_time>
<night_exposure_iso>1;-0.1;-0.8</night_exposure_iso>
<night_ceLevel>0</night_ceLevel>
<night_lnrLevel>0</night_lnrLevel>
<night_nrLevel>0</night_nrLevel>
<night_spLevel>0.2</night_spLevel>
<night_tmoLevel>0</night_tmoLevel>
</night_iso>
<night_iso value="6000">
<night_exposure_time>1;-0.7;-2.1</night_exposure_time>
<night_exposure_iso>1;-0.1;-0.75</night_exposure_iso>
<night_ceLevel>0</night_ceLevel>
<night_lnrLevel>0</night_lnrLevel>
<night_nrLevel>0</night_nrLevel>
<night_spLevel>0.2</night_spLevel>
<night_tmoLevel>0</night_tmoLevel>
</night_iso>
<night_iso value="7200">
<night_exposure_time>1;-0.9;-2.1</night_exposure_time>
<night_exposure_iso>1;-0.1;-0.7</night_exposure_iso>
<night_ceLevel>0</night_ceLevel>
<night_lnrLevel>0</night_lnrLevel>
<night_nrLevel>0</night_nrLevel>
<night_spLevel>0.2</night_spLevel>
<night_tmoLevel>0</night_tmoLevel>
</night_iso>
</NightParam>
<NightParam id="3">
<night_iso value="200">
<night_exposure_time>1;-0.35;-1</night_exposure_time>
<night_exposure_iso>1;-0.1;-1</night_exposure_iso>
<night_ceLevel>0</night_ceLevel>
<night_lnrLevel>0</night_lnrLevel>
<night_nrLevel>0</night_nrLevel>
<night_spLevel>0</night_spLevel>
<night_tmoLevel>4</night_tmoLevel>
</night_iso>
<night_iso value="400">
<night_exposure_time>1;-0.25;-1.1</night_exposure_time>
<night_exposure_iso>1;-0.1;-1</night_exposure_iso>
<night_ceLevel>0</night_ceLevel>
<night_lnrLevel>0</night_lnrLevel>
<night_nrLevel>0</night_nrLevel>
<night_spLevel>0</night_spLevel>
<night_tmoLevel>3</night_tmoLevel>
</night_iso>
<night_iso value="1000">
<night_exposure_time>1;-0.25;-1.1</night_exposure_time>
<night_exposure_iso>1;-0.1;-1</night_exposure_iso>
<night_ceLevel>0</night_ceLevel>
<night_lnrLevel>0</night_lnrLevel>
<night_nrLevel>0</night_nrLevel>
<night_spLevel>0</night_spLevel>
<night_tmoLevel>2</night_tmoLevel>
</night_iso>
<night_iso value="1800">
<night_exposure_time>1;-0.35;-1.2</night_exposure_time>
<night_exposure_iso>1;-0.1;-1</night_exposure_iso>
<night_ceLevel>0</night_ceLevel>
<night_lnrLevel>0</night_lnrLevel>
<night_nrLevel>0</night_nrLevel>
<night_spLevel>0</night_spLevel>
<night_tmoLevel>0</night_tmoLevel>
</night_iso>
<night_iso value="2400">
<night_exposure_time>1;-0.45;-1.4</night_exposure_time>
<night_exposure_iso>1;-0.1;-0.9</night_exposure_iso>
<night_ceLevel>0</night_ceLevel>
<night_lnrLevel>0</night_lnrLevel>
<night_nrLevel>0</night_nrLevel>
<night_spLevel>0</night_spLevel>
<night_tmoLevel>2</night_tmoLevel>
</night_iso>
<night_iso value="4400">
<night_exposure_time>1;-0.55;-2.0</night_exposure_time>
<night_exposure_iso>1;-0.1;-0.8</night_exposure_iso>
<night_ceLevel>0</night_ceLevel>
<night_lnrLevel>0</night_lnrLevel>
<night_nrLevel>0</night_nrLevel>
<night_spLevel>0</night_spLevel>
<night_tmoLevel>3</night_tmoLevel>
</night_iso>
<night_iso value="6000">
<night_exposure_time>1;-0.7;-2.1</night_exposure_time>
<night_exposure_iso>1;-0.1;-0.75</night_exposure_iso>
<night_ceLevel>0</night_ceLevel>
<night_lnrLevel>0</night_lnrLevel>
<night_nrLevel>0</night_nrLevel>
<night_spLevel>0</night_spLevel>
<night_tmoLevel>0</night_tmoLevel>
</night_iso>
<night_iso value="7200">
<night_exposure_time>1;-0.9;-2.1</night_exposure_time>
<night_exposure_iso>1;-0.1;-0.7</night_exposure_iso>
<night_ceLevel>0</night_ceLevel>
<night_lnrLevel>0</night_lnrLevel>
<night_nrLevel>0</night_nrLevel>
<night_spLevel>0</night_spLevel>
<night_tmoLevel>3</night_tmoLevel>
</night_iso>
</NightParam>
Spoiler: PASTEBIN OF GOOGLE TRANSLATION
aiworks_night_config_ronin.xml - Pastebin.com
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
pastebin.com
Spoiler: AIWORKS_NIGHT_CONFIG_RONIN2.XML
aiworks_night_config_ronin2.xml
Spoiler: SHOW MORE SHELL PHOTOS
Spoiler: TEXT
<Config>
<ExpConfig id="0">
<!-- 项目识别码 -->
<productName>"HMD_RONIN_MAIN"</productName>
<!-- 曝光参数限定:
曝光时间,ISO,数字增益:adb shell dumpsys media.camera获取,可能和实际的不一致所以还是以具体为准。示例:
android.sensor.info.exposureTimeRange (f0003): int64[2]
[16534 400000000 ]
android.sensor.info.sensitivityRange (f0001): int32[2]
[100 1600 ]
android.control.postRawSensitivityBoostRange (10027): int32[2]
[100 3199 ]
-->
<maxExp>140000000</maxExp>
<minExp>100000</minExp>
<maxSensitity>5600</maxSensitity>
<minSensitity>100</minSensitity>
<maxDgain>120</maxDgain>
<minDgain>100</minDgain>
<!-- smooth曝光策略
"Ytarget":一幅画面的目标亮度,LOWLIGHT算法用,计算preview平均亮度,小于Ytarget把亮度提到Ytarget,大于Ytarget认为足够亮不需要提亮操作
"lowLightMeanYthr":LOWLIGHT_HDR算法提亮用,低亮部分平均亮度的threshold,统计得出低亮的平均亮度
"lowLighYtarget":LOWLIGHT_HDR算法提亮用,表示要把低亮的平均亮度提到此目标亮度,小于lowLighYtarget把亮度提到lowLighYtarget,大于lowLighYtarget认为足够亮不需要提亮操作
"highLightMeanYthr":LOWLIGHT_HDR算法欠曝用,高亮部分平均亮度的threshold,统计得出高亮部分的平均亮度
"highLighYtarget":LOWLIGHT_HDR算法欠曝用,表示要把高亮降到此目标亮度
-->
<Ytarget>95</Ytarget>
<lowLightMeanYthr>80</lowLightMeanYthr>
<lowLighYtarget>80</lowLighYtarget>
<highLightMeanYthr>220</highLightMeanYthr>
<highLighYtarget>60</highLighYtarget>
<!--
histHighLightLevel/histLowLightLevel定义预览直方图高亮/低亮,并计算出高亮和低亮的占比,根据这两个占比走不同的算法
if (histHightlightPercent < histHightLightPercentAlgo && lowlightPercent > histLowLightPercentAlgo) {
histAlgo = CaptureType.LOWLIGHT;
} else if (histHightlight255Percent < histHightLight255PercentAlgo) {
histAlgo = CaptureType.LOWLIGHT;
} else if (mMeanHistY > Ytarget && histHightlight255Percent < highLight255RealPercentAlgo) {
histAlgo = CaptureType.LOWLIGHT;
} else {
histAlgo = CaptureType.LOWLIGHT_HDR;
}
-->
<histHighLightLevel>220</histHighLightLevel>
<histLowLightLevel>70</histLowLightLevel>
<histHightLightPercentAlgo>0.001</histHightLightPercentAlgo>
<histLowLightPercentAlgo>0.90</histLowLightPercentAlgo>
<histHightLight255PercentAlgo>0.0005</histHightLight255PercentAlgo>
<highLight255Thr>251</highLight255Thr>
<highLight255RealPercentAlgo>0.02</highLight255RealPercentAlgo>
<!-- 曝光策略
"HfpsBrightenTimes":高帧率场景基准提亮倍数
"LfpsBrightenTimes":低帧率场景基准提亮倍数
"minBrightenTimes":所有场景的最低提亮倍数
"brighten_rate":提亮倍数变化的曲率,值越大,较亮场景提亮的倍数越小
"darkenTimes": 欠曝的变暗基准倍数
"darken_rate": 欠曝倍数的变化曲率,值越大,高光平均亮度低的场景欠曝倍数越小
"ExpISO_ratio": 基础曝光时间和ISO的比例
"darkenExpISO_ratio": 欠曝时,倍数用来减少曝光和ISO的比例,如0.8,则曝光时间欠曝0.8倍数,ISO欠曝0.2倍数
"darkenMinISO":欠曝取图的最小ISO,区分于minSensitity,增加欠曝的可调空间
"Lfps_HightlightThr": 高光占比阈值,用于避免高光多的场景提亮过大
"Lfps_ExptimeThr": 判定高帧率和低帧率场景的曝光时间阈值
"balanceISPExp": 是否需要平衡ISP gain和曝光时间的极限值补充
"balanceISOExp": 是否需要平衡ISO和曝光时间的极限值补充
"dGainReduce": dGain按固定比例缩减,但不小于minDgain
"lowlightAdaptiveExpThredhold": Lowlight但高光占比超过该数值,采用曝光自适应
"lowlightAdaptiveExpTimes": Lowlight自适应曝光最高提亮倍数
"faceDarkTimes": 逆光场景人脸压暗参数
-->
<HfpsBrightenTimes>1.9</HfpsBrightenTimes>
<LfpsBrightenTimes>1.95</LfpsBrightenTimes>
<minBrightenTimes>1.85</minBrightenTimes>
<brighten_rate>0.6</brighten_rate>
<darkenTimes>3.2</darkenTimes>
<darken_rate>0.6</darken_rate>
<ExpISO_ratio>1.6</ExpISO_ratio>
<darkenExpISO_ratio>0.2</darkenExpISO_ratio>
<darkenMinISO>100</darkenMinISO>
<Lfps_HightlightThr>0.045</Lfps_HightlightThr>
<Lfps_ExptimeThr>35000000</Lfps_ExptimeThr>
<balanceISPExp>true</balanceISPExp>
<balanceISOExp>true</balanceISOExp>
<dGainReduce>1</dGainReduce>
<lowlightAdaptiveExpThredhold>-1</lowlightAdaptiveExpThredhold>
<lowlightAdaptiveExpTimes>2</lowlightAdaptiveExpTimes>
<faceDarkTimes>0.1</faceDarkTimes>
<!-- ISP 图像增强部分 -->
<noiseReductionMode>-1</noiseReductionMode>
<edgeMode>-1</edgeMode>
<sharpness>-1</sharpness>
<saturation>-1</saturation>
<contrast>-1</contrast>
<mfnr>1</mfnr>
<mfnr_minExp>0</mfnr_minExp>
</ExpConfig>
<ExpConfig id="3">
<!-- 项目识别码 -->
<productName>"HMD_RONIN_WIDE"</productName>
<!-- 曝光参数限定:
曝光时间,ISO,数字增益:adb shell dumpsys media.camera获取,可能和实际的不一致所以还是以具体为准。示例:
android.sensor.info.exposureTimeRange (f0003): int64[2]
[16534 400000000 ]
android.sensor.info.sensitivityRange (f0001): int32[2]
[100 1600 ]
android.control.postRawSensitivityBoostRange (10027): int32[2]
[100 3199 ]
-->
<maxExp>200000000</maxExp>
<minExp>100000</minExp>
<maxSensitity>3200</maxSensitity>
<minSensitity>100</minSensitity>
<maxDgain>120</maxDgain>
<minDgain>100</minDgain>
<!-- smooth曝光策略
"Ytarget":一幅画面的目标亮度,LOWLIGHT算法用,计算preview平均亮度,小于Ytarget把亮度提到Ytarget,大于Ytarget认为足够亮不需要提亮操作
"lowLightMeanYthr":LOWLIGHT_HDR算法提亮用,低亮部分平均亮度的threshold,统计得出低亮的平均亮度
"lowLighYtarget":LOWLIGHT_HDR算法提亮用,表示要把低亮的平均亮度提到此目标亮度,小于lowLighYtarget把亮度提到lowLighYtarget,大于lowLighYtarget认为足够亮不需要提亮操作
"highLightMeanYthr":LOWLIGHT_HDR算法欠曝用,高亮部分平均亮度的threshold,统计得出高亮部分的平均亮度
"highLighYtarget":LOWLIGHT_HDR算法欠曝用,表示要把高亮降到此目标亮度
-->
<Ytarget>90</Ytarget>
<lowLightMeanYthr>80</lowLightMeanYthr>
<lowLighYtarget>86</lowLighYtarget>
<highLightMeanYthr>220</highLightMeanYthr>
<highLighYtarget>60</highLighYtarget>
<!--
histHighLightLevel/histLowLightLevel定义预览直方图高亮/低亮,并计算出高亮和低亮的占比,根据这两个占比走不同的算法
if (histHightlightPercent < histHightLightPercentAlgo && lowlightPercent > histLowLightPercentAlgo) {
histAlgo = CaptureType.LOWLIGHT;
} else if (histHightlight255Percent < histHightLight255PercentAlgo) {
histAlgo = CaptureType.LOWLIGHT;
} else if (mMeanHistY > Ytarget && histHightlight255Percent < highLight255RealPercentAlgo) {
histAlgo = CaptureType.LOWLIGHT;
} else {
histAlgo = CaptureType.LOWLIGHT_HDR;
}
-->
<histHighLightLevel>220</histHighLightLevel>
<histLowLightLevel>70</histLowLightLevel>
<histHightLightPercentAlgo>0.001</histHightLightPercentAlgo>
<histLowLightPercentAlgo>0.90</histLowLightPercentAlgo>
<histHightLight255PercentAlgo>0.0005</histHightLight255PercentAlgo>
<highLight255Thr>251</highLight255Thr>
<highLight255RealPercentAlgo>0.02</highLight255RealPercentAlgo>
<!-- 曝光策略
"HfpsBrightenTimes":高帧率场景基准提亮倍数
"LfpsBrightenTimes":低帧率场景基准提亮倍数
"minBrightenTimes":所有场景的最低提亮倍数
"brighten_rate":提亮倍数变化的曲率,值越大,较亮场景提亮的倍数越小
"darkenTimes": 欠曝的变暗基准倍数
"darken_rate": 欠曝倍数的变化曲率,值越大,高光平均亮度低的场景欠曝倍数越小
"ExpISO_ratio": 基础曝光时间和ISO的比例
"darkenExpISO_ratio": 欠曝时,倍数用来减少曝光和ISO的比例,如0.8,则曝光时间欠曝0.8倍数,ISO欠曝0.2倍数
"darkenMinISO":欠曝取图的最小ISO,区分于minSensitity,增加欠曝的可调空间
"Lfps_HightlightThr": 高光占比阈值,用于避免高光多的场景提亮过大
"Lfps_ExptimeThr": 判定高帧率和低帧率场景的曝光时间阈值
"balanceISPExp": 是否需要平衡ISP gain和曝光时间的极限值补充
"balanceISOExp": 是否需要平衡ISO和曝光时间的极限值补充
"dGainReduce": dGain按固定比例缩减,但不小于minDgain
"lowlightAdaptiveExpThredhold": Lowlight但高光占比超过该数值,采用曝光自适应
"lowlightAdaptiveExpTimes": Lowlight自适应曝光最高提亮倍数
"faceDarkTimes": 逆光场景人脸压暗参数
-->
<HfpsBrightenTimes>1.8</HfpsBrightenTimes>
<LfpsBrightenTimes>1.9</LfpsBrightenTimes>
<minBrightenTimes>1.7</minBrightenTimes>
<brighten_rate>0.7</brighten_rate>
<darkenTimes>2.5</darkenTimes>
<darken_rate>1.1</darken_rate>
<ExpISO_ratio>1.6</ExpISO_ratio>
<darkenExpISO_ratio>0.2</darkenExpISO_ratio>
<darkenMinISO>100</darkenMinISO>
<Lfps_HightlightThr>0.035</Lfps_HightlightThr>
<Lfps_ExptimeThr>35000000</Lfps_ExptimeThr>
<balanceISPExp>true</balanceISPExp>
<balanceISOExp>true</balanceISOExp>
<dGainReduce>1</dGainReduce>
<lowlightAdaptiveExpThredhold>-1</lowlightAdaptiveExpThredhold>
<lowlightAdaptiveExpTimes>2</lowlightAdaptiveExpTimes>
<faceDarkTimes>0.1</faceDarkTimes>
<!-- ISP 图像增强部分 -->
<noiseReductionMode>-1</noiseReductionMode>
<edgeMode>-1</edgeMode>
<sharpness>-1</sharpness>
<saturation>-1</saturation>
<contrast>-1</contrast>
<mfnr>1</mfnr>
<mfnr_minExp>0</mfnr_minExp>
</ExpConfig>
<!-- 夜景算法配置参数 -->
<!-- iso分段: 从小往大搜索,当前iso<=iso velue时,使用该分段的参数 -->
<!-- night_exposure_time: 1为标准提亮帧、-1为标准欠爆帧,默认首个提亮帧为baseIndex -->
<!-- night_exposure_iso: 1为标准提亮帧、-1为标准欠爆帧 -->
<!-- night_lnrLevel: chrom降噪强度,取值范围 1-10 -->
<!-- night_nrLevel: luma降噪强度,取值范围 1-10 -->
<!-- night_tmoLevel: 亮度等级,取值范围 1-10 -->
<!-- night_ceLevel: 对比度强度,取值范围 0.0f-1.0f -->
<!-- night_spLevel: 锐化强度,取值范围 0.0f-1.0f -->
<NightParam id="0">
<night_iso value="200">
<night_exposure_time>1;-0.35;-1</night_exposure_time>
<night_exposure_iso>1;-0.1;-1</night_exposure_iso>
<night_ceLevel>0</night_ceLevel>
<night_lnrLevel>0</night_lnrLevel>
<night_nrLevel>0</night_nrLevel>
<night_spLevel>0</night_spLevel>
<night_tmoLevel>4</night_tmoLevel>
</night_iso>
<night_iso value="400">
<night_exposure_time>1;-0.25;-1.1</night_exposure_time>
<night_exposure_iso>1;-0.1;-1</night_exposure_iso>
<night_ceLevel>0</night_ceLevel>
<night_lnrLevel>0</night_lnrLevel>
<night_nrLevel>0</night_nrLevel>
<night_spLevel>0</night_spLevel>
<night_tmoLevel>3</night_tmoLevel>
</night_iso>
<night_iso value="1000">
<night_exposure_time>1;-0.25;-1.2</night_exposure_time>
<night_exposure_iso>1;-0.1;-1</night_exposure_iso>
<night_ceLevel>0</night_ceLevel>
<night_lnrLevel>0</night_lnrLevel>
<night_nrLevel>0</night_nrLevel>
<night_spLevel>0</night_spLevel>
<night_tmoLevel>0</night_tmoLevel>
</night_iso>
<night_iso value="1800">
<night_exposure_time>1;-0.35;-1.2</night_exposure_time>
<night_exposure_iso>1;-0.1;-1</night_exposure_iso>
<night_ceLevel>0</night_ceLevel>
<night_lnrLevel>0</night_lnrLevel>
<night_nrLevel>0</night_nrLevel>
<night_spLevel>0.1</night_spLevel>
<night_tmoLevel>0</night_tmoLevel>
</night_iso>
<night_iso value="3300">
<night_exposure_time>1;-0.4;-1.4</night_exposure_time>
<night_exposure_iso>1;-0.1;-0.9</night_exposure_iso>
<night_ceLevel>0</night_ceLevel>
<night_lnrLevel>0</night_lnrLevel>
<night_nrLevel>0</night_nrLevel>
<night_spLevel>0.2</night_spLevel>
<night_tmoLevel>0</night_tmoLevel>
</night_iso>
<night_iso value="4400">
<night_exposure_time>1;-0.5;-2.0</night_exposure_time>
<night_exposure_iso>1;-0.1;-0.8</night_exposure_iso>
<night_ceLevel>0</night_ceLevel>
<night_lnrLevel>0</night_lnrLevel>
<night_nrLevel>0</night_nrLevel>
<night_spLevel>0.2</night_spLevel>
<night_tmoLevel>0</night_tmoLevel>
</night_iso>
<night_iso value="6000">
<night_exposure_time>1;-0.7;-2.1</night_exposure_time>
<night_exposure_iso>1;-0.1;-0.75</night_exposure_iso>
<night_ceLevel>0</night_ceLevel>
<night_lnrLevel>0</night_lnrLevel>
<night_nrLevel>0</night_nrLevel>
<night_spLevel>0.2</night_spLevel>
<night_tmoLevel>0</night_tmoLevel>
</night_iso>
<night_iso value="7200">
<night_exposure_time>1;-0.9;-2.1</night_exposure_time>
<night_exposure_iso>1;-0.1;-0.7</night_exposure_iso>
<night_ceLevel>0</night_ceLevel>
<night_lnrLevel>0</night_lnrLevel>
<night_nrLevel>0</night_nrLevel>
<night_spLevel>0.2</night_spLevel>
<night_tmoLevel>2</night_tmoLevel>
</night_iso>
</NightParam>
<NightParam id="3">
<night_iso value="200">
<night_exposure_time>1;-0.35;-1</night_exposure_time>
<night_exposure_iso>1;-0.1;-1</night_exposure_iso>
<night_ceLevel>0</night_ceLevel>
<night_lnrLevel>0</night_lnrLevel>
<night_nrLevel>0</night_nrLevel>
<night_spLevel>0</night_spLevel>
<night_tmoLevel>4</night_tmoLevel>
</night_iso>
<night_iso value="400">
<night_exposure_time>1;-0.25;-1.1</night_exposure_time>
<night_exposure_iso>1;-0.1;-1</night_exposure_iso>
<night_ceLevel>0</night_ceLevel>
<night_lnrLevel>0</night_lnrLevel>
<night_nrLevel>0</night_nrLevel>
<night_spLevel>0</night_spLevel>
<night_tmoLevel>3</night_tmoLevel>
</night_iso>
<night_iso value="1000">
<night_exposure_time>1;-0.25;-1.1</night_exposure_time>
<night_exposure_iso>1;-0.1;-1</night_exposure_iso>
<night_ceLevel>0</night_ceLevel>
<night_lnrLevel>0</night_lnrLevel>
<night_nrLevel>0</night_nrLevel>
<night_spLevel>0</night_spLevel>
<night_tmoLevel>2</night_tmoLevel>
</night_iso>
<night_iso value="1800">
<night_exposure_time>1;-0.35;-1.2</night_exposure_time>
<night_exposure_iso>1;-0.1;-1</night_exposure_iso>
<night_ceLevel>0</night_ceLevel>
<night_lnrLevel>0</night_lnrLevel>
<night_nrLevel>0</night_nrLevel>
<night_spLevel>0</night_spLevel>
<night_tmoLevel>0</night_tmoLevel>
</night_iso>
<night_iso value="2400">
<night_exposure_time>1;-0.45;-1.4</night_exposure_time>
<night_exposure_iso>1;-0.1;-0.9</night_exposure_iso>
<night_ceLevel>0</night_ceLevel>
<night_lnrLevel>0</night_lnrLevel>
<night_nrLevel>0</night_nrLevel>
<night_spLevel>0</night_spLevel>
<night_tmoLevel>2</night_tmoLevel>
</night_iso>
<night_iso value="4400">
<night_exposure_time>1;-0.55;-2.0</night_exposure_time>
<night_exposure_iso>1;-0.1;-0.8</night_exposure_iso>
<night_ceLevel>0</night_ceLevel>
<night_lnrLevel>0</night_lnrLevel>
<night_nrLevel>0</night_nrLevel>
<night_spLevel>0</night_spLevel>
<night_tmoLevel>3</night_tmoLevel>
</night_iso>
<night_iso value="6000">
<night_exposure_time>1;-0.7;-2.1</night_exposure_time>
<night_exposure_iso>1;-0.1;-0.75</night_exposure_iso>
<night_ceLevel>0</night_ceLevel>
<night_lnrLevel>0</night_lnrLevel>
<night_nrLevel>0</night_nrLevel>
<night_spLevel>0</night_spLevel>
<night_tmoLevel>0</night_tmoLevel>
</night_iso>
<night_iso value="7200">
<night_exposure_time>1;-0.9;-2.1</night_exposure_time>
<night_exposure_iso>1;-0.1;-0.7</night_exposure_iso>
<night_ceLevel>0</night_ceLevel>
<night_lnrLevel>0</night_lnrLevel>
<night_nrLevel>0</night_nrLevel>
<night_spLevel>0</night_spLevel>
<night_tmoLevel>3</night_tmoLevel>
</night_iso>
</NightParam>
Spoiler: PASTEBIN OF GOOGLE TRANSLATION
aiworks_night_config_ronin2.xml - Pastebin.com
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
pastebin.com

Categories

Resources