Hacker News new | past | comments | ask | show | jobs | submit login
deVStudio – Runs VS Code on Android (play.google.com)
165 points by userland_tech on Sept 5, 2023 | hide | past | favorite | 73 comments



My daily driver is Android + Samsung DeX, and I've tried doing this a couple different ways. In the end, the only thing that didn't make me pull me hair out in the long run was proper VSCode (arm64 build) inside termux/Ubuntu (installed via Andronix). Crucially, the only VNC client that works well with this (and I've tried all the paid ones too) is AVNC from FDroid.

I had too many issues with code-server and vscodium and such when it came to proprietary extensions unfortunately, and my actual dev machine is in the cloud so I rely on the Remote Dev extension. Has to be real VSCode.

I like that you can create a PWA from a standard code-server deployment too, and that works quite nice on DeX (proper immersive-mode full screen), but for me that has been too limiting because I cannot remap my brain away from my vim keybindings, and some stuff just doesn't work in a browser context. The browser will take over certain things (like ESC for getting out of full screen or alt+tab for navigating across browser tabs rather than VSCode tabs, etc).

As a rule of thumb now, any software that's complicated enough to require tabs, I try to run native arm64 builds for (VSCode, Obsidian, browser) and everything else I can get away with kiosk-mode browser windows masquerading as apps (email, calendar, feed reader, chat).


Can you elaborate on how you use DeX specifically? I recently bought my first Samsung - and was a bit curious about it, surprised to hear that it is a powerful tool.


I use one of these https://www.amazon.co.uk/dp/B07YF95RNR, some bluetooth peripherals, and a little phone tripod. I have it set so that when a monitor is plugged in, DeX starts automatically, so when I'm at my desk and plug my phone in, in 2 seconds I'm ready to roll. I also use DeX with my AR glasses (Nreal Air) when traveling, which basically behaves like a full-HD monitor on your face.

My termux session runs permanently in the background out of laziness (though this does noticeably shorten your battery life, but it's been mostly manageable) so all I need to do is start AVNC.

There are a lot of little configurations and quality of life things that I tweaked over the past year or so of doing this; happy to write all those up somewhere if you're interested.


That would be nice. I’d read it for sure.


I spent some time last week trying to set this up.

You can use Andronix to install Linux and a window manager onto you phone. You then use a VNC app to connect to that (local) Linux container and you'll have a fully working Linux phone. Works pretty well, though I had to jump to a few hoops as not all distro's worked on my Fold 3.

DEX starts automatically when you plug HDMI into your (Samsung) phone. You then start the Andronix Linux container thing from DEX and you have a fully working Linux distro, right from your pocket. Pretty magical.

What I do, is use remote VSCode to connect to my dev server, so I don't need to run anything locally, because speed wasn't great for me. But if you set it up as I did, you can work from anywhere and you don't need a laptop.


Just a heads up, newer versions of Android will kill processes that spawn a certain amount of subprocesses. You'll want to look into disabling the phantom process killer using adb (works for unrooted phones but you need to repeat those steps after each reboot.)


Try xorgxrdp. Might make it nicer for getting a remote display going, and has less latency.


Great! I have been wondering why something like this did not already exist, given that you can already run a full Ubuntu from termux (and indeed people have run a coder-server from such an environment). Someone must be able to create a more user-friendly version of vscode on Android. Will try this out on my Samsung tablet.

My only concern is the memory management -- vscode (and its extensions) is not super friendly in its memory usage, and on a phone/tablet the RAM could easily run out, even if swap is enabled.


I've been using termux + neovim as my default text editor on my phone. And it is surprisingly comfortable even with a touch screen keyboard.


Agreed! Termux profoundly changed my life. I do all of my programming inside Termux now. I find it to be pretty comfortable too.

Only thing I'm still missing is a way to build Android applications from inside Termux. We can write software for normal computers from inside themselves. Conversely, phones have always been these consumer machines, only running software produced for them and with no ability to program themselves. Feels like it's the only remaining barrier in the way of Android phones becoming truly general purpose computers.

I opened an issue on their repository about packaging the Android development tools:

https://github.com/termux/termux-packages/issues/17701

Someone linked a discussion where someone got it to work. I haven't had any luck setting this up though.


You can do that with Godot, I think - have a look.


Does it come with a modal keyboard or the same static one?


Android allows you to swap the virtual keyboard. I use unexpected keyboard which is also free software. It's excellent for programming. Before that I used Hacker's Keyboard which has actual arrow keys.

Termux also has a configurable bar at the bottom where you can map any keys you want. I use it for function and arrow keys plus a bunch of common symbols.

Here's an example from my dotfiles:

https://github.com/matheusmoreira/.files/blob/38565320fefb92...


Not sure what you mean by modal keyboard, but there is fully customizable row of keys in termux.

I disabled it, because I use special android keyboard app[0] with a custom layout made from scratch[1]: all common symbols, arrows, esc, ctrl, alt, forward delete, paste and enter gestures etc. etc.

[0] - https://jbak2.ucoz.net/ (yes it's horrible website, but it's free and easy to maintain for the handicapped developer)

[1] - https://github.com/Archargelod/jbak2Templates-Skins


Well, the modal command system is sort of hacked onto the qwerty keyboard. Surely it'd be more natural to just "insert" directly rather than hitting "i".


It's the same static keyboard, but navigation is easier as you can swipe to navigate around.


Modern phones come with 8GB of RAM, if you close a bunch of background apps it should deal with VS Code just fine.

I wouldn't even try it on a budget device, but high end Androids should run this more than well enough.


Do you have guide on hand about enabling swap on Android devices?

I searched a bit but saw some conflicting info and most of it was quite old. It seemed like people don't recommend doing it is possible.


Samsung has it built-in under "Memory" - "RAM Plus", so it could be a ROM thing.


So I found this app which seems like it's supposed to create more swap but the review seem mixed. I wonder if it depends on which version of Android. Seems Samsung has this feature built in to their OS at some point.

https://play.google.com/store/apps/details?id=com.allakore.s...


When we run Ubuntu on Android, we prefer UserLAnd over termux :)


I've been a happy UserLAnd user for a long time and it's a wonderful project, thank you!

I've have recently started using vmConsole too (which is based on qemu instead) as I needed docker. Also great.


This is made by the makers of UserLAnd - Run Linux on Android. Looking for early feedback. If you want a promo code (first 500) please email support@userland.tech.


Is there a planned feature for it to be incorporated into UserLAnd? Possibly through an In-App Purchase? It would be neat to be able to manage this along side other UserLAnd instances

Edit: Nevermind it is there. Super Awesome


Very cool! While I'm not an Android user, I'm glad to see this released. The more tablet-friendly IDE's the better.


I've been running https://github.com/coder/code-server for the past few months, and I really like it.

It's basically self-hosted VS Code in a browser. I can switch from my desktop to my laptop, even to my phone, and pick up right where I left off with uncommitted changes, long running processes, etc. Additionally, I get the full resources of my server and don't have to worry about it running down my battery or causing the fans to spin up on my laptop.


The sad thing is, you shouldn't need it if only Microsoft would spend some time to make their own web-based version work on mobile devices:

https://vscode.dev/


Yeah, but I like that I control the environment, so I can install whatever utilities, runtimes, etc that I want.


> I can switch from my desktop to my laptop, even to my phone, and pick up right where I left off with uncommitted changes, long running processes, etc.

Valid only while you have a (good) internet connection.


Well, I mostly use it at home with my server at home also, so technically it works without the internet in that case.

But your point still stands anytime I'm away from home.


From the screenshots this seems to use an X/VNC server or something, it might be good to also explore using https://github.com/coder/code-server with a native Android browser to get things like graphics acceleration (though with disadvantages like not being about to develop graphical applications)


An option using code server is coming. Will be in the same app, just different launch option.


How far away do you expect a Wayland-powered display to be? You're currently using VNC, but I'd imagine that <https://gitlab.freedesktop.org/mstoeckl/waypipe/> would also work while being smoother.


This is not the top of my list, but I am always looking at alternatives which can improve the way users interact with UserLAnd Technologies apps.


code-server can't use Microsoft's extension marketplace, but this can. Supposedly this runs the original Microsoft binary which is why things work exactly like a Linux desktop version. I know, this sucks.


If you're willing to break the ToS of the marketplace, or download your VSIX files manually, it can


Does this use actual vscode or is it based on vscodium?

I'm curious how much tweaking you needed to do to get this to work - I'd love to see this with https://cursor.sh (vscodium based) as the editor


This actually runs vscode.


neat, any thoughts on how to use a different base app?


Just installed, c sharp extension installed fine, looks very promising.

The only issue I've run into so far is signing into my Microsoft Azure and GitHub account since it doesn't seem to be able to load a web browser by default from this VS code instance?


It is a pretty minimal install. I should probably put a web browser with it later. Thanks for the feedback. Please review it on the Play Store.


Great, just left a 5 star review.

If you could include instructions for any browser that will work with with-in this app on the mobile architecture or even better like you said include it in the app install setup process.

Let me know when either are done and I'll un-install and re-install to test.


My biggest gripe with vscode on Android (code-server pwa on DeX) is lack of mouse hover and text selection. With so much intellisense hidden behind mouse popovers not having access to that is a bit of a show stopper.


I installed devStudio and hover seems to work fine, probably due to the vnc layer. What doesn't work well is the mouse pointer, there is a weird offset between the native cursor and the vnc cursor.


the irony that you can't run Android Studio on Android, but can run VS Code?


As soon as there are arm binaries, we will make an app out of it :)


