yashsingh1/xdaforums huggingface dataset:
[Xperia Z1 Compact Android Development] alex88510:
I have been trying to flash a recovery(twrp) in but having issues.

I flashed your openbootloader in flash mode with flashtool but the output is a little strange...

[color=red]03/019/2017 15:19:54 - ERROR - root : this bundle is not valid[/color]
03/019/2017 15:19:54 - INFO - Selected Bundle for Sony Xperia Z1 Compact (D5503). FW release : 1. Customization : openbootloader
03/019/2017 15:19:54 - INFO - Preparing files for flashing
03/019/2017 15:19:54 - INFO - Please connect your device into flashmode.
03/020/2017 15:20:06 - INFO - Device connected in flash mode
03/020/2017 15:20:07 - INFO - Opening device for R/W
03/020/2017 15:20:07 - INFO - Reading device information
03/020/2017 15:20:07 - INFO - Phone ready for flashmode operations.
03/020/2017 15:20:07 - INFO - Current device : D5503 - CB5A1YA6CC - 1279-6214_R3D - 1272-6084_14.6.A.1.236 - GLOBAL-LTE_14.6.A.1.236
03/020/2017 15:20:07 - INFO - Start Flashing
[color=red]03/020/2017 15:20:07 - ERROR - root : this bundle is not valid[/color]
03/020/2017 15:20:07 - INFO - Processing loader.sin
03/020/2017 15:20:07 - INFO - Checking header
03/020/2017 15:20:07 - INFO - Flashing data
03/020/2017 15:20:07 - INFO - Processing of loader.sin finished.
03/020/2017 15:20:07 - INFO - Loader : S1_Root_6732 - Version : MSM8974_23 / Boot version : S1_Boot_MSM8974_Rhine1.2_LA1.04_19 / Bootloader status : ROOTED
03/020/2017 15:20:07 - INFO - No bootdelivery to send
03/020/2017 15:20:08 - INFO - Flashing preset1.ta
03/020/2017 15:20:08 - INFO - Writing TA unit : [00, 00, 08, 4F, 00, 00, 00, 54, 1A, CE, 28, 00, 01, 00, 06, 05, 00, 02, 02, 51, 00, 10, 03, 00, 02, 04, 02, 05, 00, 01, 03, 02, 00, 10, 05, 00, 03, 03, 05, 00, 10, 05, 00, 05, 83, 02, 00, 10, 02, 00, 05, 85, 0A, 00, 02, 00, A9, 09, BE, BA, A9, 09, 00, 00, 04, 00, 03, 00, 02, 00, 04, 00, 04, 00, B0, 04, 0E, 00, 06, 00, B8, 0B, 01, 4B, 00, 00, 00, 03, 96, 00, 2C, 01]
03/020/2017 15:20:08 - INFO - Writing TA unit : [00, 00, 08, FD, 00, 00, 00, 01, 00]
03/020/2017 15:20:08 - INFO - Ending flash session
03/020/2017 15:20:08 - INFO - Flashing finished.
03/020/2017 15:20:08 - INFO - Please unplug and start your phone
03/020/2017 15:20:08 - INFO - For flashtool, Unknown Sources and Debugging must be checked in phone settings
03/020/2017 15:20:08 - INFO - Device connected in flash mode
03/020/2017 15:20:38 - INFO - Device disconnected

I continue to flash the twrp.img in fastboot mode, but still unable to boot into recovery.

I need the recovery to flash the ext sdcard fix, to enable apps write into the external sdcard.

EDIT:

Tried a rather troublesome way, flashed the boot_cwm.img to get into recovery and do whatever I want to do, and after that, flash the boot.img to boot normally.

This works but I lost root...had to flash the boot.img in recovery and reflash the supersu after that.

Troublesome but it works..:p

