Guide to fixing s2 lockscreen crash - LeEco Le 2 Guides, News, & Discussion

Heyyo, update on the lockscreen crashing bug! I think I figured out the REAL culprit!
Backup EVERYTHING important off of your device, as this WILL completely wipe your userdata (internal storage).
(optional) Create a TWRP backup of data.
Reboot to boot loader
Please ensure you have adb and fastboot installed on your PC's OS.
fastboot format -w userdata
Reboot to system
(optional) Reboot to recovery and in Settings enable "Use rm -rf instead of formatting" and restore a TWRP data backup.
Setup lockscreen security and reboot a lot of times and see if it works ok and then report back your results.
NOTES:
please use the official platform tools for Android adb and fastboot from here:
https://developer.android.com/studio/releases/platform-tools
I think the issue could be stemming from TWRP and the broken format function from the encryption footer days... Which could also explain why only some users who did format data were affected by this bug.
I know this fix has worked for 2 zl1 users from the Le Pro3 Telegram group, 2 x2 users from Le Max 2 Telegram group and another 3 x2 users from XDA.
Revisions:
Apr9, 2019 - added optional step to restore TWRP data backup
Apr25, 2019 - droped "-u" from format instructions as older versions of fastboot doesn't seem to have it
Sept6, 2019 - added recommended version of platform tools for adb and fastboot from Google

Works on s2. Can confirm

thanks I faced the same issue and fixed it using your method.
just a single modification as the command "fastboot format -u -w userdata" didn't work on windows using the latest fastboot,
it said "unknown option -- u"
so I formatted userdata using twrp and it worked successfully
thanks a lot

Is a permanent solution or every time you change rom you have to reformat data in FastBoot?
To me, what gives me problems is the entry screen of the phone card pin (SIM) not the pin of Android, when I try to install AEX 6.4, I serve this to fix it?
Thank you
Enviado desde mi X52X mediante Tapatalk

ImSpecialNot said:
thanks I faced the same issue and fixed it using your method.
just a single modification as the command "fastboot format -u -w userdata" didn't work on windows using the latest fastboot,
it said "unknown option -- u"
so I formatted userdata using twrp and it worked successfully
thanks a lot
Click to expand...
Click to collapse
Heyyo, glad to hear this worked for you and @Rk585 !
I guess fastboot on Windows isn't as up to date as the one for Linux? Is that the official fastboot from Google or a different one? I'll drop -u from my guide I guess as it shouldn't be critical for it to work.
fastboot format --help
Code:
-u Do not erase partition before formatting.
etijer said:
Is a permanent solution or every time you change rom you have to reformat data in FastBoot?
To me, what gives me problems is the entry screen of the phone card pin (SIM) not the pin of Android, when I try to install AEX 6.4, I serve this to fix it?
Thank you
Enviado desde mi X52X mediante Tapatalk
Click to expand...
Click to collapse
It's permanent. The issue was caused by an old version of TWRP that had a bugged format data function. Formatting via fastboot is a permanent solution as it properly restores the encryption footer where-as sometimes even on newer TWRP it might not do so.
Private Unlock Key (PUK) is what you are referring to for unlocking your SIM card with a pin. That sounds like it could be a ROM-specific problem as I have heard for Le Pro3 builds of some ROMs that PUK doesn't work yet LineageOS 16.0 for x2 and zl1 does. I'd recommend reporting that bug to the s2 maintainer for AEX.

ThE_MarD said:
Heyyo, glad to hear this worked for you and @Rk585 !
I guess fastboot on Windows isn't as up to date as the one for Linux? Is that the official fastboot from Google or a different one? I'll drop -u from my guide I guess as it shouldn't be critical for it to work.
fastboot format --help
Code:
-u Do not erase partition before formatting.
It's permanent. The issue was caused by an old version of TWRP that had a bugged format data function. Formatting via fastboot is a permanent solution as it properly restores the encryption footer where-as sometimes even on newer TWRP it might not do so.
Private Unlock Key (PUK) is what you are referring to for unlocking your SIM card with a pin. That sounds like it could be a ROM-specific problem as I have heard for Le Pro3 builds of some ROMs that PUK doesn't work yet LineageOS 16.0 for x2 and zl1 does. I'd recommend reporting that bug to the s2 maintainer for AEX.
Click to expand...
Click to collapse
At first I thought that, could be specific problem of the ROM, but I tried with other (pixel, Havoc, R. R and LINEAGEOS) all with the same result, they stay in loop on the screen of the phone card... If I try to boot without SIM card, I have problems with WiFi, connect but without Internet...
When I find time, I will try to format by FastBoot and comment the results... I understand that when formatting by fastboot, at least I will have the ROM installed clean, no?
Thank you
Enviado desde mi X52X mediante Tapatalk

Heyyo @etijer , formatting with fastboot will completely wipe out all user data including any downloads or extra files on the device. Performing a full wipe and installing the ROM from scratch is optional but I'd recommend it to avoid any issues from a formatted user data partition.

Or maybe you could just delete locksettings.db from /data/system and then look for a workaround.
Might save you the hassle!

niyaziwaqar said:
Or maybe you could just delete locksettings.db from /data/system and then look for a workaround.
Might save you the hassle!
Click to expand...
Click to collapse
How to delete locksettings.db when it screen locked?
First time locked, I fixed by fastboot format -w userdata and try aosp/crdroid/hovac last build then screen lock again. Yesterday I just format userdata again.)

kaew158 said:
How to delete locksettings.db when it screen locked?
First time locked, I fixed by fastboot format -w userdata and try aosp/crdroid/hovac last build then screen lock again. Yesterday I just format userdata again.)
Click to expand...
Click to collapse
Just reboot to recovery mode select advanced option there u can access file manager then just follow the path i.e. /data/system/locksettings.db and delete it.... now reboot the rom...Now when u swipe it will normally unlock ur phones.....

E44O4 said:
Just reboot to recovery mode select advanced option there u can access file manager then just follow the path i.e. /data/system/locksettings.db and delete it.... now reboot the rom...Now when u swipe it will normally unlock ur phones.....
Click to expand...
Click to collapse
Thank you.