perhaps run with box64 ? ;-)


This seems like a complete waste since https://vscode.dev etc exist. Why would anyone want to develop inside of a walled garden?


The web version you linked does not support the remote SSH extension, which is critical for many folks workflows. I can’t do any work without that extension.

I’m curious if the android version supports this extension?


It's certainly not as ergonomic as using the SSH extension directly, but you can SSH manually to your dev box, open a vscode tunnel, then connect to that from vscode.dev in a pinch.


Yes. It supports extensions.


Thanks for the response! So does vscode.dev, but it doesn’t support “Remote - SSH.” Could you confirm if this specific extension is functional?

To expand, for Remote - SSH to fully function it must read a ~/.ssh/config file as well.


I didn't read thoroughly enough. I have not tried that one yet. It should work as many people use SSH from the UserLAnd app, which this is similar to. If you try it out before we do, remember that android blocks apps from using the first 1k ports, so you have to run ssh on port 2022 or something like that, instead of the normal port 22.

I will make a point of getting that working if it doesn't.


Shells offers an Android OS on the platform with the ability to SSH.


Ironic that you call it a walled garden when the online version is not self hostable as actual VSCode is and is offered online at Microsoft's sole discretion.


Microsoft's version does not work on mobile. I have tried many times to make it work on Chrome on Android, but it just isn't designed to work on a small screen and is unusable. It's sad.

When I got out of jail all I had was smartphones I would borrow from friends and the only way I could end up developing sanely was to open a terminal to a Linux box and just use nano instead, which meant no IDE with auto-complete, syntax lookups, formatting and most importantly, debugging.


it's probably not as obvious when you are just out of jail(which is a shame, being locked up should be exactly the time when you can educate yourself, but not in real life probably)

But using linux terminal as devbox doesnt mean you dont have access to modern auto-complete syntax lookups formating etc, there are vim/neovim/emacs with any kind of configurations for all of it, and it can be preconfigured by others with projects like https://github.com/AstroNvim/AstroNvim or https://github.com/syl20bnr/spacemacs

So if you know anyone in the same kind of situation, you can advise them to use that.


Is there an open source / self hosted version of that (preferably with support for remote ssh, since it should be easy to support in a self-hosted environment)


I don't have a decent enough Android device to play with this, but how would one / could one run tsc alongside it on Android? Invoked through termux or something?


web version vscode.dev win, this app very have big delay for input


Yes but why?


I work on Minecraft (bedrock) addon APIs and have found a thriving subculture of creators develop solely on their mobile (Android) phones.

What seems crazy to me seems to work for others. I assume many of them are constrained by what they can afford.


Because getting a high resolution, oled, good aspect ratio, fast refresh rate display is much easier and more affordable on a tablet? Sure, even with a kickstand it is not quite as "lapable", but the screens are nice.

On a related note, when is pkvm supposed to be available outside pixel devices? Getting a proper linux or windows VM on one of the bigger samsung tablets + keyboard just might replace my laptop (yeah, remote stuff works, but offline on device would be much more convenient, e.g. on trains).


An Android phone or tablet with Dex can make for an excellent laptop replacement if you hook up a keyboard and a mouse.


termux tur pkg install code-server


Code App is a similar app available on iOS. I've used it a bit, and it's pretty polished. It's a paid app in the app store but the testflight build is available for free.

https://github.com/thebaselab/codeapp


I think they only look similar but are completely different. OP's app runs a full-featured vscode (not creating a new editor) and supposedly has access to all vscode's marketplace extensions.


Indeed that's worth remembering but iOS eco-system is as always more scoped/limited. And code.app really integrates well with Apple's limitations.


+1 to Code App. The developer has been super responsive to bugs. So far the app is the best IDE offering on iPad imho.


Another consideration about Code.app: - it's open sourced - developer is super responsive


something like this but using the ssh remoting feature would be killer for me.


You can actually edit remote files via SSH in the TestFlight build, and get a remote terminal to boot. Quite handy, although I can’t seem to be able to display two files side by side inside the app.


We will make this happen.




Consider applying for YC's Summer 2025 batch! Applications are open till May 13

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: