New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to install Ubuntu Touch on Nexus 7 flo #300

Closed
Stefano0101 opened this Issue Oct 16, 2017 · 55 comments

Comments

Projects
9 participants
@Stefano0101
Copy link

Stefano0101 commented Oct 16, 2017

  • Device: Nexus 7 flo
  • Channel: 15.04/Stable
  • Build: Ota-1

Steps to reproduce

  1. I have tried to flash Ubuntu Touch on Nexus 7 flo, but failed. Ubuntu-device-flash failed, MDT failed, Ubports-installer failed
  2. Error I get are shown down on the pictures and Terminal output
  3. Possibly related to this: https://askubuntu.com/questions/674179/ubuntu-device-flash-fails-on-nexus-7-2013-android-5-0-2-cant-copy-image-to/675499

Expected behavior

Just to flash it and enjoy it, but for now just a lot of hours wasted and no solution found :-)

Actual behavior

I HAVE 3 NEXUS 7 TABLETS AND THIS IS HAPPENING ON ALL OF THEM.

Logfiles and additional information

I have downloaded the files forehand and also tried direct flash to the device with the same result.

ubuntu-device-flash --server=https://system-image.ubports.com touch --device=flo --channel=ubports-touch/15.04/stable --bootstrap
2017/10/16 20:47:45 Device is |flo|
2017/10/16 20:47:45 Flashing version 1 from ubports-touch/15.04/stable channel and server https://system-image.ubports.com to device flo
2017/10/16 20:47:52 Waiting for device to enter recovery mode ...
2017/10/16 20:48:02 Start pushing /home/stefano/.cache/ubuntuimages/pool/ubports-03a48725ab23059f103ccbb3cfa913f1ebcd314aaa0742e9ff724ee4fef19d78.tar.xz to device
2017/10/16 20:48:02 Start pushing /home/stefano/.cache/ubuntuimages/pool/keyring-4c4e7ef380ebcfa2c31084efa199138e93bfed8fc58aa3eb06bdf75a78af9b57.tar.xz to device
2017/10/16 20:48:02 Start pushing /home/stefano/.cache/ubuntuimages/ubports-touch/15.04/stable/flo/version-1.tar.xz to device
2017/10/16 20:48:02 Start pushing /home/stefano/.cache/ubuntuimages/pool/device-d7801a4ea82350f68befeb2a02315a56068784b5d3f0c1d5396f4e02b6dd3719.tar.xz to device
2017/10/16 20:48:02 Start pushing /home/stefano/.cache/ubuntuimages/gpg/image-master.tar.xz to device
2017/10/16 20:48:02 Start pushing /home/stefano/.cache/ubuntuimages/gpg/image-signing.tar.xz to device
2017/10/16 20:48:02 error pushing: failed to copy '/home/stefano/.cache/ubuntuimages/gpg/image-signing.tar.xz' to '/cache/recovery/': Is a directory
@Stefano0101

This comment has been minimized.

Copy link

Stefano0101 commented Oct 17, 2017

Btw, I've tried to flash Canonical image as well, same result, so probably is the same as here:
https://askubuntu.com/questions/674179/ubuntu-device-flash-fails-on-nexus-7-2013-android-5-0-2-cant-copy-image-to/675499

@APokorny

This comment has been minimized.

Copy link

APokorny commented Oct 17, 2017

If you look at
https://github.com/ubports/android_kernel_google_msm/blob/ubp-5.1/drivers/mmc/core/mmc.c#L296
the change is already in place. So the error is somewhere else

@Stefano0101

This comment has been minimized.

Copy link

Stefano0101 commented Oct 17, 2017

I downgraded the tablet to 4.4 kitkat base and tried to flash it, just in case if the firmware downgrade changed the paths/partitions ir whatever that is and the tablet won't even boot up! I mean Android. Factory reset in recovery gives similar error logs, interesting.

See the photo.
1508244832223

@Arc676

This comment has been minimized.

Copy link

Arc676 commented Oct 18, 2017

I noticed that you indicated that you are using OTA-1. As far as I am aware, support for the Nexus 7 became available with OTA-2, which is the version I successfully installed on my Nexus 7.

