Circuit Python boards are great because they run python duh, but also because they are simple to use. You plug it in to a computer, it shows up as a small "thumb drive" type device that stores the .py file. You edit that file, save it and the board runs your new code, easy peasy.
But what if we want to take our Circuit Python development on the go with our Android phone or tablet? Lets grab an OTG cable and find out. Ah DRAT!! we get this nasty message about unsupported storage. It turns out the Circuit Python boards are using some older file format system (FAT12 maybe?) and Android does not seem to support this.
Well shucks, I guess our hopes and dreams of mobile Circuit Python development are pretty well crushed aren't they? Not so fast! could there be another way?
Idea: Instead of using the board like a filesystem, we can connect via serial to the board and use the REPL to help us load and save python code.
I've got a proof of concept running and after a rough patch of completely mangled python code, it's been working pretty well for a bit.
Luckily someone else has created a USB Serial library that we can use to get connected and communicating with the board (all of my testing has been on Circuit Playground Express, but should support other boards too.) Once the communication was established then entering the REPL was pretty straight forward. To load the code we use REPL to open main.py and dump it's contents into serial output so we can read it on the Android side. Saving proved to be a bit trickier, trying to write the entire file at once I ran into errors. So currently It's writing one line at a time, again using statements in the REPL. Once it's done you can send ctrl-D to reload and run your new code.
The Github linked in the project is for the Android app, there is a debug APK file in the repo if you just want to try out the app. If you do please share how it goes!
WARNING: This app is in the alpha stage, it may not work at all for you. Or worse it may work improperly and erase, or overwrite with non-sense the code on your board. Please keep an extra copy of any important code stored on your PC or somewhere other than the Circuit Python board. That way you can always remount to read-only and save your working code on the board using the standard file transfer method.