yashsingh1/xdaforums huggingface dataset:
[Sony Xperia XA ROMs, Kernels, Recoveries, & Other ] Matty1993:
Cheers for the kmsg thats very helpful :D that should help somewhat i think i need to study sonys systems somewhat as ril seems to be slightly diff,

Oh im from australia also :D completely up to you if you want to have it sent to me would be detrimentally alot better as ill have something in front of me to debug instead of working blind as a bat lol if you confirm that he will send it to me pm me and ill send you my address,

With the red borders i thought it was because i left the the ro.adb.quemu set to =1 but if it was there previously this is a HW composer issue try disabling HW overlays or the HW composer itself and it should go away as ive has this issue on LineageOS 15.0 for samsung G930F :D

Corrupt SD cards are also to do with the mounts in the fstab i had this issue on an MT6572 running 4.4.4 i managed to get android 7.1.2 running on it but was receiving SD corrupt on sd cards that werent even there, what i had to do was set the rootfs mount as

rootfs / rootfs ro,commit=1,noauto_da_alloc wait

at the very top aswell as setting the internal storage mount as

/devices/platform/mtk-msdc.0/mmc_host* auto vfat defaults voldmanaged=sdcard:auto,emulatedsd,noremovable

Which seemed to clear it up for me but each device is diff for the mounts so may not work but i thought id share the info anyways :)
[Sony Xperia XA ROMs, Kernels, Recoveries, & Other ] dzupert:
it can not be started?

What is the password?
[Sony Xperia XA ROMs, Kernels, Recoveries, & Other ] andrw.gldmn:
to remove red blinking borders you should in build.prop change from

eng

to

user
[Sony Xperia XA ROMs, Kernels, Recoveries, & Other ] Matty1993:
Hey guys been sick with the flu so not been on lately,

Still sick but can get out of bed now at least haha

Any progress with the Ril ?? :)
[Sony Xperia XA ROMs, Kernels, Recoveries, & Other ] bigrammy:
I noticed that the stock rom created a system link to the vendor/etc/mddb (eg: Stock ROM has /system/etc/mddb as well) so I created the same link on Andy's last build.

symlink("/vendor/etc/mddb", "/system/etc/mddb");

but I didn't notice any difference in operation unless it requires other permissions or maybe selinux stuff to function :o

So looking through the updater script I see different permissions on things this is where I start to become confused as I am not sure which permission is been used

Stock has it like this so I have highlighted in red some differences between /system and /system/vendor. Not sure if this makes any difference but just in case.

/system

set_metadata("/system/etc", "uid", [COLOR="Red"]0[/COLOR], "gid", [COLOR="red"]0[/COLOR], "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");

/system/vendor

set_metadata("/system/vendor/etc", "uid", 0, "gid", [COLOR="red"]2000[/COLOR], "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");

EDIT: Getting confused with */firmware's

So does mddb get "gid" 2000 or gid "0" since it's linked :eek: :eek:

Matty1993

Did you get my PM i sent you some time back?
[Sony Xperia XA ROMs, Kernels, Recoveries, & Other ] Matty1993:
the mdbb shouldnt affect the ril as its only the BPLGUI info for the modem, i quite frequently leave it out on some builds and dosent affect the operation of ril or telephony

But that definitely shouldnt be like that in the updater script, it should have gid 2000 and not 0 try placing a # at the start of the gid 0 line to void it from being processed when flashing see if it makes any differenece,

Havent checked pm yet but ill check now :)
[Sony Xperia XA ROMs, Kernels, Recoveries, & Other ] bigrammy:
How Extract NVRAM image

Hi,

I came across this post by HERE by [MENTION=7719362]TRXteam[/MENTION] who did a lot of dev work on the Sony M5 (MediaTek).

I thought I would give the above a try but I am having difficulties getting the files from /nvram to replace the ones in /nvdata

On my older devices I am sure the /NVRAM was mounted using ext4.

It does seem to make some sense that maybe not all the needed files are been loaded in to /nvdata from /NVRAM

Any Ideas anyone??
[Sony Xperia XA ROMs, Kernels, Recoveries, & Other ] pate194800:
Best rom for XA

