Saturday, June 23, 2012

Remove unused resource from Android project

  1. Run lint under '/SDK/tools/lint',  save the output to file.
    • lint . |grep 'to be unused' > /tmp/unused.txt
  2. Remove all unused resouces.
    • rm `cat /tmp/unused.txt | gawk -F: '{print $1}' |sed -e 's/  *$//'|grep png`
  3. Rebuild the project with 'ant release'.

Wednesday, June 6, 2012

SVN merge branch to trunk

  1. Commit all changes for branch and switch to trunk repos.
  2. Checkout branch repos to /tmp/<branch>
  3. cd <branch>
  4. svn log --stop-on-copy, you should have all the commit recoded revision.
  5. cd /path/to/trunk
  6. svn merge /tmp/<branch> -r <from ver>:<until ver>
  7. svn commit "msg"

Friday, June 1, 2012

Openwrt Tp-link 1043nd WDS bridge with WR542G

After googled, I din't get any right guide to bridge the router (1043nd & wr542g), below is the steps to get both of them work together.

router a = wr542g = A
router b = 1043nd = B

  1. Configure IP A =, B = (settings may various )
  2. Login to A, under wireless, check "Enable Bridges"
  3. Enter the Mac adds of B in "MAC of AP1" filed.
  4. Login to B, under network -> wifi tab, edit your wireless controller and change the mode to "Access point (WDS)", save & apply.
  5. Go back to Wifi tab, click on "Scan", you should see route A appear on the list, join and fill up the authentication infos.
  6. Make both router using the same channel, change the mode to "Client (WDS)", BSSID is mac adds of A, network select "lan". save & apply.
  7. You should get both router connected after reboot A, B.
  8. Verified your work by ping the 2 routers.