USB Diag Mode - HTC 10 Questions & Answers

Has anyone been able to access the USB diagnostics on the 10? Usually it's ##3424## but it either changed or it's blocked. I tried multiple ROMs with same results.

Cakeor314 said:
Has anyone been able to access the USB diagnostics on the 10? Usually it's ##3424## but it either changed or it's blocked. I tried multiple ROMs with same results.
Click to expand...
Click to collapse
Use *#*#3424#*#*

purple patch said:
Use *#*#3424#*#*
Click to expand...
Click to collapse
Tried it. This gives you the functions test, not USB diagnostics.

Cakeor314 said:
Tried it. This gives you the functions test, not USB diagnostics.
Click to expand...
Click to collapse
Oh cool, that was just in memory lol. Can you use an app for diagnostic, not sure what you want to test. The only other one is *#*#4636#*#* I think.

purple patch said:
Oh cool, that was just in memory lol. Can you use an app for diagnostic, not sure what you want to test. The only other one is *#*#4636#*#* I think.
Click to expand...
Click to collapse
I don't think an app will work, thanks though. I'm trying to unlock the Canadian LTE bands. I just need to put the phone in USB diagnostics mode so I can use the modem tools on it.

Cakeor314 said:
Has anyone been able to access the USB diagnostics on the 10? Usually it's ##3424## but it either changed or it's blocked. I tried multiple ROMs with same results.
Click to expand...
Click to collapse
dude, i have the same question as you. i wanna enable the band 12 on my htc 10 unlocked version since i convert it to verizon RUU and sometimes wanna switch between my verizon and Tmobile sim cards. if i flash verizon RUU i cannot get band 12 but if i flash unlocked ruu i cannot get CDMA!!
---------- Post added at 09:21 AM ---------- Previous post was at 09:16 AM ----------
i am not sure whether this rom flash will work on that band problem but it says all carrier support
http://forum.xda-developers.com/htc-10/development/rom-21-02-viper10-1-0-0-tweaks-hub-t3379151

Has anyone figured out how to enable DM mode on the US Unlocked model? On Sprint and Verizon ##3424# works just fine.

Cakeor314 said:
Has anyone been able to access the USB diagnostics on the 10? Usually it's ##3424## but it either changed or it's blocked. I tried multiple ROMs with same results.
Click to expand...
Click to collapse
any luck on enabling diag mode on HTC 10?
i've tried the command bellow but its no luck.
Code:
adb shell
su
echo 1 > /sys/devices/virtual/android_usb/android0/f_diag/func_en

kenter said:
any luck on enabling diag mode on HTC 10?
i've tried the command bellow but its no luck.
Code:
adb shell
su
echo 1 > /sys/devices/virtual/android_usb/android0/f_diag/func_en
Click to expand...
Click to collapse
adb shell "su -c 'setprop sys.usb.config rndis,diag,modem'"
or
adb shell "su -c 'setprop sys.usb.config adb,diag,acm'"

b8engl said:
adb shell "su -c 'setprop sys.usb.config rndis,diag,modem'" or adb shell "su -c 'setprop sys.usb.config adb,diag,acm'"
Click to expand...
Click to collapse
thanks mate. but already move from HTC 10. i do appreciate that

b8engl said:
adb shell "su -c 'setprop sys.usb.config rndis,diag,modem'"
or
adb shell "su -c 'setprop sys.usb.config adb,diag,acm'"
Click to expand...
Click to collapse
that worked for my htc 10 being recognized by nvr tools
but how do i revert this command? or better say, how do i turn off diag mode, magisk seems to crash at viewing my logs because of this

cigarpill said:
that worked for my htc 10 being recognized by nvr tools
but how do i revert this command? or better say, how do i turn off diag mode, magisk seems to crash at viewing my logs because of this
Click to expand...
Click to collapse
just replace the last entries...
adb shell "su -c 'setprop sys.usb.config adb,diag,acm'"
adb shell "su -c 'setprop sys.usb.config mtp,adb'"

Related

Setting Up Adb on Mac *CLOSED*

I have my Evo rooted with DC 3.1.1 and I also have Nand Unlock via Toasts Way. But I did all of this using Windows. I already installed Android SDK for Mac. But every time I try to execute a command after I do the cd /android-sdk/tools. It just says -bash: adb: command not found. Can anyone give me a hand?
same issue for me
nitty917 said:
same issue for me
Click to expand...
Click to collapse
If you need help. PM Me.
Use ./adb instead of adb
BearCavalry said:
Use ./adb instead of adb
Click to expand...
Click to collapse
That wont help at all.

[REF] Disable Wifi On Screen Off

Some people have picked up an annoying bug - I'm not sure where it comes from, some believe it is the voodoo kernel, I think it is probably JPC firmware or similar.
The bug: When you have wifi on and you turn the screen off, wifi does not turn off like it should.
The reality: The wifi turn-off time has been reset to the android default 15 minutes. You can change this setting if you want. (I like 10 seconds myself.)
You will need:
1. ADB root shell access.
2. SQLite3 Explorer - http://www.singular.gr/sqlite/
or SQLiteBrowser - http://sqlitebrowser.sourceforge.net/
What to do:
1. shell command: busybox cp /dbdata/databases/com.android.providers.settings/settings.db /sdcard/settings.db
2. adb command: adb pull /sdcard/settings.db
3. Open settings.db in SQLExplorer
4. Right click on gservices or secure folders**, choose 'Show Data'
5. Click on the green plus icon "Insert Record"
6. Double click on name column, insert "wifi_idle_ms" - Double click on value column and insert "10000" for 10 seconds for wifi to turn off. 30000 for 30 seconds, etc.
7. Click on the green tick.
8. Right click on the folder again, choose show data, scroll to the bottom and ensure that your change has been made.
9. File -> Close Database
10. adb command: adb push settings.db /sdcard/settings.db
11. shell command: busybox mv /dbdata/databases/com.android.providers.settings/settings.db /dbdata/databases/com.android.providers.settings/settings.db.bak
12. shell command: busybox cp /sdcard/settings.db /dbdata/databases/com.android.providers.settings/settings.db
13. shell command: chown system.system /dbdata/databases/com.android.providers.settings/settings.db
** I'm not sure if the correct folder is gservices, or secure. I believe secure is the correct one though. I just added it to both.
This is too hard:
If there are 10 or more people who have this bug but can't do the required fix, I'll make a small utility to do it for you. Let me know.
Guess I'm one of the few who really likes this feature/"bug."
kareeem said:
Guess I'm one of the few who really likes this feature/"bug."
Click to expand...
Click to collapse
If you like this bug, you might like this even more!
Settings->Wireless and network->Wi-Fi settings->menu button->Advanced->Wi-Fi sleep policy set to never
Code:
D/WifiService( 2333): setting ACTION_DEVICE_IDLE timer for 900000ms.
RyanZA said:
:
If there are 10 or more people who have this bug but can't do the required fix, I'll make a small utility to do it for you. Let me know.
Click to expand...
Click to collapse
Had a quick google but how do I get my adb shell into root? The rest makes sense.
Really i dont understand why people are so fuzzed about this "bug".Im really happy with it because at home i always use wiffi and usually i stay at home in the afternoons.So i set wiffi settings to never disconect even at night.Data connection over 3g is expensive here in portugal and i have 600mb month limit wich cost about 15 euro plus my normal bill.And its not by having wifi on during 15 minutes that will drain the battery so much.Anyways i want to thank you again for your work and dedication to help people like me that have some dificulties understanding how the android system works.
Treggs said:
Had a quick google but how do I get my adb shell into root? The rest makes sense.
Click to expand...
Click to collapse
adb shell
su
confirm in SuperUser.
done.
xan said:
adb shell
su
confirm in SuperUser.
done.
Click to expand...
Click to collapse
Ah, missed the prompt on the phone. Thanks.
fane1 said:
Really i dont understand why people are so fuzzed about this "bug".
Click to expand...
Click to collapse
Becuae WIFI, uses more battery, when not being used for data, than 3G does.
ANdpossibly, why peoples batteries, are draining so much
fane1 said:
Really i dont understand why people are so fuzzed about this "bug".Im really happy with it because at home i always use wiffi and usually i stay at home in the afternoons.So i set wiffi settings to never disconect even at night.Data connection over 3g is expensive here in portugal and i have 600mb month limit wich cost about 15 euro plus my normal bill.And its not by having wifi on during 15 minutes that will drain the battery so much.Anyways i want to thank you again for your work and dedication to help people like me that have some dificulties understanding how the android system works.
Click to expand...
Click to collapse
If you want, you can use the guide to increase it up to 30 minutes or more. Point is - choice is good.
I am having trouble getting this to work
I am typing
adb pull /sdcard/settings.db
and I am getting
abd: not found
?
This is what I have done,
Opened CMD, in the adb folder.
adb shell
su
accepted SU permissions
#busybox cp /dbdata/databases/com.android.providers.settings/settings.db /sdcard/settings.db
#adb pull /sdcard/settings.db
Am I doing something wrong ?
JaGuR said:
This is what I have done,
Opened CMD, in the adb folder.
adb shell
su
accepted SU permissions
#busybox cp /dbdata/databases/com.android.providers.settings/settings.db /sdcard/settings.db
#adb pull /sdcard/settings.db
Am I doing something wrong ?
Click to expand...
Click to collapse
Nope worked for me. I'm trying to figure out how to edit the file....
Do I need USB debugging on ?
JaGuR said:
Do I need USB debugging on ?
Click to expand...
Click to collapse
Yep
10 char
ryanza, thanks for finding this out. tried but cant get sq3liteexplorer to work on win7 64. i get access violation errors.
hope you'll do a simple script for this. [email protected]
sunwee said:
ryanza, thanks for finding this out. tried but cant get sq3liteexplorer to work on win7 64. i get access violation errors.
hope you'll do a simple script for this. [email protected]
Click to expand...
Click to collapse
I thought I was doing it wrong but that's exactly what I'm getting and I'm on win 7 64 too.
Maybe I should try a compatibility mode...
sunwee said:
ryanza, thanks for finding this out. tried but cant get sq3liteexplorer to work on win7 64. i get access violation errors.
hope you'll do a simple script for this. [email protected]
Click to expand...
Click to collapse
Same here to RyanZA, having trouble gettin ADB, to play corrcetly.
And I know few from whirlpool. that would also appreciate, and easier fix
Cheers
JaGuR said:
This is what I have done,
Opened CMD, in the adb folder.
adb shell
su
accepted SU permissions
#busybox cp /dbdata/databases/com.android.providers.settings/settings.db /sdcard/settings.db
#adb pull /sdcard/settings.db
Am I doing something wrong ?
Click to expand...
Click to collapse
you need to exit before using adb pull
jdrake001 said:
you need to exit before using adb pull
Click to expand...
Click to collapse
Exit from what ?
I just copying what I see in the opening post, and outside of that have NO understaning

ADB cmd question(NOOB)

As this is my first time on XDA and im new to cmd.
I've been been trying to use XDA as my last resort, but here I am.
My question is i want to make a cmd script like a batch or however you call it but, I'll just jump to my question and tell you, i type in
adb devices
@echo off
set /p answer=Do you see your device? (Y/N):
pause
cls
adb shell
su
The problem is it that it doesnt go to my su command.
PLEASE HELP!!
I know after this i'll feel stupid
delijestefan said:
As this is my first time on XDA and im new to cmd.
I've been been trying to use XDA as my last resort, but here I am.
My question is i want to make a cmd script like a batch or however you call it but, I'll just jump to my question and tell you, i type in
adb devices
@echo off
set /p answer=Do you see your device? (Y/N):
pause
cls
adb shell
su
The problem is it that it doesnt go to my su command.
PLEASE HELP!!
I know after this i'll feel stupid
Click to expand...
Click to collapse
try using this:
echo "Do You See your device?(Y/N)"
read ans
if ans==Y;
then
adb shell
su
You will need to add semicolons wherver requires.Been a long time since i did batch programming so dont remember.
manasgirdhar said:
try using this:
echo "Do You See your device?(Y/N)"
read ans
if ans==Y;
then
adb shell
su
You will need to add semicolons wherver requires.Been a long time since i did batch programming so dont remember.
Click to expand...
Click to collapse
Thanks for replying but nah it didn't work, im getting so frustrated, but i'll keep trying on my own until i find a way
the command is:
adb shell "su"
okty2k said:
the command is:
adb shell "su"
Click to expand...
Click to collapse
Thanks for replying but yeah it works but after that none of my commands show up and even when i try to manually type i cant :|

[ROOT] Disable charging LED

If anyone wants to disable charging LED, here's an easy way via Tasker.
Note: notifications will not cause LED to blink while charging
State, power, power any
Enter task:
1. run shell as root, "chmod 644 /sys/class/leds/red/brightness"
2. run shell as root, "echo 0 > /sys/class/leds/red/brightness"
3. run shell as root, "chmod 444 /sys/class/leds/red/brightness"
Exit task:
1. run shell as root, "chmod 644 /sys/class/leds/red/brightness"
2. run shell as root, "echo 0 > /sys/class/leds/red/brightness"
Hi! Thanks for sharing. I am getting the following error:
23.21.58/E Run Shell: ->
23.21.58/E Run Shell: ->
23.21.58/E Run Shell: ->
23.21.58/Shell runBackground "chmod 644 /sys/class/leds/red/brigthness" root: true timeout: -1
23.21.58/Shell start process-thread ID 725
23.21.58/E add wait type Shell1 time 2147483647
23.21.58/E add wait type Shell1 done
23.21.58/E add wait task
23.21.58/E Error: 127
Am I doing something wrong?
Thanks!
Dj Telo said:
Hi! Thanks for sharing. I am getting the following error:
23.21.58/E Run Shell: ->
23.21.58/E Run Shell: ->
23.21.58/E Run Shell: ->
23.21.58/Shell runBackground "chmod 644 /sys/class/leds/red/brigthness" root: true timeout: -1
23.21.58/Shell start process-thread ID 725
23.21.58/E add wait type Shell1 time 2147483647
23.21.58/E add wait type Shell1 done
23.21.58/E add wait task
23.21.58/E Error: 127
Am I doing something wrong?
Thanks!
Click to expand...
Click to collapse
Does Tasker have root access? Check it in Magisk/superuser section.
_mysiak_ said:
Does Tasker have root access? Check it in Magisk/superuser section.
Click to expand...
Click to collapse
Yes it does. I can even execute other shell commands with root without problem. Is the command you are giving maybe only valid with Nougat and not Oreo?
Thanks!
Dj Telo said:
Yes it does. I can even execute other shell commands with root without problem. Is the command you are giving maybe only valid with Nougat and not Oreo?
Thanks!
Click to expand...
Click to collapse
Oups, my bad, sorry for the typo in the instructions. It has to be brigHTness, not brigTHness.
Will this work on the Mi A3 too?
And will the notification led still blink when not charging the phone?
Thank you
DBuffon said:
Will this work on the Mi A3 too?
And will the notification led still blink when not charging the phone?
Thank you
Click to expand...
Click to collapse
I don't have rooted A3 at hand, so can't try it. It might work, there is no harm in sending those commands over adb shell as root user. You will see the result immediately.
Sent from my Mi A1 using Tapatalk
_mysiak_ said:
I don't have rooted A3 at hand, so can't try it. It might work, there is no harm in sending those commands over adb shell as root user. You will see the result immediately.
Click to expand...
Click to collapse
Ok, I'll try but I don't understand the following:
_mysiak_ said:
State, power, power any
Enter task:
1. run shell as root, "chmod 644 /sys/class/leds/red/brightness"
2. run shell as root, "echo 0 > /sys/class/leds/red/brightness"
3. run shell as root, "chmod 444 /sys/class/leds/red/brightness"
Exit task:
1. run shell as root, "chmod 644 /sys/class/leds/red/brightness"
2. run shell as root, "echo 0 > /sys/class/leds/red/brightness"
Click to expand...
Click to collapse
Are the "Enter task" the code that should be run when the charging cable connects to the phone and the "Exit task" the one that runs when unplugging the cable?
I don't understand what this code does, and I don't want to mess up the led (that is: before I proceed, I want to know how to revert if things don't go as they should). Thank you.
DBuffon said:
Ok, I'll try but I don't understand the following:
Are the "Enter task" the code that should be run when the charging cable connects to the phone and the "Exit task" the one that runs when unplugging the cable?
I don't understand what this code does, and I don't want to mess up the led (that is: before I proceed, I want to know how to revert if things don't go as they should). Thank you.
Click to expand...
Click to collapse
Enter and exit tasks are for Tasker. If you want to try the commands from adb shell, enter those mentioned in "entry task" first and check if LED stopped glowing. To restore the original state enter commands from "exit task" (or just reboot the phone). Changes are not permanent.
Commands do the following - enable RW access to LED control, set intensity to 0%, disable RW access.
_mysiak_ said:
Enter and exit tasks are for Tasker. If you want to try the commands from adb shell, enter those mentioned in "entry task" first and check if LED stopped glowing. To restore the original state enter commands from "exit task" (or just reboot the phone). Changes are not permanent.
Commands do the following - enable RW access to LED control, set intensity to 0%, disable RW access.
Click to expand...
Click to collapse
Great, thanks for the information.
Unfortunately I can't issue the commands (sorry, I'm new to the adb shell):
Code:
[email protected]:~$ adb shell chmod 644 /sys/class/leds/red/brightness
chmod: /sys/class/leds/red/brightness: Permission denied
[email protected]:~$ adb root
adbd cannot run as root in production builds
DBuffon said:
Great, thanks for the information.
Unfortunately I can't issue the commands (sorry, I'm new to the adb shell):
Code:
[email protected]:~$ adb shell chmod 644 /sys/class/leds/red/brightness
chmod: /sys/class/leds/red/brightness: Permission denied
[email protected]:~$ adb root
adbd cannot run as root in production builds
Click to expand...
Click to collapse
adb shell
su
chmod ....
It works on the A3 too. Thanks!
In my mi A1, revengeos android 9, in enter task, 2th step go in error
d_borghi said:
In my mi A1, revengeos android 9, in enter task, 2th step go in error
Click to expand...
Click to collapse
What kind of error..?
_mysiak_ said:
What kind of error..?
Click to expand...
Click to collapse
Allego
d_borghi said:
Allego
Click to expand...
Click to collapse
Try to run that command from terminal on the phone (or via ADB) as root. Alternatively, store the error message in some variable in Tasker and display it, so we know why exactly does it fail. On my phone it still works fine (Mi A3 now).
how can i try by an emulator terminal app in my phone directly?
d_borghi said:
how can i try by an emulator terminal app in my phone directly?
Click to expand...
Click to collapse
Install and run for example this app https://play.google.com/store/apps/details?id=yarolegovich.materialterminal&hl=en
_mysiak_ said:
Install and run for example this app https://play.google.com/store/apps/details?id=yarolegovich.materialterminal&hl=en
Click to expand...
Click to collapse
Finally, I try the app.
By this terminal I receive no error, look at the screenshot.
Why tasker goes in error?
d_borghi said:
Finally, I try the app.
By this terminal I receive no error, look at the screenshot.
Why tasker goes in error?
Click to expand...
Click to collapse
Could you take a screenshot of the details in Tasker for that one task which gives you an error? Maybe you have a typo there.

how to enter diagnostic mode in LOS14.1

i want to enter diagnostic mode in LOS14.1, i use command:
setprop sys.usb.config diag,adb
but it didn't work, pls help me,thk
kirtikhurana said:
Use this
Click to expand...
Click to collapse
i have try,but nothing change
kirtikhurana said:
you should be rooted unless it won't work.
Click to expand...
Click to collapse
i rooted,but these command work for lenovo offical rom,such as 048,062,232,244,251,not on los,any suggestion?
kirtikhurana said:
before that command i told. write the two.
adb shell
su
then diag commands.
during these commands your phone will prompt to grant permissions. Tap OK/Yes on phone
*remember to check Android bebugging Is ON in developer settings.
Even if you're unsuccessful you're probably doing wrong.
Click to expand...
Click to collapse
bro,setprop should be root,i know it,i use successful in lenovo offical rom, i told you,my question is: why not work for los,can you check it?

Categories

Resources