Been waiting for Lineage for a while now. Finally it is happening. Everything that I need seems to be working. Great news! :good:
[Sony Xperia XA ROMs, Kernels, Recoveries, & Other ] Ryuzaki07:
i guess u are not using Ril then?
[Sony Xperia XA ROMs, Kernels, Recoveries, & Other ] Matty1993:
Yeah ril does not work so i hope you dont want to make calls sms or go on the internet with mobile data.

I should have another build up for you guys in a day or two see if we can get this ril sorted out havent had any luck on finding an XA for a test device but ive been keeping a look out, in meantime ive been studying sony ril system which is very diff to normal mtk structure to say the least.

Anyway ill post link up here when its uploaded.

---------- Post added at 01:44 AM ---------- Previous post was at 01:37 AM ----------

Usually nvram is mounted under emmc only on yaffs and ubifs sub systems is it supposed to use the block mount as far as i know, nvram is protected also from corruption on sonys as it uses whats called an OTP imei which is corruption protected,

But if you wanted to try you could install your stock rom copy all the NV data files

Then make a folder in the root dir of rom folder containing all the files you copied, all youd need to do then is added them to the updater script to be extracted to the path. If your keen ive done it before on a ubifs model so i could zip and upload so you could use for reference if you wanted :)
[Sony Xperia XA ROMs, Kernels, Recoveries, & Other ] bigrammy:
Cheers Matty,

I already tried a nvram and nvdata restore from the stock rom and it did not appear to make any diff sadly :(

Hopefully your investigation will result in the missing part of the puzzle with this Sony ril implementation :fingers-crossed:

Just look HERE there are plenty of used ones around the $90 mark it will make things easier fro you and my pm still stands. ;)
[Sony Xperia XA ROMs, Kernels, Recoveries, & Other ] Matty1993:
What i had to do was copy /data/nvram add it to bin/data/nvram in /tmp of zip set it in the script but i also had to add for flash in script NVRAM.file & PRO_INFO.file as only copying /data/nvram and flashing wouldnt restore imei but with PRO_INFO & NVRAM also being flashed through script imei is there on first boot, if you dont have PRO_INFO it will be MOBILE_INFO you may also additionally need to have the nodl_protect_f and nodl_protect_s files and flash them also through the updater script.

Anyhow Will have test build up soonish guys, hopefully from my studying of sony something will happen this time lol currently zipping it up now,

I looked at the updater script it seems that all of the /vendor/bin/ files have no toolbox or toybox allocation to them in the script so what ive done is taken the nvram daemons aswell as a few others and copied them instead of replacing them to /system/bin then set them in updater script to receive toolboxing or toyboxing,

Ive also copied the nvram libs and ril libs from etc and copied them to /system/lib as ive always had major problems running nvram libs from /vendor/ but this is treble build so i only copied them same with /vendor/etc/init/init.mal.rc ive copied this to /system/etc

Ive completely moved MDBB from vendor to /system/etc also

Ive also chirped up the build.prop in regards to only telephony this time,

I have completely removed the following as its been known to cause me service, imei & sim errors

/vendor/etc/ipsec

/vendor/etc/init/init.wod.rc

/vendor/lib/libmal_epdga so

/vendor/lib64/libipsec_ims_share.so

/vendor/lib64/libmal_epdga.so

/vendor/lib64/libwfo_jni

I also did notice that the init.mal.rc is already in the boot.img though along with the init.wfca.rc so i dont know if this will cause ril errors but i know wfca does on AOSP i just them all unedited though only copied

Build is zipped and im just waiting for it to upload :)

---------- Post added at 07:36 AM ---------- Previous post was at 06:58 AM ----------

New test build is here if someone wants to give it a go :)

https://drive.google.com/file/d/1i59aewm_jlAtEl3G-HLroLvC35fE8Fxh/view?usp=drivesdk
[Sony Xperia XA ROMs, Kernels, Recoveries, & Other ] bigrammy:
Thanks Matty :good:

I literally just flashed back to stock so I could compare and try spot any diff's or if something was missing. :o

I will just grab a few tar up's from the Stock ROM then flash your Tuba_Ril_Test.zip

I will edit this post with the results after flashing it. :fingers-crossed

