yashsingh1/xdaforums huggingface dataset:
[Xperia Z3 Tablet Compact Original Android Developm] jacktheriefla:
Extract the boot.img from the ZIP and flash it in recovery using fastboot flash boot boot.img

flash TWRP 3.0.2.0 from https://twrp.me/devices/sonyxperiaz3tabetcompact.html fastboot flash recovery twrp-3.0.2-0-scorpion_windy.img

I found a Tutorial here on XDA [Tutorial] How to flash a new boot.img via Fastboot by fipsib

That is how u Flash this?
[Xperia Z3 Tablet Compact Original Android Developm] jacktheriefla:
It is all working now , made a fews Steps again.

Booting to Recovery was the main Problem :-p

Thanks Peter!!! And Special Thanx to Lowtraxx :)
[Xperia Z3 Tablet Compact Original Android Developm] ccgx:
Is full device encryption working with this rom? Thats the one thing I really want to have...
[Xperia Z3 Tablet Compact Original Android Developm] finalista:
Just try it out:)
[Xperia Z3 Tablet Compact Original Android Developm] lowtraxx:
New binaries just got released for the SGP611/621. Integrating them ATM. Once I verified they are breaking nothing, I will do both builds and release them.

Update 1:

- Video recording works now. (New binaries + patches)

- There are new patches to make FM and BT work at the same time. If they do not break anything I will try to include them as well.
[Xperia Z3 Tablet Compact Original Android Developm] sebarkh:
Thank you

Cant wait! Great thank you
[Xperia Z3 Tablet Compact Original Android Developm] CrazyPeter:
Should add quickcharge2 to the list of not working.

My original flash had some weirdness, the camera didn't work initially, I disabled it (which removed settings and updates) renenabled it, it then worked. I might be wrong, but it seemed like the camera icon color changed too (as if there was some app update applied that had broke it)

Also had a rapid battery drain yesterday (for the first time). Don't have any other details sadly, as the battery was totally dead this morning. (From 50% last night)

Keen to try out the updated build :)
[Xperia Z3 Tablet Compact Original Android Developm] iamnotkurtcobain:
Any performance improvements too?
[Xperia Z3 Tablet Compact Original Android Developm] lowtraxx:
Will add QC to the list. I think the risk of breaking others devices is too high for me, so I will leave it out for now. The camera behaviour seems strange, but it still has its glitches sometimes. But overall it works pretty good now. Battery drain mostly stems from Apps that go haywire :) I haven't seen drain for a few weeks now. Did you leave the camera on and then turn the device off? Sometimes that enabled a wakelock for me.

As performance is very subjective, I honestly don't know for you :) From a Benchmark standpoint, it still scores better than on stock 6.0.1 in 3D Mark, but did so for a long time. I ,and I can only speak for myself, do rarely encounter any sluggishness at all.
[Xperia Z3 Tablet Compact Original Android Developm] finalista:
[MENTION=615507]lowtraxx[/MENTION] could you please add md5 sums for the next builds? So we can check the downloads. Thanks :svetius:
[Xperia Z3 Tablet Compact Original Android Developm] lowtraxx:
V3 is here

V3 is here, get it while its hot!

As always, due to the massive amount of changes, please make a backup before flashing the update. I tested this version for two full days now and as far as I can tell it works very good. Sadly the Audio Volume Issue still persists and the FM patches were not quite ready for inclusion yet, so FM still only works if BT is off. But Video recording works now. And the few crashes that were the blobs fault, should also be addressed in this build.

Changelog (LineageOS):

19.02.2017 - V3:

- Newest Lineage, Sony and Android patches

- Updated to newest Sony and QCom blobs (crash fixes for Adreno etc.)

- Video recording fixed (works most of the time now)

