Bash shell settings in Android 4.0.* (~Ice Cream Sandwich)

I don't know about earlier releases, but ICS has a bash shell in /system/bin. If you start a shell through ADB (eg. ./adb shell), it'll start /system/bin/sh as a shell which is a symlink to bash. Unfortunately ADB does not add the -l option to the shell's commandline, thus the shell will not be a login shell and it'll not look for _any_ configuration files. Sad

Android initialization process

Pretty thorough explanation of the boot process. Of course this was written some 4 years ago ... but I guess the basics remained the same.

How to list setuid executable files

Well, this is really an easy one. I guess people just starting to get to know linux might find it a bit tricky though. The command is this:
find / -type f -perm -4000 -perm +0111 -print
The -perm -4000 option matches files with the setuid bit set. And the -perm +0111 option matches files for which any of the executable bits is set. This command might come handy if you've a rooted Android phone and would like to keep tabs on what executables get setuid root privileges (besides the apps that run something through su).

Android Portal - a section of eLinux.org (Embedded Linux Wiki)

A good source of information on the depths of Android's structure and inner working.

Packet sniffer/capture apps for Android

I've found three apps that are worth to mention:
  • tPacketCapture: works only on Android v4.0+, but requires no root access (and captures only TCP/UDP, but that's sufficient for most use cases)
  • Shark for Root: seems to be the most popular choice, but hasn't been updated for the last 1.5 years (requires root access and is a frontend for tcpdump)
  • Packet Sniffer: this one is quite similiar in features to Shark (hasn't been updated for years, requires root and is a frontend for tcpdump)
  • SimplePacketCapture: a very basic UI, requires root access (probably a frontend for tcpdump, but the app's description does not say so)

strace for Mac OS X

On a Mac I need to trace an app only rarely so I tend to forget the command's name. Maybe writing it down here will help me remember. Smile It's dtruss.

Ice Cream Sandwich explained: MTP - what is it, why use it, and how to set it up

It seems I won't use my Galaxy Nexus on my LTSP thin client through my new USB cradle any time soon. Sad Probably I'll dig up the necessary LTSP modifications to make it work, but not right now. Wi-Fi works just fine. Or almost fine. For some reason if I do long data transfers, the transmit speed gradually fades away ... right until connection is lost. Try to copy a 2GB file from your Nexus to an SSH server (via some SFTP client, eg. AndFTP) and you'll most probably see what I mean.

An easy way to start a HTTP server serving static content/files

I was looking for a oneliner to start a HTTP server and serve static content from a directory. Python's SimpleHTTPServer is the perfect match for the job. Smile Python is already installed by most linux distributions by default and it's easily available for a lot of other platforms as well. Starting your own little HTTP server was never easier than this:
python2 -m SimpleHTTPServer 8080
And to access it, open the http://localhost:8080/ URL.

Syndicate content