Firmware:Cheatsheet

NEW: Stats & Info for your O!Play… oplaywarenfoo.cgi 19/02/2010 12:03:10

Useful Misc. Scripts & Commands

These scripts will be executed through either SSH or Telnet.

Once logged into you box via one of these methods, the following are very useful:

busybox
Usage: busybox [function] [arguments]...
mount / -o remount,rw
This command is to enable read / write access on the O!Play 'root' file system
Usage: mount [flags] DEVICE NODE [-o options,more-options]
cat /proc/cmdline
defines the Flash partitions on the kernel command line (and other, vital, information)
df - Displays mounted external devices, such as USB storage.  
Use df -h to see the actual size values in MB
mount - Mounts an external device such as a USB HDD 
(Example:  mount /dev/scsi/host0/bus0/target0/lun0/part1 /opt

the following are pretty useful:

mount --bind - Binds an old directory to a new directory 
(Example: mount --bind /tmp/mnt/XXX) - Type mount --help to see more options.
umount - Unmounts the external device
dmesg | more - Will display box information one segment at a time (terminal window size) 
by hitting enter, the next segment is produced
netstat -an - Will display all incoming/outgoing connections
ps - Will display all running processes 
- Use ps --help to display more options.
free - Displays current memory statistics, and be used with extensions 
(Example: free -l) 
- Use free -? to display options
cat - Very, very useful and can display all input/output messages from the box 
- Use cat --help for more options.
Usage: cat [-u] [FILE]...
uname -a
Print system information
uptime
Display the time since the last boot
reboot
This will reboot the O!Play
cd /etc - Changes to the /etc directory

cd /mnt - Changes to the mounted directory

cd /opt - Changes to the /opt directory

These commands can also be be bound. (Example: cd /mnt/opt/etc)

NOTE: The following commands are used when the above commands have been executed

mkdir - Makes a directory, in which of course you need to specify (Example: mkdir /mnt/XXX) 

To mount the directory you just created, issue the following mount /mnt/XXX /XXX

rmdir - Removes the specified directory

rm - Removes a directory (Example: cd /opt then rm -rf *) -> Removes the/opt directory

killall - kill a specific process (Example: killall syslogd)

sleep - Causes the process to delay startup for specified time 

(Example: sleep 20 && /opt/bin/busybox swapon /dev/scsi/host0/bus0/target0/lun0/part2)

chown - Change the owner and/or group of each FILE to OWNER and/or GROUP 
- Type chown --help for string options

chmod - Allows permisions changing on directories 
(Example: chmod +x /jffs/etc/config/) 
- The +x string makes the directory executable.

stopservice - Stops the specified service 
(Example: stopservice upnp) 
- Replace stop with start to start the service

Proc

# cat /proc/cpuinfo
# cat /proc/cmdline
See: http://minimodding.com/KernelCmndMagic
(Example: rootfstype=yaffs2 root=31:01 mtdparts=rtk_nand:112640k,95360k,40960k,13184k 
 console=ttyS0,115200n8r ip=192.168.0.9::192.168.0.254:255.0.0.0:::)
# cat /proc/devices
# cat /proc/iomem
(Example:
00000000-000fffff : System RAM
00100000-00594fff : reserved
  00100000-00446d27 : Kernel code
  00446d28-004d41bf : Kernel data
00595000-01afffff : System RAM
01b00000-01ffffff : reserved
02000000-07ffffff : System RAM
b8012b00-b8012cff : SATA_DRV)
# cat /proc/yaffs
# cat /proc/modules
# cat /proc/mounts
# cat /proc/mtd
# cat /proc/pci
# cat /proc/version

Restart init.d

# /opt/etc/init.d/S10xinetd restart
# /opt/etc/init.d/S40sshd restart
# /opt/etc/init.d/S80samba restart

experiment & investigate a custom firmware for the Asus O!Play HD Digital Media Streamer

USE ENTIRELY AT YOUR OWN RISK. Use of the OPlayWare website is subject to published Disclaimer and Privacy Policy

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License