yashsingh1/xdaforums huggingface dataset:
[Xperia Z1 Compact Original Android Development] [GER]Roxxor:
I remember that I once encrypted successfully on CM 12.1. But TWRP was not able to decrypt it.

In between I did a lot of testing, including AOSP based Kernel builds.

Now I couldn't encrypt on CM12.1 or on Jaguar.

I tried formatting and resizing system, cache and data via TWRP 3.0.2 (if I do not mix up some numbers.. There is a 3 some 0s and a 2 in the version number :D) and installed Jaguar again. Still no luck with encryption.

Now I installed the newest release of AOSP MM (16.07) by FXP and encryption worked. But as you state in your post, this is not really ready for daily usage for me.

Which Recovery do you advise? Maybe you could check the partition tables from AOSP?
[Xperia Z1 Compact Original Android Development] optimumpro:
Jaguar requires a specific TWRP to decrypt. I did one for Z1, but not for Z1c yet. Hopefully with the next release, I will compile TWRP for Z1c. I will also reduce the size of data partition to have space for footer, because that's what the log says. I have again checked CM and Slimrom trees: they both have the same numbers, which I use...
[Xperia Z1 Compact Original Android Development] frief:
Hi, I'm about to install July 19 Jaguar Amami LP5.1.1 but am irritated by two things:

(citing first post of this thread)

1. Be on LP, have route and TWRP in Recovery Partition (rom kernel has no TWRP)

TWRP is installed (v2.8.6.0) but how to check whether "route" is in the recovery partition?

The only link to source given in the first 10 posts (Kernel Sources: https://github.com/AOSP-Argon/android_kernel_sony_msm8974) seems to only contain the kernel and has the latest commit on Feb 11, 2016 - am I missing something?
[Xperia Z1 Compact Original Android Development] optimumpro:
I am so sorry to cause you irritation. I am also very sorry for my mistake: I meant root, not route. Already fixed it in the OP. But you knew that anyway. Didn't you? :laugh:

Here is the permanent solution for you: (i) don't use this rom; (ii) get the hell off this thread; and (iii) find yourself another place to express irritation.

Cheers...
[Xperia Z1 Compact Original Android Development] optimumpro:
Afwall has been updated and posted in the OP. To those who experience Googleplay f/c, make Afwall device administrator...
[Xperia Z1 Compact Original Android Development] optimumpro:
As soon as Google posts August security updates, there will be a new build which would also have the following:

1. Option to disable Camera: front, back, both or none

2. Option to disable writing to Tombstones
[Xperia Z1 Compact Original Android Development] cap11:
Really fast and lightweight ROM after Installing Amplify and AppOpsXposed but unfortunately it does find known and registered Wifi AccessPoints only after Reboot.

Starting phone -> wifi network found -> registering -> everything ok.

-> turning of wifi or activating flight mode -> turning on wifi -> only unregistered wifi networks found (no matter if 2,4 or 5 GHz) ...

Deleting them (and all the other "tricks") does not help. Only a reboot. I have read, that others (wiht aother Phones) had this Problems with some versions of CM.

Any suggestions? Because i don't want to go back to a stock Rom, but i have to if there is no permanent solution
[Xperia Z1 Compact Original Android Development] optimumpro:
Get rid of AppOpsXposed. It breaks LP 5.1.1. In Afwall /preferences/userinterface uncheck Lan Control; check Show Filters, Show UID for Apps and Active Rules. Make Afwall device administrator and grant it permanent root. Never use GravityXposed: it is not for custom roms...

No one else has this problem...
[Xperia Z1 Compact Original Android Development] optimumpro:
New build is posted

Rom updated to include August security patches plus more. See OP for download and description...
[Xperia Z1 Compact Original Android Development] [GER]Roxxor:
Thank you for the update! I will check encryption as soon as I can! Sadly that wont be that soon because I cant test anything right now. Marathon (tracking) next sunday and after that I'll have to rely on my phone for navigation in my holidays :o

After that I will happily try your ROM again! Thank you for all the efforts!

EDIT: And another question about security updates: Do you only integrate AOSP updates? What about device/driver specific patches? Im talking about vulnerabilites in qualcom drivers etc. Is there something you can do? Do you fix/update the kernel?
[Xperia Z1 Compact Original Android Development] optimumpro:
Everything that is open source is in including kernel. If, however, only a binary is available, then it can only come from Sony. Most Qualcomm's things are open source (code Aurora). In other words, if you are looking at Google security bulletins, whatever is clickable and redirected to sources is included in the rom...
[Xperia Z1 Compact Original Android Development] levone1:
What gapps are people using on latest build? Iused Slim mini on earlier build and worked fine, but seems buggy on this one.
[Xperia Z1 Compact Original Android Development] optimumpro:
Although, I never use Gapps, but my advice would be: pick the ones regularly maintained...
[Xperia Z1 Compact Original Android Development] katzenkloh:
does anyone of you also have the new "hardcoded" mac-address "00:0a:f5:89:89:ff" (same as in system/etc/firmware/wlan/prima/wcnss_qcom_cfg.ini), no matter if you have set randomized mac-address, while the network hostname changes as desired?

my device also don´t want ro encrypt (screen security is set to pin), like with same old cm-builds back in the days.

does this mean that i nead an other device or am i just to stupid to set it up (who knows ;))?