Now my apps can write to ext sdcard, and also got myself a good working old aosp browser (can't live without quick controls:laugh:).
[Xperia Z1 Compact Android Development] munjeni:
ERROR - root : this bundle is not valid

That's flashtool issue, ignore it, the rest flashed sucesfully! About twrp, it is working for sure, you probably flashed it to the boot partition instead of recovery partition, do this:

fastboot flash recovery twrp.img

Before you enter into twrp you must completely power down device, than press and hold volumedown button + power button and hold it until you get one vibration, thats it, done.
[Xperia Z1 Compact Android Development] alex88510:
I did flash to the correct recovery partition, otherwise I won't be able to boot normally after that.

And I also did power down the device, hold the volumedown button + power button, and after one vibration, I let go the power button but still, the screen didn't show anything. :confused:
[Xperia Z1 Compact Android Development] munjeni:
But did you wait 5 - 10 secconds? For me that twrp need 5 secconds to become on after I press power+volumedown. Hm maybe your display is an aftermarket? If that one not working for you probably you will need to download an working recovery for your device and flash it to recovery partition.
[Xperia Z1 Compact Android Development] munjeni:
Guys I have found why we can't change country code! After deep analyse I found this:

\brief vos_nv_open() - initialize the NV module

The \a vos_nv_open() initializes the NV module. This function read the binary
file qcom_nv.bin for macaddress,country code,regulatory domain information and etc.

\return VOS_STATUS_SUCCESS - module is initialized successfully
otherwise - module is not initialized
\sa

Thats part of the prima wifi kernel module (curently function unused because of the enabled CONFIG_ENABLE_LINUX_REG):

#ifndef CONFIG_ENABLE_LINUX_REG
/* initialize the NV module */
vStatus = vos_nv_open();
if (!VOS_IS_STATUS_SUCCESS(vStatus))
{
// NV module cannot be initialized
VOS_TRACE( VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_FATAL,
"%s: Failed to initialize the NV module", __func__);
goto err_sys_close;
}
#endif

Anyway if we disable LINUX REG we can't get it working. Solution is to use stock kernel prima.ko module, but I'm in hope I will try to implement some things into our kernel prima from stock prima.ko , this is how things working on stock kernel from Sony:

<3>[ 23.573236] wlan: [1390:F :HDD] Read MiscTA: 11b:11a:11n(20MHz):11n(40MHz):11ac(20MHz):11ac(40MHz):11ac(80MHz)=-1
0:0:0:0:0:0:0
<3>[ 23.573269] wlan: [1390:F :VOS] vos_nv_open: 2_4G set 11b:11a:11n(20MHz):11n(40MHz):11ac(20MHz):11ac(40MHz):11ac(
0MHz)=-180:0:0:0:0:0:0
<3>[ 23.574115] wlan: [1390:F :HDD] Read MiscTA: 11b:11a:11n(20MHz):11n(40MHz):11ac(20MHz):11ac(40MHz):11ac(80MHz)=0:
180:-180:-180:-180:-180:-180
<3>[ 23.574149] wlan: [1390:F :VOS] vos_nv_open: 5G_LOW set 11b:11a:11n(20MHz):11n(40MHz):11ac(20MHz):11ac(40MHz):11a
(80MHz)=0:-180:-180:-180:-180:-180:-180
<3>[ 23.574988] wlan: [1390:F :HDD] Read MiscTA: 11b:11a:11n(20MHz):11n(40MHz):11ac(20MHz):11ac(40MHz):11ac(80MHz)=0:
180:-180:-180:-180:-180:-180
<3>[ 23.575019] wlan: [1390:F :VOS] vos_nv_open: 5G_MID set 11b:11a:11n(20MHz):11n(40MHz):11ac(20MHz):11ac(40MHz):11a
(80MHz)=0:-180:-180:-180:-180:-180:-180
<3>[ 23.575970] wlan: [1390:F :HDD] Read MiscTA: 11b:11a:11n(20MHz):11n(40MHz):11ac(20MHz):11ac(40MHz):11ac(80MHz)=0:
180:-180:-180:-180:-180:-180
<3>[ 23.576006] wlan: [1390:F :VOS] vos_nv_open: 5G_HIGH set 11b:11a:11n(20MHz):11n(40MHz):11ac(20MHz):11ac(40MHz):11
c(80MHz)=0:-180:-180:-180:-180:-180:-180

You can notice sony specific implementation aka Read MiscTA! Sony didn't shared stock kernel prima wifi module and we do not have implementation for Read MiscTA, I will try to implement. That will finaly solve all wifi isues!
[Xperia Z1 Compact Android Development] alex88510:
I did wait for a few seconds, but I don't think I waited for 10 secs though...I'll give it a try.:)

I bought my z1c at Sony store, I don't think they sell aftermarket phone, did they? lol

Regarding the 3G and LTE issues, it still switch between them.

If I turn on the mobile data, let it sit idle, it will stay at 3G.

But once I triggered something that will use mobile data, it will switch to LTE+ (weird, shouldn't it be LTE only? without the plus?):confused:

If I let it idle again, it will switch back to 3G.

Idle at 3G

Triggered mobile data usage
[Xperia Z1 Compact Android Development] munjeni:
Try to use settings menu instead of dialing *#*#*4636#*#* for setting prefered network mode
[Xperia Z1 Compact Android Development] Rafaru:
Hello , I'm trying to enter recovery but no way , openloader installed , twrp.img also but every time phone reboots but can not enter recovery , any help please ???
[Xperia Z1 Compact Android Development] mikk_11:
I can confirm. I still have the same problem.
[Xperia Z1 Compact Android Development] jharvey208:
So, installed this ROM to test for any battery drain issues since my battery wouldn't last a day using AICP. Firstly on first boot, I noticed the setup wizard didn't load (black screen and nothing else) so I rebooted and came on. I never got to go through the WiFi setup in the setup wizard either so left with 3G to configure Google account etc. FM radio is something I'm likely to never touch so not fussed at that at all. Does take a while to gain mobile internet connectivity. A slight bit more lag was noticed when using this ROM compared to AICP. On the upside, don't have to enable 'disable HW overlays' when using some apps.
[Xperia Z1 Compact Android Development] alex88510:
I set it with settings menu actually, just open up that dialing page for better info about the signal strength.:)

EDIT:

For the twrp recovery, I tried waited for 20secs, still nothing.

EDIT 2:

During my investigation on a crashed app, I noticed there is a selinux denied on my antivirus app.

09-04 14:39:41.601 5877 5877 W com.bitdefender.security: type=1400 audit(0.0:1549133): avc: denied { getattr } for comm=4173796E635461736B202335 path="/mnt/media_rw" dev="tmpfs" ino=2956 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:mnt_media_rw_file:s0 tclass=dir permissive=0 ppid=508 pcomm="main" tgid=2392 tgcomm="fender.security"
09-04 14:39:41.601 5877 5877 W com.bitdefender.security: type=1400 audit(0.0:1549134): avc: denied { getattr } for comm=4173796E635461736B202335 path="/mnt/media_rw" dev="tmpfs" ino=2956 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:mnt_media_rw_file:s0 tclass=dir permissive=0 ppid=508 pcomm="main" tgid=2392 tgcomm="fender.security"
09-04 14:39:41.601 5877 5877 W com.bitdefender.security: type=1400 audit(0.0:1549135): avc: denied { getattr } for comm=4173796E635461736B202335 path="/mnt/media_rw" dev="tmpfs" ino=2956 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:mnt_media_rw_file:s0 tclass=dir permissive=0 ppid=508 pcomm="main" tgid=2392 tgcomm="fender.security"
09-04 14:39:41.601 5877 5877 W com.bitdefender.security: type=1400 audit(0.0:1549136): avc: denied { getattr } for comm=4173796E635461736B202335 path="/mnt/media_rw" dev="tmpfs" ino=2956 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:mnt_media_rw_file:s0 tclass=dir permissive=0 ppid=508 pcomm="main" tgid=2392 tgcomm="fender.security"

Appreciate if you could include this in.

EDIT 3:

Apparently found a way to enter recovery.

When the phone started to boot, when the LED lights up(white color?), hold down the volumedown button, and the LED will turns orange.

