Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Cannot use anbox [SOLVED]

Graphical Environments, Managers, Multimedia & Desktop questions.
Post Reply
Message
Author
User avatar
Scorpion
Posts: 389
Joined: 2018-10-17 11:38
Has thanked: 5 times

Cannot use anbox [SOLVED]

#1 Post by Scorpion »

I checked the anbox info:

Code: Select all

gedit /usr/share/doc/anbox/README.Debian
I installed the modules https://github.com/anbox/anbox-modules/:

Code: Select all

ls -alh /dev/binder /dev/ashmem
crw-rw-rw- 1 root root  10, 56 Jul 10 09:03 /dev/ashmem
crw-rw-rw- 1 root root 511,  0 Jul 10 09:03 /dev/binder
If I check binder_linux is fine, but ash_men_linux:

Code: Select all

modprobe ashmen_linux
modprobe: FATAL: Module ashmen_linux not found in directory /lib/modules/5.0.0-19.1-liquorix-amd64
Is there a problem? After I restored a backup I have this error.

I downloaded, placed and renamed the prebuild image from https://build.anbox.io/android-images.

If I use the GUI after the initial window with "Starting" nothing happens.
If I launch it from the terminal:

Code: Select all

anbox launch --package=org.anbox.appmgr --component=org.anbox.appmgr.AppViewActivity
[ 2020-07-10 18:11:10] [launch.cpp:214@operator()] Session manager failed to become ready
Is the "--package" the apk file? Where should I put those files?
What is the "--component"?
Is this how do you launch it from a terminal?
Last edited by Scorpion on 2021-08-31 14:23, edited 1 time in total.

User avatar
eriefisher
Posts: 130
Joined: 2008-06-04 03:49
Location: Ontario's South Coast

Re: Cannot use anbox

#2 Post by eriefisher »

It's ashmem not ashmen.

As for the rest I'm still working through it in my spare time.
____________________________________________
There's a manual?
Siduction
Debian Sid
Xfce4 4.14

User avatar
Scorpion
Posts: 389
Joined: 2018-10-17 11:38
Has thanked: 5 times

Re: Cannot use anbox

#3 Post by Scorpion »

Oh right.
On my other pc with the default debian kernel (4.19.0-9-amd64), that has the anbox modules, I can see:

Code: Select all

lsmod | grep -e ashmem_linux -e binder_linux
binder_linux          159744  0
ashmem_linux           20480  0
Is this ok?

If I launch it from the CLI it also open the GUI and:

Code: Select all

anbox launch --package=org.anbox.appmgr --component=org.anbox.appmgr.AppViewActivity
[ 2020-07-11 16:02:07] [daemon.cpp:61@Run] Application manager service is not running yet
After the initial window with "Starting" nothing happens.

cuckooflew
Posts: 677
Joined: 2018-05-10 19:34
Location: Some where out west
Been thanked: 1 time

Re: Cannot use anbox

#4 Post by cuckooflew »

Try running this:

Code: Select all

anbox container-manager 
command in a terminal.
Show us what it says .
Please Read What we expect you have already Done
Search Engines know a lot, and
"If God had wanted computers to work all the time, He wouldn't have invented RESET buttons"
and
Just say NO to help vampires!

cuckooflew
Posts: 677
Joined: 2018-05-10 19:34
Location: Some where out west
Been thanked: 1 time

Re: Cannot use anbox

#5 Post by cuckooflew »

Scorpion , there are so many problems with this "anbox", I really do not understand why they have even included it as a Debian package, there is very little documentation for Debian, all most 0, but for Ubuntu, and arch linux, there is a lot of documentation, tons of it, and it is all people having the same issues you have, apparently a very few, have had good results with it, and for them it basically just worked. That is to say on some systems, it does seem to work ok, I suggest, if you are really interested in using this package, on a Debian system, you start working more directly with the maintainers, etc. Report your problems, and ask them the questions, ...as well as keeping threads open here, you now have 2, another approach might be to use a VM, install Ubunrtu, and follow one of the several step by steps, that are available for Ubuntu.


https://github.com/anbox/anbox/issues
From:https://github.com/anbox/anbox/blob/master/README.md Supported Linux Distributions

At the moment we officially support the following Linux distributions:

Ubuntu 16.04 (xenial)
Ubuntu 18.04 (bionic)

However all other distributions supporting snap packages should work as well as long as they provide the mandatory kernel modules (see kernel/).
I removed it from my VM, I don't have enough interest and really don't want it, it just takes up limited space,..
You would help your self more , if you start using some serious search foo, there is a lot of documentation,but sadly none for Debian, specifically, that I can find, :

https://snapcraft.io/install/anbox/debian
==============================

To communicate directly , I suggest reading this bug report, and look at some of the solutions :
https://bugs.debian.org/cgi-bin/bugrepo ... bug=943654
================================
https://bugs.debian.org/anbox
For all of the "bugs", I do not have enough time or interest to go reading them all, to see which ones match your many problems, sorry I can not be of more help. But don't get discouraged, there probably will be others getting involved with this, it seems to have a fair amount of interest and is popular with the Ubuntu and Linux mint crowd, I am sure there will be some Debian user with more interest then what I have. Good Luck
Please Read What we expect you have already Done
Search Engines know a lot, and
"If God had wanted computers to work all the time, He wouldn't have invented RESET buttons"
and
Just say NO to help vampires!

User avatar
Scorpion
Posts: 389
Joined: 2018-10-17 11:38
Has thanked: 5 times

Re: Cannot use anbox

#6 Post by Scorpion »

I can see on the https://bugs.debian.org/cgi-bin/bugrepo ... bug=943654 how check the services:

Code: Select all

systemctl status anbox-container-manager.service
● anbox-container-manager.service - Anbox Container Manager
   Loaded: loaded (/lib/systemd/system/anbox-container-manager.service; enabled; vendor preset: enabled)
   Active: active (running) since Sun 2020-07-12 06:52:13 CEST; 2h 10min ago
     Docs: man:anbox(1)
  Process: 669 ExecStartPre=/sbin/modprobe ashmem_linux (code=exited, status=0/SUCCESS)
  Process: 673 ExecStartPre=/sbin/modprobe binder_linux (code=exited, status=0/SUCCESS)
  Process: 674 ExecStartPre=/usr/share/anbox/anbox-bridge.sh start (code=exited, status=0/SUCCESS)
 Main PID: 989 (anbox)
   Memory: 11.1M
   CGroup: /system.slice/anbox-container-manager.service
           └─989 /usr/bin/anbox container-manager --daemon --privileged --data-path=/var/lib/anbox

Jul 12 06:51:58 debian-desktop systemd[1]: Starting Anbox Container Manager...
Jul 12 06:52:13 debian-desktop systemd[1]: Started Anbox Container Manager.

Code: Select all

systemctl --user status anbox-session-manager.service
● anbox-session-manager.service - Anbox Session Manager
   Loaded: loaded (/usr/lib/systemd/user/anbox-session-manager.service; disabled; vendor preset: enabled)
   Active: inactive (dead)
     Docs: man:anbox(1)
Now:

Code: Select all

anbox launch --package=org.anbox.appmgr --component=org.anbox.appmgr.AppViewActivity
X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  151 (GLX)
  Minor opcode of failed request:  3 (X_GLXCreateContext)
  Value in failed request:  0x0
  Serial number of failed request:  100
  Current serial number in output stream:  101
If I restart the dead service:

Code: Select all

systemctl --user status anbox-session-manager.service
● anbox-session-manager.service - Anbox Session Manager
   Loaded: loaded (/usr/lib/systemd/user/anbox-session-manager.service; disabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sun 2020-07-12 09:05:46 CEST; 3s ago
     Docs: man:anbox(1)
  Process: 17399 ExecStart=/usr/bin/anbox session-manager (code=exited, status=1/FAILURE)
 Main PID: 17399 (code=exited, status=1/FAILURE)

Jul 12 09:05:46 debian-desktop systemd[1887]: Started Anbox Session Manager.
Jul 12 09:05:46 debian-desktop anbox[17399]: X Error of failed request:  BadValue (integer parameter out of ra
Jul 12 09:05:46 debian-desktop anbox[17399]:   Major opcode of failed request:  151 (GLX)
Jul 12 09:05:46 debian-desktop anbox[17399]:   Minor opcode of failed request:  3 (X_GLXCreateContext)
Jul 12 09:05:46 debian-desktop anbox[17399]:   Value in failed request:  0x0
Jul 12 09:05:46 debian-desktop anbox[17399]:   Serial number of failed request:  100
Jul 12 09:05:46 debian-desktop anbox[17399]:   Current serial number in output stream:  101
Jul 12 09:05:46 debian-desktop systemd[1887]: anbox-session-manager.service: Main process exited, code=exited,
Jul 12 09:05:46 debian-desktop systemd[1887]: anbox-session-manager.service: Failed with result 'exit-code'.
lines 1-16/16 (END)
Is this the problem so?

Code: Select all

anbox container-manager 
[ 2020-07-12 07:11:17] [container_manager.cpp:71@operator()] You are running the container manager manually which is most likely not
[ 2020-07-12 07:11:17] [container_manager.cpp:72@operator()] what you want. The container manager is normally started by systemd or
[ 2020-07-12 07:11:17] [container_manager.cpp:73@operator()] another init system. If you still want to run the container-manager
[ 2020-07-12 07:11:17] [container_manager.cpp:74@operator()] you can get rid of this warning by starting with the --daemon option.
[ 2020-07-12 07:11:17] [container_manager.cpp:75@operator()] 
[ 2020-07-12 07:11:17] [container_manager.cpp:119@operator()] boost::filesystem::create_directories: Invalid argument

User avatar
Scorpion
Posts: 389
Joined: 2018-10-17 11:38
Has thanked: 5 times

Re: Cannot use anbox

#7 Post by Scorpion »

If I try from snap:

Code: Select all

snap install anbox --beta
error: The publisher of snap "anbox" has indicated that they do not consider this revision to be of
       production quality and that it is only meant for development or testing at this point. As a
       consequence this snap will not refresh automatically and may perform arbitrary system
       changes outside of the security sandbox snaps are generally confined to, which may put your
       system at risk.

       If you understand and want to proceed repeat the command including --devmode; if instead you
       want to install the snap forcing it into strict confinement repeat the command including
       --jailmode.

Code: Select all

snap install anbox --beta --jailmode
error: cannot install "anbox": this system cannot honour the jailmode flag
There is no stable version.

Code: Select all

snap install anbox --beta --devmode
2020-07-12T09:28:23+02:00 INFO Waiting for restart...
anbox (beta) 4-56c25f1 from Simon Fels (morphis) installed
Channel latest/beta for anbox is closed; temporarily forwarding to beta.
If I use it:

Code: Select all

snap run anbox launch --package=org.anbox.appmgr --component=org.anbox.appmgr.AppViewActivity
Now the anbox window is transparent.
After some time the terminal exited the process, while the window was still there.

cuckooflew
Posts: 677
Joined: 2018-05-10 19:34
Location: Some where out west
Been thanked: 1 time

Re: Cannot use anbox

#8 Post by cuckooflew »

Ok, well then you can disregard part of my post, I was still writing , and when I was ready to post, I see this,.... any way, I am tired now, (I cut most of it, I think) any way, it was about snaps.

There seem to be a lot of things going wrong, honestly, this is really something you should be asking the package maintainer, not us, or me, seems nobody else is interested,... I will try to explain, first , this:

Code: Select all

systemctl status anbox-container-manager.service
● anbox-container-manager.service - Anbox Container Manager
   Loaded: loaded (/lib/systemd/system/anbox-container-manager.service; enabled; vendor preset: enabled)
   Active: active (running) since Sun 2020-07-12 06:52:13 CEST; 2h 10min ago
     Docs: man:anbox(1) 
It tell you to check man:anbox(1), do you do that ? I copy/paste

Code: Select all

 Docs: man:anbox(1) 
into a search engine, it points me to these: https://docs.anbox.io/userguide/install.html
The problem , these are for Ubuntu, and NOT Debian, so please also read: https://wiki.debian.org/DontBreakDebian
I have no idea why this program is even in the Debian packages, well it isn't really, you have to enable "contributor " (contrib non-free) Package: anbox (0.0~git20190124-1) [contrib] https://www.debian.org/doc/debian-polic ... chive-area Please read that,... so you understand better what it means,..
Now look at the package: https://packages.debian.org/buster/anbox
Look at the far right side, look for where it says :

Code: Select all

Maintainer:

  [u]  Shengjing Zhu[/u] [u] (QA Page) [/u]

External Resources:

    Homepage [anbox.io]
 
It would be best to just submit a formal bug report, and include this information Shengjing Zhu will respond, and tell you what you need to do, it is not good to be using Ubuntu instruction, the "snaps" and snaps store, seem to be required, BEFORE submitting the bug report. The e-mail address for Shengjing Zhu is also on the page, if you follow the link on his name,...but doing the bug report is better, he or she,, not sure really, any way, they might not reply to a e-mail.
Now back to your out put:

Code: Select all

 Major opcode of failed request:  151 (GLX)
  Minor opcode of failed request:  3 (X_GLXCreateContext) 
I don't really understand that my self, I don't know what it is, but I will do a search for you, and me, 1 more time:
"waht is GLX ?" =https://en.wikipedia.org/wiki/GLX
copy /paste:

Code: Select all

Major opcode of failed request:  151 (GLX) 
into the search engine, one of the many results,
indicate it is a hardware problem, firmware, or driver, I don't know exactly...any way :
Maybe Show us the out put of

Code: Select all

$ glxinfo 
see if it shows anything,..the information should be included when you submit your bug report , Maybe read some of the results in the search, there are many, but any way, that is also a problem,... and there may be more, but I am to tired now,...
Please Read What we expect you have already Done
Search Engines know a lot, and
"If God had wanted computers to work all the time, He wouldn't have invented RESET buttons"
and
Just say NO to help vampires!

User avatar
Scorpion
Posts: 389
Joined: 2018-10-17 11:38
Has thanked: 5 times

Re: Cannot use anbox

#9 Post by Scorpion »

Now I have another error:

Code: Select all

systemctl --user status anbox-session-manager.service
● anbox-session-manager.service - Anbox Session Manager
   Loaded: loaded (/usr/lib/systemd/user/anbox-session-manager.service; disabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sun 2020-07-12 20:21:55 CEST; 21min ago
     Docs: man:anbox(1)
  Process: 8628 ExecStart=/usr/bin/anbox session-manager (code=exited, status=1/FAILURE)
 Main PID: 8628 (code=exited, status=1/FAILURE)

Jul 12 20:21:55 debian-desktop systemd[1806]: Started Anbox Session Manager.
Jul 12 20:21:55 debian-desktop anbox[8628]: bind: Address already in use
Jul 12 20:21:55 debian-desktop systemd[1806]: anbox-session-manager.service: Main process exited, code=exited,
Jul 12 20:21:55 debian-desktop systemd[1806]: anbox-session-manager.service: Failed with result 'exit-code'.
lines 1-11/11 (END)
I had to use timeshift again, If I select a mirror (apt edit-sources) I get a lot of new packages to upgrade, including some of the nvidia. Then the nvidia-driver breaks the kernels, even without using "apt upgrade".
Like when I had a problem installing anbox and I changed the mirror as suggested http://forums.debian.net/viewtopic.php?f=10&t=146691.
On my other pc with a fresh buster installation I installed it without problem.

I did some other attempts, once when "systemctl --user restart anbox-session-manager.service" succeeded I was able to open anbox.
But there was nothing I could do, I was only able to maximize/minimize the window.

The snap version now it is completely removed, I don' t like the warning and it didn' t work.

I read "man anbox".
Some people have reported that anbox can't work on their Nvidia driver.
It seems that nvidia-driver can be a problem, on my other pc I do not have them (no GPU).

cuckooflew
Posts: 677
Joined: 2018-05-10 19:34
Location: Some where out west
Been thanked: 1 time

Re: Cannot use anbox

#10 Post by cuckooflew »

Yes that is my conclusion as well, not just can be, nvidia-driver is a problem. I am curious though:
On my other pc with a fresh buster installation I installed it without problem.
Do you mean it works as well, ?

The other thing, I don't think anbox is at all ready to be used on Debian, it is in "contrib", but normally I do not even use "contrib non-free " option in my source.list, I did add it for this, but have no plan of keeping it that way. If you have seen this: https://docs.anbox.io/userguide/install_apps.html
For installing the applications,
If you’re running Ubuntu or Fedora you can install ADB from the package archive:

# On Ubuntu
$ sudo apt install android-tools-adb

# On Fedora
$ sudo dnf install android-tools
BUt no where does it ever even mention what to do on Debian, however in the /usr/share/doc/anbox/README.Debian it does,
* Applications

The upstream Android image doesn't bring any App Store, but you can use adb to
install applications from the command line:
.
wget https://f-droid.org/FDroid.apk
adb install FDroid.apk
.
As shown in the above example, you can download F-Droid apk from its website
and install it with adb.
Please Read What we expect you have already Done
Search Engines know a lot, and
"If God had wanted computers to work all the time, He wouldn't have invented RESET buttons"
and
Just say NO to help vampires!

User avatar
Scorpion
Posts: 389
Joined: 2018-10-17 11:38
Has thanked: 5 times

Re: Cannot use anbox

#11 Post by Scorpion »

No I was only able to install it, I cannot even open it.
"systemctl --user status anbox-session-manager.service" is not working also there.

If I use adb usually:

Code: Select all

adb install FDroid.apk
adb: failed to install FDroid.apk: Can't find service: package
Sometimes:

Code: Select all

adb install FDroid.apk
adb: failed to install FDroid.apk: 
Exception occurred while dumping:
java.lang.IllegalStateException: Failed to find running mount service
	at android.os.storage.StorageManager.<init>(StorageManager.java:358)
	at android.app.SystemServiceRegistry$33.createService(SystemServiceRegistry.java:429)
	at android.app.SystemServiceRegistry$33.createService(SystemServiceRegistry.java:428)
	at android.app.SystemServiceRegistry$CachedServiceFetcher.getService(SystemServiceRegistry.java:839)
	at android.app.SystemServiceRegistry.getSystemService(SystemServiceRegistry.java:792)
	at android.app.ContextImpl.getSystemService(ContextImpl.java:1512)
	at android.content.Context.getSystemService(Context.java:2889)
	at com.android.internal.content.PackageHelper.resolveInstallVolume(PackageHelper.java:362)
	at com.android.server.pm.PackageInstallerService.createSessionInternal(PackageInstallerService.java:652)
	at com.android.server.pm.PackageInstallerService.createSession(PackageInstallerService.java:571)
	at com.android.server.pm.PackageManagerShellCommand.doCreateSession(PackageManagerShellCommand.java:1169)
	at com.android.server.pm.PackageManagerShellCommand.runInstall(PackageManagerShellCommand.java:168)
	at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:99)
	at android.os.ShellCommand.exec(ShellCommand.java:94)
	at com.android.server.pm.PackageManagerService.onShellCommand(PackageManagerService.java:18349)
	at android.os.Binder.shellCommand(Binder.java:468)
	at android.os.Binder.onTransact(Binder.java:367)
	at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:2387)
	at com.android.server.pm.PackageManagerService.onTransact(PackageManagerService.java:3031)
	at android.os.Binder.execTransact(Binder.java:565)
How can I launch one of default app from the CLI?
One time that "systemctl --user status anbox-session-manager.service" is working, since I could not use the anbox GUI that time that I was able to open it, I can try to launch a default app (with the CLI).
But I cannot install new ones...

User avatar
Scorpion
Posts: 389
Joined: 2018-10-17 11:38
Has thanked: 5 times

Re: Cannot use anbox

#12 Post by Scorpion »

Every time that I start the pc I have to:

Code: Select all

systemctl --user restart anbox-session-manager.service
Is this normal?

Sometimes it succeeds, when it does I can install apk files with adb:

Code: Select all

adb install FDroid.apk
* daemon not running; starting now at tcp:5037
* daemon started successfully
Success
I had to try 10+ version, to find one working, of the apk of my interest.

I can see it on the GUI, but I cannot use the GUI.
That is another bug https://bugs.debian.org/cgi-bin/bugrepo ... bug=932582 "anbox: ignores mouse input".

I wrote to the bug https://bugs.debian.org/cgi-bin/bugrepo ... bug=943654 "anbox: GUI crashes after "starting"".

Can I launch anbox apt with the CLI?

Edit: The anbox apps are also in the gnome applications, but if I can open them I can' t do anything.

User avatar
Scorpion
Posts: 389
Joined: 2018-10-17 11:38
Has thanked: 5 times

Re: Cannot use anbox [SOLVED]

#13 Post by Scorpion »

On Debian 11 it works.

chentao
Posts: 1
Joined: 2022-11-12 09:50

Re: Cannot use anbox [SOLVED]

#14 Post by chentao »

How did you manage to make it work ?
I am using Bullseye, and I followed all the steps of this post :

Code: Select all

$ ls -alh /dev/binder /dev/ashmem
crw------- 1 root root 10, 59 nov.  12 00:39 /dev/ashmem
crw------- 1 root root 10, 58 nov.  12 00:39 /dev/binder

$ systemctl status anbox-container-manager.service
 Loaded: loaded (/lib/systemd/system/anbox-container-manager.service; enabled; vendor preset: enabled)
     Active: active (running) since Sat 2022-11-12 10:39:10 WAT; 18min ago.
     (...)

$ systemctl --user status anbox-session-manager.service
● anbox-session-manager.service - Anbox Session Manager
     Loaded: loaded (/usr/lib/systemd/user/anbox-session-manager.service; enabled; vendor preset: enabled)
     Active: active (running) since Sat 2022-11-12 10:39:16 WAT; 19min ago
     (...)

$ adb install FDroid.apk
Performing Streamed Install
Success

$ anbox check-features
Your computer does meet all requirements to run Anbox
But still :

Code: Select all

$ anbox launch --package=org.anbox.appmgr --component=org.anbox.appmgr.AppViewActivity
[ 2022-11-12 10:01:36] [launch.cpp:202@operator()] Session manager failed to become ready
What did I miss ?

User avatar
Scorpion
Posts: 389
Joined: 2018-10-17 11:38
Has thanked: 5 times

Re: Cannot use anbox [SOLVED]

#15 Post by Scorpion »

I am not using it anymore, I removed it.
If I have to use some app I prefer to use a VM, I find it more reliable.

Do you have the android iso in the folder?
https://build.anbox.io/android-images.

Maybe now it doesn't work anymore it's been some time since the last time that I used it.

Post Reply