<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: alexjune1206-maker</title>
    <description>The latest articles on DEV Community by alexjune1206-maker (@alexjune1206maker).</description>
    <link>https://dev.to/alexjune1206maker</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4208334%2F063a8635-328d-444d-bf8d-4eb4c119ab71.png</url>
      <title>DEV Community: alexjune1206-maker</title>
      <link>https://dev.to/alexjune1206maker</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/alexjune1206maker"/>
    <language>en</language>
    <item>
      <title>I built a Linux tool to force my Samsung Phone with dead buttons into Download Mode</title>
      <dc:creator>alexjune1206-maker</dc:creator>
      <pubDate>Mon, 26 Oct 2026 10:10:58 +0000</pubDate>
      <link>https://dev.to/alexjune1206maker/i-built-a-linux-tool-to-force-my-samsung-phone-with-dead-buttons-into-download-mode-495p</link>
      <guid>https://dev.to/alexjune1206maker/i-built-a-linux-tool-to-force-my-samsung-phone-with-dead-buttons-into-download-mode-495p</guid>
      <description>&lt;p&gt;I have a Samsung Galaxy Core LTE with broken power and volume buttons. Entering Download Mode requires the Volume Down + Home + Power, which is impossible having the buttons broken. The original tool is Windows only, and because I didn't want to switch between PCs(my main pc is a kali linux one), I wrote a small tool in C to do the job natively on Linux.&lt;/p&gt;

&lt;p&gt;This post is about what I learned from building it, not just the announcement about it.&lt;/p&gt;

&lt;h2&gt;
  
  
  The problem:
&lt;/h2&gt;

&lt;p&gt;Samsung phones expose a diagnostic serial interface over USB (&lt;code&gt;/dev/ttyACM*&lt;/code&gt;). You can send AT commands to force the device into Download Mode (Odin). The tricky part is doing this reliably from a Linux CLI, across different models and firmware versions, without accidentally sending commands to the wrong device.&lt;/p&gt;

&lt;h2&gt;
  
  
  How It Works
&lt;/h2&gt;

&lt;p&gt;The tool does three things:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Detects the device&lt;/strong&gt; by reading the USB vendor ID from /sys. Samsung VID is &lt;code&gt;04e8&lt;/code&gt;. This check prevents the tool from accidentaly sending AT commands to a 3G modem or an Arduino plugged in the computer lets say.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Sends a sequence of AT commands&lt;/strong&gt; over the serial port. The exact command that triggers the reboot varies by model. On my Galaxy Core LTE the reboot command is &lt;code&gt;AT+FUS?&lt;/code&gt;. On a Galaxy S8 I tested, the reboot command is &lt;code&gt;AT+REBOOT=4&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Confirms Download Mode&lt;/strong&gt; by polling sysfs for known Samsung PIDs: &lt;code&gt;685d&lt;/code&gt;, &lt;code&gt;685e&lt;/code&gt;, &lt;code&gt;6860&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  What I Learned
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Port names are useless for identification.&lt;/strong&gt; &lt;code&gt;/dev/ttyACM0&lt;/code&gt; vs &lt;code&gt;/dev/ttyACM1&lt;/code&gt; depends on kernel enumeration order. I added serial identification so that you can tell the devices apart(in a scenario where you have multiple Samsung devices plugged in.)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The port can disappear mid-sequence.&lt;/strong&gt; On the Core LTE, the phone reboots after &lt;code&gt;ATE0&lt;/code&gt;. The next command fails with &lt;code&gt;EIO&lt;/code&gt;. Initially I treated this as an error. Now I treat it as a success signal and poll for the Download Mode PID.&lt;/p&gt;

&lt;h2&gt;
  
  
  Quick Start
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/alexjune1206-maker/samsung-300k-tool-4-linux.git
&lt;span class="nb"&gt;cd &lt;/span&gt;samsung-300k-tool-4-linux
&lt;span class="nb"&gt;mkdir &lt;/span&gt;build &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;cd &lt;/span&gt;build
cmake ..
cmake &lt;span class="nt"&gt;--build&lt;/span&gt; &lt;span class="nb"&gt;.&lt;/span&gt;
&lt;span class="nb"&gt;sudo&lt;/span&gt; ./samsung-300k-tool &lt;span class="nt"&gt;--help&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Repo: &lt;a href="https://github.com/alexjune1206-maker/samsung-300k-tool-4-linux.git" rel="noopener noreferrer"&gt;https://github.com/alexjune1206-maker/samsung-300k-tool-4-linux.git&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Any contributions are welcome! Thank you!&lt;/p&gt;

</description>
      <category>c</category>
      <category>opensource</category>
      <category>showdev</category>
      <category>linux</category>
    </item>
  </channel>
</rss>
