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:
• Audio capture and playback
• Camera input and video display
• UI widgets
• Network interface
This support package is functional for R2014a and beyond.
During verification of installation, make sure your screen is unlocked and when you get the install notification on the screen, please accept it. After this action, the app should automatically start, you need not start the app. Please try the Hardware Setup again. If you are still facing any issues with Setup, please provide your email id. We will help you out.
During the Hardware Setup, when I verify the installation, the app is buoilded on my huawei P8 lite, the phone ask me to install it, and after installation to run it. After I started execution of the app, the app seems working but on the PC I see the waiting logo on the "Build app" and the software remain blocked. Phone and PC are connected on the same wifi. On PC run Windows 10 last version. Can you help me?
Please change Android Studio(present in path C:\PROGRA~1\Android\Android Studio) folder name to Android_Studio and when you run Hardware Setup, in the first screen change the path of Android Studio accordingly and try. This will resolve your issue. If you are still facing any issues with Setup, please provide your email id. We will help you out.
Hi, after installation of Android Studio the verification of the installation fails, message:
Error: "Der Befehl "C:\PROGRA~1\Android\Android" ist entweder falsch geschrieben oder konnte nicht gefunden werden. ", on executing command 'C:\PROGRA~1\Android\Android Studio\gradle\gradle-4.4\bin\gradle -v'
From the command line, gradle -v works fine and returns the information.
I'd be grateful for any hint.
Make sure your phone is connected to the same WIFI network as your PC and your phone should be unlocked and Test app should be running on your phone screen. If you are still facing any issues with Setup, please provide your email id. We will help you out.
I get this error when trying the test app (R2017b):
"Could not detect TestApp listening on port 7777. Ensure WiFi on your device is turned on."
WIFI is actually turn on. Help please
Hello Sutanu Maiti,
Thanks for assisting me. Please reach me out quickly.
BLE Scan issue will be fixed with May 9th update.
Meanwhile to fix the issue, please check the Answer Section of https://www.mathworks.com/matlabcentral/answers/396945-cannot-scan-in-ble-receive-block?s_tid=prof_contriblnk
hi . can you send me this pakage to my email ?
My email address is : email@example.com
In BLE Receive module, scan doesn't work. Can't use Bluetooth as a client.
Hello Hemant Ghuge,
I will assist you in resolving the issue that you are facing. Can you please share with me with an email id through which I can reach you and help you out?
Unable to find the NDK at the specified path. Run the Hardware Setup process and try again.
### Build procedure for model: 'android150418' aborted due to an error.
Error(s) encountered while building "android150418":
### Failed to generate all binary outputs.
HARDWARE SETUP process is successfully completed but when I try to deploy my Simulink model above error is prompted.
I am struggling for many days. I have reinstalled android studio and Simulink support for Android devices twice.
I am using Redmi Note 4 as my android devices. Test App was generated successfully. In addition to that OpenCV manager is also installed.
For those who are getting error message below during the last step of the setup process i.e. 'Verify Configuration of Your Android Device' - Build App step:
"Unable to find Android Software Development Kit (SDK) Build-Tools. Install Android SDK packages and tools as described in Install Android SDK Platform Packages and Tools and run the Hardware Setup process again."
Please note, the Support Package verification step works fine with Android SDK Build Tools 27.0.3. However, if build tool version 28.0.0-rc1 is present then the above issue comes up.
To come out of this issue, either you can wait for April update that will be available in mid of April, or you can uninstall build tool 28.0.0-rc1 and install version 27.0.3 to have the support package work properly.
Check out this cool Example which uses Statistics and Machine learning toolbox to classify different Human activities like sitting, standing etc. and then use this Support Package to use this classified data to detect Human activity using Mobile sensors. This example is added in R2018a.
MATLAB R2018a is out!!
1. Flexibility in Android support package installation
Before R2018a, installation of Simulink® Support Package for Android™ Devices included installation of Android platform packages and Software Development Kit (SDK) tools. As of R2018a, the installations of the Android platform packages and SDK tools can be done independently after a successful installation of the Android support package. This change in the installation process shortens the time required to install the support package. For more information, see
2. Accept data from Android keyboard
You can use the Data Input block to create a data input field on an Android device screen. This input field accepts data from the keyboard of the device. For more information on how to use the Data Input block, see
3. Measure data using Android sensor blocks - You can use the Magnetometer block and Orientation block to measure data from the built-in sensors on an Android device.
* Magnetometer: Measures the magnetic field along the X, Y, and Z axes of an Android device.
* Orientation: Measures device rotation along the X, Y, and Z axes of an Android device.
failed to download
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
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,
../rtwtypes.h:4:22: fatal error: tmwtypes.h: No such file or directory
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.
There was a problem downloading the third-party software. To resolve this issue, contact Technical Support
failed to download
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?
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.
Third party package can not connect consistently...
when to " Verifying configuration of your Android device" this step
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\androidTestAppDiagnostic.zip.
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.
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.
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:
I could not find my android cellphone
@Erik S: Can you please check if "HostLib_Network.h" file is present in below directory?
If it is not present then, it could be an installation issue.
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
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.
It can not download,why?Who can help me?
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.
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 !!!
@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 ?
In this case, the installation was successful after deleting the Support Package directory (C:\ProgramData\MATLAB\SupportPackages\R2017a) and re-installing the support package.
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:
There was a problem installing the support package. To resolve this issue, contact Technical Support
What can be missing?
@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
Unable to load a message catalog 'android:utils'. Please check the file location and format."
@Hai: What is the error you are seeing? Are you able to run models in external mode?
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.
There was an issue with 16a installation that was recently fixed. Can you retry the installation?
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.
@Hamid Alavi Can you reinstall it?
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?
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?
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.
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?
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?
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.
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.
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.
@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.
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).
Hi @Reto and @Henrik,
If your device isn't showing, choose "Select Tablet" device type and follow instructions from there.
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.
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.
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
Win cash prizes and have your live script featured on our websiteLearn more
Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.