BMW Connected Apps Protocol
hufman.github.io
hufman.github.io
Sometimes this is all the motivation a person needs. Now it's (almost?) reverse-engineered and it could be a big headache for BMW in the future if a exploit/bug/fun-stuff is found by the right people.
Companies: share your SDKs. The guy/girl doing a RE is not your regular "coding demo SDK apps" engineer and will go deeper.
I tried to get developer access via a form and never got a response, so I tried sending a message the head of the infotainment on LinkedIn
Thankfully he was able to get my application to the dev site moving... but unfortunately, they required a business use case to get an API key once you had access to the site.
So I tried to pick the API key out of the app.
They had the most novel obfuscation I've ever seen for an app's API key
The key was inside the image data for the launcher icon
There was a weird transformation applied to it too, so instead of trying to reverse engineer it I just fired up Charles and intercepted it from there
With the API key and the documentation for the API from the dev site I was able to write a program that started preconditioning my Volt when I left my apartment (the car was in an attached underground garage, so it'd be at the right temperature by the time I got down)
Reverse engineering Android apps is pretty easy because there's a very well defined application format, and a ton of hints about the original source in the bytecode
Your situation sounds a little more complicated than that
But in general, getting around cert pinning is pretty straightforward though with Objection and Frida.
It's a little bit of a cat and mouse game since they can probably be detected by a determined app developer, but I haven't run into any issues yet
Found the call that added the header for the API key to each request (even with Proguard's obfuscation string literals are preserved, so searching for "x-api-key" worked)
From there I followed the call chain to their transformer, then looked at the input for the transformer and it was loading a subset of bytes read from the same resource as the launcher icon (and sure enough, opening it in a hex editor there was some weird "garbage" that I'm honestly surprised Android doesn't choke on)
There's not much to show though, I have a bad habit of not putting stuff in VC "because it's just a quick experiment"... then it becomes a long term project with no backups
And the UX is pretty good. The computer controls can almost be used by memory, they're very close to hand and well laid out. The nav is so-so but the in-dash lane view makes it sane for big cities.
But the software is awful. It's not poorly designed, necessarily, but it's buggy as hell.
Half the time I enter the vehicle the car thinks I'm my wife. She's a foot shorter than I am which means I can crawl into the seat for about 30 seconds before my legs start to cramp. In that time, the following invariably happens:
1. I painfully get a foot on the break and hit the ignition.
2. The computer prompts me to confirm that I'm my wife.
3. While I'm trying to select my profile CarPlay kicks in and opens the media screen.
4. I navigate through several menu levels to set the correct driver profile, swearing the whole time.
Now, I can move the seat back before I enter, but it's slow and clumsy. Then I still have to go through the same process, just minus the leg cramp.
.......
I'm only kind of joking, I don't know the real reason, but I dislike the fact I can't just get a simple mechanical car. It worked for decades, why did we need to add janky software to everything?
{"AnfrageArt":"Personenerkennungsschlüsselanforderungsanfrage", "ParameterListe":["HerstellerSpezifischePersonenkraftfahrzeugidentifikationsnummer":"1NXBR12E31Z463785"]}
}
These performance penalty get really magnified when a lot of small errors are done on a less powerful hardware.
I've found out this the hard way when I was developing Java GUI (Swing mostly) apps, and messed up the initialization sequence of the GUI a few times.
FWIW, it would be very weird, since Java is strongly typed, and while you can introduce bugs, not any more so than in any other, esp dynamically typed languages.
There's always a standard procedure to get a Swing main window running. IIRC you get the window, the canvas (layout?), layout manager then, you create and push your elements into the layout, fiddle with them, and lastly, set your window visible.
You can flex the process between getting the window and starting to push your elements into the layout. You can make Java implicitly create the missing parts without connecting to a variable.
If you do that, everything works as expected but, with a slight performance penalty. Everything will be ever slightly laggy. On the other hand, if you do everything by book, things run smoother. I experienced this with the apps I've written.
Some people believed me, some people don't. Some believed me after I showed the situation to them. This effect diminished in AMD64 era, and became unnoticeable after Intel Core series processors came to existence.
It was Java 6 times, so I'm not sure whether it's applicable.
That's the little lesson I've learned during developing with Java: Pay attention, do once, do right.
Generalized: What's wrong with the software engineering culture at hardware manufacturers?
Don't know about BMW in particular but I went to university in close vicinity to another large german car manufacturer. They do basically nothing in house. Everything is outsourced to suppliers (who often outsource their stuff again). There is enormous price pressure among the suppliers and no real room for culture. Also Java, everything is Java.
But the companies are slowly seeing that its a problem and start building up their own dev teams with "hip" offices in Berlin and so on.
Of course there are always exceptions.
Yeah, they look exactly like this: https://welcometobusinesstown.tumblr.com/post/111400877481/t...
It simply can come down to not having a change management system let along a project management system that is effective. then there is the opposite systems, the ones where getting even a minor change in can be frustrating and results in many not bothering to fix the simple issues.
I have two BMWs, both do the same.
PS: also in my country it is illegal to drive without car ID card, which is also single entity and need to be exchanged hand to hand when car sharing.
On the other side, I had an audi that on top of 2 keys, it had a plastic key with a code that can be used to create a new key as the one that you must store in house and keep safe.
I had the same issue with a fairly old Volvo, and manually adjusting the seats for the large height difference was quite irritating (even with the setting memory feature). I was convinced it was buggy or random, until I accidentally figured out the car's actual "algorithm" - it was simply remembering the last seat setting for the key used, and since we were using a single key and just swapping the car between us as needed... Not sure why this took me so long to figure out, it was just kind of an unexpected default behaviour, given our use case of a shared car.
There's a reason why California companies lead the world in UI design: We actually care about the user experience. The hostility of a BMW UX is on a level that I honestly didn't think was possible. It wasn't just moronic, it was straight up belligerent.
Thank goodness the car had a major safety recall and I had an excuse to get rid of it. My first and last BMW ever.
EDIT: Seems that you are talking about 10+ year old BMW and telling that CA car UX is amazing - cars with no buttons and clicking (touching) through submenus to get the AC blasting...
How do you define "unneeded" oil changes. If the oil change wasn't reset that is up to your service.
Those pesky updates.
I have not had the problem that the other user complained about, of the reverse camera and sensors coming on when changing gears. Perhaps they shift much slower than the manufacturer anticipated, or they aren't depressing the button on the knob.
Isn’t that only with a couple of weird models built on the Mini UKL platform (and not even all of those)? Hardly what I’d call “a lot”.
Pretty sure literally all other models use a button for park.
It’s definitely a weird exception, and the kind of car you’d expect to suck. Sort of like the Mercedes CLA.
The iDrive system that the user was complaining about is pretty much interchangeable with every other bimmer of that generation, so you're going to find mostly the same features and quirks throughout that lineup. If they didn't like that UX, they're pretty much going dislike any iDrive.
Personally, I think BMW makes a way better infotainment than most other manufacturers.
“Unkillable”? You just go into the service menu and reset the oil change interval, this isn’t hard stuff.
Just google “e65 reset oil change” or whatever model you had.
Plenty of people idle to finish hearing what they are listening to when they reach their destination, and a straightforward way to do that without burning fuel is nice.
Not even that, just getting out of the car and locking it will do the trick.
I guess that won’t work if you’re terribly insecure about your music choices though?
I’ve never seen the car pick any other driver profile than the one associated with the keyfob.
Can't say I agree with this in the slightest, assuming you are not talking about a 2002-2005 (EU) year which did have a very buggy implementation of iDrive based on Windows.
The issue you are describing is otherwise known as "opening the car with a key attached to the driver profile for your wife".
My 2009 3 series with the professional navigation option is not only bug-free in everyday use (with all updates applied) but substantially better than most brand new cars available today, which is why I still have it.
They have a lot of problems synchronizing, and connected drive is just garbage. It just doesn't work, if I try to use the my phone to send a location to the car's navigation system half the times the application crashes, perhaps with iPhone it's better, but with android (and I have an android one phone, wit android 10) I just gave up on this functionality.
Basically: If it it works on your car, great. If it doesn't, it probably never will.
I know how it's supposed to work, my family has owned other cars with the same keyfob/system, and it works perfectly.
shrug
Germans are very bad at software.
With MBUX Mercedes has started developing their infotainment system in-house again. I don't personally own a Mercedes but from what I've heard it's much better then the previously outsourced infotainment system.
https://c1.peakpx.com/wallpaper/1018/324/929/mercedes-benz-c...
One time I got in one of their cars in a car show, and the display kept popping up a modal dialog "To use X, please connect a phone". I get it, you told me 5 seconds ago!
... Until I saw the same font and graphics on a $100k+ AMG E class at the auto show being advertised as NEW.
This is why some things can be "not perfect" for some users. The companies are improving rather fast just past years to be able to have things like software be improved in a much faster way and free of chains to the timeline of the project they are part of.
"Car thinks i'm the wife". Some cars go by weight and some by the key used. Some go by the last use and once you sit down it adjust things to that last setting.
I used to have a Audi and a Volvo with these things. The Audi i had seemed to go by weight only and the Volvo had memory buttons to be used but seemed to go by the key.
What the newer BMW use i am unsure of.
But the software is awful. It's not poorly designed, necessarily, but it's buggy as hell.
Interesting. I have a 2015 BMW 3 Series with professional I-Drive and I still find it one of the best systems available.
It's the best system, but it's still awful.
I just don't get the theory behind it all. It's a system you have to LEARN how to use, and you can use it for years without ever understanding what the hell they were thinking/intending. I've just learned to work around its quirks.
I use Android. Anytime I try to go somewhere while my wife's iPhone is near the garage, it takes over my car and I can't do anything. No music, no phone calls, nothing but drive. In order to regain control of my car, I have to drive a mile down the road, pull over, shut off the ignition, count 30 Mississippi, then restart the car. Only then will the unresponsive CarPlay coupe coup be ultimately defeated. :)
Sure I could remove her iPhone profile, but that hurts her feelings.
Seconded. It was always crappy, but I recently switched to a 2019 model and expected it to be better. It isn't.
I'm amazed that in 2019/2020 we still have problems with keeping track of two driver profiles (yes!) and their phones. It's not rocket science!
A phone can stop working for no reason and require un-paring/re-connecting. The UX is crappy, Spotify integration works or does not, depending on the phase of the moon.
My car also came with Apple CarPlay, which was somewhat better but after a couple of weeks both phones stopped working with the car. The dealership told me I never had a CarPlay subscription (!), which means it must have been a demo. From the point of view of the user: phones worked nicely, until suddenly they stopped working, completely. Wasted time on dealership visits and unparing/re-connecting phones again.
Oh, and the much-touted feature that lets you unlock the car with an NFC card or your phone? Only works with Samsung phones.
I'm not sure if manufacturers get the fact that for a certain segment of customers phone integration is one of the most important features in the car. After my lease expires I will be shopping with that in mind.
My current car is almost entirely mechanical, with the exception of electronic throttle body. This may sound like a petty gripe considering the pure garbage that is being sold today, but I can feel the difference between this and a throttle body with a physical cable attached to it. It annoys the hell out of me that I can sense a 1mm deadzone before the computer detects that I have pressed my accelerator pedal. I cannot comprehend how people are tolerating things like brake/steer-by-wire, lane-keep assist on by default, engine auto stop, emergency auto breaking, etc.
I understand the most profitable target market for these cars is "people who didn't want to drive in the first place", but can we at least spend a little time considering those still in the "I like to drive and don't want it to be a miserable experience" demographic?
But now the problem is that software companies make very good software - that benefits themselves first, and the customer as almost an afterthought.
On the topic of using a BMW with you phone without being frustrated, some people put a third-party box between the screen and the car infotainment computer to get Android Auto. I heard the experience isn't perfect.
Personnally I use Google Assistant and I think it works relatively well. I can use it to get directions, make the sound of random animals, change radio, play music on Spotify... To trigger it, you can long press the voice command button on the steering wheel.
You're right though, it is not perfect. But I was surprised how well it's integrated. It definitely connects faster and more reliably than the default Bluetooth connection in the car and it can be removed without a trace afterwards, since it's just a piggyback box.
I do experience a crash though sometimes, and then I have to stop, turn off and lock the car for ~30 seconds just to restart the box.
I have a binary firmware file from the manufacturer, was thinking I might try to decompile it and make my own version, but I don't have a the experience or the time atm.
The most advanced RE effort I've found: https://www.youtube.com/watch?v=VnS_TP18VBk (comments) https://gist.github.com/Wh1terat/f06c8b4a41f93f482bf5892095b...
Example: In a Mini, with wireless CarPlay I get a Main View for CarPlay's springboard, and configurable split screen for other car functions, however one of the functions is a media view for currently playing media. This allows me to use any car functions in the main view and still see what media is playing from any source including CarPlay, and it shows the Album View from CarPlay.
https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&c...
It's a great product even if a little buggy. I'm glad my car is compatible and honestly I wish this kind of device could be made universal. Car stereos used to be super easy to swap in and out, but nothing is standardized anymore. :(
Just give me CarPlay, I'll still spend that £2k but on things I need like a electrically heated front screen, or better seats.
That is exceptionally common across a variety of manufacturers.
The Fiesta and Polo are so heavy now they need independant rear suspension like the MINI has.
Now I can't imagine not having Carplay in my car :)
A little bit off-topic; while I installed the carlinkit myself I think I broke something. Now my car clock (the internal one shown on the speedometer screen) cannot be set anymore. And recently I notcied the PDC (pressure detection system of the tires) are complaining all the time.
Will have the car checked by mechanics soon. Not sure the defects I'm experiencing are related to my own doings or just unlucky.
Someone at BMW added me accidentally as a nexus repo. I get loads of BMW traffic now, and it's really annoying.
Leaks a bunch of fun stuff.
[BMW'S IP] - - [20/Jan/2020:08:52:11 +0100] "GET .... com/bmw/cc/b2vngtp/statusAPI/20200120.074026-feature_2020-T1.5-CDNGTP-3818-improve-stability-of-integration-tests/statusAPI-20200120.074026-feature_2020-T1.5-CDNGTP-3818-improve-stability-of-integration-tests.war HTTP/1.1" 403 1364 [MYSITE] "-" "Nexus/3.15.1-01 (OSS; Linux; 3.0.101-108.87-xen; amd64; 1.8.0_92)" "-"
From zwb’s bio: “(..) Hacker News is an online game you can play where your score is up in the top right corner and there's a leaderboard, and you get points by posting stuff and making comments people like. (..)”
With a tech company, maybe you could but it’s still a risk. With a big, ‘old school’ company? No. Hell no. Unsolicited advice on anything security related is a bad idea.
I do wish I had adaptive cruise control, though.
I want an electric car. I don't want any screens though. Analogue dials, switches, buttons.
I don't expect to own a vehicle for 20 years, but what is the real life-expectancy of those LCD screens and back-lights? I'm driving a 9-year-old car right now and half of the 'tech' on it doesn't work worth shit. It drives ok, but it's nearing it's serviceable EOL.
by the 3rd time i was laughing at this...
"not a problem, barely an inconvenience"
Yea sounds about right :(