Encryption fix for any z2 custom rom - Lenovo ZUK Z2 (Plus) ROMs, Kernels, Recoveries, &

After spending about 3 weeks and trying hundreds of commits in vold, system_core, art, bionic and kernel, I have finally fixed encryption for Z2 and it is already working fine in my Jaguar rom. You can also use the latest TWRP to decrypt data in recovery. The problem, as it often happens, was on the surface.
Here is the fix: https://github.com/ZUK2/android_device_zuk_z2_plus-1/commit/4924a2598d89ea268cf78583586da09071846aed
Enjoy...

Finally a good developer that fixes the problem! Thanks a lot!

:good::good:

On AEX the file int.qcom.rc is in the root directory. I tried to fix it by myself but it didn't work for me... Everytime i reboot, it still takes 30-40 minutes to virtual keyboard shows up...

farbus said:
On AEX the file int.qcom.rc is in the root directory. I tried to fix it by myself but it didn't work for me... Everytime i reboot, it still takes 30-40 minutes to virtual keyboard shows up...
Click to expand...
Click to collapse
How did you try to fix it? If you just edited init.qcom.rc on the phone, that won't do any good, because the real location of the file is in boot.img and on each boot, your changes will get erased...

optimumpro said:
How did you try to fix it? If you just edited init.qcom.rc on the phone, that won't do any good, because the real location of the file is in boot.img and on each boot, your changes will get erased...
Click to expand...
Click to collapse
hmm, it will be harder than i expected... But thanks for the info and the fix.

farbus said:
hmm, it will be harder than i expected... But thanks for the info and the fix.
Click to expand...
Click to collapse
You have to do it in the device tree and compile the rom yourself, or just write a message to the maintainer of the ROM to fix it.

NeoChontrix said:
You have to do it in the device tree and compile the rom yourself, or just write a message to the maintainer of the ROM to fix it.
Click to expand...
Click to collapse
Is patching boot.img and flashing it not enough? I was hoping i could do it myself.

farbus said:
Is patching boot.img and flashing it not enough? I was hoping i could do it myself.
Click to expand...
Click to collapse
You may could do that but it would have to be done after every ROM update, fixing it on their device tree repository is the only way to have it properly working.

Well, i patched/reflashed boot.img for AEX but it still doesn't work... Did i miss something?
https://mega.nz/#!1lJQnKzb!3t7jU96KpLiwrb15mOclxqdeqrItOkvX-kfqPQbajsA

farbus said:
Well, i patched/reflashed boot.img for AEX but it still doesn't work... Did i miss something?
https://mega.nz/#!1lJQnKzb!3t7jU96KpLiwrb15mOclxqdeqrItOkvX-kfqPQbajsA
Click to expand...
Click to collapse
As another user said: you need to compile the rom yourself...

Related

[PROBLEM][SOLVED!] CWM, TWRP and LEWA Recoveries not booting into system

