Welcome to Tesla Motors Club
Discuss Tesla's Model S, Model 3, Model X, Model Y, Cybertruck, Roadster and More.
Register

Android users: phone-as-key FIX

Did the fix I presented in my post resolve your Android phone-as-key issues?

  • Yes, works perfectly or near-perfectly now!

    Votes: 5 11.4%
  • It is an improvement, but I still have have issues sometimes.

    Votes: 10 22.7%
  • I don't really see a difference from before.

    Votes: 20 45.5%
  • This "fix" seems to have made it worse.

    Votes: 0 0.0%
  • I don't need this fix. My Android phone has always worked flawlessly with the car.

    Votes: 9 20.5%

  • Total voters
    44
This site may earn commission on affiliate links.

nvx1977

Unknown Member
Nov 25, 2017
3,139
7,389
NH, MA
TL;DR: if you have an Android phone that has a fairly new version of Android, turning off battery optimization for the Tesla App will very likely significantly improve your phone-as-key functionality. Credit to @insaneoctane for the tip.

Background
I have the original Google Pixel running Android v8.1. I've had my Model 3 for a little over a month now, and the phone-as-key feature has not been working very well. I found that I frequently had to toggle bluetooth or airplane mode to get the BLE connection with the car fixed. I'd say it failed between 25-50% of the time I got into the car. In addition, ever since I got the car, my battery life has suffered a bit. I'd frequently need to charge my phone in the evening, whereas before the car, I could comfortably make it through the day.

Previous workarounds
Whenever the car wouldn't detect my phone, I would pull the phone out of my pocket and toggle BT off/on. Most of the time, that would fix things, but every once in a while, I'd have to toggle Airplane mode to fix it. Alternatively, rebooting the screen would resolve things too, but that takes too much time.

The fix that worked
In this thread, @insaneoctane writes:
I had some weird phone/key issues getting into the car in the Tesla parking lot. I wasn’t sure if that was the beginning of problems to come or not. I quickly set the Tesla app to “not optimize” in the Android settings, so that the app could run in the background.

This was something I hadn't tried yet, and I was out of things to try, so I tried it. And phone-as-key has been flawless. Today, I probably got in my car around 8 times to drive, and each time, as soon as I pressed the brake, the car responded. I don't have walk-away-lock enabled, but that has had no impact on past success rate, whether enabled or not. This evening, at random intervals of at least 15 minutes, I went into the garage and stepped on the brake. Each time the car was in sleep, and each time, the car detected the phone. I've now gotten into the car probably a total of 20 times and gotten 20 successful detections. I'd say that given my old track record of only 50-75% chance of success, this single (and only) change is responsible for the improvement.

Step-by-step instructions
The following is the procedure for my Google Pixel running Android v8.1. If you are on a different version and/or have a different OEM, the procedure might be slightly different. And I would imagine that if you're on a very old version of Android, this procedure might be completely irrelevant.

Step 1: Find the Tesla app and long press on the icon. An "App info" option appears. Select that.

Step 2: Tap on "Battery". This now shows you a new page of battery info specific to the app.

Step 3: Scroll all the way down and tap on "Battery optimization." You're now on a page that shows apps and services that are not battery optimized. the goal is to add the Tesla app to this list.

Step 4: At the top of the screen, tap the "Not optimized" dropdown menu and choose "All apps"

Step 5: Scroll down and find the Tesla app. Tap it. You should now have a modal window with two radio button selections: "Optimize" and "Don't optimize."

Step 6: Tap the "Don't optimize" radio option and press DONE.

And that's it! To verify that you did the above correctly: tap on the dropdown at the top of the screen (it should still be on "All apps") and select "Not optimized." Scroll down the list and make sure the Tesla app is there. If it is, you're all set.

For good measure, toggle Airplane mode on and off.

Now your phone-as-key should be working much better, assuming you were having issues before. If you were also noticing battery degradation before, monitor your usage post-fix. Today, my battery lasted all day, which seems to indicate that this fix also resolved the excessive battery drain. 2 birds, 1 stone.

I recently read in another thread that the latest Tesla app solved all phone-as-key issues. But I checked the Play Store and I don't see any updates for the Tesla app. Anyway, if this fix works for you, respond to the poll.

This fix will not resolve weak signal issues, like a phone in jean pockets. For that, you have to pull your phone out. Keep that in mind as you tally success/failure counts. We're talking about a fix for completely broken BLE connections.
 
