Delphi on Android on a Tesco Hudl

Yes, in case you haven’t heard, it’s now possible to build an Android app (or Windows, Mac OSX, iOS for that matter) with the development tool that so many people thought was dead… Delphi. Or more precisely Delphi XE5. This is my first forray into the world of Android, so this post is going to cover driver installation and setup of a device in the Delphi IDE. Or more precisely, I’m going to provide some guidance on how to get a device that doesn’t ship with (or is not recognised by) development drivers and a little bit of an introduction to setting up a new device profile in Delphi XE5.

For those of you that don’t know, Tesco is perhaps the largest supermarket chain in the UK and they have just (October 2013) entered the Android tablet market place with their own branded ‘Hudl’ tablet. Sporting a quite nice 1440×900 resolution display with micro HDMI output, micro SD card expandable storage and WiFi all powered by a fairly spritely 1.5GHz quad core processor, for £119 it’s not a bad little device from what I can see. I’m not going to bang on about it, if you want to see one, just google ‘tesco hudl’ and your search results will be awash with the little blighters.

I decided that I would purchase one with a view to using it for development of ORE. I have an iPad, a Mac and a Windows machine, so I figured I needed an Android device. I got it home, powered it up and everything was wonderful until I plugged it into my Windows XP machine. It was recognised by the OS, but try as I might I couldn’t get XP to load the MTP drivers or the Android drivers. In every case it simply said there are no drivers for your device.

Looking on-line there are a number of people in a similar situation and all at varying degrees of problem resolution. So, if you’re running XP (or possibly later versions of Windows, I just can’t say for sure these will work) and you want to use your Hudl for development (I did read on one site that Tesco were not going to release the development drivers for it because it wasn’t meant for development) you can download a driver package here. This package includes two sets of driver files. One for the MTP element and another for the debug drivers. These are standard files that can either be downloaded from Google or are available on your own machine. I have just updated them to included the Hudl device IDs so Windows properly recognises the device and installs the appropriate drivers for it.

If you have an Android device that doesn’t come with drivers and you want to have a go at developing with it, here’s a quick guide to fixing the driver file.

1. Unzip the driver files in the archive above
2. Connect the device (making sure, that the device is configured for USB Debugging and Always On) and cancel all the ‘New hardware’ dialogs that pop-up
3. Open device manager and look for the yellow question marks… hopefully one will be labelled MTP (for media transfer protocol) and the other will have a label that resembles your devices name. In turn right click these unrecognised devices and select the ‘Properties’ option from the pop-up menu. Change to the ‘Details’ tab, and if it’s not already selected in the combo box, select ‘Device Instance ID’
4. Make a note of the device instance ID that corresponds to two devices (making sure you clearly identify which one is which). Here’s a picture of one of the Hudl’s device instance ID’s to give you an idea of what they look like (and consequently, which parts are required for the two driver files)

Hudl Device ID

5. Open the file MTP Driver\HudlMTP.Inf and find the lines:-


[Generic.NTx86]
%GenericMTP.DeviceDesc%=MTP, USB\MS_COMP_MTP
%GenericMTP.DeviceDesc%=MTP, USB\VID_0E79&PID_5009&MI_00
[Generic.NTamd64]
%GenericMTP.DeviceDesc%=MTP, USB\MS_COMP_MTP
%GenericMTP.DeviceDesc%=MTP, USB\VID_0E79&PID_5009&MI_00

6. Copy the last entry in each of these sections and replace the device ID’s with the appropriate parts of the device instance ID you noted down earlier. In this case you will want to include the VID, PID and MI elements
7. Open the file Debug Driver\HudlDebug.Inf and find the lines:-


;Tesco Hudl
%SingleAdbInterface% = USB_Install, USB\VID_0E79&PID_500B
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_500B&MI_01
%SingleAdbInterface% = USB_Install, USB\VID_0E79&PID_5009
%CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_5009&MI_01

8. Copy the last two and change the device ID’s to match the device instance ID’s you’ve noted down for the device (not the MTP device ID). NOTE:- The Hudl presents different device instance ID’s depending on whether it is running in MTP or PTP mode. I added both of them here, you should be able to get by with just adding one set. For the single ADB Interface you should include the VID and PID elements of the device ID and for the Composite ADB Interface you should include the VID, PID and MI elements. Also note that there are two key sections within the debug driver, the first is for x86 based machines and the second for AMD64 devices. You should ensure that your new device entries across to the second section
9. Save the files, un-plug your device and connect it back up. As the new devices are detected, point the new hardware wizard at the modified driver files. If all is well, the device will be properly recognised and the drivers will be installed. You should end up with a portable device and an Android device that is listed as ‘Android Composite ADB Interface’