- Switched to Open Source GPS implementation
[Xperia Z3 Tablet Compact Original Android Developm] CrazyPeter:
Flashed and running well here. GPS working now, and no new issues so far. A solid update on a very solid v2 release.
[Xperia Z3 Tablet Compact Original Android Developm] finalista:
Running well so far. very good work as always :svetius: thank you for providing checksums.
[Xperia Z3 Tablet Compact Original Android Developm] jacktheriefla:
Question: whats the best Solution to Upgrade to newer build?

Again ADB Sideload?Clear Cache again?
[Xperia Z3 Tablet Compact Original Android Developm] lowtraxx:
I normally just do a sideload without clearing anything. But if you want to be absolutely safe, you can wipe cache and dalvik cache.
[Xperia Z3 Tablet Compact Original Android Developm] jacktheriefla:
Thanx :)
[Xperia Z3 Tablet Compact Original Android Developm] pradip.65:
GPS working fine for me too
[Xperia Z3 Tablet Compact Original Android Developm] torben5247:
Installed this rom yesterday, and it works very well! I havent noticed any issues yet.

Only thing i noticed is when you are charging the tablet when it is turned off the backlight is allways on.

But so far it looks promising.

Thanks for the good work!
[Xperia Z3 Tablet Compact Original Android Developm] lowtraxx:
Yes, that sadly still is bugged. But its better as with earlier versions. The tablet charges with light off until you press the power button to get the gauge. From then on the light does not switch off anymore. Working on it ;)
[Xperia Z3 Tablet Compact Original Android Developm] torben5247:
Thanks Lowtraxx ;)

Do you have any experience with screen mirroring?

I have used the built in functionality in Stock firmware.

But i need to find a app that can do the screen mirroring, do you have an app that you can recommend?
[Xperia Z3 Tablet Compact Original Android Developm] SteveJobt:
Thanks Lowtraxx, great work!

Deep sleep is not working on my SGP 621 LTE tablet. This was working well in the previous version.
[Xperia Z3 Tablet Compact Original Android Developm] lowtraxx:
That seems strange. Working as expected here. Do you have any culprits? (kernel/app wakelocks, system apps, LTE standby, ...)

Update: Did you play with FM/BT? Did rebooting fix the issue?
[Xperia Z3 Tablet Compact Original Android Developm] SteveJobt:
I have flashed ROM (Wipe All) + GApps nano. Tablet is in flight mode. I will reboot and check it again. BT is also disabled.

---------- Post added at 01:35 PM ---------- Previous post was at 01:13 PM ----------

Same behaviour after reboot the system.

---------- Post added at 02:01 PM ---------- Previous post was at 01:35 PM ----------

I have checked partial wakelocks, it is NFC related but NFC is disabled. :eek:

It is not possible to enable NFC.

---------- Post added at 02:48 PM ---------- Previous post was at 02:01 PM ----------

I found the solution for partial wake locks on my system. Once you have disabled NFC the default value in NfcServicePrefs.xml is not set to false. The NFC service is running in the background. It is not possible to change it from UI.

I have installed MyAndroidTools Pro and modified the value nfc_on to false. After rebooting the system everything works as expected.
[Xperia Z3 Tablet Compact Original Android Developm] lowtraxx:
Ah, thanks for investigating. I had NFC disabled forever, so this did not hit me. I will investigate, as this seems to be a Bug somewhere with Lineage.

Update: Seems not to happen if NFC was turned off successfully once before, only on new Installations (not verified yet, as I need to make a backup first).
[Xperia Z3 Tablet Compact Original Android Developm] SteveJobt:
Perhaps the flight mode is responsible for this strange behavior?
[Xperia Z3 Tablet Compact Original Android Developm] lowtraxx:
Nope, found the culprit. It is a botched config file. Will be fixed in the next release, which (as long as the FM patches are ready on time) should be next week. Fixed it locally on my build an now get

scorpion:/ # cat /data/data/com.android.nfc/shared_prefs/NfcServicePrefs.xml
<?xml version='1.0' encoding='utf-8' standalone='yes' ?>
<map>
<boolean name="nfc_on" value="false" />
<boolean name="first_boot" value="false" />
</map>
scorpion:/ # cat /data/data/com.android.nfc/shared_prefs/NfcServicePrefs.xml
<?xml version='1.0' encoding='utf-8' standalone='yes' ?>
<map>
<boolean name="nfc_on" value="true" />
<boolean name="first_boot" value="false" />
</map>

For those who want to try the fix themselves I attach the needed files. Unzip and copy them to /system/etc and overwrite the ones that are already there (keeping all permissions intact) and you should be good to go. But as always: Do this at your own risk!

Update: Don't forget to reboot, otherwise the changed files will not take effect.
[Xperia Z3 Tablet Compact Original Android Developm] SteveJobt:
Wow thanks!
[Xperia Z3 Tablet Compact Original Android Developm] der_bert:
Hello,

First of all, thank you very much for your great work, it's highly appreciated.

----

Edit:

Deleted irrelevant part of message,
[Xperia Z3 Tablet Compact Original Android Developm] torben5247:
This fix reduced my overnight battery consumption from 6% to 2.5%!! Brilliant!! great work! Thanks!:good::good:
[Xperia Z3 Tablet Compact Original Android Developm] prefect472:
How to install on scorpion (SGP621)?

I have unlocked the bootloader and tried all instructions I could find. Current procedure is:

1) Unlock bootloader

2) Extract boot.img from the TS zip and flash to boot

3) Flash offficial TWRP to recovery.

However, I still get Error 7 and TWRP saying that I'm trying to flash a scorpion image when I have a scorpion_windy. But my Z3TC is a SGP321, LTE version, e.g. plain scorpion.

I can see on the TWRP download page that it is indeed for scorpion_windy but I can't find an official TWRP for the plain scorpion.

I've tried the AICP multirom TWRP images for scorpion but they simply will not start at all, by tablet just boots to Android when I try VOLDOWN+POWER... only the official TWRP starts but as described above, won't let me flash this ROM.

What am I missing?
[Xperia Z3 Tablet Compact Original Android Developm] bogdaniux:
Flash Multirom TWRP via fastboot. It should work :)

I also encountered this problem before
[Xperia Z3 Tablet Compact Original Android Developm] prefect472:
Do you have a link? Because the ones I found and flashed (with fastboot flash recovery) simply don't start.
[Xperia Z3 Tablet Compact Original Android Developm] M1chiel:
I think you must flash TWRP to the FOTA partition as described here: https://xdaforums.com/z3-tablet-compact/orig-development/rom-android-7-1-nougat-aosp-sgp621-t3492530
[Xperia Z3 Tablet Compact Original Android Developm] bogdaniux:
Exactly. Thanks M1chiel
[Xperia Z3 Tablet Compact Original Android Developm] prefect472:
I think I tried that, but I'll try again to make sure.

Edit: Nope, didn't work. Also, when I flash the official twrp (twrp-3.0.2-0-scorpion_windy.img) I flash to recovery and that one starts just fine.

Actually I just tried to flash that one to FOTAKernel and then it works too. Have I misunderstood how to flash these things or do I have a corrupt image file for the scorpion multi ones?

Where have all of you downloaded TWRP for the non-windy scorpion?
[Xperia Z3 Tablet Compact Original Android Developm] bogdaniux:
I think it's koron's recovery. The one suggested here. The first could be the one you want to flash...
[Xperia Z3 Tablet Compact Original Android Developm] lowtraxx:
You need to flash boot.img to boot, recovery.img to FOTAKernel und nothing to recovery. If you flash to recovery, it will break boot and you have to do it over. For recovery use the one from [MENTION=5688409]koron393[/MENTION] from here. Thats what I am using as well and it works great.
[Xperia Z3 Tablet Compact Original Android Developm] prefect472:
Yes, those are the recovery images I've been trying to start all day.

So I start with USB cable and holding Vol+, then fastboot flash the boot.img from the LineageOS zip file, then flash the recovery image from AICP to FOTAKernel, shut down and try to power up while holding down VOL- (if I do that, then the official scorpion_windy TWRP starts, but not these recovery images from your link).

When you say "do it over", do you just mean flashing the boot and FOTAKernel images?

I read something about powering up and waiting for the LED but it never comes on, ever since I flashed the boot.img. The tablet doesn't start anything at all.

My device was on stock Marshmallow before btw, and I did unlock the bootloader before starting to play with this.
[Xperia Z3 Tablet Compact Original Android Developm] lowtraxx:
Okay, so I think something old got stuck there. Please do:

fastboot erase boot
fastboot erase recovery
fastboot erase FOTAKernel
fastboot flash boot.img boot
fastboot flash aicp-recovery.img FOTAKernel
fastboot reboot

Do NOT hold any hardkeys, just wait. You should see the Sony Logo. After that, the LED should turn purple. Once it does, press Vol+ a few times, until it turns orange. Now you should be entering the newly flashed recovery.
[Xperia Z3 Tablet Compact Original Android Developm] prefect472:
Uh-oh, then I must have broken something bad before when I was trying things from whatever I found on the Internet :) . If I follow the above, after the reboot, the device goes into a loop. The LED turns red for about 4s, then turns off, then red again for a split second, like it is trying to boot but just gives up. I never get the Sony logo.

If I force a shutdown and power on, I just get a vibration and then no LED or anything.
[Xperia Z3 Tablet Compact Original Android Developm] bogdaniux:
Can you still enter fastboot?
[Xperia Z3 Tablet Compact Original Android Developm] lowtraxx:
This sounds like the partitioning is f...ed up. Please download latest stock FTF and do a COMPLETE factory flash with flashtool. After that try the suggestions from above again.
[Xperia Z3 Tablet Compact Original Android Developm] bogdaniux:
Stupid question, maybe:

Did you fastboot devices and got response? Just to be sure
[Xperia Z3 Tablet Compact Original Android Developm] prefect472:
I've re-flashed 23.5.A.1.291 (which boots properly) and if I simply flash the boot.img from the zip, the device stops booting to Sony logo.

#md5sum boot.img
8f8a42d0456614c1342b03ede5ca1393 boot.img

boot.img has a timestamp of 2009, is that normal?
[Xperia Z3 Tablet Compact Original Android Developm] lowtraxx:
Yes, that is normal. I have no Idea why though. Was the case with all previous builds. The md5sum checks out as well. I sadly cannot test this boot.img, as I do not have a scorpion_windy device, but as no one else here has reported a problem, I guess the boot.img should be okay. I just tried flashing the latest one from the scorpion zip, and it works as expected. And stock boots okay for you, which is even stranger...
[Xperia Z3 Tablet Compact Original Android Developm] prefect472:
This _is_ the scorpion non-windy boot.img, I have a SGP621 and the zip I'm using is the one below.

#md5sum lineage-14.1-20170217-UNOFFICIAL-Lowtraxx-scorpion.zip
c3a68c44d7eead2c71e0028bf3162355 lineage-14.1-20170217-UNOFFICIAL-Lowtraxx-scorpion.zip
[Xperia Z3 Tablet Compact Original Android Developm] lowtraxx:
Ah, sorry, switched up the md5 sums. That is the one I tried. worked as expected here, as said. Sadly I am running out of ideas. Have you tried flashing one of the older boot.img's (from the cm 14.1 thread for example)?
[Xperia Z3 Tablet Compact Original Android Developm] b8drf:
Quick question on this ROM. I am currently running rooted stock 6.0.1 on my SGP621 and would really like to move to adopted storage using my 128gb SD card. Sony restricted the use of this in MM so does this ROM support formatting SD Card as Internal?

Thanks!
[Xperia Z3 Tablet Compact Original Android Developm] klassenbester:
Yes with this Rom it works perfect.

But only when you use a fast SD card.

View attachment 4056716

Gesendet von meinem Xperia Z3 Tablet Compact mit Tapatalk
[Xperia Z3 Tablet Compact Original Android Developm] ccgx:
To answer my own question: no, it doesnt work. After the final "Encrypt Tablet" button press it briefly shows a screen with the android guy and just restarts, without even attempting to encrypt.
[Xperia Z3 Tablet Compact Original Android Developm] ztxgeol:
Couldn't boot

I got a SGP611 and flashed your LineageOS BETA, it works fine at first.

today I connect my device to Sony's Quick Charger UCH10 when it was turned off, and I turn it back on in charging, after a while I found myself couldn't turn on the screen no matter what I did(I even tried to hold the power and + or the reset button, nothing happened)
[Xperia Z3 Tablet Compact Original Android Developm] lowtraxx:
That sounds strange. If you connect it to the charger, does the screen come on? Does another charger work? Due to QC being disabled in this ROM, may it be possible, that the tablet simply does not charge with this charger for safety reasons? I cannot test it myself, as I do not own this charger.
[Xperia Z3 Tablet Compact Original Android Developm] lowtraxx:
Sorry for not answering, I missed your question. It is not working at the moment, but I am looking into why that is. Will report back once I know if it is possible and how it will be done if so.
[Xperia Z3 Tablet Compact Original Android Developm] shrek42:
Many thanks for your amazing work, lowtraxx.

Yesterday I successfully activated encryption running lineage 14.1 (V3) 20170217 (SGP621).

First I set a screen-lock password, then I switched on encryption (battery 100% loaded and USB charger connected).

Android guy, restart, then progress bar while encrypting the device.

Up to now working with the encrypted device and rebooting is without problem.

Even though it is a bit slower if you access large files, it is working fine for me.

But unfortunately one major problem remains: When I reboot into TWRP (TWRP_multirom_scorpion_3.0.3.0_3.10_201701),

TWRP can not decrypt the /data partition and therefore I have no chance do full

file-based backups and restores. Very unfortunate.

Would be great if you could have a look at that.

Or should I re-post this at koron393's TWRP/AICP-related thread?

Many thanks, Markus
[Xperia Z3 Tablet Compact Original Android Developm] lowtraxx:
As Android seems to en- and decrypt okay per se, it could be a problem within the recovery. I am not as experienced there, so it may be best to ask the developers about it directly. You could attach a log here nonetheless and I would take a look, maybe its something simple.
[Xperia Z3 Tablet Compact Original Android Developm] ccgx:
Now I'm really puzzled for what I did wrong when trying the encryption. I thought maybe it has something to do with using the TWRP as recovery (the exact same version as mentioned) or not fully charging or using a PIN instead of a password, but I changed that to password and charging to 100% an it is still not working. Did you do anything additionally?

[MENTION=615507]lowtraxx[/MENTION] Is there any way to provide logfiles which could be usefull for you to investigate?
[Xperia Z3 Tablet Compact Original Android Developm] lowtraxx:
Getting a log in this case is not trivial I think. Could you try if it works if you do the following (this includes all failure reasons I could remember):

- plug into wall charger

- remove SD and (if you got one) SIM card

- if you are using GApps make sure you are logged in

- kill all running apps except for the encryption setting screen

- try encrypting again

If that does not work as well, please enable debugging, start ADB logcat while being connected to a computer and post the log here.
[Xperia Z3 Tablet Compact Original Android Developm] ztxgeol:
When I connect it to the charger the screen did came on, and everything seemed fine at first. Here the thing: the tab was off when I'm gonna charge it --> connected, screen on with a big battery icon --> screen off after about 30s --> later that day I noticd the LED turnd green so I powered it on, it booted normally since I saw the lockscreen --> 1 hr later the tab just "dead"(still connected), leaving the LED on(green).

UPDATE: the tab is back to life somehow:p, all I did was 2hrs waiting and power + vol up, I guess it may get something to do with the charger:confused:

TKS for the awesome work anyway, hope it gets better:D
[Xperia Z3 Tablet Compact Original Android Developm] ccgx:
It didnt work. I attached the logfile. I took a quick look into the logfile myself and found this error message:

03-01 08:30:58.250 325 8767 E Cryptfs : Bad magic for real block device /dev/block/bootdevice/by-name/userdata
03-01 08:30:58.250 325 8767 E Cryptfs : Orig filesystem overlaps crypto footer region. Cannot encrypt in place.

Probably something wrong with the partitions?
[Xperia Z3 Tablet Compact Original Android Developm] shrek42:
Many thanks for your help.

To see if the TWRP image 3.0.3.0_3.10_201701.img has a specific problem, I've flashed 3.0.2.0_3.10_201611.img and tried to decrypt the /data partition with that version. But same result. /data can not be decrypted.

The hint with the log was very helpful. It seems that this TWRP versions (now again 3.0.3) does not include the decrypt module:

I:Set page: 'trydecrypt'
I:operation_start: 'Decrypt'
crypt_ftr->fs_size = 23932863
Using scrypt with keymaster for cryptfs KDF
could not find any keystore module
Failed to init keymaster
Signing failed
kdf failed
failure decrypting master key
Failed to decrypt master key
crypt_ftr->fs_size = 23932863
Using scrypt with keymaster for cryptfs KDF
could not find any keystore module
Failed to init keymaster
Signing failed
kdf failed
failure decrypting master key
Failed to decrypt master key
Failed to decrypt data.
I:Set page: 'decrypt'
I:operation_end - status=1

I know from my Nexus 5X that TWRP 3.0.2-2 can decrypt /data-partitions. But it seems that koron393's TWRP version has never been tested or used with encryption, especially not with Nougat.

Maybe you can verify my finding if you do tests with crypt/decrypt yourself some time.

Anyway I think it's time to kindly ask koron393 if he would like to add the ability to process encrypted partitions to his TWRP image.
[Xperia Z3 Tablet Compact Original Android Developm] shrek42:
Good question. I also tried a PIN instead of a password and that did work as well. The encryption mechanism of lineageos should be entirely independent of whatever recovery is installed or used. I've only mentioned TWRP since it could not decrypt the encrypted /data-partition.

So here are some ideas and a more precise description of the history of my device (SGP621):

First step was to upgrade the device to the latest stock firmware (SGP621_23.5.A.1.291_1290-4945_R3D.ftf) - with help of Androxyd's flashtool (Flashmode, not fastboot mode). This might have changed the partition layout, etc (don't really know details of changes).

Next was backup of TA partition with rayman's Dirty Cow (since that method has been open sourced and seems not as intrusive or shady as most of the other methods). Of course this should have zero impact on encryption.

Via fastboot flash boot.img (boot partition) of lineage-14.1-20170217-UNOFFICIAL-Lowtraxx-scorpion.zip and TWRP_multirom_scorpion_3.0.3.0_3.10_201701.img (FOTAKernel partition). The boot image might be important indeed.

Via TWRP zip-sideload the entire lineage-14.1-20170217-UNOFFICIAL-Lowtraxx-scorpion.zip and open_gapps-arm-7.1-nano-20170224.zip. Most likely installation of open_gapps has no influence on encryption at all. Besides installing it (mostly for speech synthesis) I did never create or use any G* account.

Finally disable Wi-Fi, enable Airplane mode, set a PIN or password and then (fully charged and plugged) start to encrypt the device.

That's all. I don't remember any further steps.

BTW: I have encrypted the tablet several times now and it never did fail. So I don't even see any instability in doing so.

EDIT: Added (Flashmode, not fastboot mode) to 1.