Tuesday, March 19, 2013

More on Android building

ENG, USER, DEBUG

Reference from KAndroid
  • eng
  • This is the default flavor. A plain $ make is the same as $ make eng.
    Installs modules tagged with: eng, debug, user, and/or development.
    Installs non-APK modules that have no tags specified.
    Installs APKs according to the product definition files, in addition to tagged APKs.
    ro.secure=0
    ro.debuggable=1
    ro.kernel.android.checkjni=1
    adb is enabled by default.
  • user
  • $ make user This is the flavor intended to be the final release bits.
    Installs modules tagged with user.
    Installs non-APK modules that have no tags specified.
    Installs APKs according to the product definition files; tags are ignored for APK modules.
    ro.secure=1
    ro.debuggable=0
    adb is disabled by default.
  • userdebug
  • $ make userdebug The same as user, except:
    Also installs modules tagged with debug.
    ro.debuggable=1
    adb is enabled by default.

proguard

In Android.mk, you can put below to prevent TOO MUCH optimization with dex-opt.
LOCAL_PROGUARD_ENABLED := disabled

Tuesday, March 12, 2013

/dev/null

/dev/null is one of pseudo-devices from UNIX-like OS.
Quotes from Wikipedia: In Unix-like operating systems, /dev/null or the null device is a special file that discards all data written to it (but reports that the write operation succeeded) and provides no data to any process that reads from it (yielding EOF immediately). In programmer jargon, especially Unix jargon, it may also be called the bit bucket or black hole.
Actually, there are other kinds of pseudo-devices. For example,
  • /dev/null
  • Accepts and discards all input; produces no output.
  • /dev/zero
  • Accepts and discards all input; produces a continuous stream of NULL (zero value) bytes.
  • /dev/full
  • Produces a continuous stream of NULL (zero value) bytes when read, and returns a "disk full" message when written to.
  • /dev/random and /dev/urandom
  • Produces a variable-length stream of pseudo-random or truly random numbers.
Other name convention for Linux based OS:
  • fb: frame buffer
  • fd: (platform) floppy disks, though this same abbreviation is also commonly used to refer to file descriptor
  • hd: (“classic”) IDE driver (previously used for ATA hard disk drive, ATAPI optical disc drives, etc.)
  • hda: the master device on the first ATA channel (usually identified by major number 3 and minor number 0)
  • hdb: the slave device on the first ATA channel
  • hdc: the master device on the second ATA channel
  • hdc1: first partition on this disk (example)
  • hdc5: first logical drive in the extended partition (example)
  • hdd: the slave device on the second ATA channel
  • lp: line printers (compare lp)
  • parport, pp: parallel ports
  • pt: pseudo-terminals (virtual terminals) SCSI driver, also used by libATA (modern PATA/SATA driver), USB, IEEE 1394, etc.
  • sd: mass-storage driver
  • sda: first registered device
  • sda4: last partition on this disk (example)
  • sda6: second logical drive in the extended partition (example)
  • ses: Enclosure driver
  • sg: generic SCSI layer
  • sr: “ROM” driver (data-oriented optical disc drives; scd is just a secondary alias)
  • st: magnetic tape driver
  • tty: terminals
  • ttyS: (platform) serial port driver
  • ttyUSB: USB serial converters, modems, etc.

Wednesday, March 6, 2013

Chrome's SPDY

SPDY (which is just a abbreviation for SPEEDY) was supported from Chromium 11+, and finally it has been included in Android version of Chrome.
Basic idea for SPDY is to compress bunch of redundant protocols inside HTTP (using gzip), and to remove unnecessary HTTP headers. Consequently, it reduces time while loading the page. And yes, It's much faster.
Updated March 7th, 2013: For more tweaks you might wanna type below URL.
chrome://flags
After Chrome 27.0.1453.xx (@148877), you can check how much data was reduced after applying SPDY. (For only Android version)
Settings - Bandwidth management - Reduce data usage
Here are some links: