[USBManagerProfile][UsbADBUsage] Error in setting a USB feature. Proxy API returned false for UsbADBUsage

Hello everyone!

I'm following this example Manage USB Configurations - Zebra Technologies TechDocs  to have ADB switched on application startup.

I'm doing everything step-by-step and reached a point where I cannot overcome error message:

-- Proxy API returned false for UsbADBUsage

<?xml version="1.0" encoding="UTF-8"?><wap-provisioningdoc><characteristic type="status"><parm name="code" value="6"/><parm name="description" value="Review the XML for details"/><characteristic type="extended_status"><parm name="code" value="0"/><parm name="description" value=""/></characteristic></characteristic><characteristic-error type="UsbMgr" version="4.4" desc="Error in setting a USB feature"><parm-error name="UsbADBUsage" value="1" desc="Proxy API returned false for UsbADBUsage"/></characteristic-error></wap-provisioningdoc>

The profile is applied if I change value for USBModuleUsage in example, but ADB does not let me to do so.

Does anyone know what can be the problem? Should I do something on the device as well?

I have Zebra TC51 with OSX version QCT.717.4.7 and MXMF version: 7.1.2.1. Android version: 7.1.

My profile looks like this:

<?xml version="1.0" encoding="UTF-8"?><!--This is an auto generated document. Changes to this document may cause incorrect behavior.--><wap-provisioningdoc>
  <characteristic type="ProfileInfo">
  <parm name="created_wizard_version" value="7.0.0"/>
  </characteristic>
  <characteristic type="Profile">
  <parm name="ProfileName" value="USBManagerProfile"/>
  <parm name="ModifiedDate" value="2018-11-14 12:07:24"/>
  <parm name="TargetSystemVersion" value="7.1"/>
  <characteristic type="UsbMgr" version="4.4">
  <parm name="emdk_name" value="HHTUSBManager"/>
  <parm name="UsbADBUsage" value="1"/>
  </characteristic>
  </characteristic>
</wap-provisioningdoc>

I'd be very thankful for any help!

Javier Molina
USB Module Usage is a pre

USB Module Usage is a pre-requisite to configuring ADB so it needs to be enabled. If you add UsbModuleUsage to your profile so it contains both UsbModuleUsage and then also UsbADBUsage, does it work?

Javier Molina

Technical Architect, Kutir Mobility

Posted on behalf of Zebra Technologies

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Iurii Rodyk
Hi Javier,Thanks for your

Hi Javier,

Thanks for your reply!

I tried different variations: enable only UsbModuleUsage, enable both UsbModuleUsage  with ADB, ADB only.

None of these give positive outcome. Solely UsbModuleUsage is working, but ADB is not in any combination above.

I also tried with StageNow. It gives the same error. I have 2 devices to test, so this problem has to be a general one.

Thanks,

Iurii

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Javier Molina
Iurii,If you copied and

Iurii,

If you copied and pasted the sample code at Manage USB Configurations - Zebra Technologies TechDocs  as-is, it won't work.

In the updateUSBSettings method, the value of modifyData[0] is being set incorrectly. Instead of the proper angle brackets < >, those have beein replaced with the entities &lt; and &gt;. That is incorrect.

Please replace the assignment of modifyData[0] to the following:

            modifyData[0] = "<?xml version=\"1.0\" encoding=\"utf-8\"?>"

                    + "<characteristic type=\"Profile\">"

                    + "<parm name=\"ProfileName\" value=\"USBManagerProfile\"/>"

                    + "<characteristic type=\"UsbMgr\">"

                    + "<parm name=\"UsbADBUsage\" value=\"" + value + "\"/>"

                    + "</characteristic>" + "</characteristic>";

I have tested it and with that change it works; please confirm if it works for you as well.

Javier Molina

Technical Architect, Kutir Mobility

Posted on behalf of Zebra Technologies

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Iurii Rodyk
Unfortunately, I did it this

Unfortunately, I did it this way from the beginning. Note, I had proper brackets and second approach, I didn't modify data, but use generated profile only.

I believe this is a problem on these specific devices. Some software update or additional security patch installed. Factory reset doesn't help either.

Regards,

Iurii

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Javier Molina
Just to be 100% sure we're

Just to be 100% sure we're running the same thing, I'm attaching the project I ran - this one worked on a TC51 on:

  • Android 7.1.2
  • LifeGuard Update 13 (November 2018)
  • OSX QCT.71.7.8
  • MXMF 8.2.3.1

Please run it on your TC51 and let's see whether it works as expected or it gives you an error as well.

Javier Molina

Technical Architect, Kutir Mobility

Posted on behalf of Zebra Technologies

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Iurii Rodyk
Everything worked after I got

Everything worked after I got a safeguard update. Not sure what was the core reason, but I guess that was the cause.

Thanks for support!

Cheers,

Iurii

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Log in to post comments