Skip navigation

Android Blogs

10 Posts authored by: Ian Hatton

Overview

This blog details the process required to create a NFC pairing tag for most Bluetooth devices in order to allow tap to pair without any additional software i.e. using the integrated Android tap and pair functionality. This has been tested on various Zebra Android devices using KitKat OS onwards (including Nougat). The utilities required to create the pairing barcode are included in the file set which can be deployed onto any Zebra NFC-capable Android with a preconfigured Internet connection by scanning the StageNow barcodes below and also attached to this post.  The StageNow exported profile is also available at :  http://moto.airsetup.com/2017/nfc%20pairing/mpos_demo.zip .

 

This has currently been tested for pairing with the following Zebra hardware :

  1.       Zebra MZ/iMZ printers - need a new tag to replace the integrated tag since that has a proprietary format
  2.       RFD8500 - should be configured to accept pairing silently in order to avoid the requirement to press the trigger to complete the pairing
  3.       CS4070 – enable simple pairing in the config.ini file via changing the line below:

 

HIDSecurity=Low

 

  1.       RS6000 – the embedded NFC tag in the RS6000 is already in the correct format for this pairing i.e. to just tap to pair on a Zebra device.

 

Usage

  1.      Pair target Bluetooth device manually
  2.      Run the supplied Bluetooth Device Info app to display the MAC address for the paired device:

 

    3.   Click the device address to copy the MAC address to the clipboard

    4.   Run NFC TagWriter

    5.   Select MyDatasets and click on the import icon on the top menubar as circled below:

 

 

6.    Select and hold the zebra.twdb file as shown below:

 

 

7.   Sample tag will now be available for edit via click and hold on the tag entry and then select Copy and Edit from the resulting menu:

 

 

8.    Edit the name/MAC address as shown below. The required MAC address can be clearing the current address and then click and hold to paste the new address (copied via the Bluetooth Device Info utility). Device class should be left to default i.e. ‘Not Set’. Click Done when edit is finished.

 

 

 

