2012年3月29日木曜日

PC 上で Android アプリを楽しもう!—BlueStacks App Player for PC がベータ1に

BlueStacks は2012年3月26日、「App Player for PC」のベータ1を公開した、と発表した。Microsoft Windows XP/Vista/7に対応。日本語をサポートしている。

BlueStacks App Player for PC は、Android アプリを Windows PC 上で動作可能にするソフトウェア。今回公開されたベータ1には同社の特許出願中の技術「Layercake」が実装されており、 ARM チップ向けに作成された
Android アプリを x86 ベース PC 上で動作可能にしている。

多くの場合、Android アプリを PC 上で動作させる意味はあまりない。だが、ゲームなどでは、Android 版のほうが PC 版より安価な場合がある。また、スマートフォンの小さな画
面よりも、PC の大画面のほうが利用しやすいアプリも存在している。そのような場面では App Player for PC は有効だろう。

App Player for PC には、「おしゃべり猫のトム」などのいくつかの無料 Android
アプリが付属している。同ソフトウェアを試したい人には、App Player for PC 上でこれら無料アプリを使ってみるのもいい方法かもしれない。

また、同ソフトウェアには、BlueStacks によるクラウドサービス「Cloud Connect」も付属する。これを利用すれば、自分の Android スマートフォンから App Player for PC にアプリを
プッシュすることも可能。これも、同ソフトウェアを試してみるのにはいい機能といえる。

同ソフトウェアは未だベータ1段階にあり、バグはかなり残っているようだ。また、日本語メニューやメッセージにも、ローカライズ上の問題が散見される。だが、昨年出荷されたアルファ版よりも安定性が向上し、機能も追加されている。

iPhoneやiPad向けのアプリでは大丈夫なんでしょうか?

ややAndroidアプリが敬遠され始めているだなんて衝撃の指摘まで出されていましたけど、今度は実際に現在人気の無料アプリの数々が、バックグラウンドでユーザーの望まぬ形で消費電力を悪用しているのでは...なんて心配な発見が明らかにされたみたいですよ。

米国インディアナ州パデュー大学の研究チームによって発表された調査論文によると、例えば、Androidでも大人気のアングリーバードのアプリですが、同アプリの消費電力のうち、本当にゲームの実行に用いられているのはわずかに2割程度と指摘されています! あとの大半の電力消費はユーザーの現在位置をGPSで送信し、その場所に応じた無料広告をダウンロードするためにせっせと用いられちゃっているんだとか。同様の傾向はFacebook、無料のチェスやニューヨークタイムズなどなどのアプリでも観察されているそうですね...

今回の論文で問題視されているのは、ユーザーの知らないバックグラウンドで、どんどんとバッテリーが消費されていってしまっている事態もさることながら、あまりその現状にアプリ開発者が注意を払っていない点にも注意が喚起されているようです。ただでさえバッテリーの持ちが気になるスマホなので、やっぱりこういう指摘が事実なのだとしたら、勝手に広告のためにバッテリーが減っていく実態は改善されていってほしいですよね〜

2012年3月28日水曜日

Mozilla Releases HTML5 MMO BrowserQuest

"BrowserQuest is a tribute to classic video-games with a multiplayer twist. You play as a young warrior driven by the thrill of adventure. No princess to save here, just a dangerous world filled with treasures to discover. And it's all done in glorious HTML5 and JavaScript. Even better, it's open-source, so be sure to check out the source code on GitHub!"

2012年3月25日日曜日

AndroidのIntentをコマンドから投げる

