Logo

Debugging Expo and Android Emulator issues: why local setup can break the entire dev workflow

Categories

Exponative app
Published at: 30. juli 2026

A mobile app can look fine in code and still fail to run locally because of environment issues outside the application itself. In my case, the problem was not in the React Native code, but in the local development setup around Expo, Android emulation, and filesystem permissions.

The issue began when I tried to run the app in an Android emulator. Expo started normally, but the emulator failed to initialize properly. The logs showed that the emulator could not prepare its ramdisk:

ERROR | createRamdiskWithBootconfig: Can't open .../Medium_Phone_3.avd/initrd for writing
FATAL | main:3503 Could not prepare the ramdisk with bootconfig

That pointed to a local filesystem problem rather than an app bug. The AVD folder was no longer writable, which made it impossible for the emulator to start correctly.

At the same time, the Android tools reported that the device was not available for development:

adb devices
# output:
# emulator-5554   offline

And later, Expo also failed to open the app because it could not connect to the expected Android runtime.

The root cause was a combination of stale emulator state and incorrect ownership of files in the Android and Expo local directories. Earlier, I had used sudo while working with Expo-related files, which caused some of those files to be created with root ownership. That meant the normal user account could no longer write to them reliably.

The fix was to reset the local environment:

adb kill-server
pkill -f qemu-system
pkill -f emulator
rm -rf ~/.android/avd
rm -rf ~/.android/adb*

# restoring permissions to .android and .android/avd
chown -R "$USER":staff ~/.android ~/.android/avd
chmod -R u+rwX ~/.android/avd

only use chown if you have the incorrect permissions.

this process will remove your emulator device from android studio device manager, so you will need to create a new emulator device in my case im using Medium Phone

boot up the emulator again and authorize the device via the dialog. and start expo again to download expo go and start your app. and you are good to go.

Key points

  • Local mobile development is not only about writing app code , it also depends on the health of the local toolchain.
  • Using sudo for local development tools can create permission issues that are easy to miss until the emulator or dev server breaks.
  • When the app appears broken but the code is fine, the problem is often in the environment rather that the applcation itself.
  • Resetting stale local state is sometimes the fastest and safest way to recover from a broken Expo/Android setup.

This

Conclusion

This experience highlighted an important lesson for local mobile development, the app is only one part of the system. A reliable dev workflow also depends on:

  • Correct android emulator state,
  • Valid AVD configuration,
  • working adb connectivity,
  • and proper file permissions in the local development environment.