Ok, so, drivers installed, Delphi XE5 running, I create a new FireMonkey Mobile Application, connect my Hudl and this happens…

Hudl in Delphi XE5

Step in the right direction I feel :-)

So, the good news… Hudl can be used for development and it works a treat with Delphi XE5. Here’s a screenshot to prove it.

Test Apps

The test applications are provided as samples and snippets by Embarcadero and they are being used to check a range of functionality. The results for the Hudl are as follows:-

Program Description Works Comments
AudioRecPlay Tests the audio functions (allows you to record a sound bite and play it back) Yes -
DatePicker Tests the built in Android date picker Yes -
FlashLight Uses the camera flash as a flashlight No THe Hudl doesn’t have a camera flash so this is not applicable
FMMusicPlayer Tests the built media player functions Yes -
IBLite Tests the Interbase Lite Yes -
ImageRotation Tests image manipulation and some basic gestures Yes -
Location Demo Tests the built in GPS Yes -
LowLevel3D Tests low level 3D functionality Yes -
MobileControls Tests the mobile control set Yes -
PhoneDialler Test access to the telephony functions No The Hudl doesn’t have any telephony functionality so this is not applicable
PhotoEditorDemo Tests the camera and image manipulation Yes -
SendCancelNotifications Tests notification interfaces Yes -
SensorInfo Tests the built in sensor interfaces Yes Provides:- GPS, Accelerometer3D, Gyrometer3D, GravityAccelerometer3D, LinearAccelerometer3D, Compass3D, Inclinometer3D
ShareSheet Tests the built in sharing functions Yes -
WebBrowser Tests the built in web browser Yes -
VirtualKBD Tests the various built in keyboards Yes -

That’s a total of 14 out of 16. Here’s a selection of screenies.

Mobile Controls Photo Editor
LowLevel3D DatePicker

And finally… my editing wouldn’t be complete without a set of form editor background images. Please bare in mind these are my first attempt, so I may have misunderstood the sizing etc. But, none the less, these seem to work quite well. You can download these images here. To use them in Delphi, go to ‘Tools’->’Options’ and select ‘Form Designer’->’Device Manager’ from the tree on the left.

DeviceManager

Click the ‘Add’ button and the actual device editor will be displayed.

EditingHudlDevice

The screen shot above shows the Hudl in the editor. So, adding the device is as simple as unzipping the ZIP file above, making sure you unzip it to somewhere that will remain (maybe create a new directory in the Delphi directory). Specify a name for the device, the platform and it’s form factor, then for each of the four orientations, simply enable it and point it at the required image (the images are named to correspond to orientation names on the tabs). Then, specify the screen positions and dimensions. If you’re using my images, the values are provided in the table below.

Orientation Left Top Width Height Size Position
Portrait 109 157 600 934 47 Bottom
Upside Down 107 165 600 934 47 Bottom
Landscape Left 134 135 960 574 47 Bottom
Landscape Right 131 137 960 574 47 Bottom

The only thing about these orientations is that they are a little odd. The images on the tabs suggest that the bulk of the tablets have a button at the bottom and camera at the top (ala. iPad). So, they don’t tie up necessarily with the Hudl which is almost designed to have it’s primary orientation as landscape (with the camera at the top).

The screen sizes for the Hudl are 960×527 in landscape mode and 600×887 in portrait mode.

When you’ve done, click the Ok button and you should have your very own Hudl in the device list.

HudlInDeviceManager

Now you can use it in the form editor as shown in this screenshot.

HudlDeviceInFormEditor

And there we have it, drivers, form editor backgrounds and a little bit of info about using the Tesco budget Hudl tablet with our favorite development tool and it’s newly acquired Android capabilities. Overall, it seems very straightforward. I’m not saying it’s been hiccup free, but then I did dive in without reading anything (other than my initial, ‘I’m plugging it in and it’s not working… HELP!’ research). The sample code should provide plenty of getting started material.

If there are questions etc., please feel free to post on the forums.

Update – October 2014
Hudl 2 has been released, the driver packages available on my site have been updated to cater for the new hardware.

The driver archive contains files that are copyright Google.

Tags: , , , , ,

21 Comments

  • Bob Green says:

    Thanks for putting up the modified drivers for Hudl – I’d been searching for them everywhere. All working with the ADK now :)

    Thanks again,
    -Bob

  • Terry Fountain says:

    Thanks for the work you have put in to make the drivers available.
    I have been able load the Debug Driver and my Hudl is now identified by my XP desktop, however, I cannot get the MTP driver to load. The system says that it cannot find the appropriate files. Can you please tell me what files are needed for the MTP driver and where I can find them?

    Terry

    • Hi Terry,

      From a brief scan of this page on Wikipedia, you have to be running Windows XP Service Pack 2 and you must have Windows Media Player 10 (or higher installed).

      As for directly answering your question, I could potentially provide a list of the files by going through the HudlMTP.Inf file, but my starter for 10 is XP version and/or Media Player version. I’ve dropped you an email too if these suggestions don’t solve the problem, let me know and we’ll have to have a think about it.

      Regards

      Athena

  • Brad Webster says:

    Athena

    At last some light on the horizon for connection Hudl to a PC for file transfer, and thanks for taking the time to post this.

    Tesco help desk’s suggestion of installing ESBrowser didn’t fix the problem. Although I am not a tech, I am pretty confident with stuff and have modified both .inf files following your instructions. I now get a properly installed Composite ADB Interface, but the MTP Device will not start, and reports “This device cannot start. [Code 10].

    I wonder if I have made a syntax error ?

    Relevant sections of the two driver files say :

    In HudlMTP.INF (in both [Generic.NTx86] and [Generic.NTamd64])

    [Generic.NTx86]
    %GenericMTP.DeviceDesc%=MTP, USB\MS_COMP_MTP
    %GenericMTP.DeviceDesc%=MTP, USB\VID_0E79&PID_5009&MI_00
    %GenericMTP.DeviceDesc%=MTP, USB\VID_0E79&PID_5009&MI_00\6&10D8D709&0&0000
    %GenericMTP.DeviceDesc%=MTP, USB\VID_0E79&PID_5009&MI_01\6&10D8D709&0&0001

    and in HudlDebug.inf (in both [Google.NTx86] and [Google.NTamd64])

    [Google.NTx86]
    %SingleAdbInterface% = USB_Install, USB\VID_0E79&PID_500B
    %CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_500B&MI_01
    %SingleAdbInterface% = USB_Install, USB\VID_0E79&PID_5009
    %CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_5009&MI_01
    %SingleAdbInterface% = USB_Install, USB\VID_0E79&PID_5009
    %CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_5009&MI_00\6&10D8D709&0&0000
    %SingleAdbInterface% = USB_Install, USB\VID_0E79&PID_5009
    %CompositeAdbInterface% = USB_Install, USB\VID_0E79&PID_5009&MI_01\6&10D8D709&0&0001

    Can you spot if I have made a basic error ?

    Thanks once again.

    • Hi Brad,

      If it’s a Tesco Hudl and you’ve downloaded the driver package here on my site, you shouldn’t need to do anything to it for it to work. The files included everything and the instructions on how to do it are there for people with other Android devices who may be facing a similar issue (i.e. no drivers from the device manufacturers).

      I believe the issue you’re getting is the same as I got the first time I tried it. You’ve included the \6&10D8D709&0&00(0/1) on the end, but you’ve also hooked up both parts to both drivers. In the Hudl’s case, the device ID VI_0E79&PID_5009&MI_00 relates specifically to the MTP side of things and shouldn’t be lnked to the debug driver and conversely VI_0E79&PID_5009&MI_01 relates specifically (along with PID_500B) to the debug driver and shouldn’t be linked to the MTP driver.

      As I say though, the driver package on my site should include everything and it should work without modification.

      Hope that helps. If not, please let me know which OS you’re running etc. and I’ll try and look into it (I have access to Windows XP and Windows 7).

      Regards

      Athena

      • Brad Webster says:

        Athena

        SUCCESS ! Removed the (incorrectly) tweaked drivers from my Vista laptop, installed the originals, restarted everything, and reconnected and … hey presto ! My files are flying across.

        Now to see if I can get the same result on my XP desktop, which is my primary PC. I’m old school, and it does exactly what I need it to do. I dread the thought of having to move to Windows 8. Am I the only person in the world that hates the new interface ? I spent 25 years learning how to use DOS, WFWG, and subsequent versions of Windows and now feel like I know nothing. Is it possible for an old dog to learn new tricks ?

        Thanks once again for your help – I thought my wife (who bought the HUDL for me as a gift) had got me a dud, and feel much better about it now. Shame that Tesco’s helpdesk don’t seem to know more.

        All the best

        Brad

        • Hi Brad,

          That’s excellent news. And very similar to the situation I found myself in when I was building the driver files.

          I can absolutely guarantee the drivers will work on XP (32 bit) because that’s where they originate. My primary machines are both XP and like you I dread the thought of moving to Windows 8. I’ve only recently had to move to Windows 7 (at work) and there are times I feel I know nothing. As for Windows 8’s new UI… I concur the new UI is a bit crappy.

          I’ve seen statements from Tesco that suggest the Hudl is not designed or intended as a development platform, hence they don’t make the drivers available. A bit short sighted on their part in my opinion.

          Anyhow, glad I could help, enjoy your Hudl :-)

          Athena

  • Pete Sztencel says:

    Hello! I’m a new Hudl owner, having all the common usb connection problems. My main PC is from 2005, running XP pro (sp 3). I’m not at all confident at digging through tech-spaghetti and modifying registry stuff, so is there any way I can access your magical drivers without a PhD? I downloaded them, but the OS won’t even look at them. What should I do? It recognises the Hudl in PTP mode (camera), but no joy with MTP. Although the Hudl appeared in the Device Manager list, all I got was a yellow question mark and a Code 28 error message (no drivers installed). Tried the usual rebooting and so on, but without success. I then tried the Troubleshooter (bad idea!) which suggested uninstalling the device, which would then be re-recognised after a restart… Hmmm. Wrong. There is now not even a Hudl in the list! Is there a simple way to force-feed the PC the drivers? I should mention that I do have a full system backup (Norton Ghost), so I can always rescue things if (or when) disaster strikes. Thanks in advance for any help you can offer; please don’t make your Delphic pronouncements too cryptic – I only have one brain, and after 50 years, it’s in need of a service-pack or two! Regards, etc, Pete.

    • Hi Pete,

      I’ve sent you a couple of emails about this, if you can check your mail. I’d prefer to keep the working out process on email and then when we’ve worked out the problem if it’s appropriate I’ll add some information here to help others who may have a similar issue.

      Regards

      Athena

    • If anyone else is having similar problems to Pete, one thing I should perhaps have mentioned in my original article.

      If you’re running XP, it doesn’t include (by default) the required MTP drivers. These can be installed by upgrading your Media Player to the latest version (at the time of writing, that’s version 11) and then using the drivers included in the driver package I posted with the article.

      Athena

  • Brogus says:

    Hi Athena,

    My PC is from about 2006, running Windows XP (sp 3). I just got a new Hudl and am trying to get the USB to connect with my PC but it is being a huge problem, no matter what I try to do. I’ve downloaded your driver files. I have the adt-bundle-windows-x86-20140321PTP installed and am trying to use the Composite ADB Interface driver. When connected to USB as either PTP or MTP the connection repeatedly goes off and on as soon as I turn on debugging mode on my Hudl. In device manager all I get is the Composite ADB Interface repeadtedly and quickly flashing on and off (sometimes with a Yellow exclamation mark, sometimes without – it is erratic.) When anything gets vaguely connected I get a code 10 error. I am not sure what to do with the HudlMTP.INF and HudlDebug.inf -when dealing with the ADB interface. Do I put those into the same folder as the google_usb driver or do I ammend my android_winusb.inf file which came with the google driver? Do I replace this file completely?
    When I look up device Id when trying to connect, I only get USBVID_0E79&PID_500B&MI_015&148E5F46&0&001 … there aren’t any other Ids which I can see. What must I do with this? I apologize upfront for my ignorance here but I am very new to Android (but can get by pretty well with PC) … so I’m sure I can catch on quickly … I just need a nudge in the right direction.
    I hope you can help me, you seem to be the most sensible person I can find in dealing with this. I appreciate in advance, any help you can give me. Thank you for taking the time to help others :-)
    Best wishes,
    Brigitte

    • Hi Brigitte,

      A common problem appears to be a lack of fully operational MTP drivers. As I understand it both the Android drivers and the MTP drivers are required. So, if you haven’t already done so, make sure Windows Media Player is fully updated. The best plan is go to the Microsoft website and download the latest version for XP (I think it’s probably version 11). Then try this:-

      1. Open device manager
      2. Plug the Hudl in and keep an eye on device manager to see which devices appear
      3. If you are asked for drivers, then when you get asked to select the device, you should find an option for ‘Have a disk’. Click that, then select each of the Hudl INF files in turn (HudlMTP.inf and HudlDebug.inf) and click OK. If the file isn’t the right one you should get a message telling you it doesn’t contain drivers for the device… select the other one and try again
      4. If you don’t get asked for drivers, you should have two devices appear. Find them, right click them and choose update driver. Follow the same process as if you had been asked for drivers

      For the driver dialog, I think it goes something like:-

      1. Allow Windows to search – Choose “Not this time”
      2. If your hardware came with a disc – Choose “Install from a specific location”
      3. You should get prompted for a location – Choose “Search for the best driver”, make sure only “Include this location” and pick the directory you unzipped the drivers into and find the required INF file

      Hopefully if you can get through this you’ll be done and you’ll have a fully functional Hudl/PC link.

      Regards

      Athena

  • Brendan says:

    Thank you Athena for the instructions. I’ve spent a while trying different ways but none worked connecting the Hudl till I tried yours. Thanks for posting such detailed notes, really appreciated.

  • Rod says:

    Hi Athena,
    I am not at all practised at IT, so please indulge me for a moment. I have experienced the same Hudl problems as other users and have downloaded your two driver files. How do I open these files and get my XP OS to recognise my device?

    • Hi Rod,

      I’ll try and get the key stages in a list. I’m assuming you have connected the Hudl and it’s installed something, not necessarily the correct drivers.

      1. Unzip the file you’ve downloaded and put the files into a convenient temporary folder
      2. Making sure the Hudl is not connected, open the systems Device Manager
      3. Connect the Hudl, making sure you keep track of the items that appear in the device managers list. You should get two devices (assuming debugging is enabled on the Hudl)
      4. Right click the MTP device, select ‘Update driver’ and then when prompted, point the OS to the ‘MTP Driver’ folder you unzipped in stage 1
      5. Right click the ADB device, select ‘Update driver’ and then when prompted, point the OS to the ‘Debug Driver’ folder you unzipped in stage 1

      That should be that. If you are still struggling, let me know and I’ll see about sorting out a more detailed guide.

      Regards

      Athena

  • Rod says:

    Athena, I am much obliged. I will do what you suggest, and post feedback.
    I have not visited this site before and was not sure of a response, but you are brilliant.
    I wil be back, even if only to make a donation.
    Thanks again,
    Rod.

  • Rod says:

    Hi again Athena,
    Sorry to bother you again, but every time I click on the downloaded files, I end up with another window full of HTML opening up. There is no prompt to unzip files.
    I have searched for Device Manager, and get about 35 results in the list, so which one do I open?
    Regards from,
    Rod.

    • Hi Rod,

      If you’re happy to wait a little longer, I’ll try and get a document together later (when I get home from work) that explains what you need to do step by step. I think it would probably be a useful resource for others as well.

      Athena

  • Alex Hunt says:

    Hi,

    I’m using a Tesco Hudl and trying to connect it to a windows 64 bit 8.1 machine.
    I’ve downloaded and unzipped your drivers.
    On plugging in the Hudl, the mtp driver appears to install fine – the device manager lists this a hudl, with a working driver.
    However, the other driver has a yellow exclamation mark.
    On pointing it towards your debug driver folder, it reconises that as the correct driver but gives the following error message: Android Composite ADB Interface (Tesco Hudl)
    The hash for this file is not present in the specified catalgoue file. The file is probably corrupt or has been tampered with.
    Is there anyway i can bypass this check?

    Thanks.

    • Hi Alex,

      Solution mailed to you.

      For everyone else… You should first disable driver signature enforcement by following this guide and then try installing the drivers again. This guide demonstrates doing it.

      For the record, I can’t try this out as I don’t have a Windows 8 machine, so I’m supplying these links based on a quick skim of the sites. They seem to make sense so I think they’ll provide the answer to this particular problem.

      Athena

Leave a Reply

 

Bad Behavior has blocked 120 access attempts in the last 7 days.

communication