My process was git clone-ing the MDT repository and running the install script to flash the device.

Have you tried using the latest image?

@Stefano0101

This comment has been minimized.

Copy link

Stefano0101 commented Oct 18, 2017

There is only version-1 on server, stable channel.
https://system-image.ubports.com/ubports-touch/15.04/stable/flo/

I tried even devel channel, same output.

@Arc676

This comment has been minimized.

Copy link

Arc676 commented Oct 18, 2017

That is weird. Having checked again, the 'About' section in System Settings says "OTA-15". I'm not exactly sure what that means, but I do remember UBPorts announcing support for the Nexus 7 with the release of OTA-2.

Just to be sure, you used git clone to get MDT, right?

@Stefano0101

This comment has been minimized.

Copy link

Stefano0101 commented Oct 18, 2017

Yes, git cloned to get MDT. And MDT working well. Btw, if your System Setting says Ota-15 , you are still on Canonical image, I think. If you were on Ubports it should say r1 or whatever Ota it is for given device. Pro 5 is on OTA-2 and the OS build number is r2.
Anyway, I even tried the Canonical image, OTA-13 as is the last stable relase and same result.
Even tried deb image and same result.

@Arc676

This comment has been minimized.

Copy link

Arc676 commented Oct 18, 2017

That's interesting. It would appear that the two methods for obtaining Ubuntu Touch for flo as presented here are actually different.

Using the system-image server, the command is

sudo ubuntu-device-flash --server=http://system-image.ubports.com touch --device=flo \
--channel= --bootstrap --recovery-image=

However, using MDT, the command that is run by the script is

ubuntu-device-flash touch --channel ubuntu-touch/stable/ubuntu --device flo --bootstrap
@Stefano0101

This comment has been minimized.

Copy link

Stefano0101 commented Oct 20, 2017

Label question?

@Stefano0101

This comment has been minimized.

Copy link

Stefano0101 commented Oct 23, 2017

Anyone have similar problem? Anyone to help?

@ghost

This comment has been minimized.

Copy link

ghost commented Oct 23, 2017

log.txt

First you should remove the ubuntuimages dir rm -rf .cache/ubuntuimages
Then you should try again and it will work.
log

@Stefano0101

This comment has been minimized.

Copy link

Stefano0101 commented Oct 24, 2017

Did you mean to remove .cache/ubuntuimages from my PC?
Ihave done it many times to clear the old files, yet the same happening.
If you look at the screenshot, the log is saying that mmsev/block/msm_sdcc.1/by-name/misc is missing, no such a directory.

And the other one says can't copy to .cache/recovery is a directory I would have to rm -rf recovery directory on phone.

@ghost

This comment has been minimized.

Copy link

ghost commented Oct 24, 2017

Try this reflash stock rom, let it boot one time, after that go bootloader and restart the ubuntu touch flash process again.
If the error still persist go to ubuntu recovery, connect you device to pc and do the following command onbthe terminal. adb shell mkdir /cache/recovery
Then try flash the device witjout the --bootstrap instead just use --wipe

@Stefano0101

This comment has been minimized.

Copy link

Stefano0101 commented Oct 25, 2017

I have done it and interesting thing happen. After I created /cache/recovery directory, the files got pushed to the device, rebooted to recovery and exactly same logs appeared.
1508067173567-1508067145550

Nothing happens after.I rebooted the tablet and it booted to Android like it wasn't wiped at all.