kaew158 said:
Thank you.
Click to expand...
Click to collapse
Welcome Bro

kaew158 said:
How to delete locksettings.db when it screen locked?
First time locked, I fixed by fastboot format -w userdata and try aosp/crdroid/hovac last build then screen lock again. Yesterday I just format userdata again.)
Click to expand...
Click to collapse
Even after deleting it, it might happen again after some reboots and you have to re-delete it. It happens in most of the pie ROMs.
The fix with fastboot provided in this thread is permanent and I believe the only solution. Though it didn't worked for me. I must be doing it wrong.
Might work for you.

niyaziwaqar said:
Even after deleting it, it might happen again after some reboots and you have to re-delete it. It happens in most of the pie ROMs.
The fix with fastboot provided in this thread is permanent and I believe the only solution. Though it didn't worked for me. I must be doing it wrong.
Might work for you.
Click to expand...
Click to collapse
Thank you.

ThE_MarD said:
Heyyo @etijer , formatting with fastboot will completely wipe out all user data including any downloads or extra files on the device. Performing a full wipe and installing the ROM from scratch is optional but I'd recommend it to avoid any issues from a formatted user data partition.
Click to expand...
Click to collapse
Hi can I do this fix without PC? tia

Heyyo @unclee, try this I guess https://forum.xda-developers.com/showthread.php?t=2033722
If that doesn't work? Please search XDA or Google for other potential solutions.

ThE_MarD said:
Heyyo @unclee, try this I guess https://forum.xda-developers.com/showthread.php?t=2033722
If that doesn't work? Please search XDA or Google for other potential solutions.
Click to expand...
Click to collapse
I mean can I format userdata on twrp on my le 2 instead of using fastboot to format it on PC ?

ImSpecialNot said:
thanks I faced the same issue and fixed it using your method.
just a single modification as the command "fastboot format -u -w userdata" didn't work on windows using the latest fastboot,
it said "unknown option -- u"
so I formatted userdata using twrp and it worked successfully
thanks a lot
Click to expand...
Click to collapse
So can I fix this bug using the devices recovery without using a computer? Userdata as in internal storage?

@unclee, you can try via only TWRP but from my tests in the past it did not solve it as it never restored the encryption footer. Only the fastboot format command restored the encryption footer for me.

ThE_MarD said:
@unclee, you can try via only TWRP but from my tests in the past it did not solve it as it never restored the encryption footer. Only the fastboot format command restored the encryption footer for me.
Click to expand...
Click to collapse
If I were to use this command "fastboot format userdata"? Will it erase my Internal Storage or Media? Or just the Data /System ? And If I decided to format via TWRP what partition will I format should I check the Internal Storage or just data System?

Related

Problem with Partition Table

Hi guys,
I'm experiencing a very big problem with a friend of mine's nexus 4. I've done the same thing in the same order with my phone (nexus 4 too) five minutes before and it worked.
We installed 4.4 stock rom downloaded from official google website via fastboot and all went well on my device. The problem was that we repeated the same identical procedure on my friend's nexus 4 and it went well except for the fact that the phone only had 5gbs available after the flash, so we red on the internet that we had to repeat the procedure using "fastboot -w update" instead of flashing every single file contained in the zip folder.
So it's now that borns the real problem. We've erased all partitions (fastboot erase cache, userdata, system, bla bla) and reflashed all. But from this point it stucks on android 4.4 loading logo.
We've tryied to repeat the operation and we've noticed that "fastboot erase bootloader" command answers with "Failed (remote: bootloader partition does not exist)". So we tryied to install cwm recovery and flash from sideload, it works and loads cyanogenmod logo but stucks on it again, tryied to flash everything possible and it works but after don't start.
The strange thing is that the bootloader appears to not exist but if i do the command: fastboot flash bootloader C:\...\bootloader.img it works and says "writing... OK" so i really don't know what could be the problem.
Please guys help us, my friend is on the point to sell his phone but we both are SURE that if it still can enter on recovery and on bootloader it could be restored!!! But we don't know why! Tryied every possible solution on the web, and nothing worked for now...
Thanks to all in advance!
Install the latest twrp recovery, enter it and go to the wipe menu, chose the format data option. Then give a rom a try.
meangreenie said:
Install the latest twrp recovery, enter it and go to the wipe menu, chose the format data option. Then give a rom a try.
Click to expand...
Click to collapse
Hi, thanks for the answer. Fortunately i've just resolved the problem. It worked after I wiped data from the STOCK recovery (it was the first thing i've done with the cwm several times but unsuccessfully). Now it works perfectly. Thanks again :victory:
fdm91xda said:
Hi, thanks for the answer. Fortunately i've just resolved the problem. It worked after I wiped data from the STOCK recovery (it was the first thing i've done with the cwm several times but unsuccessfully). Now it works perfectly. Thanks again :victory:
Click to expand...
Click to collapse
For future references. Most likely the reason why your phone didn't boot up is because you 'erase' a partition and left it unformatted. The 'erase' command wipe out the partition so no data is there and it can't access it. If you erase userdata, then there would be no accessible internal storage and the phone cannot boot.
Which is why after you erase it, you need to either flash something over it or format the partition to make it blank: fastboot format userdata (this is what Format DATA option in TWRP is).

[HELP] Moto X 2013 seems to have no OS on it

