adb equivalents in shell with root access

For the benefit of others experiencing the same issue and arriving at this subject via Google and Co., here are some on-the-phone equivalents to running adb command on the PC:

Always start by getting a root shell on the phone:
user@pc$ adb shell
$ su –
#

To remount /system read-write (adb remount):
# mount -o remount,rw /dev/block/mtdblock3 /system

To uninstall an application (adb uninstall):
# rm /system/app/PackageYouNoLongerWant.apk
# pm uninstall package.you.no.longer.want

To put a file somewhere other than the SD-card (adb push):
Put the file on the SD-card as usual.
# mv /sdcard/file /where/you/want/to/put/the/file

Taken from this helpful post: link

 

A more detailed, and useful post given that a /dev mappings are not static:

Check how the /system partition is mounted as read-only (ro), In particular note the device

# mount | grep system

/dev/block/stl12 /system ext4 ro,relatime,barrier=1,data=ordered 0 0

Remount the partiton in read-write mode (rw)

# mount -o rw,remount /dev/block/stl12 /system

Finally check if it was mounted in read-write mode (rw)

# mount | grep system
/dev/block/stl12 /system ext4 rw,relatime,barrier=1,data=ordered 0 0

When done, do not forget to remount it read-only again, for safety reasons, obviously

# mount -o ro,remount /dev/block/stl12 /system

 Found in this post

Hide Folders in Finder

to hide: setfile -a V FolderName
to show: setfile -a v FolderName

TRIM Support Enabled in Windows 7

In a command line window:

fsutil behavior query disabledeletenotify

DisableDeleteNotify = 1 (Windows TRIM commands are disabled)
DisableDeleteNotify = 0 (Windows TRIM commands are enabled)

Mac OSX Command Line Notes

To flush DNS cache:

sudo dscacheutil -flushcache

To mount a DMG:

hdiutil attach ‘/path/to/dmg’

To install a .pkg or .mpkg

sudo installer -pkg ‘/path/to/pkg’ -target /

To unset the “locked” flag on files (usually copied as read-only from another system):

chflags nouchg [file name]

To use find and xargs to do interesting things to LARGE lists of files (“xxx” can be any unique sequence of characters.  Most online examples use … -I “{}” …):

find . -name *.txt | xargs –Ixxx rm xxx

To get a quick count of files in a directory/diretories without counting meta files (files/folders that start with “.”):

ls | wc -l

To en|disable Spotlight in Mac OSX:

sudo mdutil -a -i off|on

To remove the menu bar icon:

sudo chmod 600 /System/Library/CoreServices/Search.bundle/Contents/MacOS/Search

killall SystemUIServer