Skip to content
This repository has been archived by the owner on Dec 12, 2023. It is now read-only.

Ubuntu Touch Nexus 5 (devel) = Anbox install kills wifi driver #1264

Closed
BadAngelZ opened this issue Oct 22, 2019 · 29 comments
Closed

Ubuntu Touch Nexus 5 (devel) = Anbox install kills wifi driver #1264

BadAngelZ opened this issue Oct 22, 2019 · 29 comments

Comments

@BadAngelZ
Copy link

I opened this bug on the "anbox" git:
anbox/anbox#1261
but they said it should be an ubuntu touch problem ... So I open it again here :)

I run the last ubuntu touch version (development 1194) on a Nexus 5 phone.
This problem was tested on two different nexus 5 phones: mine with some application and data inside, my wife's phone which does not have so much things in it.

Each time I upgrade my ubuntu, I must "re-install" anbox following this guide:
https://docs.ubports.com/en/latest/userguide/dailyuse/anbox.html
And it worked fine until last ubuntu upgrade ...

Since some ubuntu versions (~ 900), when flashing the bootloader, I got some strange behavior:

  • camera "freezes" after taking a first shot. If I switch to front camera then to "standard" camera, the camera "unfreezes"
  • enabling access points works sometimes, but fails often. As a workaround, I switch it on / off until it works.
  • when the phone asks to be unlocked, the keyboard rises and forbids to type the code. The workaround: push the side button to shut off the screen then push it again to wake the phone up.

I precise: just after upgrading ubuntu touch: camera application and access point work great. But just after flashing anbox bootloader, those work strangely (as described).
The anbox bootloader is located here:
http://cdimage.ubports.com/anbox-images/anbox-boot-$CODENAME.img
with CODENAME="hammerhead"
Note: This file did not evolve since months (even if file date is 3rd august 2019).

Some days ago I upgraded my ubuntu touch from version 1162 to 1192. And after installing anbox bootloader, the wifi chip is no longer detected. Moreover, the NetworkManager uses 100% CPU making the phone really hot (workaround: shut it off, make it cool down, then reboot and remove some /etc/NetworkManager/ files, kill NetworkManager, then reboot again)

Previously I had version 1162, and it was fine (except that once bootloader being flashed I got the problems mentioned above, but I don't care about them because I do not use camera often, and workarounds are acceptable).
Now with versions from 1192 and above (1193), flashing the anbox bootloader removes the wifi "driver", and I must wait for the next build to be available to recover the wifi functionnality. Today, I got the 1194 ubuntu touch development version, but did not try to flash bootloader again (since I need my wifi connection, I will try again when the next version will be available, and I will have some spare time ;)

As suggested in Hammerhead: r168 ubports-touch (16.04) can´t see wifi I ran the following command:
nmcli -p d
It showed that wifi hardware was not detected.

Did I try to run anbox log collection ? No, because when my phone does not have wifi connection, so it's a pain to install anbox with the cell phone modem (since where I live, I do not have 3G/4G ... so download is ~ 11kB/s), so I could not install anbox:

sudo apt install anbox-ubuntu-touch
anbox-tool install

since it requires to download some Bytes ;)

Please describe your problem:

done :)

What were you expecting?:

Wifi being detected: even if the bootloader is not "corrected", a workaround would be fine :)

Additional info:

Once the next ubuntu image will be available, I will be able to collect more information by flashing the bootloader, so if you need them please just ask ! (admin sys skills available ;)

Thanks for your help !

@UniversalSuperBox
Copy link
Member

UniversalSuperBox commented Oct 22, 2019

Ah, yes. Those images haven't been built with the commit ubports/android_kernel_lge_hammerhead@c95a726, so they won't have that fix.

@BadAngelZ
Copy link
Author

Hi !
Thanks for your fast answer, if I understand well: there is some explanation to this problem :)
Please forgive the following "simple" questions:

  • should I expect the problem to be solved in the last update (1207) ? I saw that the code patch is 27 days old, so it should be included in last build, right ?
  • if not, should I have / can rebuild the image by myself ? I am thinking about it ... but don't know where to start: I was a developper in a previous life (c++/python/java/...) so I should be able to deal with ... could you advice some tutorial / keywords if possible ? This way, I hope to be able to contribute to some developments in some ways
    Thanks again for your time,,
    Jerome