the rom was installed after fastboot erase system/cache/recovery/userdata via twrp with the descriped afwall- settings.

everything else work as promised.

any suggestions?

if necessary i will be a plessure to send a logcat, but i dont have a clue how to create on during boot (but i am willing to learn).

expect this little problems jaguar is a wonderful rom and i really appreciate optimumpro´s work.

i also haven´t found the donate-button, can anybody help me?

before i forget:

why is there is second webview and if install it, do i also have deactived the build in?
[Xperia Z1 Compact Original Android Development] optimumpro:
Encryption: although, I have reduced the data partition size, it is entirely possible that the changes didn't get to the device after flashing, as zip TWRP flashing, as opposed to fastboot flashing system.img, boot.img and userdata.img, only flashes system. I will post later userdata.img for partition changes to get to the phone.

MAC address: I will look into it, but the tree is the same as in Z1 and the macaddress improvements were incorporated there. Unfortunately, I don't have Z1c.

Webview: there is one in system that comes with the build, but if you upgrade to newer webview from playstore or install it as a regular app, you will have 2. The latest one is in data. So, after upgrade, you can safely delete system webview in /system/apps/webview. The reason for that is that the apps have different names: one is com.android.webview and the other com.android.google.webview. The latter gets updated all the time.

You can do logcat over ADB. If you have Linux, you are all set, if Windows, you need to install adb drivers (look for xda guide). Once you are setup, you should enable adb on the phone in Developer options. Connect your phone, open terminal on computer and type adb shell; then logcat.

The Donate button is in my screen name and the profile: here is the link https://www.paypal.com/us/cgi-bin/webscr?cmd=_flow&SESSION=Rz9wmLdZqdhFiC4e0R6NHP9Voo42jzgiGuQfFFOxUcdFAfhR-USHzEobmR0&dispatch=5885d80a13c0db1f8e263663d3faee8de2b8031b89187c030b37e57608011f58
[Xperia Z1 Compact Original Android Development] katzenkloh:
encrytion:

a userdata.img would help a lot - thanks for that.

mac-address:

the problem with the mac-address was a know problem on cm with the z1c nearly one year ago (for nearly 4-5 builds).

maybe jira(dot)cyanogenmod(dot)org/browse/NIGHTLIES-1930 can held you.

recovery:

due to the fact that a recovery is somethink very powerful do you think it is possible to portect it with a pin, passphrase or samething else?

hardware:

what do you prefer?

my spare z1c or an adequate donation to get one?

maybe it wound be easier for you to port the rom from the z1 if you have physical access to your target plattform.

logcat:

if you think it would help you i can send you an logcat on monday.

toby
[Xperia Z1 Compact Original Android Development] optimumpro:
I will look into macaddress. Recovery: once you are encrypted, your data partition is protected, as no one wouldn't be able to mount data without the password. I agree that TWRP is powerful and it should have additional protection. There was a heated discussion on Teamwin github and Troy categorically refused to do anything about it for several reasons: major changes required; and even if there is such a protection, your device could still be accessible via fastboot. So, even if TWRP is prevented from flashing, bootloader is not. I actually agree with him. Protecting TWRP would only make sense if you can protect bootloader.

Donation/Device: I would prefer to buy it myself, as older devices would require battery change/back door removal. I did that on my own Z1 and it was pain. :) Luckily you can get a brand new one from China for about $135.00. So, if there is interest in continuing development for Z1c, I would need a device...

P.S. I will post userdata.img later today...
[Xperia Z1 Compact Original Android Development] katzenkloh:
recovery:

