yashsingh1/xdaforums huggingface dataset:
[Xperia Z3 Compact Original Android Development] m0d:
Built from sources:

Twrp version 2.8.7.0

Everything works fine, just was wondering how to fix the below:

When flashing new ROM I get the following lines appearing mixed with normal display:

Segmentation fault
E:mount -o bind '/data/media' '/sdcard' process ended with ERROR=139
Segmentation fault
E:mount -o bind '/data/media/0' '/sdcard' process ended with ERROR=139
Segmentation fault
E:mount -o bind '/data/media/0' '/sdcard' process ended with ERROR=139

twrp.fstab:

# mount point	fstype	device	[device2] fstype2

/boot	emmc	/dev/block/platform/msm_sdcc.1/by-name/boot
/system	ext4	/dev/block/platform/msm_sdcc.1/by-name/system
/cache	ext4	/dev/block/platform/msm_sdcc.1/by-name/cache
/data	ext4	/dev/block/platform/msm_sdcc.1/by-name/userdata	length=-16384
/external_sd vfat /dev/block/mmcblk1p1 /dev/block/mmcblk1 flags=display="Micro SDcard";storage;wipeingui;removable
/usb-otg vfat /dev/block/sda1 /dev/block/sda flags=display="USB OTG";storage;wipeingui;removable

Boardconfig Twrp changes:

# TWRP Recovery
TARGET_NO_SEPARATE_RECOVERY := true
TARGET_RECOVERY_PIXEL_FORMAT := "RGB_565"
BOARD_HAS_NO_SELECT_BUTTON := true
BOARD_USE_CUSTOM_RECOVERY_FONT := \"roboto_23x41.h\"
TW_THEME := portrait_hdpi
RECOVERY_GRAPHICS_USE_LINELENGTH := true
RECOVERY_SDCARD_ON_DATA := true
TW_HAS_NO_RECOVERY_PARTITION := true
TW_FLASH_FROM_STORAGE := true
TW_EXTERNAL_STORAGE_PATH := "/external_sd"
TW_EXTERNAL_STORAGE_MOUNT_POINT := "external_sd"
TW_DEFAULT_EXTERNAL_STORAGE := true
TW_INCLUDE_JB_CRYPTO := true
TW_CRYPTO_FS_TYPE := "ext4"
TW_CRYPTO_REAL_BLKDEV := "/dev/block/platform/msm_sdcc.1/by-name/userdata"
TW_CRYPTO_MNT_POINT := "/data"
TW_CRYPTO_FS_OPTIONS := "nosuid,nodev,barrier=1,noauto_da_alloc,discard"
TW_CRYPTO_FS_FLAGS := "0x00000406"
TW_CRYPTO_KEY_LOC := "footer"
TW_INCLUDE_FUSE_EXFAT := true
TW_BRIGHTNESS_PATH := /sys/class/leds/wled:backlight/brightness
TW_MAX_BRIGHTNESS := 4095
TW_NO_USB_STORAGE := true
TW_NO_SCREEN_BLANK := true
[Xperia Z3 Compact Original Android Development] Vietnam Developing Pros:
Is it possible that it can use CWM or PhilzTouch instead of TWRP?
[Xperia Z3 Compact Original Android Development] someone755:
[MENTION=3138030]m0d[/MENTION]: I've not seen that error while building, nor has Dees_Troy. You're best off asking that on the TWRP IRC.

Asking a question like that, I can only deduct that you're not really a developer, or a "pro" one for that matter.

You can boot CWM or PhilzTouch on your phone, yes, if you can find an image of it that works (or if you build one yourself).
[Xperia Z3 Compact Original Android Development] dev_guy:
Working TWRP Recovery for CM12.1

Thanks for this! I've spent hours pouring over forums and trying various ways to make TWRP work with CM12.1 on the Z3C and the above link is the only thing that worked. I'm not sure what got broken in later versions of TWRP but they didn't work for me (I was still stuck with only the CM recovery). :good:
[Xperia Z3 Compact Original Android Development] m0d:
I get it when wiping in recovery and after flashing ROM, (not building).

All works fine, though. The warning just appears in console view along with flash successful etc.

Thank you for your time

EDIT:

When wiping: http://oi58.tinypic.com/jq111x.jpg

After flash complete: http://oi62.tinypic.com/x1n6fa.jpg
[Xperia Z3 Compact Original Android Development] SdtBarbarossa:
Thats caused by this:

RECOVERY_SDCARD_ON_DATA := true
[Xperia Z3 Compact Original Android Development] SdtBarbarossa:
The buffer was already increased by olivier and me in sony common tree... (You use the same dont you ?)

Just to be clear:

- the buffer was always for unpacked ramdisk size... So no compressing meaned nothing!

- using the new stock theme saves ~1MB of uncompressed size btw ;)

But if you use sony common tree then buffer is no.longer a problem...

Btw did you saw what i posted above? Is your twrp able to mount internal sdcard?

may you need some help or are you fine on your own?

are you the official maintainer of Z3C twrp?

Several stuff on the teamwin github confusing me...

1. https://github.com/TeamWin/android_device_sony_z3c/tree/cm-12.1/recovery

Why twrp.fstab is there? As far as i know it belongs to /recovery/root/etc/twrp.fstab

2. several boardconfig flags:

RECOVERY_VARIANT := twrp << ok that makes scence but normaly you do that manually... Like

"make recoveryimage -j4 RECOVERY_VARIANT=twrp "

...nevermind let it be but mention in readme that twrp must be at recovery-twrp folder not on default

TW_NO_USB_STORAGE := true <<

---------- Post added at 10:28 PM ---------- Previous post was at 10:11 PM ----------

TW_NO_USB_STORAGE := true <<< why no mtp support? (I would delete that )

Maybe add

TARGET_USERIMAGES_USE_F2FS := true

Why? Ok for yoir kernel it may not make sense but if someone compile a kernel with f2fs support they will be able to format to f2fs in twrp

TW_INCLUDE_NTFS_3G := true

Maybe also activate ntfs support ^^

---------- Post added at 10:31 PM ---------- Previous post was at 10:28 PM ----------

3. Maybe use new design to save space ;) (ok that one isnt officially yet... But you can still include it manually )

---------- Post added at 10:32 PM ---------- Previous post was at 10:31 PM ----------

New design commit :

https://gerrit.omnirom.org/#/c/12728/
[Xperia Z3 Compact Original Android Development] someone755:
Holy hell that's a lot of info lol. Okay, let's start answering:

About the SD flag; I don't see what's wrong with that -- I've never had the issue m0d describes, though I'm currently unable to test anything.

The buffer patch was only recently merged into CM's repo, so that's one thing that's been fixed (hopefully). Again, I haven't had time to test, and that will probably be the case for a few more months.

As for the fstab placement, it's later copied through the z3c.mk file: https://github.com/TeamWin/android_device_sony_z3c/blob/cm-12.1/z3c.mk#L56 Honestly I don't know what's up with that but I'm not the only one who would start getting issues once that line was removed, and the fstab moved accordingly.

RECOVERY_VARIANT is there because issues arise once you replace CM's bootable/recovery with that of TeamWin or omnirom. As far as I've been able to search, placing TWRP in recovery-twrp is pretty standard affair (though you're right, I should be asking Dees_Troy about this).

I have no idea why the MTP flag is there -- I've asked a few people but few seem to know its origins -- again, I'd have to test it. F2FS support has been added recently to CM's own F2FS kernel, so you make a valid point. I've just been unable to build or test anything recently.

I don't see many people using NTFS, and the people I've asked have said that it adds a few extra megabytes to the size. I guess there's nothing wrong with having it in though.

I'd love to change the recovery theme, but this is an official build after all -- it'll appear once (and if) TeamWin approves it.

As for your question of whether I am the maintainer; yes, I am. But only so because I was the only one who could be arsed to bug Dees_Troy and _that for a build (though the issues I've faced are sort of an answer as to why nobody did that before I did). Currently though, my biggest issues are lack of time and lack of test device -- school demands so much time that I didn't even get to celebrate my own birthday (put your party hats on), and my phone has several issues that need to be taken care of, so it'll probably be laying dormant on a repair service's desk for the next two weeks or so before they start working on it and I get it back.

If you're feeling adventurous, the twrp gerrit is always open for patches.
[Xperia Z3 Compact Original Android Development] SdtBarbarossa:
First thank you for fast respond :)

1. like i said i dont own that device and maybe he shows me his fdisk log so we can look together

2. yes like i said its standard to place it in recovery-twrp ... But normally you dont define it in boardconfig... You do it like i posted above... Anyway this tree is only for building twrp so its ok... Also its your work ^^ so do it your way

3. yea your right

4. for official builds you can also change theme if you want... Thats why we have TW_Theme flag ;) but ok wait for it to go officially^^ just mentioned this because its more beatyful AND safes space ;)

Ok enought for today ^^ thanks again for answering

PS: happy birthday ;)
[Xperia Z3 Compact Original Android Development] someone755:
[MENTION=2999150]theholyhermit[/MENTION] I took a few minutes off to test this (after two months, finally I have the time, and a phone to test this with!). TWRP from this thread, CM's November 3rd build. Let it boot, reboot a few times. TWRP works on every single try. Works with F2FS, no error messages whatsoever. Might as well post it in this thread -- liven it up a bit, and stop the spam in the CM one :P

And now I have to hate you because you reminded me how good AOSP-based ROMs are, and I have to stick with stock for a while longer because school demands the extreme battery life.

Tiny rant ahead:

I effing told everyone it isn't my fault the thing doesn't work. I don't know when this thing started working, and nobody has ever told me if it even works, but it works now. I'd say this commit fixed it.

Huge props to Michael Di (whoever you are), without whom this patch would never have been accepted.
[Xperia Z3 Compact Original Android Development] theholyhermit:
I tried installing it via the App, and it asked something about the recovery location. I let it try what it wanted and it said that it failed. Does this mean I have to use Fastboot to install it?

Has anyone gotten fastboot to work in Windows 10 64-bit?
[Xperia Z3 Compact Original Android Development] someone755:
Does this one not work with W10? I'm on 8.1 and it works wonderfully. http://xdaforums.com/showthread.php?p=48915118#post48915118

The app didn't work the first time around for me either but it did do the trick the second or third time http://imgur.com/LKhCpEI.jpg I'll tell the big guys their app doesn't always work.

If it still won't work for you, you can try with fastboot or with a root terminal. dd is a very handy tool (our recovery partition is on /dev/block/mmcblk0p16).
[Xperia Z3 Compact Original Android Development] theholyhermit:
It tried installing it again, as you suggested, and it worked! I was able to boot into TWRP and install the latest nightly from there. Of course, I will have to reinstall TWRP every time I install a new nightly, but that's fine.

Thanks!
[Xperia Z3 Compact Original Android Development] someone755:
Why would you have to reinstall it every time? Unless you have something overwriting your recovery partition (which you don't, if you're just flashing nightlies, and don't have the CM Recovery updates enabled), you should be good.

As for the app, I asked around the TWRP IRC and was told I need to write an email to the developer personally. Here goes nothing, I guess.
[Xperia Z3 Compact Original Android Development] theholyhermit:
The app worked fine after it failed the first time.

Installing the CM Nightly Build (.zip) that I downloaded from get.cm overwrote it with the CM Recovery.
[Xperia Z3 Compact Original Android Development] someone755:
Might I ask what CM build that was on? And whether TWRP worked after you installed it once more?

As another user describes;

The same is true for myself, no matter which way I update -- be it CyanDelta, or through an official zip (from get.cm or CM Updater), TWRP stays.
[Xperia Z3 Compact Original Android Development] theholyhermit:
So, funny thing, if "Update Cyanogen Recovery" is set in Developer Options, it overwrites the Recovery with the Cyanogen Recovery, even if you download the Nightly manually and install it from TWRP.

Who knew, lol? :angel:
[Xperia Z3 Compact Original Android Development] theholyhermit:
I had seen the option before, but I thought it was an option for the CM Updater. I didn't think it could affect what happens when flashing a ROM from TWRP. Shows what I know.

xda needs a facepalm smiley
[Xperia Z3 Compact Original Android Development] snaky90:
If I install an official rom ( 6.0 sony concept) and then open the bootloader, How I can install TWRP without being root but with open bootloader ?
[Xperia Z3 Compact Original Android Development] someone755:
You do not need, nor will you ever need, root permissions to install a recovery to a recovery partition.

Now that we have the new bootloaders with a real recovery partition, you can just "fastboot flash recovery twrp.img" and you'll have recovery working with every ROM or kernel you install.
[Xperia Z3 Compact Original Android Development] snaky90:
But Sony Android 6.0 Concept has this new bootloader and recovery partition ?
[Xperia Z3 Compact Original Android Development] someone755:
That, I don't know.

I know you can get it through Emma but I haven't focused much on other ways of obtaining it (since I was running stock anyways, and my phone is out for repairs yet again). If you're talking about the flashable zip variant of the concept, then no, it doesn't. Though I don't believe the FTF variant does, either -- in any case, it would be wise to check with people that have already installed it.

Though honestly making a backup and using Emma is the fastest way to go as far as I'm aware.
[Xperia Z3 Compact Original Android Development] snaky90:
If I don't have the recovery partition, it's possible to install like fotarecovery (fota kernel partition)?
[Xperia Z3 Compact Original Android Development] someone755:
If the boot image allows it. The FTF won't have this, but the modified flashable zip variants might.
[Xperia Z3 Compact Original Android Development] m0d:
Sorry for the late response. I just got my phone from repairs.

Output:

shell@android:/ $ su
root@android:/ # fdisk -l /dev/block/mmcblk0
Found valid GPT with protective MBR; using GPT

Disk /dev/block/mmcblk0: 30535680 sectors, 2622M
Logical sector size: 512
Disk identifier (GUID): 98101b32-bbe2-4bf2-a06e-2bb33d000c20
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 30535646

Number Start (sector) End (sector) Size Code Name
1 256 4351 2048K 0700 TA
2 4352 5375 512K 0700 sbl1
3 5376 5887 256K 0700 s1sbl
4 5888 6015 65536 0700 dbi
5 6016 7039 512K 0700 aboot
6 7040 8063 512K 0700 rpm
7 8064 9087 512K 0700 tz
8 9088 10111 512K 0700 alt_sbl1
9 10112 10623 256K 0700 alt_s1sbl
10 10624 10751 65536 0700 alt_dbi
11 10752 11775 512K 0700 alt_aboot
12 11776 12799 512K 0700 alt_rpm
13 12800 13823 512K 0700 alt_tz
14 13824 54783 20.0M 0700 boot
15 54784 75263 10.0M 0700 ramdump
16 75264 108031 16.0M 0700 FOTAKernel
17 108032 108095 32768 0700 DDR
18 114688 147455 16.0M 0700 LTALabel
19 147456 150527 1536K 0700 modemst1
20 155648 158719 1536K 0700 modemst2
21 163840 166911 1536K 0700 fsg
22 172032 188415 8192K 0700 apps_log
23 188416 5406719 2548M 0700 system
24 5406720 5816319 200M 0700 cache
25 5816320 30535646 11.7G 0700 userdata
[Xperia Z3 Compact Original Android Development] Elvin99:
After I've enabled the Android encryption, TWRP cannot open the /data partition - wrong password. Any ideas?
[Xperia Z3 Compact Original Android Development] someone755:
I'd say you should grab the recovery.log and head on over to #twrp on freenode. (If you can't, PM me the log and I'll bug the guys about it.)
[Xperia Z3 Compact Original Android Development] Elvin99:
Hi, this is my log file:

http://paste.debian.net/359589/

Thanks
[Xperia Z3 Compact Original Android Development] someone755:
Thanks but believe it or not there's a reason I told you to PM me this.

Showing your IMEI to the entire internet isn't always the best idea -- you might want to remove it (I already have what I needed though, thanks again!).
[Xperia Z3 Compact Original Android Development] Elvin99:
Why? It is not in log...
[Xperia Z3 Compact Original Android Development] someone755:
It's January 6th 2016 and we already have a candidate for "most stupid person of the year". Not only did I type that on the wrong website, I typed that in the wrong program. Sorry about that, class has started again...

Thank you for the log though, I'll see if I can get the lads on #twrp to tell me more about this.
[Xperia Z3 Compact Original Android Development] theholyhermit:
So, I am kinda screwed right now and I was wondering if someone here could help me. I have accidentally shattered my screen, so I am unable to access my phone. TWRP requires a touchscreen only (being able to use the volume keys as a backup would be nice), and I really, really need to back up my data. ADB tells me that my device is unauthorized. Is there a way I can get TWRP to work for me?
[Xperia Z3 Compact Original Android Development] someone755:
I reckon the display works, but the digitizer doesn't? At least that's what your volume key suggestion tells me.

2.7 was supposed to bring USB OTG mouse support. I can't get it working with my wireless Logitech mouse though it does work inside Android.

What you could try is boot into Android and work from there -- ROMs have much better mouse support anyways, and you can make those backups prettier than just pulling all of /data to your PC (with SMS backup apps, TiB, those "live recovery backup" apps etc.).

Another one would be to see what happens if you "fastboot flash boot recovery.img" (as opposed to flashing to recovery) -- I think adb secure is set to off by default (though I'm not sure and I can't check right now).
[Xperia Z3 Compact Original Android Development] funiewski:
[MENTION=4275152]someone755[/MENTION] Sorry for disturbing, any possibility of twrp 3 in near future?
[Xperia Z3 Compact Original Android Development] someone755:
You're not disturbing at all!

I started downloading the Android repo as soon as I saw Ethan's announcement of TWRP 3.0.0.0, and I've been kept up to date on the news by our beloved sm4tik. I still have some repos left to download (namely the device-specific ones), but it's a 4 Mbps connection and Ubuntu doesn't like my Intel Centrino WiFi card so things are progressing slowly :D

I still have a few exams to pass this week but hopefully I'll be able to build again by next week.

Also a huge apology to everyone that tried to run TWRP from the dedicated recovery partition while running F2FS. I know it's a major inconvenience but quite honestly I haven't had the time to go through the process of getting another official build running. It'll be fixed in the upcoming update.

EDIT: Old phone is a better WiFi card than my dedicated $50 "Enterprise Edition" Intel PCI-e card. ggwp technology wins
[Xperia Z3 Compact Original Android Development] phoenixg36:
TWRP 3 is ready :)

https://dl.twrp.me/z3c/

I installed it and it works and also the new SDCARD future from Android 6 is working.

But I didn´t flash any zip yet.

Happy testing!

And great work from the developers!!!!
[Xperia Z3 Compact Original Android Development] josepmaria:
Have you used flashify?

Many thanks.
[Xperia Z3 Compact Original Android Development] phoenixg36:
no I flash it with fastboot

fastboot flash recovery twrp.img
[Xperia Z3 Compact Original Android Development] raxman68:
Flashing this, it always restarts into recovery ... what do I have to do, to boot to system?
[Xperia Z3 Compact Original Android Development] someone755:
Flash a working boot image.

The only way flashing this could cause what you're experiencing is if you flashed it onto your boot partition.
[Xperia Z3 Compact Original Android Development] raxman68:
I did it as always with flashtool ... is there a good manual how to flash it right?
[Xperia Z3 Compact Original Android Development] someone755:
Where in flashtool can you flash to the recovery partition? o.o Have been using FT for 4 years and new things just keep popping up lol.

As stated above, you can either use fastboot to flash to the recovery partition, using

fastboot flash recovery twrp-3.0.0-0-z3c.img

or you can use a terminal emulator app/adb shell to

dd if=/path/to/twrp-3.0.0-0-z3c.img of=/dev/block/mmcblk0p16

There's also the TWRP app but I'm not sure if they've added the twrp3 build for the z3c to it yet.
[Xperia Z3 Compact Original Android Development] josepmaria:
I have flashed it with twrp app. Works great, but i have not flashed any build.

Edit: Flashed the last official cm 12.1 nightly build without any problem.
[Xperia Z3 Compact Original Android Development] raxman68:
I don't know ... but I have already twrp 2.8.7.0 and when I do like the discription the second post I don't get a recovery partition, only kernel ... what is my problem and how to solve?
[Xperia Z3 Compact Original Android Development] spida_singh:
The TWRP Manager app will install this to your fota partition OK as well. I used it and works a treat
[Xperia Z3 Compact Original Android Development] someone755:
I'm sorry to say I don't know what any of that means... :I

If you don't even know what your problem is (that is to say, you can't describe it to me) you're in quite a pickle there.
[Xperia Z3 Compact Original Android Development] raxman68:
Thank you, yes that's it!! :D
[Xperia Z3 Compact Original Android Development] someone755:
Ugh, serves me right for just copying the changelog... Should've known XDA's test editor would screw me up somehow.

Yeah, the Z3C doesn't have that option. I'll delete it from the OP, but I'll try and see if I can make it work.
[Xperia Z3 Compact Original Android Development] lujaberdo:
it doesn´t work for me, i´m using MM concept and when reboot my phone after the installation the Z3c stars a bootloop. :crying::crying:
[Xperia Z3 Compact Original Android Development] funiewski:
It's strange because I'm on concept too and have flashed twrp 3 without problems, but I haven't flashed any new rom yet bcs there isn't any concept update yet, how did you flashed recovery?
[Xperia Z3 Compact Original Android Development] lujaberdo:
The first time I tried with TWRP app, it didn't work because of an unknown error. Then I downloaded from this site and I flashed it via TWRP 2.8.7.0....i reboot the phone and I did a backup with the new recovery, but when I tried to reboot system it was impossible.......at the moment I looked the Sony logo the z3c started in a bootloop.

I don't know which the problem is.

Enviado desde mi D5803 mediante Tapatalk
[Xperia Z3 Compact Original Android Development] funiewski:
I've never flashed recovery in that way. Try this: download the ftf from concept thread in general section of z3c,flash with flashtool, do not wipe data, than flash recovery in fastboot mode: fastboot flash recovery recovery.img, than you can reach recovery in fastboot mode from menu, flash latest systemless superSu,after you can flash xposed and reboot to recovery with gravity box(after installing it) for example
[Xperia Z3 Compact Original Android Development] lujaberdo:
I'll try to do by that way during the next weekend.

Enviado desde mi D5803 mediante Tapatalk
[Xperia Z3 Compact Original Android Development] m0d:
Is it possible to link to device tree? (Twrp3)

As I checked github, and there are no changes to z3c device tree since last year.
[Xperia Z3 Compact Original Android Development] someone755:
And you're right -- the trees haven't changed one bit.

Why though, did you expect to find something?
[Xperia Z3 Compact Original Android Development] sm4tik:
Did anyone ever count the clicks to get to the actual download page?! XD

Anyway, I'm glad the hassle is over and there seems to be a working twrp3 for our device. I'll flash it later today and report back if something comes up.
[Xperia Z3 Compact Original Android Development] m0d:
Small changes, I.E. https://github.com/omnirom/android_device_sony_common/blob/android-6.0/twrp.mk

But, I used TWRP 3 downloaded from twrp.me and it worked fine flashing lollipop ROM.

Did not try with M.
[Xperia Z3 Compact Original Android Development] someone755:
Probably so because we'd like people to read before they "dd of=/their/bootloader" lol.

Besides, it really shouldn't be hard if you've done it a few (hundred) dozen times.

Really there's little to no difference between that .mk and the z3c's BoardConfig. Thanks for the heads-up though, once 3.10 CM nightlies start popping out we'll be switching over to omni lol
[Xperia Z3 Compact Original Android Development] Rubenmgsantos:
deleted