REPORT EDIT: OK I did a relatively dirty flash and we have no signal, no sim card detection no imei no baseband info etc it's basically the same as the first builds.

Adding the rilproxy will I suspect populate this missing info as before but not tested that yet.

I did notice something a little strange while running logcat at boot up and spotted that vold is trimming these

05-03 10:56:29.392 317 1036 I vold : Trimmed 9834901504 bytes on /data in 401ms
05-03 10:56:29.392 317 1036 D vold : Starting trim of /cache
05-03 10:56:29.393 826 1034 D VoldConnector: RCV <- {662 /data 9834901504 401921616}
05-03 10:56:29.398 826 826 D WifiStateMachine: fst disabled
05-03 10:56:29.403 317 1036 I vold : Trimmed 199557120 bytes on /cache in 10ms
05-03 10:56:29.403 317 1036 D vold : Starting trim of /protect_f
05-03 10:56:29.403 826 1034 D VoldConnector: RCV <- {662 /cache 199557120 10511154}
05-03 10:56:29.411 317 1036 I vold : Trimmed 6041600 bytes on /protect_f in 7ms
05-03 10:56:29.411 317 1036 D vold : Starting trim of /protect_s
05-03 10:56:29.411 826 1034 D VoldConnector: RCV <- {662 /protect_f 6041600 7601385}
05-03 10:56:29.416 317 1036 I vold : Trimmed 7593984 bytes on /protect_s in 4ms
05-03 10:56:29.416 317 1036 D vold : Starting trim of /nvdata
05-03 10:56:29.416 826 1034 D VoldConnector: RCV <- {662 /protect_s 7593984 4899461}
05-03 10:56:29.417 826 826 D HS20 : Passpoint is enabled, false
05-03 10:56:29.420 317 1036 I vold : Trimmed 21590016 bytes on /nvdata in 4ms
05-03 10:56:29.421 317 1036 D vold : Starting trim of /persist
05-03 10:56:29.421 826 1034 D VoldConnector: RCV <- {662 /nvdata 21590016 4177923}
05-03 10:56:29.422 317 1036 I vold : Trimmed 0 bytes on /persist in 0ms
05-03 10:56:29.422 317 1036 D vold : Starting trim of /rca
05-03 10:56:29.426 826 1034 D VoldConnector: RCV <- {662 /persist 0 493923}
05-03 10:56:29.430 317 1036 I vold : Trimmed 10181632 bytes on /rca in 7ms
05-03 10:56:29.430 317 1036 D vold : Starting trim of /idd
05-03 10:56:29.430 826 1034 D VoldConnector: RCV <- {662 /rca 10181632 7535923}
05-03 10:56:29.440 317 1036 I vold : Trimmed 14064640 bytes on /idd in 10ms
05-03 10:56:29.441 826 1034 D VoldConnector: RCV <- {662 /idd 14064640 10494692}

Is this normal :confused:

I will now do a clean flash formatting data and cache to see if this makes any difference. :fingers-crossed:

EDIT: Sadly still the same no signal baseband imei sim card etc etc. :crying:

PS Let me know what specific log's you want or need I will keep it as is until you reply.

:)
[Sony Xperia XA ROMs, Kernels, Recoveries, & Other ] DarkBlood.:
Looking at errors in Here

It seems that tadif fails to connect to tad.

After a bit of reverse engineering.

tadimport calls miscta_read_unit(from libmiscta.so) which creates a ta request and tries to send it to socket "tad", but fails because the socket doesn`t exist.

On stock that socket is created by tad_static(found in /sbin) which is invoked by init.sony-trimarea-tad.rc
[Sony Xperia XA ROMs, Kernels, Recoveries, & Other ] Matty1993:
In that log it appears that /data/nvram/ is failing on the mk dir for file_ver due to permission denied aswell as /data/nvdata/calibration is also receiving permission denied, you seem to be right about the tad aswell it may possibly need a shim introduced to create the socket to bind to, that log states that radio HW is initializing though so thats a positive in some aspects i guess,

Was that log from my previous build i posted ? Only ask as i noticed the ro.boot.md5 stuff etc which dosent seem to be initiating.

---------- Post added at 04:36 AM ---------- Previous post was at 04:34 AM ----------

All good :) trims normal as the partitions are all managed through vold as sony uses OOB device encryption if you want to change that you just change the ro.storage_managed=1 to =0

Any chance you can upload the full log to a .txt file so i can go through it to see whats not working :) i was hopeing something would happen this time but i guess its back to the drawing board again aha
[Sony Xperia XA ROMs, Kernels, Recoveries, & Other ] bigrammy:
:good:

I will grab what I can and upload them all. :good:

Thanks to everyone involved for their continued efforts & hopefully we can find the missing piece in this jigsaw. :fingers-crossed:

EDIT: Logcat from boot up time HERE

Ksmg log HERE

Do you need Tombstones or anything like that?

[MENTION=9139800]Matty1993[/MENTION]

EDIT 2: adb bugreport zip maybe more useful as it seems more detailed and structured but pretty big. 6MB packed.

HERE

EDIT 3: Some NVRAM errors regarding RiL and ccci_mdinit from bugreport-tuba.zip/FS/data/misc/logd/Logcat.044.

5-03 10:44:51.063118 381 381 I [COLOR="red"]CCI[/COLOR]NVRAM: ===========Nvram Deamon status: WAITING=========== ([COLOR="red"]CCi[/COLOR] are the device manufacturer I believe)
05-03 10:44:50.945895 380 380 I NVRAM : [[COLOR="Red"]SoMC EPDG[/COLOR]] (Modem Config Path) /oem/modem-config/modem.conf
05-03 10:44:50.945946 380 380 I NVRAM : [[COLOR="red"]SoMC EPDG[/COLOR]] Modem Config Open Fail
05-03 10:44:50.945971 380 380 I NVRAM : [[COLOR="red"]SoMC EPDG[/COLOR]] Modem Property: , Modem Config:
05-03 10:44:51.068762 380 380 I NVRAM : [[COLOR="red"]SoMC EPDG[/COLOR]] Operator Config Count: 14
05-03 10:44:51.068824 380 380 I NVRAM : [[COLOR="red"]SoMC EPDG[/COLOR]] pFinalModemConfig: (null)
05-03 10:44:51.068860 380 380 [COLOR="red"]E[/COLOR] NVRAM : libnvram_daemon_callback : ro.sony.fota.default_modem =
05-03 10:44:51.068891 380 380 [COLOR="red"]E[/COLOR] NVRAM : libnvram_daemon_callback : ro.cei.customer_projectid = 0
05-03 10:44:51.068919 380 380 I NVRAM : libnvram_daemon_callback - getFotaModemProperty: ro.sony.fota.default_modem empty
05-03 10:44:51.068944 380 380 [COLOR="red"]E[/COLOR] NVRAM : libnvram_daemon_callback - my_callback : mGetModemProperty = 0
05-03 10:44:51.068969 380 380 [COLOR="red"]E[/COLOR] NVRAM : libnvram_daemon_callback - my_callback : not need to call writeSbpNvram
05-03 10:44:51.069075 380 380 I NVRAM : libnvram_daemon_callback - BOOT_SYS_PROPERTY = 0
05-03 10:44:51.087404 380 380 [COLOR="red"]E[/COLOR] NVRAM : libnvram_daemon_callback : property_set = 0
05-03 10:44:51.087469 380 380 [COLOR="red"]E[/COLOR] NVRAM : libnvram_daemon_callback : persist.operator.optr = OP255
05-03 10:44:51.087506 380 380 [COLOR="red"]E[/COLOR] NVRAM : libnvram_daemon_callback : property_get = 5, OP255
05-03 10:44:51.087534 380 380 [COLOR="red"]E[/COLOR] NVRAM : libnvram_daemon_callback - my_callback : mGetModemProperty_1 = 0
05-03 10:44:51.087556 380 380 [COLOR="red"]E[/COLOR] NVRAM : libnvram_daemon_callback - my_callback :modem_config==NULL
05-03 10:44:51.087581 380 380 I NVRAM : ... CUST_ACTIVE_CONFIG does not exist.
############# ## ccci_mdinit ############################
05-03 10:44:51.177631 348 348 E (2)[348:ccci_mdinit]fs_mgr: Warning: unknown flag [COLOR="red"]encryptablet[/COLOR]=/dev/block/platform/mtk-msdc.0/11230000.msdc0/by-name/metadata (Spelling error leads to [B]unsupported![/B] flag)
05-03 10:44:51.174379 348 348 D ccci_mdinit(1): ro.crypto.state=unsupported
05-03 10:44:51.174497 348 348 D ccci_mdinit(1): unsupported!!

Plenty of other ccci_mdinit stuff in the Logcat.044
[Sony Xperia XA ROMs, Kernels, Recoveries, & Other ] Matty1993:
To easy ill have a look at it all today and see what i can do about the errors

Oh i also noticed right at the very end of the log also it states meta-data has wrong spelling in its flag which is labelled as encryptablet= when it should be encryptable= i didnt edit boot.img on last build i just left it as stock so ill open it up and fix the flag in boot.img aswell and ill patch it with busybox and create an init.rc to manage it just to help things along ill also check the init.mal.rc, init.volte.rc, init.epdg.rc and ill also check the modem.rc to make sure they are listing and running the correct paths and permissions for the ril.
[Sony Xperia XA ROMs, Kernels, Recoveries, & Other ] andrw.gldmn:
f#ck me.. I had remembered that I was editing a ramdisk to resolve some errors with Sony binaries and forgot to add some root/system groups. Also sepolicy should be fixed too (unix_socket_connect, set_prop, etc.):silly::eek:
[Sony Xperia XA ROMs, Kernels, Recoveries, & Other ] andrw.gldmn:
so maybe on Saturday or on Sunday I will rebuild los in view of these things
[Sony Xperia XA ROMs, Kernels, Recoveries, & Other ] andrw.gldmn:
fixed. but still rilproxy fatal crash with inserted sim.
[Sony Xperia XA ROMs, Kernels, Recoveries, & Other ] DarkBlood.:
Can you send me logs?
[Sony Xperia XA ROMs, Kernels, Recoveries, & Other ] andrw.gldmn:
https://gist.github.com/andrwgldmn/cca63b700a33eebb8b07326d2570ed67 (logcat -b all)

https://gist.github.com/andrwgldmn/cff6f33f1f3361b9cfc281633d75618b (tombsones 00)

https://gist.github.com/andrwgldmn/4ed9e8ab94bd07328748f2a4cee34336 (tombsones 01)

https://github.com/SonyCustoms (branch "rebase")
[Sony Xperia XA ROMs, Kernels, Recoveries, & Other ] Matty1993:
Seems it cant read the sw_version_info_file

I/bs_updatemiscta( 398): Version info filename defaulted to: /version

W/bs_updatemiscta( 398): read_sw_version_info_file: Can not open file: '/version'

Seems to be an issue with muxd also but rild daemon is starting ok

I/ccci_mdinit( 346): MD1 set status: mtk.md1.status=ready

E/RILMUXD ( 695): 3727:main(): Enter

E/RILMUXD ( 695): 3904:main(): /vendor/bin/gsm0710muxd $Rev: 1 $ starting

D/RILD ( 729): **RIL Daemon Started**

D/RILD ( 729): **RILd param count=1**

Theres no library for semcrilextension.jar

W/PackageManager( 878): Library not found: /system/framework/semcrilextension.jar

Oh and unrelated but theres also these below also that probably should get some attention

W/PackageManager( 878): Destroying /data/app/mcRegistry due to: android.content.pm.PackageParser$PackageParserException: Missing base APK in /data/app/mcRegistry

I/pm_critical_info( 878): Destroying /data/app/mcRegistry due to: android.content.pm.PackageParser$PackageParserException: Missing base APK in /data/app/mcRegistry

There are quite a few package manager warning also you maybe want to take a look at aswell regarding permissions etc to many to list.

You also have an unknown process running somewhere with pid 906 that the system is killing off

W/ProcessCpuTracker( 878): Skipping unknown process pid 906

This also seems to be the problem with your vold having corrupt sds in storage menu also

D/VoldConnector( 878): RCV <- {653 public:179_32 }

D/VoldConnector( 878): RCV <- {654 public:179_32 sdcard0}

D/VoldConnector( 878): RCV <- {656 public:179_32 /mnt/media_rw/public:179_32}

D/VoldConnector( 878): RCV <- {655 public:179_32 /mnt/media_rw/public:179_32}

I/fsck_msdos( 319): ** /dev/block/vold/public:179_32

E/fsck_msdos( 1394): Invalid signature in boot block: ffff I/fsck_msdos( 319): fsck_msdos terminated by exit(2)

E/Vold ( 319): Filesystem check failed (not a FAT filesystem)

E/vold ( 319): public:179_32 failed filesystem check D/VoldConnector( 878): RCV <- {651 public:179_32 6}

D/VoldConnector( 878): RCV <- {400 11 Command failed}

D/VoldConnector( 878): SND -> {12 volume mount public:179_64 0 0}

V/vold ( 319): /system/bin/blkid

V/vold ( 319): -c

V/vold ( 319): /dev/null

V/vold ( 319): -s

V/vold ( 319): TYPE

V/vold ( 319): -s

V/vold ( 319): UUID

V/vold ( 319): -s

V/vold ( 319): LABEL

D/VoldConnector( 878): RCV <- {651 public:179_64 1}

V/vold ( 319): /dev/block/vold/public:179_64

E/vold ( 319): Failed to pclose /system/bin/blkid -c /dev/null -s TYPE -s UUID -s LABEL /dev/block/vold/public:179_64 : No data available

W/vold ( 319): blkid failed to identify /dev/block/vold/public:179_64

V/vold ( 319): /system/bin/fsck_msdos

V/vold ( 319): -p

V/vold ( 319): -f
[Sony Xperia XA ROMs, Kernels, Recoveries, & Other ] andrw.gldmn:
I don’t care about vold ‘cause sdcard is working.
[Sony Xperia XA ROMs, Kernels, Recoveries, & Other ] Matty1993:
All good just thought you might want the info anyways in case you did want to fix it guess your right though long as its working haha :)
[Sony Xperia XA ROMs, Kernels, Recoveries, & Other ] bigrammy:
Can you add this version to the Releases please.
[Sony Xperia XA ROMs, Kernels, Recoveries, & Other ] andrw.gldmn:
Later. And we need to do some reverse engineering with rilproxy and libc, because trouble in libc or in rilproxy, I think.
[Sony Xperia XA ROMs, Kernels, Recoveries, & Other ] bigrammy:
For general info: Here is a recent mtk modem reverse engineering project which contains some possibly useful info and tools.

https://github.com/cyrozap/mediatek-lte-baseband-re
[Sony Xperia XA ROMs, Kernels, Recoveries, & Other ] andrw.gldmn:
here you are https://github.com/SonyCustoms/Releases_tuba/releases/tag/090519
[Sony Xperia XA ROMs, Kernels, Recoveries, & Other ] bigrammy:
Is it possible to switch to the stock rom vold?

When I try substitute the Lineage vold for the stock vold the rom does not boot :confused:

I was wondering if the ril use's an encrypted space which the Lineage vold we are using cannot mount.

It may be one of those 4 corrupt mounts we see?

In the stock rom we also have mount.encryptfs umount.encryptfs which are standalone binary files so does the stock vold use these. :confused:

Edit These are in the Lineage build too I was searching using the _ instead of . :silly:

Note: I cannot find these two binary's in any other mtk rom only the Sony ROM's M5 (mt6795) and L1 (mt6737)

[MENTION=7980102]andrw.gldmn[/MENTION] [MENTION=9139800]Matty1993[/MENTION]

EDIT: I fixed vold using the stock rom vold so it now mounts everything without those sdcard errors although the crashing rilproxy is still there.

Vold issue was missing libs system/lib/libstartup-reason.so and system/lib64/libstartup-reason.so I also used the stock system/bin/toybox just in case.

EDIT again: Last build is missing the mddb folder.

05-14 15:05:49.227 2023 2023 E : Failed to opendir [/system/vendor/etc/mddb/]. err = [No such file or directory](2)
05-14 15:05:49.227 2023 2023 E : Failed to opendir [/vendor/etc/mddb/]. err = [No such file or directory](2)
05-14 15:05:49.227 2023 2023 E : Failed to opendir [/etc/mddb/]. err = [No such file or directory](2)

I have added it but not sure if it needs anything else eg selinux sort of stuff. :silly: