[SOLVED] Any custom rom with encryption support? - Xiaomi Redmi Note 3 Questions & Answers

I have tried the following roms:
cm13 stable
cm13 nightly
cm14 by TheStrix
cm 14.1 by Santhosh M
Resurrection Remix
Radon kernel with those previous roms
None of them support device encryption :crying::crying::crying::crying:
Is there any custom rom out there supporting encryption of the /data partition? If possible android 6 or 7 with FP sensor support.
SOLVED
This bug has been solved by @eukela please see post #11 for detailed description.
For a step by step guide to install ResurrectionRemix with @eukela's kernel see post #24

I don't believe any current 6.x ROMs support encryption for kenzo/kate, unfortunately. Most custom ROMs for RN3 are based on CM, so they have the same bugs. How CM became official with the number of entries in jira on encryption being broken is baffling.
You might be able to switch on the file-based encryption in 7.x, which may or may not be present in CM14.
It's the one thing stopping me from using mine as a daily device.

Apparently, there is a source of CM14.1 that does support FDE, I plan on building it this week, and will report back. It should be possible to encrypt /data on a temporary working build, and then clean flash an official build until any required patches are merged.

Encryption actually worked for me when I've tried TheStrix cm14 build for a while on kenzo.
I've downgraded since to cm13 due to various other bugs with it and there it doesn't work again.

Actually cm14 was the most promising version of the ones I tested....
Instead of a keymaster error, the error on cm14 was something like "Orig filesystem overlaps crypto footer region. Cannot encrypt in place", so I resized the filesystem and tried to encrypt again, but I got a endless boot loop
If anyone manages to get FBE or FDE working, please let the rest know.

I'm with the same issue. There was a user who reported he have successfully encrypted using official CM13 but I was unable to do the same with the same setup.
Let's see if the new CM14.1 would solve it.

Yip. https://imgur.com/a/nM4X4
There is still no encryption support in TWRP though...

h4waii said:
Yip. https://imgur.com/a/nM4X4
There is still no encryption support in TWRP though...
Click to expand...
Click to collapse
Its cm 14 By TheStrix right?
Did it work out of the box or did you have to do something extra? IIRC that rom gave me the error "Orig filesystem overlaps crypto footer region" and encryption didn't work...

Still working it out...there might be a modification required to the keymaster firmware image.
Clean flash crDroid, encrypt. Boot with encryption. Wipe /system and flash theStrix's CM14.0
Someone needs to diff the tree to find the difference.

I took a look at the logs of my current system, nightly cm13 + agni 2.7 MM kernel, during an attempt to enable encryption. The main showstopper seems to be the error "QSEECOM: __qseecom_update_cmd_buf: QSEE app arch 0 is not supported" from drivers/misc/qseecom.c
A few theories and what I've checked:
"app" file got corrupted. Looks like it's referring to /firmware/image/keymaste.mdt here. But the file looks ok, 5th byte that it calls app_arch was 0x01, and it's a stock rom file, not updated by any cyanogenmod build. (My keymaste.mdt's md5 is 916ab2c54fac42a5dfcd3b9ade8e1869, btw.)
Bug in closed source blob libQSEEComAPI.so which sits between kernel and "Keymaster QCOM HAL" (keymaster_qcom.cpp) - but the blob is the same in both builds, and the .cpp also has seen no recent changes as far as I can tell.
A bug in kernel which zeroes out app_arch. qseecom_query_app_loaded() looks suspicious, it sets data->client.app_arch = 0. The code around it mentions that that crap was written for the case when 'app was loaded by appsbl before and was not registered', so sounds like it may be influenced by changes to boot sequence.
Code:
logcat:
11-09 21:31:12.762 1034 3173 D CryptdConnector: SND -> {7 cryptfs enablecrypto inplace pattern [scrubbed]}
11-09 21:31:18.363 372 379 D Cryptfs : unmounting /data succeeded
11-09 21:31:18.364 372 379 I Cryptfs : keymaster module name is Keymaster QCOM HAL
11-09 21:31:18.364 372 379 I Cryptfs : keymaster version is 3
11-09 21:31:18.364 372 379 I Cryptfs : Found keymaster0 module, using keymaster0 API.
11-09 21:31:18.364 372 379 D QSEECOMAPI: : QSEECom_get_handle sb_length = 0x2000
11-09 21:31:18.364 372 379 D QSEECOMAPI: : App is already loaded QSEE and app id = 3
11-09 21:31:18.366 372 379 D QSEECOMAPI: : QSEECom_dealloc_memory
11-09 21:31:18.366 372 379 D QSEECOMAPI: : QSEECom_shutdown_app, app_id = 3
11-09 21:31:18.366 372 379 I Cryptfs : keymaster module name is Keymaster QCOM HAL
11-09 21:31:18.366 372 379 I Cryptfs : keymaster version is 3
11-09 21:31:18.366 372 379 I Cryptfs : Found keymaster0 module, using keymaster0 API.
11-09 21:31:18.367 372 379 D QSEECOMAPI: : QSEECom_get_handle sb_length = 0x2000
11-09 21:31:18.367 372 379 D QSEECOMAPI: : App is already loaded QSEE and app id = 3
11-09 21:31:19.787 372 379 D QSEECOMAPI: : QSEECom_dealloc_memory
11-09 21:31:19.787 372 379 D QSEECOMAPI: : QSEECom_shutdown_app, app_id = 3
11-09 21:31:19.788 372 379 I Cryptfs : Using scrypt with keymaster for cryptfs KDF
11-09 21:31:20.241 372 379 I Cryptfs : keymaster module name is Keymaster QCOM HAL
11-09 21:31:20.241 372 379 I Cryptfs : keymaster version is 3
11-09 21:31:20.241 372 379 I Cryptfs : Found keymaster0 module, using keymaster0 API.
11-09 21:31:20.242 372 379 D QSEECOMAPI: : QSEECom_get_handle sb_length = 0x2000
11-09 21:31:20.242 372 379 D QSEECOMAPI: : App is already loaded QSEE and app id = 3
11-09 21:31:20.244 372 379 I Cryptfs : Signing safely-padded object
[b]11-09 21:31:20.258 372 379 E QSEECOMAPI: : Error::send modified command ioctl failed wtih ret = -1, errno = 12[/b]
11-09 21:31:20.258 372 379 E QCOMKeyMaster: Sign data command failed resp->status = -1 ret =-1
11-09 21:31:20.258 372 379 D QSEECOMAPI: : QSEECom_dealloc_memory
11-09 21:31:20.258 372 379 D QSEECOMAPI: : QSEECom_shutdown_app, app_id = 3
11-09 21:31:20.258 372 379 E Cryptfs : Signing failed
11-09 21:31:20.258 372 379 E Cryptfs : scrypt failed
11-09 21:31:20.258 372 379 E Cryptfs : Cannot create encrypted master key
11-09 21:31:20.258 372 379 E Cryptfs : Error enabling encryption after framework is shutdown, no data changed, restarting system
dmesg:
[b][ 147.764392] QSEECOM: __qseecom_update_cmd_buf: QSEE app arch 0 is not supported[/b]
[ 147.770985] QSEECOM: qseecom_ioctl: failed qseecom_send_cmd: -12
[ 147.779936] SysRq : Emergency Remount R/O
[ 147.791008] EXT4-fs (mmcblk0p25): re-mounted. Opts: (null)
[ 147.811232] Emergency Remount complete
[ 147.885299] dynamic fsync: reboot - force flush!

Yes, it was that bug in drivers/misc/qseecom.c.
Here's my kernel image with a small fix for it on the basis on agni-mm-2.7 kernel: dropbox.com/sh/6rtethxyphd2uuo/AAA6qtkyh4tdrtfF_IOvKViSa
sha256: ea3c5e85dba621babed4096eaccaf93b4432f083eb74a021c309d143f981220f
I've got my CM13 kenzo phone successfully encrypted with it, so far so good.
Beware that TWRP doesn't seem to be able to decrypt encrypted data partion.

I will try it later today.
Have you already tried ZCX TWRP? It supports 6.0 Encryption.
Sent from my Redmi Note 3 using Tapatalk

eukela said:
Yes, it was that bug in drivers/misc/qseecom.c.
Here's my kernel image with a small fix for it on the basis on agni-mm-2.7 kernel: dropbox.com/sh/6rtethxyphd2uuo/AAA6qtkyh4tdrtfF_IOvKViSa
sha256: ea3c5e85dba621babed4096eaccaf93b4432f083eb74a021c309d143f981220f
I've got my CM13 kenzo phone successfully encrypted with it, so far so good.
Beware that TWRP doesn't seem to be able to decrypt encrypted data partion.
Click to expand...
Click to collapse
Perfect. A patch included too, this is greatly appreciated. Will you submit to official or someone else can do it on your behalf?

@eukela
Can you please also attach your keymaster.mbn? I have 3 different versions which don't match the md5sum you provided, and don't seem to be able to encrypt using your boot image. Getting errors related to keymaster.

eukela said:
Yes, it was that bug in drivers/misc/qseecom.c.
Here's my kernel image with a small fix for it on the basis on agni-mm-2.7 kernel: dropbox.com/sh/6rtethxyphd2uuo/AAA6qtkyh4tdrtfF_IOvKViSa
sha256: ea3c5e85dba621babed4096eaccaf93b4432f083eb74a021c309d143f981220f
I've got my CM13 kenzo phone successfully encrypted with it, so far so good.
Beware that TWRP doesn't seem to be able to decrypt encrypted data partion.
Click to expand...
Click to collapse
I have tested your kernel with Resurrection Remix and encryption seems to be working fine. Good job tracking down the bug and thanks for the work
As @h4waii are you going to submit a PR to cm13, Radon kernel, etc... Or do you want us to do ir for you?

Thanks for confirmation, glad to hear it works for other people!
I'll send the patch to cyanogenmod's main repo for kenzo kernel later today, so that it'll gradually get spread to all CM flavors, and I'll email agni and radon authors about it.
h4waii said:
Can you please also attach your keymaster.mbn? I have 3 different versions which don't match the md5sum you provided, and don't seem to be able to encrypt using your boot image. Getting errors related to keymaster.
Click to expand...
Click to collapse
I had TheStrix's CM14-firmware-20160913.zip fully flashed ever since I first tried it out, and I didn't have to reflash since rolling back to cm13. MD5: 5dda5c0da2c854028e988cc952319057 or if zero padded: fd3eaeddf57ba2266b68637a6f7da990 (i.e. md5sum /dev/block/bootdevice/by-name/keymaster). These blobs work fine for CM13 too as far as I can tell.
The md5 916ab2c54fac42a5dfcd3b9ade8e1869 that I've mentioned was for /firmware/image/keymaste.mdt file, not keymaster partition.

Strange. I clean flashed official CM13, CM14 firmware and the boot image without any issues. Didn't encrypt successfully, and WiFi doesn't work.
I'll drop a logcat with relevant bits shortly.

h4waii said:
Strange. I clean flashed official CM13, CM14 firmware and the boot image without any issues. Didn't encrypt successfully, and WiFi doesn't work.
I'll drop a logcat with relevant bits shortly.
Click to expand...
Click to collapse
Wifi does not work because @eukela forgot to add the wlan.ko so you could install it at /system/lib/modules/wlan.ko
About the fix, I can confirm it works. At least it worked for me under ResurrectionRemix-M-v5.7.3-20160820-kenzo.

EDIT: Lost baseband. Anyway, this is no longer relevant to the thread.
Big thanks to @eukela for finding and fixing the bug! How do we buy you a beer?!

EDIT: There's a firmware salad to get it to work on Kate. The latest CM14 10/24 firmware is Kenzo ONLY. To get encryption working on Kate you need, CM14 09/13 firmware but with Kate NON-HLOS modem flashed after.

Related

[Q] Android 4.4 on Archos

I have an Archos 80G9 250GB HDD version, in stock FW, now replaced with an Xperia tablet for my regular use. The Archos had low RAM and had started crying for help although it was good as a media device..The Android 4.4 release was mentioned as also suited for units with 512 MB RAM,, so I was wondering if anyone would be able to provide a build for good old Archos ? Clearly Archos has given up on it (and themselves I think) so can anyone throw some light on if we can resurrect this old tablet with Kit Kat?
4.4 (CM 11) was mentioned in the CM 10.2 thread. It will probably happen eventually. But I wouldn't get your hopes up that it might be faster. Google isn't lightening up their OS with each new revision, nor are the apps getting lighter. 512MB just isn't enough RAM for a quality experience.
Hi!
Currently I'm running some early alpha builds
Camera is working. HD Video also.
Sound, thanks to the adapted audio hal (also included in CM10.2) build is also working.
Thanks @Hashcode we have got a fixed rotation and screenshot functionality for our 4430/4460 processors which works really good =) (Without the known artifacts).
But there are some glitches (I have not tested everything) that I found out:
WLAN isn't working right. There are very much
Code:
E/wpa_supplicant( 1017): recvfrom(ctrl_iface): Try again
in the code. So it seems that this isn't working correctly. (Tough, connection is established and working but the blue WLAN icon is white).
The current bug (OOM) is at the easter egg screen, when tapping on the "android version" label on the settings page.
Code:
[0m[38;5;40mI/cat ( 609): <6>[ 99.693603] PVR_K: RA_Alloc FAILED : arena=PDSPixelCodeData, size=0xd000(0xd000), alignment=0x0, offset=0x0
[0m[38;5;40mI/cat ( 609): <6>[ 99.693756] PVR_K:
[0m[38;5;40mI/cat ( 609): <6>[ 99.693756] Command Line of the current process with ID 2749 is com.android.systemui:sweetsweetdesserts
[0m[38;5;40mI/cat ( 609): <6>[ 99.693939] PVR_K: Base Name of the current process with ID 2749 is com.android.systemui:sweetsweetdesserts
[0m[38;5;40mI/cat ( 609): <6>[ 99.694000] PVR_K: Arena 'PDSPixelCodeData':
[0m[38;5;40mI/cat ( 609): <6>[ 99.694122] PVR_K: allocCB=bf1b2240 freeCB= (null) handle=c9966840 quantum=4096
[0m[38;5;40mI/cat ( 609): <6>[ 99.694183] PVR_K: span count 1
[0m[38;5;40mI/cat ( 609): <6>[ 99.694274] PVR_K: live segment count 159
[0m[38;5;40mI/cat ( 609): <6>[ 99.694335] PVR_K: free segment count 4294967295
[0m[38;5;40mI/cat ( 609): <6>[ 99.694396] PVR_K: free resource count 0 (0x0)
[0m[38;5;40mI/cat ( 609): <6>[ 99.694519] PVR_K: total allocs 159
[0m[38;5;40mI/cat ( 609): <6>[ 99.694580] PVR_K: total failed allocs 0
[0m[38;5;40mI/cat ( 609): <6>[ 99.694702] PVR_K: total frees 0
[0m[38;5;40mI/cat ( 609): <6>[ 99.694763] PVR_K: import count 0
[0m[38;5;40mI/cat ( 609): <6>[ 99.694824] PVR_K: export count 0
I have no glue how to fix this error
Maybe other devs jumped in. We should wait a little bit until CM stabilizes. Currently there are so much code changes ongoing, it makes no sense to release a version.
Quallenauge said:
Hi!
Currently I'm running some early alpha builds
Camera is working. HD Video also.
Sound, thanks to the adapted audio hal (also included in CM10.2) build is also working.
Thanks @Hashcode we have got a fixed rotation and screenshot functionality for our 4430/4460 processors which works really good =) (Without the known artifacts).
But there are some glitches (I have not tested everything) that I found out:
WLAN isn't working right. There are very much
Code:
E/wpa_supplicant( 1017): recvfrom(ctrl_iface): Try again
in the code. So it seems that this isn't working correctly. (Tough, connection is established and working but the blue WLAN icon is white).
The current bug (OOM) is at the easter egg screen, when tapping on the "android version" label on the settings page.
Code:
[0m[38;5;40mI/cat ( 609): <6>[ 99.693603] PVR_K: RA_Alloc FAILED : arena=PDSPixelCodeData, size=0xd000(0xd000), alignment=0x0, offset=0x0
[0m[38;5;40mI/cat ( 609): <6>[ 99.693756] PVR_K:
[0m[38;5;40mI/cat ( 609): <6>[ 99.693756] Command Line of the current process with ID 2749 is com.android.systemui:sweetsweetdesserts
[0m[38;5;40mI/cat ( 609): <6>[ 99.693939] PVR_K: Base Name of the current process with ID 2749 is com.android.systemui:sweetsweetdesserts
[0m[38;5;40mI/cat ( 609): <6>[ 99.694000] PVR_K: Arena 'PDSPixelCodeData':
[0m[38;5;40mI/cat ( 609): <6>[ 99.694122] PVR_K: allocCB=bf1b2240 freeCB= (null) handle=c9966840 quantum=4096
[0m[38;5;40mI/cat ( 609): <6>[ 99.694183] PVR_K: span count 1
[0m[38;5;40mI/cat ( 609): <6>[ 99.694274] PVR_K: live segment count 159
[0m[38;5;40mI/cat ( 609): <6>[ 99.694335] PVR_K: free segment count 4294967295
[0m[38;5;40mI/cat ( 609): <6>[ 99.694396] PVR_K: free resource count 0 (0x0)
[0m[38;5;40mI/cat ( 609): <6>[ 99.694519] PVR_K: total allocs 159
[0m[38;5;40mI/cat ( 609): <6>[ 99.694580] PVR_K: total failed allocs 0
[0m[38;5;40mI/cat ( 609): <6>[ 99.694702] PVR_K: total frees 0
[0m[38;5;40mI/cat ( 609): <6>[ 99.694763] PVR_K: import count 0
[0m[38;5;40mI/cat ( 609): <6>[ 99.694824] PVR_K: export count 0
I have no glue how to fix this error
Maybe other devs jumped in. We should wait a little bit until CM stabilizes. Currently there are so much code changes ongoing, it makes no sense to release a version.
Click to expand...
Click to collapse
Hi quallenauge!
I work on Kitkat for our old Gen8. I have trouble with wifi too. Driver is loaded but no firmware.
But for your driver i have ported the V1.8 version (from my pvrversion.h in driver/gpu/pvr/):
Code:
#define PVRVERSION_FAMILY "sgxddk"
#define PVRVERSION_BRANCHNAME "1.8"
#define PVRVERSION_BUILD 789263
#define PVRVERSION_BSCONTROL "blaze_android_sgx_ogles1_ogles2_GPL"
#define PVRVERSION_STRING "blaze_android_sgx_ogles1_ogles2_GPL sgxddk 18 [email protected]" PVR_STR2(PVRVERSION_BUILD)
#define PVRVERSION_STRING_SHORT "[email protected]" PVR_STR2(PVRVERSION_BUILD)
I think/believe that it's compatible with PVR540, i have no problem with it
And used same GPU/Graphics configuration in boardconfig.mk than Quarkx for Defy.
Bizcuite
bizcuite said:
Hi quallenauge!
I work on Kitkat for our old Gen8. I have trouble with wifi too. Driver is loaded but no firmware.
But for your driver i have ported the V1.8 version (from my pvrversion.h in driver/gpu/pvr/):
Code:
#define PVRVERSION_FAMILY "sgxddk"
#define PVRVERSION_BRANCHNAME "1.8"
#define PVRVERSION_BUILD 789263
#define PVRVERSION_BSCONTROL "blaze_android_sgx_ogles1_ogles2_GPL"
#define PVRVERSION_STRING "blaze_android_sgx_ogles1_ogles2_GPL sgxddk 18 [email protected]" PVR_STR2(PVRVERSION_BUILD)
#define PVRVERSION_STRING_SHORT "[email protected]" PVR_STR2(PVRVERSION_BUILD)
I think/believe that it's compatible with PVR540, i have no problem with it
And used same GPU/Graphics configuration in boardconfig.mk than Quarkx for Defy.
Bizcuite
Click to expand...
Click to collapse
Congratulation for your Kitkat effor on Archos G8! I really was surprised when I read your thread (today). :good::good:
Which WLAN driver you are using? I'm using the current one from ol_R5.SP5.01 (which is included in the CM-11.0 repo).
Does the G8 also using the wl127xx ? What is failing?
For the graphics, I'm using the GFX version [email protected] which is also included in other repos such as the KFire repo from @Hashcode . Hm, maybe I should use an older one (the current from prop. common). I will check that out soon.
With no problems, do you mean the easter egg is playing correctly?
Cheers =)
Quallenauge said:
Congratulation for your Kitkat effor on Archos G8! I really was surprised when I read your thread (today). :good::good:
Which WLAN driver you are using? I'm using the current one from ol_R5.SP5.01 (which is included in the CM-11.0 repo).
Does the G8 also using the wl127xx ? What is failing?
For the graphics, I'm using the GFX version [email protected] which is also included in other repos such as the KFire repo from @Hashcode . Hm, maybe I should use an older one (the current from prop. common). I will check that out soon.
With no problems, do you mean the easter egg is playing correctly?
Cheers =)
Click to expand...
Click to collapse
Hi Quallenauge,
Sorry no times to answer.
I didn't know which problem exactly you had like pb with GPU driver. I thunk that you had this logcat at start.
I don't know if i can play correctly any video/others. I have just the launcher ATM (no internal/ext SD, no OMX codecs configured, no sound).
For wifi i use kernel's archos drivers or CM11 drivers.
The driver is loaded, but the logcat says me that it cannot configure the int wlan0, because it doesn't exist.
I think that is a problem of configuration before the compilation.
I must see how work exactly the wifi and work on it, but no times.
Have you progress about your pb of wifi? Have you got a logcat to share about this to see if the problem is same?
Bizcuite

[SOLVED] SELinux seems to prevent device encryption (cm-12.1-20150902-NIGHTLY)

Hello!
Today I flashed the official CyanogenMod 12.1 Nightly Build (cm-12.1-20150902-NIGHTLY) ROM on my SII.
I am happy about the stagefright fixes but I can't encrypt the device anymore.
Logcat:
Code:
I/Cryptfs ( 1851): Check if PFE is activated on Boot
E/Cryptfs ( 1851): Cannot open footer file /efs/metadata for get
E/Cryptfs ( 1851): Error getting crypt footer and key
D/VoldCmdListener( 1851): cryptfs getpw
D/VoldCmdListener( 1851): cryptfs clearpw
E/Cryptfs ( 1851): Cannot open footer file /efs/metadata for get
D/Cryptfs ( 1851): Just asked init to shut down class main
D/Cryptfs ( 1851): unmounting /data succeeded
I/Cryptfs ( 1851): keymaster version is 2
I/Cryptfs ( 1851): Using scrypt for cryptfs KDF
E/Cryptfs ( 1851): Cannot open footer file /efs/metadata for put
E/Cryptfs ( 1851): Error writing the key to the end of the partition
E/Cryptfs ( 1851): Error enabling encryption after framework is shutdown, no data changed, restarting system
I checked the efs partition. It's good. I can even find my "old" metadata file since the phone was encrypted before.
When I set SELinux to permissive it's looks good till the reboot.
Logcat before the reboot:
Code:
E/Cryptfs ( 1850): not running with encryption, aborting
W/Cryptfs ( 1850): upgrading crypto footer to 1.3
D/Cryptfs ( 1850): Just asked init to shut down class main
D/Cryptfs ( 1850): unmounting /data succeeded
I/Cryptfs ( 1850): keymaster version is 2
I/Cryptfs ( 1850): Using scrypt for cryptfs KDF
D/Cryptfs ( 1850): Just triggered post_fs_data
D/Cryptfs ( 1850): post_fs_data done
D/Cryptfs ( 1850): Just triggered restart_min_framework
I/Cryptfs ( 1850): Using scrypt for cryptfs KDF
I/Cryptfs ( 1850): Enabling support for allow_discards in dmcrypt.
I/Cryptfs ( 1850): load_crypto_mapping_table: target_type = crypt
I/Cryptfs ( 1850): load_crypto_mapping_table: real_blk_name = /dev/block/mmcblk0p10, extra_params = 1 allow_discards
I/Cryptfs ( 1850): Encrypting ext4 filesystem in place...
I/Cryptfs ( 1850): Encrypting group 0
I/Cryptfs ( 1850): Encrypting from sector 0
I/Cryptfs ( 1850): Encrypted to sector 4526080
I/Cryptfs ( 1850): Encrypting from sector 4538368
I/Cryptfs ( 1850): Encrypted to sector 4579328
I/Cryptfs ( 1850): Encrypting from sector 4587008
...
I/Cryptfs ( 1850): Encrypting group 1
I/Cryptfs ( 1850): Encrypted to sector 16763904
I/Cryptfs ( 1850): Encrypting from sector 16777216
...
I/Cryptfs ( 1850): Encrypting group 2
I/Cryptfs ( 1850): Encrypted to sector 33861632
I/Cryptfs ( 1850): Encrypting from sector 33865728
...
I/Cryptfs ( 1850): Encrypting group 15
I/Cryptfs ( 1850): Encrypted to sector 235502592
I/Cryptfs ( 1850): Encrypting from sector 251658240
I/Cryptfs ( 1850): Encrypted to sector 251923456
Code:
D/CryptKeeper( 5706): Going into airplane mode.
D/CryptKeeper( 5706): Encryption progress screen initializing.
D/CryptKeeper( 5706): Acquiring wakelock.
V/CryptKeeper( 5706): Encryption progress: 100
After the reboot the device wants to be unlocked but after entering the password it tells me "your password is correct but your data is corrupt, you need to reset".
Am I right about SELinux being the problem?
How can I fix this?
Cheers s0r3_x
Update:
Same errors with cm-12.1-20150903-NIGHTLY.
Works with cm-12.1-20150904-NIGHTLY!
Maybe it's better post the problem in the developer thread. Lysergic and others developer can see the log. The link is: http://forum.xda-developers.com/galaxy-s2/orig-development/rom-cyanogenmod-12-1-nightly-builds-t3147661
@Lysergic Acid
minghi1 said:
Maybe it's better post the problem in the developer thread. Lysergic and others developer can see the log. The link is: http://forum.xda-developers.com/galaxy-s2/orig-development/rom-cyanogenmod-12-1-nightly-builds-t3147661
Click to expand...
Click to collapse
I made this account to post in that thread but the forum tells me that I need ten post before I am allowed to post in a developer thread.
But yes I agree it would be better to post there...
s0r3_x said:
I made this account to post in that thread but the forum tells me that I need ten post before I am allowed to post in a developer thread.
But yes I agree it would be better to post there...
Click to expand...
Click to collapse
No problem to post here, @king_ahmed already mentioned me to call my attention. Sir, if SELinux is blocking encryption I need a full logcat of the issue to see what's happening.
No problem to post here, @king_ahmed already mentioned me to call my attention. Sir, if SELinux is blocking encryption I need a full logcat of the issue to see what's happening.
Click to expand...
Click to collapse
Then a thanks @king_ahmed for getting @Lysergic Acid attention an thanks @Lysergic Acid for not ignoring me .
Here are the logs:
logcat_SELinux_enforce.log: pastebin.com/whxG3qTR
logcat_SELinux_permissive.log: pastebin.com/0FSYqRcc
s0r3_x said:
Then a thanks @king_ahmed for getting @Lysergic Acid attention an thanks @Lysergic Acid for not ignoring me .
Here are the logs:
logcat_SELinux_enforce.log: pastebin.com/whxG3qTR
logcat_SELinux_permissive.log: pastebin.com/0FSYqRcc
Click to expand...
Click to collapse
I've already fixed the SELinux issues present in your logs. Please try the latest nightly and report if the issue persists.
Lysergic Acid said:
I've already fixed the SELinux issues present in your logs. Please try the latest nightly and report if the issue persists.
Click to expand...
Click to collapse
The build installed on my SII is cm-12.1-20150903-NIGHTLY-i9100.
s0r3_x said:
The build installed on my SII is cm-12.1-20150903-NIGHTLY-i9100.
Click to expand...
Click to collapse
The denial present in your log is that: denied { search } for name="/" dev=mmcblk0p1 ino=2 scontext=u:r:vold:s0 tcontext=ubject_r:efs_device_file:s0 tclass=dir
On this commit: http://review.cyanogenmod.org/#/c/107862/ you can see me allowing vold to search in the /efs. It was merged on September 2nd. So how's that possible?
Lysergic Acid said:
The denial present in your log is that: denied { search } for name="/" dev=mmcblk0p1 ino=2 scontext=u:r:vold:s0 tcontext=ubject_r:efs_device_file:s0 tclass=dir
On this commit: review.cyanogenmod.org/#/c/107862/ you can see me allowing vold to search in the /efs. It was merged on September 2nd. So how's that possible?
Click to expand...
Click to collapse
I don't know sorry I really don't that is why I am posting here.
If you look at line 40 in the logcat_SELinux_enforce.log you see the build installed is cm-12.1-20150903.:
Code:
I/cm ( 1884): Welcome to Android 5.1.1 / CyanogenMod-12.1-20150903-NIGHTLY-i9100
Or line 13 in the logcat_SELinux_permissive.log:
Code:
I/cm ( 1880): Welcome to Android 5.1.1 / CyanogenMod-12.1-20150903-NIGHTLY-i9100
Update:
I flashed the new nightly (CyanogenMod-12.1-20150904-NIGHTLY-i9100) and tried again.
It worked!!!
Big thanks @Lysergic Acid !
Still I don't get it. It should have worked with yesterdays nightly.
@Lysergic Acid: Do you want the new logs?
Not sure where to write this, but i tried to encrypt phone several times and it failed, with todays night build (cm-12.1-20150905-NIGHTLY-i9100).
Same error: Cannot open footer file /efs/metadata. Tried both CWM and TWRP, also resized partition, to give it space for encryption key.
Code:
setprop vold.decrypt trigger_shutdown_framework
e2fsck -f /dev/block/mmcblk0p10
resize2fs /dev/block/mmcblk0p10 740000
Tried to give it 16kb and 180MB, it failed... goes into reboot. Same if done via adb
Code:
vdc cryptfs enablecrypto inplace password mypass
Any ideas?
Thank you
s0r3_x said:
Update:
I flashed the new nightly (CyanogenMod-12.1-20150904-NIGHTLY-i9100) and tried again.
It worked!!!
Big thanks @Lysergic Acid !
Still I don't get it. It should have worked with yesterdays nightly.
@Lysergic Acid: Do you want the new logs?
Click to expand...
Click to collapse
I'm glad it worked, no need for more logs then.
potentia said:
Not sure where to write this, but i tried to encrypt phone several times and it failed, with todays night build (cm-12.1-20150905-NIGHTLY-i9100).
Same error: Cannot open footer file /efs/metadata. Tried both CWM and TWRP, also resized partition, to give it space for encryption key.
Code:
setprop vold.decrypt trigger_shutdown_framework
e2fsck -f /dev/block/mmcblk0p10
resize2fs /dev/block/mmcblk0p10 740000
Tried to give it 16kb and 180MB, it failed... goes into reboot. Same if done via adb
Code:
vdc cryptfs enablecrypto inplace password mypass
Any ideas?
Thank you
Click to expand...
Click to collapse
Do you have anything under /efs/metadata? If not, this error is acceptable. Also, you don't need to resize the block of it, this is all wrong man, you're not resizing the /efs partition to be bigger, just the block of it, probably even making it smaller than the default.
Please give me a logcat of the problem when you try to encrypt the phone.
Lysergic Acid said:
Do you have anything under /efs/metadata? If not, this error is acceptable. Also, you don't need to resize the block of it, this is all wrong man, you're not resizing the /efs partition to be bigger, just the block of it, probably even making it smaller than the default.
Please give me a logcat of the problem when you try to encrypt the phone.
Click to expand...
Click to collapse
I was under impression that key was residing in the last 16KB of data partition, that's why I decreased mmcblk0p10 from 786432 to 786428 blocks, leaving 4 blocks (16KB) free.
There is no /efs/metadata file
logcat: s3.amazonaws.com/xda-share/logcat.txt
Thank you
@Lysergic Acid
Had a chance to look at log?
Thank you
Still cannot encrypt @Lysergic Acid
Updated to cm 13
adb log:
Code:
02-13 17:21:12.809 1844 1894 E Cryptfs : Bad magic for real block device /dev/block/mmcblk0p10
02-13 17:21:12.815 1844 1894 E Cryptfs : Orig filesystem overlaps crypto footer region. Cannot encrypt in place.

Development issue getting device encryption working on CM 12.1 build for Redmi Note 3

Hi,
I am currently building a CM 12.1 ROM for the Redmi Note 3, and most of the stuff works, but I have problems getting the device encryption to work, and was hoping somebody could help me figure this out.
Device encryption is built-in, but enabling it leads to an error. Specifically, when telling Android to encrypt the device (i.e., selecting "Encrypt phone" in the settings), it starts the process, but after less than one minute shows a screen saying that the encryption failed, and that the phone needs to be factory reset.
The logcat shows the following output:
Code:
05-15 19:47:49.694 I/Cryptfs ( 254): Using scrypt for cryptfs KDF
05-15 19:47:50.680 I/Cryptfs ( 254): Enabling support for allow_discards in dmcrypt.
05-15 19:47:50.680 I/Cryptfs ( 254): load_crypto_mapping_table: target_type = crypt
05-15 19:47:50.680 I/Cryptfs ( 254): load_crypto_mapping_table: real_blk_name = /dev/block/platform/mtk-msdc.0/by-name/userdata, extra_params = 1 allow_discards
05-15 19:47:55.706 E/Cryptfs ( 254): Cannot load dm-crypt mapping table.
05-15 19:47:55.707 I/Cryptfs ( 254): Encrypting ext4 filesystem in place...
05-15 19:47:55.707 I/Cryptfs ( 254): Encrypting group 0
05-15 19:47:55.710 E/Cryptfs ( 254): Error writing crypto_blkdev /dev/block/dm-0 for inplace encrypt
05-15 19:47:55.710 I/Cryptfs ( 254): Encrypted to sector 0
05-15 19:47:55.710 E/Cryptfs ( 254): Error encrypting groups
05-15 19:47:55.710 D/Cryptfs ( 254): cryptfs_enable_inplace_ext4()=-1
05-15 19:47:55.710 E/Cryptfs ( 254): Failed to encrypt f2fs filesystem on /dev/block/platform/mtk-msdc.0/by-name/userdata
05-15 19:47:55.710 I/Cryptfs ( 254): Encrypted to block -1
05-15 19:47:55.710 D/Cryptfs ( 254): cryptfs_enable_inplace_f2fs()=-1
05-15 19:47:55.710 E/Cryptfs ( 254): Encrypting filesystem in place...
05-15 19:47:55.710 E/Cryptfs ( 254): Cannot seek to previously encrypted point on /dev/block/dm-0
05-15 19:47:55.710 D/Cryptfs ( 254): cryptfs_enable_inplace_full()=-1
with the most pertinent line probably this one:
Code:
05-15 19:47:55.706 E/Cryptfs ( 254): Cannot load dm-crypt mapping table.
At the same time, the kernel log prints the following:
Code:
<3>[ 1196.971648] (3)[324:vold]device-mapper: table: 253:0: crypt: Device lookup failed
<4>[ 1196.971659] (3)[324:vold]device-mapper: ioctl: error adding target to table
I have traced this problem through the source code, and I suspect it is somewhere in dm-crypt.c of the Linux kernel, in the crypt_ctr() function:
Code:
if (dm_get_device(ti, argv[3], dm_table_get_mode(ti->table), &cc->dev)) {
ti->error = "Device lookup failed";
goto bad;
}
Presumably, dm_get_device() fails for some reason (of course, I might be mistaken and the problem is somewhere else, but tracing the function calls in the source code seems to suggest that this is where the error comes from).
Unfortunately, the kernel sources for the device in question are not available, so I cannot perform any more detailed testing on the kernel.
An additional piece of the puzzle is that there is an AOSP 5.0 ROM for the same device, which uses exactly the same kernel (as in, the same binary), and there the phone encryption works. Unfortunately, I am not familiar enough with dm-crypt, the device mapper and other related things around it to figure out what the difference is, and why it fails on CM-12.1 (e.g., whether there is for example any device mapper configuration somewhere that could be different, etc.).
Even more strangely, if I encrypt the user partition on the AOSP ROM, then use TWRP recovery to flash my CM-12.1 ROM, wipe the data partition (which does not remove encryption, as TWRP can correctly decrypt and mount the data partition), then my CM-12.1 ROM boots normally and decrypts the data partition (presumably then not having a problem with the device-mapper).
I have been banging my head against this problem for a bit too long, so if anybody has any ideas or knows that the problem could be and how to solve it, that would be very much appreciated.
for kernel maybe you can refer to this : http://forum.xda-developers.com/mei...elio-x10-kernel-source-code-released-t3225886, i saw that meizu mx was shared the same processor with ours.
Whyv
galuh said:
for kernel maybe you can refer to this : http://forum.xda-developers.com/mei...elio-x10-kernel-source-code-released-t3225886, i saw that meizu mx was shared the same processor with ours.
Click to expand...
Click to collapse
Why you digged up this old thread? Not that it would help other devs 'cause we already have CM13 ROMs.
AtomR said:
Whyv
Why you digged up this old thread? Not that it would help other devs 'cause we already have CM13 ROMs.
Click to expand...
Click to collapse
Yes if you had snapdragon version you were having cm 13 but if you were holding the mtk version you will stuck in lolipop i bet till now. Cm 13 only available for snapdragon bersion not mtk.

Xiaomi MI Box 3 MDZ-16-AB Boot Log and UART Location

Hey Guys,
I've been tinkering with my MI Box as I've been having packet loss issues with it, long story short its bricked, here is the bootlog + UART Pins if anyone is interested:
Boot Log:
Code:
TE: 98645
BL2 Built : 18:13:36, Jun 17 2016.
gxl g176ecdb - [email protected]
rn5t567_power_init
Board ID = 1
CPU clk: 1200MHz
DDR3 chl: Rank0+1 @ 912MHz - PASS
DQS-corr enabled
DDR scramble enabled
Rank0: 1024MB(auto)-2T-13
Rank1: 1024MB(auto)-2T-13
DataBus test pass!
AddrBus test pass!
-s
Load fip header from eMMC, src: 0x0000c200, des: 0x01400000, size: 0x00004000
aml log : R1024 check pass!
New fip structure!
Load bl30 from eMMC, src: 0x00010200, des: 0x01700000, size: 0x0000d600
aml log : R1024 check pass!
Load bl31 from eMMC, src: 0x00020200, des: 0x01700000, size: 0x00014400
aml log : R1024 check pass!
Load bl32 from eMMC, src: 0x00038200, des: 0x01700000, size: 0x0002ee00
aml log : R1024 check pass!
Load bl33 from eMMC, src: 0x00068200, des: 0x01700000, size: 0x0007f800
aml log : R1024 check pass!
NOTICE: BL3-1: v1.0(debug):ed1aadc
NOTICE: BL3-1: Built : 11:06:24, May 31 2016
aml log : bl31 detect secure boot !
[Image: gxl_v1.1.3118-31ffc57 2016-09-27 10:04:49 [email protected]]
OPS=0x82
ef be ad de d f0 ad ba ef be ad de bl30:thermal init err
[0.626102 Inits done]
secure task start!
high task start!
low task start!
INFO: BL3-1: Initializing runtime services
INFO: BL3-1: Initializing BL3-2
INFO: BL3-2: ATOS-V1.4-gb959fd4 #13 Tue Sep 6 15:28:58 CST 2016 arm
INFO: BL3-2: chip version = RevA (21:A - 0:0)
INFO: BL3-2: crypto engine DMA
INFO: BL3-2: secure time TEE
INFO: BL3-1: Preparing for EL3 exit to normal world
INFO: BL3-1: Next image address = 0x1000000
INFO: BL3-1: Next image spsr = 0x3c9
U-Boot 2015.01-g57a5217-dirty (Jan 25 2017 - 11:17:54), Build: jenkins-Once_MP-750
DRAM: 2 GiB
Relocation Offset is: 76ef5000
register usb cfg[0][1] = 0000000077f64870
vpu: error: vpu: check dts: FDT_ERR_BADMAGIC, load default parameters
vpu: clk_level = 7
vpu: set clk: 666667000Hz, readback: 666660000Hz(0x300)
SARADC channel(1) is 0x1d2.
adcAvg hw_version is 353
MMC: aml_priv->desc_buf = 0x0000000073ef56e0
aml_priv->desc_buf = 0x0000000073ef7870
SDIO Port B: 0, SDIO Port C: 1
emmc/sd response timeout, cmd8, status=0x3ff2800
emmc/sd response timeout, cmd55, status=0x3ff2800
[mmc_init] mmc init success
mmc read lba=0x4000, blocks=0x400
start dts,buffer=0000000073ef9f30,dt_addr=0000000073ef9f30
parts: 12
00: cache 0000000010000000 2
01: logo 0000000000300000 1
02: encrypt 0000000000100000 1
03: recovery 0000000002000000 1
04: tee 0000000000800000 1
05: crypt 0000000002000000 1
06: misc 0000000002000000 1
07: boot 0000000001400000 1
08: system 0000000060000000 1
09: persist 0000000000800000 4
10: panic 0000000000400000 4
11: data ffffffffffffffff 4
get_dtb_struct: Get emmc dtb OK!
overide_emmc_partition_table: overide cache
[mmc_get_partition_table] skip partition cache.
Partition table get from SPL is :
name offset size flag
===================================================================================
0: bootloader 0 400000 0
1: reserved 400000 800000 0
2: cache c00000 10000000 2
3: env 10c00000 400000 0
4: logo 11000000 300000 1
5: encrypt 11300000 100000 1
6: recovery 11400000 2000000 1
7: tee 13400000 800000 1
8: crypt 13c00000 2000000 1
9: misc 15c00000 2000000 1
10: boot 17c00000 1400000 1
11: system 19000000 60000000 1
12: persist 79000000 800000 4
13: panic 79800000 400000 4
14: data 79c00000 158400000 4
mmc read lba=0x2000, blocks=0x2
mmc read lba=0x2002, blocks=0x2
mmc_read_partition_tbl: mmc read partition OK!
eMMC/TSD partition table have been checked OK!
mmc env offset: 0x10c00000
In: serial
Out: serial
Err: serial
reboot_mode=cold_boot
hardware_version =1
Saving Environment to aml-storage...
mmc env offset: 0x10c00000
Writing to MMC(1)... done
hpd_state=0
cvbs performance type = 6, table = 0
[store]To run cmd[emmc dtb_read 0x1000000 0x40000]
read emmc dtb
amlkey_init() enter!
[EFUSE_MSG]keynum is 4
[KM]Error:f[key_manage_query_size]L507:key[sn2] not programed yet
wipe_data=successful
wipe_cache=successful
Boot command:
Boot status:
Boot message
""
upgrade_step=2
[OSD]load fb addr from dts
[OSD]failed to get fb addr for logo
[OSD]use default fb_addr parameters
[OSD]fb_addr for logo: 0x3d800000
[OSD]load fb addr from dts
[OSD]failed to get fb addr for logo
[OSD]use default fb_addr parameters
[OSD]fb_addr for logo: 0x3d800000
[CANVAS]canvas init
[CANVAS]addr=0x3d800000 width=5760, height=2160
pull down bt_reset
pull up bt_reset
set hci reset
04 0e 04 01 03 0c 00
set scan parameters
04 0e 04 01 0b 20 00
set scan enable
04 0e 04 01 0c 20 00
pull down bt_enable
IR init done!
[imgread]szTimeStamp[2017012511355519]
[imgread]secureKernelImgSz=0x778000
aml log : R1024 check pass!
aml log : R1024 check pass!
aml log : R1024 check pass!
ee_gate_off ...
## Booting Android Image at 0x01080000 ...
reloc_addr =73f7a130
copy done
load dtb from 0x1000000 ......
Uncompressing Kernel Image ... OK
kernel loaded at 0x01080000, end = 0x01fa8620
Loading Ramdisk to 73e02000, end 73ee3000 ... OK
Loading Device Tree to 000000001fff4000, end 000000001fffff5e ... OK
Starting kernel ...
uboot time: 2832461 us
...
<See Attached>
UART Pins:
<See Attached>
You can hook the TX and RX lines into the 3.5mm headphone jack for easy UART use.
See attached
It turns out JTAG is enabled according to the Android dmesg log, this could mean a neat little BootROM dump...
Can someone makes a flash able rom for Almogic burning tool for mi tv box 3 mdz 16-ab?
Can you boot from usb device (libreelec)?
My mi tv box 3 is totally bricked no boot to recovery, only pc recognize like WorldCub device.
gyb001 said:
Can you boot from usb device (libreelec)?
Click to expand...
Click to collapse
I haven't looked at that yet, I don't really have any expirence playing with AMLogic SoCs, you can boot via USB? This would actually work if you can as I have boot.img and system...
(dylanger) said:
I haven't looked at that yet, I don't really have any expirence playing with AMLogic SoCs, you can boot via USB? This would actually work if you can as I have boot.img and system...
Click to expand...
Click to collapse
Thanks.
unfortunatelly i haven't img.
But i find intresting things
once#usb start
(Re)start USB...
USB0: USB3.0 XHCI init start
Register 2000140 NbrPorts 2
Starting the controller
USB XHCI 1.00
This box have usb3?
Do you know how can i make full backup from emmc?
I think we can run somehow twrp with this env:
recovery_from_udisk=if fatload usb 0 ${loadaddr} aml_autoscript; then autoscr ${loadaddr}; fi;if fatload usb 0 ${loadaddr} recovery.img; then if fatload usb 0 ${dtb_mem_addr} dtb.img; then echo udisk dtb.img loaded; fi;bootm ${loadaddr};fi;
I won
amlogic login: root
Password:
Last login: Sat Nov 4 12:30:06 UTC 2017 on ttyS0
/etc/update-motd.d/30-sysinfo: line 37: read: read error: 0: Invalid argument
/etc/update-motd.d/30-sysinfo: line 38: [: -le: unary operator expected
____ ___
/ ___|/ _ \__ ____ ____ __
\___ \ (_) \ \/ /\ \/ /\ \/ /
___) \__, |> < > < > <
|____/ /_//_/\_\/_/\_\/_/\_\
Welcome to ARMBIAN 5.34 user-built Debian GNU/Linux 9 (stretch) 3.14.29
System load: 0.44 0.12 0.04 Up time: 0 min
Memory usage: 4 % of 1790MB IP:
Usage of /: 18% of 7.1G storage/: 56% of 128M
[email protected]:~# ls
fstab install.sh
[email protected]:~# uname -a
Linux amlogic 3.14.29 #108 SMP PREEMPT Sat Nov 4 14:50:04 MSK 2017 aarch64 GNU/Linux
[email protected]:~# cat /proc/cpuinfo
Processor : AArch64 Processor rev 4 (aarch64)
processor : 0
processor : 1
processor : 2
processor : 3
Features : fp asimd evtstrm aes pmull sha1 sha2 crc32
CPU implementer : 0x41
CPU architecture: AArch64
CPU variant : 0x0
CPU part : 0xd03
CPU revision : 4
Hardware : Amlogic
Serial : 210a82005fb86cbf061167e2b0552e2f
Revision : 020a
gyb001 said:
I won
amlogic login: root
Password:
Last login: Sat Nov 4 12:30:06 UTC 2017 on ttyS0
/etc/update-motd.d/30-sysinfo: line 37: read: read error: 0: Invalid argument
/etc/update-motd.d/30-sysinfo: line 38: [: -le: unary operator expected
____ ___
/ ___|/ _ \__ ____ ____ __
\___ \ (_) \ \/ /\ \/ /\ \/ /
___) \__, |> < > < > <
|____/ /_//_/\_\/_/\_\/_/\_\
Welcome to ARMBIAN 5.34 user-built Debian GNU/Linux 9 (stretch) 3.14.29
System load: 0.44 0.12 0.04 Up time: 0 min
Memory usage: 4 % of 1790MB IP:
Usage of /: 18% of 7.1G storage/: 56% of 128M
[email protected]:~# ls
fstab install.sh
[email protected]:~# uname -a
Linux amlogic 3.14.29 #108 SMP PREEMPT Sat Nov 4 14:50:04 MSK 2017 aarch64 GNU/Linux
[email protected]:~# cat /proc/cpuinfo
Processor : AArch64 Processor rev 4 (aarch64)
processor : 0
processor : 1
processor : 2
processor : 3
Features : fp asimd evtstrm aes pmull sha1 sha2 crc32
CPU implementer : 0x41
CPU architecture: AArch64
CPU variant : 0x0
CPU part : 0xd03
CPU revision : 4
Hardware : Amlogic
Serial : 210a82005fb86cbf061167e2b0552e2f
Revision : 020a
Click to expand...
Click to collapse
Woot! Nice work! So you've managed to boot into a Debian build? Damn nice work! Do you know if its possible to do that without having access to Android in the first place?
Like from UBOOT?
Yes i used to uart.
Write this command to uboot:
setenv bootcmd "run start_autoscript; run storeboot;"
setenv start_autoscript "if usb start ; then run start_usb_autoscript; fi; if mmcinfo; then run start_mmc_autoscript; fi;"
setenv start_mmc_autoscript "if fatload mmc 0 1020000 s905_autoscript; then autoscr 1020000; fi;"
setenv start_usb_autoscript "if fatload usb 0 1020000 s905_autoscript; then autoscr 1020000; fi; if fatload usb 1 1020000 s905_autoscript; then autoscr 1020000; fi; if fatload usb 2 1020000 s905_autoscript; then autoscr 1020000; fi; if fatload usb 3 1020000 s905_autoscript; then autoscr 1020000; fi;"
setenv upgrade_step "0"
saveenv
Click to expand...
Click to collapse
I'm not sure it necessary, but i set the selinux disabled.
Download and write the image to usb drive
https://yadi.sk/d/srrtn6kpnsKz2/Linux/ARMBIAN
gyb001 said:
Yes i used to uart.
Write this command to uboot:
I'm not sure it necessary, but i set the selinux disabled.
Download and write the image to usb drive
https://yadi.sk/d/srrtn6kpnsKz2/Linux/ARMBIAN
Click to expand...
Click to collapse
Can we use this image with Amlogic usb burning tool ?
venioni said:
Can we use this image with Amlogic usb burning tool ?
Click to expand...
Click to collapse
No, the image will not pass the burning tool vertify.
I think you can use the amlogic burning tool only with uart. In uboot write "update" command.
gyb001 said:
No, the image will not pass the burning tool vertify.
I think you can use the amlogic burning tool only with uart. In uboot write "update" command.
Click to expand...
Click to collapse
Can you help me to unbrick my mind that box 3 international?
is totally bricked,no boot to recovery mode.
venioni said:
Can you help me to unbrick my mind that box 3 international?
is totally bricked,no boot to recovery mode.
Click to expand...
Click to collapse
Unfortunately i don't know how its possibile, but That sure, you have to use u boot.
You should buy uart usb device. I have cp2102
gyb001 said:
Unfortunately i don't know how its possibile, but That sure, you have to use u boot.
You should buy uart usb device. I have cp2102
Click to expand...
Click to collapse
If i buy this uart usb device cp 2102 can you make a tutorial how can i use this to unbrick my mi tv box3 and what firmwares i need to do all this?
venioni said:
If i buy this uart usb device cp 2102 can you make a tutorial how can i use this to unbrick my mi tv box3 and what firmwares i need to do all this?
Click to expand...
Click to collapse
Now, i can boot only Armbian.
Stock rom img file
https://mega.nz/#F!BDRG3J4B!VZqB0qJ9fseMhy4Y8anIaA
gyb001 said:
Stock rom img file
https://mega.nz/#F!BDRG3J4B!VZqB0qJ9fseMhy4Y8anIaA
Click to expand...
Click to collapse
Can we flash this stock rom image with Almogic burning tool for unbrick mi tv box 3 ?
venioni said:
Can we flash this stock rom image with Almogic burning tool for unbrick mi tv box 3 ?
Click to expand...
Click to collapse
No.
You have to use uboot

[KERNEL][3.18.140+][EOL for now] SwanKernel for the LG V20

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
A custom kernel for (most) V20 variants​
SwanKernel is an android kernel based on the latest Lineage OS 18.1 sources for the LG MSM8996 phones, aiming to bring those features and updates and improve them with some extra tuning, fixing and external features tailored specifically for the LG V20's performance characteristics and feature set, while trying to maximize the battery life and responsiveness of the device at the same time.​
This kernel is based on Linux 3.18.140, and has become EOL with the last commit, as i don't think there's anything else that can be optimized for the V20 on this source anymore.
​Which phone variants/models does this kernel support?​
The kernel currently supports the following variants:
H910/H915
H918
H990
LS997
US996
VS995
Support for other special variants like the US996Santa might come at a later date if needed.
What does this kernel intend to achieve?​
The main goal here is to have a kernel that not only has extra features and improvements, but is also clean and concise, having only features that are truly needed from a kernel that will run alongside a Android 11-based ROM. One example of that is Kcal display control, a feature that is unnecessary here since most, if not all Android 11 ROMs have LiveDisplay for that exact same purpose and without the need to root. This helps the kernel have a smaller file size and lower processing overhead, as well as promote better maintainability.
This kernel does have a battery life bias, but will still scale up to maximum performance when needed. No Overclocking is done for now.
Does it have any features over stock?​
Yes, a lot. The kernel is divided into two variants, here are the features both variants have over stock:
AdrenoBoost for improved GPU performance.
GPU and CPU/Cache Undervolt for better power efficiency on load.
CPU governors tuned for better battery life and thermal stability without impacting performance all that much.
Almost no unnecessary debug flags on the kernel for better kernel performance.
Westwood TCP Congestion Algorithm set as default in order to have better network performance and consistency.
AutoSMP CPU Hotplug to shutdown the big cores when their stronger performance isn't needed, slightly improving battery life on light loads and idle.
Disabled CPU Boost when a finger is detected on screen, preventing unnecessary frequency boosts when no meaningful action is done other than tapping on screen and slightly scrolling around. We have Schedutil to keep it smooth anyways.
USB Fast Charge.
Multiple cherry-picks from different msm8996 sources with fixes and improvements to the kernel.
Configurable wakelock blocker (boeffla) for roms that have some "unneeded" wakelocks enabled by default and/or users that know which wakelocks can be blocked for better battery life.
Anxiety IO Scheduler enabled by default, offering a read bias and lower latency in IO operations.
Kernel updated to Linux 3.18.140 with some extra patches from Googlesource.
Wireguard support, improving VPN performance.
Cryptographic functions optimizations, slightly improving the phone's performance when calculating hashes and so on.
The Extreme variant has some extra features over the Stable one, those being:
Stronger Undervolts (i'm talking about borderline unstable undervolts here, so i really recommend that you flash the Stable one first).
CPU Voltage Control if you need to setup a custom undervolt to keep it more stable and have no need to compile the kernel from source just to change the values... and that's assuming your phone even boots with this variant of the kernel.
Disabled Battery BCL which eliminates the power throttling caused by the battery, just be careful when running demanding tasks while having almost no battery left.
Are there any bugs?​
Right now, there's the dreaded Infrared Blaster, and it... kinda works? The IR is able to send the very first command i give to my LG TV without any problems after every reboot, but refuses to send anything else after that first command. The IR Blaster's light still works all the time though despite having some big delays between on/off states.
Download & Installation​
The folders containing each kernel variant can be found here:
Stable Version
Extreme Version
To install the kernel, it's the standard procedure:
Download the kernel you want for your device
Place it into the phone
Boot into recovery, select it and then flash
Wipe Dalvik Cache (optional, you only need to wipe it if you face random Force Closes, but it is a good practice anyway)
Reboot.
Open any app that can check the device info and look for "kernel", where it will show "... 3.18.xxx-Swan" if it installed correctly. I personally use SmartPack for that, but it requires root.
Enjoy the experience!
Performance and Battery metrics​
Spoiler: outdated (done in v1.00), performance has improved since then:
And now to the kernel's real world performance. But before delving in, keep in mind that my refurbished H910 is apparently a Snapdragon 821 prototype, that's why you will see higher than normal performance and clock values on cpu matters even with the LITTLE cores underclocked to 1785MHz instead of 2188MHz, the snapdragon 820 ones should not have any underclock applied and will reach the max of 1593MHz on them. I also took the liberty of testing those on the Extreme variant as BCL often interferes with the performance results and the extra undervolt doesn't increase performance in any substantial way, 5-7% at most on Geekbench.
Battery life:
Screen SOT test (Youtube looping through a massive playlist of songs with some scrolling to change between them):
Not very impressive, until you consider the battery currently powering it:
CPU/GPU Performance:
CPU performance according to Geekbench 5.4.1 (there is some minor variance of about 15-21 points in multithread):
CPU sustained performance on CPU Throttling Test(running it for 15+ minutes barely changes the curve, as it stabilizes at around 80-82 Celsius, i suppose a Snap 820 will fare better here due to the lower clocks):
GPU general performance on GFXBench 5:
No copper shim replacement or thermal pad change was made, the phone's internal structure is still the same from when i bought it.
Storage Performance:
General IO performance in Androbench 5(Not very accurate, but welp, if anyone has a more in-depth one feel free to share):
And there we go, everything i could benchmark so far. This will not be the best kernel on every front so the stock kernel on Lineage 18.1, Lighthouse's kernel or mk2000 might suit you better depending on your needs.
Changelog​
Spoiler: Changes done in recent versions:
*********** Swankernel V1.09+ [Maintenance release] ***********​
CPU/Cache/GPU Voltages have basically reached the optimum point on both stable and extreme.
Some performance commits were cherry-picked from newer kernels for other devices
Dynamic FSync was disabled since it could cause data loss on some edge cases involving reboots.
Improved some string routines and memory access functions, about 4% or so improvement on geekbench.
*********** Swankernel V1.09 [Last 3.18 version, i think] ***********​
Minor performance and power-saving optimizations throughout the kernel
CPU M4M cache undervolting (not really a big difference, but nice to have anyway).
A few cherry-picked fixes for the 3.18 msm8996 kernel tree.
Crypto function optimizations and HW acceleration for CRC32 Enabled.
Not actually a kernel change but: Can now be flashed on android versions lower than 11.
*********** Swankernel V1.08 ***********​
Small performance optimizations related to the voltage curves, especially in the GPU.
PC USB Charging has been fixed and the phone can now be charged over it again.
*********** Swankernel V1.06 ***********​
Upstreamed kernel to 3.18.140 + some extra patches, with more coming later.​
Added Wireguard support for better VPN performance compared to IPSec.​
Smaller fixes to the kernel zip files, improving compatibility with some models.​
Minor performance optimizations, shouldn't be noticeable to the end user.​
Now stable enough (at least the Stable version is) to be used as a daily driver.​
*********** Swankernel V1.00 ***********​Initial release. Has the features from 1 to 12 on both versions, and from 1 to 3 on the Extreme version.​​
Closing notes​
With V1.09, the kernel can now be flashed on basically any android version and should work out-of-the-box, although i didn't test it on stock roms at all and there are no reports of it working there, so it might not work on them.
From what i could gather during the multiple Pre-Beta tests, the battery life improved considerably over the kernel shipped by default with Lighthouse V20 and even more when compared to Lineage's stock kernel.
If you have any suggestion or idea that can possibly improve the kernel, do not hesitate to share, i will try to implement it when my time allows it. If there are any problems that only happen on this kernel, submit a log and i'll try to look at it.
The kernel's source code can be found here.
And last but not least, a special thanks for those that helped me even if indirectly:
@xxseva44
@npjohnson
@askermk2000
@lybxlpsv
@flar2
@osm0sis
And many, many others
The ir is most likely consumer ir related so, we'll have to tweak it until it starts working
xxseva44 said:
The ir is most likely consumer ir related so, we'll have to tweak it until it starts working
Click to expand...
Click to collapse
I was discussing the same thing with @askermk2000 a while ago and that seems to be the case, as not even gamma kernel had a working IR on the branch he tested, and neither the IR files or the git log of it shows any relevant difference on the IR when compared to Lineage's sources. I will keep the disclaimer about it for now because it makes things clearer as there is some confusion about the IR being a kernel problem, so the less convoluted it is to the user for the time being, the better.
Edit: Also, if you need any logs about the infrared while testing it, i can help (i even have some older ones describing the behaviour). Just hit me up when needed since my device will be mostly used as a development phone for the time being.
AShiningRay said:
I was discussing the same thing with @askermk2000 a while ago and that seems to be the case, as not even gamma kernel had a working IR on the branch he tested, and neither the IR files or the git log of it shows any relevant difference on the IR when compared to Lineage's sources. I will keep the disclaimer about it for now because it makes things clearer as there is some confusion about the IR being a kernel problem, so the less convoluted it is to the user for the time being, the better.
Edit: Also, if you need any logs about the infrared while testing it, i can help (i even have some older ones describing the behaviour). Just hit me up when needed since my device will be mostly used as a development phone for the time being.
Click to expand...
Click to collapse
It's more likely an issue with the implementation of the ir drivers not playing well with consumerIR or vise versa. Atm ir only works on the older versions of gamma as they weren't upstreamed like los 18
Hello when I try to flash Swan-H918-Stable.zip on an h918 I get "Unsupported device. Aborting..."
Aethera said:
Hello when I try to flash Swan-H918-Stable.zip on an h918 I get "Unsupported device. Aborting..."
Click to expand...
Click to collapse
Huh... that's strange. I must have messed something up during the anykernel zipping procedure on that model. I'm almost pushing an update to the kernel, so i'll be back in a while with a fix for that.
Edit: Yeah, it was something in the script file, i forgot to change the H910 to H918 on that specific variant flashable. Sorry for that.
I just pushed the file with the fixed script for all the models i checked. If you could test that, i would appreciate it.
AShiningRay said:
Huh... that's strange. I must have messed something up during the anykernel zipping procedure on that model. I'm almost pushing an update to the kernel, so i'll be back in a while with a fix for that.
Edit: Yeah, it was something in the script file, i forgot to change the H910 to H918 on that specific variant flashable. Sorry for that.
I just pushed the file with the fixed script for all the models i checked. If you could test that, i would appreciate it.
Click to expand...
Click to collapse
Just successfully flashed the new Swan-H918-Stable.zip thank you!
Code:
$ uname -a
Linux localhost 3.18.113-Swan-g24ffa95cf1b3-dirty #1 SMP PREEMPT Wed Oct 20 00:18:37 -03 2021 aarch64
Aethera said:
Just successfully flashed the new Swan-H918-Stable.zip thank you!
Click to expand...
Click to collapse
No worries, glad to help.
Here is some output from 'logcat *:E' in case it is of interest:
10-31 16:19:38.753 5926 5926 E ActivityThread: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
10-31 16:19:40.586 905 937 E ANDR-PERF-MPCTL: Invalid profile no. 0, total profiles 0 only
10-31 16:19:41.778 959 1031 E QC-time-services: Lib:time_genoff_operation: Connection failed !!
10-31 16:19:41.783 959 1031 E QC-time-services: Lib:time_genoff_operation: Connection failed !!
10-31 16:19:42.002 10005 10005 E receiver.modul: Not starting debugger since process cannot load the jdwp agent.
10-31 16:19:42.143 455 455 E lowmemorykiller: Error writing /proc/7941/oom_score_adj; errno=22
10-31 16:19:43.218 10025 10025 E hbox:interacto: Not starting debugger since process cannot load the jdwp agent.
10-31 16:19:44.391 455 455 E lowmemorykiller: Error writing /proc/9412/oom_score_adj; errno=22
10-31 16:19:44.658 1144 1217 E KernelCpuSpeedReader: Failed to read cpu-freq: /sys/devices/system/cpu/cpu2/cpufreq/stats/time_in_state: open failed: ENOENT (No such file or directory)
10-31 16:19:44.675 1144 1214 E libprocessgroup: Error encountered killing process cgroup uid 99005 pid 9572: Permission denied
10-31 16:19:46.683 1144 1550 E LightsService: Light requested not available on this device. 2
10-31 16:19:47.629 0 0 E variable_rate_pll_clk_enable_hwfsm: PLL pwrcl_pll didn't lock after enabling it!
10-31 16:19:51.008 1144 4213 E WifiService: Permission violation - getScanResults not allowed for uid=10086, packageName=com.google.android.gms, reason=java.lang.SecurityException: Location mode is disabled for the device
10-31 16:19:56.216 0 0 E vote : name[BATTCHG_SUSPEND], client[BATTCHG_UNKNOWN_BATTERY_EN_VOTER,0], enabled[0], val[0]
10-31 16:19:56.216 0 0 E SMBCHG : smbchg_config_chg_battery_type: BATTERY FULL NAME : LGE_BL44E1F_LGC_3200mAh
10-31 16:20:09.541 0 0 E : LGE charging scenario : state 0 -> 0(0-0), temp=292, volt=4404, fl_volt=4400 BTM=0, charger=1, cur_set=1000/0, chg_cur = -481
10-31 16:20:09.541 0 0 E [LGE-CC] lge_monitor_batt_temp_work: (work_queue)->(work_queue)
10-31 16:20:09.541 0 0 E vote : name[BATT_FCC], client[LGE_POWER_CLASS_FCC_VOTER,1], enabled[1], val[1000]
10-31 16:20:09.541 0 0 E vote : name[BATTCHG_SUSPEND], client[LGCC_EN_VOTER,1], enabled[0], val[0]
10-31 16:20:09.541 0 0 E vote : name[BATTCHG_SUSPEND], client[STORE_MODE_EN_VOTER,2], enabled[0], val[0]
10-31 16:20:09.541 0 0 E vote : name[USB_SUSPEND], client[STORE_MODE_USB_EN_VOTER,2], enabled[0], val[0]
10-31 16:20:29.221 0 0 E variable_rate_pll_clk_enable_hwfsm: PLL pwrcl_pll didn't lock after enabling it!
Here is some more:
10-31 16:21:38.622 10126 10148 E libEGL : Driver indicates EGL 1.5 support, but does not have a critical API
10-31 16:21:38.739 905 937 E ANDR-PERF-RESOURCEQS: Failed to reset optimization [2, 1]
10-31 16:21:38.740 905 937 E ANDR-PERF-RESOURCEQS: Failed to reset optimization [2, 1]
10-31 16:21:43.557 905 937 E ANDR-PERF-MPCTL: Invalid profile no. 0, total profiles 0 only
10-31 16:21:43.558 905 937 E ANDR-PERF-RESOURCEQS: Failed to apply optimization [2, 2, 0]
10-31 16:22:09.540 0 0 E : LGE charging scenario : state 0 -> 0(0-0), temp=292, volt=4408, fl_volt=4400 BTM=0, charger=1, cur_set=1000/0, chg_cur = -358
10-31 16:22:09.541 0 0 E [LGE-CC] lge_monitor_batt_temp_work: (work_queue)->(work_queue)
10-31 16:22:22.518 0 0 E vote : name[BATTCHG_SUSPEND], client[BATTCHG_UNKNOWN_BATTERY_EN_VOTER,0], enabled[0], val[0]
10-31 16:22:22.518 0 0 E SMBCHG : smbchg_config_chg_battery_type: BATTERY FULL NAME : LGE_BL44E1F_LGC_3200mAh
10-31 16:22:37.783 0 0 E rmt_storage: INFO:rmt_storage_rw_iovec_cb: Write iovec request received for /boot/modem_fs1
10-31 16:22:37.783 0 0 E rmt_storage: INFO:rmt_storage_client_thread: Calling Write [offset=0, size=2097152]for /boot/modem_fs1!
10-31 16:22:37.814 0 0 E rmt_storage: INFO:rmt_storage_client_thread: Done Write (bytes = 2097152) for /boot/modem_fs1!
10-31 16:23:00.530 0 0 E variable_rate_pll_clk_enable_hwfsm: PLL pwrcl_pll didn't lock after enabling it!
10-31 16:23:09.540 0 0 E : LGE charging scenario : state 0 -> 0(0-0), temp=292, volt=4408, fl_volt=4400 BTM=0, charger=1, cur_set=1000/0, chg_cur = -324
10-31 16:23:09.540 0 0 E [LGE-CC] lge_monitor_batt_temp_work: (work_queue)->(work_queue)
Aethera said:
Here is some output from 'logcat *:E' in case it is of interest:
10-31 16:19:38.753 5926 5926 E ActivityThread: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
10-31 16:19:40.586 905 937 E ANDR-PERF-MPCTL: Invalid profile no. 0, total profiles 0 only
10-31 16:19:41.778 959 1031 E QC-time-services: Lib:time_genoff_operation: Connection failed !!
10-31 16:19:41.783 959 1031 E QC-time-services: Lib:time_genoff_operation: Connection failed !!
10-31 16:19:42.002 10005 10005 E receiver.modul: Not starting debugger since process cannot load the jdwp agent.
10-31 16:19:42.143 455 455 E lowmemorykiller: Error writing /proc/7941/oom_score_adj; errno=22
10-31 16:19:43.218 10025 10025 E hbox:interacto: Not starting debugger since process cannot load the jdwp agent.
10-31 16:19:44.391 455 455 E lowmemorykiller: Error writing /proc/9412/oom_score_adj; errno=22
10-31 16:19:44.658 1144 1217 E KernelCpuSpeedReader: Failed to read cpu-freq: /sys/devices/system/cpu/cpu2/cpufreq/stats/time_in_state: open failed: ENOENT (No such file or directory)
10-31 16:19:44.675 1144 1214 E libprocessgroup: Error encountered killing process cgroup uid 99005 pid 9572: Permission denied
10-31 16:19:46.683 1144 1550 E LightsService: Light requested not available on this device. 2
10-31 16:19:47.629 0 0 E variable_rate_pll_clk_enable_hwfsm: PLL pwrcl_pll didn't lock after enabling it!
10-31 16:19:51.008 1144 4213 E WifiService: Permission violation - getScanResults not allowed for uid=10086, packageName=com.google.android.gms, reason=java.lang.SecurityException: Location mode is disabled for the device
10-31 16:19:56.216 0 0 E vote : name[BATTCHG_SUSPEND], client[BATTCHG_UNKNOWN_BATTERY_EN_VOTER,0], enabled[0], val[0]
10-31 16:19:56.216 0 0 E SMBCHG : smbchg_config_chg_battery_type: BATTERY FULL NAME : LGE_BL44E1F_LGC_3200mAh
10-31 16:20:09.541 0 0 E : LGE charging scenario : state 0 -> 0(0-0), temp=292, volt=4404, fl_volt=4400 BTM=0, charger=1, cur_set=1000/0, chg_cur = -481
10-31 16:20:09.541 0 0 E [LGE-CC] lge_monitor_batt_temp_work: (work_queue)->(work_queue)
10-31 16:20:09.541 0 0 E vote : name[BATT_FCC], client[LGE_POWER_CLASS_FCC_VOTER,1], enabled[1], val[1000]
10-31 16:20:09.541 0 0 E vote : name[BATTCHG_SUSPEND], client[LGCC_EN_VOTER,1], enabled[0], val[0]
10-31 16:20:09.541 0 0 E vote : name[BATTCHG_SUSPEND], client[STORE_MODE_EN_VOTER,2], enabled[0], val[0]
10-31 16:20:09.541 0 0 E vote : name[USB_SUSPEND], client[STORE_MODE_USB_EN_VOTER,2], enabled[0], val[0]
10-31 16:20:29.221 0 0 E variable_rate_pll_clk_enable_hwfsm: PLL pwrcl_pll didn't lock after enabling it!
Here is some more:
10-31 16:21:38.622 10126 10148 E libEGL : Driver indicates EGL 1.5 support, but does not have a critical API
10-31 16:21:38.739 905 937 E ANDR-PERF-RESOURCEQS: Failed to reset optimization [2, 1]
10-31 16:21:38.740 905 937 E ANDR-PERF-RESOURCEQS: Failed to reset optimization [2, 1]
10-31 16:21:43.557 905 937 E ANDR-PERF-MPCTL: Invalid profile no. 0, total profiles 0 only
10-31 16:21:43.558 905 937 E ANDR-PERF-RESOURCEQS: Failed to apply optimization [2, 2, 0]
10-31 16:22:09.540 0 0 E : LGE charging scenario : state 0 -> 0(0-0), temp=292, volt=4408, fl_volt=4400 BTM=0, charger=1, cur_set=1000/0, chg_cur = -358
10-31 16:22:09.541 0 0 E [LGE-CC] lge_monitor_batt_temp_work: (work_queue)->(work_queue)
10-31 16:22:22.518 0 0 E vote : name[BATTCHG_SUSPEND], client[BATTCHG_UNKNOWN_BATTERY_EN_VOTER,0], enabled[0], val[0]
10-31 16:22:22.518 0 0 E SMBCHG : smbchg_config_chg_battery_type: BATTERY FULL NAME : LGE_BL44E1F_LGC_3200mAh
10-31 16:22:37.783 0 0 E rmt_storage: INFO:rmt_storage_rw_iovec_cb: Write iovec request received for /boot/modem_fs1
10-31 16:22:37.783 0 0 E rmt_storage: INFO:rmt_storage_client_thread: Calling Write [offset=0, size=2097152]for /boot/modem_fs1!
10-31 16:22:37.814 0 0 E rmt_storage: INFO:rmt_storage_client_thread: Done Write (bytes = 2097152) for /boot/modem_fs1!
10-31 16:23:00.530 0 0 E variable_rate_pll_clk_enable_hwfsm: PLL pwrcl_pll didn't lock after enabling it!
10-31 16:23:09.540 0 0 E : LGE charging scenario : state 0 -> 0(0-0), temp=292, volt=4408, fl_volt=4400 BTM=0, charger=1, cur_set=1000/0, chg_cur = -324
10-31 16:23:09.540 0 0 E [LGE-CC] lge_monitor_batt_temp_work: (work_queue)->(work_queue)
Click to expand...
Click to collapse
Some of those errors are due to the massive amount of debug flags i disabled in the kernel (it still tries to load many of them up for some reason). Are you facing any bugs on the device so far? My H910 also prints many "errors" similar to these but it works just as fine as when it used Lineage's stock kernel, but i didn't test other variants so i don't know if this kernel works fine on them as well.
AShiningRay said:
Some of those errors are due to the massive amount of debug flags i disabled in the kernel (it still tries to load many of them up for some reason). Are you facing any bugs on the device so far? My H910 also prints many "errors" similar to these but it works just as fine as when it used Lineage's stock kernel, but i didn't test other variants so i don't know if this kernel works fine on them as well.
Click to expand...
Click to collapse
One thing I'm noticing is that the adb USB connection keeps breaking. I run 'adb shell' and it connects then after a few seconds disconnects. It never did this before.
EDIT: Now it stopped doing it. For a while it kept disconnecting but now it is staying connected.
Aethera said:
One thing I'm noticing is that the adb USB connection keeps breaking.
Click to expand...
Click to collapse
That's weird, some time ago when i started taking logs to debug the IR i managed keep running the adb logcat for quite a while with no problems whatsoever. Is there a certain amount of time that it takes to happen?
Edit: Oh, ok then. Might have been some random issue with adb's connection. If any other problem arises, do tell.
Unfortunately the phone is still crashing at random intervals (was happening before using this kernel).
10-31 19:17:56.642 0 0 E : Fatal error on the modem.
10-31 19:17:56.642 0 0 E : modem subsystem failure reason: sleep_target.c:305:.
10-31 19:17:56.647 0 0 E M-Notify: General: 8
Aethera said:
Unfortunately the phone is still crashing at random intervals (was happening before using this kernel).
10-31 19:17:56.642 0 0 E : Fatal error on the modem.
10-31 19:17:56.642 0 0 E : modem subsystem failure reason: sleep_target.c:305:.
10-31 19:17:56.647 0 0 E M-Notify: General: 8
Click to expand...
Click to collapse
I see.. well, i tried searching this sleep_target.c that seems to be related in some manner to the problem in the kernel directory but there is no file with such a name. It could be something ROM-related, but i can't rule that out yet. Are there any other logs with more info about it?
AShiningRay said:
I see.. well, i tried searching this sleep_target.c that seems to be related in some manner to the problem in the kernel directory but there is no file with such a name. It could be something ROM-related, but i can't rule that out yet. Are there any other logs with more info about it?
Click to expand...
Click to collapse
I will try to do some various types of log filtering over the next day or so to see if I can get more information.
AShiningRay said:
I see.. well, i tried searching this sleep_target.c that seems to be related in some manner to the problem in the kernel directory but there is no file with such a name. It could be something ROM-related, but i can't rule that out yet. Are there any other logs with more info about it?
Click to expand...
Click to collapse
Looks like most if not all info about sleep_target.c is in Chinese. For example:
https://cloud-tencent-com.translate...auto&_x_tr_tl=en&_x_tr_hl=en-US&_x_tr_pto=nui
This one appears to have more detail: https://www-cnblogs-com.translate.g...auto&_x_tr_tl=en&_x_tr_hl=en-US&_x_tr_pto=nui
Aethera said:
Looks like most if not all info about sleep_target.c is in Chinese. For example:
https://cloud-tencent-com.translate...auto&_x_tr_tl=en&_x_tr_hl=en-US&_x_tr_pto=nui
This one appears to have more detail: https://www-cnblogs-com.translate.g...auto&_x_tr_tl=en&_x_tr_hl=en-US&_x_tr_pto=nui
Click to expand...
Click to collapse
Yeah, and the problem is... none of the files the article talks about are present in the kernel's source. tlmm_bsp for example also returns no results here. The fact that you log referenced a specific line from the file means it actually is present somewhere, but i'm not able to ascertain where exactly it is. I'll have to look at it in more details later.
AShiningRay said:
Yeah, and the problem is... none of the files the article talks about are present in the kernel's source. tlmm_bsp for example also returns no results here. The fact that you log referenced a specific line from the file means it actually is present somewhere, but i'm not able to ascertain where exactly it is. I'll have to look at it in more details later.
Click to expand...
Click to collapse
It is related to the Qualcomm MSM8996 system-on-chip. Perhaps it is embedded in the firmware. It appears there's some way to enable a debug mode for the modem and access various flags and voltage levels. This would explain why the error seems to be power-related. The device is trying to throttle the voltage to a "bottom current" which is a minimal current when the device is sleeping and for whatever reason it's crashing.
FYI here is a tool which can extract a MSM8996 modem image.
Aethera said:
Unfortunately the phone is still crashing at random intervals (was happening before using this kernel).
10-31 19:17:56.642 0 0 E : Fatal error on the modem.
10-31 19:17:56.642 0 0 E : modem subsystem failure reason: sleep_target.c:305:.
10-31 19:17:56.647 0 0 E M-Notify: General: 8
Click to expand...
Click to collapse
What variant? And did you ever crossflash?
Aethera said:
It is related to the Qualcomm MSM8996 system-on-chip. Perhaps it is embedded in the firmware. It appears there's some way to enable a debug mode for the modem and access various flags and voltage levels. This would explain why the error seems to be power-related. The device is trying to throttle the voltage to a "bottom current" which is a minimal current when the device is sleeping and for whatever reason it's crashing.
FYI here is a tool which can extract a MSM8996 modem image.
Click to expand...
Click to collapse
Ok, so it means that those files might actually be located inside the modem partition? I can see how a improper voltage can lead to kernel crashes (Undervolting the SoC's Kryo cores themselves too hard does the same thing, crashing the phone into either a black screen or a green one with some tracing info about the files that caused the problem), but how do we even go about testing if the modem is the one causing the problem? I'm not familiar with the modem images and structures at all so i doubt i would be able to fix those things, especially the voltages since we probably have no voltage table to determine which voltages are acceptable, too high, or too low.

Categories

Resources