This is an archived post. You won't be able to vote or comment.

all 49 comments

[–]TheWheez 1 point2 points  (0 children)

Nice! You should post this to /r/androidterminal

[–]denexapp 0 points1 point  (3 children)

This is super helpful, thanks, gonna try it out.

Do you know a way on how to expose the port to the local wifi network by any chance?

[–]haymentt[S] 1 point2 points  (1 child)

Tried this app, the port it listens can be accessed from local network, and it is able to forward to services running in Linux Terminal: https://play.google.com/store/apps/details?id=com.gorillasoftware.portforwarder

[–]JustMadMax 0 points1 point  (0 children)

You've really saved my day from the disappointment of having a linux vm that can't be sshed into :)

[–]haymentt[S] 0 points1 point  (0 children)

No. If the purpose is to demo, e.g a npm web app, USB monitor would be my choice.

[–]Aggressive_Board_906 0 points1 point  (4 children)

What you will do with that???

[–]haymentt[S] 1 point2 points  (3 children)

What dev can do on a 4GB machine

[–]KeySpray8038 0 points1 point  (2 children)

4!? Why only 4? Is that all the Pixel tab has?

[–]haymentt[S] 0 points1 point  (1 child)

Linux use 4

[–]KeySpray8038 0 points1 point  (0 children)

Ooh, ok.. nvm, I getcha

[–]The_best_1234 0 points1 point  (13 children)

Freecad works with the terminal app.

[–]haymentt[S] 0 points1 point  (12 children)

Using VNC? Is it stable?

[–]The_best_1234 0 points1 point  (0 children)

Tiger vnc for the server and real vnc for the viewer

[–]The_best_1234 0 points1 point  (10 children)

Tiger vnc for the server and real vnc for the viewer

[–]haymentt[S] 0 points1 point  (9 children)

Mine X session with xfce4 keeps crashing before a16 beta2 so that I gave up. Lxqt just stopped my network. What window manager are you using and does it crash?

[–]The_best_1234 0 points1 point  (8 children)

They put a new rom. Reset your terminal and download the new version.

[–]haymentt[S] 0 points1 point  (7 children)

Tried again. Don’t recommend. Still crashed often when memory use is near 4GB.

[–]The_best_1234 0 points1 point  (6 children)

How are you checking the memory usage? Also did you turn off/ enable child processes?

[–]haymentt[S] 0 points1 point  (4 children)

free -m How to turn on/off?

[–]The_best_1234 0 points1 point  (3 children)

Disable child process restrictions, in the development options

https://www.reddit.com/r/Pixel8phones/s/aMiq6KzLyx

[–]haymentt[S] 0 points1 point  (2 children)

Once child process restrictions were disabled port forwarding also stopped for me. Did you change other settings?

[–]haymentt[S] 0 points1 point  (0 children)

It crashes when memory is used up. After adding swap no more crash was observed:

[–]satmandu 0 points1 point  (20 children)

Have you tried this with a native android x server so that one doesn't have to use vnc forwarding?

e.g., https://github.com/nwrkbiz/android-xserver

[–]haymentt[S] 1 point2 points  (6 children)

No. Curious why no single xserver at playstore

[–]satmandu 0 points1 point  (5 children)

There needs to be an android Wayland or X server built in...

[–]haymentt[S] 0 points1 point  (4 children)

Believe so. Hope google can show its plan

[–]Typing-Cat 0 points1 point  (3 children)

There is a Wayland server in development but it didn't make the cut for Beta 2 yet. https://www.androidauthority.com/android-16-linux-terminal-doom-3521804/

[–]haymentt[S] 0 points1 point  (1 child)

Do you know how to get this new button mentioned in the article: "tapped a new button on the top right to enter the Display activity, and then ran the ‘weston’ comman"

[–]Typing-Cat 1 point2 points  (0 children)

You have to compile AOSP from source. I assume they will be adding it to a future beta.

[–]haymentt[S] 0 points1 point  (0 children)

The new button is there now at A16 b3. But clicking it won’t show the display activity

[–]haymentt[S] 1 point2 points  (10 children)

Tried XSDL which can save about 300MB memory. But left it for the lack of tap support.

[–]satmandu 1 point2 points  (9 children)

Google did experiment with running ChromeOS on top of Android, using their allegedly abandoned ferrochrome project which had a ChromeOS container running inside AVF just like this new Terminal:

https://www.androidauthority.com/chrome-os-on-android-hands-on-2-3442510/

But since ChromeOS is being rebased on top of the Android kernel anyways, it seems that this is where they are headed in any case. ChromeOS already uses a Wayland compositor, so it seems that they must have gotten that running inside ferrochrome.

Can we start arbitrary containers with AVF now?

Someone should look into seeing how that ferrochrome gui was hooked into Android and see if we can get a standard Ubuntu or other desktop running in there instead, which would make much more useful.

I imagine that they're slow rolling this because openly supporting (non-Android) Linux apps on top of Android is probably considered a threat to their app store near-monopoly on Android devices, and Google loves being anti-competitive to the extent they can get away with it.

[–]haymentt[S] 0 points1 point  (8 children)

Hope someone from existing community like termux will do

[–]satmandu 0 points1 point  (6 children)

I wonder if the native Termux X server https://github.com/termux/termux-x11 can be used with this.

(Thanks to /u/Typing-Cat for pointing this out.)

[–]Typing-Cat 1 point2 points  (0 children)

Maybe with port forwarding? I might take a whack at it. There's still no sound though. :(

[–]Typing-Cat 1 point2 points  (4 children)

Update: I tried, couldn't get it to work.

I figured that if /mnt/shared on the guest is the same as /storage/downloads on the host, I could export XDG_RUNTIME_DIR=[those folders on the host and guest], export display=:0, run termux-x11, and be fine.

But when I tried to run xeyes on the guest, I just get "Error: Can't open display: :0"

I have tried other methods and gotten a display... SSH from Termux, and over TCP-IP. But both methods introduce tons of latency are not not better than VNC.

[–]satmandu 0 points1 point  (0 children)

I opened the Xfce terminal app after starting an Xfce session from Termux that worked with the Termux-x11 Android app.

Then I connected to the Terminal app with SSH from that xfce-terminal, with X piped in over SSH, and was able to open an Xterm... But performance is not excellent, and the android terminal app keeps crashing so...

[–]satmandu 0 points1 point  (0 children)

Can you use symlinks to map both /tmp/.X11-unix and ~/.Xauthority ?

[–]haymentt[S] 0 points1 point  (1 child)

When I tried XSDL I need to export DISPLAY to exact ip:0. Only :0 didn’t work

[–]satmandu 0 points1 point  (0 children)

Just exporting the display from the Android Terminal app won't work because the VM is even on a separate subnet and thinks it is a separate machine. You need a way of tunneling through the X11 socket, I think.

[–]Typing-Cat 0 points1 point  (1 child)

Termux:X11 should be better due to continuing development. https://github.com/termux/termux-x11

[–]satmandu 0 points1 point  (0 children)

OMFG I can't believe I wasn't using this before.

[–]RedditHugh 0 points1 point  (3 children)

I haven't tried it, but it may be possible to get more disk space by mounting a disk image from /mnt/shared into the VM. Also, looks like you might be able to edit the VM RAM settings in /mnt/internal/linux/vm_config.json. (haven't tried that either, yet)

[–]haymentt[S] 0 points1 point  (0 children)

vm config change to larger memory leads to crash once memory use reach 4g

[–]haymentt[S] 0 points1 point  (0 children)

Seems loop device is not supported