9.    Click modified tag entry and select Write to write to a NFC tag. Uncheck the ‘confirm overwrite’ option and approach the required NFC tag to write the new contents. Apply NFC tag to target Bluetooth device. Check that device is powered on and in pairing mode (this is default for Zebra printers i.e. pairing is enabled when the device is powered on and it is not already paired with another device.

 

10.   Make sure that target device is unpaired via Bluetooth Settings menu and that NFC is enabled. Press Home button to return to Android launcher. Read NFC tag and you should see a small toast message to indicate pairing has started and optionally , a popup asking for the PIN entry :

 

 

11.   Pairing completes as expected and the device is usable for printing  etc. Note that for some devices (e.g. CS4070) it may be necessary to manually press the device name in the Bluetooth list on the Android device in order to complete the connection and pairing process.

 

12.   On older devices such as the TC55 , you may see a spurious error message below but the pairing will have completed as expected so this can be ignored.

 

The instructions below and attached utility show how the LifeGuard patch version can be accessed in the SOTI MobiControl console which allows tracking of which patch version is applied to devices under SOTI management. Note that not all Zebra Android devices report the patch version but it should work on all devices running Lollipop or later OS builds.

 

Note : this utility is unsupported i.e. use at your own risk

 

1.       Install and run GetPatchVer.apk. This will write the patchver.ini file in the root of the internal sdcard each time it is run.

 

2.      In MobiControl console , right click on the target device to access menu and then select Advanced Settings/Custom Data

3.      Click Override Settings Inherited from Parent Group and select Enable Custom Data Configuration – Click New to create new custom data collection rule

 

 

4.        Enter name and Build Expression as shown below

 

 

 

5.    Once custom data rule is defined, force device to reconnect and custom data should appear in Information panel as shown below

 

Summary

The purpose of this utility is to display the Electronic Serial Number (ESN) of a Zebra Android device in the title bar of EHS. This allows the user to identify the device for the purposes of problem reporting etc. The utility works by patching the existing enterprisehomescreen.xml file with the ESN , replacing the Title Bar text (which by default is ‘Enterprise Home Screen’) with the ESN. The utility can be autorun by EHS during initial load so that the ESN is visible immediately the device boots up to the EHS launcher as shown in the screenshot below:

 

ehs1.png

 

Usage

To demonstrate this in action, the attached StageNow centralised profile (rem_ehs2dot6_esn.pdf , original exported profile also attached) will download and install EHS together with the utility on any Zebra Android device with a pre-configured internet connection.

 

To install the utility manually, follow these steps:

  1. 1.      Download and install the attached GetESN.apk utility
  2. 2.       Edit your EHS config file enterprisehomescreen.xml (which needs to be located in /enterprise/usr) file to include the following in the auto launch section:

<auto_launch>

                <application delay="500" package="com.ih.getesn" activity="com.ih.getesn.main"/>

  </auto_launch>

  1. 3.       Install EHS – utility should run during initial start of EHS and show the ESN in the title bar.

 

Please note that this is an unofficial utility and therefore unsupported i.e. use at your own risk .

print1.png

print2.png

print3.png

 

 

print4.png

 

print5.png

print6.png

print7.png

 

print8.png

 

print9.png

Some customers would like to use Google Maps (and possibly Gmail and Chrome) but to hide the other GMS applications which are installed in the GMS OS builds :

 

blog1_pic1.png

 

The AppMgr CSP provides a straightforward way to disable these apps via either StageNow or the EMDK. Using StageNow a profile can be created which selectively disables each app using the package name which you can query using the command ‘adb shell pm list packages’:

 

blog1_pic2.png

 

 

 

The relevant package names for GMS apps are as shown in the XML extract below:

 

<characteristic version="4.2" type="AppMgr">

<parm name="Action" value="DisableApplication" />

<parm name="Package" value="com.google.android.youtube" />

</characteristic>

<!--SettingID=309-->

<characteristic version="4.2" type="AppMgr">

<parm name="Action" value="DisableApplication" />

<parm name="Package" value="com.google.android.music" />

</characteristic>

<!--SettingID=310-->

<characteristic version="4.2" type="AppMgr">

<parm name="Action" value="DisableApplication" />

<parm name="Package" value="com.google.android.play.games" />

</characteristic>

<!--SettingID=311-->

<characteristic version="4.2" type="AppMgr">

<parm name="Action" value="DisableApplication" />

<parm name="Package" value="com.google.android.apps.books" />

</characteristic>

<!--SettingID=312-->

<characteristic version="4.2" type="AppMgr">

<parm name="Action" value="DisableApplication" />

<parm name="Package" value="com.google.android.videos" />

</characteristic>

<!--SettingID=313-->

<characteristic version="4.2" type="AppMgr">

<parm name="Action" value="DisableApplication" />

<parm name="Package" value="com.google.android.talk" />

</characteristic>

<!--SettingID=314-->

<characteristic version="4.2" type="AppMgr">

<parm name="Action" value="DisableApplication" />

<parm name="Package" value="com.google.android.apps.docs" />

</characteristic>

<!--SettingID=315-->

<characteristic version="4.2" type="AppMgr">

<parm name="Action" value="DisableApplication" />

<parm name="Package" value="com.android.vending" />

</characteristic>

<!--SettingID=316-->

<characteristic version="4.2" type="AppMgr">

<parm name="Action" value="DisableApplication" />

<parm name="Package" value="com.google.android.apps.magazines" />

</characteristic>

 

 

The format for the AppMgr CSP step in StageNow is as follows:

 

blog1_pic3.png

After creating a StageNow profile which disables the relevant apps , the resulting barcode can be scanned and after a short delay of approx 30s , the specified apps will be removed from the Program Launcher :

 

 

blog1_pic4.png

 

Note that the profile can be made persistent via adding a PersistMgr step which will reapply the profile after an enterprise reset – this step looks similar to the following and should be the last step in the profile

 

blog1_pic5.png

 

Note also that apps can be selectively re-enabled using the same AppMgr CSP with Enable Application selected and the relevant package name. A non-persistent example StageNow profile which disables all GMS apps apart from Maps,  Gmail and Chrome is attached together with the barcode.

 

***** Update July 16 *****

 

One additional benefit of disabling unused GMS apps is that it will free up RAM which may be limited on some devices. As an example, a TC55 with GMS OS 2.65 can have over 200MB extra RAM available after applying the attached GMS disable profile and rebooting as shown in the screenshots below:

 

 

gms1.pnggms2.png

  Before GMS App Disable                                             After GMS App Disable

 

Using the method detailed at Deploying StageNow profiles with a centralised FTP server , the attached StageNow profiles have been created in order to easily deploy some commonly used applications/utilities for test and demo purposes. To use these on a TC55/70/75, just manually configure an Internet connection, run the StageNow client and read the appropriate barcode.

 

1. !rem_ehs2dot3.pdf - installs a default EHS 2.3 configuration with a Zebra background and minimal set of apps. Login password is not configured so any additional applications and config changes can easily be made manually in Admin mode.

 

2. !rem_alltouchte.pdf - installs the current release (1.0.1.2044) of AllTouch TE (Wavelink Velocity) which is usable in demo mode without a licence.

 

3.!rem_ebdemo.pdf - installs the Enterprise Browser feature demo onto the root of the internal SD card and configures EB to use the demo as the startpage.

 

4. !rem_eb_install.pdf - installs a version of Enterprise Browser (1.3.17.0) which is compatible with KitKat OS

 

5. !rem_mymobiler_nokbd.pdf - installs the MyMobiler client for remote control an Android device (note that the display configuration change detailed at MyMobiler Skins for Zebra Devices still needs to be made manually before use)

 

** Updated Jan16 for new versions of ATTE , EHS and EB + featuredemo

The following screens show a Mobile Point of Sale Proof of Concept demo running on a KitKat GMS TC55 using the SumUp API to make mobile card payments via a Bluetooth connected Chip and PIN reader. Note that KitKat or later GMS OS is required and the Android device has to use a GSM data connection for payment processing. Note also that this demo is for PoC only currently and this solution has not been tested with a Zebra customer (although it is extensively used with consumer Android devices primarily for small businesses). There are no additional country approvals required to use this solution in the countries listed below since SumUp already has end-to-end approvals for the system. Countries not in the list would not be able to use this system until SumUp opens a subsidiary in the required country.

 

SumUp currently operates in the following countries (as of August 2015):

 

Austria
Belgium
Brazil
France
Germany
Ireland
Italy
Netherlands
Poland
Portugal
Spain
Switzerland
United Kingdom


SumUp is fully PCI certified (https://sumup.co.uk/about) and supports the following credit/debit cards with a 1.95% transaction fee :

 

cards supported.png

 

screens1.png

 

1. Barcoded items are scanned and the price/description looked up on an internal database file. The running total is recorded and will be charged to the customer credit/debit card when the Charge button is pressed

 

 

 

screens2.png

2. After pressing charge, the total amount (reduced here to 1.00 GBP for demo purposes) is charged via the Bluetooth connected SumUp PED. This PED is supplied by SumUp as part of the account creation process and currently costs approx 100 USD. The PED itself is small and lightweight and runs on 2 x AA alkaline batteries (https://sumup.co.uk/products ). The payment processing screen displays after the customer enters the correct PIN for the card which has been inserted.

 

 

screens3.png

3.    After the transaction has been approved by the gateway, the SumUp API returns the payment result to the calling application (seen here in the centre screen above). The operator then has the option to print a receipt from the application using a Zebra mobile printer connected via Bluetooth.

 

screens4.png

 

 

4. Pressing the Connect button brings up a list of paired printers , one of which can be selected for the receipt print.

 

5. The SumUp Android SDK is located on GitHub at https://github.com/sumup/sumup-android-sdk

 

6. Demonstration of this solution requires a SumUp account in the required country, a Chip and PIN reader and a TC55/TC75 with KitKat GMS OS.

Ian Hatton

ET1 Staging with ADB-Master

Posted by Ian Hatton Apr 30, 2015

ET1 Staging with ADB-Master


Introduction


ADB-Master is a third-party PC-based GUI for Android Debug Bridge (ADB) which has some key features that make it easier to configure and deploy Android devices such as the ET1. The ET1 is currently unsupported by  the EMDK for Android and StageNow so the methods described here can be used to automate the staging of one or more ET1’s using ADB either via the USB connection (max 8 devices per PC) or via WiFi (which should allow a larger number of concurrently connected devices).


Advantages:


  • Device settings can be configured automatically using ADB shell command scripts
  • Applications can be installed automatically via drag&drop or multiple file selection
  • One or more devices can be configured by multiple selection of the connected devices
  • Devices can be easily switched from USB to WiFi connection and vice versa
  • Can be used to auto-configure some settings which are currently unsupported via StageNow/EMDK methods e.g. WiFi hotspot, VPN etc.

 

Disadvantages:


  • Settings and apps installed this way are not Enterprise Reset persistent
  • ADB Shell command scripts can vary from device to device and from Android OS version to version e.g. you will generally need one command script for JellyBean and a different script for KitKat.
  • Does require some manual steps to start the process i.e this is not a zero-touch configuration method.
  • ADB-Master is a third party tool and therefore unsupported by Zebra Technologies i.e. use at your own risk

 

 

ADB-Master is available in an unlicenced version at http://forum.xda-developers.com/showthread.php?t=2707556 and in a licenced version at Google Play Store

 

This posting refers to functionality introduced in ADB-Master 1.60

  
 

Key Features


1.      Application Installation - In Applications tab, APK files can be installed via the Install button i.e. press button and select one or more APK files to install to whichever devices are selected in the upper panel. Also supports drag and drop of one or more APK files to the Application panel in which case there is no prompting i.e. APK files are installed immediately.


adbmaster1.png


 

2.      Settings Configuration - In the Console tab , one or more script files can be selected via the Browse button i.e. press button and select one or more BAT files to execute on whichever devices are selected in the upper panel. BAT files contain ADB shell commands to remotely drive the UI e.g. for configuring the ET1 display resolution to 240 dpi , the following commands are used:


adb shell am start -a android.intent.action.MAIN -n com.android.settings/.DisplaySettings

adb shell input tap 280 380

adb shell input tap 480 350

adb shell input tap 680 380


A guide on creating these Shell commands is posted at https://developer.motorolasolutions.com/community/android/android-forums/android-blogs/blog/2015/03/09/introduction-to-adb-shell-commands


Note that BAT files can also be dragged and dropped to the Console panel in the same way as with APK files in the Application panel (in which case no confirmation prompts are displayed before deploying these command scripts)

 

 

  adbmaster2.png
 

 

3.      WiFi Connectivity - For connecting devices via WiFi, there is a drop down list highlighted above which will allow the user to select which network adaptor to use to search for the WiFi devices i.e. first highlight one or more devices in the USB panel and then press ‘Switch selected to network’. Check that the dropdown box has the appropriate network adaptor selected and the WiFi connected devices should then appear in the Network panel. All previously described commands/operations can also be directed to WiFi connected units.

 

adbmaster3.png

 

 

 

Typical Usage

From out-of-box condition (i.e. as shipped from the factory) the following steps would typically be required to configure devices for use by a customer:

  1. a)      Insert battery , power up device , enable ADB via Settings and connect to PC via USB cable
  2. b)      In ADB-Master , device(s) should show up in top left panel. Optionally switch to WiFi connection if the devices have been pre-configured to connect to a WiFi network
  3. c)      Select one or more devices in top left panel and from Console tab, either drag&drop or select one or more BAT files to configure Settings
  4. d)      Select one or more devices in top left panel and from Applications tab, either drag&drop or select one or more APK files to install apps.
  5. e)      Devices are now ready for field deployment.

 

Sample ET1 script files for local language selection and DPI resolution change are attached for reference.

 

Ian Hatton

Zebra EMEA April 15

Introduction

 

A useful feature of Android Debug Bridge (ADB) is the ability to remotely control a device connected either via USB or WiFi using Shell commands e.g.

 

  • adb shell input text "your_text_goes_here“    (sends text as if typed at the keyboard)
  • adb shell input swipe 200 900 200 300  (generates a swipe gesture from co-ordinates 200,900 to 200, 300 ( swipe up)
  • adb shell input tap 200 300  (generates a screen tap at co-ordinates 200,300
  • adb shell input keyevent 4  (generates a keypress event using the table in Appendix A)

 

The values to use for the co-ordinates in the above commands can be seen easily on the device by enabling the Developer Option ‘Pointer Location’ which will then show a pointer trace and the current X,Y screen co-ordinates in the top line of the display:

 

adbshell1.png

Use Case

Combining the adb shell commands together will allow a device to be remotely controlled /configured via a PC and a command script. This allows automatic configuration of multiple devices connected to one PC via ADB which can significantly reduce the staging time required for either:

 

a) devices such as the ET1 which are not supporting the full MX functionality

b) configuring features which are not covered by the existing MX functionality e.g. Wireless hotspot

 

Note a couple of disadvantages of using this method for staging devices:

 

a) the settings are not persistent i.e. if the device is Enterprise Reset in the field, it will require restaging using the same method (or manually)

b) the UI of the device can change between OS versions e.g. some of the Settings screens for JellyBean devices are different to KitKat and it may be necessary to have two script files , one for each OS version.

 

A simple way to sequence ADB shell commands is to put them into a batch file e.g.

 

a) Configure French language settings on a TC55 JellyBean OS device:


adb shell am start -a android.intent.action.MAIN -n com.android.settings/.LanguageSettings

rem select language option

adb shell input tap 200 160

rem select UK - swipe up

adb shell input swipe 100 700 100 200

rem select France

adb shell input tap 200 780

rem return to Home Screen

adb shell input keyevent 3

 

b) Configure WiFi HotSpot on a TC 55 JB OS


adb shell am start -a android.intent.action.MAIN -n com.android.settings/.wifi.WifiSettings

adb shell input tap 40 80

rem select More

adb shell input tap 240 400

rem Enable Hotspot

adb shell input tap 240 320

adb shell input tap 240 320

adb shell input tap 240 700

adb shell input tap 240 600

rem delete existing passkey using backspace

adb shell input keyevent 67

adb shell input keyevent 67

adb shell input keyevent 67

adb shell input keyevent 67

adb shell input keyevent 67