こちらの記事にて初めて知ったのですが、AndroidのLinuxにはamというコマンドがあり、Intentをコマンドラインから投げることができます。
以下がヘルプです。
$ adb shell
# am
am
usage: am [start|instrument]
am start [-a <ACTION>] [-d <DATA_URI>] [-t <MIME_TYPE>]
[-c <CATEGORY> [-c <CATEGORY>] ...]
[-e <EXTRA_KEY> <EXTRA_VALUE> [-e <EXTRA_KEY> <EXTRA_VALUE> ...]

[-n <COMPONENT>] [-D] [<URI>]
am instrument [-e <ARG_NAME> <ARG_VALUE>] [-p <PROF_FILE>]
[-w] <COMPONENT>
#
例えば次のように直接アプリケーションを起動することができます。
# am start -n com.google.android.browser/com.google.android.browser.BrowserActivity
am start -n com.google.android.browser/com.google.android.browser.BrowserActivity
Starting: Intent { comp={com.google.android.browser/com.google.android.browser.BrowserActivity} }
上のとおりに入力するとブラウザが実行され、ホームページ(デフォルトではGoogle)が表示されるはずです。
上の実行はコンポーネントを直接実行しておりますが、ActionとDataを用いたIntentの特徴である疎結合な呼出も可能です。
例えば、
# am start -a android.intent.action.VIEW http://www.google.com
am start -a android.intent.action.VIEW http://www.google.com
Starting: Intent { action=android.intent.action.VIEW data=http://www.google.com}
上記ではhttpで始まるURIに対してVIEWを行うため、やはりブラウザが表示されGoogleが表示されます。
しかし、次のようにgeo:を使いますと、
# am start -a android.intent.action.VIEW geo:35.698683,139.774219
am start -a android.intent.action.VIEW geo:35.698683,139.774219
Starting: Intent { action=android.intent.action.VIEW data=geo:35.698683,139.774219 }
Mapsアプリが実行され、秋葉原駅周辺が表示されます。
geo:ではGETのqオプションが利用できますので以下のように地名を指定することも可能です。
# am start -a android.intent.action.VIEW geo:0,0?q=Tokyo
am start -a android.intent.action.VIEW geo:0,0?q=Tokyo
Starting: Intent { action=android.intent.action.VIEW data=geo:0,0?q=Tokyo }
Warning: Activity not started, its current task has been brought to the front
#
上記のように入力すると東京が表示されます。
なぜかしら代々木ですね。
ダイアログや吹き出しの表示は画面の下にあるバックキーを押すと消えます。


さらにACTIONにCALLを、URIにtel:を用いると、
# am start -a android.intent.action.CALL tel:88888888
am start -a android.intent.action.CALL tel:88888888
Starting: Intent { action=android.intent.action.CALL data=tel:88888888 }
#
電話がかけられることが確認できます。
エミュレータでは実際にかけることができませんが、通話が開始した状態になります。

自分で試してみたところ実行できるのはActivityであり、ServiceもIntentを用意してstartServiceにて実行するものの、このamコマンドでは実行できないようです。
自作のActivityの呼出はもちろん大丈夫でした。

Androidの着信音の設定は何処?

ちょっと気になって確認してみた所
android.media.RingtoneManager
android.media.Ringtone
あたりが着信音関連ですね。
adb shell から am start -a android.intent.action.RINGTONE_PICKER
すると着信音設定画面が起動できます。

Android開発-着信音の選択と再生

Androidで着信音の選択と取得と再生と

着信音を司るクラスがRingtoneManagerやRingtoneだっていうのは

楽勝でわかったけど、

どの着信音を選択したかを取得するかが難しかった

でもこれを読んだらぜんぜん簡単だった。

http://groups.google.co.jp/group/android-developers/browse_thread/thread/7820575ad844377f

作ったソースを晒します。

package com.tomorrowkey.android.test;

import android.app.Activity;
import android.content.Intent;
import android.media.Ringtone;
import android.media.RingtoneManager;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class MainActivity extends Activity {

private final static int REQUEST_CODE_RINGTONE_PICKER = 1;

Ringtone ringtone;
Button btnPlay;
Button btnStop;
Button btnSelectRingtone;

/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

//再生ボタン
btnPlay = (Button)findViewById(R.id.Button01);
btnPlay.setOnClickListener(new View.OnClickListener(){
@Override
public void onClick(View v) {
ringtone.play();
}
});

//停止ボタン
btnStop = (Button)findViewById(R.id.Button02);
btnStop.setOnClickListener(new View.OnClickListener(){
@Override
public void onClick(View v) {
ringtone.stop();
}
});

//着信音選択ボタン
btnSelectRingtone = (Button)findViewById(R.id.Button03);
btnSelectRingtone.setOnClickListener(new View.OnClickListener(){
@Override
public void onClick(View v) {
Intent intent = new Intent(RingtoneManager.ACTION_RINGTONE_PICKER);
startActivityForResult(intent, REQUEST_CODE_RINGTONE_PICKER);
}
});

//通常の着信音を選択する
Uri uri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_RINGTONE);
ringtone = RingtoneManager.getRingtone(this, uri);
}

@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data){
if(requestCode == REQUEST_CODE_RINGTONE_PICKER ){
if(resultCode == RESULT_OK){
Uri uri = data.getParcelableExtra(RingtoneManager.EXTRA_RINGTONE_PICKED_URI);
ringtone = RingtoneManager.getRingtone(this, uri);
}
}
}
}

