05 Oct

[Android] How to Enter Diag Mode on AOSP ROM

Okay, here’s a little background :

  1. We love Android (and maybe hate Apple), and HTC is a manufacturer with great device built.
  2. Here in Indonesia, data speed with GSM is usually horrible most of the time! And by means horrible I mean its fucking sluggish make you wanna throw your phone for fuck sake!
  3. So simply use CDMA then? Okay, but not that easy. Almost all Android CDMA devices out there are using inject system with no RUIM (SIM Card), so we need to manually inject our DN (phone number information) to our phone.
  4. HTC makes it happen by providing “Diag Mode” in their ROM so we can connect HTC phone to our PC and configure its inject parameters.
  5. Problem : Diag mode is only possible with phone running HTC’s own ROM (with HTC Sense interface)

Sense is good. You’ll see that HTC is really good at drawing cloud and rain (LOL), but there are bunch of other ROMs out there which is a lot faster and snappier than Sense ROM, they based on AOSP. One AOSP ROM that outstanding among others is MIUI. it’s clean, beautiful, fast and constantly updated. The down part of MIUI are maybe it’s made in chinese and it’s closed source.

So how to enter Diag mode on AOSP rom? here’s the catch:

  1. Install HTC Diag Driver on your PC (Windows OS) and make sure it recognize your HTC Phone.
  2. Enable USB Diagnostic on your HTC Phone. If You don’t understand step 1 and step 2 then forget it, you’re not ready for this yet.
  3. Install adb tool on your PC (just copy paste it to an easy accessed directory on your pc. i.e c:adb
  4. No, you don’t need Android SDK, or JRE, etc, You just need this tool, about 500Kb in package. Google for it!

  5. Enter the abd mode c:adb> adb shell
  6. You need to alter the value of enable file located in your phone (/sys/devices/virtual/usb_composite/diag/enable) file from 0 to 1. here’s how :
    full path :
    echo 1 > /sys/devices/virtual/usb_composite/diag/enable
    you don’t have to remember that. You can enter each dir manually and if you forget the next dir you can simply command ls to list directory and file available. After you reach the last dir (/diag) then you can execute the echo > 1 enable command.
  7. Voila, you enter HTC Diag mode on AOSP ROM.

Now do what you have to do! cheers.
P.S : I’m not responsible for anything happen to your device. If you blame me, I will point finger and laugh at you.

9 thoughts on “[Android] How to Enter Diag Mode on AOSP ROM

  1. Pingback: How to Enter Diag Mode on AOSP ROM « ~A Journey in an Adventure~

Leave a Reply

Your email address will not be published. Required fields are marked *