adb shell input keyevent 67

adb shell input keyevent 67

adb shell input keyevent 67

adb shell input keyevent 67

adb shell input keyevent 67

adb shell input keyevent 67

adb shell input keyevent 67

adb shell input keyevent 67

rem set new passkey 'zebra'

adb shell input text zebra

adb shell input keyevent 4

adb shell input tap 240 770

 

ADB Over WiFi


ADB commands will work over USB or WiFi connections . To configure a WiFi connection, the device must first be connected via USB and configured for wireless via the following commands:

 

adb tcpip 5555

adb connect 192.168.0.101:5555

(Replace 192.168.0.101 with the IP address that is actually assigned to your device)

 

At this point the USB cable can be removed and commands will be sent wirelessly. Note that you can find the IP address of a device by either:

 

  1. a) Go into Settings/About phone/Status and check the IP address field

 

adbshell2.png

 

  1. b) Execute the following command via adb:

adb shell ip -f inet addr show wlan0

 

adbshell3.png

 

To reset the ADB connection to USB , type :

adb usb

Reconnect the USB cable and the device should be recognized again .

 

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

 

Appendix A – Keycode table

 

adb shell input keyevent <event_code>

 

 

0 --> "KEYCODE_UNKNOWN"

1 --> "KEYCODE_MENU"

2 --> "KEYCODE_SOFT_RIGHT"

3 --> "KEYCODE_HOME"

4 --> "KEYCODE_BACK"

5 --> "KEYCODE_CALL"

6 --> "KEYCODE_ENDCALL"

7 --> "KEYCODE_0"

8 --> "KEYCODE_1"

9 --> "KEYCODE_2"

10 --> "KEYCODE_3"

11 --> "KEYCODE_4"

12 --> "KEYCODE_5"

13 --> "KEYCODE_6"

14 --> "KEYCODE_7"

15 --> "KEYCODE_8"

16 --> "KEYCODE_9"

17 --> "KEYCODE_STAR"

18 --> "KEYCODE_POUND"

19 --> "KEYCODE_DPAD_UP"

20 --> "KEYCODE_DPAD_DOWN"

21 --> "KEYCODE_DPAD_LEFT"

22 --> "KEYCODE_DPAD_RIGHT"

23 --> "KEYCODE_DPAD_CENTER"

24 --> "KEYCODE_VOLUME_UP"