Androidの着信音の設定は何処?

Androidでは、全体的に情報がsqlite3のデータベースで管理されているらしく、sqlite3のデータベースファイルは通常、拡張子が.dbになっているため、findで簡単に探すことが出来ます。

そこで、Androidの着信音の設定がどのように行われているのかを調べてみました。

Android全体に関わる設定は以下のデータベースに保存されています。

/data/data/com.android.providers.settings/databases/settings.db

 

systemというテーブルで、"name"カラムの値がringtoneのものです。デフォルトでは、"content://media/internal/audio/media/21″となっています。

次に、MusicアプリでSDカードイメージ上のMP3ファイルを着信音に設定した場合では、"content://media/external/audio/media/2″となっています。

恐らく、Androidのメディア管理がマルチメディアファイルを管理しているのでしょうから、いかにもmediaっぽい管理用の.dbを探します。

すると以下のフォルダにそれっぽい.dbファイルが見つかります。

Android携帯電話の内蔵フラッシュメモリに記録されているものがinternal、SDカードに保存されているものがexternalという.dbファイルで管理されているようです。

/data/data/com.android.providers.media/databases/

external-df8091c.db
external-1501371c.db
internal.db
external-ef70f1c.db

internal.dbを覗くと、テーブル名がaudio_metaで、_idが21の_dataが、/system/media/audio/ringtones/Ring_Classic_02.oggになっています。

 

次に日付が一番新しいexternal-ef70f1c.dbを開きます。

やはり同じようにテーブル名がaudio_metaで、_idが2の_dataが、/sdcard/Music/haruhiOP.mp3になっています。ずばりあっています。

 

そこで、↓のsystemというテーブルで、"name"カラムの値がringtoneの値を、"content://media/external/audio/media/2″から、強制的に、"content://media/internal/audio/media/21″に書き換えます。

/data/data/com.android.providers.settings/databases/settings.db

DDMSからCallしてみます。すると、着信音が変わりません。そこで、エミュレータを再起動します。すると、Android標準のデフォルトの呼び出し音に戻りました。大正解のようです。

また、直接データベースファイルを更新しても反映されないようですね。

ここら辺の情報って公式のドキュメントには全くないっぽいんですよね。androidのクラスを使えば、簡単に変更できるんでしょうけど。

受信すると入れ墨が振動する

携帯電話を提供する大手メーカーNokiaがこのほど、振動によって携帯電話の着信を知らせる入れ墨などの技術を開発した。

誰からの電話かわかる
携帯電話は着信時などに強い磁場を発生する。今回の技術はこの磁場に反応する磁性インクを用いたもの。

入れ墨として皮膚に埋め込むことで、携帯電話が着信した際には、振動で知ることができるという。

振動パターンを変えれば、誰からの着信か、あるいはメールやアプリの起動なのか、といった情報も肌で知ることが可能となる。

絵柄は不通の入れ墨と同じ
入れ墨の絵柄は、通常のものとまったく同じにできる。欧米風のタトゥーでもよいし、和風の「入れ墨」でもかまわない。

周囲が騒がしく、携帯の着信音が聞こえない状況や、あるいは静かすぎてマナーモードの振動音すら迷惑に感じられる状況などで有効だという。

Your SSID Isn't Hidden Forever

http://www.wi-fiplanet.com/tutorials/article.php/3576541/Your-SSID-Isnt-Hidden-Forever.htm

A common security practice among wireless network administrators is to disable Service Set Identifier (SSID) broadcasting on wireless access points or routers. The reason is that disabling SSID broadcasting is supposed to hide and protect their wireless network. Even if an individual knows there is a wireless network at a certain location, this person must know the SSID to establish a connection with the network.

Therefore, hiding the SSID by disabling SSID broadcasting helps to prevent others from connecting to the network. Don't let this give you a false sense of security, however. People with the right equipment can easily retrieve the SSID of the network.

The SSID Broadcasting Option

As a default configuration, the beacons sent from wireless access points or routers, which notify wireless clients of nearby networks, contain the SSID. The SSID, for example, shows up in Windows XP's list of available wireless networks.

However, when SSID broadcasting is disabled, the SSID isn't sent in the beacons. This keeps the network from showing up in Windows, and in the end, along with other security measures like encryption, it helps protect your wireless network.

As an example, imagine that Brian pops open his laptop in the local coffee shop right next to your office that you recently decked out with the newest 802.11g equipment. After booting into Windows XP, he views the available wireless networks. Your network doesn't show up, even though he's close enough to pick up a signal.

If you hadn't disabled SSID broadcasting in your office's network, Brian would see yours listed as an available wireless network. If your network isn't secured by encryption, Brain could connect through your network and access the Internet and any shared files on your computers.

Detecting a Non-Broadcasted SSID

Disabling SSID broadcasting from your wireless access point or router's beacons, however, doesn't prevent hackers or war drivers from detecting your wireless network and even the SSID. If Brian were a wireless hacker, he could open a legitimate software program such as AirMagnet, and easily find your network's SSID.

AirMagnet picks up the SSID from other packets sent from wireless devices on the network. The SSID is contained in the 802.11 association request, and in certain instances, the probe request and response packets as well, even though you have SSID broadcasting disabled. For example, the SSID of your network could be found by AirMagnet when a computer on your network is booted up and causes the wireless client to send an association request packet to the wireless access point to gain access to the network.

Hackers and wardrivers can also use tools like AirJack to reveal a hidden network's SSID on demand. These tools usually work by sending a spoofed 802.11 Deauthentication frame to a particular wireless client. This causes the wireless client to re-authenticate and re-associate with the access point. The tools can then quickly capture the SSID of the network from the association request frame.

In the Test Lab

To prove what I'm saying above is accurate, I'll share with you my experience in the Lab. Warning: Hard hats required beyond this point!

I booted up AirMagnet's Laptop Analyzer to verify that the test network was closed (SSID broadcasted disabled). As you can see in the figure (click for the full screen), the SSID isn't contained in the beacons. As expected, the SSID field is blank. 

I then captured packets while booting up my laptop. As you can see in this figure (click for full screen), the Association Request frame from the laptop's wireless client contains the SSID of the network, which isWirelessGuru. Now, that's a problem.

I also noticed that, occasionally, the wireless client on the seemingly hidden network would broadcast probe requests, and the access point would reply with the closed network's SSID. This scenario provides yet another way for wireless analyzers to pick up the hidden SSID. Probe responses are part of the active scanning method wireless clients use to find networks. Thus, a hacker can get the SSID immediately, without having to wait until a user connects to the network. Manufacturers implement scanning methods in different ways; the process won't be the same for all wireless clients.

Things to Remember

Okay, what do you really need to know about disabling SSID broadcasting? Keep the following in mind:

  • The disabling of SSID broadcasting may help secure your wireless network by hiding your network from casual users.
  • Readily available analysis tools will spot the network's SSID in a matter of time, no matter what you do.
  • Using the hidden SSID feature on your network doesn't excuse you from using other methods like WEP or WPA to further secure your network.

Just don't depend too much on disabling SSID broadcasting for securing your network.

Eric Geier is a computing and wireless networking author and consultant. He is employed with Wireless-Nets, Ltd., a consulting firm focusing on the implementation of wireless mobile solutions and training. He is an author of Geeks on Call - Wireless Networking: 5-Minute Fixes and Geeks on Call - PCs: 5-Minute Fixes, published by John Wiley & Sons.

Myth vs. reality: Wireless SSIDs

http://blogs.technet.com/b/steriley/archive/2007/10/16/myth-vs-reality-wireless-ssids.aspx

 

Do you ever wonder sometimes how it is that some ideas just won't die? Like the thought that not broadcasting your wireless network's SSID will somehow make you more secure? This is a myth that needs to be forcibly dragged out behind the woodshed, strangled until it wheezes its last labored breath, then shot several times for good measure.

Folks, there are fundamental differences between names, which are public claims of identities, and authenticators, which are secrets used to prove identities, and I've written extensively about this before. An SSID is a network name, not -- I repeat, not -- a password. A wireless network has an SSID to distinguish it from other wireless networks in the vicinity. The SSID was never designed to be hidden, and therefore won't provide your network with any kind of protection if you try to hide it. It's a violation of the 802.11 specificationto keep your SSID hidden; the 802.11i specification amendment (which defines WPA2, discussed later) even states that a computer can refuse to communicate with an access point that doesn't broadcast its SSID. And, even if you think your SSID is hidden, it really isn't. Let me explain.

All 802.11 wireless networks, regardless of the kind of operating system or encryption you might use, also emit unencrypted frames at times. One kind of unencrypted frame is an association frame. This is what a client computer, or "supplicant" in the 802.11 protocol vernacular, emits when it wants to join a wireless network. Contained within the frame, in clear text of course (since the frame is unencrypted), is the SSID of the network the supplicant wants to join.

Both Windows XP and Vista work best when your access points broadcast their SSIDs. XP really doesn't behave well at all with nonbroadcasting SSIDs. Vista has some added smarts to improve this a bit. Normally, Vista continually sends probe requests for nonbroadcasting networks. These probes are similar to unencrypted 802.11 association frames, and will generate clear-text responses from the access points if a nonbroadcasting network is present. You can reduce, but not entirely eliminate, these probes by configuring the wireless client to probe only for automatically-connected nonbroadcasting networks.

Both these behaviors make it very easy for an attacker to discover your SSID. The bad guy, perhaps a contractor or a guest in your facility, could run one of many wireless sniffer programs and simply capture the hundreds of association frames or probes that litter your air. No amount of "hiding" configured in your access points can prevent this kind of traffic interception.

So there you have it, simple SSID discovery. The old axiom remains true: security by obscurity is no security at all. Hiding an SSID will not hide a wireless network, so ignore any such advice -- and it's amazing how often I continue to see this. By the way, also ignore any advice that says to use MAC address filtering. It's amazingly trivial to spoof the MAC address of an allowed supplicant -- simply sniff the traffic, look at the MAC addresses, and use the neat little SMAC utility to change your MAC to one that's permitted.

Nonbroadcasting networks are not secure networks. The right way to secure a wireless network is to use protocols that are designed specifically to address wireless network threats. If you're still using WEP, either static or dynamic, I encourage you to move to WPA2 as soon as possible. For those of you at home running XP and have kept it updated, or if you're running Vista, then, you simply need to enable WPA2. We've got some additional guidance for home/small offices and for enterprise networks with certificate services or without. If you have hardware that's more than two years old and you can't upgrade it, check to see whether it supports WPA (an interim specification released before WPA2 was ratified). Both WPA and WPA2 are built on sound cryptographic principles, they're proven in the field, and they'll keep the bad guys out -- even when you're broadcasting your SSID to the world.

Non-Broadcast Wireless SSIDs Why hidden wireless networks are a bad idea

http://blogs.technet.com/b/networking/archive/2008/02/08/non-broadcast-wireless-ssids-why-hidden-wireless-networks-are-a-bad-idea.aspx
In Microsoft CTS Network support, we frequently need to troubleshoot wireless connectivity issues. These issues are always made more difficult to resolve in instances where the wireless network is hidden. We recommend that customers do not use non-broadcast or hidden SSIDs. It is a bad idea from both functionality and security standpoints.

What is a hidden wireless network?

It is possible to configure most wireless Access Points (AP) to not broadcast their SSID (Service Set Identifier). The intent of this feature is to prevent unauthorized users from being able to detect the wireless network from their wireless clients. APs send beacon frames to advertise capability information and parameter sets for the network. Turning off broadcasting on the AP does not prevent the beacon frame from being sent. The wireless AP still sends a beacon frame, but it is sent with the SSID value set to NULL.

An Analogy

Let's say I am planning a party, and I invite several friends from work. I tell them to meet me at my street address on Friday night. I will be grilling steaks and burgers out in the back yard, and they should just bring their favorite beer. Many of them plan to meet me at the designated time, and they let me know that they will arrive carrying various containers of beer.

On the night of the party I get a little nervous, because I just bought a whole bunch of steak and burgers. I live in a pretty sketchy neighborhood, and I don't want just anyone to walk in and eat the food, particularly if they haven't brought any beer to share. So I decide to implement a security measure.

