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

**URL:** <https://boards.straightdope.com/t/re-my-droid-phone-security-lock-possible-combinations-of-4-adjacent-positions-on-a-3x3-grid/608370>\
**Category:** Factual Questions\
**Created:** [January 4, 2012, 11:49am UTC](https://boards.straightdope.com/t/re-my-droid-phone-security-lock-possible-combinations-of-4-adjacent-positions-on-a-3x3-grid/608370 "2012-01-04T11:49:00Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![astro](https://avatars.discourse-cdn.com/v4/letter/a/9dc877/32.png) [@astro](https://boards.straightdope.com/u/astro)\
**Post date:** [January 4, 2012, 11:49am UTC](https://boards.straightdope.com/t/re-my-droid-phone-security-lock-possible-combinations-of-4-adjacent-positions-on-a-3x3-grid/608370/1 "2012-01-04T11:49:00Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![astro](https://avatars.discourse-cdn.com/v4/letter/a/9dc877/32.png) [@astro](https://boards.straightdope.com/u/astro)\
**Post date:** [January 4, 2012, 12:08pm UTC](https://boards.straightdope.com/t/re-my-droid-phone-security-lock-possible-combinations-of-4-adjacent-positions-on-a-3x3-grid/608370/2 "2012-01-04T12:08:49Z")

</div>

[Here’s a picture of the grid](http://android.stackexchange.com/questions/7559/how-do-i-use-a-pattern-to-unlock-the-phone-screen/7560#7560)

---

<div class="post-metadata">

**Author:** ![Monty](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/monty/32/47_2.png) [@Monty](https://boards.straightdope.com/u/Monty)\
**Post date:** [January 4, 2012, 12:47pm UTC](https://boards.straightdope.com/t/re-my-droid-phone-security-lock-possible-combinations-of-4-adjacent-positions-on-a-3x3-grid/608370/3 "2012-01-04T12:47:53Z")

</div>

Is a diagonal considered adjacent?

---

<div class="post-metadata">

**Author:** ![Candyman74](https://avatars.discourse-cdn.com/v4/letter/c/ad7895/32.png) [@Candyman74](https://boards.straightdope.com/u/Candyman74)\
**Post date:** [January 4, 2012, 12:48pm UTC](https://boards.straightdope.com/t/re-my-droid-phone-security-lock-possible-combinations-of-4-adjacent-positions-on-a-3x3-grid/608370/4 "2012-01-04T12:48:02Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![astro](https://avatars.discourse-cdn.com/v4/letter/a/9dc877/32.png) [@astro](https://boards.straightdope.com/u/astro)\
**Post date:** [January 4, 2012, 1:23pm UTC](https://boards.straightdope.com/t/re-my-droid-phone-security-lock-possible-combinations-of-4-adjacent-positions-on-a-3x3-grid/608370/5 "2012-01-04T13:23:08Z")

</div>

> [@Candyman74](#):
>
> 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.

---

<div class="post-metadata">

**Author:** ![astro](https://avatars.discourse-cdn.com/v4/letter/a/9dc877/32.png) [@astro](https://boards.straightdope.com/u/astro)\
**Post date:** [January 4, 2012, 1:25pm UTC](https://boards.straightdope.com/t/re-my-droid-phone-security-lock-possible-combinations-of-4-adjacent-positions-on-a-3x3-grid/608370/6 "2012-01-04T13:25:02Z")

</div>

> [@Monty](#):
>
> Is a diagonal considered adjacent?

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.

---

<div class="post-metadata">

**Author:** ![astro](https://avatars.discourse-cdn.com/v4/letter/a/9dc877/32.png) [@astro](https://boards.straightdope.com/u/astro)\
**Post date:** [January 4, 2012, 1:29pm UTC](https://boards.straightdope.com/t/re-my-droid-phone-security-lock-possible-combinations-of-4-adjacent-positions-on-a-3x3-grid/608370/7 "2012-01-04T13:29:37Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Hallucinex](https://avatars.discourse-cdn.com/v4/letter/h/ba9def/32.png) [@Hallucinex](https://boards.straightdope.com/u/Hallucinex)\
**Post date:** [January 4, 2012, 1:59pm UTC](https://boards.straightdope.com/t/re-my-droid-phone-security-lock-possible-combinations-of-4-adjacent-positions-on-a-3x3-grid/608370/8 "2012-01-04T13:59:53Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![bouv](https://avatars.discourse-cdn.com/v4/letter/b/bc8723/32.png) [@bouv](https://boards.straightdope.com/u/bouv)\
**Post date:** [January 4, 2012, 3:11pm UTC](https://boards.straightdope.com/t/re-my-droid-phone-security-lock-possible-combinations-of-4-adjacent-positions-on-a-3x3-grid/608370/9 "2012-01-04T15:11:07Z")

</div>

> [@astro](#):
>
> 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.

Uhhh..huh? How?

```auto

o o o
o o o
o o o

```

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

```auto

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.

---

<div class="post-metadata">

**Author:** ![Mangetout](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/mangetout/32/19_2.png) [@Mangetout](https://boards.straightdope.com/u/Mangetout)\
**Post date:** [January 4, 2012, 3:27pm UTC](https://boards.straightdope.com/t/re-my-droid-phone-security-lock-possible-combinations-of-4-adjacent-positions-on-a-3x3-grid/608370/10 "2012-01-04T15:27:51Z")

</div>

> [@bouv](#):
>
> Uhhh..huh? How?

or

```auto

123
456
789

```

5-9-8-6

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

---

<div class="post-metadata">

**Author:** ![MarcusF](https://avatars.discourse-cdn.com/v4/letter/m/67e7ee/32.png) [@MarcusF](https://boards.straightdope.com/u/MarcusF)\
**Post date:** [January 4, 2012, 4:09pm UTC](https://boards.straightdope.com/t/re-my-droid-phone-security-lock-possible-combinations-of-4-adjacent-positions-on-a-3x3-grid/608370/11 "2012-01-04T16:09:22Z")

</div>

> [@Candyman74](#):
>
> 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?

> [@Hallucinex](#):
>
> 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.

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.

---

<div class="post-metadata">

**Author:** ![Heracles](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/heracles/32/487_2.png) [@Heracles](https://boards.straightdope.com/u/Heracles)\
**Post date:** [January 4, 2012, 5:50pm UTC](https://boards.straightdope.com/t/re-my-droid-phone-security-lock-possible-combinations-of-4-adjacent-positions-on-a-3x3-grid/608370/12 "2012-01-04T17:50:23Z")

</div>

According to [this site](http://beust.com/weblog/2008/09/17/androids-locking-pattern/), 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).

---

<div class="post-metadata">

**Author:** ![Enderw24](https://avatars.discourse-cdn.com/v4/letter/e/ba9def/32.png) [@Enderw24](https://boards.straightdope.com/u/Enderw24)\
**Post date:** [January 4, 2012, 5:59pm UTC](https://boards.straightdope.com/t/re-my-droid-phone-security-lock-possible-combinations-of-4-adjacent-positions-on-a-3x3-grid/608370/13 "2012-01-04T17:59:55Z")

</div>

> [@Candyman74](#):
>
> 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?

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.

---

<div class="post-metadata">

**Author:** ![Heracles](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/heracles/32/487_2.png) [@Heracles](https://boards.straightdope.com/u/Heracles)\
**Post date:** [January 4, 2012, 6:13pm UTC](https://boards.straightdope.com/t/re-my-droid-phone-security-lock-possible-combinations-of-4-adjacent-positions-on-a-3x3-grid/608370/14 "2012-01-04T18:13:36Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Mama\_Zappa](https://avatars.discourse-cdn.com/v4/letter/m/71e660/32.png) [@Mama\_Zappa](https://boards.straightdope.com/u/Mama_Zappa)\
**Post date:** [January 4, 2012, 8:22pm UTC](https://boards.straightdope.com/t/re-my-droid-phone-security-lock-possible-combinations-of-4-adjacent-positions-on-a-3x3-grid/608370/15 "2012-01-04T20:22:50Z")

</div>

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).

---

<div class="post-metadata">

**Author:** ![yabob](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/yabob/32/2821_2.png) [@yabob](https://boards.straightdope.com/u/yabob)\
**Post date:** [January 4, 2012, 8:35pm UTC](https://boards.straightdope.com/t/re-my-droid-phone-security-lock-possible-combinations-of-4-adjacent-positions-on-a-3x3-grid/608370/16 "2012-01-04T20:35:51Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![astro](https://avatars.discourse-cdn.com/v4/letter/a/9dc877/32.png) [@astro](https://boards.straightdope.com/u/astro)\
**Post date:** [January 4, 2012, 10:27pm UTC](https://boards.straightdope.com/t/re-my-droid-phone-security-lock-possible-combinations-of-4-adjacent-positions-on-a-3x3-grid/608370/17 "2012-01-04T22:27:17Z")

</div>

> [@yabob](#):
>
> 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.

---

<div class="post-metadata">

**Author:** ![yabob](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/yabob/32/2821_2.png) [@yabob](https://boards.straightdope.com/u/yabob)\
**Post date:** [January 5, 2012, 2:59pm UTC](https://boards.straightdope.com/t/re-my-droid-phone-security-lock-possible-combinations-of-4-adjacent-positions-on-a-3x3-grid/608370/18 "2012-01-05T14:59:15Z")

</div>

> [@astro](#):
>
> 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.

---

<div class="post-metadata">

**Author:** ![LaurenIpsum](https://avatars.discourse-cdn.com/v4/letter/l/7993a0/32.png) [@LaurenIpsum](https://boards.straightdope.com/u/LaurenIpsum)\
**Post date:** [January 5, 2012, 3:35pm UTC](https://boards.straightdope.com/t/re-my-droid-phone-security-lock-possible-combinations-of-4-adjacent-positions-on-a-3x3-grid/608370/19 "2012-01-05T15:35:44Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![gazpacho](https://avatars.discourse-cdn.com/v4/letter/g/6f9a4e/32.png) [@gazpacho](https://boards.straightdope.com/u/gazpacho)\
**Post date:** [January 5, 2012, 4:05pm UTC](https://boards.straightdope.com/t/re-my-droid-phone-security-lock-possible-combinations-of-4-adjacent-positions-on-a-3x3-grid/608370/20 "2012-01-05T16:05:59Z")

</div>

> [@LaurenIpsum](#):
>
> 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.
