<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>George Zhu's BLOG</title>
	<atom:link href="http://george.insideiphone.com/index.php/feed/" rel="self" type="application/rss+xml" />
	<link>http://george.insideiphone.com</link>
	<description>The only certainty is that nothing is certain.</description>
	<lastBuildDate>Sat, 20 Mar 2010 02:23:55 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		
<!-- Start Of Script Generated By WP-PostViews Plus -->
<script type='text/javascript' src='http://george.insideiphone.com/wp-includes/js/jquery/jquery.js?ver=1.3.2'></script>
<script type="text/javascript">
/* <![CDATA[ */
/* ]]> */
</script>
<!-- End Of Script Generated By WP-PostViews Plus -->
	<item>
		<title>Boogie Board, An Interesting Notepad</title>
		<link>http://george.insideiphone.com/index.php/2010/03/02/boogie-board-an-interesting-notepad/</link>
		<comments>http://george.insideiphone.com/index.php/2010/03/02/boogie-board-an-interesting-notepad/#comments</comments>
		<pubDate>Tue, 02 Mar 2010 13:27:48 +0000</pubDate>
		<dc:creator>George Zhu</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://george.insideiphone.com/?p=811</guid>
		<description><![CDATA[Recently, I bought an interesting gadget, a Boogie Board (I bought from This Taobao Merchant). The board is designed to be the paper and pen replacement, temporarily. Quote from it&#8217;s official web site,
&#8220;The next time you reach for a piece of paper and a pen – Don’t! Grab a Boogie Board instead, the tree-friendly alternative [...]]]></description>
			<content:encoded><![CDATA[<p>Recently, I bought an interesting gadget, a Boogie Board (I bought from <a href="http://item.taobao.com/auction/item_detail-0db2-c0c45a620b3394d4406de027e7af5162.jhtml?cm_cat=0">This Taobao Merchant</a>). The board is designed to be the paper and pen replacement, temporarily. Quote from it&#8217;s official web site,</p>
<blockquote><p>&#8220;The next time you reach for a piece of paper and a pen – Don’t! Grab a Boogie Board instead, the tree-friendly alternative to memo pads, sketchbooks, sticky notes, dry erase boards and other writing/drawing mediums that can be re-used over 50,000 times!&#8221;</p></blockquote>
<p>Sounds good right? Wait, there&#8217;s a catch. It can&#8217;t save the data, so a simple click will erase your writing/drawing completely. But this thing can still be very useful, for example, it&#8217;s perfect for calculation or recording a phone number while answering a call.</p>
<p>The pad reacts fast and accurately, and it displays thin or thick lines depending on pen pressures, a cool feature. However, sometimes I feel it too sensitive, because it can easily generate some &#8220;noise&#8221; footprint when I occasionally put my hand on the pad. The pen is made of plastic, I even tried using toothpick and it worked perfectly :) Although you should avoid sharp materials. The pad is very durable, it&#8217;s driven by a watch battery and claimed to be usable for 50000 times of erasure.</p>
<p>I actually tried two models, one is the US model which is available in the United States (Amazon), I get it from a friend, the other is a Far East model, which is mainly for China market. Both models are the same, except the different captions in the title.</p>
<p>The following are the image of the two models I tried:<br />
<div id="attachment_812" class="wp-caption alignnone" style="width: 310px"><a href="http://george.insideiphone.com/wp-content/uploads/2010/03/TwoBoogieModels.jpg"><img src="http://george.insideiphone.com/wp-content/uploads/2010/03/TwoBoogieModels-300x202.jpg" alt="" title="Two Boogie Board Models" width="300" height="202" class="size-medium wp-image-812" /></a><p class="wp-caption-text">Two Boogie Board Models</p></div></p>
]]></content:encoded>
			<wfw:commentRss>http://george.insideiphone.com/index.php/2010/03/02/boogie-board-an-interesting-notepad/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Site Hosting Moved</title>
		<link>http://george.insideiphone.com/index.php/2010/01/21/site-hosting-moved/</link>
		<comments>http://george.insideiphone.com/index.php/2010/01/21/site-hosting-moved/#comments</comments>
		<pubDate>Thu, 21 Jan 2010 03:51:00 +0000</pubDate>
		<dc:creator>George Zhu</dc:creator>
				<category><![CDATA[General]]></category>
<category>hosting</category>
		<guid isPermaLink="false">http://george.insideiphone.com/?p=800</guid>
		<description><![CDATA[This site has moved to a new web hosting service, WebHostingPad, which locates in the United States, offers faster, cheaper, and more reliable service.
]]></description>
			<content:encoded><![CDATA[<p>This site has moved to a new web hosting service, <b><a href="http://www.webhostingpad.com/6437.html">WebHostingPad</a></b>, which locates in the United States, offers faster, cheaper, and more reliable service.</p>
]]></content:encoded>
			<wfw:commentRss>http://george.insideiphone.com/index.php/2010/01/21/site-hosting-moved/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Installing Windows 7 on Viliv X70 EX</title>
		<link>http://george.insideiphone.com/index.php/2009/12/21/tips-installing-windows-7-on-viliv-x70-ex/</link>
		<comments>http://george.insideiphone.com/index.php/2009/12/21/tips-installing-windows-7-on-viliv-x70-ex/#comments</comments>
		<pubDate>Mon, 21 Dec 2009 04:51:20 +0000</pubDate>
		<dc:creator>George Zhu</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Viliv]]></category>
		<category><![CDATA[Windows 7]]></category>
		<category><![CDATA[X70]]></category>
