Android向けの無料ファイアウォール WisperCore について

Android向けの無料ファイアウォールアプリ登場 という記事があるのだが,Androidで通信的な部分を監視や処理しようと思えばrootが必要な気がする。
インストールしてみようとサイトにいくと,インストーラLinux向けはtar.gzで配布されてたりする。
http://www.whispersys.com/whispercore.html
ダウンロードして中身をみる。

whispercore-0.3
├── adb
│     ├── adb
│     └── fastboot
├── eula
│     ├── displayEula.sh
│     └── eula.txt
├── images
│     ├── boot.img
│     ├── recovery.img
│     ├── system.img
│     └── userdata.img
└── install.py

インストールの内容

こんなのインストールしてもいいものか?
インストール処理を行うスクリプトをみる。
install.py

#!/usr/bin/python
__author__ = "Whisper Systems"
__email__  = "info@whispersys.com"
__license__= " Copyright (c) 2011 Whisper Systems. All rights reserved."

import subprocess, sys, os, time

alreadyUnlocked = False

def displayWarning():
    subprocess.call("/usr/bin/clear")
    print "** WARNING **\n\nPlease read this carefully.\n\n"\
          "WhisperCore is experimental software and should not be used in cases where\n"\
          "security or stability are critical.\n\n"\
          "Installing WhisperCore will erase any existing apps, settings, and data on your\n"\
          "phone.\n\n"\
          "Whisper Systems does not currently provide an uninstall mechanism to revert to\n"\
          "your stock Android build.\n\n"\
          "Please backup any data you would like to save before continuing.\n"
    command = ""
    while (command != "Y" and command != "N"):
        command = raw_input("Continue? (Y/N): ")
        command = command.upper().strip()
    if (command == "N"):
        sys.exit()

def displayEula():
    subprocess.call(["/bin/sh", "-c",
                     "cat eula/eula.txt | less -e; exit 0"],
                    stderr=subprocess.STDOUT)
    command = ""
    subprocess.call("clear")
    while (command != "Y" and command != "N"):
        command = raw_input("Accept license? (Y/N): ")
        command = command.upper().strip()
    if (command == "N"):
        sys.exit()    

def startAdb():
    subprocess.call(["adb/adb", "start-server"])

def detectAdbDevice():
    subprocess.call("clear")
    print "Now we will attempt to detect your phone.\n\n"\
          "Please ensure that USB debugging is enabled:\n"\
          "(Settings->Applications->Development->USB debugging)\n\n"\
          "And that your phone is connected to your computer via USB."\
          "\n\n"

    raw_input("Press any key to continue.")
    
    while True:
        process = subprocess.Popen(["adb/adb", "devices"], stdout=subprocess.PIPE)
        output  = process.communicate()[0]

        if (output.count("\n") < 3):
            subprocess.call("clear")
            print "We were unable to detect your phone.  Please ensure that 'USB debugging'\n"\
                  "is enabled, or try disconnecting and reconnecting your phone to your computer.\n\n"
        elif (output.count("\n") > 3):
            subprocess.call("clear")
            print "It looks like you have more than one phone connected to your computer.\n"\
                  "Please disconnect any extra phones.\n\n"
        else:
            subprocess.call(["adb/adb", "reboot", "bootloader"])
            return
        raw_input("Press any key to try again.")

def detectFastbootDevice():
    subprocess.call("clear")
    print "Detecting bootloader..."
    while True:
        count = 0
        while count < 10:
            process = subprocess.Popen(["adb/fastboot", "devices"],
                                       stdout=subprocess.PIPE)
            output  = process.communicate()[0]
            if output.count("\n") > 1:
                subprocess.call("clear")
                print "It looks like you have more than one phone connected to your computer.\n"\
                      "Please disconnect any extra phones.\n\n"
                raw_input("Press any key to try again.")
                break;
            elif output.count("\n") == 1:
                return
            count += 1
            time.sleep(1)
        subprocess.call("clear")
        print "We were unable to detect your phone's bootloader. Try disconnecting and\n"\
              "reconnecting your phone to your computer.\n\n"
        raw_input("Press any key to try again.")

