Re my Droid phone security lock - Possible combinations of 4 adjacent positions on a 3x3 grid?

Just curious.

My Motorola Droid has a built in security feature that consists of a simple 3x3 grid of circles or dots where you have to create a sequential 4 position pattern of adjacent positions on the grid to unlock the phone. In practice this is done by sliding your finger across 4 adjacent circles on the grid to make a unique, but easily entered line pattern that will unlock the phone.

You cannot go back to or cross over an already used dot, for example you could not do a square or an “X” figure or any pattern that crossed over or re-used a circle.

What are the total number of possible unique, adjacent 4 position line “codes” in this security setup?

Here’s a picture of the grid

Is a diagonal considered adjacent?

So it’s a 4-digit passcode, with nine digits to choose from - but the possibilities are cut down by requiring that they (a) be next to each other and (b) not be re-used?

I don’t know the answer to that, but surely a simple 4 digit passcode without those limits has more possibilities and is thus more secure?

No question, but I’m interested in how secure the existing scenario is.

Yes, you can shoot off in any available direction from the original dot as long as you don’t cross or touch a dot you have already used.

As a correction in looking at the grid you actually could do an “X” using 4 dots in a line without reusing or crossing over a used dot so I take back the no “X” comment.

I think the only limitation in which dot you can select next (apart from only being able to select each dot once) is that you can’t go from a dot on one side to a dot on the opposite side unless you’ve already selected the dot in between (otherwise it will treat it as though you’ve selected both of these dots rather than jumping the middle one).

So from any given dot, I think you can select:

  • Any directly adjacent dot you haven’t already selected (horizontally or diagonally)
  • A dot that’s 2 dots in one direction then one dot across from that (i.e. like a knight in chess)
  • A dot that’s 2 dots away in a straight line (i.e. from any corner to another corner, or any side to the opposite side) - but only if you’ve already selected the dot in between, else it will draw a line through both of these dots.

Uhhh…huh? How?

o o o
o o o
o o o

There’s the grid…how can you make this:

X o X
o X o
X o X

Without either jumping over or going back? Plus, you said 4…how do you make an X on a 3x3 grid with only 4 dots?

Ninja edit: Oh, I see…you’re making an ‘X’ with the negative space, i.e. the dots you don’t touch form the X…got it.




Not quite an actual X, but the path crosses in between the four numbers.

My HTC Desire has a similar grid but it is not limited to four dots. You can use all nine dot in any order - within the rules defined by Hallucinex. How to work out how many possible permutations this gives I have no idea! It must be less than the full 362880 (9!) but I would assume more that the 10000 possible with a four digit passcode.

According to this site, there are 1624 patterns of 4 dots (and the rules on that site are more relaxed than those stated above, allowing “knight moves” that skip an intermediate dot).

From a sheer number perspective, yes. But I think there’s a built in security in that it’s a LOT more difficult for some would-be hacker to test each line, putting them in an orderly sequence without repeating. By contrast, any first grader can tell you that after 1 comes 2, comes 3, comes 4…

Likewise, I’d imagine it is more difficult to program software that would put in lines until it cracked the code, versus programming a computer to test all numbers between 0000 and 9999.

Finally, were you to have BOTH types of software to crack either Androids and iPhones, the difference between 1624 and 9999 guesses would be a matter of minutes, if not seconds to a computer.

The 9-dot pattern is a convenient way to unlock, being just a little more intrusive than the left-to-right slide to unlock the screen on an unprotected iPhone. Usually you also have the option of requiring a full numeric password instead.

If you make too many mistakes (4 consecutive wrong patterns, I think), my HTC Magic will pout (= refuse to unlock for a few minutes, but still allow 911 and incoming calls). This compensates a bit for the limited password space.

Without doing the calcuation (I barely passed the one probability course that discussed permutations): I have a Droid X and I am NOT limited to 4 dots - I could theoretically go 1-2-3-6-5-4-7-8-9 or similar, requiring all 9 dots.

I actually wound up switching to a regular 4 digit passcode because I had trouble with how well it worked (or not) depending on the phone’s orientation (horizontal or landscape).

If you haven’t recently cleaned the screen, there’s likely to be smudges on it which will be in the shape of the pattern anyway.

I’m looking at mine right now. There are so many smudges on the glass surface of the phone touchscreen after using it discerning the path of the line code used to gain access before using it would be quite an accomplishment.

Well, I do often notice an identifiable streak on mine from the simple swipe (I’m not currently locking it). It stands out from the rest of the “background” finger marks. I’m sure if I had a pattern there would be a visible “figure 4” or something.

I have a Motorola Droid (original not 2 or 3) and somehow I’ve set my unlock code to be 5 dots. It’s been a long time since I set it, so I don’t remember exactly how, but could it be that you are allowed either 4 or 5 dots?

I have an htc incredible. You need at least 4 dots but can have up to all 9.