@tallero
Copy link

tallero commented Oct 29, 2019

I can confirm everything you said. #1280

@BadAngelZ
Copy link
Author

Sorry if I didn't give news, I am on Holidays for a week, far from the technology ;)
Before I left, I tried to install the "stable" version to see if something changes.
First, I installed the stable version, without wiping data, then I installed (apt install) anbox, but it refused to run without the appropriate kernel. Once anbox-$devicename.img flashed, no more wifi ...
Second, I installed the stable version and I whipped all the data (to be sure that it couldn't be something remaining that makes the process fail): but the result was the same.
Next week I will try to reproduce what tallero said in #1280

@BadAngelZ
Copy link
Author

Using ubport-installer: I updated to the last ubuntu touch dev : same problem (and moreover the "desktop" disappears, but it seems like it's not a bug, but a feature :).
I tried to install stable version (OTA-11): same problem.
Each time I flash the anbox-$devicename.img, the wifi network adapter disappears ...
I tried those steps on two different phones: the one I use every day, and the one for testing (with no data on it, so I can wipe data to check if it makes a difference or not).

@BadAngelZ
Copy link
Author

Argllll ... Sorry I hit the bad button ...

@h2horn
Copy link

h2horn commented Nov 24, 2019

@UniversalSuperBox so can someone rebuild the anbox hammerhead kernel with missing commit?

@Flohack74
Copy link
Member

Hmm the kernel should be built every night automatically, I think thats odd...

@h2horn
Copy link

h2horn commented Nov 25, 2019

@Flohack74 I think the latest commit from the upd5.1 branch (ubports/android_kernel_lge_hammerhead@c95a726) needs to be applied on the anbox branch.

@BadAngelZ
Copy link
Author

BadAngelZ commented Nov 26, 2019

Hello everybody !
Glad to see that this bug is still alive :) May I help in someway ? (I mean, is there a tutorial, or some resource, I could read to be able to build the android kernel by myself ?).
Thanks for all you work !

@Flohack74
Copy link
Member

@Cornu Ohhhh sorry! Yes thats true, let me find out how to do this...

@Flohack74 Flohack74 self-assigned this Nov 26, 2019
@h2horn
Copy link

h2horn commented Nov 27, 2019

@Flohack74 @mariogrip I created ubports/android_kernel_lge_hammerhead#3 to maybe help a bit :)

@Flohack74
Copy link
Member

The only problem is idk where the Anbox kernels are built...

@h2horn
Copy link

h2horn commented Nov 29, 2019

Thanks @Flohack74 for merging, i saw that the anbox boot image (http://cdimage.ubports.com/anbox-images/) didn't get updated, so i built the kernel myself and can confirm that the commit fixes this issue.

@Flohack74
Copy link
Member

We will put all changes in the main kernel. No need for an extra Anbox kernel then ^^

@BadAngelZ
Copy link
Author

BadAngelZ commented Nov 29, 2019

You are all wonderfully kind for your precious help: thanks for your investment !
I would like to "learn" how to compile the systems or applications (and so may be participate in some way): would you have any advice on "where" (link to a post, or tutorial) to start ? I know some languages (c++, java, python, ...), as I was a developper in a previous life (now I'm a sys admin ;).
Thanks again !
PS: I suppose that the android compatibility will be possible again with the developer branch first, then available in the "stable" next update ?

@Flohack74
Copy link
Member

Yes it wil go from devel => RC => stable

@tallero
Copy link

tallero commented Dec 1, 2019

Just tried devel channel image 1264.
NetworkManager crashing is not seen in the UI but it continuously uses 50% of the cpu and restarts connections.

EDIT: Tried with this image and still crashing. Guess it compiles from ubports-5.1 branch. Then waiting for this pull.

About kernel building, is a 'standard' (the one from the CI maybe) .config already available? I made one with the repo script but it still requires choosing lots of options and one does not necessarily know for all of them which is needed and which not.

@mariogrip
Copy link
Member

Just tried devel channel image 1264.
NetworkManager crashing is not seen in the UI but it continuously uses 50% of the cpu and restarts connections.

EDIT: Tried with this image and still crashing. Guess it compiles from ubports-5.1 branch. Then waiting for this pull.

About kernel building, is a 'standard' (the one from the CI maybe) .config already available? I made one with the repo script but it still requires choosing lots of options and I one does not necessarily know for all of them which is needed and which not.

Just merged the anbox driver into the kernel, should be in tomorrows image.

Closing this as fixed for now, please open again if it's not fixed.

@Flohack74
Copy link
Member

How to test: Simply install the devel channel with the installer, no data wipe, but "with bootstrap" option selected. This should flash the recent kernel. Please give us feedback if this works.

@tallero
Copy link

tallero commented Dec 2, 2019

I switched to devel and installed the boot kernel img in the daily-hammerhead xz with fastboot.
Working for me.

@gsantner
Copy link

gsantner commented Dec 3, 2019

Had edge installed and wanted to give anbox a shot on n5...run also into this issue after installing special anbox bootimg.

I've flashed devel (over existing edge installation with some apps installed).
After the reboots WIFI was working again, installed anbox and adb via apt and ran anbox. (Btw docs don't mention installation of adb. For the record: it's not installed by anbox setup, you have to install it self via apt)
Android apps run for me (very very slow ofc due nexus5 hw).
However inside Android don't have any internet/network. (i.e. ping 8.8.8.8 inside anbox adb shell doesn't work).

@BadAngelZ
Copy link
Author

BadAngelZ commented Dec 4, 2019

Once my phone was moved to the devel branch, anbox worked again.
First I tried to use the stable branch and flash only the "devel" boot image, but it didn't work (wifi disappeared): I tried it on a "fresh" installed phone (wiping data prior to the test on my "test" phone). So I moved to the devel branch ... Now it works (but I'm still confused that on the devel branch the desktop is not the same). I "applied" the same branch to my "daily" phone, and it works with previously installed (android) applications (mainly whatsapp and Line).
Thanks for the help of the devs ;)

@ThomasFlieger
Copy link

Same story with my nexus 5, neither with the stable nor the devil version does the installation of anbox work. After installing the Anbox boot.img Wifi is switched off. Thus, the actual installation of Anbox is not possible because the server can not be found without Wifi.

@BadAngelZ
Copy link
Author

BadAngelZ commented Dec 5, 2019

You should not use the anbox boot image anymore: just install the devel branch (you may use ubports-installer for this), then install anbox using the second part of the procedure given here: http://docs.ubports.com/fr/latest/userguide/dailyuse/anbox.html

adb shell # connect from your host computer to your UT device
sudo mount -o rw,remount /
sudo apt update
sudo apt install anbox-ubuntu-touch
anbox-tool install
exit

If you already installed anbox previously, you may consider "anbox-tool upgrade" instead of "anbox-tool install".

@ThomasFlieger
Copy link

That was the first reasonable guide to installing Anbox ;-). That works 100%. Thank you very much for that. One question I still have ... how can you transfer files to the Anbox Downloads folder? ... this is probably read-only. My concern is importing the phone contacts as a vcf file .... thanks in advance

@Flohack74
Copy link
Member

Ok I can confirm I had to also flash the bootimg form the CI, updating devel channel was not enough. We will prepare instructions in how to do this.

@d0n601
Copy link

d0n601 commented May 4, 2020

Any idea when this is going to be merged into the stable branch? I just ran into this issue now and had to switch to the development branch via the UBports installer, which worked fine. I'm just curious as this issue seems to have been closed almost 6 months ago.

@BadAngelZ
Copy link
Author

That was the first reasonable guide to installing Anbox ;-). That works 100%. Thank you very much for that. One question I still have ... how can you transfer files to the Anbox Downloads folder? ... this is probably read-only. My concern is importing the phone contacts as a vcf file .... thanks in advance

Sorry for the late answer ... I recently needed to move data to/from an android application, and finally could understand where data was, for example with whatsapp, image are located in:
/home/phablet/anbox-data/data/media/0/WhatsApp/Media/WhatsApp Images
Note: you will require "sudo" to access this data

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

9 participants