File Exchange

image thumbnail

Simulink Support Package for Android Devices

version 1.4 (15.1 KB) by

Run models on Android devices

12 Ratings



Simulink® Support Package for Android™ Devices enables you to create and run Simulink models on supported Android devices. Support includes a library of Simulink blocks for:

• Sensors
• Audio capture and playback
• Camera input and video display
• UI widgets
• Network interface

This support package is functional for R2014a and beyond.

Comments and Ratings (54)

Jean Marc

With the simulink model Android camera connected to Android video dysplay, named andro1, i have the error message :
C:\Windows\System32\slprj\_cgxe\andro1\src>"C:\Program Files\MATLAB\R2017a\sys\lcc64\lcc64\bin\lccmake.exe" -f andro1_cgxe.lmk
C:\Program Files\MATLAB\R2017a\sys\lcc64\lcc64\bin\lccmake.exe: Can't open andro1_cgxe.lmk
why ?


lu sheng

I am trying to run the example androidSensorFilterExample
### Starting build procedure for model: androidSensorFilterExample
there is some error as follow:

Unexpected error : [armeabi] Compile thumb : androidSensorFilterExample <= ert_main.c
In file included from ../androidSensorFilterExample.h:9:0,
from ../ert_main.c:4:
../rtwtypes.h:4:22: fatal error: tmwtypes.h: No such file or directory
#include "tmwtypes.h"
compilation terminated.
make: *** [D:\MatCode\screenOn\androidSensorFilterExample_ert_rtw\androidSensorFilterExample\src\main/obj/local/armeabi/objs/androidSensorFilterExample/ert_main.o] Error 1

I want to know what wrong with it?

@alaa,Huayou, Michal, Wy Rao: Sorry for the Inconvenience.
Please try the following for the installation of Android Support Package

1)Start MATLAB as administrator.

2)To remove partially installed support package
a) In the MATLAB command window type the following command

b) Go to 3P.instrset folder
c) Delete the following folders(if present)

3)Now install the Android Support Package.

Huayou Zhang

There was a problem downloading the third-party software. To resolve this issue, contact Technical Support

alaa nasef

failed to download

alaa nasef

can i make standalone object recognition app using this package on android? i read it have opencv support
if anyone download it can answer me plz?

Andreas Rauh

For me, the solution was very simple to circumvent the "Failed to install the third-party software: Android SDK Platform" issue... I just started Matlab (R2017b) with administrator priviledges, removed the incomplete installation of this support package. Afterwards, the installation wenth through smoothly, without any error message

Need to rate it so low, because:

""Failed to install the third-party software: Android SDK Platform
This is required by: Simulink Support Package for Android Devices"

It is described in one of the threads on "MATLAB Answers", but there is no solution still. Waiting for support.

Wy Rao

Wy Rao (view profile)

Third party package can not connect consistently...


cui (view profile)

when to " Verifying configuration of your Android device" this step
Running App
Could not run TestApp on the device (Error id : RUNAPPF).
The log is stored in C:\Users\ADMINI~1\AppData\Local\Temp\tp0b816b38_8667_4091_b21c_70509384becc\
Contact technical support and send the file.

@Guolong: Thank you for the rating. In R2017b, the BLE Send and BLE Receive blocks were added to this support package. You can check out the below example for a demonstration of how this communication works:

but how to use bluetooth to communicate?

@Athlon (and everyone else for that matter): If you are seeing a relatively generic error message, or are experiencing difficulty with this support package but aren't sure of any specifics, contacting Technical Support is a far easier way to address the issue than trying to go back and forth in the comments section here:

If you discover or they help you to find a resolution step, feel free to post it here though, to help future users.


Athlon (view profile)

i have issue to setup my samsung device....
in verify step i have problem and do no run test and verify.
please help me to solve this issue.

@Kres Nielsen: This support package should be able to generate apps for any Android phones above the required Android version. However, it only has built-in functionality to use the Android SDK, not a custom development kit. You could try to follow our workflow to generate projects for Android Studio as a starting point, and then connect them up to the custom Moto Mods functionality manually. We cannot guarantee that it will work seamlessly though.

