Jun Yuan
Back to List

I Switched from iPhone to Android: A Programmer's Notes

I Switched from iPhone to Android: A Programmer's Notes
Writing code got faster for me in the last two years. An idea at night, an agent's homework in the morning, a few fixes, and it runs. The phone in my pocket did

Writing code got faster for me in the last two years. An idea at night, an agent's homework in the morning, a few fixes, and it runs. The phone in my pocket didn't get any faster.

Going from an idea to code is quick now. Going from code to something I can tap on a phone is still a pain. Sometimes the reason is stupid, like the phone won't let me install it at all.

So I switched my own phone to Android. This isn't a recommendation, and I didn't talk anyone into it. My wife's iPhone sits on the other end of the desk; she's happy with it, and I never tried to change her mind.

The most obvious change is a small one: the things I write myself, I can install whenever I want, and they just keep running. I don't have to babysit them.

1. Install it, then forget it

I wrote an app called ridemate that logs my e-bike commutes: duration, route, and how bumpy the road was. Flutter, data stays on the phone. It's listed on the projects page, and it was one of the things I mentioned in A Programmer's Days in the AI Boom.

The release process is two lines:

javascript
flutter build apk --debug adb install -r build/app/outputs/flutter-apk/app-debug.apk

Install it and use it. Change something, install again — -r keeps the data. The overlay and foreground-location permissions need to be declared in AndroidManifest.xml or nothing gets recorded once the screen locks. CI only builds the website and the backend Docker images; the APK isn't part of that. It was never meant for anyone else anyway.

Over there, you re-sign every week

You can do this on an iPhone, it's just a lot more work. An app signed with a free Apple ID expires after seven days, with at most three at a time. A $99 developer account gets you a certificate that lasts a year. TestFlight builds expire 90 days after upload, and external testing needs a Beta App Review. Sounds fine until you realise it means a recurring reminder: time to re-sign.

I actually had that reminder in my calendar for a while. The annoying part isn't the clicking; it's being out somewhere with no laptop and the app deciding to expire. I don't object to review — those rules are for hundreds of millions of users, and that's reasonable. But the app has one or two users, sometimes just me. I never worked out what I was getting out of that process.

2. Plug in a cable, read the bills

I started by writing a service

The page in my household finance system was originally going to be a service on a machine at home, with the phone connecting to it. Then I found out the browser can just talk to the phone over a cable. Chrome asks "Allow USB debugging?", you click yes, done. No server, no API key, no login page. I only tried Chrome and Edge.

On the Xiaomi I also had to turn on "USB debugging (Security settings)". Without it the screen won't respond to taps. I spent ages stabbing at the phone the first time, convinced the cable was broken, before I remembered to go into developer options and find that switch.

It reads bills with uiautomator dump: pull the view hierarchy and look for controls by their text — expenses, income, amounts. Alipay's package is com.eg.android.AlipayGphone, and the amounts are text on an android.widget.Button, not something guessed from a screenshot. The bill page has animations and dump gets stuck, so I set animation scale to zero, capture, then set it back. I didn't know that at first; the XML came out empty and I spent a while staring at logs.

Monthly bills are easier. The header already shows the month's expenses and income, so I read that line and skip the detail rows entirely. I really don't want to page through ten screens of transactions.

On iOS, screenshots

There is no ADB on iOS, and no ADB daemon on the other end of a WebUSB connection. App data on an iPhone is sandboxed: plug it into a computer and the only thing you can reach is the Documents folder the app deliberately exposes. Anything in Library/Application Support is out. Exporting data in practice means the app offers an export, or you take screenshots and run OCR.

I did the iPhone version of the photo sync project too, using libimobiledevice and ifuse to read a backup and mount the filesystem. It works, but the iPhone can only be a source — you can't adb push back into it — and HEIC files need converting. That's a different kind of work from adb pull. So I won't say iOS can't do it. I'm just too lazy to build a whole project just to read a few bills.

3. Agents need the cable too

A phone parked next to the machine

AI added another kind of user: an agent. I wrote about hooking agents up to content once before (A Blog Meets MCP), and the phone is the same kind of problem — give it an interface it can actually read.

My mobile-automation service parks a real phone next to a machine and lets an agent fetch screenshots and the view hierarchy over HTTP, then tap, swipe and type. Underneath it's uiautomator2 and adbutils, Python, Docker, on a W520. On the Xiaomi you need "USB debugging (Security settings)" or taps don't work. The wireless debugging port changes every time, somewhere between 32768 and 60999, so it scans; pairing once is enough. I hit all of that and wrote it into a note for my future self.

Over there, OCR

What Android gives me is plain: a native accessibility tree, locators by resource id, Chinese input, launch and stop, clipboard access. When the agent taps the wrong thing you can see which button it hit.

The iOS extension note lists what doesn't work: no accessibility tree, screen content guessed by OCR; HID typing is ASCII only, so no Chinese; no launching or stopping apps; screenshots need iOS 17.4+, a rootless tunnel and an ESP32 BLE HID accessory. What I wrote at the end was roughly: the iPhone is a backup, not a replacement.

Before AI that was just "slightly annoying". Now the gap is bigger: agents are worst at seeing clearly, tapping accurately and typing characters. Give one a picture it has to guess at and a keyboard that only types English, and being smart doesn't help much.

4. This is a note to myself

Everything above has one premise: I wrote the software, and I am the user.

If you're building something for other people, iOS review and sandboxing are exactly what you want — they keep a lot of junk out and take some responsibility off you. Don't listen to me in that case. This is just me messing with my own stuff.

Android isn't a paradise either. Vendor skins all do their own thing, every manufacturer has its own rules for background services, and permission dialogs multiply every year. I've hit all of it. At least the problem is on the phone and can be solved on the phone, without queuing for someone's approval.

The iPhone has a very clear answer to "who is in charge of this device": Apple. Android hands part of that back to me. That's why I switched, not the benchmarks or the camera.

5. Last few words

Writing things got faster, but installing them, keeping them alive and getting data out of the phone hasn't got any faster at all.

A few things I wrote are sitting on my phone now; some of them I don't open for days. It doesn't run on a server I rent. It's plugged in next to my desk, and I can't be bothered to unplug it.

Need something? Write it, install it. If it works, keep using it; if not, change it. When that loop closes, I figure I haven't wasted the evening.

Related Posts

You might also like

A Programmer's Days in the AI Boom: I Build Whatever I Need

A Programmer's Days in the AI Boom: I Build Whatever I Need

AI has improved faster than my sense of what my job even is. The hours after dinner go into handing tasks to agents and building my own systems. If I need something, I build it — bookkeeping, photo sync, my own deployment, all written and shipped by one person.

Read more
    I Switched from iPhone to Android: A Programmer's Notes - Jun Yuan