<category>Viliv</category><category>Windows 7</category><category>X70</category>
		<guid isPermaLink="false">http://george.insideiphone.com/?p=702</guid>
		<description><![CDATA[My Viliv X70 EX comes with Windows XP, and I would like to install Windows 7 on it because XP doesn&#8217;t have good support for touch screen devices. Good news is that the Windows 7 drivers for Viliv X70 have been officially out, however, it&#8217;s sort of tricky to install the touch screen driver because [...]]]></description>
			<content:encoded><![CDATA[<p>My Viliv X70 EX comes with Windows XP, and I would like to install Windows 7 on it because XP doesn&#8217;t have good support for touch screen devices. Good news is that the Windows 7 drivers for Viliv X70 have been officially out, however, it&#8217;s sort of tricky to install the touch screen driver because the driver listed on the official site is not correct.</p>
<p>After some reading and tries I have finally managed to have Windows 7 running on Viliv X70 EX with all features working. Here are the steps I took to install Windows 7 on my Viliv.</p>
<p><b>WARNING: The following installation procedures will delete your AMI Rescue partition, after the installation, you will no longer be able to use AMI Rescue to restore to Windows XP. If you wanna return to Windows XP later, make sure you have a Ghost image before proceeding, otherwise you&#8217;ll have to install it manually through a DVD-ROM or USB flash drive and your AMI Rescue partition will be gone forever.</b></p>
<h3>Things to Prepare</h3>
<p>1. Make a Windows 7 installation USB flash drive, get the official tool at</p>
<blockquote><p><a href="http://download.cnet.com/Windows-7-USB-DVD-Download-Tool/3000-18513_4-10972600.html">Windows 7 USB Installation Tool</a></p></blockquote>
<p>This tool will turn your USB flash into a Windows 7 installation media. Ignore this step if you plan to install using a USB DVD-ROM. I just prefer using a USB flash.</p>
<p><b>UPDATE</b>: if you don&#8217;t know how to use the tool, please check <a href="http://www.intowindows.com/how-to-create-bootable-windows-7-usb-to-install-windows-7-from-usb-flash-drive-using-windows-7-dvdusb-tool/">Create Bootable Windows 7 USB Flash</a>.</p>
<p><span id="more-702"></span>2. Make sure to use a USB Hub to attach a keyboard and a mouse to Viliv X70, trust me, it&#8217;s gonna be a nightmare if you don&#8217;t have keyboard and mouse during installation. You can&#8217;t enter CD KEYS without keyboard, and you can hardly move the mouse pointer to a specific position with touch screen (because it&#8217;s not calibrated during installation).</p>
<p><b>UPDATE</b>: the mouse is not a must because you may simulate it with jog. Press and hold the Menu button for 3 seconds, the jog will function like a mouse, A is left button, B is right button. A real mouse is more convenient though.</p>
<p>3. Download Viliv X70 Windows 7 drivers from</p>
<blockquote><p><a href="http://www.myviliv.com/eng/board/board_download/listbody.asp?idx=173&#038;a_gb=help&#038;a_cd=15&#038;a_item=0&#038;page=1&#038;searchCode=&#038;searchValue=&#038;sell_id=&#038;board_id=">Official Viliv X70 Windows 7 Drivers</a></p></blockquote>
<p>.</p>
<p>Copy the drivers onto your USB drive so that you can later easily access them later.</p>
<p>Note: ignore the Touch driver, it&#8217;s not the correct driver.</p>
<h3>Installation Procedures</h3>
<p>1. Now <b>hold button B</b> and turn on Viliv X70, this will bring up the Boot Device Selection screen, select your USB drive and go, in the partition step,  you&#8217;ll see 2 partitions, delete them, then create a new partition to install. Install Windows 7 as usual.</p>
<p>NOTE:<br />
A. don&#8217;t upgrade from XP to 7, install a fresh Windows 7.<br />
B. some people like to enter BIOS and change boot device there, I prefer selecting the device during boot time. If you wanna enter BIOS, tap the On Screen Keyboard button when you see the Viliv logo.</p>
<p>2. Now Viliv is running Windows 7, and it&#8217;s time to install drivers. Open Device Manager window, there&#8217;s an Unknown Device there, update its driver with System Driver you downloaded earlier, reboot.</p>
<p>3. Install Chipset Patch.</p>
<p>4. Install other drivers:</p>
<blockquote><p>
Graphics Driver<br />
WiFi Driver<br />
Bluetooth Driver<br />
Sound Driver<br />
Mobile Partner Driver &#038; CM (this is for 3G module only)</p></blockquote>
<p>Note: it&#8217;s important to not install Touch driver because it&#8217;s not Windows Touch compliant, check the following thread for details:</p>
<blockquote><p><a href="http://www.umpcportal.com/modules/newbb/viewtopic.php?topic_id=6050&#038;forum=36">Discussion about Viliv&#8217;s touch screen driver</a></p></blockquote>
<p>5. Install vilivManager.</p>
<p>6. Now let&#8217;s get the touch screen done. Install <b>i-viliv for MID</b> application. Start it and let it install the <b>HID/eGalax</b> driver which is the correct driver for the touch screen, weird it&#8217;s not listed on the official site.</p>
<p><b>UPDATE</b>: I&#8217;ve extracted the driver, so you can directly install the driver without installing i-vliv for MID first.</p>
<blockquote><p><a href='http://george.insideiphone.com/wp-content/uploads/2009/12/setupHIDeGalaxTouch-v1.00.000.zip'>HID/eGalax Windows 7 Driver 1.0.0 for Viliv X70</a></p></blockquote>
<p>Viliv X70 EX is now running Windows 7 with all features enabled.</p>
<p><img src="http://george.insideiphone.com/wp-content/uploads/2009/12/Viliv-X70-EX1.jpg" alt="Viliv X70 EX running Windows 7" title="Viliv X70 EX running Windows 7" width="640" height="480" class="alignnone size-full wp-image-723" /></p>
<p>Note: if the touch screen driver is not correct, the on-screen keyboard icon will not show in Login screen.</p>
<h3>Other Things</h3>
<p>1. By default, WiFi and 3G modem can not be enabled simultaneously, to overcome, apply this registry fix:</p>
<blockquote><p><a href="http://www.myviliv.com/eng/board/board_download/listbody.asp?idx=157&#038;a_gb=help&#038;a_cd=15&#038;a_item=0&#038;page=1&#038;searchCode=&#038;searchValue=&#038;sell_id=&#038;board_id=">WiFi and 3G Simultaneous Use Enabler</a></p></blockquote>
<p>2. Since the rescue partition was deleted, you can&#8217;t use AMI Rescue to recover from system failure, you may want to create a Ghost image for recovery.</p>
<p><del datetime="2010-01-10T09:03:13+00:00">3. <b>Don&#8217;t install any Office updates before a new driver is released.</b> A recent Office/OneNote update conflicts with the touch driver, the driver&#8217;s still there but simply not working. After its removal, the touch screen works again.</del></p>
]]></content:encoded>
			<wfw:commentRss>http://george.insideiphone.com/index.php/2009/12/21/tips-installing-windows-7-on-viliv-x70-ex/feed/</wfw:commentRss>
		<slash:comments>44</slash:comments>
		</item>
		<item>
		<title>Site Hosting Has Changed</title>
		<link>http://george.insideiphone.com/index.php/2009/02/08/sites-gonna-move/</link>
		<comments>http://george.insideiphone.com/index.php/2009/02/08/sites-gonna-move/#comments</comments>
		<pubDate>Sun, 08 Feb 2009 13:58:36 +0000</pubDate>
		<dc:creator>George Zhu</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://george.insideiphone.com/?p=666</guid>
		<description><![CDATA[My previous hosting service provider no longer offers VM for me, so I have moved my site back to a hosting service in China. Since packets are filtered in China, the site might not be accessable for some areas (I have no idea which areas are affected though), such areas might have problem using iLiberty+ [...]]]></description>
			<content:encoded><![CDATA[<p>My previous hosting service provider no longer offers VM for me, so I have moved my site back to a hosting service in China. Since packets are filtered in China, the site might not be accessable for some areas (I have no idea which areas are affected though), such areas might have problem using iLiberty+ payload retrieving facility. Sorry for the inconveniency.</p>
<p><b>UPDATE</b>: If you&#8217;re getting 10060 error while accessing the payload repo, try change the URL to: http://iliberty.insideiphone.com/repo.plist</p>
<p><b>UPDATE</b>: the old domain name (zjlotto.com) no longer works for me, if you&#8217;d like to download any files on this site, you have to change the URLs manually, replace any zjlotto.com with insideiphone.com. For example, change the URL http://iliberty.<b>zjlotto.com</b>/repo.plist to http://iliberty.<b>insideiphone.com</b>/repo.plist.</p>
]]></content:encoded>
			<wfw:commentRss>http://george.insideiphone.com/index.php/2009/02/08/sites-gonna-move/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>A Potential Memory Leak in Twisted</title>
		<link>http://george.insideiphone.com/index.php/2009/01/08/a-potential-memory-leak-in-twisted/</link>
		<comments>http://george.insideiphone.com/index.php/2009/01/08/a-potential-memory-leak-in-twisted/#comments</comments>
		<pubDate>Thu, 08 Jan 2009 07:01:33 +0000</pubDate>
		<dc:creator>George Zhu</dc:creator>
				<category><![CDATA[Python]]></category>
		<category><![CDATA[Memory Leak]]></category>
		<category><![CDATA[Twisted]]></category>

		<guid isPermaLink="false">http://george.insideiphone.com/?p=650</guid>
		<description><![CDATA[Recently I&#8217;m developing a server module with Python, the module will initiate thousands of connections to a Jabber server, and there&#8217;re many clients connect/disconnect to/from this module, so I&#8217;ve created a pool to hold all the connections.
To maintain such a pool, the module has to frequently construct object (when user connects) and deconstruct object (when [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I&#8217;m developing a server module with Python, the module will initiate thousands of connections to a Jabber server, and there&#8217;re many clients connect/disconnect to/from this module, so I&#8217;ve created a pool to hold all the connections.</p>
<p>To maintain such a pool, the module has to frequently construct object (when user connects) and deconstruct object (when user leaves), I implement the module using Twisted framework. After some tests, there seems memory leaks, this is not allowed for a server-side application, so I tried to hunt the leak down, after some tests I finally found where the problem exists.</p>
<p><span id="more-650"></span>Let&#8217;s start from a simple script:</p>
<blockquote><pre>
from twisted.protocols import basic
from twisted.internet import protocol, reactor
from twisted.internet.defer import Deferred

import gc
gc.enable()
gc.set_debug(gc.DEBUG_LEAK)

class JabberProxy(protocol.Protocol):
    def __init__(self):
        pass

    def __del__(self):
        print "*** Destruct JabberProxy ***"

    def connectionMade(self):
        self.transport.write('&lt;?xml version="1.0" encoding="UTF-8"?>' +
                             '&lt;stream:stream xmlns:stream="http://etherx.jabber.org/streams" ' +
                             'xmlns="jabber:client" to="im.sky-mobi.com" version="1.0">')

        self.transport.write('&lt;iq type="set" id="451166">&lt;query xmlns="jabber:iq:auth">' +
                             '&lt;username>100001&lt;/username>&lt;resource>skymobi&lt;/resource>' +
                             '&lt;password>kickass&lt;/password>&lt;/query>&lt;/iq>')

        self.transport.write('&lt;iq type="get" id="451167">&lt;query xmlns="jabber:iq:roster"/>&lt;/iq>')

    def connectionLost(self, reason):
        self.factory.proto = None

    def dataReceived(self, data):
        #print "=== Data received ===", repr(data)
        pass

class JabberFactory(protocol.ClientFactory):
    protocol = JabberProxy

    def __init__(self):
        pass

    def __del__(self):
        print "*** Destruct JabberFactory ***"

    def clientConnectionFailed(self, connector, reason):
        print "JabberFactory::clientConnectionFailed"

myFactory = JabberFactory()
myRosters = []

class Roster():
    def __init__(self, skyID, factory):
        self.skyID = skyID
        self.factory = factory

    def __del__(self):
        print "*** Destruct Roster ***"

    def connect(self):
        self.conn = reactor.connectTCP('192.168.1.254', 5222, self.factory)

    def disconnect(self):
        if self.conn.transport:
            self.conn.transport.write('</stream:stream>')
            self.conn.transport.loseConnection()
            # This line breaks the cyclic references between IConnector and Client,
            # without this line, memory will leak while deleting objects.
            self.conn.transport = None

def stopIt():
    global myRosters

    while len(myRosters):
        myRosters[0].disconnect()
        del myRosters[0]

    reactor.stop()

myRosters.append(Roster('100001', myFactory))
myRosters[0].connect()

reactor.callLater(1, stopIt)
reactor.run()

gc.collect()
print "gc.garbage:", len(gc.garbage)

for item in gc.garbage:
    print item
</pre>
</blockquote>
<p>Notice the line reads <b>self.conn.transport = None</b> which is the key to solve the leak, the following is the details:</p>
<p>When calling <b>reactor.connectTCP</b>, an Connector object is created, after the tcp connection is established, the Connector object creates a Client object, and references the object as <b>transport</b>, in the created Client object, there&#8217;s a reference named <b>connector</b> which points back to the Connector object, apparently this forms cyclic references between two objects, which causes the leak in my test script while it tries to free a Roster object (del myRoster[0]). By adding a one line patch (<b>self.conn.transport = None</b>) before the destruction effectively breaks the cyclic references, hence overcomes the leak.</p>
<p>The result before and after the patch:</p>
<p><b>Before</b></p>
<blockquote><pre>
*** Destruct Roster ***
*** Destruct JabberProxy ***
gc: collectable &lt;dict 0x8daa79c>
gc: collectable &lt;Connector instance at 0x8d9102c>
gc: collectable &lt;Client 0x8d9104c>
gc: collectable &lt;dict 0x8daa934>
gc: collectable &lt;tuple 0x8ae776c>
gc: collectable &lt;tuple 0x8c0e22c>
gc: collectable &lt;list 0x8cb47ec>
gc.garbage: 7
{'reactor': &lt;twisted.internet.selectreactor.SelectReactor object at 0x8d5b7cc>, 'state': 'disconnected', 'factoryStarted': 0, 'bindAddress': None, 'factory': &lt;__main__.JabberFactory instance at 0x8ae7aec>, 'host': '192.168.1.254', 'timeout': 30, 'port': 5222, 'transport': &lt;&lt;class 'twisted.internet.tcp.Client'> to ('192.168.1.254', 5222) at 8d9104c>}
&lt;twisted.internet.tcp.Connector instance at 0x8d9102c>
&lt;&lt;class 'twisted.internet.tcp.Client'> to ('192.168.1.254', 5222) at 8d9104c>
{'_tempDataBuffer': ['&lt;/stream:stream>'], 'disconnected': 1, 'dataBuffer': '', '_tempDataLen': 16, 'realAddress': ('192.168.1.254', 5222), 'connector': &lt;twisted.internet.tcp.Connector instance at 0x8d9102c>, 'logstr': 'JabberProxy,client', 'connected': 0, 'offset': 0, 'disconnecting': 1, 'reactor': <twisted.internet.selectreactor.SelectReactor object at 0x8d5b7cc>, 'addr': ('192.168.1.254', 5222)}
('192.168.1.254', 5222)
('192.168.1.254', 5222)
['&lt;/stream:stream>']&lt;/pre></blockquote>

<b>After</b>
<blockquote><pre>
*** Destruct Roster ***
*** Destruct JabberProxy ***
gc.garbage: 0
*** Destruct JabberFactory ***
</pre>
</blockquote>
<p>Notice, patching the Twisted framework directly (break the cycle in Connector or Client) can also solve the problem but will raise other issues, the Connector object is re-useable, breaking the cyclic references in framework makes it no long re-useable, so I think the better solution is to break the cycle in application instead of framework.</p>
]]></content:encoded>
			<wfw:commentRss>http://george.insideiphone.com/index.php/2009/01/08/a-potential-memory-leak-in-twisted/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>3G Unlock: A Scam ?</title>
		<link>http://george.insideiphone.com/index.php/2008/12/12/3g-unlock-a-scam/</link>
		<comments>http://george.insideiphone.com/index.php/2008/12/12/3g-unlock-a-scam/#comments</comments>
		<pubDate>Fri, 12 Dec 2008 01:12:54 +0000</pubDate>
		<dc:creator>George Zhu</dc:creator>
				<category><![CDATA[iPhone]]></category>
		<category><![CDATA[3G]]></category>
		<category><![CDATA[Scam]]></category>
		<category><![CDATA[Unlock]]></category>

		<guid isPermaLink="false">http://george.insideiphone.com/?p=645</guid>
		<description><![CDATA[Today I received a mail which offered an &#8216;opportuniy&#8217; to make huge bucks from iPhone 3G unlock, the deal looked like this:
hi, hello, i got my version 2.0 3G 16GB black phone bought in gray market shop in malaysia fully unlock using iliberty plus. everyone was saying that 3G cannot be unlock, but i have [...]]]></description>
			<content:encoded><![CDATA[<p>Today I received a mail which offered an &#8216;opportuniy&#8217; to make huge bucks from iPhone 3G unlock, the deal looked like this:</p>
<blockquote><p>hi, hello, i got my version 2.0 3G 16GB black phone bought in gray market shop in malaysia fully unlock using iliberty plus. everyone was saying that 3G cannot be unlock, but i have dones it now. the system is still mines secret,but i have used your iliberty plus base only to success for unlock. this is first times in the whole worlds for 3G full scientific software unlock.if you are intereststed, we can discuss financial figures for passing the technologies over to youself. once time payment is required only, afterwords you can sell for million $$$$ to millions peoples waiting for so long for 3G unlock.</p>
<p>i have kept gmail i.d. error, we will contact in correct way, firstly you must post on your site to address ******, yes, we are interested in your tecnologies. then we will forward everyway.</p>
<p>regards, for quick action to paste &#8220;yes reply&#8221; on your site.</p></blockquote>
<p>Is this a deal or a scam? You decide :) But I think it&#8217;s just someone who was trying to fake people that he/she owns my blog LOL.</p>
]]></content:encoded>
			<wfw:commentRss>http://george.insideiphone.com/index.php/2008/12/12/3g-unlock-a-scam/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Google VS Baidu</title>
		<link>http://george.insideiphone.com/index.php/2008/11/17/google-vs-baidu/</link>
		<comments>http://george.insideiphone.com/index.php/2008/11/17/google-vs-baidu/#comments</comments>
		<pubDate>Mon, 17 Nov 2008 05:20:44 +0000</pubDate>
		<dc:creator>George Zhu</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Baidu]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Search Engine]]></category>

		<guid isPermaLink="false">http://george.insideiphone.com/?p=638</guid>
		<description><![CDATA[NOTICE: This post is written in Chinese.
谷歌和百度
一直以来用Google的次数多，用Baidu的次数少，主要是搜索的资料经常是国外的，偶尔需要中文资料时才用用Baidu。另外，Baidu的竞价排名就是个垃圾，搜索出来的结果很多都是与搜索者本意没关联的。举个例子：今天看到个新闻，说是不要轻信网上搜索到的支付宝电话，我很好奇的分别在Google和Baidu试验了一下，得到了大相径庭的结果。
先看下面的Google搜索结果：

从Google的搜索结果里面可以看出，内容与搜索者本意非常贴切，直接反映了Google搜索的客观性和准确性。
再来看Baidu给出的同样关键字的搜索结果：

这结果与我预料的相去甚远，基本上等同于垃圾，毫无价值，难道这就是号称“最了解中文”的搜索引擎？ 
]]></description>
			<content:encoded><![CDATA[<p><b>NOTICE</b>: This post is written in Chinese.</p>
<p>谷歌和百度</p>
<p>一直以来用Google的次数多，用Baidu的次数少，主要是搜索的资料经常是国外的，偶尔需要中文资料时才用用Baidu。另外，Baidu的竞价排名就是个垃圾，搜索出来的结果很多都是与搜索者本意没关联的。举个例子：今天看到个新闻，说是不要轻信网上搜索到的支付宝电话，我很好奇的分别在Google和Baidu试验了一下，得到了大相径庭的结果。</p>
<p>先看下面的Google搜索结果：<br />
<a href="http://george.insideiphone.com/wp-content/uploads/2008/11/google_alipay_hotline.png"><img src="http://george.insideiphone.com/wp-content/uploads/2008/11/google_alipay_hotline-164x300.png" alt="" title="Google Search Result for 支付宝热线电话" width="164" height="300" class="alignnone size-medium wp-image-639" /></a><br />
从Google的搜索结果里面可以看出，内容与搜索者本意非常贴切，直接反映了Google搜索的客观性和准确性。</p>
<p><span id="more-638"></span>再来看Baidu给出的同样关键字的搜索结果：<br />
<a href="http://george.insideiphone.com/wp-content/uploads/2008/11/baidu_alipay_hotline.png"><img src="http://george.insideiphone.com/wp-content/uploads/2008/11/baidu_alipay_hotline-125x300.png" alt="" title="Baidu Search Result for 支付宝热线电话" width="125" height="300" class="alignnone size-medium wp-image-640" /></a><br />
这结果与我预料的相去甚远，基本上等同于垃圾，毫无价值，难道这就是号称“最了解中文”的搜索引擎？ </p>
]]></content:encoded>
			<wfw:commentRss>http://george.insideiphone.com/index.php/2008/11/17/google-vs-baidu/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Execute Custom Script During QNAP Bootstrap</title>
		<link>http://george.insideiphone.com/index.php/2008/11/12/execute-custom-script-during-qnap-bootstrap/</link>
		<comments>http://george.insideiphone.com/index.php/2008/11/12/execute-custom-script-during-qnap-bootstrap/#comments</comments>
		<pubDate>Wed, 12 Nov 2008 06:18:15 +0000</pubDate>
		<dc:creator>George Zhu</dc:creator>
				<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Boot]]></category>
		<category><![CDATA[QNAP]]></category>
		<category><![CDATA[Script]]></category>

		<guid isPermaLink="false">http://george.insideiphone.com/?p=627</guid>
		<description><![CDATA[The QNAP NAS (in my case TS-209 II) uses an embedded Linux, during the system startup, a clean runtime environment is restored, then customized configurations are copied over to the default files, this makes a more stable system. After boot, the /etc folder is on a ramdisk (/dev/ram0), thus you can&#8217;t modify it as you [...]]]></description>
			<content:encoded><![CDATA[<p>The QNAP NAS (in my case TS-209 II) uses an embedded Linux, during the system startup, a clean runtime environment is restored, then customized configurations are copied over to the default files, this makes a more stable system. After boot, the <i>/etc</i> folder is on a ramdisk (<i>/dev/ram0</i>), thus you can&#8217;t modify it as you usually do on a normal Linux.</p>
<p>If you wanna execute some custom scripts during system startup, you can&#8217;t simply edit <i>/etc/rc*.d</i> files because these files are on ramdisk. There&#8217;re some ways to let system execute your personal scripts during startup, the most dangerous way is to modify the <i>initrd</i> directly, in case you messed up something, your QNAP will be rendered useless unless doing a mtd restore through serial port.</p>
<p>I personally like to use pure software methods to do the trick.</p>
<h3>Method 1</h3>
<p>Utilize the <b>autorun.sh</b> script. This script is on <b>/dev/mtdblock5</b>, it is called each time system boots, so any modifications to it will take effect in the next reboot. To change its contents:</p>
<blockquote><pre>mount -o loop /dev/mtdblock5 /tmp/config</pre>
</blockquote>
<p>Then use your favorite editor to edit <i>/tmp/config/autorun.sh</i>, when you&#8217;re done, enter:</p>
<blockquote><pre>umount /tmp/config</pre>
</blockquote>
<p>This method is easy, but you can&#8217;t let the script do some cleanup before shutdown because the script is only called during system boot. If you would like some more controls, try the method shown below.</p>
<p><span id="more-627"></span><br />
<h3>Method 2</h3>
<p>QNAP supports QPKG packages, the system checks for installed QPKG applications and call their initializing scripts one by one, by taking control of the config file, we can make QNAP call our script during system boot and before system shutdown.</p>
<p>During system boot, a configuration file <b>/etc/config/qpkg.conf</b> is examined, the <i>Shell</i> item under each section will be converted to symbolic links in <i>/etc/init.d, /etc/rcS.d, as well as /etc/rcK_init.d</i> folders.</p>
<p>To modify <b>/etc/config/qpkg.conf</b>, add a new section (I&#8217;ll use MyPackage) to it, then add a Shell item under this section, like this:</p>
<blockquote><per>[MyPackage]<br />
Shell = /share/MD0_DATA/path_to_my_script/myscript.sh</pre>
</blockquote>
<p>During reboot, three symbolic links will be created:</p>
<blockquote><pre>/etc/init.d/myscript.sh -> /share/MD0_DATA/path_to_my_script/myscript.sh
/etc/rcS.d/QSxxxmyscript.sh -> /share/MD0_DATA/path_to_my_script/myscript.sh
/etc/rcK_init.d/QKxxxmyscript.sh -> /share/MD0_DATA/path_to_my_script/myscript.sh</pre>
</blockquote>
<p>The <b>QSxxxmyscript.sh</b> will be automatically executed during system boot, while the <b>QKxxxmyscript.sh</b> will be executed before system shutdown, this way we can do some specific jobs during system on and off.</p>
]]></content:encoded>
			<wfw:commentRss>http://george.insideiphone.com/index.php/2008/11/12/execute-custom-script-during-qnap-bootstrap/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Turn Your TS-209 II Into TS-209 Pro II (Risk-Free)</title>
		<link>http://george.insideiphone.com/index.php/2008/11/11/how-to-turn-ts-209-ii-into-ts-209-pro-ii/</link>
		<comments>http://george.insideiphone.com/index.php/2008/11/11/how-to-turn-ts-209-ii-into-ts-209-pro-ii/#comments</comments>
		<pubDate>Tue, 11 Nov 2008 09:08:36 +0000</pubDate>
		<dc:creator>George Zhu</dc:creator>
				<category><![CDATA[NAS]]></category>
		<category><![CDATA[QNAP]]></category>
		<category><![CDATA[TS-209 II]]></category>
		<category><![CDATA[TS-209 Pro II]]></category>

		<guid isPermaLink="false">http://george.insideiphone.com/?p=614</guid>
		<description><![CDATA[This post introduces an ideal and safe method to change a TS-209 II into a TS-209 Pro II, the basic idea is to fake the hardware type during system startup, thus make a perfect hack.
There&#8217;s a utility /sbin/config_util which is used for many purposes, including get/set hardware signatures, we&#8217;ll use it to change the box [...]]]></description>
			<content:encoded><![CDATA[<p>This post introduces an ideal and safe method to change a TS-209 II into a TS-209 Pro II, the basic idea is to fake the hardware type during system startup, thus make a perfect hack.</p>
<p>There&#8217;s a utility <b>/sbin/config_util</b> which is used for many purposes, including get/set hardware signatures, we&#8217;ll use it to change the box type.</p>
<h3>The Method</h3>
<p>SSH onto your TS-209 II, then enter:</p>
<blockquote><pre>mount -o loop /dev/mtdblock5 /tmp/config
cd /tmp/config</pre>
</blockquote>
<p><span id="more-614"></span>Now edit <b>autorun.sh</b>, add the following lines:</p>
<blockquote><pre>ln -s /sbin/config_util /sbin/set_hwtype
/sbin/set_hwtype 2</pre>
</blockquote>
<p>Then unmount the partition:</p>
<blockquote><pre>cd /
umount /tmp/config</pre>
</blockquote>
<p>Reboot the box, enjoy your TS-209 Pro II :D</p>
<p><b>NOTICE</b>: To examine if you&#8217;re running as TS-209 Pro II, go to Administration screen, check if you have the <i>AD</i> option in Microsoft Network section, and <i>NFS</i> in left panel.</p>
<p><b>NOTICE</b>: The NFS in TS-209 Pro II has some limitations, you can&#8217;t mount the exported filesystems on a Mac without some hacks, to make the exports mountable on OS X, take the following steps:</p>
<p>1. Setup your exports as usual (through QNAP&#8217;s web interface)<br />
2. Go to /etc/config, edit nfssetting, change the access options from <i>rw</i> to <i>rw,insecure,no_subtree_check</i><br />
3. Re-enable NFS service through web interface.</p>
<p>That&#8217;s it.</p>
<p><b>UPDATE</b>: After upgrading to firmware 2.1.2 build 1031T, this trick still works, check the following image:<br />
<a href="http://george.insideiphone.com/wp-content/uploads/2008/11/ts209pro.jpg"><img src="http://george.insideiphone.com/wp-content/uploads/2008/11/ts209pro.jpg" alt="" title="TS-209 Pro Administration Interface" width="500" height="154" class="alignnone size-full wp-image-623" /></a></p>
<p><b>UPDATE</b>: Another method is to create a file named <b>hw_type</b> with a single line of &#8216;0099&#8242; and put it into /dev/mtdblock5, then reboot. This may require reflashing with PRO firmware, tried it on 0904T non-PRO firmware and failed, succeeded with 1031T PRO firmware.</p>
<p><b>UPDATE</b>: Just did a byte-to-byte comparison between 1031T PRO and STD firmwares, they are the same. So I guess the only difference between two types are hidden in /dev/mtdblock0 ~ /dev/mtdblock5, maybe the <i>hw_type</i> is the key.</p>
]]></content:encoded>
			<wfw:commentRss>http://george.insideiphone.com/index.php/2008/11/11/how-to-turn-ts-209-ii-into-ts-209-pro-ii/feed/</wfw:commentRss>
		<slash:comments>47</slash:comments>
		</item>
		<item>
		<title>Enable AD Support on TS-209 II</title>
		<link>http://george.insideiphone.com/index.php/2008/11/09/enable-ad-support-on-ts-209-ii/</link>
		<comments>http://george.insideiphone.com/index.php/2008/11/09/enable-ad-support-on-ts-209-ii/#comments</comments>
		<pubDate>Sun, 09 Nov 2008 08:00:43 +0000</pubDate>
		<dc:creator>George Zhu</dc:creator>
				<category><![CDATA[NAS]]></category>
		<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[AD]]></category>

		<guid isPermaLink="false">http://george.insideiphone.com/?p=603</guid>
		<description><![CDATA[AD support is a feature available to QNAP TS-209 Pro II only. However, TS-209 II and TS-209 Pro II have exactly the same hardware specifications, the difference is in software. The two differences between a 209 II and a 209 Pro II are: support for NFS and AD (Active Directory).
I don&#8217;t know why QNAP sells [...]]]></description>
			<content:encoded><![CDATA[<p>AD support is a feature available to QNAP TS-209 Pro II only. However, TS-209 II and TS-209 Pro II have exactly the same hardware specifications, the difference is in software. The two differences between a 209 II and a 209 Pro II are: support for NFS and AD (Active Directory).</p>
<p>I don&#8217;t know why QNAP sells the same thing in two prices. However, since they are only different in softwares, why pay extra $85 for the two additional software features when you can enable them by yourself ? In my <a href="/index.php/2008/11/07/activate-nfs-support-on-qnap-ts-209-ii/">last post</a> I have described how to enable the NFS support on 209 II. This article describes how to enable the AD support on 209 II.</p>
<p><span id="more-603"></span>Login to 209 II, go to <u>Microsoft Networking</u> section, notice there&#8217;s no AD related topics there. Well, the AD support does exist on 209 II, it&#8217;s just disabled, we&#8217;ll enable it now. SSH to 209 II, then:</p>
<blockquote><pre>cd /home/httpd/cgi-bin/network/html
ls -l *_ms_*</pre>
</blockquote>
<p>you will see two items, as below:</p>
<blockquote><pre>-rw-r--r--    1 admin    administ      0 Sep  4 03:35 network_ms_main-std.html
-rw-r--r--    1 admin    administ    10840 Sep  4 03:35 network_ms_main.html</pre>
</blockquote>
<p>notice the first file has 0 bytes which is pretty strange right? Let&#8217;s change it:</p>
<blockquote><pre>rm network_ms_main-std.html
ln -s network_ms_main.html network_ms_main-std.html</pre>
</blockquote>
<p>Now, refresh the Microsoft Networking section in Administration page, the AD Domain Member section magically appears, you may configure and use it now, like in the following image:<br />
<a href="http://george.insideiphone.com/wp-content/uploads/2008/11/209_ii_ad_enabled.jpg"><img src="http://george.insideiphone.com/wp-content/uploads/2008/11/209_ii_ad_enabled.jpg" alt="" title="AD Enabled on 209 II" width="500" class="alignnone size-full wp-image-606" /></a></p>
<p>If you check around, you&#8217;ll see some other 0-byte files in the folder, I believe they&#8217;re NFS related, however, I can&#8217;t make the <u>Unix/Linux NFS</u> feature appear in Administration panel, don&#8217;t know why.</p>
]]></content:encoded>
			<wfw:commentRss>http://george.insideiphone.com/index.php/2008/11/09/enable-ad-support-on-ts-209-ii/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