Kres Nielsen

Could this add-on be used with a new device built using the Moto Mods Development Kit for the Motorola Moto Z line of Android smart phones? I.e. could it replace the need for writing a custom Android App?

Here is a link to the MDK:



QF LI (view profile)

I could not find my android cellphone

aa a

aa a (view profile)

Sutanu Maiti

@Erik S: Can you please check if "HostLib_Network.h" file is present in below directory?
<C:\Program Files\MATLAB\R2017a\toolbox\shared\dspblks\extern\include>
If it is not present then, it could be an installation issue.

Erik S.

I get the following error when I try to build the example: androidSensorAndUDPUsageExample

Unexpected error : [armeabi] Compile thumb : androidSensorAndUDPUsageExample <= HostLib_Network.c
../HostLib_Network.c:6:29: fatal error: HostLib_Network.h: No such file or directory
#include "HostLib_Network.h"
compilation terminated.
make: *** [C:\Users\erik_\Documents\MATLAB\androidSensorAndUDPUsageExample_ert_rtw\androidSensorAndUDPUsageExample\src\main/obj/local/armeabi/objs/androidSensorAndUDPUsageExample/HostLib_Network.o] Error 1

I build for a Samsung Galaxy S5 on R2017a. The verification process was successful.

WX Zhao

It can not download,why?Who can help me?

Zhu Hongbin

Hi, I am trying to do the "verification of Android devices". However, when I try to do "building App", error displayed as:

Warning: Escaped character '\U' is not valid. See 'doc sprintf' for supported special characters.
>In codertarget.setup.AndroidFirmwareUpdate/createDiagnostic
In codertarget.setup.AndroidFirmwareUpdate/displayDiagnostic
Unexpected failure (Error id: BUILDAPPNOAPPB-CREATDIAGNOWRIT). Press 'Retry'.

I'm using matlab 2017a.
Simulink Support Package for Android Devices version 17.1.0
Thank you for your time.

@sara I see. I'm using matlab 2016a, I will change it, , thanks for the information !!!


saras (view profile)

@Eliseo: What version of MATLAB are you running? This block was add in R2016b.

I have a problem, I cant find data display in my simulink support package...there is a option to install or replace it ?


Henrik (view profile)


saras (view profile)

In this case, the installation was successful after deleting the Support Package directory (C:\ProgramData\MATLAB\SupportPackages\R2017a) and re-installing the support package.

Pedro Vizcaya

Hi, I am trying to install these package for Matlab 2017a:
MATLAB Support Package for Android Sensors version 17.1.0
Simulink Support Package for Android Devices version 17.1.0
I get an error:

Install Error

There was a problem installing the support package. To resolve this issue, contact Technical Support
What can be missing?


saras (view profile)

@ECE ESWAR @Sathya: Please reach out to MathWorks Technical Support (US: 508-647-7000) so they can help identify and fix the issue.

cannot install it
error displayed is
"There was a problem executing post-install actions for package with basecode ANDROID

Caused by:
Unable to load a message catalog 'android:utils'. Please check the file location and format."

sathya seelan


saras (view profile)

@Hai: What is the error you are seeing? Are you able to run models in external mode?

hai du

hai du (view profile)

failed to pass the "testing connection" on my nexus 6p. But I can see the test app running on the phone. I've tried to select s4 and tab and both failed. any idea of fixing this problem?

found version 16.2.1 on R2016b. If changed support package path to the shortest (G:\S etc.),and if bear and wait 15 minutes or so during installation of the 3rd party products, we can find installation successfully. I tryed sample model and confirmed working.


saras (view profile)

There was an issue with 16a installation that was recently fixed. Can you retry the installation?


Li (view profile)

Hi, the following error appears when i installed the package:
"There was an error installing third-party software for Support Package Android:
does not contain archives for third-party software used by the support package." How to fixed it.

Great job team! This is working very nicely. Each release is getting better and better.


fgao (view profile)

@Hamid Alavi Can you reinstall it?

