{"componentChunkName":"component---node-modules-gatsby-theme-blog-core-src-templates-post-query-js","path":"/use-google-usb-drivers-on-windows-regardless-of-the-device-vendor/","result":{"data":{"site":{"siteMetadata":{"title":"one melo a day","social":[{"name":"twitter","url":"https://twitter.com/melo0187"},{"name":"github","url":"https://github.com/melo0187"}]}},"blogPost":{"__typename":"MdxBlogPost","id":"e9278a56-8e6e-5aa9-85db-c1cc0855fc8e","excerpt":"Use Google USB drivers on Windows regardless of the device vendor","body":"function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\n/* @jsx mdx */\nvar _frontmatter = {\n  \"layout\": \"post\",\n  \"title\": \"Quick ADB setup for any Android device\",\n  \"author\": \"melo\",\n  \"date\": \"2017-08-06T14:40:22.000Z\",\n  \"categories\": [\"Android\", \"Technical\"],\n  \"slug\": \"use-google-usb-drivers-on-windows-regardless-of-the-device-vendor\",\n  \"excerpt\": \"Use Google USB drivers on Windows regardless of the device vendor\",\n  \"draft\": false,\n  \"meta_title\": \"Quick ADB setup for any Android device\"\n};\n\nvar makeShortcode = function makeShortcode(name) {\n  return function MDXDefaultShortcode(props) {\n    console.warn(\"Component \" + name + \" was not imported, exported, or provided by MDXProvider as global scope\");\n    return mdx(\"div\", props);\n  };\n};\n\nvar layoutProps = {\n  _frontmatter: _frontmatter\n};\nvar MDXLayout = \"wrapper\";\nreturn function MDXContent(_ref) {\n  var components = _ref.components,\n      props = _objectWithoutProperties(_ref, [\"components\"]);\n\n  return mdx(MDXLayout, _extends({}, layoutProps, props, {\n    components: components,\n    mdxType: \"MDXLayout\"\n  }), mdx(\"p\", null, \"Lately I found my self wanting to debug an Android app I\\u2019m trying to take care of. When attempting to just activate USB debugging on some test devices and connecting them to my laptop I was reminded that on Windows 7 sadly things are not all that easy. But there is actually a way around searching the internet for vendor specific device drivers and using just Google\\u2019s USB drivers instead. So if you regularly find yourself in the situation of adding new Android test devices to your pool and deploying your apps through ADB from Windows, this might help you speed up your initial setup process. \", mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"TL;DR:\"), \" \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \"Yes, that\\u2019s my problem, what do I do?\"), \" \", mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"#TLDR\"\n  }), \"Click!\")), mdx(\"h2\", {\n    \"id\": \"the-problem\"\n  }, \"The problem\"), mdx(\"p\", null, \"If you have ever developed an Android app and got to the point where you want to see your app running on a physical device, you know how tedious it can be to connect your Android phone with the \", mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"https://developer.android.com/studio/command-line/adb.html\"\n  }), \"Android debug bridge\"), \" on Windows 7. \", mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"https://developer.android.com/studio/debug/dev-options.html\"\n  }), \"Enabling USB debugging in the device\\u2019s developer options\"), \" simply isn\\u2019t enough. As Google describes in \", mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"https://developer.android.com/studio/run/oem-usb.html\"\n  }), \"the documentation\"), \":\"), mdx(\"blockquote\", null, mdx(\"p\", {\n    parentName: \"blockquote\"\n  }, \"If you are developing on Windows and want to connect a device for testing, then you need to install the appropriate USB driver. This page provides links to the web sites for several original equipment manufacturers (OEMs), where you can download the appropriate USB driver for your device.\")), mdx(\"p\", null, \"Sounds simple enough, right? Well, in my experience this step can be quite cumbersome. \", mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"https://developer.android.com/studio/run/oem-usb.html#Drivers\"\n  }), \"The mentioned list of links\"), \" is of mixed quality and sometimes offers nothing more than a link to a generic support downloads web site, like in Samsung\\u2019s case. Despite the improvements - I remember that a few years ago the only thing Samsung would offer to get ADB running with their devices was to install their entire software suite for phones called Samsung Kies - it still feels very inefficient to browse through the OEM\\u2019s web sites like the one from Samsung, trying to figure out which download might help you set up the ADB connection without installing unnecessary bloatware on your system. This is especially annoying when you compare this to the comfortable solution that exists for Google\\u2019s own Nexus devices. For Google\\u2019s Nexus devices all you need to do is \", mdx(\"a\", _extends({\n    parentName: \"p\"\n  }, {\n    \"href\": \"https://developer.android.com/studio/run/win-usb.html\"\n  }), \"install the Google USB driver\"), \", which is very pain-free, since it can be done through the Android SDK Manager. Luckily you can actually use the Google USB driver for non Nexus devices as well!\"), mdx(\"h2\", {\n    \"id\": \"how-to-get-around-oem-drivers\"\n  }, \"How-To get around OEM drivers\"), mdx(\"ol\", null, mdx(\"li\", {\n    parentName: \"ol\"\n  }, \"Install the Google USB driver as described in \", mdx(\"a\", _extends({\n    parentName: \"li\"\n  }, {\n    \"href\": \"https://developer.android.com/studio/run/win-usb.html\"\n  }), \"the docs\")), mdx(\"li\", {\n    parentName: \"ol\"\n  }, \"Activate USB debugging in the device\\u2019s developer options as described \", mdx(\"a\", _extends({\n    parentName: \"li\"\n  }, {\n    \"href\": \"https://developer.android.com/studio/debug/dev-options.html\"\n  }), \"here\")), mdx(\"li\", {\n    parentName: \"ol\"\n  }, \"Connect your device with your development machine by USB\"), mdx(\"li\", {\n    parentName: \"ol\"\n  }, \"Wait for Windows to tell you it wasn\\u2019t able to set up a device\"), mdx(\"li\", {\n    parentName: \"ol\"\n  }, \"Open the Windows device manager\"), mdx(\"li\", {\n    parentName: \"ol\"\n  }, \"Search in the \\u201COther devices\\u201D section for your Android device (anything like \\u201CAndroid\\u201D, \\u201CAndroid USB\\u201D, \\u201CSamsung Android\\u201D etc.)\"), mdx(\"li\", {\n    parentName: \"ol\"\n  }, \"Right click that device and select \\u201CProperties\\u201D -> \\u201CDetails\\u201D -> \\u201CHardware Ids\\u201D\"), mdx(\"li\", {\n    parentName: \"ol\"\n  }, \"Copy the Ids containing VID, PID and MI (when in doubt, take the longer one)\"), mdx(\"li\", {\n    parentName: \"ol\"\n  }, \"Open android-sdk\", \"\\\\\", \"extras\", \"\\\\\", \"google\", \"\\\\\", \"usb\", \"_\", \"driver\", \"\\\\\", \"android\", \"_\", \"winusb.inf\"), mdx(\"li\", {\n    parentName: \"ol\"\n  }, \"Add a line at the end of both the \", \"[\", \"Google.NTx86\", \"]\", \" section and the \", \"[\", \"Google.NTamd64\", \"]\", \" section like this:  \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"%CompositeAdbInterface% = USB_Install, *copied Id*\"), \" \"), mdx(\"li\", {\n    parentName: \"ol\"\n  }, \"Choose \\u201CProperties\\u201D -> \\u201CDriver\\u201D -> \\u201CUpdate Driver\\u2026\\u201D and point it to android-sdk\", \"\\\\\", \"extras\", \"\\\\\", \"google\", \"\\\\\", \"usb\", \"_\", \"driver\", \"\\\\\"), mdx(\"li\", {\n    parentName: \"ol\"\n  }, \"Once driver update is completed verify with  \", mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"adb devices -l\"), \"  that your device is there\")), mdx(\"h2\", {\n    \"id\": \"reap-the-rewards\"\n  }, \"Reap the rewards\"), mdx(\"p\", null, \"This method allows me to set up several test devices quickly. This is a good thing, because I can invest that saved time in actually debugging the app at hand! I will follow up with a short post to share how to use adb and a little command-line kung fu to install an app to debug on multiple devices at once, saving you even more time for what you are actually trying to do: Fix that pesky little bug!\"));\n}\n;\nMDXContent.isMDXComponent = true;","slug":"/use-google-usb-drivers-on-windows-regardless-of-the-device-vendor/","title":"Quick ADB setup for any Android device","tags":[],"keywords":[],"date":"August 06, 2017"},"previous":{"__typename":"MdxBlogPost","id":"6f7825e5-5547-5ad9-a322-a4ff5434c168","excerpt":"Just some thoughts and numbers to contemplate my blog's 2016","slug":"/my-blogs-2016-in-review/","title":"My blog's 2016 in review","date":"January 02, 2017"},"next":{"__typename":"MdxBlogPost","id":"32736f66-7def-5241-999b-137d1e17a8b6","excerpt":"When a bug in your Android app is hard to reproduce, it can make sense to install a debuggable version of your app on more than one device…","slug":"/send-adb-command-to-all-devices/","title":"Quicktip: Send ADB command to all connected devices","date":"August 08, 2017"}},"pageContext":{"isCreatedByStatefulCreatePages":false,"id":"e9278a56-8e6e-5aa9-85db-c1cc0855fc8e","previousId":"6f7825e5-5547-5ad9-a322-a4ff5434c168","nextId":"32736f66-7def-5241-999b-137d1e17a8b6"}}}