How do I run/test my Flutter app on a real device?
System Design practice on Codemia
Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.
Introduction
Running a Flutter app on a real device is the fastest way to verify hardware behavior, performance, permissions, and platform integration that simulators often miss. The workflow is straightforward once the device is trusted, developer mode is enabled, and Flutter can see the device from the command line.
First Check the Toolchain
Before connecting a phone, verify your Flutter setup:
Fix the major issues it reports first. If Android SDK, Xcode, or device tooling is broken, real-device deployment will fail later in less obvious ways.
Then list available devices:
If your phone is connected and recognized, it should appear in that list.
Running on a Real Android Device
1. Enable Developer Mode and USB Debugging
On Android, enable Developer options and USB debugging. The exact menus vary by manufacturer, but the usual path is:
- open Settings
- tap Build number several times
- open Developer options
- enable USB debugging
When you plug in the device, accept the RSA trust prompt if it appears.
2. Confirm Flutter Sees the Device
If the device is visible, run:
If multiple devices are connected, specify one:
3. Use Hot Reload During Testing
While the app is running from the terminal:
- press
rfor hot reload - press
Rfor hot restart
That makes real-device iteration much faster than rebuilding from scratch every time.
Running on a Real iPhone
On iOS, the process is similar but includes signing:
- connect the device
- trust the computer on the phone
- open the iOS project in Xcode when necessary
- configure a valid development team for signing
Then check visibility:
And run:
If iOS signing is not configured, Flutter may detect the device but still fail to launch the app.
Debug vs Release Testing
flutter run starts a debug build by default. That is ideal for development, but not for performance measurement.
For a more production-like run:
Use release mode when testing:
- startup time
- animation smoothness
- battery impact
- native plugin behavior under production compilation
Debug mode is excellent for iteration, but it is not a fair representation of final runtime performance.
Useful Device Debug Commands
Check connected devices:
View logs:
Install dependencies and run:
If the app installs but crashes immediately, logs are often much more useful than the generic launch error message.
Common Reasons the Device Is Not Found
On Android:
- USB debugging is disabled
- the trust prompt was denied
- the cable is charge-only
- OEM drivers are missing on Windows
On iOS:
- the phone is not trusted
- signing is not configured
- the device is locked
- the development profile is not accepted
In both cases, always check flutter doctor and flutter devices before changing app code. Tooling visibility comes first.
Practical Testing Advice
Real-device testing is most valuable for things emulators approximate poorly:
- camera access
- push notifications
- file-system permissions
- Bluetooth or location behavior
- animation and scrolling smoothness
Use emulators for convenience, but do a real-device pass before calling the feature done.
Common Pitfalls
- Trying to debug app code before confirming that
flutter doctorandflutter devicesboth report a healthy setup. - Using a USB cable that only charges and does not carry data.
- Measuring performance in debug mode and then drawing conclusions about release behavior.
- Forgetting platform-specific setup such as Android USB debugging or iOS code signing.
- Assuming the app is fine because it works in an emulator, even though real-device sensors, permissions, and performance can differ materially.
Summary
- Start with
flutter doctor, then confirm the phone appears influtter devices. - On Android, enable USB debugging and trust the development machine.
- On iOS, trust the device and configure signing correctly.
- Use
flutter runfor normal development andflutter run --releasefor realistic performance testing. - Real-device testing is essential for validating hardware access, permissions, and production-like behavior.
Related reading
- How do I safely replicate data to another data center
- How do I scale up my cluster on Google Container Engine / Kubernetes?
- How do I set up a Kafka service on gitlab-ci.yml?
- How do I set up TensorFlow in the Google cloud?
- How do I save a UIImage to a file?
- How do I scale a UIButton's imageView?
- How do I store a fitted PCA so that I may transpose unseen testing dataset? I do not wish to keep the large training dataset on my CPU
- How do I test a module that depends on boto and an Amazon AWS service?

System Design Fundamentals
Build a strong foundation in designing scalable, reliable distributed systems.
View the courseTrack what you have practised
A free account saves your progress, solutions and study plan across every problem on Codemia.
System Design practice on Codemia
Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.