Android ships a stripped down version of standard Linux commands and tools via
toybox. toybox is comparable to busybox, it consists
of a single executable in /vendor/bin/toybox which provides all the
functionality.
For example, to view extended file attributes - xattrs:
kagura:/persist # toybox getfattr -d /persist/
# file: .
security.restorecon_last="�+4���� \� �X�7tu�"
security.selinux="u:object_r:persist_file:s0"
To wipe a particular xattr to force restorecon_recursive to run on next
boot:
kagura:/persist # toybox setfattr -x security.restorecon_last /persist/
kagura:/persist # toybox getfattr -d /persist/
# file: .
security.selinux="u:object_r:persist_file:s0"
As of Android 9.0 Pie, toybox includes the following commands:
acpibase64basenameblkidblockdevcalcatchattrchconchgrpchmodchownchrootchrtcksumclearcmpcommcpcpiocutdatedddfdiffdirnamedmesgdos2unixduechoegrepenvexpandexprfallocatefalsefgrepfilefindflockfmtfreefreeramdiskfsfreezegetenforcegetfattrgrepgroupsgunzipgzipheadhelphostnamehwclockidifconfiginotifydinsmodinstallioniceioreniceiotopkillkillalllnload_policyloglognamelosetuplslsattrlsmodlsoflspcilsusbmakedevsmd5summicrocommkdirmkfifomknodmkswapmktempmodinfomodprobemoremountmountpointmvnbd-clientncnetcatnetstatnicenlnohupodpartprobepastepatchpgreppidofpivot_rootpkillpmapprintenvprintfpspwdpwdxreadlinkrealpathrenicerestoreconrevrfkillrmrmdirrmmodrunconsedsendeventseqsetenforcesetfattrsetpropsetsidsha1sumsha224sumsha256sumsha384sumsha512sumsleepsortsplitstartstatstopstringssttyswapoffswaponsyncsysctltactailtartasksetteetimetimeouttoptouchtrtraceroutetraceroute6truetruncatettytunctlulimitumountunameuniqunix2dosuptimeusleepuudecodeuuencodevconfigvmstat