QPST DIAG Mode CM7 (Aka ##3424)

Search This thread

hydrosity

New member
Mar 24, 2010
4
11
(UPDATE: 8/24/11 New flashable update.zip for install via recovery, includes Gscript (credit goes to PinkVenture for developing the app!) and my simple on/off scripts already installed. You can link shortcuts directly to the desktop for each ON or OFF through add shortcut on homescreen, see attachments at the end of this post)

I'll start this off by mentioning that all the threads you may find saying "CM7 DIAG Enabled!" such as this one here Etc, are not valid solutions for OUR device. That may/may not work with the eris/hero(haven't tried) etc as those topics discuss. They merely SPECULATE it will for any CM7 based rom - it doesn't for ours.
echo 1 > /dev/qct_diag_enable (to enable diag mode)

..and your phone should go into USB diag mode. when you are done just:

echo 0 > /dev/qct_diag_enable (to disable diag mode)
WONT DO ANYTHING for you. In fact, it made my "qct_diag_enable" file disappear. Scroll to the bottom to skip my bantering and explaining of the reason this is a useful feature for people like myself, and to just show the actual findings of this thread.

So you have CM7 and (of course) are lovin' it. The only thing is you have an alternate carrier (cricket personally) and hate the fact that manually switching prl's or needing to change your EPST settings can be a pain (since CM7 has no EPST built-in!). Especially when its [*feature name here] that you would LIKE to have the ability to use, but can live without if it means having to restore (or flash one if you have no backups) a sense rom just to change any of your EPST (##778, etc) settings.

Well, if you know anything about QPST for windows (google), then you know that you need to have your phone in DIAG mode to use it (##3424) and have the hero diagnostic drivers installed on your windows machine. (For the record, I'm an Ubuntu man and my main machine is NOT dual boot, meaning I still have to switch to my windows laptop to use QPST >< but we'll just pretend you have windows and this is more convenient for *you*).

Back to the point, once you've realized all the hassle, yada yada, you just say, "Ill just fix it later, I can live without it for now." AND how sick you are of saying that, here is the solution to no longer switching ROM's for EPST, as there IS a way without the ability to ##3242 in CM7 to enable DIAG mode.
(NOTE: This is also useful for those of you already on CM7 WITH Verizon/Alltell who would like to follow the guide in the Development section Droid Incredible Wiki regarding switching to the whole Verizon PRL/Alltell Hybrid PRL, along with other guides involving EPST or ## codes found there)

Simply go to (via adb shell/terminal emulator) /sys/devices/virtual/usb_composite/diag and run (1 for on and 0 for off, respectively)
Code:
echo 1 > enable
echo 0 > enable

To simplify all this I've included a zip file which includes Gscript.apk for you to install, and two scripts in the Gscript directory (place entire Gscript directory on root of sdcard). Open Gscript application, then once open - menu button>add script>load file>diag on/off.sh>save for each script respectively. Then you can simply toggle on/off DIAG mode from the Gscript application (or even add shortcut>gscript>diag on/off from CM7 home screen, for each script respectively). And without further excess explanation, here's the .zip signed-diagscripts.zip flashable update.zip file for recovery

By the way, if a mod reads this, could you please move to the Development section and remove my restriction? I know I don't have my whole 10 posts etc, etc, but I don't really have enough to say or the patience to say it most of the time to post 10 posts. However, I've lurked these boards and been rooting phones and flashing phones via this forum since my first android phone back from what feels like ages ago. (going on 4 rooted and flashed to cricket android phones now, all sold except my current, Dinc)
 

Attachments

  • signed-diagscripts.zip
    154.4 KB · Views: 7,484
Last edited:

hydrosity

New member
Mar 24, 2010
4
11
Sure thing, let me know if anyone experiences issues by pm or reply. I was thinking about compiling an installable zip so this can be installed after rom in recovery too.

Sent from my ADR6300
 

SynisterWolf

Retired Senior Moderator
Sep 4, 2010
8,308
6,538
Northern California
xdaforums.com
I'll start this off by mentioning that all the threads you may find saying "CM7 DIAG Enabled!" such as this one here Etc, are not valid solutions for OUR device. That may/may not work with the eris/hero(haven't tried) etc as those topics discuss. They merely SPECULATE it will for any CM7 based rom - it doesn't for ours.

WONT DO ANYTHING for you. In fact, it made my "qct_diag_enable" file disappear. Scroll to the bottom to skip my bantering and explaining of the reason this is a useful feature for people like myself, and to just show the actual findings of this thread.

So you have CM7 and (of course) are lovin' it. The only thing is you have an alternate carrier (cricket personally) and hate the fact that manually switching prl's or needing to change your EPST settings can be a pain (since CM7 has no EPST built-in!). Especially when its [*feature name here] that you would LIKE to have the ability to use, but can live without if it means having to restore (or flash one if you have no backups) a sense rom just to change any of your EPST (##778, etc) settings.

Well, if you know anything about QPST for windows (google), then you know that you need to have your phone in DIAG mode to use it (##3424) and have the hero diagnostic drivers installed on your windows machine. (For the record, I'm an Ubuntu man and my main machine is NOT dual boot, meaning I still have to switch to my windows laptop to use QPST >< but we'll just pretend you have windows and this is more convenient for *you*).

Back to the point, once you've realized all the hassle, yada yada, you just say, "Ill just fix it later, I can live without it for now." AND how sick you are of saying that, here is the solution to no longer switching ROM's for EPST, as there IS a way without the ability to ##3242 in CM7 to enable DIAG mode.
(NOTE: This is also useful for those of you already on CM7 WITH Verizon/Alltell who would like to follow the guide in the Development section Droid Incredible Wiki regarding switching to the whole Verizon PRL/Alltell Hybrid PRL, along with other guides involving EPST or ## codes found there)

Simply go to (via adb shell/terminal emulator) /sys/devices/virtual/usb_composite/diag and run (1 for on and 0 for off, respectively)
Code:
echo 1 > enable
echo 0 > enable
To simplify all this I've included a zip file which includes Gscript.apk for you to install, and two scripts in the Gscript directory (place entire Gscript directory on root of sdcard). Open Gscript application, then once open - menu button>add script>load file>diag on/off.sh>save for each script respectively. Then you can simply toggle on/off DIAG mode from the Gscript application (or even add shortcut>gscript>diag on/off from CM7 home screen, for each script respectively). And without further excess explanation, here's the .zip gscript_diagscripts.zip

By the way, if a mod reads this, could you please move to the Development section and remove my restriction? I know I don't have my whole 10 posts etc, etc, but I don't really have enough to say or the patience to say it most of the time to post 10 posts. However, I've lurked these boards and been rooting phones and flashing phones via this forum since my first android phone back from what feels like ages ago. (going on 4 rooted and flashed to cricket android phones now, all sold except my current, Dinc)


so wait let me get this straight. this mod is so we can update our prl??? or is this for people that would like to still run the altel hybrid prl?

because a simple *22899 will let you update it. i know this because i have been on cm7 nightly from day one and there was 1 update of the prl and it worked.
 

m4f1050

Senior Member
Apr 20, 2007
1,994
208
EVO + CM 7 + this solution = GO (GREEN LIGHT) WORKS.

Is there any way of running the ##3282# (if it's a file you run or an APK you install?)
 

tronoftroy

Member
Jun 11, 2010
47
9
Hows about this

i got one better for ya.

Code:
am start -a com.android.dmcommandservice.START -n com.android.dmportread/.DMPortActivity

what is so great about getting to Diag mode this way you say?

1. well it doesn't require root access.
2. its cross model supported. (well any model with the DMPortRead.apk installed which i have yet to see one without).

:)

btw you can do the ##3282# in the same way... the apk is call EPST.apk. just look in the Android-Manifest.xml for the info.
 
Last edited:

m4f1050

Senior Member
Apr 20, 2007
1,994
208
i got one better for ya.

Code:
am start -a com.android.dmcommandservice.START -n com.android.dmportread/.DMPortActivity

what is so great about getting to Diag mode this way you say?

1. well it doesn't require root access.
2. its cross model supported. (well any model with the DMPortRead.apk installed which i have yet to see one without).

:)

btw you can do the ##3282# in the same way... the apk is call EPST.apk. just look in the Android-Manifest.xml for the info.

Remember, Im on CM7 GingerBread, not SENSE....
 

hydrosity

New member
Mar 24, 2010
4
11
Ok so it should work on the EVO since the architecture is pretty much the same as the DINC. Now as far as it being for updating the PRL, yes it can be for that. But it is for people who need to use a program such as QPST or CDMA Workshop to change carrier based settings on their phones(IE the "flashing" [no not as in rom flashing, but carrier]). Where *228 and such is not a feasible replacement for doing so and would prevent their phone from functioning correctly, such as with mine which is flashed to cricket.

Any sort of *228 business breaks my cricket flash, and I used to have to make a backup and go back to restore a sense rom to go into the EPST app with ##778 or to be able to dial ##3424 to put the phone into DIAG mode where I could revise the settings again to make it function properly, THEN flash back since CM7 does not have the EPST.apk which supports both of these features.

With this you can avoid the whole hassle of all this if you have the QPST application for your PC by simply putting your phones DIAG mode ON or OFF. Where you can manually put in what ever PRL you want and manually set any carrier-specific settings. Not as convenient as EPST and its ##778 feature, but much more so than the previously described process.

ALSO I've now included all of this in a simple .zip file flashable from recovery to streamline this crude process a little more. Get it HERE. The file in the original post has been updated too.
 

tronoftroy

Member
Jun 11, 2010
47
9
Remember, Im on CM7 GingerBread, not SENSE....


if CM7 doesn't have DMPortRead.apk couldn't you just push it to you framework/app folder? or even install the apk and just run that when ever you need to connect to the Diag port? (for Qpst, or what ever you need it for) i'm not very familiar with CM7 so i could be wrong.

i use it to send my own serial commands. i find qpst to be more of a hassle then helpful. manuf. have been making there own NV items that are not listed in Qpst models for a while now. ie. the ERI banner for some hero's is not pulled from the usual eri.xml but instead read from the NV items. i think NV item 8042.

now, i while i was snooping around with the flash command. i notice that you can use "-s" (i think, i could be thinking of fastboot.) to specify your own memory location to flash an img file to.
now if we can find the mem location of the NV items you can simply read your entire NV items as an .img then use flash cmd to write all your NV items at once, and maybe even with the Recovery update.zip. im looking into the recovery source atm. if anyone knows where the NV items are stored plz let me know. is it mtd or mem location?
 
  • Like
Reactions: m4f1050

m4f1050

Senior Member
Apr 20, 2007
1,994
208
Can you check if you have the file /sys/devices/virtual/usb_composite/diag/enable? If you do.. Create a GScript that echoes 0 or 1 (0 for disable and 1 for enable) to the file /sys/devices/virtual/usb_composite/diag/enable it works like a charm!
 

m4f1050

Senior Member
Apr 20, 2007
1,994
208
if CM7 doesn't have DMPortRead.apk couldn't you just push it to you framework/app folder? or even install the apk and just run that when ever you need to connect to the Diag port? (for Qpst, or what ever you need it for) i'm not very familiar with CM7 so i could be wrong.

i use it to send my own serial commands. i find qpst to be more of a hassle then helpful. manuf. have been making there own NV items that are not listed in Qpst models for a while now. ie. the ERI banner for some hero's is not pulled from the usual eri.xml but instead read from the NV items. i think NV item 8042.

now, i while i was snooping around with the flash command. i notice that you can use "-s" (i think, i could be thinking of fastboot.) to specify your own memory location to flash an img file to.
now if we can find the mem location of the NV items you can simply read your entire NV items as an .img then use flash cmd to write all your NV items at once, and maybe even with the Recovery update.zip. im looking into the recovery source atm. if anyone knows where the NV items are stored plz let me know. is it mtd or mem location?

Hmmm... Can you write to NVItem 0,1 or 2 this way? :D
 

tronoftroy

Member
Jun 11, 2010
47
9
Hmmm... Can you write to NVItem 0,1 or 2 this way? :D

yes. you can write any nv item through DM Mode. well almost any.

i guess some call the NV item image file SPL???... poking about on the forums seems like you are unable to backup the radio and the nvitems maybe stored within. just a guess though.
 

m4f1050

Senior Member
Apr 20, 2007
1,994
208
yes. you can write any nv item through DM Mode. well almost any.

i guess some call the NV item image file SPL???... poking about on the forums seems like you are unable to backup the radio and the nvitems maybe stored within. just a guess though.

in EFS you can access NV items locked (on some HTC devices, tested with EVO 3D and EVO 4G) by creating folder "open sesame door" rebooting phone then going back to EFS the folder NVM should not have the lock, allowing you to see / write these NV items. So if you lack an easy to use NV Item browser you can use this approach.
 

Curious!

Senior Member
Feb 21, 2011
106
73
I am trying to get QPST working with Sensation.
After echo'ing 1 to enable, the USB modem driver shows up. I dunno which driver u have used but I am using this one: http://xdaforums.com/showthread.php?t=801570

and in QPST it doesn't recognize phone model so I can'T pull NV data from it.
any suggestions?

BTW I have QPST 2.7 Build 366
 

tronoftroy

Member
Jun 11, 2010
47
9
I am trying to get QPST working with Sensation.
After echo'ing 1 to enable, the USB modem driver shows up. I dunno which driver u have used but I am using this one: http://xdaforums.com/showthread.php?t=801570

and in QPST it doesn't recognize phone model so I can'T pull NV data from it.
any suggestions?

BTW I have QPST 2.7 Build 366

yeah, just open up your QPST Configuration. and set the Comport then your phone will show in QPST.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 11
    (UPDATE: 8/24/11 New flashable update.zip for install via recovery, includes Gscript (credit goes to PinkVenture for developing the app!) and my simple on/off scripts already installed. You can link shortcuts directly to the desktop for each ON or OFF through add shortcut on homescreen, see attachments at the end of this post)

    I'll start this off by mentioning that all the threads you may find saying "CM7 DIAG Enabled!" such as this one here Etc, are not valid solutions for OUR device. That may/may not work with the eris/hero(haven't tried) etc as those topics discuss. They merely SPECULATE it will for any CM7 based rom - it doesn't for ours.
    echo 1 > /dev/qct_diag_enable (to enable diag mode)

    ..and your phone should go into USB diag mode. when you are done just:

    echo 0 > /dev/qct_diag_enable (to disable diag mode)
    WONT DO ANYTHING for you. In fact, it made my "qct_diag_enable" file disappear. Scroll to the bottom to skip my bantering and explaining of the reason this is a useful feature for people like myself, and to just show the actual findings of this thread.

    So you have CM7 and (of course) are lovin' it. The only thing is you have an alternate carrier (cricket personally) and hate the fact that manually switching prl's or needing to change your EPST settings can be a pain (since CM7 has no EPST built-in!). Especially when its [*feature name here] that you would LIKE to have the ability to use, but can live without if it means having to restore (or flash one if you have no backups) a sense rom just to change any of your EPST (##778, etc) settings.

    Well, if you know anything about QPST for windows (google), then you know that you need to have your phone in DIAG mode to use it (##3424) and have the hero diagnostic drivers installed on your windows machine. (For the record, I'm an Ubuntu man and my main machine is NOT dual boot, meaning I still have to switch to my windows laptop to use QPST >< but we'll just pretend you have windows and this is more convenient for *you*).

    Back to the point, once you've realized all the hassle, yada yada, you just say, "Ill just fix it later, I can live without it for now." AND how sick you are of saying that, here is the solution to no longer switching ROM's for EPST, as there IS a way without the ability to ##3242 in CM7 to enable DIAG mode.
    (NOTE: This is also useful for those of you already on CM7 WITH Verizon/Alltell who would like to follow the guide in the Development section Droid Incredible Wiki regarding switching to the whole Verizon PRL/Alltell Hybrid PRL, along with other guides involving EPST or ## codes found there)

    Simply go to (via adb shell/terminal emulator) /sys/devices/virtual/usb_composite/diag and run (1 for on and 0 for off, respectively)
    Code:
    echo 1 > enable
    echo 0 > enable

    To simplify all this I've included a zip file which includes Gscript.apk for you to install, and two scripts in the Gscript directory (place entire Gscript directory on root of sdcard). Open Gscript application, then once open - menu button>add script>load file>diag on/off.sh>save for each script respectively. Then you can simply toggle on/off DIAG mode from the Gscript application (or even add shortcut>gscript>diag on/off from CM7 home screen, for each script respectively). And without further excess explanation, here's the .zip signed-diagscripts.zip flashable update.zip file for recovery

    By the way, if a mod reads this, could you please move to the Development section and remove my restriction? I know I don't have my whole 10 posts etc, etc, but I don't really have enough to say or the patience to say it most of the time to post 10 posts. However, I've lurked these boards and been rooting phones and flashing phones via this forum since my first android phone back from what feels like ages ago. (going on 4 rooted and flashed to cricket android phones now, all sold except my current, Dinc)
    2
    I'll start this off by mentioning that all the threads you may find saying "CM7 DIAG Enabled!" such as this one here Etc, are not valid solutions for OUR device. That may/may not work with the eris/hero(haven't tried) etc as those topics discuss. They merely SPECULATE it will for any CM7 based rom - it doesn't for ours.

    WONT DO ANYTHING for you. In fact, it made my "qct_diag_enable" file disappear. Scroll to the bottom to skip my bantering and explaining of the reason this is a useful feature for people like myself, and to just show the actual findings of this thread.

    So you have CM7 and (of course) are lovin' it. The only thing is you have an alternate carrier (cricket personally) and hate the fact that manually switching prl's or needing to change your EPST settings can be a pain (since CM7 has no EPST built-in!). Especially when its [*feature name here] that you would LIKE to have the ability to use, but can live without if it means having to restore (or flash one if you have no backups) a sense rom just to change any of your EPST (##778, etc) settings.

    Well, if you know anything about QPST for windows (google), then you know that you need to have your phone in DIAG mode to use it (##3424) and have the hero diagnostic drivers installed on your windows machine. (For the record, I'm an Ubuntu man and my main machine is NOT dual boot, meaning I still have to switch to my windows laptop to use QPST >< but we'll just pretend you have windows and this is more convenient for *you*).

    Back to the point, once you've realized all the hassle, yada yada, you just say, "Ill just fix it later, I can live without it for now." AND how sick you are of saying that, here is the solution to no longer switching ROM's for EPST, as there IS a way without the ability to ##3242 in CM7 to enable DIAG mode.
    (NOTE: This is also useful for those of you already on CM7 WITH Verizon/Alltell who would like to follow the guide in the Development section Droid Incredible Wiki regarding switching to the whole Verizon PRL/Alltell Hybrid PRL, along with other guides involving EPST or ## codes found there)

    Simply go to (via adb shell/terminal emulator) /sys/devices/virtual/usb_composite/diag and run (1 for on and 0 for off, respectively)
    Code:
    echo 1 > enable
    echo 0 > enable
    To simplify all this I've included a zip file which includes Gscript.apk for you to install, and two scripts in the Gscript directory (place entire Gscript directory on root of sdcard). Open Gscript application, then once open - menu button>add script>load file>diag on/off.sh>save for each script respectively. Then you can simply toggle on/off DIAG mode from the Gscript application (or even add shortcut>gscript>diag on/off from CM7 home screen, for each script respectively). And without further excess explanation, here's the .zip gscript_diagscripts.zip

    By the way, if a mod reads this, could you please move to the Development section and remove my restriction? I know I don't have my whole 10 posts etc, etc, but I don't really have enough to say or the patience to say it most of the time to post 10 posts. However, I've lurked these boards and been rooting phones and flashing phones via this forum since my first android phone back from what feels like ages ago. (going on 4 rooted and flashed to cricket android phones now, all sold except my current, Dinc)


    so wait let me get this straight. this mod is so we can update our prl??? or is this for people that would like to still run the altel hybrid prl?

    because a simple *22899 will let you update it. i know this because i have been on cm7 nightly from day one and there was 1 update of the prl and it worked.
    2
    Diag Mode for ICS room
    echo 1 > /sys/devices/virtual/android_usb/android0/f_diag/on

    echo 0 > /sys/devices/virtual/android_usb/android0/f_diag/on
    1
    Remember, Im on CM7 GingerBread, not SENSE....


    if CM7 doesn't have DMPortRead.apk couldn't you just push it to you framework/app folder? or even install the apk and just run that when ever you need to connect to the Diag port? (for Qpst, or what ever you need it for) i'm not very familiar with CM7 so i could be wrong.

    i use it to send my own serial commands. i find qpst to be more of a hassle then helpful. manuf. have been making there own NV items that are not listed in Qpst models for a while now. ie. the ERI banner for some hero's is not pulled from the usual eri.xml but instead read from the NV items. i think NV item 8042.

    now, i while i was snooping around with the flash command. i notice that you can use "-s" (i think, i could be thinking of fastboot.) to specify your own memory location to flash an img file to.
    now if we can find the mem location of the NV items you can simply read your entire NV items as an .img then use flash cmd to write all your NV items at once, and maybe even with the Recovery update.zip. im looking into the recovery source atm. if anyone knows where the NV items are stored plz let me know. is it mtd or mem location?