I've been working around with my device. And created a custom ROM a while back. So I finally decided to test it and here's when the problem occured:
I was on v11 something, when I flashed CWM 6.0.28 and tested it. It booted alright, wiped things and then when I chose the option, reboot into system, it did so without any problems. Then I upgraded to v1.1.2.2 and reflashed CWM but this time the 6.0.48 version. It worked fine too. But then, when I chose to reboot into system, the screen froze. I had no choice but to pull out the battery and reboot it.
I tried and flashed Lewa Recovery as well as TWRP Recovery. Same thing happens. As soon as I choose Reboot--> System, the screen freezes.
I was hoping any of the professional devs look into this and find a cause,
FYI I'm on Null Kernel for 4.1.2, running Stock ROM with G-Apps.
Any help would be appreciated!
SOLUTION! :
Download the recovery in the attachments. It's Lewa Recovery. Flash it. It works like any other recovery.
Flash zips, create backups and when you are done, Just Click on Reboot. But DO NOT click on system. Instead choose Download. You will boot right back into system.
So no more pulling out covers. Cause it can seriously lose the cover. Enjoy devs.
all custom recovery currently got problem with freezing when choosing to reboot into system, reboot recovery or poweroff.
its a bug in the recoveries.
mdfzhi said:
all custom recovery currently got problem with freezing when choosing to reboot into system, reboot recovery or poweroff.
its a bug in the recoveries.
Click to expand...
Click to collapse
Then how do we get past it? Is there a way to reboot into system without having to pull out the battery? How do you guys do it?
no other way except pulling out battery.
mdfzhi said:
no other way except pulling out battery.
Click to expand...
Click to collapse
So, shouldn't you guys work on fixing these issues in the recovery? I'm afraid the back cover of my Nokia X would become loose.
yes someone should look into but its not going to be me. whole cm repo is too much for my slow internet speed to sync.
mdfzhi said:
yes someone should look into but its not going to be me. whole cm repo is too much for my slow internet speed to sync.
Click to expand...
Click to collapse
Man, why not you start cm11 for us?
mdfzhi said:
yes someone should look into but its not going to be me. whole cm repo is too much for my slow internet speed to sync.
Click to expand...
Click to collapse
Yo! I found the solution. Check out the thread again.
Dom3616 said:
Yo! I found the solution. Check out the thread again.
Click to expand...
Click to collapse
dont understand
sumondhk1 said:
dont understand
Click to expand...
Click to collapse
See again.
Dom3616 said:
See again.
Click to expand...
Click to collapse
Thanks for thr solution but I am already using it and it is much better than others.
When I press reboot system, it takes sometime but after all it boots.
Now gonna try your method.
Lewa recovery can't mount usb storage. At least for me it can't.
mdfzhi said:
Lewa recovery can't mount usb storage. At least for me it can't.
Click to expand...
Click to collapse
Yes, but I copy the files before I boot the recovery.
I Would never Suggest Lewa For anyone ! It is smooth...cool .... good
But you will get bored of those frogs instead of smilies...
I Really Hated the Lewa Recovery too...
Made my Dead...In SERVICE Center gonna get it back on 13th...i'll sell it to buy XL
I Will never install Lewa on it...I Will do install TWRP On it...And thn flash dhacker29's AOSP Rom...(Altough i love S5 Minirom...but i've heard buttons and camcorder doesn't work on it...It completely Works on X....Just gonna wait Hope he fix it before 13th )
Dom3616 said:
See again.
Click to expand...
Click to collapse
i don't have any problem about booting to system with my nokia XL
Dom3616 said:
I've been working around with my device. And created a custom ROM a while back. So I finally decided to test it and here's when the problem occured:
I was on v11 something, when I flashed CWM 6.0.28 and tested it. It booted alright, wiped things and then when I chose the option, reboot into system, it did so without any problems. Then I upgraded to v1.1.2.2 and reflashed CWM but this time the 6.0.48 version. It worked fine too. But then, when I chose to reboot into system, the screen froze. I had no choice but to pull out the battery and reboot it.
I tried and flashed Lewa Recovery as well as TWRP Recovery. Same thing happens. As soon as I choose Reboot--> System, the screen freezes.
I was hoping any of the professional devs look into this and find a cause,
FYI I'm on Null Kernel for 4.1.2, running Stock ROM with G-Apps.
Any help would be appreciated!
Click to expand...
Click to collapse
I was also facing this problem. but now I am doing one thing,after flashed all I need,I clear the dalvik cache.Then click the reboot and its rebooted the system smoothly.No freez screen.Hope it will help others..
I am using CWM 6.0.28 recovery and stock rom.

[ROM][5.0.2] Unofficial CM12 - GSM S4 variants

This is for people who know how to debug to troubleshoot and correct issues in the jf tree, or at least provide relevant info.
Every post in the discussion thread should include your build string and variant, or you will be ignored.
I am not supporting your end user needs, but you can take that to the Q&A thread.
rom: https://www.androidfilehost.com/?w=files&flid=13420
use this gapps: https://www.androidfilehost.com/?w=files&flid=21354
do not flash another kernel
do not bring kk /data
known jf issues:
some overlays disabled
double tap home = camera is not working
swype on google keyboard not working
kernel source: https://github.com/CyanogenMod/android_kernel_samsung_jf
since nightlies are enabled, this thread wont be watched/updated anymore.
thanks for helping with the bringup.
Alright alright alriiiiiiiiiiight
Up & running, have cell and sound. Maybe NFC not working. GPS is, WiFi is. Thank you!
ROM is not able to access the SD card in my phone. Only the internal storage of the device is available. WIFI, GPS, and LTE are all able to connect without a problem. Camera is also working without issue.
hoffreaper said:
ROM is not able to access the SD card in my phone. Only the internal storage of the device is available. WIFI, GPS, and LTE are all able to connect without a problem. Camera is also working without issue.
Click to expand...
Click to collapse
what filesystem is it using?
hoffreaper said:
ROM is not able to access the SD card in my phone. Only the internal storage of the device is available. WIFI, GPS, and LTE are all able to connect without a problem. Camera is also working without issue.
Click to expand...
Click to collapse
Exfat isn't working yet I believe, fat32 does tho
How did you guys install it? I took a look inside the zip and found a lot of stuff missing, there's not even a build.prop, most of the bulk of the zip is on a file called system.new.dat
To the people who have this running What gapps are you using?
archangeles said:
How did you guys install it? I took a look inside the zip and found a lot of stuff missing, there's not even a build.prop, most of the bulk of the zip is on a file called system.new.dat
Click to expand...
Click to collapse
install zip in cwm as always
https://source.android.com/devices/tech/security/dm-verity.html#block-otas
Gapps
https://s.basketbuild.com/filedl/gapps?dl=gapps-lp-20141109-signed.zip
---------- Post added at 05:40 PM ---------- Previous post was at 05:32 PM ----------
dcd1182 said:
For testing...
Most stuff is working.
You tell me whats broken.
https://www.androidfilehost.com/?fid=95784891001613232
Click to expand...
Click to collapse
Did a test on making a call to my VM.while calling works ,trying to hang up it says hanging up but never does and VM lady just keeps talking til VM cuts off due to not entering anything
ShinySide said:
Gapps
https://s.basketbuild.com/filedl/gapps?dl=gapps-lp-20141109-signed.zip
---------- Post added at 05:40 PM ---------- Previous post was at 05:32 PM ----------
Did a test on making a call to my VM.while calling works ,trying to hang up it says hanging up but never does and VM lady just keeps talking til VM cuts off due to not entering anything
Click to expand...
Click to collapse
same here on 1st call, but 2nd+ call hung up fine. same for you?
dcd1182 said:
install zip in cwm as always
https://source.android.com/devices/tech/security/dm-verity.html#block-otas
Click to expand...
Click to collapse
I'm actually running twrp, do you recommend switch to cwm to install the zip?
I used CWM. No problems with 1st call for me, and good since
dcd1182 said:
same here on 1st call, but 2nd+ call hung up fine. same for you?
Click to expand...
Click to collapse
Na Tried 4 times, refuses to hang up. Acts like it hangs up visually but in call screen stays on saying hanging up and vm just keeps talking
archangeles said:
I'm actually running twrp, do you recommend switch to cwm to install the zip?
Click to expand...
Click to collapse
shouldnt matter
dcd1182 said:
install zip in cwm as always
https://source.android.com/devices/tech/security/dm-verity.html#block-otas
Click to expand...
Click to collapse
dcd1182 said:
shouldnt matter
Click to expand...
Click to collapse
I get an error executing updater binaries in zip
archangeles said:
I get an error executing updater binaries in zip
Click to expand...
Click to collapse
try cwm then
i use philz 6.58.7, works here
edit: were not bringing back file based flashing, so if the recovery doesnt support block based, recovery needs updating
archangeles said:
I get an error executing updater binaries in zip
Click to expand...
Click to collapse
There's something wrong on your end then. I've flashed both builds with twrp 2.8.0.1 without issue
ShinySide said:
There's something wrong on your end then. I've flashed both builds with twrp 2.8.0.1 without issue
Click to expand...
Click to collapse
I know there is, I had a similar problem updating to 4.4.4 from 4.4.2 tw custom rom, and fixing permissions seemed to fix that, but this time it does nothing, could the bootloader be a problem in any way? I'm still on 4.4.2 because 4.4.4 tw never installed properly, but pac-man 4.4.4 worked just fine. Any pointers?
archangeles said:
I know there is, I had a similar problem updating to 4.4.4 from 4.4.2 tw custom rom, and fixing permissions seemed to fix that, but this time it does nothing, could the bootloader be a problem in any way? I'm still on 4.4.2 because 4.4.4 tw never installed properly, but pac-man 4.4.4 worked just fine. Any pointers?
Click to expand...
Click to collapse
not bootloader
try to format system

