Who is this for?

This Learning Path is for Android and machine learning developers who want to run an optimized image-segmentation model locally on an Arm-based Android phone.

What will you learn?

Upon completion of this Learning Path, you will be able to:

  • Prepare the Android command-line tools and connect an Arm-based Android phone
  • Download and run the MobileSAM ExecuTorch model from the Arm AI Portal
  • Understand how the Android adapter validates, prepares, and renders MobileSAM results
  • Optionally inspect another image model before implementing a model-specific adapter

Prerequisites

Before starting, you will need the following:

  • A macOS, Linux, or Windows development computer with Git, Python 3, and Java 17 or later
  • An Arm-based Android phone running Android 9 or later
  • A Hugging Face account
  • A data-capable USB cable
  • Basic familiarity with terminal commands and Android applications

Summary

AI-assisted

This summary was drafted with an approved AI-assisted workflow and reviewed by Arm contributors before publication. Human technical review remains part of the process so the final page reflects engineering rigor, accuracy, and Arm editorial standards.

Close
?
You’ll build and run a MobileSAM image-segmentation application on an Arm-based Android phone. First, you’ll install Android command-line tools. Next, you’ll connect the phone, download the validated ExecuTorch model from the Arm AI Portal, and stage it in application-private storage. After selecting an image and box prompt, you’ll inspect the adapter’s preprocessing, output validation, and mask rendering. Finally, you’ll optionally learn how to use AI Portal models without a validated adapter.

Frequently asked questions

AI-assisted

These FAQs were drafted with an approved AI-assisted workflow and reviewed by Arm contributors before publication. Human technical review remains part of the process so the final page reflects engineering rigor, accuracy, and Arm editorial standards.

Close
?
How do I verify my Android phone is connected and authorized?
Enable Developer options and USB debugging, then run adb devices -l. The output should list the device with its serial and show it as authorized. If it reports unauthorized, unlock the phone and accept the debugging prompt. On Windows, you might also need the phone manufacturer’s USB driver.
What does the MobileSAM run produce?
After you select an image and run segmentation, the application displays a translucent cyan mask over the selected object. The result panel reports the selected mask, predicted IoU, and mask coverage. It also reports the mask logit range, model load time, and run time.
How do I run MobileSAM on the Android phone?
Download mobile_sam_raspberry_executorch_optimized.pte. Copy it into the directory named by the MobileSAM catalog entry under application-private storage, and start the application. Select Load model, choose an image, and select Run segmentation to generate the mask.
Do I need to modify the code to run the validated MobileSAM path?
No. The application already includes the catalog entry, adapter, preprocessing, and mask rendering for MobileSAM with ExecuTorch.
What should I check before using a different model?
Review the model’s runtime dependencies, tensor mappings, preprocessing, prompt control, output decoder, and visualization needs. The included LiteRT and ONNX adapter files are stubs and need implementation and validation before they can execute a new model.
Next