Hamid Alavi

i am trying to install this package but when my wifi disconnect for just a sec, the installation fails!
is there another way to download this package?

Anshuman G

I am trying to access the Microphones (ADC1,ADC3 and ADC4) on Motorola Nexus 6 through Simulink Support package.
Can anyone contribute? Any useful information?Links?


Mauro (view profile)

Hello. It is a very good package, also for educational purposes.
I wander if S4 Mini requires a different connection setup with respect to S4.
The 'test connection' with my Galaxy S4 Mini fails, nevertheless the device model and its IP are correctly discovered.
Then the 'Filtering Sensor Data' example does not work (it uses external simulation mode) while the 'Sensor application' model (which is deployed to hardware) works correctly.

Da Bu

Da Bu (view profile)

Thanks Brian, but I couldn't find neither "Download from Internet" nor "Install from folder" option in the support package installer! Could you please help me find these options?

Da Bu

Da Bu (view profile)

Is there a step by step guide to install this hardware support package on a PC which is couldn't connect to internet?
I mean could 3rd party softwares be downloaded seperatly and then configure the package with some commands or additional files?


Reza (view profile)

The package was successfully installed on windows 7. All the examples work for both Galaxy S4 and Nexus 5 phones. In case of Nexus 5 you need to select 'Galaxy Note' in the 'targetupdater' wizard.


Don (view profile)

I can confirm that the package is working for accelerometers using a Note 3, android 4.4.2 and Windows 7. I previously had an issue with the Java JDK. I didn't get the "Test Connection" to work on installation, but just ignored that and tried a simulation.


Don (view profile)

I'm having trouble passing the installation "Test Connection". I see my device (Note 3), but fail the test. My IP looks correct. Do you have any troubleshooting tips.

For those with issues seeing your device in Windows, it takes a long time for Windows to install the Galaxy drivers. If I recall, there were 4 drivers needed for my Note 3. After those were installed, then I could see my device listed after pressing refresh.

If you're not sure about drivers, I noted an icon with activity showing in the taskbar display indicating that drivers were being located.

Brian McKay

Brian McKay (view profile)

@Prashant: We have reached out to you, to better understand the challenges you had, but have not received a response. Please contact us to expand on the issues.

For anyone else with similar issues – we would like to understand any problems you run across.

And for all those with no issues – we are open to any feedback on the Galaxy Android support and hope you are finding it useful.



Henrik (view profile)

Hi Brian,
thanks for the response. Just to clarify:
I have selected the Device type (tried with choosing the Tab 2 and the S4); the problem occurs 4 screens later ("Connect your device and install app") where the device simply doesn't show up (despite pressing "Refresh" several times).

Brian McKay

Brian McKay (view profile)

Hi @Reto and @Henrik,

If your device isn't showing, choose "Select Tablet" device type and follow instructions from there.


Henrik (view profile)

I have got the same problem as Reto: my device doesn't show up in the List of devices.
I have tried this with a Galaxy S and a Galaxy Note 10.1. The Galaxy S showed up once, but I haven't been able to get it to appear again.
The devices show up in Device Manager, and I can connect to them with adb.
Any suggestions?

Hello Hans,

We believe it will work on any Samsung Galaxy Android device, assuming they are running Android 4.3 or 4.4.

However, we have only done full testing on the Galaxy S4 and Tab 2 10.1.

Note: It is possible that this Support Package will also work on non-Samsung Android devices - I had it running on my Google Nexus 7 (2013) tablet. My Nexus 7 test model only used the screen and accelerometer; so I cant confirm if all the IO will work for any particular device.

Please download and try the Support Package - and let us know if you were successful.



Hans (view profile)

Hi there,

excellent package.

Does this package support also other Galaxy Device such as Galaxy Note 3 or
Samsung Galaxy Tab 3 7.0 Hello Kitty?

Or are only Galaxy S4 and Samsung GALAXY Tab 2 10.1?


New thumbnail image

url fix again

updated image thumbnail

url update

MATLAB Release
MATLAB 8.3 (R2014a)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video