title: How do I send SMS using the adb shell command on all versions from Android 6 to Android 12?
body: <p>I'm trying to send messages using adb shell commands. I sent on Android 10 but not on Android 11. I tried everything but without success. I found source code of isms service for android 11 <a href="https://github.com/aosp-mirror/platform_frameworks_base/blob/android11-release/telephony/java/com/android/internal/telephony/ISms.aidl" rel="nofollow noreferrer">here</a>. I have 2 more Android 11 phones and when I test them the result is the same. To test that my shell commands are working on the device, I tried the input command and it does. I read <a href="https://gist.github.com/Ademking/5351ed43a7c48575fe5e6de477d9781f" rel="nofollow noreferrer">this</a> and still it didn't help.</p>
  <p>The command I use:</p>
  <pre><code>adb shell service call isms 7 i32 0 s16 &quot;com.android.mms.service&quot; s16 &quot;%number%&quot; s16 &quot;null&quot; s16 &quot;%message%&quot; s16 &quot;null&quot; s16 &quot;null&quot;
  </code></pre>
  <p>Output of this command:</p>
  <pre><code>Result: Parcel(00000000 '....')
  </code></pre>
  <p>Can someone help, how do I send messages with adb shell commands on Android 11?</p>
  <p>(I tried on Android 12 and result is same)</p>