Installing on Nexus 5



  • HI!

    Thanks to the developers for all the great work!

    I just received an LG Nexus 5 from Ebay. It looks slightly different from the one shown in the Ubports website photos.

    The Nexus 5 says it's in developer mode when I repeatedly press the version number.

    I am running MX15 and I was unable use Magic Device Tool (it apparently couldn't install the appropriate repository for the MDT dependencies).

    I tried to run ubports-installer 0.1.8-beta but I got errors.

    Ubports-installer 0.1.7-beta looks like it might work, but it doesn't see my Nexus 5, even though the Thunar file manager sees it. However, I noticed that I can select "Nexus 5" in the install dialogue,

    Before I pull the trigger on attempting an install with ubports-installer 0.1.7-beta, I have a couple of questions.

    First, does everything sound ready to go for the install? Do I need to do something else to "unlock" the Nexus 5 or put it in a certain boot mode?

    Secondly, I don't want Android nor its bundled apps, but if this install fails, I would like to be able bring the phone back to the state in which I received it, to facilitate returning the phone for a refund. If I do not check "wipe," will I be able to recover the saved version of Android and its apps?

    Are there any other tips or "gotchas" of which I should be aware?

    Thanks!



  • @tupp
    I hope it is not a Nexus 5x which is not supported yet!
    On a Nexus5 , i only could install Ubports using MDT, using a Ubuntu 16.04 pc (or higher, see
    https://github.com/MariusQuabeck/magic-device-tool )
    You can install MDT using snap, but I downloaded the zip from https://github.com/MariusQuabeck/magic-device-tool/archive/master.zip (it is usually better to clone the MDT repository so you get auto updates next time) , uncompress zip my home dir, then in terminal:
    cd magic-device-tool-master
    sudo ./launcher.sh
    choose device, unlock bootloader, go to fast boot on your phone as indicated,
    confirm unlock on the phone (vol key then power to select yes)
    To install UBTOUCH:
    launch again MDT:
    sudo ./launcher.sh
    choose device, flash Ubuntu (legacy),(will be updated to OTA2 later)
    if it fails , run again, after some time, UBTOUCH will boot.
    Sometimes, the process seems to freeze, but wait 10 mn before to force a reboot, it can sometimes continue by itself .
    (if really freezed, restart from begining).
    When in UBtouch, go to parameters => update to install OTA2 (one more reboot to achieve)
    Good luck!
    Laurent



  • @laugeo

    Thank you for the detailed response.

    My phone is definitely a Nexus 5 (not the very different looking 5X), but I think the Ebay seller put a new glass on the front, which is covering the two normally naked holes on the upper right front face of the phone. Not sure what the holes are for, but if they are a forward-facing mic, I am okay with them being covered.

    I tried MDT. I cloned it with the command: git clone https://github.com/MariusQuabeck/magic-device-tool.git and ran ./launcher.sh as root. As I mentioned, I use MX linux, which is an apt-based Debian derivative, but MDT tried to set-up an Ubuntu repository to fetch its dependencies, and that didn't seem to work. Not sure if my wonky internet connection is the problem here.

    On the other hand, Ubports-installer 0.1.7-beta seems to be working (except it does not initially seem to see my Nexus 5). So, I would like to go with that method right now.

    Before I proceed, I would like to know:

    • The Nexus 5 seems to be in developer mode. Do I need to "unlock" the phone or put it in a certain boot mode?
    • Do I need to download an Ubuntu image, or will Ubports-installer automatically download Ubuntu?
    • If I do not check "wipe," will I be able to recover the saved version of Android and its apps?
    • Are there any other tips that anyone can offer?

    Thanks!


  • Infrastructure



  • @Flohack
    Thanks for the tip on missing udev rules. I couldn't find anything in the link. Is this important, given that I can choose the device from the Ubports-installer menu?

    Also, it would be great if someone could please answer my three questions, so that I can proceed with some confidence:

    1. The Nexus 5 seems to be in developer mode. Do I need to "unlock" the phone or put it in a certain boot mode (fastboot)?
    2. Do I need to download an Ubuntu image, or will ubports-installer automatically download Ubuntu?
    3. If I do not check "wipe," will I be able to recover the saved version of Android and its apps?

    Thanks!


  • Infrastructure

    @tupp Ok I dont understand what you mean with you dont find anything, under this link you will find steps to add the necessary udev rules to detect most Android devices.

    • Unlocking: Of course the bootloader needs to be unlocked, did you do "fastboot oem unlock"? Careful, will wipe all Android data!
    • Installer will download all it needs
    • Wipe will only wipe the Ubuntu Touch part, but see my first point. If you want to go back to Android later, you will need a good backup with TWRP etc

    BR



  • @Flohack
    Thanks for the info. It gave me the confidence to start.

    I eventually found the udev rules after I scrolled way down, past all of the cruft on the page that you linked. I included those rules in the properly named/permissioned file.

    However, I think that the main problem in getting the ubports-installer to see the device is that Android has a USB connect option that has to be enabled (in addition to enabling "developer mode"), plus there is an additional USB authorization dialogue that has to be checked/approved. As soon as I enabled all of the USB obstacles in Android, ubports-installer found my device.

    These specific Android USB-enabling steps should be included in all Ubports installation instructions.

    (Sorry for the lengthy saga that follows, but there might be some info in it that is helpful to someone attempting a first time install.)

    I couldn't install nor run TWRP to backup the Android on my phone. I downloaded TWRP through my phone over wifi, but it is apparently impossible to install TWRP when downloading it with the Chrome web browser. The kind folks at Google want to protect us from alternative software.

    Also, there is no file manager on stock Android that would allow installation of the TWRP apk file. It was out of the question to get the Android apps that would enable me to install TWRP, as my whole reason for using UB Touch is to protect my privacy (which would be difficult to do using the Android app store).

    I also tried to use MDT with a Lubuntu liveUSB to backup the Android installation, but I couldn't get that to work.

    I finally decided to just install without a backup, as there seems to be ways of restoring stock Android without a backup.

    So, I tried MDT again (with the Lubuntu liveUSB) for the Ubports installation -- it didn't work.

    Then, I went back to ubports-installer and it started to work, with the "Ubports Recovery" screen instantly appearing on my phone. It was the first time I had encountered that screen, and, without any installation instructions warning of its appearance, I thought the screen indicated that my last MDT attempt had worked. I panicked that ubports-installer was borking the non-extistent Ubports install, so I immediately (and mistakenly) hit the reboot option. Afterwards, nothing would boot (Android was already wiped/borked).

    All Ubports installation instructions should have a warning to expect the "Ubports Recovery" screen and to do nothing when it appears. It is confusing and counter-intuitive for a "recovery" screen to appear while an installation is successfully in progress, so some people assume that something went wrong with the installation, and they mistakenly click on a recovery screen option.

    At any rate, the phone seemed bricked. The only thing that would appear on the phone's screen was a Google logo with an icon of a small, open lock.

    I tried several times get back into fastboot by pressing the prescribed combination of the phone's buttons, and I tried every other combination of button presses -- all to no avail.

    I remembered that fastboot was installed on my computer, so I connected the Nexus 5 and ran "fastboot oem unlock" in a terminal (can't remember if I was root) and the fastboot screen appeared on the phone!

    I then ran ubports-installer which didn't see the phone, but it still installed Ubports after I selected my device from its list. This time, when the "recovery" screen appeared I did nothing, and the OS installed on its own!

    So, I have Ubuntu Touch on my phone!

    Now, my question is do I have OTA2 installed? If not, how can I install it?

    Thanks!


  • Infrastructure

    @tupp Hello,

    congratulations for this adventure, and yes, the guides will need more infos. Why there is no description for unlocking the phone and enabling adb: We are thinking that people who are flashing their phones are familiar with this procedure from Android. But it seems not the case, you are not the first one having those difficulties. I will put a disclaimer there.

    For the OTA: Yes you are on OTA-2, as the installer always installs the latest stable or rc or devel version from our server :) Hold tight, tomorrow we launch OTA-3, but there is no popup telling you this, you need to search for updates manually ;)

    BR Florian



  • @flohack said in Installing on Nexus 5:
    Hold tight, tomorrow we launch OTA-3, but there is no popup telling you this, you need to search for updates manually ;)

    Exciting!

    How does one search/find updates?

    Do the updates automatically install themselves on the phone, or do we need to use ubports-installer, MDT or other external methods?

    Thanks!



  • @tupp

    You only have to check "Updates available" in "System Settings" on your Nexus 5


  • Infrastructure

    Yes you need to visit system settings and then the update icon from time to time. We will enable push notifications eventually again when a new OTA is out. This worked at Canonical times but then ceased, no one knows why...

    BR



  • Okay. I will check for an update after I get my phone up and running with a carrier.

    Thanks!



  • Hi! I only could install UT by CPT. The snap package hasn't been found on Ubuntu... And it doesn't work by magic-tools .. My installation (or re-installation) is 2 days old ;)



  • Hi

    I would like to also ask for a little help.

    I am completely new to android flashing. I just got second-hand nexus 5 32GB and wanted to try ubuntu touch. I was able to make first steps and ubports-installer proceeded at first - then it was wainting for device to enter recovery mode. It actually always stops there. I can get to ubports recovery but there are too many options.
    Reboot system now
    Ubuntu actions
    Android actions
    Reboot to bootloader
    Power down
    View recovery logs
    In ubuntu actions are following steps:
    -replace ubuntu android system
    -install ubuntu zip
    -install ubuntu preinstalled
    -wipe data/factory reset
    in android actions are following options:
    -apply updates
    -wipe data/factory reset
    -wipe cache partition
    -wipe media

    I have 5 recovery logs
    /cache/recovery/last_kmsg
    /cache/recovery/last_log
    /cache/recoverylast_log.1
    /cache/recoverylast_log.2
    /cache/recoverylast_log.3

    Does the logs signal any possible problem?

    I have a few question about my situation

    1. Am I on a right track? can I safely proceed with installation and how?
    2. Can I safely roll back to android at this state? How could it be done?
    3. Is it now late to back up data for possible future recovery? I was a little too quick - I thought that gui installation would be straight forward so I was proceeding with not that much care.

    Sorry for long message I wanted to specify as much as I could on the first time. Please help me - I really would not like to screw the phone.

    Thank you in advance for your help
    Andrej



  • I just want to add - the phone itself always shows only the google logo with a lock at the bottom just as tupp reported previously.

    Thanks again
    Andrej



  • @andirs26

    When you see that recovery screen, DON'T DO ANYTHING! -- it is installing Ubports!

    I know it is very confusing to see that "recovery" screen appear during an installation, but you are golden. Just let it do it's thing.

    By the way, if your phone is not getting past the Google logo/lock, connect your phone to your computer, and in a terminal try "fastboot oem unlock". If the fastboot screen appears on the phone, start the ubports-installer.

    Sorry that I forgot to be explicit in my post above that I did nothing when the recovery screen appeared and then the os installed. I have added that "detail" now, thanks to you!



  • Thank you so much. I am happily writing this message,from Ubuntu touch. The process was fast and automatic from that point. Everything seems to work. I had only one problem with browser the at first it was not accepting ssl certificates. Then I found out that time was not synchronized from wifi maybe it is synchronized only from operator by default. But I first booted without sim card. Because of wrong time browser considered certificate dates as invalid so the problem was easily fixed.

    Thanks again for great support.
    Andrej



  • By the way can I and should I OEM lock the phone now?



  • @andirs26

    I don't think that one can "re-lock" their phone to a particular carrier. Furthermore, there probably is no need to do so, as carriers generally use a phone's IMEI or ESN number to accept or reject a phone. From what I can tell, carriers don't to discern whether a phone is locked or unlocked.

    Enjoy your Ubuntu Touch phone!


  • Community

    Also, if you do oem lock at this point, the device will be wiped. All Ubuntu Touch data, including the OS itself, is in the /data partition. This is not the case for devices that shipped with Ubuntu Touch from BQ and Meizu.


Log in to reply
 

Looks like your connection to UBports Forum was lost, please wait while we try to reconnect.