Hi everyone,
tonight I was trying to install the Stagefright OTA using this guide: http://forum.xda-developers.com/moto-x/general/xt1053-222-27-5-stagefright-ota-update-t3210786
The only thing I got was an android with a red triangle on it. So I went back, did a total phone reset, reinstalled the TWRP (fastboot flash twrp.img) and restored my backup. Sadly, the phone keeps rebooting to the TWRP as if there's nothing on it except the TWRP.
I've got the eu model and I can't find any factory image (or image in general) to flash on the device.
EDIT:
I manage to get something to work by simply boot via the "BT Tools" fastboot menu voice.
I don't exactly know why, but this way I manage to boot on a clean Android install and then restore my TWRP backup.
There's just a little problem: if I boot normally the system goes straight to the TWRP and won't boot.
I always need to go in the fastboot menu and select "BT Tools".
i was going through a similar reboot process last night. I realized that my issue was that I had xposed installed and had to uninstall it. however, I realized that after I wiped internal storage.
thus, my solution was to wipe everything (cache, dalvik, data, & internal storage), then mfastboot the stock ROM, then flash TWRP, then restore nandroid.
however, make sure to copy your nandroid to your computer first - you can transfer it back to the phone after flashing TWRP. you may have to perform a small nandroid via TWRP just to setup the right folder names, but you can still transfer the nandroid folder to your phone while the phone is in recovery.
hope this helps.
jco23 said:
i was going through a similar reboot process last night. I realized that my issue was that I had xposed installed and had to uninstall it. however, I realized that after I wiped internal storage.
thus, my solution was to wipe everything (cache, dalvik, data, & internal storage), then mfastboot the stock ROM, then flash TWRP, then restore nandroid.
however, make sure to copy your nandroid to your computer first - you can transfer it back to the phone after flashing TWRP. you may have to perform a small nandroid via TWRP just to setup the right folder names, but you can still transfer the nandroid folder to your phone while the phone is in recovery.
hope this helps.
Click to expand...
Click to collapse
First of all, thanks for your reply.
I manage to get something to work by simply boot via the "BT Tools" fastboot menu voice.
I don't exactly know why, but this way I manage to boot on a clean Android install and then restore my TWRP backup.
There's just a little problem: if I boot normally the system goes straight to the TWRP and won't boot.
I always need to go in the fastboot menu and select "BT Tools".
Any hint on why this is happening?
edmael said:
First of all, thanks for your reply.
I manage to get something to work by simply boot via the "BT Tools" fastboot menu voice.
I don't exactly know why, but this way I manage to boot on a clean Android install and then restore my TWRP backup.
There's just a little problem: if I boot normally the system goes straight to the TWRP and won't boot.
I always need to go in the fastboot menu and select "BT Tools".
Any hint on why this is happening?
Click to expand...
Click to collapse
you could be missing this line: mfastboot getvar max-download-size
I used the guide here: http://forum.xda-developers.com/moto-x/general/xt1060-lollipop-5-1-ota-fxz-thread-t3139519
granted, you appear to have a different model than mine, but the process should be the same.
jco23 said:
you could be missing this line: mfastboot getvar max-download-size
I used the guide here: http://forum.xda-developers.com/moto-x/general/xt1060-lollipop-5-1-ota-fxz-thread-t3139519
granted, you appear to have a different model than mine, but the process should be the same.
Click to expand...
Click to collapse
Yes, I skipped that line and removed it from the .xml of the images I flashed because I found some guides that suggested it.
Now I'm really tempted to re-flash everything using that command first.
edmael said:
Yes, I skipped that line and removed it from the .xml of the images I flashed because I found some guides that suggested it.
Now I'm really tempted to re-flash everything using that command first.
Click to expand...
Click to collapse
All removing that line does is prevent the system partition from error-ing out during the flashing process, which is why it's suggested to remove the line if you are using RSD-Lite to flash an image
mastarifla said:
All removing that line does is prevent the system partition from error-ing out during the flashing process, which is why it's suggested to remove the line if you are using RSD-Lite to flash an image
Click to expand...
Click to collapse
I flashed it using the -P option so I guess it's just the same as using that line, right?
Also: the removal of that line was not only in your guide so I immediatly deleted it
edmael said:
I flashed it using the -P option so I guess it's just the same as using that line, right?
Also: the removal of that line was not only in your guide so I immediatly deleted it
Click to expand...
Click to collapse
Flashing with mfastboot with the -P option is the same, you can verify the option exists by just typing in mfastboot in the command line, it will show you all the commands and what they do
I didn't want to have people dependent on using RSD-Lite (or any particular program) to flash the System Image, as it then makes a Windows machine the only thing possible to flash this image plus it uses Internal Moto Only software (legal issues), so I tried to find a better way to make mfastboot work properly for all types of computers
another thing I have noticed is that my phone kept getting stuck on the boot image screen (failed to proceed to the boot animation screen). to resolve this, I made sure to flash SU via TWRP after flashing my ROM via TWRP (or restoring a nandroid).
mastarifla said:
Flashing with mfastboot with the -P option is the same, you can verify the option exists by just typing in mfastboot in the command line, it will show you all the commands and what they do
I didn't want to have people dependent on using RSD-Lite (or any particular program) to flash the System Image, as it then makes a Windows machine the only thing possible to flash this image plus it uses Internal Moto Only software (legal issues), so I tried to find a better way to make mfastboot work properly for all types of computers
Click to expand...
Click to collapse
I really appreciated that (proud Linux User here), I tried mfastboot on Linux and even RSD-Lite on my Windows machine, but both of them failed to get my phone working with the files you provided in the other thread.
Now I'm stuck with this problem: every boot I need to select BT Tools and wait some minutes for my phone to boot.
I still don't get why it only boot in TWRP and I still don't get how to fix this
edmael said:
I really appreciated that (proud Linux User here), I tried mfastboot on Linux and even RSD-Lite on my Windows machine, but both of them failed to get my phone working with the files you provided in the other thread.
Now I'm stuck with this problem: every boot I need to select BT Tools and wait some minutes for my phone to boot.
I still don't get why it only boot in TWRP and I still don't get how to fix this
Click to expand...
Click to collapse
you may need to wipe internal storage and mfastboot everything from scratch...
jco23 said:
you may need to wipe internal storage and mfastboot everything from scratch...
Click to expand...
Click to collapse
Already did that (the first time I didn't even tried booting with BT Tools, but the effects were the same), but nothing new happened.
edmael said:
I really appreciated that (proud Linux User here), I tried mfastboot on Linux and even RSD-Lite on my Windows machine, but both of them failed to get my phone working with the files you provided in the other thread.
Now I'm stuck with this problem: every boot I need to select BT Tools and wait some minutes for my phone to boot.
I still don't get why it only boot in TWRP and I still don't get how to fix this
Click to expand...
Click to collapse
Have you tried flashing the TWRP System Backup that I provided? It may fix the issue that you are seeing currently
mastarifla said:
Have you tried flashing the TWRP System Backup that I provided? It may fix the issue that you are seeing currently
Click to expand...
Click to collapse
Yes, tried, but nothing happens (except that it boots when I go into BT Tools).
I think there's something wrong with my partition scheme because it always go straight to TWRP.
If I were on a GNU/Linux distro I'd check the grub config because it seems it boot from the wrong partition, but on Android I don't know if/how that's possible.
does it boot up when you flash the stock recovery? perhaps you may need to let it boot up first before installing TWRP?
did you happend to type "mfastboot flash boot twrp.img"? that could be the issue, as the command should be "mfastboot flash recovery twrp.img, right?
sorry I can't be more helpful, as I'm sure this is frustrating for you. just trying to grasp at straws here....
jco23 said:
does it boot up when you flash the stock recovery? perhaps you may need to let it boot up first before installing TWRP?
sorry I can't be more helpful, as I'm sure this is frustrating for you. just trying to grasp at straws here....
Click to expand...
Click to collapse
Don't be sorry, you're helping me!
Also: I'm not much frustrated since I have a working phone right now, I just need do avoid rebooting it
I tried to flash the stock recovery (found here: http://forum.xda-developers.com/moto-x/general/official-collection-firmwares-fxz-sbf-t3146628, used this: XT1052_GHOST_RETEU_5.1_LPA23.12-15_cid7_CFC.xml.zip) but if I'm not wrong (did that yesterday in the late night) it just booted to the Android with the red triangle on it (so, no booting for me).
EDIT:
No, I don't think I did that. But let's suppose I did, how can I revert it?
Also: is there a way to see my partition scheme so I'm sure everything's fine?
edmael said:
Don't be sorry, you're helping me!
EDIT:
No, I don't think I did that. But let's suppose I did, how can I revert it?
Also: is there a way to see my partition scheme so I'm sure everything's fine?
Click to expand...
Click to collapse
You can revert it by taking the boot.img from the 5.1 zip and flashing that using the command...
mfastboot flash boot boot.img
The partitioning you are mentioning is probably the gpt.bin, but that is typically done near the very beginning of the flashing process
here's what I would do:
boot into recovery
connect phone to PC, copy your nandroid and any other files from the SDcard to your PC
within recovery, wipe cache/dalvik/data/internal storage
reboot to bootloader
run the mfastboot commands as shown (but use the getvar-download....) in place of editing the xml zip file
after running the mfastboot commands, let the phone boot up to stock and establish itself
reboot to bootloader and flash TWRP
again, just a suggestion on what I would do - seems like @mastarifla is a great resource and is more knowledgeable than me, so maybe you'll get some confirmation.
good luck!
Ok, I still haven't solved this issue.
I tried with re-flashing everything, but I still get the problem.
I think it's a problem with the partition scheme because even by flashing just partition gpt.bin and motoboot.img when I launch reboot-bootloader it reboot the phone into TWRP.
I think the TWRP is in the wrong partition and/or I've got a wrong partition scheme, but I don't know how to check it or how to fix it.
edmael said:
Ok, I still haven't solved this issue.
I tried with re-flashing everything, but I still get the problem.
I think it's a problem with the partition scheme because even by flashing just partition gpt.bin and motoboot.img when I launch reboot-bootloader it reboot the phone into TWRP.
I think the TWRP is in the wrong partition and/or I've got a wrong partition scheme, but I don't know how to check it or how to fix it.
Click to expand...
Click to collapse
So your phone thinks that the bootloader is your recovery?
That is actually pretty strange, you could take a look at the Linux kernel on Motorola's GitHub and see if it has any info on the partitioning structure or what happens when a reboot-bootloader command is sent to the phone
It sounds as if the recovery and the bootloader swapped places, as the fastboot menu is considered a part of the bootloader, and if you are not seeing that on the hardware key bootup, then there is something definitely wrong, if you do reboot-recovery does it take you to the bootloader/fastboot menu?

Remove device encryption

Hi everybody, i would like to remove the devices encription under Security-Encryption
Under Encrypt device i've got Encrypted.
I've tried to restore to factory default, from recovery, from fastboot using format userdata, but, no way.
How i can remove the encryption?
My device is ZE552KL
Thanks
swet90 said:
Hi everybody, i would like to remove the devices encription under Security-Encryption
Under Encrypt device i've got Encrypted.
I've tried to restore to factory default, from recovery, from fastboot using format userdata, but, no way.
How i can remove the encryption?
My device is ZE552KL
Thanks
Click to expand...
Click to collapse
I had a same issue with this device, but I had some experiment.
If your device is unlocked, you can flash TWRP, boot to recovery, wipe, format data.
Backup your data first! It will erase all of your data (Very noob answer)
Totally careful, don't do this if you didn't want a unexpected things. Or something...
The ASUS Zenfone 3 comes shipped encrypted by default. This is required by Google's Play Services agreement for phone OEMs. You cannot remove decryption on the Zenfone 3 without using a custom ROM.
sensi277 said:
The ASUS Zenfone 3 comes shipped encrypted by default. This is required by Google's Play Services agreement for phone OEMs. You cannot remove decryption on the Zenfone 3 without using a custom ROM.
Click to expand...
Click to collapse
Thanks!
TWRP isn't allowing me to Mount my Storage because it's asking for a password I don't know.
ZeldaLinkAaron said:
TWRP isn't allowing me to Mount my Storage because it's asking for a password I don't know.
Click to expand...
Click to collapse
I'm having the same issue. I just got my daughter this phone (the 552KL?), downloaded the official Asus bootloader unlocker APK and ran it, then rebooted to the bootloader to flash TWRP.
TWRP installed, but wants a password to unlock it. Before the bootloader unlock, I did put her Google account on the phone, but the tool said it would completely wipe the phone. Either way, I tried her google account password, but it just says wrong password. Same thing when I tried to boot to system.
Any tips?
@Flapjack
Format through twrp
wang1chung said:
@Flapjack
Format through twrp
Click to expand...
Click to collapse
That's what I ended up doing. I got some help on another thread. The problem I'm having now is that I can't format /cache. It's really weird. If I do a full wipe on the phone, it says it can't format it. I even tried formatting it through fastboot ("fastboot erase cache" then "fastboot format cache"), which says "OKAY finished", but doesn't fix the issue when trying to wipe cache inside of TWRP.
This phone is flat out weird compared to other phones. I don't get the bootloader unlock screen. It doesn't seem to want to boot system... it just keeps going to TWRP. On the few times I have gotten to boot into system (after flashing Carbon 6.1 unofficial), it ends up hanging on a blank screen. Windows makes a sound that a new device is connected, so I'm guessing it's connecting in EDL mode or something (no devices show with a "fastboot devices" or a "adb devices").
I really don't know where to go from here. I'm used to working with Axons, Motorolas, and OnePlus phones. They just work.
@Flapjack
The cache issue is a glitch with the build of twrp, it's not a big deal. There's a workaround posted somewhere, can't remember. Just use the file browser and delete the files on it. I think there's only one file that isn't 0 bytes.
Have you flashed magisk?
Sometimes a full wipe (system/data) and then flashing the raw firmware helps. Try magisk first.
wang1chung said:
@Flapjack
The cache issue is a glitch with the build of twrp, it's not a big deal. There's a workaround posted somewhere, can't remember. Just use the file browser and delete the files on it. I think there's only one file that isn't 0 bytes.
Click to expand...
Click to collapse
So you're saying it doesn't need to be actually wiped, I just need to go into cache and delete all the files in there? How about getting it to boot to system? It just keeps booting to recovery. Not sure when it started that, as after the first time I flashed the ROM, I was able to get it to boot to system by pressing the power button when the "bootloader unlocked" screen came up. That isn't working now.
Have you flashed magisk?
Sometimes a full wipe (system/data) and then flashing the raw firmware helps. Try magisk first.
Click to expand...
Click to collapse
For my first non-stock ROM flash, I flashed the Oreo modem, Carbon 6.1 unofficial ROM, ARM64 Gapps nano, and Magisk 16.0... all at once. I tried booting and it looked like it was setting up... but as I mentioned, it just went to a blank screen. After trying a full wipe and seeing the "couldn't wipe cache" message, I figured that was why.
How will flashing Magisk help me with wiping the cache partition or getting the thing to boot right? Sorry for my ignorance.
Flapjack said:
So you're saying it doesn't need to be actually wiped, I just need to go into cache and delete all the files in there?
Click to expand...
Click to collapse
wiping/formatting cache is the same as deleting all the files. Wiping is easier but as I said, doesn't work at the moment.
Flapjack said:
How will flashing Magisk help me with wiping the cache partition or getting the thing to boot right? Sorry for my ignorance.
Click to expand...
Click to collapse
magisk won't help with cache, but it will remove the verity flag that is tripped from having twrp. From my experience, if I don't flash magisk, it'll bootloop.
Yeah.... absolutely nothing I do will get it to boot to system now. I've flashed the ROM and Magisk, but no matter what, it keeps booting to recovery.
There were two folders under /cache... "Lost&Found" and "recovery". I deleted both, but that didn't help.
---------- Post added 5th July 2018 at 12:40 AM ---------- Previous post was 4th July 2018 at 11:44 PM ----------
wang1chung said:
wiping/formatting cache is the same as deleting all the files. Wiping is easier but as I said, doesn't work at the moment.
Click to expand...
Click to collapse
So I take it I did it right? I would say it's "pretty much" the same. Formatting a partition is different than deleting files/folders in an existing partition. Still, if deleting the files/folders is good enough, then that rules out why the system wouldn't boot after the first ROM install attempt. It would also explain why "fastboot erase cache" seems to work, but TWRP still throws an error. Fastboot erase is probably working just fine.
magisk won't help with cache, but it will remove the verity flag that is tripped from having twrp. From my experience, if I don't flash magisk, it'll bootloop.
Click to expand...
Click to collapse
Is there a custom version of Magisk for this phone? I'm just installing the usual magisk 16.0 zip file you can get on their site, but it doesn't seem to be helping with the phone continuously booting into recovery. Is there a way to remove that verity flag via adb?
@Flapjack
Magisk modifies one of the partitions to get around the flag (I believe), not doable through adb.
Standard magisk off their site is fine
Try this:
Format system/data
Flash custom Rom
Flash magisk
"Wipe" cache and davlik
Reboot
OR
Flash the raw firmware
Flash twrp
Flash whichever custom Rom & gapps where needed
Flash magisk
Factory reset and "Wipe" cache and dalvik
Reboot
wang1chung said:
@Flapjack
Magisk modifies one of the partitions to get around the flag (I believe), not doable through adb.
Standard magisk off their site is fine
Try this:
Format system/data
Flash custom Rom
Flash magisk
"Wipe" cache and davlik
Reboot
Click to expand...
Click to collapse
No go. Still just boots into recovery. Here's what the boot screen looks like (then the Asus logo pops up, then recovery loads)
Code:
< More information :
Dm-Verity in EIO mode
Your device software can't be
checked for corruption. Please
lock the bootloader.
Visit this link on another device:
g.co/ABHg.co/placeholder
Your device will shutdown in 10 seconds
I can press the power button to boot immediately, or wait the 10 seconds... which just boots anyway (doesn't shut down). If I press the volume buttons, I get the following options menu:
Power off
Restart
Recovery
Fastboot
Back to previous page
Flash the raw firmware
Flash twrp
Flash whichever custom Rom & gapps where needed
Flash magisk
Factory reset and "Wipe" cache and dalvik
Reboot
Click to expand...
Click to collapse
I haven't tried this yet. Would this be the best guide to follow?
HOW-TO: Go back to Stock Rom on ZE552KL/ZE520KL
https://forum.xda-developers.com/zenfone-3/how-to/how-to-to-stock-rom-recovery-zenfone-3-t3666223
@Flapjack
That is the correct screen for an unlocked bootloader.
Try this guide for the raw firmware instead, and verify it boots to the OS. Then flash twrp and the rom again.
wang1chung said:
@Flapjack
That is the correct screen for an unlocked bootloader.
Try this guide for the raw firmware instead, and verify it boots to the OS. Then flash twrp and the rom again.
Click to expand...
Click to collapse
Grrr... no matter what I do, it won't flash. The guide says to put it in fastboot mode, but the flash tool won't detect it (even though "fastboot devices" shows it just fine). If I boot it to recovery, it'll show up in the tool, but never actually flashes (see screenshot).
Flapjack said:
Grrr... no matter what I do, it won't flash. The guide says to put it in fastboot mode, but the flash tool won't detect it (even though "fastboot devices" shows it just fine). If I boot it to recovery, it'll show up in the tool, but never actually flashes (see screenshot).
Click to expand...
Click to collapse
This is why I stopped using Windows. Maybe try disabling "driver signature verification"? Swap USB ports? My computer has some high power and low power USB ports, certain devices won't work properly in the low power ones. A couple of guides mentioned unplugging and re-plugging the USB.
wang1chung said:
This is why I stopped using Windows. Maybe try disabling "driver signature verification"? Swap USB ports? My computer has some high power and low power USB ports, certain devices won't work properly in the low power ones. A couple of guides mentioned unplugging and re-plugging the USB.
Click to expand...
Click to collapse
That's a good idea. I'm going through a powered hub right now, but who knows...
I'll try that as soon as I get home.
Ok, different computer. This is my laptop I normally use to flash.
This time, I can get it it to start to flash, but with a second or two, it throws an error (see attached).
Flapjack said:
Ok, different computer. This is my laptop I normally use to flash.
This time, I can get it it to start to flash, but with a second or two, it throws an error (see attached).
Click to expand...
Click to collapse
are you running ASUS flash tool with admin privileges?

please helpe me

i try instaling cortex 7.00( 7.1.2) after al is ok after the phone reboot evry time when i using i try wipe data with twrp
after reboot the phon don t rebot just bootloop i try unstaling stock image with toolkit evry think is ok but the same brob just bootloop i can enter in fastboot mode but not in stock recovery
samone know the solution ?or my fhone is dead
leroilion02 said:
i try instaling cortex 7.00( 7.1.2) after al is ok after the phone reboot evry time when i using i try wipe data with twrp
after reboot the phon don t rebot just bootloop i try unstaling stock image with toolkit evry think is ok but the same brob just bootloop i can enter in fastboot mode but not in stock recovery
samone know the solution ?or my fhone is dead
Click to expand...
Click to collapse
Since your phone is unlocked, I would try to flash a full Google image using the included flash-all.bat (instructions are on the same page as the image downloads). Not being able to access recovery mode may indicate a more serious problem.
v12xke said:
Since your phone is unlocked, I would try to flash a full Google image using the included flash-all.bat (instructions are on the same page as the image downloads). Not being able to access recovery mode may indicate a more serious problem.
Click to expand...
Click to collapse
do you think my phone still alive
leroilion02 said:
do you think my phone still alive
Click to expand...
Click to collapse
Too early to tell. Google intended the image files to be a foolproof way to "reset" the phone to factory stock. This is the first thing you have to try. Set up ADB/Fastboot on your PC and use it to communicate with, and send commands to your phone.
I've gotten myself into the same situation a few times and flashing the full stock image with flash-all.bat command has always gotten me out of it so far. After I'm back on stock I just start from scratch again and flash recovery, custom rom and root.
jhs39 said:
I've gotten myself into the same situation a few times and flashing the full stock image with flash-all.bat command has always gotten me out of it so far. After I'm back on stock I just start from scratch again and flash recovery, custom rom and root.
Click to expand...
Click to collapse
i flash the full factory image with fastboot all is ok after fishing just bootloop i don t know what is the probleme
leroilion02 said:
i flash the full factory image with fastboot all is ok after fishing just bootloop i don t know what is the probleme
Click to expand...
Click to collapse
fastboot FORMAT (not erase or wipe) userdata, cache and system capturing the screen (or text from each command). Try flash-all.bat again. Which image are you flashing?
v12xke said:
fastboot FORMAT (not erase or wipe) userdata, cache and system capturing the screen (or text from each command). Try flash-all.bat again. Which image are you flashing?
Click to expand...
Click to collapse
the last android 7.1.1
when i flash with flash-all.bat the note progresse he stop with message fichier not fond
leroilion02 said:
the last android 7.1.1
when i flash with flash-all.bat the note progresse he stop with message fichier not fond
Click to expand...
Click to collapse
do you think my phone can reboot
leroilion02 said:
do you think my phone can reboot
Click to expand...
Click to collapse
Can you enter recovery mode after all you have tried? Or do you only have access to fastboot in broader?
Sent from my Nexus 6P using XDA-Developers Legacy app
CyberpodS2 said:
Can you enter recovery mode after all you have tried? Or do you only have access to fastboot in broader?
Sent from my Nexus 6P using XDA-Developers Legacy app
Click to expand...
Click to collapse
just fastboot
leroilion02 said:
do you think my phone can reboot
Click to expand...
Click to collapse
I don't know, you're providing conflicting information. What happened when you fastboot formatted each of the 3 partitions?
v12xke said:
I don't know, you're providing conflicting information. What happened when you fastboot formatted each of the 3 partitions?
Click to expand...
Click to collapse
when i flash the phon on fastboot al is ok the bootloader after the radio after the system after vendor all ok the phon just bootloop
when i try flash with flash-all.bat the procedur don t progress just the radio and bootlaoder after just error message files don t exist
leroilion02 said:
when i flash the phon on fastboot al is ok the bootloader after the radio after the system after vendor all ok the phon just bootloop
when i try flash with flash-all.bat the procedur don t progress just the radio and bootlaoder after just error message files don t exist
Click to expand...
Click to collapse
No. Fastboot FORMAT the 3 partitions (for the 3rd time). Capture the response from each of these commands:
fastboot format userdata
fastboot format cache
fastboot format system
v12xke said:
No. Fastboot FORMAT the 3 partitions (for the 3rd time). Capture the response from each of these commands:
fastboot format userdata
fastboot format cache
fastboot format system
Click to expand...
Click to collapse
ok i try tomorow and i tell you the Result

[Root][Oreo][Guide] How to flash and root G5 with (opt. remove encryption)

Hello guys,
after testing around for days i thought it might be helpfull to post the honestly pretty easy procedure to install stock Oreo, root it and remove encryption if needed.
Disclaimer:
I am not responsible for bricked devices, dead SD-cards, lost data, etc.
Back up your data, app settings, be sure you remember your passwords, your device will be empty!​
Edit: It seems, theres a bug that, if you read this post on XDA labs, won't show you everything, it seems like it randomly skips some parts.
What you need:
Unlocked Bootloader
Motorola USB drivers
15 sec adb and fastboot uploaded by myself since the original links aren't working anymore https://multifilemirror.com/hgxxyrfyd7rx.
I originally got them from here (you may have to go into your device manager and select the adb drivers for your phone f.e. when you want to use adb push in recovery, see original xda site).
This will also install the google drivers.
TWRP 32bit (v.3.2.3-0)
TWRP 64bit (v.3.2.1-0)
Disable Dm-Verity & ForceEncrypt from here
Magisk and MagiskManager. Newest should probably work, i used Magisk-18.0 and MagiskManager-6.1.0
Most recent Oreo firmware (edit 08.19)
(I used this Oreo firmware found in this post)
Steps:
Be sure you backed up your data and app settings, your pictures, downloads, etc. It will all be lost!
Please read all steps before you begin.
Extract the firmware into your adb folder (where you installed adb, should contain 4 files), copy both twrp (32 & 64 bit) in there, too.
Boot into bootloader (hold power+vol down) and open a terminal inside your adb folder (shift+rightclick) and type in
Code:
fastboot flash recovery name_of_twrp64bit_file.img
Boot into recovery (select recovery with vol buttons, then press power) and make a backup of EFS partition and persist folder (use file manager under advanced) and make another backup of system, boot and data and save both backups and persist to your SD-card or better your computer, too.
reboot into bootloader and check if your bootloader version is B.8.31 or above.
If it is B.8.31 or above DON'T FLASH BOOTLOADER!!! Because if you flash bootloader of the same version or below, it would hardbrick your device!
That also means if you f.e. want to downgrade to Nougat, just ignore following lines:
Code:
fastboot flash partition gpt.bin
fastboot flash bootloader bootloader.img
Also, unless youre sure your persist is absolutly ok (check here), please also omit the following lines:
Code:
fastboot erase modemst1
fastboot erase modemst2
They would reset your IMEI and usually it gets restored from your persist, but only if its not buggy.
Even if your persist is fine, as far as i know theres no harm in not using this commands (my persist is fine and i didnt use them).
Now paste following commands in your command promt in adb, in case you are BELOW B.8.31, add the bootloader commands from above between the first and second line:
Code:
fastboot oem fb_mode_set
fastboot flash logo logo.bin
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot flash dsp adspso.bin
fastboot flash oem oem.img
fastboot flash system system.img_sparsechunk.0
fastboot flash system system.img_sparsechunk.1
fastboot flash system system.img_sparsechunk.2
fastboot flash system system.img_sparsechunk.3
fastboot flash system system.img_sparsechunk.4
fastboot flash system system.img_sparsechunk.5
fastboot flash system system.img_sparsechunk.6
fastboot flash system system.img_sparsechunk.7
fastboot flash system system.img_sparsechunk.8
fastboot flash modem NON-HLOS.bin
fastboot flash fsg fsg.mbn
fastboot erase cache
fastboot erase userdata
fastboot erase customize
fastboot erase clogo
fastboot oem fb_mode_clear
fastboot reboot
Please make sure that it really flashed all sparsechunk 0-8.
Let your phone reboot itself after installation is done, then return to bootloader and flash twrp 64bit:
Code:
fastboot flash recovery name_of_twrp64bit_file.img
Boot into recovery, since your device is encrypted it will ask for a password, click cancel, then go to WIPE and click on FORMAT DATA and confirm with yes.
This will remove the encryption of your data partition.
Go back to twrp main page and click on REBOOT then RECOVERY.
Once back in twrp, either copy Disable Disable_Dm-Verity_ForceEncrypt.zip and Magisk-18.zip and MagiskManager-6.1.apk to your SD-card or use
Code:
adb push name_of_file /external_sd
or
adb push name_of_file /sdcard
to copy the files to your SD-card (external_sd) or Internal-Storage (sdcard). For this you may have to manually configure your adb drivers in device manager, see here under Notes.
In twrp go now to INSTALL and flash "disable-dm-verity&encrypt" an then REBOOT and SYSTEM.
Return to recovery and flash "Magisk-18.0.zip", wipe Cache/Dalvik at the end and reboot System
Once System has rebooted, install MagiskManager-6.1.0.apk from your SD-card.
MagiskManager should say that Magisk is installed and in settings under security, your phone should be decrypted.
Note: MagiskManager will only show full information when it has internet access, all you see without is if Magisk is installed.
If you want to encrypt your device again, do it but flash twrp 32bit, too, if it asks for a password, it should be your usual password which you also have to enter on every boot.
Some explanation:
Why twrp 64bit?
Because twrp 32bit is able to bypass encryption, however, it causes some problems:
In fact, probably every twrp without the bypass encryption feature would work f.e. older 32bit version 3.1.0. but 64bit offers some features as EFS backup.
If you flash 32bit directly it can bypass the standard encryption but formatting data fails every time when you booted System previously.
When you reboot recovery and format data again it works, but it needs to fail first, just rebooting into recovery 2 times doesnt work.
I dont know what would happen if you (after using your phone normally) reboot recovery and f.e. want to do a backup from data, though im sure i testet it out, but i probably forgot.
You need it later when you want to encrypt your phone again, for me it didnt decrypt data after i reencrypted my phone using my password.
Why reboot System between flashing Disable-encryption and Magisk?
If you do not, you get heavy lags in the first 2 minutes after rebooting System, MagiskManager will say that Magisk isnt installed and then your phone will crash and reboot. But after that 2. reboot everything works fine again, Magisk is back, no lags.
I remembered this post from Johny Cipeli, between flashing no-verity and magisk he wrote to reboot, so i tried and it worked without lags and crash.
You don't need to remove encryption:
You can root your phone without flashing Disable_dm-verity_and_force-encrypt, use then twrp 32bit, dont format data, just flash magisk.
I can say that it should work, because that was one of my first attempts (and it worked for me), however i didnt write down what i was doing so i cant tell you step by step.
Additional:
In case you're searching Viper4Arise for Oreo, the Aroma installer won't work, use the Magisk module and install in MagiskManager. You can download it here from Zackptg5
If youre also annoyed by that One-Nav vibration, you can try using ExKernelManager app and activate the powersave mode. Although i think its officially not for G5, the app works, maybe that only refers to the Kernel and not to the app.
I tried Flyhigh Kernel, it didnt boot after flashing it, if you know a working Kernel for G5 which can disable One-Nav vibration, please write an answer.
My device:
Rooted Stock Oreo 8.1.0: OPP28.85-16
Bootloader: B.8.31
Model: XT1676 reteu
Stock Kernel
Thanks to:
Snoop05 for 15 sec adb and fastboot.
TheFixItMan for twrp.
Zackptg5 for "Universal DM-Verity, ForceEncrypt, Disk Quota Disablers".
topjohnwu for Magisk.
freeZbies for Official Oreo 8.1.0 OPP28.85-16 Fastboot Firmware.
Wolfcity, woozie.2007 and TheFixItMan for answering many of my questions!
- reserved -
ok friend, thank you for this. I think you dont need to flash twrp 64, i only flash official twrp 32, which indeed doesnt have the option for backup persist, but only efs. Maybe is someone else that will try your method to decrypt, I will try next time when I flash the stock, maybe to the next patch update. Good luck and A happy new year !!!
---------- Post added at 01:31 AM ---------- Previous post was at 01:26 AM ----------
LE: You cant root without format data partition, because flashing twrp, when twrp decrypt data you cant see anything on data partition, so you need to format it even if dont need to decrypt the phone
Nice guide @G5-User7080 .
For me everything seems to be correct, I can´t say anything device specific as I own a potter but there shouldn´t be big differences.
There´s one sentence I´m not sure about:
G5-User7080 said:
Because if you flash bootloader of the same version or below, it would hardbrick your device!
That also means if you f.e. want to downgrade to Nougat, just ignore following lines.....
Click to expand...
Click to collapse
It´s clear that downgrading the bootloader can hardbrick your device but why should there be any risk in flashing the same bootloader?
If I flash the fastboot firmware I´m on shouldn´t it be ok? Where did you get that information from?
I´m about to do that on a device of a friend of mine , he is rooted on 7.0 and wants to go the way to flash the firmware he´s on and after that take the OTA up to Oreo.
He could flash the Oreo firmware directly but he prefers to use the firmware from which he knows it´s working and is the correct one.
Very careful guy.
Edit: I just recognized that the part you called steps incl.the part I quoted isn't visible in XDA Labs, I'm only able to see it in mobile browser. Also some download links aren't there, on XDA Labs there is only the one for the 64bit recovery visible, not the one for 32bit. Maybe it's some kind of format problem, bb codes or else.
Some screenshots from XDA Labs and Chrome mobile to show the differences.
Wolfcity said:
It´s clear that downgrading the bootloader can hardbrick your device but why should there be any risk in flashing the same bootloader?
If I flash the fastboot firmware I´m on shouldn´t it be ok? Where did you get that information from?
Click to expand...
Click to collapse
I read this more then one time, although i could just find one source for now: "Flashing bootloader of equal or minor version will hardbrick your device" from Oreo Fastboot firmware.
I dont know why flashing bootloader of the same version would do lead to a hardbrick, but didnt want to try it out myself, also i see no problem in not flashing the bootloader when you already have the same version.
Wolfcity said:
Edit: I just recognized that the part you called steps incl.the part I quoted isn't visible in XDA Labs, I'm only able to see it in mobile browser. Also some download links aren't there, on XDA Labs there is only the one for the 64bit recovery visible, not the one for 32bit. Maybe it's some kind of format problem, bb codes or else.
Click to expand...
Click to collapse
Thats weird, i dont have XDA labs (thats the mobile app, right?), i wrote it on XDA desktop version and only used the size, code, color and list tags, hmm maybe it has problems with the sorted list, for every other part i used the unsorted ones with dots instead of numbers.
Quick test:
Test One:
this is made
in an unordered
list, using
list tags
Test Two:
this is now made
in an ordered list
counting from one to four
using list=1 tags
Can you read both lists with each four points?
And thanks for mentioning the bootloader thing,.. i realized i forgot to paste the lines in to flash bootloader in case you are below b8.31 ehee..
Wolfcity said:
Some screenshots from XDA Labs and Chrome mobile to show the differences.
Click to expand...
Click to collapse
wtf, it just skips random parts ?!!!
I have no idea what could cause this.. ill better add a note at the beginning of the post...wow
To flash the same vers of bootloader is not a problem, only the below one will hardbrick the phone
G5-User7080 said:
wtf, it just skips random parts ?!!!
I have no idea what could cause this.. ill better add a note at the beginning of the post...wow
Click to expand...
Click to collapse
Your lists are both readable.
I took a look at the BB codes as it's known that some of them are not working on XDA Labs like SIZE or HIGHLIGHT. In that case the BB codes are shown in the text but there's nothing missing.
Maybe it has something to do with the use of
[*] in your text?
Edit: Have you changed something in your text now? It seems to be complete on XDA Labs now too...
Wolfcity said:
Your lists are both readable.
I took a look at the BB codes as it's known that some of them are not working on XDA Labs like SIZE or HIGHLIGHT. In that case the BB codes are shown in the text but there's nothing missing.
Maybe it has something to do with the use of
[*] in your text?
Edit: Have you changed something in your text now? It seems to be complete on XDA Labs now too...
Click to expand...
Click to collapse
the [*] just create new lines for a list, and yes, i edited it two times, first, i added that one should use the bootloader commands in case of being below b831 and then i added the info about missing things on xda labs, but i didnt change anything on the lists itself,...

Categories

Resources