25 --> "KEYCODE_VOLUME_DOWN"

26 --> "KEYCODE_POWER"

27 --> "KEYCODE_CAMERA"

28 --> "KEYCODE_CLEAR"

29 --> "KEYCODE_A"

30 --> "KEYCODE_B"

31 --> "KEYCODE_C"

32 --> "KEYCODE_D"

33 --> "KEYCODE_E"

34 --> "KEYCODE_F"

35 --> "KEYCODE_G"

36 --> "KEYCODE_H"

37 --> "KEYCODE_I"

38 --> "KEYCODE_J"

39 --> "KEYCODE_K"

40 --> "KEYCODE_L"

41 --> "KEYCODE_M"

42 --> "KEYCODE_N"

43 --> "KEYCODE_O"

44 --> "KEYCODE_P"

45 --> "KEYCODE_Q"

46 --> "KEYCODE_R"

47 --> "KEYCODE_S"

48 --> "KEYCODE_T"

49 --> "KEYCODE_U"

50 --> "KEYCODE_V"

51 --> "KEYCODE_W"

52 --> "KEYCODE_X"

53 --> "KEYCODE_Y"

54 --> "KEYCODE_Z"

55 --> "KEYCODE_COMMA"

56 --> "KEYCODE_PERIOD"

57 --> "KEYCODE_ALT_LEFT"

58 --> "KEYCODE_ALT_RIGHT"

59 --> "KEYCODE_SHIFT_LEFT"

60 --> "KEYCODE_SHIFT_RIGHT"

61 --> "KEYCODE_TAB"

62 --> "KEYCODE_SPACE"

63 --> "KEYCODE_SYM"

64 --> "KEYCODE_EXPLORER"

65 --> "KEYCODE_ENVELOPE"

66 --> "KEYCODE_ENTER"

67 --> "KEYCODE_DEL"

68 --> "KEYCODE_GRAVE"

69 --> "KEYCODE_MINUS"

70 --> "KEYCODE_EQUALS"

71 --> "KEYCODE_LEFT_BRACKET"

72 --> "KEYCODE_RIGHT_BRACKET"

73 --> "KEYCODE_BACKSLASH"

74 --> "KEYCODE_SEMICOLON"

75 --> "KEYCODE_APOSTROPHE"

76 --> "KEYCODE_SLASH"

77 --> "KEYCODE_AT"

78 --> "KEYCODE_NUM"

79 --> "KEYCODE_HEADSETHOOK"

80 --> "KEYCODE_FOCUS"

81 --> "KEYCODE_PLUS"

82 --> "KEYCODE_MENU"

83 --> "KEYCODE_NOTIFICATION"

84 --> "KEYCODE_SEARCH"

85 --> "TAG_LAST_KEYCODE"

The MyMobiler for Android tool is a free remote control solution for Android devices which works well with all Zebra Android products via ADB. The download link for MyMobiler is http://mymobiler.com/. After installation, the client can be pushed to the device via the ADB connection using the menu option shown below:

 

mymobiler1.png

 

After installation, the client starts automatically on the device and requires one manual configuration step in order to change the display type from the default setting (2.Service) to  3.Other:

 

mymobiler2.png

 

Having made this change, the connect option in the PC menu can be selected and the device screen should be correctly shown on the PC display. In order to support Zebra device skins, the attached files can be installed as follows:

 

1.Unzip the supplied files into the \MyMobiler\skin folder (may need to create folder if not already existing)

 

2.The supplied HTA script skin selector.hta can be run in order to select the required device skin:

3. Click on the required device name to select and then press the ‘Apply Skin’ button to install

4. On the MyMobiler PC app, press Ctrl-Tab in order to toggle between the skinned display and the non-skinned display:

 

mymobiler4.png

5. Right click on the top left corner of the MyMobiler skinned display (i.e. outside the image of the device) in order to bring up the menu:

 

mymobiler5.png

6. Use the Zoom control to select the required size of the skinned device. In order to capture the skinned device image, use a screen clip tool such as Greenshot (http://getgreenshot.org/)

 

*** Updated Feb 16 to include rebranded Zebra device skins and TC8000 ***

Filter Blog

By date:
By tag: