{"id":209177,"date":"2025-10-08T13:35:10","date_gmt":"2025-10-08T13:35:10","guid":{"rendered":"https:\/\/www.newsbeep.com\/us\/209177\/"},"modified":"2025-10-08T13:35:10","modified_gmt":"2025-10-08T13:35:10","slug":"the-20-bytes-of-code-that-fixed-antennagate-in-the-iphone-4","status":"publish","type":"post","link":"https:\/\/www.newsbeep.com\/us\/209177\/","title":{"rendered":"The 20 bytes of code that fixed Antennagate in the iPhone 4"},"content":{"rendered":"<p>\t<img width=\"1600\" height=\"800\" src=\"https:\/\/www.newsbeep.com\/us\/wp-content\/uploads\/2025\/10\/The-20-bytes-of-code-that-resolved-Antennagate.jpg\" class=\"skip-lazy wp-post-image\" alt=\"The 20 bytes of code that fixed Antennagate | Boxed iPhone 4 shown\"  decoding=\"async\" fetchpriority=\"high\"\/><\/p>\n<p>Ah, 2010. The year when Apple launched the iPad, but the limelight was stolen by something else entirely: <a href=\"https:\/\/9to5mac.com\/guides\/antennagate\/\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">Antennagate<\/a>. Soon after the launch of the <a href=\"https:\/\/9to5mac.com\/guides\/iphone-4\/\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">iPhone 4<\/a>, users discovered that when they held the phone in a typical grip for a phone call, the number of bars shown for signal strength immediately dropped dramatically.<\/p>\n<p>Apple responded in a number of ways, including Steve Jobs famously suggesting that users were holding the phone wrong, but the issue was resolved by changing just 20 bytes of code \u2026<\/p>\n<p>Unfortunately for Apple, the iPhone 4 is now mostly remembered not for its excellent design, but rather for a controversy that got completely out of hand.<\/p>\n<p>Apple was forced to offer buyers <a href=\"https:\/\/9to5mac.com\/2010\/07\/23\/apple-iphone-4-free-bumper-plan-comes-via-app\/\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">a free bumper case<\/a> as well as to <a href=\"https:\/\/9to5mac.com\/2012\/03\/29\/apple-starts-paying-out-15-to-iphone-4-antennagate-sufferers\/\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">settle a class action lawsuit<\/a>. The company subsequently improved the antenna in the iPhone 4S, but the real issue was not with the hardware, but rather the software.<\/p>\n<p>Apple said at the time that it had <a href=\"https:\/\/www.apple.com\/newsroom\/2010\/07\/02Letter-from-Apple-Regarding-iPhone-4\/\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">made an error<\/a> in the formula responsible for displaying the number of signal strength bars.<\/p>\n<p>Upon investigation, we were stunned to find that the formula we use to calculate how many bars of signal strength to display is totally wrong. Our formula, in many instances, mistakenly displays 2 more bars than it should for a given signal strength. For example, we sometimes display 4 bars when we should be displaying as few as 2 bars. Users observing a drop of several bars when they grip their iPhone in a certain way are most likely in an area with very weak signal strength, but they don\u2019t know it because we are erroneously displaying 4 or 5 bars. Their big drop in bars is because their high bars were never real in the first place.<\/p>\n<p>We didn\u2019t know exactly what Apple had changed, but software engineer and designer <a href=\"https:\/\/x.com\/samhenrigold\/status\/1975360407935328544\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">Sam Henri Gold<\/a> has now figured it out.<\/p>\n<p>I downloaded both firmwares and started poking around. In the CoreTelephony framework, I found a promising looking binary: CommCenter. Looking at the strings gave me a pretty good sense that this is where the bar formula was.<\/p>\n<p>The actual calculation is dead simple. When converting signal strength to bars, CommCenter loads each threshold from memory and compares until it finds the right range. This code is not the problem.<\/p>\n<p>This is. This is the lookup table.<\/p>\n<p>When you plot this onto a chart, you can see how the values are kinda screwed up since the values are really optimistic. Most of the time, you would see 4-5 bars. But when you gripped it, since the falloff is so sharp, you\u2019d see a catastrophic drop from 5 to 2 bars.<\/p>\n<p>In 4.0.1, they changed these values to be way smoother. Mapped onto a chart, you can see that it takes a lot to drop from 5 to 0 bars. It\u2019s harder to see 5 bars, but it\u2019s harder to plummet bars. So there ya go. 20 bytes.<\/p>\n<p>He posted a graph showing the before and after drop-offs in the number of bars displayed.<\/p>\n<p lang=\"en\" dir=\"ltr\">Mapped onto a chart, you can see that it takes a lot to drop from 5 to 0 bars. It\u2019s harder to see 5 bars, but it\u2019s harder to plummet bars. <a href=\"https:\/\/t.co\/QFLh8IK086\" rel=\"nofollow\">pic.twitter.com\/QFLh8IK086<\/a><\/p>\n<p>\u2014 sam henri gold (@samhenrigold) <a href=\"https:\/\/twitter.com\/samhenrigold\/status\/1975360430316061023?ref_src=twsrc%5Etfw\" rel=\"nofollow noopener\" target=\"_blank\">October 7, 2025<\/a><\/p>\n<p>In a fun bit of psychology, Gold notes that Apple also increased the height of the bars so that signal strengths one and two didn\u2019t look quite so bad!<\/p>\n<p>It\u2019s a fun look back at an interesting piece of Apple history.<\/p>\n<p>Highlighted accessories<\/p>\n<p>Photo by\u00a0<a href=\"https:\/\/unsplash.com\/@brett_jordan?utm_content=creditCopyText&amp;utm_medium=referral&amp;utm_source=unsplash\" rel=\"nofollow noopener\" target=\"_blank\">Brett Jordan<\/a>\u00a0on\u00a0<a href=\"https:\/\/unsplash.com\/photos\/black-iphone-4-box-H29Blq8NgFs?utm_content=creditCopyText&amp;utm_medium=referral&amp;utm_source=unsplash\" rel=\"nofollow noopener\" target=\"_blank\">Unsplash<\/a><\/p>\n<p>\t\t\t\t<a target=\"_blank\" rel=\"nofollow noopener\" href=\"https:\/\/google.com\/preferences\/source?q=https:\/\/9to5mac.com\"><br \/>\n\t\t\t<img decoding=\"async\" class=\"google-preferred-source-badge-dark\" src=\"https:\/\/www.newsbeep.com\/us\/wp-content\/uploads\/2025\/09\/1758699188_319_google-preferred-source-badge-dark.png\" alt=\"Add 9to5Mac as a preferred source on Google\"\/><br \/>\n\t\t\t<img decoding=\"async\" class=\"google-preferred-source-badge-light\" src=\"https:\/\/www.newsbeep.com\/us\/wp-content\/uploads\/2025\/09\/1758699188_86_google-preferred-source-badge-light.png\" alt=\"Add 9to5Mac as a preferred source on Google\"\/><br \/>\n\t\t<\/a><\/p>\n<p class=\"disclaimer-affiliate\">FTC: We use income earning auto affiliate links. <a href=\"https:\/\/9to5mac.com\/about\/#affiliate\" rel=\"nofollow noopener\" target=\"_blank\">More.<\/a><\/p>\n<p><a href=\"https:\/\/bit.ly\/3IJinsw\" rel=\"nofollow noopener\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1022536\" src=\"https:\/\/www.newsbeep.com\/us\/wp-content\/uploads\/2025\/10\/1759930510_556_970-x-150-1.jpg\" alt=\"\" width=\"970\" height=\"150\"\/><\/a>\t\t\t\t<script async src=\"https:\/\/platform.twitter.com\/widgets.js\" charset=\"utf-8\"><\/script><\/p>\n","protected":false},"excerpt":{"rendered":"Ah, 2010. The year when Apple launched the iPad, but the limelight was stolen by something else entirely:&hellip;\n","protected":false},"author":2,"featured_media":209178,"comment_status":"","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[41],"tags":[165,74],"class_list":{"0":"post-209177","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-mobile","8":"tag-mobile","9":"tag-technology"},"_links":{"self":[{"href":"https:\/\/www.newsbeep.com\/us\/wp-json\/wp\/v2\/posts\/209177","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.newsbeep.com\/us\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.newsbeep.com\/us\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.newsbeep.com\/us\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.newsbeep.com\/us\/wp-json\/wp\/v2\/comments?post=209177"}],"version-history":[{"count":0,"href":"https:\/\/www.newsbeep.com\/us\/wp-json\/wp\/v2\/posts\/209177\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.newsbeep.com\/us\/wp-json\/wp\/v2\/media\/209178"}],"wp:attachment":[{"href":"https:\/\/www.newsbeep.com\/us\/wp-json\/wp\/v2\/media?parent=209177"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.newsbeep.com\/us\/wp-json\/wp\/v2\/categories?post=209177"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.newsbeep.com\/us\/wp-json\/wp\/v2\/tags?post=209177"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}