Miui breaks graphic drivers

i've been struggling lately to install miui on my device and i remember that i used to be able to. but now, every time i flash any build of Miui, it looks like it's messing up the graphic card. steps i did:
having ob 18 installed, i flashed 3.2.8(and 3.2.7) firmware and modem (everything ok)
next, i flashed miui(all of them, with and without gapps)
and after the instalations succeds,, i reboot, and the screen looks blueish and pixelated, like it's burned.
the only way yo fix this was to flash 3.2.8 firmware and modem again, just to be able to boot to the rom
BUT.... that's not it
i boot succesfully into the rom, and if i lock, then unlock the phone, that overlay gets back
the problem is present even on the bootloader and recovery menu.
i'm back to oos now, but i will flash it again tonight and post some pictures
cheers
Here is a video I made
XDRdaniel said:
i've been struggling lately to install miui on my device and i remember that i used to be able to. but now, every time i flash any build of Miui, it looks like it's messing up the graphic card. steps i did:
having ob 18 installed, i flashed 3.2.8(and 3.2.7) firmware and modem (everything ok)
next, i flashed miui(all of them, with and without gapps)
and after the instalations succeds,, i reboot, and the screen looks blueish and pixelated, like it's burned.
the only way yo fix this was to flash 3.2.8 firmware and modem again, just to be able to boot to the rom
BUT.... that's not it
i boot succesfully into the rom, and if i lock, then unlock the phone, that overlay gets back
the problem is present even on the bootloader and recovery menu.
i'm back to oos now, but i will flash it again tonight and post some pictures
cheers
Click to expand...
Click to collapse
thanks
MarJava said:
thanks
Click to expand...
Click to collapse
for what? :|
XDRdaniel said:
for what? :|
Click to expand...
Click to collapse
不错啊
MarJava said:
不错啊
Click to expand...
Click to collapse
what's nice?
XDRdaniel said:
i've been struggling lately to install miui on my device and i remember that i used to be able to. but now, every time i flash any build of Miui, it looks like it's messing up the graphic card. steps i did:
having ob 18 installed, i flashed 3.2.8(and 3.2.7) firmware and modem (everything ok)
next, i flashed miui(all of them, with and without gapps)
and after the instalations succeds,, i reboot, and the screen looks blueish and pixelated, like it's burned.
the only way yo fix this was to flash 3.2.8 firmware and modem again, just to be able to boot to the rom
BUT.... that's not it
i boot succesfully into the rom, and if i lock, then unlock the phone, that overlay gets back
the problem is present even on the bootloader and recovery menu.
i'm back to oos now, but i will flash it again tonight and post some pictures
cheers
Click to expand...
Click to collapse
是不是底包问题
MarJava said:
是不是底包问题
Click to expand...
Click to collapse
it isn't? do you know what's causing the problem? did it ever happend to you?
XDRdaniel said:
it isn't? do you know what's causing the problem? did it ever happend to you?
Click to expand...
Click to collapse
我没用MIUI啊
change your file system for ext4 ... miui rom just suport ext file system and that fixed the issue for me
pedrosantosobral said:
change your file system for ext4 ... miui rom just suport ext file system and that fixed the issue for me
Click to expand...
Click to collapse
Thats riiiight. Now i remember that a moyh ago i switched from ext4 to f2fs.
Yet, i can't tell if this is the reason, because now i am running the latest miui from x_s, and this one runs just fine.
Thank you anyway.
Did you actually get the same screen issue?
XDRdaniel said:
Thats riiiight. Now i remember that a moyh ago i switched from ext4 to f2fs.
Yet, i can't tell if this is the reason, because now i am running the latest miui from x_s, and this one runs just fine.
Thank you anyway.
Did you actually get the same screen issue?
Click to expand...
Click to collapse
No I had a different issue but I'm 100 sure that problem comes due to your file system...the versions u using is adapted to f2fs so it works but unmodified versions have a lot of issues and some of them doesn't even boot on f2fs
Sent from my OnePlus 3 using XDA Labs
Latest miui is based on nougat or marshmallow ? Can you give me a link for the miui you installed ? I want to test it
Diaze said:
Latest miui is based on nougat or marshmallow ? Can you give me a link for the miui you installed ? I want to test it
Click to expand...
Click to collapse
Still mm based. It has the firmware included, so you can flash it over any rom.
https://www.androidfilehost.com/?fid=961840155545570150

