Building B2G OS for Flamingo (Xperia E3)

After many days of hard work I finally managed to bring my device back from the grave. To future self and anyone else facing the same issue with a Sony Xperia device, this is how I did it:

  • Download the official firmware by using XpeirFirm (download and instructions),
  • Convert this in a tft package and then flash it on device (using flashmode) with Flashtool (tutorials: how to create tft file on xperiablog, how to flash it on xperiafirmware).

This is the only working method I found, when standard procedures with adb, fastboot, recovery and the likes failed.

2 Likes

Even flashing an official Sony build as described in my previous post, Emma refuses to work. Apparently others have had the same issue, but there not seems to be a clear solution. Some even had their devices being recognised again for no reason after some time, others say you have to let the battery drain
 I have no clue.

Also, made an updated build today but the result is still the same: black screen and no recovery.

Sorry for making you wait so long, here it is the log you asked me:

enrico@enrico-system-product-name:~/Projects/B2G$ ./run-gdb.sh
B2G_DIR = /home/enrico/Projects/B2G
GECKO_PATH = /home/enrico/Projects/B2G/pine
ADB Location:  adb
Process /system/b2g/b2g created; pid = 846
Listening on port 11000
prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8/bin/arm-linux-androideabi-gdb -x /tmp/b2g.gdbinit.enrico.27661 /home/enrico/Projects/B2G/objdir-gecko/dist/bin/b2g
GNU gdb (GDB) 7.6
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=x86_64-linux-gnu --target=arm-linux-android".
For bug reporting instructions, please see:
<http://source.android.com/source/report-bugs.html>...
Reading symbols from /home/enrico/Projects/B2G/objdir-gecko/dist/bin/b2g...done.
Remote debugging from host 127.0.0.1
__dl__start () at bionic/linker/arch/arm/begin.S:32
32      mov r0, sp
(gdb) continue
Continuing.
[865] WARNING: Tried to RegisterCallback without an AtExitManager: file /home/enrico/Projects/B2G/pine/ipc/chromium/src/base/at_exit.cc, line 40

then nothing happens for a reasonably long time.

Flash mode should be working: I can use Flashtool’s Flash mode to flash ftf images, is that proof enough?

Nothing here. Please reflash everything as much as possible with Emma and get a booting Android before anything.

Help request

I’m asking for help because I have been fighting with my device for weeks and I’m close to give up. My only hope is to find some good advice on Xperia device flashing.

Long story short: I have a Flamingo I unlocked and flashed with Emma first, and everything went smooth. Then I messed it up with numerous flashings which I’m not fully able to list now, but they include:

  • Flashing images with fastboot
  • Messing around with adb
  • Flashing ROMs found on XDA with FlashTool
  • Flashing stock ROMs found with Xperifirm, again with FlashTool

The resulting situation is as follows:

  • I can connect via adb, fastboot and flash mode (with FlashTool)
  • I can successfully flash stock ROMs with FlashTool
  • I can successfully flash boot with TWRP or CWM, via fastboot

All this would look pretty good, but what I want is to flash Android 5.1. I don’t care for which flavour (standard or CyanogenMod) and I have no data to preserve. Now problems begin:

  • If I get images (boot, system, userdata, recovery) of various flavours (AOSP from FXP, Cyanogen, etc
) and flash via fastboot, the device is bricked (black screen since startup). Moreover

  • Recovery cannot be flashed. I get errors about partition table and filesystem, so my best guess is that the recovery partition doesn’t exist anymore
  • Emma will not recognize the device: gui turns “inactive gray” (although it seems to
    correctly recognize which kind of device and with which firmware has been connected)
  • TWRP and CWM boot, but every attempt to flash zip packages/images/adb sideload fails without helpful error messages.
  • I tried rooting the device with a SuperSU image. Flashing seems to succeed, but again it makes no difference when trying to flash the whole OS.
  • Tried erasing/wiping/formatting partitions in all possible ways and orders. Recovery always give error messages, while the other partitions can be erased but I also get a "formatting is not supported on filesystem ’ '
 " message.
  • Looked everywhere, and on XDA in particular, for alternative solutions, and still nothing.

Any idea? I don’t really know what else I could try
 :frowning:

If Emma cannot flash it there is nothing we can do :-/

Mozilla Discourse a Ă©crit :


enrico_ghiorziEnrico

May 18

Help request

I'm asking for help because I have been fighting with my device for weeks and I'm close to give up. My only hope is to find some good advice on Xperia device flashing.

Long story short: I have a Flamingo I unlocked and flashed with Emma first, and everything went smooth. Then I messed it up with numerous flashings which I'm not fully able to list now, but they include:

  • Flashing images with fastboot
  • Messing around with adb
  • Flashing ROMs found on XDA with FlashTool
  • Flashing stock ROMs found with Xperifirm, again with FlashTool

The resulting situation is as follows:

  • I can connect via adb, fastboot and flash mode (with FlashTool)
  • I can successfully flash stock ROMs with FlashTool
  • I can successfully flash boot with TWRP or CWM, via fastboot

All this would look pretty good, but what I want is to flash Android 5.1. I don't care for which flavour (standard or CyanogenMod) and I have no data to preserve. Now problems begin:

  • If I get images (boot, system, userdata, recovery) of various flavours (AOSP from FXP, Cyanogen, etc
) and flash via fastboot, the device is bricked (black screen since startup). Moreover

  • Recovery cannot be flashed. I get errors about partition table and filesystem, so my best guess is that the recovery partition doesn't exist anymore
  • Emma will not recognize the device: gui turns "inactive gray" (although it seems to

    correctly recognize which kind of device and with which firmware has been connected)

  • TWRP and CWM boot, but every attempt to flash zip packages/images/adb sideload fails without helpful error messages.
  • I tried rooting the device with a SuperSU image. Flashing seems to succeed, but again it makes no difference when trying to flash the whole OS.
  • Tried erasing/wiping/formatting partitions in all possible ways and orders. Recovery always give error messages, while the other partitions can be erased but I also get a "formatting is not supported on filesystem ' '
 " message.
  • Looked everywhere, and on XDA in particular, for alternative solutions, and still nothing.

Any idea? I don't really know what else I could try
 :frowning:

Visit Topic or reply to this email to respond


Previous Replies

lissyx

May 5

Nothing here. Please reflash everything as much as possible with Emma and get a booting Android before anything.


Visit Topic or reply to this email to respond

To stop receiving notifications for this particular topic, click here. To unsubscribe from these emails, change your user preferences

Envoyé depuis Firefox OS

i just ran in to a solution for that.
If you have configured xcode 5.1.1. with
$ sudo xcode-select --switch "/Applications/Xcode-5.1.1/Xcode.app/Contents/Developer"
and then open xcode, it will change to actual version. So you have to run it again

Regards, Novski

3 Likes

ok, this is driving me crazy
 I flashed AOSP_L android on my Xperia E3 (flamingo), backed up the binary blobs as explained on MDN, and run the build. I soon get an error message:

Pulling files from ../../../backup-tianchi
Invalid system backup - Wrong base version found: aosp_d2203-userdebug 5.1.1 LMY49G eng.root.20160411.042429 test-keys.

Do this:
1. Delete backup-tianchi
2. Flash your device with a 18.5.C.0.25 FTF.
3. Try building again

> Build failed!

why is that? 18.5.C.0.25 is Android 4.4, not L. Wasn’t I supposed to build on top of Android L?

ALERT: why does it says Pulling files from ../../../backup-tianchi?!?! I ./config.sh it for flamingo-l!

FTF or WTF :wink:

You are pulling from a previous b2g build so the id checking is failing as
expected.

Please flash the expected android build. Yes we need kitkat because this is
just for the modem not system blobs.

<
https://ci5.googleusercontent.com/proxy/8M9Yo4_EzLksh3awhGqXXocDnkmB_GUpnslxzzUG681D0uKjPmSvQHCrN8ApLN-SFYCUI2KUq1sUA-Ma4VCObJgsnTrdVAVLscq0e0lkl-Cp2gX5TMsBHBqibPMs-BIoFDi_rU3-esmV94bFOPcNZU49TFwiLeUD2rpi-a5geg4S=s0-d-e1-ft#https://discourse.mozilla-community.org/user_avatar/discourse.mozilla-community.org/kskarthik/45/3538_1.png>
kskarthik Sai Karthik Karra
July 15
<
https://ci5.googleusercontent.com/proxy/GBuJGfh_J2eUD6oEEg3Gy93194NpkSG4540X9XZgExDvzbswIXWO4bp5qV00bUJtttzvV9TqnVEznBLKESXjbGtIEqNIs2tQIUVZ0NOL-SoWoL2vjofOf16uO69pfpMxVExVMfi2zS6nXd1kwdsI4ZtuYtj82vu77lFSlgXMB2QranmLOpQ=s0-d-e1-ft#https://discourse.mozilla-community.org/user_avatar/discourse.mozilla-community.org/enrico_ghiorzi/40/3544_1.png
enrico_ghiorzi:

Flash your device with a 18.5.C.0.25 FTF.

FTF or WTF <
https://ci3.googleusercontent.com/proxy/ecMJFai_b-WFlQwc5Lk481_cD8N9PcYgFy-Bme6jDIq_h0EUNFsCKh65LbGkbmjf3LBc-gtmr589bQOg8LrkrnJNIls8201wlDtcaRCVAMYljxZolQWOBzilTaEQx4AAew=s0-d-e1-ft#https://discourse.mozilla-community.org/images/emoji/emoji_one/wink.png?v=2


Visit Topic or reply to this email to respond.


In Reply To

<
https://ci6.googleusercontent.com/proxy/Gor79Py92GTfu93EDD3ipVV1oXb2ZfK9_PTuFm8YqvGGzUFlpIC1-t2LR1AmB-wob8lVAgORIyY2AL1ZOKseY5_O7JoHjpQ1_9Vswl4288ElcU6_oiKjdFZnzZKeNDxerUDmFT9-SM05-8CyjmaCB3KB_B_BQj_ljUtgoxjRQPNlxVacy_E=s0-d-e1-ft#https://discourse.mozilla-community.org/user_avatar/discourse.mozilla-community.org/enrico_ghiorzi/45/3544_1.png>
enrico_ghiorzi Enrico
July 14
ok, this is driving me crazy
 I flashed AOSP_L android on my Xperia E3
(flamingo), backed up the binary blobs as explained on MDN, and run the
build. I soon get an error message: Pulling files from

/
/
/backup-tianchi Invalid system backup - Wrong base version found:
aosp_d2203-userdebug 5


I’m pulling from Android 5.1 AOSP, not B2G/Firefox OS. I see no reason why it would think it was tianchi, I never had one of those. It’s not clear to me what’s the correct ROM I should put on my device before building: everything seems to suggest I need Android 5.1, but 18.5.C.0.25 FTF is a 4.4 build (which I have, so if that’s the one I should be able to do it without issues).

Make sure you have 18.5.C.0.25 flashed on your device, and remove any backup-* directory, that should go fine. Yes, we are pulling from KK for this device, it is expected.

1 Like

I’ve tried that all, but I get this: http://pastebin.com/vQRDZqCF

I don’t understand how something could be missing, even backuping manually doesn’t help


Nothing is missing in this log, except that you |./build.sh blobfree| on a device that does not supports blobfree builds.

oh thanks, I missed that
 >.<

I’m going to build without blobfree then, but can the image be made public if I succeed?

Technically, no, because it will contains blobs. Supporting Sony AOSP based devices as a blobfree requires some work, both on the build system side and on the addon side.

Ok I tried a normal build, but I still get an error I cannot figure out: http://pastebin.com/KVu4EtaZ

Also, a backup-tianchi folder keeps being generated for no apparent reason


Please make sure you are using a supported version of GCC. I see you have Ubuntu 16.04, I’m pretty sure this is related.

I used both gcc 4.7 and gcc 5.4 but I keep getting error. In particular, I clobbered everything, cleaned ccache and built from the ground up anew, but still the error is the same as always: http://pastebin.com/Y70dE3kd

Can you please search before asking ? https://lite.qwant.com/?q=error%3A+unsupported+reloc+43&client=opensearch