so the safest way to prevent my device, or better say the system-partition form (let me call it "on -the -fly" or "drive-by-attacks") is to remove twrp via fastboot erase recovery if not needed or find a way to protect the bootloader.

donation:

i will contact a colleague of mine next week so that he will do a donation for me cause i dont like/have my one paypal-account.

so i can do my part cause i am a horrible coder ;)
[Xperia Z1 Compact Original Android Development] optimumpro:
Recovery: They won't get to your data if it is encrypted, but even if you erase recovery, nothing would prevent bad actors from erasing everything and installing whatever they want via fastboot. You can't change Sony bootloaders, because they are closed source. Qualcomm does have an open source bootloader, but it is used on 1 or 2 Nexuses only...
[Xperia Z1 Compact Original Android Development] Ænimal:
Frankly, this ROM is what's making me stick with my z1c (as long as the battery plays along, that is). If either of them should be falling short in the future, I'll probably opt for chinese stuff, likely an oneplus 3..

I don't have a paypal account either, but me too I'm gonna ask a friend to donate for me..
[Xperia Z1 Compact Original Android Development] optimumpro:
Rom updated

New build with fixed: userdata size; wifi and bluetooth macaddress; KernelAdiutor with new user interface, graphs and other features; and new/old way of flashing, the way it was done in Kitakat (Omni way). See OP for download...
[Xperia Z1 Compact Original Android Development] Ænimal:
I don't know if it was intended but flashing this update resulted in forced encryption during boot, which failed. Hate to say it bricked my phone since I couldn't mount hence wipe the data partition anymore. Luckily I had an old userdata.img from my aosp flashing days, which I flashed through fastboot. I was able to restore my nandroid, although I still couldn't format data 'manually' in twrp. Will try that again now..

Update: Had to flash twrp from op of this thread:

http://xdaforums.com/sony-xperia-z1-compact/general/twrp-3-0-1-amami-t3350827

in order to format data successfully. Any other build I tried failed to do so.

Since I don't encrypt my devices and never intended to, I kindly ask those who do to step in as testers.

Anyway, thanks OP for your continued hard work.
[Xperia Z1 Compact Original Android Development] optimumpro:
Forced encryption doesn't make sense, as the only number that was changed was the size of a partition. LP 5.1.1 does not have forced encryption.

Ok I'll stop experimenting with encryption since I don't have the device and will repost the rom without userdata.img.
[Xperia Z1 Compact Original Android Development] Ænimal:
I used 'forced' for a lack of a better word to describe what happened during first boot, which ended in a screen notifying me about a failed encryption. Glad you're gonna repost the ROM, as far as I'm concerned:good:
[Xperia Z1 Compact Original Android Development] levone1:
Just curious - did you flash the rom from internal storage or from extsd? I was wondering if it would make a difference. I remember the GB/ICS days, when you would always have to flash from extsd.
[Xperia Z1 Compact Original Android Development] Ænimal:
From extsd this time
[Xperia Z1 Compact Original Android Development] optimumpro:
The rom without userdata.img is posted...
[Xperia Z1 Compact Original Android Development] optimumpro:
He couldn't flash the rom from internal SD, because he was supposed to format internal SD before flashing, which would have wiped the zip file.

I still can't understand why the rom would automatically start encrypting your phone. It is even theoretically not possible. Neither the kernel nor fstab.qcom contains any forceencrypt flag. As a matter of fact, it has 'encryptable', as opposed to forceencrypt, which means capable of being encrypted, but not forcing you...

[MENTION=5478526]Ænimal[/MENTION] Are you sure you didn't flash some other rom that was next to Jaguar (you just tapped the wrong zip file)? There is no way in Hell my rom would start force-encrypting upon boot. I think you accidentally flashed one of MM roms, which do have forceenecrypt.

Regarding TWRP: if your phone is encrypted or started to encrypt and fails in the middle, then you would need to fastboot a different TWRP. My TWRP is designed not to wipe encryption key. Otherwise, every time you format data, you would destroy encryption. The way it should work (and it does on Z1), is that you encrypt only once and then you can upgrade or change roms withou losing encryption
[Xperia Z1 Compact Original Android Development] levone1:
That's kind of why I was wondering. If it was flashed from internal or flashed without wiping, I could easily imagine some kind of issue.
[Xperia Z1 Compact Original Android Development] Ænimal:
I don't know what was zipped exactly inside the zip you posted, but that's what I flashed (I already deleted it, otherwise I could check it for you)