def unlockDevice():
    subprocess.call("clear")    
    print "We will now unlock your phone.  The phone will prompt you to confirm\n"\
          "your choice. Use the volume keys to make your selection.\n\n"
    raw_input("Press any key to unlock your phone.")
    while True:
        process = subprocess.Popen(["adb/fastboot", "oem", "unlock"],
                                   stdout=subprocess.PIPE,
                                   stderr=subprocess.STDOUT)
        output  = process.communicate()[0]
        if (output.find("Already Unlocked") != -1):
            alreadyUnlocked = True
            return
        if (output.find("OKAY") != -1):
            alreadyUnlocked = False
            return
        else:
            subprocess.call("clear")
            print "It looks like your phone failed to unlock.\n\n"
            raw_input("Press any key to try again.")

def relockDevice():
    subprocess.call(["adb/fastboot", "oem", "lock"])

def installWhisperCore():
    subprocess.call("clear")
    print "Installing WhisperCore:"
    print "Flashing boot image..."
    subprocess.call(["adb/fastboot", "flash", "boot", "images/boot.img"])
    subprocess.call("clear")
    print "Flashing recovery image..."
    subprocess.call(["adb/fastboot", "flash", "recovery", "images/recovery.img"])
    subprocess.call("clear")
    print "Flashing system image (this can take up to three minutes)..."
    subprocess.call(["adb/fastboot", "flash", "system", "images/system.img"])
    subprocess.call("clear")
    print "Flashing userdata image..."
    subprocess.call(["adb/fastboot", "flash", "userdata", "images/userdata.img"])
    subprocess.call("clear")
    print "Clearing cache..."
    subprocess.call(["adb/fastboot", "erase", "cache"])
    subprocess.call("clear")

def rebootDevice():
    print "Rebooting phone..."
    subprocess.call(["adb/fastboot", "reboot"])
    subprocess.call("clear")

def main(argv):
    if os.getuid() != 0:
        print "Sorry, you have to be root to run this installer."
        return
    displayWarning()
    displayEula()
    startAdb()
    detectAdbDevice()
    detectFastbootDevice()
    unlockDevice()
    installWhisperCore()
    if not alreadyUnlocked:
        relockDevice()
    rebootDevice()
    subprocess.call("clear")
    print "Congratulations! WhisperCore is installed and your phone will now reboot."    
if __name__ == '__main__':
    main(sys.argv[1:])

え!
処理順にコマンドとして並べてみると

adb start-server
adb reboot bootloader
fastboot oem unlock
fastboot flash boot images/boot.img
fastboot flash recovery images/recovery.img
fastboot flash system images/system.img
fastboot flash userdata images/userdata.img
fastboot erase cache
fastboot oem lock
fastboot reboot

adbコマンドを利用して,以下の処理を行っている。

  1. ブートローダ起動
  2. OEMロックを外す
  3. ブートイメージをFLASH
  4. リカバリイメージをFLASH
  5. システムイメージをFLASH
  6. ユーザデータイメージをFLASH
  7. キャッシュを削除
  8. OEMをロック
  9. 再起動

インストーラ起動時のコメント

** WARNING **
Please read this carefully.
WhisperCore is experimental software and should not be used in cases where security or stability are critical.

Installing WhisperCore will erase any existing apps, settings, and data on your phone.

Whisper Systems does not currently provide an uninstall mechanism to revert to your stock Android build.

Please backup any data you would like to save before continuing.
** 警告**
これを注意して読んでください。
WhisperCoreを実験用ソフトウェアであり、セキュリティか安定性が重要である場合に使用するべきではありません。
WhisperCoreをインストールすると、どんな既存のアプリケーション、設定、およびデータもあなたの電話で消されるでしょう。
Whisper Systemsが現在提供しない、Androidが組立てるストックに戻るためにメカニズムをアンインストールしてください。
実行する前に保存したいあらゆるデータのバックアップをとってください。