Boots and runs ok in Chrome on my Android 10 phone, but I guess I need an external keyboard. Android doesn't see any need text input, so no on-screen keyboard.
Does anyone happen to know if there is a general workaround for this situation? I often hit this obstacle in other browser-based emulators.
It works from here with an external keyboard for the text console, but the mapping of taps to mouse clicks in the X11 session is not quite right, so that part does not work.
On iOS, you can type in the clipboard section. On Firefox on Android, it seems to work except for backspace. Chrome on Android doesn't seem to work at all, though.
EDIT: Hacker's Keyboard has an option to have a notification to bring it up
Not if it's running entirely in my browser and therefore using my network stack - in the same way "icanhazip.com" when looked at in your browser should show your own IP.
edit: `curl icanhazip.com` returns 107.170.233.148 which seems to belong to digital ocean. It also matches the host relay.widgetry.org which is refered in the demo URL as as a "relayURL". I have no idea how it's working or why though - the lack of ip or ifconfig in the VM upsets me ;)
Maybe they tunnel all network requests through their server to make it work? Afaik you can't just make arbitrary tcp/udp request from a webpage to any host, so they must be tunneling the data via their own server.
It was really weird how my instincts fought me with every keystroke! I was just sure I was going to screw up someone else's server - not this transient VM in my browser.
It worked, btw -- I got a perfectly unusable system!
Actually, this is not the end. Try "echo *" to simulate a "ls" command and "cd" to change the directories. Also the busybox executable is still in memory , so you might be able to extract the binary from /proc/{pid}/mem . Busybox is a single static compiled executable which contains all the basic shell tools. Probaby you can also just paste new executables into the shell via echo and pipes.
In this emulator the kernel is not stored in the filesystem. It is downloaded separately and put into memory. But usually the kernel is at a fixed location in physical memory. So you might be able to receive the kernel image from /dev/mem. But, as far as I know the init routines memory is freed after boot. So I guess crucial information is lost forever.
Ah but couldn't you, once you've gotten your essential tools back to a working state, get the missing kernel bits from the internet before you reboot?
It'd be an interesting challenge. Get a linux vm, sudo rm -rf everything, and then see if you can get the system back to more or less the original state.
Wouldn't the easier path be to rewrite the filesystem table to undo the deletions? You'd need to be very careful to only write necessary tools into memory, but since deleting files typically only changes the filesystem table and doesn't remove the contents of the sectors, you might be able to get enough of a working system to reinstall what is left. I'd reach for photorec since I'm lazy, but you'd need to bootstrap it with glibc and a few other dependencies. Not sure how you'd mount the ramdisk though... just hexdump, less, and dd would be minimally sufficient, though much, much harder.
You are free to try it. I think it is possible. The shell has enough built in functions such as echo. One decade ago I read some blog article describing a possible way. First step is to set an alias 'alias ls="echo *"'.
The demo oh-so-briefly freaked me out. It uses the same RFC 1918 subnet I use on my VPN. So for about 10 seconds, I thought something local was leaking to javascript that probably shouldn't.
This is really cool, and performance-wise feels like the (even-then-ancient) surplus PC that I bought ca. fall 1995 to install slackware on. Which is to say, shockingly not-bad when you think about the stack it's sitting on.
Actually it was much faster some time ago. At least on Firefox. This emulator is basically a microbenchmark of the switch/case implementation of the browser. Firefox used a computed goto, which is perfect in this case. Now for some reasons it got slower. I have to take a look at the generated code to be really sure about what is happening here and what to do about it.
That is really interesting. I was using it in vivaldi on desktop and chrome on android, fwiw. I have to wonder what wasm might help... maybe the additional overhead on the VT and framebuffer would be so high it'd be a wash.
WebAssembly does not work on this low level. You cannot choose the switch/case implementation. Also it doesn't support goto. The reason is security and speed. The wasm-binary should be checked in O(n) and not in O(n^2). But I am curious about the future versions of webassembly.
There is already a wasm version of the CPU emulation. I will enable it at some point as default. But there is no speedup yet.
This emulator was optimized for Firefox and its JIT compiler. One or two years ago it was at least three times faster on Firefox than on Chrome. What unfortunately always happens with extreme optimization is that every small change in hardware or software can lead to massive performance problems.
39 comments
[ 2.6 ms ] story [ 105 ms ] thread;)
Does anyone happen to know if there is a general workaround for this situation? I often hit this obstacle in other browser-based emulators.
EDIT: Hacker's Keyboard has an option to have a notification to bring it up
edit: `curl icanhazip.com` returns 107.170.233.148 which seems to belong to digital ocean. It also matches the host relay.widgetry.org which is refered in the demo URL as as a "relayURL". I have no idea how it's working or why though - the lack of ip or ifconfig in the VM upsets me ;)
It was really weird how my instincts fought me with every keystroke! I was just sure I was going to screw up someone else's server - not this transient VM in my browser.
It worked, btw -- I got a perfectly unusable system!
It'd be an interesting challenge. Get a linux vm, sudo rm -rf everything, and then see if you can get the system back to more or less the original state.
This is really cool, and performance-wise feels like the (even-then-ancient) surplus PC that I bought ca. fall 1995 to install slackware on. Which is to say, shockingly not-bad when you think about the stack it's sitting on.
There is already a wasm version of the CPU emulation. I will enable it at some point as default. But there is no speedup yet.
Seems to work better on Firefox than on Chrome
ping: bad address 'www.google.com'
:( I thought it was going to work out of box.
https://blog.codinghorror.com/the-principle-of-least-power/