Last edited:
What if I'm on 5.1.1 and update says "I'm current"? A long touch on the app only gives an option to "remove".

It means that your phone is likely too old to support later versions of Android, or your OEM has chosen not to provide anymore updates for your model. v5 of Android was Lollipop; i don't believe there was support for battery optimization so this fix wouldn't apply. If my google search is to be trusted, battery optimization was introduced in Android v6 - Marshmallow.
 
still flawless! It's been so reliable that I turned on walk-away lock again. I have kids, so I hated having to walk around the car to get to the driver side B-pillar just to unlock the car. Now that the phone is working, I can open any door from any side.

You didn't have walk-away lock turned on? So was your success being measured only by the ability to start the car by pressing the brake pedal and not by unlocking and opening the doors? I really wouldn't be surprised if you start noticing it fail now and find yourself locked out of your car. We have the exact same phone and mine is currently stripped pretty bare of apps, so it's strange that whatever you're doing isn't working on mine.
 
You didn't have walk-away lock turned on? So was your success being measured only by the ability to start the car by pressing the brake pedal and not by unlocking and opening the doors? I really wouldn't be surprised if you start noticing it fail now and find yourself locked out of your car. We have the exact same phone and mine is currently stripped pretty bare of apps, so it's strange that whatever you're doing isn't working on mine.

I disabled walk-away-lock because of all the failures. It was just too much of an inconvenience to have to walk to the driver's side to unlock the car, especially when the car is at home in my garage.

It's been a day with the walk-away lock on, and still flawless operation.
 
I disabled walk-away-lock because of all the failures. It was just too much of an inconvenience to have to walk to the driver's side to unlock the car, especially when the car is at home in my garage.

It's been a day with the walk-away lock on, and still flawless operation.

Can you pay attention to what happens over the next little while if you walk out of Bluetooth range of your car, allow it to lock, then go back to open/unlock the car? If this isn't something you do normally, you might not be exposing yourself to one of the failure points as often as I am, so it's not affecting you.

For example, going grocery shopping, if I've been inside the store a while and go the the trunk, it will pretty much unlock every time. After I put the groceries in the trunk and close it, if I walk far enough away (say to return a shopping cart) so that the doors lock, then try to get back in the car again, the phone key will not reconnect at least half the time. It will ask for the key card to open the doors, or it will unlock the doors, then ask me for the key card to start the car.
 
  • Like
Reactions: JasonCinOtt
Can you pay attention to what happens over the next little while if you walk out of Bluetooth range of your car, allow it to lock, then go back to open/unlock the car? If this isn't something you do normally, you might not be exposing yourself to one of the failure points as often as I am, so it's not affecting you.

For example, going grocery shopping, if I've been inside the store a while and go the the trunk, it will pretty much unlock every time. After I put the groceries in the trunk and close it, if I walk far enough away (say to return a shopping cart) so that the doors lock, then try to get back in the car again, the phone key will not reconnect at least half the time. It will ask for the key card to open the doors, or it will unlock the doors, then ask me for the key card to start the car.

Hmm, does this scenario qualify for a test of the scenario you described:

New day: the car is locked inside my garage. I walk up and open a door to get my kid in the car. Works fine. I drive to school. I get my kid out of the car, walk my kid into school. Meanwhile the car has self-locked. When I come back, you're expecting me to find that the car won't unlock for me about 50% of the time? In this scenario, I have not encountered any problems.

I also just tried the following 5 times in the garage (maybe not valid tests, but curious to hear your thoughts): I unlock the door by pressing on the handle. It opens, I get in, put the car into R, roll back an inch, then put the car into D, roll forward an inch, and then put the car in P. This is to simulate a drive. I get out and go in the house, but I don't close the house door so I can hear the side mirrors retract. Once I hear it, I walk back to the garage and open the car via door handle. Didn't get a failure in my 5 attempts.

Now, I will report a failure with phone as key yesterday. I toggled airplane mode and was able to fix, but upon entering the car, I noticed other functionality not working: the car indicated that there was an A2DP connection established, and it could show me what was playing, but there was no sound. Ultimately I had to reboot the screen to get music working (I doublechecked volumes, disconnected and reconnected the phone). So in that situation, the phone-as-key failure feels like a Tesla firmware glitch, rather than any sort of Android incompatibility issue.

I actually think that I might not be hitting as many failures as other people because of my overall phone usage. I'm not a heavy mobile user. I check email, send a couple texts, and read my google news feed. And I play music from my phone via A2DP. that's the typical day. I don't think I'm stressing system resources enough for the OS to need to manage things much.

I'm also on Project Fi for carrier, if that matters at all.
 
Hmm, does this scenario qualify for a test of the scenario you described:

New day: the car is locked inside my garage. I walk up and open a door to get my kid in the car. Works fine. I drive to school. I get my kid out of the car, walk my kid into school. Meanwhile the car has self-locked. When I come back, you're expecting me to find that the car won't unlock for me about 50% of the time? In this scenario, I have not encountered any problems.

I also just tried the following 5 times in the garage (maybe not valid tests, but curious to hear your thoughts): I unlock the door by pressing on the handle. It opens, I get in, put the car into R, roll back an inch, then put the car into D, roll forward an inch, and then put the car in P. This is to simulate a drive. I get out and go in the house, but I don't close the house door so I can hear the side mirrors retract. Once I hear it, I walk back to the garage and open the car via door handle. Didn't get a failure in my 5 attempts.

Walk-away lock works on a timer, I believe, not on Bluetooth connection. If you close all of your doors and stand right next to the car, it will still lock. So you could still be within Bluetooth LE range of the car when performing those tests and not know it because our phone doesn't indicate an active connection by Bluetooth LE, only traditional Bluetooth.

I will backtrack and say "half of the time" is probably overstated. I can do the same as you did in your garage simulating a drive and it will work a bunch of times in a row to the point where I can't get it to fail, and I don't know if I would really consider all of those independent events. When I'm out shopping as above or running to my mailbox kiosk (where I have to park in a parking space and walk to my mailbox just out of Bluetooth range), this is when the failures happen and it's happening too often.

Your first scenario is more of where I'd expect to see issues eventually, but it depends on how long you are away from the car and how far you've walked away from it. This issue seem to come up with a short intervals away from the car at the edges of Bluetooth range, like the Bluetooth signal degrades but isn't able to reconnect immediately and the phone is waiting for some internal timeout to reset the Bluetooth radio first.

Now, I will report a failure with phone as key yesterday. I toggled airplane mode and was able to fix, but upon entering the car, I noticed other functionality not working: the car indicated that there was an A2DP connection established, and it could show me what was playing, but there was no sound. Ultimately I had to reboot the screen to get music working (I doublechecked volumes, disconnected and reconnected the phone). So in that situation, the phone-as-key failure feels like a Tesla firmware glitch, rather than any sort of Android incompatibility issue.

I've seen this as well and I've had it happen on other Bluetooth devices, particularly a speaker that I have. I think this is more of a traditional Bluetooth glitch instead of Bluetooth LE. Toggling Bluetooth on the phone is usually all it takes, but you're probably right that there's also a Tesla side issue if you have to reboot the car.
 
For anyone using a recent Samsung Galaxy phone, there are a couple equivalent things you can do:
  • In settings go to apps, find the Tesla app, and check to make sure it has been granted all permissions, and also on the Tesla app page find 'Apps that can change system settings', go into that and turn on 'Allow Permission'. In the example it gives it actually mentions the ability for the app to directly turn Bluetooth on or off to be something granted by that, so if Tesla has given the app the smarts to do that it will allow it to control Bluetooth w/o manual intervention.
  • Under Settings / Device Maintenance / Battery find the section marked 'Unmonitored apps' and add the Tesla app to it. Any app on this list gets a free pass to do whatever it wants in terms of power. (And while you're there maybe see if any Samsung or other apps have snuck on there that you don't WANT to be on there and delete them.)
 
  • Informative
  • Like
Reactions: Blu-Ion and nvx1977
Walk-away lock works on a timer, I believe, not on Bluetooth connection. If you close all of your doors and stand right next to the car, it will still lock.

Hmm, before I did my garage tests, I did a test for exactly this. I did my fake-drive procedure the got out of the car and closed the door. I stood right next to the driver's side door for 2 minutes. the car never locked, although during that time, I heard some other clicks and pops that indicated other running systems had shut down (screen, A/C fan, etc). Finally I walked into the house and I heard the side mirrors retract about 5 seconds later.

After that, I did my tests, where I got out of the car and stepped away immediately, and about 5 seconds after entering the house, the mirrors retracted.

So I think the car IS still detecting proximity and being smart about not locking when you're close by, in case you're just walking around to another door or trunk, etc. That said, I have had the car lock on me when I was close by. My guess is that the signal weakened a bit and it thought I was further away. I think we see evidence of unreliable proximity estimations by the car due to jeans, body, etc. The car certainly is capable of proximity via signal strength, since the doors used to unlock on approach.

As far as the issue being caused by that threshold distance where signal is barely too weak, yeah maybe with more usage I'll start encountering that. I'll let you know.

The other thought I had is that even for a given phone like the Pixel, sometimes certain pieces of hardware are from different manufacturers, like the BT radio, or even the display, depending on the build batch. So it's quite possible that we have different hardware where one plays nice with Tesla and another doesn't....
 
Hmm, before I did my garage tests, I did a test for exactly this. I did my fake-drive procedure the got out of the car and closed the door. I stood right next to the driver's side door for 2 minutes. the car never locked, although during that time, I heard some other clicks and pops that indicated other running systems had shut down (screen, A/C fan, etc). Finally I walked into the house and I heard the side mirrors retract about 5 seconds later.

I realized it's my Tasker workaround that resets the phone's Bluetooth when disconnecting from the car's standard Bluetooth connection that causes it to lock right away. Disabling it keeps the phone connected after exiting the car and standing right next to it. The whole reason I created that function in the first place was because of the problems reconnecting right after losing the Bluetooth connection. When I have time, I'll have to see if it's possible to create a profile with Tasker based on the BLE connections. It should be possible if I can get the MAC addresses of the four BLE transmitters in the car.
 
I have a Pixel 2, latest Android version. Experiencing all the issues described above. To date, I am frustratingly enduring a routine of trying the door, opening the app, tapping the i next to connected, turning on and off airplane mode, and watching the beam icon turn from grey to white. This seems to always fix my door lock issues for the current hour. My wife has the exact same phone with the exact same issue. Called the Service team yesterday, and as of 5/31 there is a known issue/compatibility with Google Pixel and Pixel 2 phones specifically pertaining to phone key functionality, even with the latest 2018.18.13 Tesla firmware. This morning I updated battery optimization for the Tesla app for both my phone and my wife's to see if it helps, and I have the custom Tasker app (minus profile 2) set but disabled for further testing. Thank you all for shedding some light onto this annoying problem. My wife is willing to shell out hundreds for a physical key fob if they were to sell one today.
 
Even though my phone key works 99% without issue, I have really noticed it is sensitive to where I keep my phone. Only occasionally I will put my phone in my back pocket, but when I do, it will generally not work until I pull it out. My body must attenuate the signal poorly ... Maybe not an issue for most, but I thought it was worth noting ...
 
I have an older Samsung S5 running Version 5 Android (Lollipop), so those options aren't avail. Read on if you want to know how I fixed mine (I hope/think). Post Update... still testing, I think I need to enable Location Services as well (battery drain) to allow it to work at home all the time... I'll update this when I know I've got it right. Post-post update - I'm going to Service. Now it doesn't stay connected unless I go into Bluetooth settings and re-connect every time. I think I'm close (believe it or not) and stuff below may still apply.

I did a Google search on "Using Trusted Devices to Unlock Your Phone". When you dig in you'll find that you need to set up Smart Lock but I couldn't find anything to set Tesla device as "Trusted." That's because I was only requiring "Swipe" to unlock my phone, so security wouldn't allow Google Smart Lock.

When I applied a pattern to unlock my screen, then went to Settings - Security - Smart Lock (FYI, same screen - Trusted Agents is where you turn it on Smart Lock), then it will ask for your swipe pattern (or code I assume if that's how you set your phone security). Then press Trusted Devices. I found Tesla listed already, but there's an option to add a device. So far so good, phone still in pocket and my M3 unlocks just fine.

FYI, Tesla did tell me to set this months ago, but they had no idea how (and neither did I because it wasn't available without first enabling Smart Lock). I plan to update Tesla Service now - this is too important to not understand!!! Someone buy them a few versions of Android and include it in their testing - please! They could avoid having to create Key FOBs as once tweeted by Elon.
 
Last edited:
My last post above (android fix)... proceed w/ caution, now it doesn't work at all. I'm going to reconnect the the phone to the car, but it won't currently unlock the car at all. I've disabled smartlock, no luck. Still think I'm close and it did work for a bit until I enabled how the phone's security determined it was safe (GPS/Network location and on my person motion detection). As they say "Not dead yet..."