Scan2Deploy: how to deploy json file with ADB intent?

Hello

Following the links here:

I have created a json file that i want to import into a device by adb settings.

I tried to import it with these 2 intent commands but with no succes:

adb shell am broadcast -a datalogic.scan2deploy.intent.action.START_SERVICE -n “com.datalogic.scan2deploy/.S2dServiceReceiver” --es encoding json --es json-path /sdcard/File.json

adb shell am start -S -n com.datalogic.scan2deploy/.MainActivity -e json-path /sdcard/File.json

Can you help me get the good adb command so i can import a json file into a device ?

The goal here is to modify some json file (like for Static IP in WiFi configuration) before importing them.

Regards.
Arnaud

Hello @SSE_MOBILITY,

Welcome to our forum!

adb shell am start -S -n com.datalogic.scan2deploy/.MainActivity -e json-path /sdcard/File.json

Using a JSON file is actually not supported from the MainActivity, so this will not work.

adb shell am broadcast -a datalogic.scan2deploy.intent.action.START_SERVICE -n “com.datalogic.scan2deploy/.S2dServiceReceiver” --es encoding json --es json-path /sdcard/File.json

After placing a JSON at the specified location, I copy and pasted this command and it worked.
The most likely reason that this would not be working is if the UI of Scan2Deploy Agent is open.
To close the UI of Agent, press the square button on your navigation bar, find Agent and drag it up.
Or run adb shell pm clear com.datalogic.scan2deploy

Drew Hugentobler
L3 Mobile Computer Specialist Support Engineer

1 Like

Hi Arnoud,

In addition to Drews answer have a look at this (not official tool);

The version 7.2 and higher have support for automatic copy and launching S2DS json files.

Gr Peter