[ROM][ASH6!] LUISCOOL!(loko383) G975F][07 SEP][TWEAKS][ODEX][Magisk 19.4][AROMA]

Mod Edit
Important note: if you going to report a bug plz give the logs also so reporting it actually will done something
Also:
this rom got no bug
Microsd/Sim2 tray Mod?
Hi luiscool,
Thanks for the ROM mate, but can I ask what you did to ensure that Snapchat antiban?
Kind regards,
Nathan
Hello. Thanks, I'm testing it now.
Luiscool Rom
Nolan01 said:
Hello. Thanks, I'm testing it now.
Click to expand...
Click to collapse
Any telegram group for this rom?
baruaberger said:
Any telegram group for this rom?
Click to expand...
Click to collapse
I don't think so. But it would be good.
how to use the prepatched twrp??
I've found two bugs so far. First, you cannot get a backup from Samsung Cloud and second, Magisk Manager won't open just crashes. I have reinstalled both the rom and TWRP to make sure that it wasn't a one off thing.
lambik333 said:
how to use the prepatched twrp??
Click to expand...
Click to collapse
Flash in Odin in the ap slot. If you're using TWRP .7 or .8 already you don't need to use it though.
Regards,
Nathan
Rennert said:
Microsd/Sim2 tray Mod?
Click to expand...
Click to collapse
Please test if it works or not else i add it in the next update
sevsman said:
Hi luiscool,
Thanks for the ROM mate, but can I ask what you did to ensure that Snapchat antiban?
Kind regards,
Nathan
Click to expand...
Click to collapse
I have done a system modification if you want to apply this to another ROM then you can pm me for the fix as i prefer leaving this thread to normal user / ROM feedback not fixes.
Nolan01 said:
Hello. Thanks, I'm testing it now.
Click to expand...
Click to collapse
good luck
lambik333 said:
how to use the prepatched twrp??
Click to expand...
Click to collapse
Do as sevsman said, flash it in ODIN and then flash my ROM
tripping_ said:
I've found two bugs so far. First, you cannot get a backup from Samsung Cloud and second, Magisk Manager won't open just crashes. I have reinstalled both the rom and TWRP to make sure that it wasn't a one off thing.
Click to expand...
Click to collapse
The Magisk thing is a bug because magisk.apk is not included in the ROM, just install latest Magisk.apk and it works and for Samsung Cloud you must sign in first before you can use it as always. although i did not test it so please give logs if it continues to not work so i can fix it
Thanks
thank u
Flashed the Rom. Everything seem to work fine but couldn't get backup from Samsung Cloud as reported earlier by another member. Please fix it.
Thanks
Very nice. downloading. :fingers-crossed::fingers-crossed::fingers-crossed:
Magisk always freeze and not working or I am doing something wrong.
ok next version no more samsung cloud bug i will check it out
"100% camera quality" - can you prove it?
I have flashed the rom, everything works except that Magisk Manager says Magisk is not installed. What did i do wrong and how can i fix this?
Tok12 said:
I have flashed the rom, everything works except that Magisk Manager says Magisk is not installed. What did i do wrong and how can i fix this?
Click to expand...
Click to collapse
You need to select reboot to recovery after flashing the ROM.
sevsman said:
You need to select reboot to recovery after flashing the ROM.
Click to expand...
Click to collapse
I just did a complete wipe, reflashed the rom,held the combination to reboot in recovery. Once in recovery i booted into the system. Still no Magisk?
Tok12 said:
I just did a complete wipe, reflashed the rom,held the combination to reboot in recovery. Once in recovery i booted into the system. Still no Magisk?
Click to expand...
Click to collapse
In recovery you're meant to use reboot/recovery and not system.

[REQUEST] The quest for UNIVERSAL CUSTOM RECOVERY (compatible with ALL devices running Marshmallow or later)

Hi fellow developers. Can anybody please tell me does a universal build of TWRP or Orangefox exist and where can I find such a thing?
I'm looking for a universal build of any custom recovery that is able to run straight out of the box on as many devices as possible.
I need it for bundling with my recent project
Some folks have a TWRP with a very limited sh version that doesn't even understand basic arrays! That's why I'm looking to deploy a universal build of custom recovery together with my script to prevent any avoidable shell errors.
Thanks.
Of course that thing doesn't exist and never will. Recovery image needs device specific kernel.
Well I can try making one. But for sure, it wont work.
Royna said:
Of course that thing doesn't exist and never will. Recovery image needs device specific kernel.
Click to expand...
Click to collapse
"Recovery image needs device specific kernel."
are you sure about that
after all GKI exist
@Rush It does. FSTAB and stuff. If the recovery doesn't know the partition, how will it work? After flashing a GSI you are supposed to flash your own kernel. Though in most cases it is not required but it is advised and recommended. Likewise recoveries also need to know the FSTAB and stuff from the kernel level. So it is not possible.
Otus9051 said:
@Rush It does. FSTAB and stuff. If the recovery doesn't know the partition, how will it work? After flashing a GSI you are supposed to flash your own kernel. Though in most cases it is not required but it is advised and recommended. Likewise recoveries also need to know the FSTAB and stuff from the kernel level. So it is not possible.
Click to expand...
Click to collapse
hmmm, that makes sense yeah, I guess we need to have that be more generic before something like this can exist then
You can probably make it if you use have GKI, and it could be also possible if you have something like a custom build of lk2nd to boot the recovery using the kernel from the boot image.
As for fstab, we might be able to add a script to try mounting all the common partitions.
TipzTeam said:
You can probably make it if you use have GKI, and it could be also possible if you have something like a custom build of lk2nd to boot the recovery using the kernel from the boot image.
As for fstab, we might be able to add a script to try mounting all the common partitions.
Click to expand...
Click to collapse
Would be painful, but will work yes, and will have 40% it wont boot.
Otus9051 said:
Would be painful, but will work yes, and will have 40% it wont boot.
Click to expand...
Click to collapse
The fstabp part is pretty easy, but the kernel part isn't.
The lk2nd uses a generic kernel though.
TipzTeam said:
The fstabp part is pretty easy, but the kernel part isn't.
The lk2nd uses a generic kernel though.
Click to expand...
Click to collapse
Then we would need to port lk2nd to all devices, or make a GSI of it lol.
Otus9051 said:
Then we would need to port lk2nd to all devices, or make a GSI of it lol.
Click to expand...
Click to collapse
It's just gonna be an infinite loop. I will try to work on it later.
TipzTeam said:
I will try to work on it later.
Click to expand...
Click to collapse
oh.no.
You're right. I'm searching for GKI and not GSI. Thanks!
lebigmac said:
Does any random GSI firmware include a boot.img file that can be booted by any device out there running Marshmallow or newer?
Click to expand...
Click to collapse
...why would any GSI (S as in System) include boot?
If you ask me, the premise of this thread is wrong to begin with.
Thread closed on request of OP @lebigmac
2022-07-07 Update: Thread re-opened on request of OP.
Thanks Oswald for re-opening this thread. I renamed it to better describe my request. There was actually a very interesting conversation going on above. Hopefully those gentlemen can continue where they left off.
Cheers
@AndyYan @Otus9051 @tipzrickycheung @Rush @Royna

Categories

Resources