Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts

2013-06-10

Android malware silentclient.apk silentservice of root phones (rooted)

threat keywords:

  • silentservice
  • silentclient.apk
  • Log
  • LogicDownloads
  • datang_gaoyang
  • 低聲下載
  • 靜默渠道
  • com.android.as
  • 山寨手機

(remove) system app apk:
- Android 更新 4.1 (system apk)
- SystemThreads (system apk)
path (/sdcard):

/storage/sdcard0/datang_gaoyang/SilentClient.apk
/storage/sdcard0/Log/app_service/*.txt
/storage/sdcard0/LogicDownloads/*/*.apk

Below are fixes at your sole own risks

If not rooted (手機沒 root)
1a) rename path /sdcard/datang_gaoyang to /sdcard/datang_gaoyang.bak
1b) create an empty file /sdcard/datang_gaoyang
2a) rename path /sdcard/Log/app_service to /sdcard/Log/app_service.bak
2b) create an empty file /sdcard/Log//app_service
3a) rename path /sdcard/LogicDownloads to /sdcard/LogicDownloads.bak
3b) create an empty file /sdcard/LogicDownloads
4) reboot

(PS. the /sdcard/Log/app_service/* will keep logging, because the malwares are running, but bugged to download, and will still submitting your IMEI, etc.)

If rooted (手機已 root)
  1. remove the above 2 systems apps
  2. perform above 1a, 2a, 3a to cleanup
  3. reboot


Good luck.

Problematic apks backup for examination:
  1. SystemThread_3.0.apk http://goo.gl/08uOp
  2. Android更新_4.1.apk http://goo.gl/Ouljj




to be updated ~

2011-01-10

Google simplifies the keyboard layout

  • Good-Bye: Windows-key, Windows-Menu-key
  • Good-Bye: Insert, Delete, Home, End, PgUp, PgDn
  • Good-Bye: F1 to F12
  • Add: Power button (too near to the Backspace key?)
  • Add: Speaker and brightless buttons
  • Add: forward/backward buttons
I like the bigger Ctrl and Alt keys, I *never* want or need the Windows Super_L and Super_R.



Here I have some new todos: change shortcut keys for awesome, openbox, vim, vimperator, and tmux.conf

2010-05-12

ramzswap 不釋放記憶體

compressed swap memory 鎖的死死的問題有關注了。

see:
ramzswap: Eliminate stale data in compressed memory
http://thread.gmane.org/gmane.linux.kernel/981457

2007-10-22

Asus M2A-VM-HDMI ATi X1250 SB600 RadeonHD

It has been 2 months that both my Gentoo and Debian have to run with fglrx.

Finally, my Gentoo Linux can run in 1440x900 with x11-driver/xf86-video-radeonhd, without patching src/rhd_id.c by hand.

The mailing list:
http://lists.opensuse.org/radeonhd/

2007-09-15

IDE to SATA converter Performance @HK$50

Hardware

Motherboard: Asus M2A-VM-HDMI
CPU: Athlon64 X2 4000+
RAM: 2GB DDR667
Harddisk: 2 x Maxtor 250GB
Operating System: (64-bit no-multilib)

$ uname -a
Linux x2 2.6.22-gentoo-r8 #3 SMP Sun Sep 30 14:55:25 SGT 2007 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 4000+ AuthenticAMD GNU/Linux

/dev/sda = ide to sata to onboard sata
/dev/sdb = ide to onboard ide

2007-02-08

Buffalo Linkstation Pro LS-320GL: fsck.ext3 (e2fsck)

root@LS-GL7D6:~# fsck.ext3 -nv /dev/sda6
e2fsck 1.40-WIP (14-Nov-2006)
/dev/sda6: clean, 475373/38977536 files, 4281295/77933315 blocks
root@LS-GL7D6:~# time fsck.ext3 -nv /dev/sda6 -f
e2fsck 1.40-WIP (14-Nov-2006)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information

 475373 inodes used (1.22%)
  11683 non-contiguous inodes (2.5%)
        # of inodes with ind/dind/tind blocks: 6426/51/1
4281295 blocks used (5.49%)
      0 bad blocks
      2 large files

 413742 regular files
  54207 directories
   1358 character device files
    450 block device files
      3 fifos
   1134 links
   5602 symbolic links (5502 fast symbolic links)
      2 sockets
--------
 476498 files

real    10m28.463s
user    2m25.740s
sys     6m1.330s
root@LS-GL7D6:/mnt/disk1# time dd if=GenLink_arm9-1.0pre2-20070130.tar.bz2 of=delelte.me
204360+1 records in
204360+1 records out
104632786 bytes (105 MB) copied, 17.7344 seconds, 5.9 MB/s <-- SLOW!!

real    0m17.776s
user    0m1.620s
sys     0m12.890s

2007-02-06

Samsung HM080HC 80GB 2.5" Hard Drive (5V 0.85A)

Specification
HK$500 with 3 years warranty, or $705 for a 120GB.

$ dmesg

usb 1-4: new high speed USB device using ehci_hcd and address 5
usb 1-4: configuration #1 chosen from 1 choice
scsi2 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 5
usb-storage: waiting for device to settle before scanning
scsi 2:0:0:0: Direct-Access SAMSUNG HM080HC AM10 PQ: 0 ANSI: 0 CCS
SCSI device sda: 156301488 512-byte hdwr sectors (80026 MB)
sda: Write Protect is off
sda: Mode Sense: 00 14 00 00
sda: assuming drive cache: write through
SCSI device sda: 156301488 512-byte hdwr sectors (80026 MB)
sda: Write Protect is off
sda: Mode Sense: 00 14 00 00
sda: assuming drive cache: write through
sda: unknown partition table
sd 2:0:0:0: Attached scsi disk sda
sd 2:0:0:0: Attached scsi generic sg0 type 0
usb-storage: device scan complete

$ hdparm -v /dev/sda

2007-01-22

Buffalo Linkstation Pro LS-320GL (LS-GL)

Product Info

@HK$1,880 with 2 years product warranty.
arm9@400MHz, 128MB RAM, 320GB Serial-ATA
USB 2.0 x2, 10/100/1000M Ethernet
Power: 21W @max, built-in power transformer.
Fan@1900rpm (silent@auto)

Flashed with Freelink@linkstationwiki.net

root@LS-GL7D6:~# dmesg
Linux version 2.6.12.6-arm1 (root@Desktop) (gcc version 3.4.4 (release) (CodeSourcery ARM 2005q3-2)) #77 Tue Dec 5 22:23:46 CST 2006
CPU: ARM926EJ-Sid(wb) [41069260] revision 0 (ARMv5TEJ)
CPU0: D VIVT write-back cache
CPU0: I cache: 32768 bytes, associativity 1, 32 byte lines, 1024 sets
CPU0: D cache: 32768 bytes, associativity 1, 32 byte lines, 1024 sets
Machine: MV-88fxx81
Using UBoot passing parameters structure
Sys Clk = 200000000, Tclk = 166664740


- Warning - This LSP release was tested only with U-Boot release 1.7.3

Memory policy: ECC disabled, Data cache writeback
On node 0 totalpages: 32768
DMA zone: 32768 pages, LIFO batch:15
Normal zone: 0 pages, LIFO batch:1
HighMem zone: 0 pages, LIFO batch:1
Built 1 zonelists
Kernel command line: console=ttyS0,115200 root=/dev/sda2 rw initrd=0x00800040,15M panic=5 BOOTVER=1.01
PID hash table entries: 1024 (order: 10, 16384 bytes)
Console: colour dummy device 80x30
Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
Memory: 128MB 0MB 0MB 0MB = 128MB total
Memory: 110208KB available (3370K code, 570K data, 112K init)
Calibrating delay loop... 266.24 BogoMIPS (lpj=1331200)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
checking if image is initramfs...it isn't (no cpio magic); looks like an initrd
Freeing initrd memory: 15360K
NET: Registered protocol family 16
FLASH boardId = 12
Flash bankwidth 1, base ff800000, size 400000
BUFFALO LS_GL FLASH size 4096[KB]

Marvell Development Board (LSP Version 1.7.8_NAS)-- BUFFALO_BOARD_LS_GL

Detected Tclk 166664740 and SysClk 200000000
Marvell USB EHCI Host controller #0: c1702bc0
Marvell USB EHCI Host controller #1: c1702980
pexBarOverlapDetect: winNum 2 overlap current 0
mvPexInit:Warning :Bar 2 size is illigal
it will be disabled
please check Pex and CPU windows configuration
PCI: bus0: Fast back to back transfers enabled
PCI: bus1: Fast back to back transfers enabled
SCSI subsystem initialized
usbcore: registered new driver usbfs
usbcore: registered new driver hub
use IDMA acceleration in copy to/from user buffers. used channels 2 and 3
Done.
cesadev_init(c0011304)
mvCesaInit: sessions=640, queue=32, pSram=f0000000
Fast Floating Point Emulator V0.9 (c) Peter Teichmann.
VFS: Disk quotas dquot_6.5.1
Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
SGI XFS with no debug enabled
Initializing Cryptographic API
Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing disabled
ttyS0 at MMIO 0x0 (irq = 3) is a 16550A
ttyS1 at MMIO 0x0 (irq = 4) is a 16550A
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered
RAMDISK driver initialized: 3 RAM disks of 16384K size 1024 blocksize
loop: loaded (max 8 devices)
Marvell Gigabit Ethernet Driver 'egiga':
o Ethernet descriptors in DRAM
o DRAM SW cache-coherency
o Checksum offload enabled
o Loading network interface ** egiga_init_module (0)
'eth0'
Intergrated Sata device found
scsi0 : Marvell SCSI to SATA adapter
scsi1 : Marvell SCSI to SATA adapter
Vendor: Seagate   Model: ST3320620AS   Rev: 3.AA
Type:   Direct-Access  ANSI SCSI revision: 03
SCSI device sda: 625142448 512-byte hdwr sectors (320073 MB)
SCSI device sda: drive cache: write back
SCSI device sda: 625142448 512-byte hdwr sectors (320073 MB)
SCSI device sda: drive cache: write back
sda: sda1 sda2 sda4 <>
Attached scsi disk sda at scsi1, channel 0, id 0, lun 0
Attached scsi generic sg0 at scsi1, channel 0, id 0, lun 0,  type 0
physmap flash device: 400000 at ff800000
CFI: Found no phys_mapped_flash device at location zero
>jedec_probe
Found: SST 39LF020
phys_mapped_flash: Found 1 x8 devices at 0x0 in 8-bit bank
phys_mapped_flash: Found an alias at 0x40000 for the chip at 0x0
phys_mapped_flash: Found an alias at 0x80000 for the chip at 0x0
phys_mapped_flash: Found an alias at 0xc0000 for the chip at 0x0
phys_mapped_flash: Found an alias at 0x100000 for the chip at 0x0
phys_mapped_flash: Found an alias at 0x140000 for the chip at 0x0
phys_mapped_flash: Found an alias at 0x180000 for the chip at 0x0
phys_mapped_flash: Found an alias at 0x1c0000 for the chip at 0x0
phys_mapped_flash: Found an alias at 0x200000 for the chip at 0x0
phys_mapped_flash: Found an alias at 0x240000 for the chip at 0x0
phys_mapped_flash: Found an alias at 0x280000 for the chip at 0x0
phys_mapped_flash: Found an alias at 0x2c0000 for the chip at 0x0
phys_mapped_flash: Found an alias at 0x300000 for the chip at 0x0
phys_mapped_flash: Found an alias at 0x340000 for the chip at 0x0
phys_mapped_flash: Found an alias at 0x380000 for the chip at 0x0
phys_mapped_flash: Found an alias at 0x3c0000 for the chip at 0x0
number of JEDEC chips: 1
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
cmdlinepart partition parsing not available
RedBoot partition parsing not available
ehci_platform ehci_platform.4523: EHCI Host Controller
ehci_platform ehci_platform.4523: new USB bus registered, assigned bus number 1
ehci_platform ehci_platform.4523: irq 17, io mem 0x00000000
ehci_platform ehci_platform.4523: park 0
ehci_platform ehci_platform.4523: USB 0.0 initialized, EHCI 1.00, driver 10 Dec 2004
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
ehci_platform ehci_platform.16781: EHCI Host Controller
ehci_platform ehci_platform.16781: new USB bus registered, assigned bus number 2
ehci_platform ehci_platform.16781: irq 12, io mem 0x00000000
ehci_platform ehci_platform.16781: park 0
ehci_platform ehci_platform.16781: USB 0.0 initialized, EHCI 1.00, driver 10 Dec 2004
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 1 port detected
ohci_hcd: 2004 Nov 08 USB 1.1 'Open' Host Controller (OHCI) Driver (PCI)
USB Universal Host Controller Interface driver v2.2
usbcore: registered new driver usblp
drivers/usb/class/usblp.c: v0.13: USB Printer Device Class driver
Initializing USB Mass Storage driver...
usbcore: registered new driver usb-storage
USB Mass Storage support registered.
mice: PS/2 mouse device common for all mice  <--- funny ?
MICON ctrl (C) BUFFALO INC. V.1.00 installed.
Kernel event proc (C) BUFFALO INC. V.1.00 installed.
MICON V2 (C) BUFFALO INC. V.1.00 installed.
NET: Registered protocol family 2
IP: routing cache hash table of 1024 buckets, 8Kbytes
TCP established hash table entries: 8192 (order: 4, 65536 bytes)
TCP bind hash table entries: 8192 (order: 3, 32768 bytes)
TCP: Hash tables configured (established 8192 bind 8192)
NET: Registered protocol family 1
NET: Registered protocol family 17
RAMDISK: Compressed image found at block 0
EXT2-fs warning: mounting unchecked fs, running e2fsck is recommended
VFS: Mounted root (ext2 filesystem).
kjournald starting.  Commit interval 5 seconds
EXT3 FS on sda1, internal journal
EXT3-fs: mounted filesystem with ordered data mode.
XFS mounting filesystem sda2
Ending clean XFS mount for filesystem: sda2
VFS: Mounted root (xfs filesystem).
Trying to move old root to /initrd ... okay
Freeing init memory: 112K
Adding 136512k swap on /dev/sda5.  Priority:-1 extents:1
kjournald starting.  Commit interval 5 seconds
EXT3 FS on sda1, internal journal
EXT3-fs: mounted filesystem with ordered data mode.
XFS mounting filesystem sda6
Ending clean XFS mount for filesystem: sda6
eth0: link down
eth0: link up<5>, full duplex<5>, speed 1 Gbps<5>
$ ssh 192.168.11.16
         _sudZUZ#Z#XZo=_         DDDD   EEEEEE BBBB   IIIIII  AAAA   NN   NN
    _jmZZ2!!~---~!!X##wa       DD DD  EE     BB BB    II   AA  AA  NNN  NN
 .      -]Xb/    ~    __#2(    One ARM ARM926EJ-Sid(wb) rev 0 (v5l) Processor, 128M RAM
-Zo;       +!4ZwaaaauZZXY'      266.24 Bogomips Total
*#[,        ~-?!!!!!!-~        LS-GL7D6
 XUb;.
  )YXL,,
    +3#bc,
      -)SSL,,
         ~~~~~


BUFFALO INC. LinkStation series LS-GL(IESADA)
root@LS-GL7D6:~# uname -a
Linux LS-GL7D6 2.6.12.6-arm1 #77 Tue Dec 5 22:23:46 CST 2006 armv5tejl GNU/Linux
root@LS-GL7D6:~# free
             total       used       free     shared    buffers     cached
Mem:        125844      41476      84368          0      14360      17328
-/+ buffers/cache:       9788     116056
Swap:       136512          0     136512
root@LS-GL7D6:~# mount
rootfs on / type rootfs (rw)
/dev/root.old on /initrd type ext2 (rw)
/dev/root on / type xfs (rw)
tmpfs on /lib/init/rw type tmpfs (rw,nosuid)
proc on /proc type proc (rw,nodiratime,nosuid,nodev,noexec)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec)
usbfs on /proc/bus/usb type usbfs (rw,nosuid,nodev,noexec)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,nosuid,noexec)
tmpfs on /tmp type tmpfs (rw)
/dev/sda1 on /boot type ext3 (rw,noatime)
/dev/sda6 on /mnt/disk1 type xfs (rw,noatime,nodiratime)
nfsd on /proc/fs/nfsd type nfsd (rw)
rpc_pipefs on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
root@LS-GL7D6:~# df
Filesystem           1K-blocks      Used Available Use% Mounted on
rootfs                  465244    233628    231616  51% /
/dev/root.old            13303     10980      2323  83% /initrd
/dev/root               465244    233628    231616  51% /
tmpfs                      100         0       100   0% /lib/init/rw
tmpfs                    62920         0     62920   0% /dev/shm
tmpfs                    10240         8     10232   1% /tmp
/dev/sda1               194443     10560    173844   6% /boot
/dev/sda6            311602188      1216 311600972   1% /mnt/disk1
root@LS-GL7D6:~# fdisk -l /dev/sda
Disk /dev/sda: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

 Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1          25      200781   83  Linux
/dev/sda2              26          87      498015   83  Linux
/dev/sda4              88       38913   311869845    5  Extended
/dev/sda5              88         104      136521   82  Linux swap / Solaris
/dev/sda6             105       38913   311733261   83  Linux
root@LS-GL7D6:~# ls -la /boot/
total 6450
drwxr-xr-x  3 root root    1024 Jan 24 00:32 .
drwxr-xr-x 18 root root    4096 Jan 23 14:06 ..
-rw-r--r--  1 root root     722 Jan 23 15:31 boot_options
-rw-r--r--  1 root root   18592 Jan 23 15:04 conf_save.tgz
-rw-r--r--  1 root root       0 Dec 18 18:45 hddrootmode
-rw-r--r--  1 root root 4563579 Dec 27 22:29 initrd.buffalo
-rw-r--r--  1 root root      84 Dec 15 22:27 linkstation_release
-rw-r--r--  1 root root   27147 Jan 23 15:04 log.tgz
drwx------  2 root root   12288 Dec 15 04:58 lost+found
-rw-r--r--  1 root root      29 Jan 24 00:32 rootfs_ok
-rw-r--r--  1 root root 1942020 Jan 23 15:02 uImage.buffalo
root@LS-GL7D6:~# hdparm -Tt /dev/sd{a,a,a}
/dev/sda:
Timing cached reads:   270 MB in  2.00 seconds = 135.00 MB/sec
Timing buffered disk reads:  100 MB in  3.03 seconds =  33.00 MB/sec

/dev/sda:
Timing cached reads:   304 MB in  1.99 seconds = 152.76 MB/sec
Timing buffered disk reads:  146 MB in  3.03 seconds =  48.18 MB/sec

/dev/sda:
Timing cached reads:   302 MB in  2.01 seconds = 150.25 MB/sec
Timing buffered disk reads:  126 MB in  3.01 seconds =  41.86 MB/sec
root@LS-GL7D6:~# cat /proc/cpuinfo
Processor       : ARM926EJ-Sid(wb) rev 0 (v5l)
BogoMIPS        : 266.24
Features        : swp half thumb fastmult edsp java
CPU implementer : 0x41
CPU architecture: 5TEJ
CPU variant     : 0x0
CPU part        : 0x926
CPU revision    : 0
Cache type      : write-back
Cache clean     : cp15 c7 ops
Cache lockdown  : format C
Cache format    : Harvard
I size          : 32768
I assoc         : 1
I line length   : 32
I sets          : 1024
D size          : 32768
D assoc         : 1
D line length   : 32
D sets          : 1024

Hardware        : MV-88fxx81
Revision        : 0000
Serial          : 0000000000000000
root@LS-GL7D6:~# cat /etc/fstab
# /etc/fstab: static file system information.
#                        
proc            /proc      proc    defaults                            0 0
none            /dev/pts   devpts  gid=5,mode=20                       0 0
tmpfs           /tmp       tmpfs   size=10M,mode=1777                  0 0
/dev/sda5       swap       swap    defaults                            0 0
/dev/sda1       /boot      ext3    defaults,noatime,errors=remount-ro  0 1
/dev/sda6       /mnt/disk1 xfs,acl defaults,noatime,nodiratime         0 0
root@LS-GL7D6:~# apt-get update
Get:1 http://security.debian.org etch/updates Release.gpg [189B]
Get:2 http://security.debian.org etch/updates Release [24.3kB]
Get:3 ftp://ftp.uk.debian.org etch Release.gpg [378B]        
Get:4 http://security.debian.org etch/updates/main Packages [4707B]          
Get:5 http://security.debian.org etch/updates/contrib Packages [14B]                           
Get:6 http://security.debian.org etch/updates/non-free Packages [14B]
Get:7 http://security.debian.org etch/updates/main Sources [1982B]
Get:8 ftp://ftp.uk.debian.org etch Release [74.4kB] 
Get:9 ftp://ftp.uk.debian.org etch/contrib Packages [45.9kB]
Get:10 http://mirrors.kernel.org etch Release.gpg [378B]
Get:11 ftp://ftp.uk.debian.org etch/main Packages [4171kB]
Get:12 http://mirrors.kernel.org etch Release [74.4kB]
Get:13 http://mirrors.kernel.org etch/main Packages [4171kB]
Get:14 http://mirrors.kernel.org etch/contrib Packages [45.9kB]
Get:15 http://mirrors.kernel.org etch/non-free Packages [57.5kB]
Get:16 ftp://ftp.uk.debian.org etch/non-free Packages [57.5kB]
Fetched 8730kB in 3m1s (48.0kB/s)
Reading package lists... Done
root@LS-GL7D6:~# cat /proc/cmdline
console=ttyS0,115200 root=/dev/sda2 rw initrd=0x00800040,15M panic=5 BOOTVER=1.01

2006-11-08

Encode Quicktime Movie from DC with x264 (82MB vs. 4.6MB)

  1. Input filesize vs. Output filesize (1 minute movie)
    -rw-r--r-- 1   4708697 2006-11-08 02:14 p1000010.avi
    -rw-r--r-- 1  84961874 2006-11-05 17:12 p1000001.mov
  2. The input quicktime movie from Digital Camera
    $ file p1000001.mov

    p1000001.mov: Apple QuickTime movie (unoptimized)

    $ tcprobe -i p1000001.mov
    [tcprobe] Apple QuickTime movie file
    [probe_mov.c] audio codec=raw
    [probe_mov.c] video codec=jpeg
    [tcprobe] summary for p1000001.mov,
    (*) = not default, 0 = not detected import frame size: -g 640x480 [720x576]
    (*)        frame rate: -f 30.000 [25.000] frc=5
    (*)       audio track: -a 0 [0] -e 8000,8,1 [48000,16,2] -n 0x1 [0x2000]
    (*)            length: 1830 frames, frame_time=33 msec, duration=0:01:01.000

2006-10-19

Upgrade Firefox to 2.0 RC3 from 1.5

Firefox 1.5 把 RAM 都吃光光,升級 2.0RC3
$ qlop -gvH mozilla-firefox

mozilla-firefox-1.5.0.1-r3: Tue Mar 21 13:06:12 2006: 56 minutes, 53 seconds
mozilla-firefox-1.5.0.1-r4: Tue Apr  4 03:45:30 2006: 41 minutes, 31 seconds
mozilla-firefox-1.5.0.2   : Sun Apr 16 15:00:27 2006: 50 minutes, 12 seconds
mozilla-firefox-1.5.0.2-r1: Mon May  1 07:45:20 2006: 33 minutes, 10 seconds
mozilla-firefox-1.5.0.3   : Fri May  5 23:14:43 2006: 38 minutes, 46 seconds
mozilla-firefox-1.5.0.3   : Fri May 19 05:14:50 2006: 41 minutes, 47 seconds
mozilla-firefox-1.5.0.4   : Mon Jun  5 22:37:49 2006: 39 minutes, 46 seconds
mozilla-firefox-1.5.0.5   : Sat Jul 29 23:00:49 2006: 33 minutes, 34 seconds
mozilla-firefox-1.5.0.6   : Sat Aug  5 12:08:51 2006: 57 minutes, 35 seconds
mozilla-firefox-1.5.0.7   : Tue Sep 19 03:00:08 2006: 44 minutes, 4 seconds
mozilla-firefox-1.5.0.7   : Tue Sep 19 20:25:02 2006: 1 minute, 3 seconds
mozilla-firefox-1.5.0.7   : Sat Sep 23 02:36:14 2006: 47 minutes, 55 seconds
mozilla-firefox-2.0_rc3   : Thu Oct 19 04:41:51 2006: 1 hour, 3 minutes, 58 seconds
mozilla-firefox: 13 times

2006-09-21

Linux zd1211rw usb wireless

Switching from net-wireless/zd1211 to kernel 2.6.18 zd1211rw support.
$ lsusb
Bus 001 Device 002: ID 14ea:ab13
$ nano -w /usr/src/linux/drivers/net/wireless/zd1211rw/zd_usb.c
static struct usb_device_id usb_ids[] = {
        /* ZD1211 */
        { USB_DEVICE(0x6891, 0xa727), .driver_info = DEVICE_ZD1211 },
        { USB_DEVICE(0x0df6, 0x9071), .driver_info = DEVICE_ZD1211 },
        { USB_DEVICE(0x157e, 0x300b), .driver_info = DEVICE_ZD1211 },
+        { USB_DEVICE(0x14ea, 0xab13), .driver_info = DEVICE_ZD1211 },
$ cat /etc/udev/rules.d/70-persistent-net.rules
# This file was automatically generated by the /lib/udev/write_net_rules
# program, probably run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single line.

# USB Device: 0x14ea:0xab13 (zd1211rw)
#SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="aa:bb:cc:dd:ee:ff", NAME="eth0"
#SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="aa:bb:cc:dd:ee:ff", NAME="eth1"
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="aa:bb:cc:dd:ee:ff", NAME="eth2"
$ grep ZD /usr/src/linux/.config
# CONFIG_USB_ZD1201 is not set
CONFIG_ZD1211RW=m
# CONFIG_ZD1211RW_DEBUG is not set
$ insmod zd1211rw
$ lsmod
Module                  Size  Used by
zd1211rw               32384  0
ieee80211softmac       20736  1 zd1211rw
ieee80211_crypt_tkip    8832  2
ieee80211              24584  2 zd1211rw,ieee80211softmac
ieee80211_crypt         4032  2 ieee80211_crypt_tkip,ieee80211
$ dmesg
usbcore: registered new driver zd1211rw
usb 1-3: new high speed USB device using ehci_hcd and address 2
usb 1-3: configuration #1 chosen from 1 choice
zd1211rw 1-3:1.0: firmware version 4605
zd1211rw 1-3:1.0: zd1211 chip 14ea:ab13 v4330 high 00-90-cc AL2230_RF pa0 g--
zd1211rw 1-3:1.0: eth0
SoftMAC: Open Authentication completed with aa:bb:cc:dd:ee:ff
$ iwconfig eth2
eth2      802.11g zd1211  ESSID:"access_point"
          Mode:Managed  Frequency:2.437 GHz  Access Point: aa:bb:cc:dd:ee:ff
          Bit Rate=54 Mb/s
          Encryption key:40AA-A249-F54A-ACB9-XXXX-0079-XXXX-014C-XXXX-94E6-XXXX-CFDF-A787-XXXX-F34C-XXXX   Security mode:open
          Link Quality=98/100  Signal level=100/100
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0
$ iwlist scan
eth2      Scan completed :
          Cell 02 - Address: aa:bb:cc:dd:ee:ff
                    ESSID:"access_point"
                    Protocol:IEEE 802.11bg
                    Mode:Master
                    Channel:6
                    Encryption key:on
                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 6 Mb/s; 9 Mb/s
                              11 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s; 36 Mb/s
                              48 Mb/s; 54 Mb/s
                    Quality=100/100  Signal level=100/100
                    IE: WPA Version 1
                        Group Cipher : WEP-40
                        Pairwise Ciphers (1) : WEP-40
                        Authentication Suites (1) : PSK
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : WEP-40
                        Pairwise Ciphers (1) : WEP-40
                        Authentication Suites (1) : PSK
                    Extra: Last beacon: 17ms ago
$ ifconfig -a
eth2      Link encap:Ethernet  HWaddr aa:bb:cc:dd:ee:ff
          inet addr:192.168.xx.yy  Bcast:192.168.xx.255 Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

2006-09-09

Gentoo Portage 2.1.1 from RC1-R6

 * In portage-2.1.1, emerge --newuse is now sensitive to changes in IUSE.
 * Immediately after upgrade from 2.1, users may notice a significantly larger
 * number of packages pulled in by --newuse, but that behavior is normal.

 * See NEWS and RELEASE-NOTES for further changes.

 *
 * For help with using portage please consult the Gentoo Handbook
 * at http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=3
 *
>>> Regenerating /etc/ld.so.cache...
>>> sys-apps/portage-2.1.1 merged.

2006-08-10

BenQ FP92W 19" widescreen


X11 modelines:
# 1280x1024 @ 75.00 Hz (GTF) hsync: 80.17 kHz; pclk: 138.54 MHz
Modeline "1280x1024_75.00"  138.54  1280 1368 1504 1728  1024 1025 1028 1069  -HSync +Vsync

# 1440x900 @ 60.00 Hz (GTF) hsync: 55.92 kHz; pclk: 106.47 MHz
Modeline "1440x900_60.00"  106.47  1440 1520 1672 1904  900 901 904 932  -HSync +Vsync

# 1440x900 @ 65.00 Hz (GTF) hsync: 60.71 kHz; pclk: 116.56 MHz
Modeline "1440x900_65.00"  116.56  1440 1528 1680 1920  900 901 904 934  -HSync +Vsync

# 1440x900 @ 70.00 Hz (GTF) hsync: 65.59 kHz; pclk: 126.98 MHz
Modeline "1440x900_70.00"  126.98  1440 1536 1688 1936  900 901 904 937  -HSync +Vsync

# 1440x900 @ 75.00 Hz (GTF) hsync: 70.50 kHz; pclk: 136.49 MHz
Modeline "1440x900_75.00"  136.49  1440 1536 1688 1936  900 901 904 940  -HSync +Vsync

# 1440x900 @ 76.00 Hz (GTF) hsync: 71.44 kHz; pclk: 138.31 MHz
Modeline "1440x900_76.00"  138.31  1440 1536 1688 1936  900 901 904 940  -HSync +Vsync

To circumvent the 2048 limit in mergedfb, my [1024x768] and [1440x900] displays are vertically aligned at the moment.

2006-08-07

Application Temporary Data into RAM

Reduce read/write stress on harddrive for temporary application data.
減少應用程式在硬存上的讀寫

Mount /tmp to RAM tmpfs (auto reszie below 1GB)
/tmp 掛載到 RAM 並設成 1GB 大小.
$ nano -w /etc/fstab
none  /tmp  tmpfs  defaults,nosuid,nodev,noatime,size=1024M,mode=1777  0 0
Edit /etc/bash/bashrc
修改 /etc/bash/bashrc
$ nano -w /etc/bash/bashrc
if [ ! -d /tmp/.$USER ]; then
  mkdir /tmp/.$USER
fi

for x in .adobe .dia .gimp-2.3 .gqview .java .macromedia .mplayer .thumbnails .urlgfe .vlc .xvpics
do
  if [ ! -d /tmp/.$USER/$x ]; then
    mkdir /tmp/.$USER/$x
    ln -sf /tmp/.$USER/$x $HOME
  fi
done

2006-06-29

[Benchmark] Linux Software ATA RAID-1

Mother Board: PC-Chips M810LR
CPU: Duron 600MHz
RAM: 128MB SDRAM
Onboard ATA Controller
Kernel: 2.6.x


Activate the hidden port in the kernel:
some benchmarks

$ hdparm -tT /dev/hd{a,c,a,c,a,c}
/dev/hda:
 Timing cached reads:   572 MB in  2.00 seconds = 285.98 MB/sec
 Timing buffered disk reads:  152 MB in  3.00 seconds =  50.60 MB/sec

/dev/hdc:
 Timing cached reads:   572 MB in  2.01 seconds = 284.84 MB/sec
 Timing buffered disk reads:  142 MB in  3.03 seconds =  46.89 MB/sec

/dev/hda:
 Timing cached reads:   580 MB in  2.00 seconds = 289.98 MB/sec
 Timing buffered disk reads:  160 MB in  3.01 seconds =  53.19 MB/sec

/dev/hdc:
 Timing cached reads:   556 MB in  2.00 seconds = 277.98 MB/sec
 Timing buffered disk reads:  148 MB in  3.03 seconds =  48.81 MB/sec

/dev/hda:
 Timing cached reads:   580 MB in  2.01 seconds = 288.83 MB/sec
 Timing buffered disk reads:  152 MB in  3.00 seconds =  50.60 MB/sec

/dev/hdc:
 Timing cached reads:   568 MB in  2.00 seconds = 283.42 MB/sec
 Timing buffered disk reads:  142 MB in  3.02 seconds =  47.02 MB/sec
$ time hdparm -tT /dev/md{0,0,1,1,0,1}
/dev/md0:
 Timing cached reads:   564 MB in  2.00 seconds = 281.98 MB/sec
 Timing buffered disk reads:  162 MB in  3.01 seconds =  53.85 MB/sec

/dev/md0:
 Timing cached reads:   572 MB in  2.01 seconds = 284.28 MB/sec
 Timing buffered disk reads:  168 MB in  3.00 seconds =  56.00 MB/sec

/dev/md1:
 Timing cached reads:   572 MB in  2.01 seconds = 284.28 MB/sec
 Timing buffered disk reads:  156 MB in  3.00 seconds =  52.00 MB/sec

/dev/md1:
 Timing cached reads:   576 MB in  2.00 seconds = 287.98 MB/sec
 Timing buffered disk reads:  150 MB in  3.00 seconds =  49.93 MB/sec

/dev/md0:
 Timing cached reads:   584 MB in  2.00 seconds = 291.98 MB/sec
 Timing buffered disk reads:  168 MB in  3.00 seconds =  55.92 MB/sec

/dev/md1:
 Timing cached reads:   572 MB in  2.01 seconds = 284.84 MB/sec
 Timing buffered disk reads:  156 MB in  3.00 seconds =  51.93 MB/sec

real    1m19.831s
user    0m1.096s
sys     0m19.953s

2006-06-20

Ping from Windows XP to x86 Wireless Router

The x86 Wireless Router
$ uname -a
Linux dunno 2.6.17-gentoo #1 Tue Jun 20 00:40:37 CST 2006 i686 mobile AMD Athlon(tm) XP-M 2800+ GNU/Linux
$ lspci
00:0b.0 Ethernet controller: Atheros Communications, Inc. AR5212 802.11abg NIC (rev 01)
        Subsystem: D-Link System Inc D-Link AirPlus DWL-G520 Wireless PCI Adapter(rev.B)
        Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV+ VGASnoop- ParErr- Stepping- SERR+ FastB2B-
        Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
        Latency: 168 (2500ns min, 7000ns max), Cache Line Size: 256 bytes
        Interrupt: pin A routed to IRQ 209
        Region 0: Memory at cffe0000 (32-bit, non-prefetchable) [size=64K]
        Capabilities: [44] Power Management version 2
                Flags: PMEClk- DSI- D1- D2- AuxCurrent=375mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
                Status: D0 PME-Enable- DSel=0 DScale=2 PME-
$ iwconfig
ath0      IEEE 802.11g  ESSID:"XXXXXXXX"
          Mode:Master  Frequency:2.437 GHz  Access Point: XX:XX:XX:XX:XX:XX
          Bit Rate:0 kb/s   Tx-Power:18 dBm   Sensitivity=0/3
          Retry:off   RTS thr:off   Fragment thr:off
          Encryption key:XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XXXX [2]   Security mode:open
          Power Management:off
          Link Quality=49/94  Signal level=-46 dBm  Noise level=-95 dBm
          Rx invalid nwid:13  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0
Windows XP on IBM Thinkpad X31
$ ping 192.168.52.149 -c 20
PING 192.168.52.149 (192.168.52.149) 56(84) bytes of data.
64 bytes from 192.168.52.149: icmp_seq=1 ttl=128 time=2.45 ms
64 bytes from 192.168.52.149: icmp_seq=2 ttl=128 time=1.93 ms
64 bytes from 192.168.52.149: icmp_seq=3 ttl=128 time=127 ms
64 bytes from 192.168.52.149: icmp_seq=4 ttl=128 time=1.04 ms
64 bytes from 192.168.52.149: icmp_seq=5 ttl=128 time=26.2 ms
64 bytes from 192.168.52.149: icmp_seq=6 ttl=128 time=50.5 ms
64 bytes from 192.168.52.149: icmp_seq=7 ttl=128 time=75.0 ms
64 bytes from 192.168.52.149: icmp_seq=8 ttl=128 time=98.2 ms
64 bytes from 192.168.52.149: icmp_seq=9 ttl=128 time=20.1 ms
64 bytes from 192.168.52.149: icmp_seq=10 ttl=128 time=44.0 ms
64 bytes from 192.168.52.149: icmp_seq=11 ttl=128 time=68.4 ms
64 bytes from 192.168.52.149: icmp_seq=12 ttl=128 time=2.42 ms
64 bytes from 192.168.52.149: icmp_seq=13 ttl=128 time=1.01 ms
64 bytes from 192.168.52.149: icmp_seq=14 ttl=128 time=38.1 ms
64 bytes from 192.168.52.149: icmp_seq=15 ttl=128 time=63.5 ms
64 bytes from 192.168.52.149: icmp_seq=16 ttl=128 time=1.02 ms
64 bytes from 192.168.52.149: icmp_seq=17 ttl=128 time=1.01 ms
64 bytes from 192.168.52.149: icmp_seq=18 ttl=128 time=31.8 ms
64 bytes from 192.168.52.149: icmp_seq=19 ttl=128 time=56.1 ms
64 bytes from 192.168.52.149: icmp_seq=20 ttl=128 time=80.4 ms

--- 192.168.52.149 ping statistics ---
20 packets transmitted, 20 received, 0% packet loss, time 19005ms
rtt min/avg/max/mdev = 1.013/39.568/127.513/36.517 ms

2006-04-11

Dual Display with IBM Thinkpad X31 and external LCD

** Upgraded from Proview 15" to BenQ FP92W 19" widescreen
MergeFB:
Merged Framebuffer mode allows you to use 3D acceleration on both heads of a dualheaded Radeon card. This is accomplished by creating a single large framebuffer with two viewports (CRTCs) looking into it. The current Radeon dualhead code creates two separate screens with separate framebuffers. they can be combined into a single logical screen using xinerama or used separately as separate X servers (host:0.0 and host:0.1). Merged Framebuffer mode can only be used to create a single logical screen. This is because a single framebuffer is shared between the two CRTCs. This is also the reason that HW accelerated 3D works on both heads. (freedesktop wiki)

also:
MergedFB mode is a special kind of Xinerama mode; it practically works like Xinerama, ie the two heads form a large screen which is transparent for applications. But this mode goes beyond Xinerama by even faking one screen to the X server itself. This provides the main advantage, namely that it is faster than Xinerama.-- www.winischhofer.net

also:
MergeFB is an XFree86 driver feature for video cards that have multiple heads. It is similar to Xinerama in that it also creates one big virtual desktop out of multiple screens.

The difference is in the implementation: Xinerama creates multiple screens with multiple framebuffers and MergedFB, like the name says, creates one big framebuffer with multiple 'viewports'. The main advantage of this method, is that it supports hardware 3D acceleration on all heads and it's generally faster. This is similar to 'TwinView' used in the nVidia drivers and the 'Big Desktop' in the ATI drivers.

Currently, this isn't supported in the drivers that come with the latest stable XFree86 release. Only in the MGA drivers from Matrox[1] and the experimental open source drivers for the SiS[2] and ATI Radeon[3] cards.

Framebuffer:
A framebuffer is a block of memory that holds one frame (one whole display or picture) of pixel data.

In the Linux kernel, there is a framebuffer device available. This device provides a hardware independent API for graphics devices. Applications see a framebuffer and can manipulate it though this API. It is accessed through a special device, normally /dev/fb* (e.g. /dev/fb0). It behaves much like other memory devices in linux, in that you can also read and write it with normal tools. For example copying the framebuffer to a file (effectively making a raw screenshot) can be done with:

cat /dev/fb0 > somefile

The main application of this in the Linux kernel is allowing the Tux logo at boot and a high resolution text console (a "Framebuffer console" -- the module for this is called fbcon). It's also for use on platforms which don't support a standard text mode. Other applications can also use it to get graphics without X or some other library, this is especially interesting for embedded devices.

Some screenshots:

2006-01-30

Using Sparse File for Gentoo Portage

$ cd /usr/portage
$ mv distfiles /home/ftp/gentoo/distfiles
$ mv packages /home/ftp/gentoo/packages

$ dd if=/dev/null of=/.portage.sf bs=1048576 count=0 seek=600

$ mkfs.reiserfs -f /.portage.sf (or mkfs.reiser4)

$ mv /usr/portage /usr/portage.old

$ mount /.portage.sf /usr/portage -o loop,noatime,notail,nodev (reiser4 doesn't need notail)

$ cp -r --no-dereference --preserve=all -T \
    /usr/portage.old /usr/portage/
$ nano -w /etc/fstab
/.portage.sf  /usr/portage     reiserfs  loop,auto,noatime,notail,nodev  0 0
/.ccache.sf   /var/tmp/ccache  reiserfs  loop,auto,noatime,notail,nodev  0 0
$ df && du /.portage.sf
Filesystem           1K-blocks      Used Available Use% Mounted on
/.portage.sf            614376    178632    435744  30% /usr/portage
/.ccache.sf            2097084    498564   1598520  24% /var/tmp/ccache

179344  /.portage.sf
$ mount
/.portage.sf on /usr/portage type reiserfs (rw,nodev,noatime,loop=/dev/loop0,notail)
/.ccache.sf on /var/tmp/ccache type reiserfs (rw,nodev,noatime,loop=/dev/loop1,notail)
The sparse files:
-rw-r--r--  1 root    root    2147483648 2006-02-21 22:24 .ccache.sf
-rw-r--r--  1 root    root     629145600 2006-01-30 14:32 .portage.sf