Nevermind, phone is up and running again..
[Xperia Z1 Compact Original Android Development] optimumpro:
Because this zip is done the old Kitkat/Omni way, you can see what's inside. You can also unzip it and delete some apps you don't need, then rezip and flash.. The only difference is: I removed userdata.img and one command in the script that put usedata.img in data. That's all...
[Xperia Z1 Compact Original Android Development] optimumpro:
Quadrooter patches

You have probably read abour Quadrooter vulnerabilities and patches. Well, the August 7 release includes fixes for all 4 of them, because I take the patches directly from Code Aurora, which publishes them before Google...
[Xperia Z1 Compact Original Android Development] katzenkloh:
i am sorry for mentioning the randomizarion of the wlan-mac address isnt working (on my device).

the status (about phone - status) shows the burndin mac-address but doesnt change after a reboot like the hostadress.

if i want to change my mac-address (manually) i have to change it under

"/sys/devices/fb000000.qcom,wcnss-wlan/wcnss_mac_addr"

maybe it is an other path than on the "big" z1 and the reason why it isnt changing.

hopefully this info may help you.
[Xperia Z1 Compact Original Android Development] optimumpro:
As it turns out, Qualcomm's implementation disregards kernel instructions on randomization. So, I would have to modify kernel. It will take some time...
[Xperia Z1 Compact Original Android Development] optimumpro:
This Kernel should fix randomizing WIFI MAC, if enabled in Settings. Unzip and flash in fast boot: fastboot flash boot boot.img
[Xperia Z1 Compact Original Android Development] katzenkloh:
this is off the hook :D

but, i hate myself allways being the guy telling you that there is a problem, i am not possible to connect to any public hotspot (deutsche telecom, btopenzone.com etc.).

if i dont use the randomization und edit '/sys/devices/fb000000.qcom,wcnss-wlan/wcnss_mac_addr' with a '	correct' vendor-header i dont have any problems.

wether this hotspots have a check for an 'official' vender-header, or there is an other problem.

if i use the macchanger coming with nethunter running on my 2012 nexus 7 i dont have any connection problems.

if my information a correct macchanger uses a valid vendor-list so this could be a solution (or it remembers mac-address once seen - from my newbee point of view.
[Xperia Z1 Compact Original Android Development] optimumpro:
Standard randomization does not work, because Sony has a "special" way of setting macaddress. No macchanger (including the one by Chainfire) works on Xperias. A work around is to set a script that will generate mac and echo it to fb000000... and have it executed by Afwall. So, each time you switch from data to wife or on boot, the mac will be different. It is working on my Z1...
[Xperia Z1 Compact Original Android Development] Ænimal:
I saw in the honami thread that ussd codes got fixed, maybe the same fix will work on amami? Thanks
[Xperia Z1 Compact Original Android Development] optimumpro:
@ Ænimal

USSD should work. You, guys, got the later build than Z1 people.
[Xperia Z1 Compact Original Android Development] Ænimal:
It was working on previous builds, now I keep getting this forever (screenshot attached)

EDIT: Just reverted to August 4th build and it's still not working,

must have been the July build where it was last working..
[Xperia Z1 Compact Original Android Development] optimumpro:
USSD never worked in Amami builds, but the last release it started to work for Z1. You should check your apn settings: you might need to update it...
[Xperia Z1 Compact Original Android Development] optimumpro:
To anyone who can't encrypt data partition. If you used TWRP 3 official and did factory reset with it, your data partition was automatically resized to the wrong size and you won't be able to encrypt your phone. Never use factory reset on TWRP. Instead go to advance wipe and choose /System/Data/Cache/Dalvik.

I wouldn't use TWRP 3 anyway, as apart from a different theme and a few user interface changes, it is not suitable for LP 5.1.1. Also, TWRP should have no business resizing user's partition, even if it is the right size.

Here is what you should do to reduce data partition:

Back up your rom, especially Data and Internal SD, because they will be wiped. Go to recovery. Go to Mount and unmount Data/Cache. Then connect your phone to computer. Open terminal and type adb shell. Your prompt should change to '#' indicating your have connected with root right. Then paste this:

1. ls -l /dev/block/platform/msm_sdcc.1/by-name/

It will list your partitions by name. This is to make sure that your userdata is mmcblk0p25. It is 25 on Z1, should be the same on Z1c, but just check to make sure. If it is 25 then next do

2. mke2fs -T ext4 -L data /dev/block/mmcblk0p25 12498624

If it is not 25, then change the 2 digits after mmcblk0p to whatever number your userdata is listed under

The formatting will start. In about 6 seconds it will be done. Now, you can reinstall your rom and encrypt. Whatever you do, if you use TWRP 3, never do factory reset, otherwise your data partition will be screwed again...
[Xperia Z1 Compact Original Android Development] Ænimal:
Would be nice if somebody else here could try it on their phone and report back. I tried everything I can think of so far. Used my old phone to charge my prepaid account for now. (I know it was working before where I could execute the codes to check my account info etc running this ROM.. weird..)
[Xperia Z1 Compact Original Android Development] Ænimal:
No one? Really?
[Xperia Z1 Compact Original Android Development] [GER]Roxxor:
Thanks for the info! Which recovery can you recommend?
[Xperia Z1 Compact Original Android Development] optimumpro:
At the moment, the Amami Jaguar can't be encrypted, but the problem has already been fixed and I will soon post the new build. There is a 2.8.7 TWRP recovery in the download section in this thread that perfectly decrypts Jaguar on Honami. It will also work with the coming Amami build...
[Xperia Z1 Compact Original Android Development] optimumpro:
New Release

New build which includes TWRP 3.0.2 fully working and able to decrypt data partition; you also are able to encrypt your phone plus more. See OP for download and description...
[Xperia Z1 Compact Original Android Development] Ænimal:
Thanks. Clean flashed and ROM's running great (still no ussd though)
[Xperia Z1 Compact Original Android Development] optimumpro:
USSD do work on Honami, confirmed and there is absolutely no difference here between Z1 and Z1c. You do know that you need 2G for ussd to work. if you have Lte/3g only in your settings, ussd won't work...
[Xperia Z1 Compact Original Android Development] Ænimal:
Appreciate you trying to help. For some reason ussd stopped working for me (at least) with the august builds.. I guess I'll have to live with it - no biggy
[Xperia Z1 Compact Original Android Development] [GER]Roxxor:
So I did the switch to your ROM! Works great till now and my phone is finally encrypted(Have to fill up all the space to try to wipe old data; some info will be left in the partitions I cant fill completely, but that should be fine...)!

One bug in the launcher bothers me quite much: Sorting by usage does not work. It keeps the order by alphabet. There is "Catapult" on Fdroid (basically trebuchet from CM 12.1), but this doesn't support Icon themes, which the Slim Launcher does. Both, order by usage and the nice theme "Twelf" from Fdroid are quite essential for a comfortable usage for me.

Would you like looking into the issue? Does maybe somebody have an alternative for me?(keep in mind that I just have FDroid available and prefer free software) Thanks!

Also I cant add photos to my contacts. I can select a photo or take a photo with the camera, but then when adding it to the contact, the apps tells me that there are no pictures on the phone available.

Thank you very much optimumpro! I appreciate that somebody security/privacy concerned is providing a ROM for the Z1 Compact!
[Xperia Z1 Compact Original Android Development] Ænimal:
Here it's working. Make sure you don't disable the 'documents' app, and if you're using privacy guard to let 'contacts' modify your contacts (obviously:o)

I used to go with apex launcher, since it has gestures, and sort by usage was working as well, but it didn't get updated in a long time and I'm quite happy with slimlauncher.
[Xperia Z1 Compact Original Android Development] optimumpro:
I have just added a few photos to my contacts and it worked fine: it shows pictures on both internal and external SDs. So, it is something on your side. If you are using Xprivacy, you probably restricted Dialer/Phone/Systemui from viewing, that's why you can't see photos. Check in View and make sure that android.intent.action.View is unticked.
[Xperia Z1 Compact Original Android Development] optimumpro:
1. If you disable any of the cameras, you wouldn't be able to add photo. So, enable all cameras and then add picture. If both cameras are enabled, then

2. Disable xposed modules (I don't know which ones you use) one by one and try again.
[Xperia Z1 Compact Original Android Development] [GER]Roxxor:
Thanks for the reply! But as in your quote of my post displayed, I solved the issue! I had Gallery deactivated which is required for cropping. I activated it again and the addition of the photo was successful!
[Xperia Z1 Compact Original Android Development] andreimindru96:
Is there anyway to restore headphones buttons functionality and camera button launch? With those two this rom is just perfect:D