Then it will boot into recovery.
[Xperia Z1 Compact Android Development] munjeni:
So twrp boot when you press volume button on red led boot, it switches to orange and it boot? Guys do you have latest bootloader? It might be isue in case you have old one. Download latest ftf for z1c, install everything (exclude cache, userdata, system, fota-reset.ta, simlock.ta), it will give you the latest bootloader, I am in hope twrp will start working.
[Xperia Z1 Compact Android Development] munjeni:
Ril isues, ok. I will try my best to use stock ril and stock wifi, got stock ril but it curently fail to start (caused by no /dev/socket/rild socket), need to investigate about how that socket is created and hope stock ril start working. About wifi, in case I didn't implement semc wifi things into prima wlan I will use stock pronto_wlan.ko kernel module.
[Xperia Z1 Compact Android Development] munjeni:
I not like when an app read my external storage! I have no idea what your antivirus want in external storage. If you trust that app simple disable enforcing mode (open boot.img with hex editor and simple change command line string "enforce" to "permissive", be carefull to not modify file size of the boot.img!)
[Xperia Z1 Compact Android Development] alex88510:
It is white color LED. When the phone first turned on, red LED first lid up, and then it will changed to white color, and that's when the volumndown button has to be pressed to make it orange color.

Will there be any issues if I chose not to upgrade the bootloader(if I'm using the old one)? I switched from your old kitkat rom directly to this(skip lollipop).

I have no idea too. The antivirus seems working fine and hasn't prompt any issues. Guess I will just leave it.

I don't like the idea of permissive selinux. :)

BTW, do you know any aosp browser that works perfectly in this rom?

Mine works but it has some glitches that annoys me a little.
[Xperia Z1 Compact Android Development] munjeni:
Don't know realy, i'm using browser from LOS and to be honest I not like it, din't tried aosp browser.

I'm not sure if recovery working on oldest bootloaders, I'm not sure if I have new or old one. Try use emma to open recovery in bootloader, please folow sony site about it, maybe emma will detect something and try to fix
[Xperia Z1 Compact Android Development] alex88510:
I think I will grab a copy of the aosp browser from a cm/LOS 14 rom and see if it works.

For the recovery, the twrp recovery actually is working in my case. I even flashed a couple of files with it.

I noticed nothing different than yours except the method to boot into recovery.

I think I will stick to this as this doesn't require me to completely power off the device before booting into recovery.
[Xperia Z1 Compact Android Development] heorung:
I'm using Samsung Internet Browser , fast , smooth and you can install it on PlayStore.
[Xperia Z1 Compact Android Development] alex88510:
I'm not looking for any good browser, I'm looking for a browser that has the "Quick Controls" feature from the old aosp browser.

As far as I know, aside from aosp browser(and any browsers that is based on it), none others have this feature, which is very disappointing.

But thanks anyway.
[Xperia Z1 Compact Android Development] MozkoZrout:
Hello so i have returned and i am currently using this rom and it is indeed marvelous. Havent found any problems and battery life is maybe even better than on stock lollipop. The camera is interesting, the stock app is good quality but a bit laggy, but in open camera everything is smooth so i guess it is only app problem. Also some 3rd party apps that uses camera, such as companion app for ps4 game "Thats you !" can have problems. It worked but it was extremely laggy. Also i would like to ask if there is any way of installing sony camera app or any other camera app that would be close in terms of quality and possibilities. If anyone already asked about it, i am sorry, but i havent noticed anything.
[Xperia Z1 Compact Android Development] levone1:
This should work fine - https://xdaforums.com/crossdevice-dev/sony-themes-apps/port-stock-camera-nougat-roms-t3628791, (I tested it on a different LOS). Full-featured Sony camera, but I don't know if the quality of pictures will be any better. Seems like built-in rom stuff usually controls that more than anything else.
[Xperia Z1 Compact Android Development] munjeni:
fixed some bugs:

1. black screen before bootanimation

2. wifi regulatory domain, now selecting wifi region working and channels 12 and 13 can be enabled based on region

3. ril going to use from stock rom (if I get luck to solve no rild socked)

when I fix ril I will make new build!
[Xperia Z1 Compact Android Development] munjeni:
camera worked perfectly before I updated kernel camera module, I will revert that commit. I have noticed that camera crash when in video mode I tap on screen
[Xperia Z1 Compact Android Development] MozkoZrout:
Hmm dunno, I havent noticed any changes between previous and this build, also it works fine for me when i tap on screen in video mode

---------- Post added at 10:30 AM ---------- Previous post was at 10:25 AM ----------

Thank you so much, it really works perfectly, it is smooth and even the most of the camera apps works
[Xperia Z1 Compact Android Development] munjeni:
but thats framework from june, outdated, there is many changes in framework between june and september, probably you can get more problems than benefits, if you notice bugs please don't report. I accepting bugs on clear rom, mods not interesting me, so guys if you have mods on this rom please do not report bugs!
[Xperia Z1 Compact Android Development] BEDAMATI MAHANAND:
I am unable to download anything from any browser.

every time download fails.the download doesn't even start.
[Xperia Z1 Compact Android Development] Frunzdoedel:
Work's fine here. Maybe select the download destination for your browser.
[Xperia Z1 Compact Android Development] AreusShow:
??Rom

And this camera can be put on other firmware,such as AISP?
[Xperia Z1 Compact Android Development] munjeni:
Works fine here! You probably denied application to access storage, chech permissions in app settings!
[Xperia Z1 Compact Android Development] munjeni:
One good news trought, got stock ril on this rom! Bad thing, the same lte-3g random switches at start, all that things is probably not ril related, it looks like problem in framework :) Stock rom have some many more services related to radio, when I get time I will try to add in combination with stock ril

Another good news, got my replacement battery, now like new phone lol
[Xperia Z1 Compact Android Development] BEDAMATI MAHANAND:
i have allowed the storage access.
[Xperia Z1 Compact Android Development] mrbun9l3:
android beam is working very slow (file transfer between two phones) it takes few times more time than on stock rom - [MENTION=4120742]munjeni[/MENTION] can you check this ?
[Xperia Z1 Compact Android Development] munjeni:
Apsolutly no problem with downloads. Im believing that you have installed some mods which breaks our rom, try without mods.
[Xperia Z1 Compact Android Development] munjeni:
I need dmesg + logcat while you transfering things, without log I can't know whats going on!
[Xperia Z1 Compact Android Development] gedel wind:
hi, my phone always reboot after i take screenshot and open my screenshoot via notification.
[Xperia Z1 Compact Android Development] munjeni:
Which mods you have installed? I'm using screenshoot feature almost every day, no one day got reboot caused by screenshoot
[Xperia Z1 Compact Android Development] mrbun9l3:
logs as attachment
[Xperia Z1 Compact Android Development] zlata:
Hey. Got ghost touches from time to time. Sometimes i cant leave play store,it keeps "pressing" something. Same with sms, keep on opening the same sms.

P.S. I use 28.08 build. Flashed by the book.

Have a nice day.
[Xperia Z1 Compact Android Development] alex88510:
Hi, I think I found a bug but I'm not sure whether it is the one stated as fixed...

Today, when I went to another country, and switched to another country's SIM card, the phone does not auto-connect to the telco radio signal.

I tried manually search any network operators, the correct telco service shows up all right but whenever I tap on it, it only said "Couldn't connect to the network...please try again later" or something similar.

This error message shows on every telco services that showed up.

When I tried the "Choose automatically" feature, it said registered successfully, but in fact, it isn't.

Occasionally, it seems connected but it shows roaming....which is wrong as that is the local telco SIM card...:eek:

Maybe I was very closed to the country border, and it somehow connected to the previous telco in the previous country?

Under stock rom, sometimes it won't auto connect to the right telco signal(using the exact SIM card as this time), but manually search and tapping on the correct one always work.

I didn't catch the log for it as I'm quite panic that time, thought it won't work and I need the phone data services...:crying:

After a while, I decided to try one last thing, which is the network setting reset.

It doesn't work so I gave up and leave it.

A while later(may be....10~20mins?), when I checked it again, it connected to the right telco service and work as normal.

I'm not sure if this is the same issue as the "Can't change prefered network" bug that is already fixed.

I'll see if I can re-trigger it and capture a log...which log should I get? logcat?:confused:
[Xperia Z1 Compact Android Development] munjeni:
Water on you display? Dirty display?
[Xperia Z1 Compact Android Development] munjeni:
Thanks, I will look later
[Xperia Z1 Compact Android Development] munjeni:
I'm curently in proces of moving to stock ril, hope I get all things need for stock ril!
[Xperia Z1 Compact Android Development] zlata:
Nope. Clean as f***. No one else have so maybe its isolated case.
[Xperia Z1 Compact Android Development] chris2017@xda:
Hi munjeni,

I live close to a border and face exactly the same problems as alex88510 with almost all ROMs I have tested (aicp, various lineage/canogenmod ROMs). The only exceptions are Paranoidandroid MM and AOSP N, but their camera quality is bad.

I have tried to build SpiritCroc's AICP, which is a very nice ROM, with stock RIL, but I am new to Android building and could not solve the problem.

I am confident that you'll solve it, because I can already access the SIM card contacts (which i could not on all other ROMs with the roaming problems). Thanks for all your efforts! I really appreciate it. It takes me 1/2 day to build one ROM on my slow computer . Not to speak of all the time it takes a newbie like me to understand the basics ;)
[Xperia Z1 Compact Android Development] munjeni:
Water inside phone (in case you used your phone in water last few months)? I have no other ideas
[Xperia Z1 Compact Android Development] munjeni:
Ok, I have some free time on weekend and I will try to clear logcat -b radio errors, going to use stock ril and some services to add to ramdisk, hope I solve that. Problem is the same errors while using stock ril too which indicate that problems seems in frameworks...
[Xperia Z1 Compact Android Development] chris2017@xda:
Thanks very much, munjeni. Should I upload a logcat of the time when I try to change the network operator?
[Xperia Z1 Compact Android Development] nhicko95:
if you gonna add oms support i gonna switch to this rom right away cuz it have a kcal and(oms support) if you gonna add it
[Xperia Z1 Compact Android Development] munjeni:
Guys I acidentaly deleted device tree from my hard drive, all changes and work which I done is lost, only kernel is saved on my git :( , I must abandon this LOS, I can't start from begining omg :(
[Xperia Z1 Compact Android Development] jharvey208:
Recovery tools? I use ease us data recovery
[Xperia Z1 Compact Android Development] Arthur4ik:
oh i accidentally unsubscribed from this Thread
[Xperia Z1 Compact Android Development] foresto:
Oh, no!

Can the device tree info be recovered from a running build? Anything useful in /proc/device-tree or /sys/firmware/devicetree/base? Maybe a tool can help recover the dts?

dtc -I fs -O dts /sys/firmware/devicetree/base
[Xperia Z1 Compact Android Development] munjeni:
Kernel is ok its on my git! I can start again but all work which I done to wifi and ril is gone, I'm lazy to start from beginning, if I somehow start again it will be android oreo from aosp
[Xperia Z1 Compact Android Development] nhicko95:
do it do oreo on z1c
[Xperia Z1 Compact Android Development] sugnuf:
Really bad news. And, i know how You can feel. Same **** happens to me few times. Take same break and after some time, it should be better.

Anyway You done excellent job - imho best firmware for this phone. I hope You will continue this work.
[Xperia Z1 Compact Android Development] munjeni:
I will upload new build from 2 days ago (partialy fixed wifi with working country region selector from wifi settings. Using iw tool country can't be changed, thats why I say partialy working). Fix for black screen before bootanimation, and many more tryfixes, hope something is not broken in that dirty build. One more thing made me crazy, 2 days ago I got stock ril working, but yesterday I have tried it again and tried almost everything without any luck getting that stock ril again, that was a lot of work and reason why my device tree got deleted acidentally :(