ubuntu-device-flash --server=https://system-image.ubports.com touch --device=flo --channel=ubports-touch/15.04/stable --wipe
2017/10/25 16:28:29 Device is |flo|
2017/10/25 16:28:29 Flashing version 1 from ubports-touch/15.04/stable channel and server https://system-image.ubports.com to device flo
2017/10/25 16:28:29 Start pushing /home/stefano/.cache/ubuntuimages/gpg/image-master.tar.xz to device
2017/10/25 16:28:29 Start pushing /home/stefano/.cache/ubuntuimages/gpg/image-signing.tar.xz to device
2017/10/25 16:28:29 Start pushing /home/stefano/.cache/ubuntuimages/pool/keyring-4c4e7ef380ebcfa2c31084efa199138e93bfed8fc58aa3eb06bdf75a78af9b57.tar.xz to device
2017/10/25 16:28:29 Start pushing /home/stefano/.cache/ubuntuimages/ubports-touch/15.04/stable/flo/version-1.tar.xz to device
2017/10/25 16:28:30 Done pushing /home/stefano/.cache/ubuntuimages/gpg/image-master.tar.xz to device
2017/10/25 16:28:30 Done pushing /home/stefano/.cache/ubuntuimages/pool/keyring-4c4e7ef380ebcfa2c31084efa199138e93bfed8fc58aa3eb06bdf75a78af9b57.tar.xz to device
2017/10/25 16:28:30 Done pushing /home/stefano/.cache/ubuntuimages/gpg/image-signing.tar.xz to device
2017/10/25 16:28:30 Done pushing /home/stefano/.cache/ubuntuimages/ubports-touch/15.04/stable/flo/version-1.tar.xz to device
2017/10/25 16:28:30 Start pushing /home/stefano/.cache/ubuntuimages/pool/device-d7801a4ea82350f68befeb2a02315a56068784b5d3f0c1d5396f4e02b6dd3719.tar.xz to device
2017/10/25 16:28:31 Start pushing /home/stefano/.cache/ubuntuimages/pool/ubports-03a48725ab23059f103ccbb3cfa913f1ebcd314aaa0742e9ff724ee4fef19d78.tar.xz to device
2017/10/25 16:28:43 Done pushing /home/stefano/.cache/ubuntuimages/pool/device-d7801a4ea82350f68befeb2a02315a56068784b5d3f0c1d5396f4e02b6dd3719.tar.xz to device
2017/10/25 16:29:17 Done pushing /home/stefano/.cache/ubuntuimages/pool/ubports-03a48725ab23059f103ccbb3cfa913f1ebcd314aaa0742e9ff724ee4fef19d78.tar.xz to device
2017/10/25 16:29:17 Created ubuntu_command: /home/stefano/.cache/ubuntuimages/ubuntu_commands044462214
2017/10/25 16:29:17 Rebooting into recovery to flash

@Stefano0101

This comment has been minimized.

Copy link

Stefano0101 commented Oct 26, 2017

Nobody else has such a problem to install it? What's wrong with it, I don't get it?

@WammKD

This comment has been minimized.

Copy link

WammKD commented Oct 27, 2017

I've had this problem, back when I first installed UT on my Nexus 7 (actually, went through the process twice). I was hoping I still had those files lying around (I had a different computer, at the time) but I've searched both my current computer and every file on my external hard drive and no luck, I'm afraid.

I came across this thread (for Deb, sadly): https://drive.google.com/file/d/0ByR5uBE8p7qmYnlqb1pNZl90ZXc/view?usp=sharing. But the original AskUbuntu answer gives us the exact diff that makes the difference and it's even only one line so I figured I could try following the directions at https://developer.ubuntu.com/en/phone/devices/porting-new-device/ and just edit the appropriate kernel file myself and build new boot.img and recovery.img files (assuming I understand how things work, correctly).

Unfortunately (still), I couldn't even build anything when following the directions vanilla. I ran phablet-dev-bootstrap phablet, . build/envsetup.sh, and then lunch but it never produced an out directory. I ran make -j4, anyway, and it printed things out but didn't seem to add or change any files.

If someone else wants to take a swing at the same process, perhaps they might have better luck than I.

@Stefano0101

This comment has been minimized.

Copy link

Stefano0101 commented Oct 27, 2017

So this surely looks like a bug in the Flo image or the installer(u-d-f or MDT or Ubports Installer).
Anyone can make a TWRP backup of a clean Ubuntu Touch/Ubports install? I can try to just restore it and it might work. PLEASE?????

@Arc676

This comment has been minimized.

Copy link

Arc676 commented Oct 28, 2017

Um... I have literally no idea what's wrong with your device. Immediately before I began to write this comment, I successfully installed UBPorts' Ubuntu Touch on my Nexus 7 (flo).