Well, I guess I could lock the front door and wait until people arrived and rang the doorbell. Then I could look out the window and verify that the caller is an invited guest. I could speak with them and verify that they are who they say they are in the same way that Active Directory verifies users with MS-CHAPv2. I suppose I could issue written invitations to the guests and require that they present the invitation to a third party prior to even allowing them to ring the doorbell like with a PKI deployment. But I have another idea.

In the interest of security, I go out and tear the numbers off the front of my house and off the side of my mailbox. I go to the corner and uproot the street sign. Now nobody looking to crash the party can find my house because it has no identifier!

Well the guys from work arrive, some of them in my general neighborhood, but none of them can find my house because the identifying street name and number are missing. They have two choices now - either they can give up and forget about the party or start asking around for where my house is. Most of them roam about the area carrying beer and yelling out my address.

So let's say the local hoodlums are out, and they want to score some beer and steak. I didn't invite them to my house, but they can still see that it is a house. They can still smell the steak and burgers cooking, and now they can hear and see a bunch of guys carrying beers, yelling out my address and roaming aimlessly in search of the party. The party crashers can easily surmise what my address is in the unlikely event that this is of any interest to them.

This was a poor choice for a security measure.

Choosing not to broadcast the SSID of a wireless network does not make it undetectable. The SSID is still advertised in the probe requests sent out by wireless clients and in the responses to the probe requests sent by wireless APs.

If you manage a wireless Access Point and the network it connects to, you control the security associated with accessing it. You specify encryption methods such as AES or TKIP and authentication requirements such as PEAP-MS-CHAPv2, EAP-TLS or PEAP-TLS in order to secure the network. You can require a valid username and password, or require that clients present a certificate to a PKI (Public Key Infrastructure). The name of the network itself is only an identifier and is not a security element. In fact the name of the network has no bearing on security whatsoever from an encryption or authentication standpoint.

If the network name of a wireless network (SSID) is not broadcast, the clients must search for it with probe requests. So if you have one AP and 100 wireless devices, you partially limit exposure of the network name with one device while causing 100 devices to expose it instead. The probe frames sent by the clients advertise the SSID every 60 seconds, whether they are close to the actual AP or not. This means that instead of one device broadcasting the SSID in the immediate proximity of your network, you now have these 100 devices potentially advertising the SSID in every coffee shop, hotel, and airport they visit. The security vulnerability this exposes is worse the larger the wireless deployment is.

How does Windows XP deal with non-broadcast SSIDs?

In Windows XP or Server 2003, users can connect to non-broadcast networks by configuring a preferred wireless network either manually or through Group Policy. A non-broadcast network will not appear in the "Choose a wireless network" dialog box.

The wireless supplicant will look at all the available networks and try to match them up to the networks in its preferred list. If it finds a match set to automatic connection, a connection attempt will be made. If no match is found after comparing visible networks to the preferred list, it will start plumbing down each network in the preferred list from top to bottom. It will wait two seconds to see if a connection is made, then proceed to plumb down the next one in the list.

This process will allow the supplicant to connect to a hidden network if it is in range, but only if no other preferred networks are available and visible. Because of this, even if a non-broadcast network is at the top of the preferred list, it won't take priority over a broadcast network lower in the list.

In order to address this problem, you can apply Windows Server 2003 SP2 or the wireless update from KB article 917021 to Windows XP SP2 machines. This allows you to configure wireless networks as broadcast or as non-broadcast networks. You can also configure this new setting through Group Policy from a computer that is running Windows Vista. If a non-broadcast network is configured as preferred, the XP client will now probe for it every 60 seconds, in effect broadcasting the SSID of the network.

How does Windows Vista deal with non-broadcast SSIDs?

In Windows Vista and Server 2008, there is an additional configuration setting to specify whether a network is non-broadcast. Within the Wireless Network properties dialog, there is now a check box for "Connect even if the network is not broadcasting." This causes the supplicant to send probe requests for the network, and if it is in range it will be displayed in the list of available wireless networks.

These probe packets still occur every 60 seconds, regardless of whether the network is reachable, and this constitutes a security risk by probing for the SSID repeatedly. A malicious user could attract the client to an unauthorized AP simply by duplicating the SSID and settings learned from the probe packets.

Also, if a Windows Vista or Server 2008 client receives a beacon frame with the SSID set to NULL, it will add the network to the list of available networks with the name "Unnamed Network". This allows the user to manually connect to the network if it knows the correct SSID.

How It Breaks

The ability to connect to a non-broadcast SSID is a cooperative effort between the wireless supplicant and the wireless NIC driver. In order to take advantage of the improvements made to the supplicant in Vista, the wireless adapter driver must support these enhancements.

In order for the new process to work, the wireless driver must send the probe packet to the AP for the hidden SSID. We have seen that power settings defined on the NIC driver can influence whether the AP receives this probe. Sometimes setting the transmit power setting to maximum will allow the probes to reach the AP.

Currently there are several widely-distributed WLAN drivers which either do not support or do not work properly with the Vista method of dealing with non-broadcast SSIDs, including the Intel 3945ABG and the Broadcom 802.11g Network Adapters.

The Intel 3945ABG adapter is very widely distributed in current laptop models. The latest Intel driver provides improvement but does not address all issues with hidden SSIDs encountered when roaming or resuming from hibernation.

Broadcom does not show any unnamed networks, and they are not planning to fix this. One of the reasons, besides being low priority for them, is also to push customers to stop hiding the SSID, which creates a problem instead of solving it.

Windows Vista includes a warning to indicate that connecting to a hidden SSID is a bad idea from a security standpoint:



Non-broadcast SSIDs are not a valid security measure and actually make it easier for the SSID to be discovered since it forces clients to continuously probe for it.

Here is our official stance from Microsoft on Hidden SSIDs:

— From Wireless Product Manager Drew Baron: "We like to take every opportunity to dissuade the use of Hidden SSIDs as much as possible. For security reasons we strongly recommend against using hidden SSIDs" http://www.microsoft.com/technet/network/wifi/hiddennet.mspx

— Here is a link to an independent analysis from outside Microsoft: "Debunking the Myth of SSID Hiding" - http://www.icsalabs.com/icsa/docs/html/communities/WLAN/wp_ssid_hiding.pdf

— Input from Senior Security Strategist Steve Riley:
"It's a violation of the 802.11 specification to keep your SSID hidden; the 802.11i specification amendment ... even states that a computer can refuse to communicate with an access point that doesn't broadcast its SSID."
http://blogs.technet.com/steriley/archive/2007/10/16/myth-vs-reality-wireless-ssids.aspx

Connecting to a WiFi network with a hidden SSID

A question I often see regarding cell phones with WiFi capability is, "How do I connect my to a network with a hidden SSID?".

The best answer is you don't.

The WiFi standard calls for the SSID to be broadcast even though there are many devices computers, etc. that work with it off. Here are some discussions on the point:

カスタムROM導入手順

カスタムROMの種類

大別すると下記のカスタムROMがあります。
  • GingerBread
  • Sense HD
  • Sense
  • Non-Sense(AOSP)
  • MIUI
Desire Index - Everything Desire is here!からお好みのROMを探してzipをDL〜SDに保存してください。

バックアップ

まずはNandroidやTitanium Backupでバックアップしましょう。

Wipe

Sense系と非Sense系ではframeworkやシステムアプリのデータ構造が異なるため、異なるカスタムROMを導入するときなどにはリカバリでデータ領域を消去(wipe)する必要があります。 
RAならWipe>Wipe ALL userdata 
ClockworkModならwipe data/factory reset

Wipe onlyで下記データを個別にwipeすることもできます。
/data ユーザ設定やユーザアプリ等を消去
/sd-ext A2SD+化しているときのユーザアプリやDalvik-cacheを消去
/sdcard/.android_secure Froyo純正Apps2SDでSDに移動したアプリを消去
/cache 通常Desireでは特に意味はないが、N1TableでCM導入している場合などはシステムアプリのDalvik-cacheを消去
Dalvik-cache アプリのDalvik VM実行ファイル(.dex)を消去
battery stats バッテリー情報(設定>端末情報>電池使用量の情報)をリセット
rotate settings ローテーションセンサーをリセット(画面ローテート不具合時などに)
同じROMのバージョンアップデート時にはwipe不要な場合もありますが、何か不具合があったときにはとりあえずwipe dalvik-cacheしてみるのが吉です。wipeしてもdalvik-cacheは起動時に再生成されます。

Flash

SDにDLしたzipをカスタムリカバリからFlashします。 
RAならFlash zip from sdcard 
ClockworkModならinstall zip from sdcard>choose zip from sdcard

CyanogenModの場合

使用許可論争の結果、CyanogenModにはgoogle apps(gapps)が含まれておらずそのままではマーケットアプリ等を使うことが出来ません。 
gappsを追加flashしてください。 
なおCMアップデート時にはgappsは継承されるのでflashする必要はありません。 
また、デフォルトではA2SD非対応のためA2SD導入する場合は追加手順が必要です。

その他

build.prop追加

カスタムROMをそのまま導入するとSBMの基地局依存なのかやたらバッテリー消費が激しい場合があります。 
/system/build.propに下記プロパティを追加すると改善するようです。
ro.ril.enable.sbm.feature=1 
(いわゆる魔法の5行とか12行とか言われる中で最も重要なプロパティ)

またAOSP系カスタムROMではライブラリ(/system/lib/libhtc_ril.so)がこのプロパティに対応していないことが多いので、対応ライブラリに差し替える必要があります。

下記パッチを追加flashすると楽です。 
バッテリー消費改善(libhtc_ril.so更新&build.prop追記) Part2 727氏、782氏感謝 
※SBM Froyoのbuild.propからローカライゼーションで追加されているっぽい12行をカスタムROMのbuild.prop先頭に追加&libhtc_ril.soを上書きします。 
※ちなみに、build.propで二重定義されたプロパティは先に定義したものが優先されます。

フォント

  • /system/fonts/DroidSansJapanese.ttfを差し替えれば日本語フォントを変更できます。
  • DroidSans-Bold.ttfを消してDroidSans.ttfのsymlinkにしておくと日本語フォントもボールド表示可能になります。ただしフォントによっては正常にボールド表示できない場合もあるようです。
mount /system cd /system/fonts rm DroidSans-Bold.ttf ln -s DroidSans.ttf DroidSans-Bold.ttf 
  • /system/fonts/をDroidSansFallback.ttfを絵文字フォント追加版に差し替えれば、MMSアプリ以外でも絵文字を表示することができます(但しモノクロ)。SBM絵文字追加Fallbackフォントzipを追加flashすると楽。

リストア

Titanium BackupでアプリやAPN、ブラウザのブックマーク、SMS/MMSなどをリストアできます。 
ただしSense系と非Sense系ではデータ非互換だったりするので、適宜他のバックアップアプリとか使ってください。

リンク

HTC公式 開発者用

Official HTC Desire Android 2.3 Upgrade for Developer 
 http://www.htcdev.com/

カスタムロム

CyanogenMod Desire GSM 
 http://forum.cyanogenmod.com/forum/118-htc-desire-cdma/ 
 http://forum.xda-developers.com/showthread.php?t=1157949 
MIUI-XJ 
 http://htcfanboys.com/index.php?app=downloads&showcat=7 
 http://forum.xda-developers.com/showthread.php?t=957291 
Redux 
  http://forum.xda-developers.com/showthread.php?t=1229003 
Oxygen 
 http://forum.oxygen.im/ 
 http://forum.xda-developers.com/showthread.php?t=1353861 
RevolutioN 
 http://forum.xda-developers.com/showthread.php?t=1300224 
Official RUU Desire Sense Gingerbread 
 http://forum.xda-developers.com/showthread.php?t=1151765 
Runnymede AIO 
 http://forum.xda-developers.com/showthread.php?t=1315961 
RunnymedeMod007 
 http://forum.xda-developers.com/showthread.php?t=1318370 
AceSMod007 
 http://forum.xda-developers.com/showthread.php?t=1113070 
Cool3D AceS 
 http://forum.xda-developers.com/showthread.php?t=1040121 
dGB 
 http://forum.xda-developers.com/showthread.php?t=1227419 
Alex 
 http://forum.xda-developers.com/showthread.php?t=872464 
Ginger Villain 
 http://forum.xda-developers.com/showthread.php?t=880465 
Aurora 
 http://forum.xda-developers.com/showthread.php?t=1268279 
RCMix HD 
 http://forum.xda-developers.com/showthread.php?t=984822

リカバリーイメージ


Alpharev 
 http://alpharev.nl/ 
unrevoked 
 http://unrevoked.com/ 
Revolutionary 
 http://revolutionary.io/