OS details now:
OS: Ubuntu 15.04 (r1)
Build number: r1 (no idea what that means)

Machine I used to install:
MacBook Pro, running Ubuntu 16.04 LTS

I used the AppImage file from here

@Stefano0101

This comment has been minimized.

Copy link

Stefano0101 commented Oct 28, 2017

But with 3 tablets ??? Same happening on all of them.

@Stefano0101

This comment has been minimized.

Copy link

Stefano0101 commented Oct 28, 2017

I have tried to flash it on a different Ubuntu PC, same result, driving me nuts.

@ghost

This comment has been minimized.

Copy link

ghost commented Oct 28, 2017

Nexus 7 as seriuos problem with some usb cables, try another cable and retry

@WammKD

This comment has been minimized.

Copy link

WammKD commented Oct 28, 2017

At what point did you buy your Nexus 7, @Arc676? According to the answer in the AskUbuntu link, "newer Nexus 7 'flo' models, made in/after late 2014 and shipped with Android L have a different revision to their eMMC controller/hardware/something".

I mostly give so much credit to that answer since I first bought my Nexus 7 after 2014 when I first wanted to try installing Ubuntu Touch and ran into this issue. Both times I tried installing UT on my device, I found myself having to use the boot.img and recovery.img provided by ddagunts and that solved my issue in terms of being able to install Canonical's Ubuntu Touch.

He provides the patch change in question (I believe) in the AskUbuntu answer; if we could build a new boot.img and recovery.img with a new kernel with that patch, I think it would solve @Stefano0101's and my issue.

@Arc676

This comment has been minimized.

Copy link

Arc676 commented Oct 29, 2017

@WammKD I bought this second-hand Nexus off the internet this year, but who knows when the original owner bought it.

In case they're relevant to determining the version/date, fastboot gives these details:
Product: flo
Variant: flo 32G
HW: rev_e
Bootloader version: FLO-0.4.05
Carrier info: none (obviously b/c it's the wifi model)
Serial number: (not relevant)
Signing: yes
Secure boot: enabled
Lock state: unlocked

@WammKD

This comment has been minimized.

Copy link

WammKD commented Oct 29, 2017

Makes sense.

I don't know if it'll be any useful; my fastboot give me:
PRODUCT NAME – flo
VARIANT – flo 16G
HW VERSION – rev_e
BOOTLOADER VERSION – FLO-04.05 (I don't know if it's relevant but it displays 04.05 on mine as opposed to 0.4.05)
CARRIER INFO – None
SERIAL NUMBER – (not relevant)
SIGNING – yes
SECURE BOOT – enabled
LOCK STATE – unlocked

Pretty similar to yours.
I really wish I still had those boot.img and recovery.img files, still, and then I could just try flashing them and see directly if that's the solve, like last time.

@WammKD

This comment has been minimized.

Copy link

WammKD commented Oct 29, 2017

You know, it just dawned on me – @Arc676 –, – if the issue really is a kernel difference – it might make more sense to compare kernel versions?

What's the result of adb shell cat /proc/version for you? Mine spits out:

Linux version 3.4.0-5-flo (root@meow) (gcc version 4.7.3 (Ubuntu/Linaro 4.7.3-11ubuntu1) ) #19 SMP PREEMPT Thu Sep 17 17:38:43 PDT 2015

@Arc676

This comment has been minimized.

Copy link

Arc676 commented Oct 29, 2017

That was a typo, mine also says 04.05 without through first dot. My bad.

cat /proc/version gave me

Linux version 3.4.0-5-flo (buildd@kishi14) (gcc version 4.7.4 (Ubuntu/Linaro 4.7.4-3ubuntu2) ) #1-Ubuntu SMP PREEMPT Thu Sep 3 14:21:37 UTC 2015
@WammKD

This comment has been minimized.

Copy link

WammKD commented Oct 29, 2017

Haha; no worries.

Welp, that indicates nothing towards whether that AskUbuntu answer's correct, I don't think….

@Stefano0101

This comment has been minimized.

Copy link

Stefano0101 commented Oct 29, 2017

I have tied a different usb cable as well, from N5 and I know this one is good working one and the same as before happens.
COULD I ASK YOU FOR A FAVOUR??? If you flash your N7 with TWRP recovery and create a TWRP backup that could be shared with me, it might just work. Then you can always reflash Ubuntu recovery and continue to use the tablet as nothing happens, but I might be able to by-pass this installation error. I have done similar thing for other users and shared the Pro 5 backup with them when they had a errors and problem to install it and this way it worked well.
PLEASE, ANYONE, SHARE A BACKUP of Ubports or Canonical image with me!!!!!!!!!!!!!

@Arc676

This comment has been minimized.

Copy link

Arc676 commented Oct 29, 2017

Is TWRP recovery part of the recovery thing? Or do you just need /userdata/ubuntu.img or /userdata/system.img?

@Stefano0101

This comment has been minimized.

Copy link

Stefano0101 commented Nov 18, 2017

rubencarneiro,
Any chance that you flash TWRP recovery and make a backup that you can share with me? Just a fresh install, no personnal information, no pasword, no data from your device? I think it might work, but nobody offered to do it for me and possibly for other UT Nexus 7 users. Could you help?

@ghost

This comment has been minimized.

Copy link

ghost commented Nov 18, 2017

Ok i will make a backup

@ghost

This comment has been minimized.

Copy link

ghost commented Nov 18, 2017

@Stefano0101

This comment has been minimized.

Copy link

Stefano0101 commented Nov 19, 2017

rubencarneiro
Thanks for the backup, but sadly it did not work. It restores the backup without any issue, but tablet won't boot at all. Thanks for trying to help.

@ghost

This comment has been minimized.

Copy link

ghost commented Nov 23, 2017

Stefano0101 maybe when you want we could connect trough teamviewer and let me try a thing or two

@hoh61

This comment has been minimized.

Copy link

hoh61 commented May 19, 2018

Hello Stephano,

don't give up too fast. When I heard that Ubuntu will suspend their activities on ubuntu touch I was worrying about the future of my M10 FHD tablet. It's a wonderful hardware thing; but without software support? I faced this already in the past for the Nexus7, where I installed an UBUNTU image, which was not further supported shortly after that. However, I developed some applications on that device which are still running.

So my expectation is, that the 16.04 version will be soon available for the flo too. In the meantime I will upgrade my application to work with 16.04 and (hopefully) support the development of the 16.04 target with a lot of issues/bugs ...

@NeoTheThird

This comment has been minimized.

Copy link
Member

NeoTheThird commented Jun 16, 2018

Duplicate of #643.

@UniversalSuperBox

This comment has been minimized.

Copy link
Member

UniversalSuperBox commented Dec 9, 2018

This is not About the 'deb' device, but rather about 'flo'. We had another person hit this error today and we were able to track down the issue to what @Stefano0101 found: https://askubuntu.com/questions/674179/ubuntu-device-flash-fails-on-nexus-7-2013-android-5-0-2-cant-copy-image-to/675499

We will need to rebuild the boot image and recovery for the Nexus 7 to fix this issue. That isn't a simple fix since we need to rebuild the kernel out-of-tree (we're using Canonical's build of Android and Linux) as @APokorny discovered with the Nexus 4.

@UniversalSuperBox UniversalSuperBox added bug and removed duplicate labels Dec 10, 2018

@UniversalSuperBox UniversalSuperBox self-assigned this Dec 16, 2018

@UniversalSuperBox UniversalSuperBox added this to To do in OTA-7 via automation Dec 18, 2018

@UniversalSuperBox UniversalSuperBox moved this from To do to In progress in OTA-7 Dec 18, 2018

@UniversalSuperBox

This comment has been minimized.

Copy link
Member

UniversalSuperBox commented Dec 21, 2018

Anyone who has a Nexus 7 affected by this change, I've rebuilt the boot and recovery images. I've attached them along with a GPG signature from myself. Please test these to see if they work.

To use these, you'll need to use ubuntu-device-flash rather than the installer. Use this command:

ubuntu-device-flash touch --server=https://system-image.ubports.com --device=flo ----recovery-image=recovery.img

After the install is completed, you may need to install the new boot and recovery images with fastboot flash boot boot.img and fastboot flash recovery recovery.img. You may also need to do this after system-image updates until this is placed on our system-image server and this issue is closed.

You can install ubuntu-device-flash in Ubuntu 16.04 from scratch, or you can download this deb and install it. It doesn't have any other requirements from our servers.

flo-newkernel.zip
flo-newkernel.zip.asc.txt

$ sha512sum flo-newkernel.zip
1e1abeaa7203fba22383d9dfffb0f4e1c4f330837d733ce7ef908612785c6798e4973b06ca3aa0fe83b175223a43b6311fe6aa2a8748d1b16c277433ded6db81  flo-newkernel.zip
@UniversalSuperBox

This comment has been minimized.

Copy link
Member

UniversalSuperBox commented Dec 28, 2018

Let's try that again. Same instructions as above, new files.

flo-newkernel-2.zip
flo-newkernel-2.zip.asc.txt

$ sha512sum flo-newkernel-2.zip
4692a2bf6045692bf0eda1f43a80db3463a0a1da642cf10b33aa67e1c5d6de699ef7d40766a78cade8c3854134b5a85ac2f010951853a3cb15147c5690095349  flo-newkernel-2.zip
@UniversalSuperBox

This comment has been minimized.

Copy link
Member

UniversalSuperBox commented Dec 29, 2018

Today's devel image has a new kernel module built with the patch that @Stefano0101 found. Anyone who was having trouble installing Ubuntu Touch on their Nexus 7, you can use the installer:

  • Select Devel today through Wednesday the 2nd when the next RC image is released (or earlier if we do a call for testing)
  • Select RC after its next release
  • Select Stable after OTA-7

OTA-7 automation moved this from In progress to Done Dec 29, 2018

@UniversalSuperBox

This comment has been minimized.

Copy link
Member

UniversalSuperBox commented Jan 6, 2019

@Stefano0101, have you been able to install Ubuntu Touch on one of your three Nexus 7 2013's?

@Stefano0101

This comment has been minimized.

Copy link

Stefano0101 commented Jan 6, 2019

Hi Dalton, I gave away 2 of them and the last one is using my wife with Android on it. ( I might try to flash it though) Thinking about getting another N7, if I come across this particular problem, I'll report back. Thanks for fixing this bug anyway.

@UniversalSuperBox

This comment has been minimized.

Copy link
Member

UniversalSuperBox commented Jan 6, 2019

That's unfortunate, but understandable given the age of this bug. I'll move it to "Done" since I've had one confirmation that the fix works. We can revisit if we get a report otherwise.

@UniversalSuperBox UniversalSuperBox moved this from QA to Done in OTA-7 Jan 6, 2019

@r2d2agr

This comment has been minimized.

Copy link

r2d2agr commented Jan 18, 2019

Anyone who has a Nexus 7 affected by this change, I've rebuilt the boot and recovery images. I've attached them along with a GPG signature from myself. Please test these to see if they work.

To use these, you'll need to use ubuntu-device-flash rather than the installer. Use this command:

ubuntu-device-flash touch --server=https://system-image.ubports.com --device=flo ----recovery-image=recovery.img

After the install is completed, you may need to install the new boot and recovery images with fastboot flash boot boot.img and fastboot flash recovery recovery.img. You may also need to do this after system-image updates until this is placed on our system-image server and this issue is closed.

You can install ubuntu-device-flash in Ubuntu 16.04 from scratch, or you can download this deb and install it. It doesn't have any other requirements from our servers.

flo-newkernel.zip
flo-newkernel.zip.asc.txt

$ sha512sum flo-newkernel.zip
1e1abeaa7203fba22383d9dfffb0f4e1c4f330837d733ce7ef908612785c6798e4973b06ca3aa0fe83b175223a43b6311fe6aa2a8748d1b16c277433ded6db81  flo-newkernel.zip

hello, there is no flo device on this server, can you help me?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment