[Guide] How to "fix" WiFI after come back from custom roms to Stock rom. - Xiaomi Mi A1 Guides, News, & Discussion

Ok guys after lots of tests, I've managed that the fastest and easiest way to have wifi fixed on Stock android rom is to delete some lines (they are 2-3) in a file located on "/persist" folder.
PROCEDURE
1) You need magisk (or any other form of root) and a file manager that can edit (with root permissions) systems files.
Once you have done it, go on root "/persist" and find the file "wlan_mac.bin", open it with a text editor and delete all lines in it(let it empty but don't delete it, just delete lines in it), after save and reboot phone, done.
2) This is faster, it is going to do same thing but without magisk. Just flash the WiFi_fix.zip (see file below in attachment) from Twrp and it will replace the corrupted wifi_mac.bin with an empty one.
Optional: if you know how to generate a xiaomi vendor mac address, just replace the empty wlan_mac.bin from my WiFi_fix.zip file with yours.
Comment:
*This is the fast and easy but not the best one. I'm finding a workaround.
Anyway this method isnt a problem you are going to use base Mac Address and not the vendor one. In therms of warranty I don't think it will change something.
PS: Actually this will be fixed on custom rom that used to edit that file.

Good work!
I have same problem. When i flash stock rom via mi flshtool i can't connect to wifi. It shows wifi but after entering pwd it shows only saved. Can't connect at all.can u explain procedure when flashed stock rom. Flashing persist.img via fastboot will fix? Without rooting. Sorry for my bad English.
---------- Post added at 03:30 PM ---------- Previous post was at 03:23 PM ----------
So you are saying after flashing stock rom i have to unlock bl and root. And then edit system????? Sorry im a noob to Mi A1

kishanb1988 said:
I have same problem. When i flash stock rom via mi flshtool i can't connect to wifi. It shows wifi but after entering pwd it shows only saved. Can't connect at all.can u explain procedure when flashed stock rom. Flashing persist.img via fastboot will fix? Without rooting. Sorry for my bad English.
---------- Post added at 03:30 PM ---------- Previous post was at 03:23 PM ----------
So you are saying after flashing stock rom i have to unlock bl and root. And then edit system????? Sorry im a noob to Mi A1
Click to expand...
Click to collapse
Just connect phone in fastboot on pc. open cmd (you need fastboot and adb drivers installed on PC) and write this:
fastboot oem unlock (to unlock bootloader)
fastboot boot twrp-oreo-3.2.1-2.img (you need last official twrp from XDA for that. Name can be different, you have to write extaclty of your file)
Phone will boot on twrp. From install/flash magisk and reboot phone. Now you have magisk and root.
Download and installa a file manager like MixPlorer, Root explorer, MtManager and many others.
Go on "root" and find the folder "persist". In it you will find the file "wclan_mac.bin" just edit. If you still have issue I will made something that is going to do it automatically.

Thanks mate. I'll try ?, you save the hours of works. Thanks again

Has someone tried erasing then flashing persist.img?

Your method is not the fastest nor the best to reset the WiFi connection, You do not need to be root.
You must do the following:
The persist.img file must be downloaded from the following link
https://xiaomifirmware.com/guides-and-tips/restore-persist-partition-xiaomi-mi-a1/
“persist.img” file and move it to phone memory “/sdcard”.
1.- Enter fastboot mode, , you must have unlocked the bootloader
2.- Execute TWRP with the command fastboot boot twrp.img
3.- Open Terminal in TWRP Custom Recovery (go to "Advanced"> "Terminal").
4.- Type the following command:
dd if=/sdcard/persist.img of=/dev/block/mmcblk0p27
Click to expand...
Click to collapse
5.- Restart and with it the wifi will work.
Procedure taken from https://xiaomifirmware.com/guides-and-tips/restore-persist-partition-xiaomi-mi-a1/

speedunderx said:
Your method is not the fastest nor the best to reset the WiFi connection, You do not need to be root.
You must do the following:
The persist.img file must be downloaded from the following link
https://xiaomifirmware.com/guides-and-tips/restore-persist-partition-xiaomi-mi-a1/
“persist.img” file and move it to phone memory “/sdcard”.
1.- Enter fastboot mode, , you must have unlocked the bootloader
2.- Execute TWRP with the command fastboot boot twrp.img
3.- Open Terminal in TWRP Custom Recovery (go to "Advanced"> "Terminal").
4.- Type the following command:
5.- Restart and with it the wifi will work.
Procedure taken from https://xiaomifirmware.com/guides-and-tips/restore-persist-partition-xiaomi-mi-a1/
Click to expand...
Click to collapse
It is dangerous, I dont advise it.

SevenSlevin said:
It is dangerous, I dont advise it.
Click to expand...
Click to collapse
It works perfectly, it's more dangerous what you do.

deleted, double post.

speedunderx said:
It works perfectly, it's more dangerous what you do.
Click to expand...
Click to collapse
I don't think you have the idea of what you have done.
I will tell 2 points of the fact that it is dangerous:
1) for the not experted doing these things can easily bootloop/soft brick phone.
2) You flashed with "DD" and you have flashed a backup of another one so you are using his MacAddress.
Now tell me how safety is it if I know your MacAddress? (everyone who is going to flash it will have same MacAddress)
PS. in this case your MacAddress are:
Bluetooth: f4:f5:dB:e9:b6:dc
WiFi: f4:f5:dB:e9:b6:dd
check them on "settings, system, about phone, status".

SevenSlevin said:
I don't think you have the idea of what you have done.
I will tell 2 points of the fact that it is dangerous:
1) for the not experted doing these things can easily bootloop/soft brick phone.
2) You flashed with "DD" and you have flashed a backup of another one so you are using his MacAddress.
Now tell me how safety is it if I know your MacAddress? (everyone who is going to flash it will have same MacAddress)
PS. in this case your MacAddress are:
Bluetooth: f4:f5:dB:e9:b6:dc
WiFi: f4:f5:dB:e9:b6:dd
check them on "settings, system, about phone, status".
Click to expand...
Click to collapse
You're wrong, you should read the tutorial, and with regard to the Mac I have the usual Mac, so you know a Mac is the physical code of the hardware, therefore you can not change it just read, the problem is that when you install RR you delete the WiFi module that uses the stock firmware, while the custom ROM uses drivers, persist.img helps to restore the Bluethoot module and wifi and sometimes the imei.

speedunderx said:
You're wrong, you should read the tutorial, and with regard to the Mac I have the usual Mac, so you know a Mac is the physical code of the hardware, therefore you can not change it just read, the problem is that when you install RR you delete the WiFi module that uses the stock firmware, while the custom ROM uses drivers, persist.img helps to restore the Bluethoot module and wifi and sometimes the imei.
Click to expand...
Click to collapse
There's a persist.img in our fastboot ROM. Can we use that instead of what you linked?
Edit - Flashed the persist.img from the Fastboot ROM in EDL mode. I ended up with no sensors. Trying to reflash the entire ROM now. :'(
Edit 2-
1. Dirty Flashed ROM. Re-setup fingerprints. Reset network settings. Emptied out wlan.bin file, everything works except wifi.
2. Restored my personal backup of persist, re-setup fingerprints. Everything is now working.

oreo27 said:
There's a persist.img in our fastboot ROM. Can we use that instead of what you linked?
Edit - Flashed the persist.img from the Fastboot ROM in EDL mode. I ended up with no sensors. Trying to reflash the entire ROM now. :'(
I've already done it and have same your issue in past. Problem is that, that persist.img found on fastboot firmware stock, seems to non be complete and has "corrupted" (incomplete) WCNSS_qcom_wlan_nv.bin and WCNSS_wlan_dictionary.dat. And also it doesnt make the folder /persist/wifi_bin where are located other 2 folders "minus" and "plus".
In your case you have finished with no wifi, that isnt correct. You have wifi but you need to put phone next to router cause with those "corrupted" files it has really low range. To fix that you just need files that I've wrote above from someone that has correct files. In this case you ave done a backup, you just needed to copy wifi_bin folder, WCNSS_qcom_wlan_nv.bin and WCNSS_wlan_dictionary.dat from your backup.
Anyway actually I think you are using the hardware mac address that in most of phones starts with: 00:0a:f5 (it is the prefix of vendor Airgo networks that produce those chipsets and works under Qualcomm). I've seen also mac starting with: 00:00:00 that is the prefix of Xerox Corporation.
To turn back to your back vendor (XIaomi) mac address your last hope, as I know, is to use bluetooth mac. Considerading that you have a backup of it (it is located in /persist/bluetooth) and you have never touched it.
Click to expand...
Click to collapse

SevenSlevin said:
oreo27 said:
There's a persist.img in our fastboot ROM. Can we use that instead of what you linked?
Edit - Flashed the persist.img from the Fastboot ROM in EDL mode. I ended up with no sensors. Trying to reflash the entire ROM now. :'(
I've already done it and have same your issue in past. Problem is that, that persist.img found on fastboot firmware stock, seems to non be complete and has "corrupted" (incomplete) WCNSS_qcom_wlan_nv.bin and WCNSS_wlan_dictionary.dat. And also it doesnt make the folder /persist/wifi_bin where are located other 2 folders "minus" and "plus".
In your case you have finished with no wifi, that isnt correct. You have wifi but you need to put phone next to router cause with those "corrupted" files it has really low range. To fix that you just need files that I've wrote above from someone that has correct files. In this case you ave done a backup, you just needed to copy wifi_bin folder, WCNSS_qcom_wlan_nv.bin and WCNSS_wlan_dictionary.dat from your backup.
Anyway actually I think you are using the hardware mac address that in all phones starts with: 00:0a:f5.
To turn back to your back vendor mac address your last hope, as I know, is to use bluetooth mac. Considerading that you have a backup of it (it is located in /persist/bluetooth) and you have never touched it.
Click to expand...
Click to collapse
I was actually able to restore everything . I did a dd backup of my persist partition prior to messing with it. I simply restored that and got everything working normally after I re-registered my fingerprints.
Good to know that I can simply replace those files. I just checked those out after I extracted my backup. Good to know I can just use those.
Apart from WiFi, is there anything else that's damaged when flashing the persist.img from Fastboot?
P.S. You're right, it was showing the networks but it wasn't connecting.
Click to expand...
Click to collapse

I am currently in RR, I think the best way is to wait for the developers to solve the problem, with an update.

oreo27 said:
SevenSlevin said:
I was actually able to restore everything . I did a dd backup of my persist partition prior to messing with it. I simply restored that and got everything working normally after I re-registered my fingerprints.
Good to know that I can simply replace those files. I just checked those out after I extracted my backup. Good to know I can just use those.
Apart from WiFi, is there anything else that's damaged when flashing the persist.img from Fastboot?
P.S. You're right, it was showing the networks but it wasn't connecting.
Click to expand...
Click to collapse
But Attention on deleting files on /persist folder. If you delete one of this (or all them),
WCNSS_qcom_wlan_nv.bin
WCNSS_wlan_dictionary.dat
wlan_mac.bin
you will end in a costantly reboot of phone. For that I've advised only to delete lines with a text editor from "wlan_mac.bin", and as you have seen flashing "persist.img" need lots of knowledge and it is risky (in your case you have done the best thing of doing a backup of it) if you dont know what you are doing.
PS. you can send me in PM your /bluetooth/.bt_nv.bin file. Need an hexadecimal editor and if that file was never touched (as I think) you can restore back your old Xiaomi wifi mac address also.
Click to expand...
Click to collapse

Hi,
I'm having the same issue with WiFi. Connected to WiFi, accepted pw, but not working the wifi connection.
I've a fresh stock oreo, now I see the original BT MAC address.
How to do to make wifi work again without loosing original BT MAC?

speedunderx said:
You're wrong, you should read the tutorial, and with regard to the Mac I have the usual Mac, so you know a Mac is the physical code of the hardware, therefore you can not change it just read, the problem is that when you install RR you delete the WiFi module that uses the stock firmware, while the custom ROM uses drivers, persist.img helps to restore the Bluethoot module and wifi and sometimes the imei.
Click to expand...
Click to collapse
i dont know if u have tried it yourself and i dont know the technical details, but i have tried doing that after coming from RR and it didnt work. and more importantly i ended up having 30 sec reboots as someone pointed out here. This is what worked for me:
https://forum.xda-developers.com/mi-a1/help/wifi-issues-t3732798/page2
i havent tested the method described here but i am pretty sure it is no more worse than the one you advice

sachin273 said:
i dont know if u have tried it yourself and i dont know the technical details, but i have tried doing that after coming from RR and it didnt work. and more importantly i ended up having 30 sec reboots as someone pointed out here. This is what worked for me:
https://forum.xda-developers.com/mi-a1/help/wifi-issues-t3732798/page2
i havent tested the method described here but i am pretty sure it is no more worse than the one you advice
Click to expand...
Click to collapse
It works other users have tried, but as the author of this post says, leave a generic wifi and bluetooth mac for everyone, I'm RR, and I have the physical device mac bone the original, you can try all the methods there are but none will restore the original mac of your device, just wait for it to be corrected with the Custom ROM updates. If you try a lot there is the possibility that you will have a nice brick.
You have to take into consideration that the phone is quite economical, therefore it is not the same thing that you fail in this way a galaxy s8 for example.
If you are using Custom Rom enjoy it, there are many that work better than stock android.

OK, I confirm that now I tried OP's solution 2 minutes ago, and it's working. WiFi came back, and operating fine!
But is that OK, that before made the empty wlan_mac.bin file saved I saw different MAC addresses in the system info, and when
rebooted then I saw again different MAC addresses in system info??
Which is the original?
speedunderx said:
It works other users have tried, but as the author of this post says, leave a generic wifi and bluetooth mac for everyone, I'm RR, and I have the physical device mac bone the original, you can try all the methods there are but none will restore the original mac of your device, just wait for it to be corrected with the Custom ROM updates. If you try a lot there is the possibility that you will have a nice brick.
You have to take into consideration that the phone is quite economical, therefore it is not the same thing that you fail in this way a galaxy s8 for example.
If you are using Custom Rom enjoy it, there are many that work better than stock android.
Click to expand...
Click to collapse

Related

Problem with PhilZ recovery!

Hello,
I thought of myself as a pretty experienced user, but you never learn enough!
However, I flashed some roms (lollipop) that, probably due to my mistakes, screwed up my file system, to the point that my recovery (latest PhilZ) wasn't able to find its backup anymore. Eventually I solved the problem as I was able to find my backups and use them to revert my phone to the rom I wanted to run (Carbon 4.4.4). But I was really annoyed by the fact that my file system was a bit off and still I was having problems with the recovery. So I decided to begin investigating the possibility to restore my phone to factory default. Before going with it, I tried the soft approach, i.e. I used the soft factory reset available from the settings menu. It all seemed fine and I re-flashed a lollipop rom that suited me.
Now the problem is that, after all the ordeal, I decided to make a new backup and so I did. It appears all fine, my recovery can actually "see" it, but I cannot identify it using a root browser! It seems to have disappeared unless I open the recovery and then I see it there. It is located in a folder that I can, of course, access, but,when I do so, I can't find the file!
I tried to put on my phone an old backup (always a PhilZ one), but when I try to put it on the phone I can't find the Backup folder in the Clockworkmod folder!
Anyone has any idea of what is going on and can give me a suggestion on how to overcome the problem?
Thanks
Luca
PS An alternative would be suggesting how to do a restore from a sideload: I thought I saw a similar option, but I can't seem to find it anymore within the recovery's options! I tried also restoring via NRT, but although all seem to go fine and the software return no failure notice, I can't find the backup file that should have been pushed (successfully) on my device!
Its not a recovery issue. Its an L issue.
Best thing to do would be to wipe data and storage then fastboot flash userdata.IMG
http://forum.xda-developers.com/showthread.php?t=2938749
rootSU said:
Its not a recovery issue. Its an L issue.
Best thing to do would be to wipe data and storage then fastboot flash userdata.IMG
http://forum.xda-developers.com/showthread.php?t=2938749
Click to expand...
Click to collapse
Thanks a lot for your help.
How can I find the img. file to flash?
Would it be ok to just go ahead and start from 0 using this:
http://forum.xda-developers.com/google-nexus-5/general/tutorial-how-to-flash-factory-image-t2513701
How can fastboot flash an image file? I've never done that before! As I said, been doing this for a while, but never done this before...I think!
Luca
Alas, after reading your post on one-click toolkits, I'm afraid I'm one of those who thinks they can do things, but rely on simple tools to do them. However, I never (almost never) forgot to make a nandroid backup before flashing a new rom and, to be honest, I'm not a flashoolic. I never, ever bricked my phone (got a few bootloops). If I find a rom that suits my need, I stick with it for as long as I can.
The changes between KK and L are such that are beyond my comprehension, but I try hard to solve the problems I have without bugging everyone at the first obstacle. But now, after fidgeting with my phone for 2 days, I had to give up. With a few words, you singled out the reason why I couldn't come on top of this: things change and I was not informed of how much they did!
Luca
Problem partially solved..I think! Now I can see the folder and found my backup!!
I used the restorecon command you suggested. I couldn't make it work using terminal emulator (just did not accept the su command: why I don't really know). Then I thought about using adb shell via pc and, I really surprised myself; I was able to pull it through. I'm not totally brain damaged as I felt when I couldn't even reproduce the command you indicated. It is probably the application that doesn't work. It was my first time with adb shell, so a new thing learned.
However, now I would like to ask you: if I place in the proper folder the backup folder I saved on my pc, will I be able to restore the nandroid backup? I just need some data that I forgot (trivial things, such as text messages and a few app data, like passwords and stuff) but it would be useful.
Thanks once more for your help.
Luca

[SOLVED] Wiko Rainbow Jam seems hard to root: I'm looking for help

Hi all,
I have a Wiko Rainbow Jam (which is provided with the stock rom "Wiko Rainbow Jam version 8", Android Lollipop 5.1 and the latest updates from Wiko), is about a week that I attempt to root my phone, but I am unable to do this operation, since I am totally unable to mount the /system as RW, and furthermore the bootloader is locked.
Firstly I found this method which consist to write/flash the TWRP custom recovery in place of the original one:
Root method 1
(sorry for the Google Translate link, but I cannot find the same how-to in English)
Which seems similar to this how-to
http://forum.xda-developers.com/showpost.php?p=63803008&postcount=5
But seems that these two methods will wipe/erase everything on my phone, and I would avoid this risk.
I also read that by flashing another custom recovery I will be unable to install updates from Wiko.
Then I tried this method using adb which is more simple:
https://f-droid.org/forums/topic/tutorial-how-to-root-an-android-device/
But when I launch the "adb root" command, all that I get is "adbd cannot run as root in production builds"; so I attempted various workarounds to "fix" adb, but all unsuccesfully.
I have to mention the fact that I have some skills in using Linux and the shell commands: maybe there would be a way to place the "su" binary on my Phone using Linux on my computer, by logging on the phone as root user, by acquiring the needed privileges?
Any help/suggestion/hints would be very appreciate! :good:
Kind regards.
I have a mtk6580 phone and also had the root issues, for a while I used kingroot, which rooted fine but I didnt trust it. Then I used supersume to get rid of kingroot which seemed to work but again, wasnt 100% it was all gone. Followed a similar guide to your first link which wasnt working. What worked for me was:
Download the twrp recovery .img file
rename it to recovery.img
open SPflash tools
add your own scatter file from your stock rom
deselect all the boxes except recovery
double click the recovery address box and find the renamed recovery.img
click download
plug your turned off phone in,
let it flash.
reboot into recovery
select reboot system
TWRP will tell you its not rooted and ask to install superSU
swipe for yes
reboot and you are rooted.
NO DATA LOSS
Thank you for this detailed how-to! However, for me, nor kingroot, kingoroot, framaroot and no other apk worked on my phone, so I will attempt to try your method, but first I have some questions:
1): On my phone, under SETTINGS > DEVELOPER OPTIONS, I can see the option “OEM unlocking”: I have to enable this option to permit the flashing of the TWRP img?
2): Is ok to download TWRP from here? dl.twrp.me/i9300/twrp-2.8.6.1-i9300.tar.html
3): "add your own scatter file from your stock rom":
where I can get/grab such file?
4): "TWRP will tell you its not rooted and ask to install superSU":
so TWRP is already provided with the SuperSU utility?
5): To be sure to avoid any risk, here I have a backup of my phone, which was done using "adb backup -apk -shared -all"; in case of emergency I will be able to restore my phone using this backup?
Many thanks for your attention! :good:
Mister_Dave said:
3): "add your own scatter file from your stock rom":
where I can get/grab such file?
Click to expand...
Click to collapse
Ok, seems that such file was available in the first link:
s000.tinyupload.com/download.php?file_id=53888272183191245346&t=5388827218319124534686744
is called MT6580_Android_scatter.txt , can you take a look and tell me if is ok?
Many thanks!
1) cant hurt to turn it on, however the phone will be flashed whilst turned off so dont know if its needed, but Im sure I wouldve enabled it.
2) and 3) I dont know what your exact model number etc.. is for your phone, so the twrp you would have to find and check yourself, go here: http://www.needrom.com/category/others/u-v-w-x-y-z/brands-w/wiko/ and you can try to get a twrp from there, and definetely get a stock rom. Use the scatterfile from an 'SP TOOLS FLASHABLE STOCK/UPDATE ROM'
4) yes
5) I dont know, I dont use adb and wouldnt like to say its OK. You can use this: https://play.google.com/store/apps/details?id=com.h3r3t1c.onnandbup&hl=en which will make a TWRP or CWM backup of your entire phone which you can then flash in TWRP or CWM once they are flashed, or get all the data from the backup. I would advise to find this out before trying though, just in case. I personally didnt lose any data, flashed twrp in SPtools, took 5 seconds, rebooted, added SU, rebooted, took 2 minutes and everything was still there.
---------- Post added at 04:43 PM ---------- Previous post was at 04:41 PM ----------
it has to be a scatter file from your exact model of phone, as everything has to match, partitions, nvram...etc... loads of things that can go wrong if the scatter is wrong
robneymcplum said:
2) and 3) I dont know what your exact model number etc.. is for your phone, so the twrp you would have to find and check yourself, go here: http://www.needrom.com/category/others/u-v-w-x-y-z/brands-w/wiko/ and you can try to get a twrp from there, and definetely get a stock rom. Use the scatterfile from an 'SP TOOLS FLASHABLE STOCK/UPDATE ROM'
Click to expand...
Click to collapse
I went there, but my model is not listed.. As I stated in the subject is a Wiko Rainbow Jam: if i search for Rainbow Jam is such link, no model is displayed..
it has to be a scatter file from your exact model of phone, as everything has to match, partitions, nvram...etc... loads of things that can go wrong if the scatter is wrong
Click to expand...
Click to collapse
I got the scatter file in the first link "Root method 1", where there is the how-to for my exact model.
ah right, in that case, its OK
robneymcplum said:
ah right, in that case, its OK
Click to expand...
Click to collapse
Ok: it was painless differently from what I thought: now, following your advice (I used the TWRP and the scatter file from the first link) my phone is nicely provided with the root access
EDIT: was necessary to activate the “OEM unlocking” option under SETTINGS > DEVELOPER OPTION, without this option activated, I was unable to flash the TWRP recovery img.
Many thanks!
p.s: If a moderator see this post, feel free to add [RESOLVED] to the title of this thread, since I cannot edit the title.
Glad it worked lots of guides I saw also made it excessively complicated, this way took you what? 2 minutes? And am guessing all your data is safe and untouched.
robneymcplum said:
Glad it worked lots of guides I saw also made it excessively complicated, this way took you what? 2 minutes? And am guessing all your data is safe and untouched.
Click to expand...
Click to collapse
Yeah, it took about 2 minutes, just the time to figure out that I needed the USB OTG cable with an usb mouse and to browse to the UPDATE-SuperSU-v2.76.zip file (as I said I used the TWRP posted in the first link, which doesn't work with the touch screen).
I want to say thank you again for your friendly assistance!
EDIT: Yes: all my data is safe and untouched!
Like:good:

LG G5 Only Boots to TWRP

Hello, everyone and thanks in advance.
I'm not sure the entire sequence of events because I've spent so much time trying to fix the issue that I can't remember what caused it. Sometime after flashing the custom kernel here to try to get safety net to pass checks I rebooted and the stock deodexed ROM told me that encryption was not possible and I had to restore to factory.
So... I didn't. I thought that sounded like a bad idea. Instead I connected with adb and rebooted into fastboot and flashed TWRP to recovery again in case TWRP had been replaced and then I rebooted into TWRP. From there I wiped data and reflashed the 20C deodexed ROM. I figured that would be the safest way to get rid of the message and the phone had just been reset anyway so I wasn't really losing any ground.
Problem is... now it only reboots into TWRP. It will not boot system. I have tried a ton of things since then like flashing the original boot and recovery. I have also tried flashing the boot and recovery from here.
No luck. I've even reflashed TWRP just in case. I bet this is simple but I can't figure it out. Any help is appreciated. Thanks!
I ended up not figuring out a way to solve this from where I was at. Somebody probably could have but nobody saw it in time.
What I ended up doing instead was putting the phone into download mode (holding volume up and plugging the phone into a computer) and then I used LGUP (with uppercut.exe) to flash the 20A KDZ on there. When Android booted it still complained that the data partition was unencrypted so this time I let the phone wipe it. It rebooted... wiped it and now it is starting Android for the first time in a day. That feels pretty good actually.
I guess I'll start over now with recowvery since I'm on stock 20A.
codahq said:
I ended up not figuring out a way to solve this from where I was at. Somebody probably could have but nobody saw it in time.
What I ended up doing instead was putting the phone into download mode (holding volume up and plugging the phone into a computer) and then I used LGUP (with uppercut.exe) to flash the 20A KDZ on there. When Android booted it still complained that the data partition was unencrypted so this time I let the phone wipe it. It rebooted... wiped it and now it is starting Android for the first time in a day. That feels pretty good actually.
I guess I'll start over now with recowvery since I'm on stock 20A.
Click to expand...
Click to collapse
I discovered something in doing this again (because it happened again). When you want to wipe data so that it is unencrypted... don't. From TWRP instead of wiping just format it. So TWRP -> WIPE -> Format -> (Type yes). Wiping for some reason changes the partition information enough that stock can't find the data partition or can't use it or something along those lines. It then freaks out and wants you to factory reset. I think it needs stock recovery to do that so that process fails and then you have the boot loop to TWRP over and over.
That's my working theory anyway. I did it all again but did format instead of wipe and it seems to be working. I'm leaving this here for posterity. Hopefully it will help somebody.
Thank you so, so, so, so, so, .................. much.
You saved my day! I ran into the same exact issue you had. Lots of blessings and best wishes to YOU and this XDA community!
BTW, I found another thread with an easier way to fix this. Go to the terminal in TWRP and run these commands:
dd if=/dev/zero of=/dev/block/bootdevice/by-name/fota
dd if=/dev/zero of=/dev/block/bootdevice/by-name/misc
That should fix it. You may or may not have to reflash your rom after, but it got me up and running without any fuss.
rjcarter3 said:
BTW, I found another thread with an easier way to fix this. Go to the terminal in TWRP and run these commands:
dd if=/dev/zero of=/dev/block/bootdevice/by-name/fota
dd if=/dev/zero of=/dev/block/bootdevice/by-name/misc
That should fix it. You may or may not have to reflash your rom after, but it got me up and running without any fuss.
Click to expand...
Click to collapse
Do not use the above commands unless the following one commands doesn't work. Using the above commands wipes your whole misc partition and deletes your WiFi Mac address (you'll end up having a Mac address that changes every reboot). I did make a guide in the guides section to fix this, but better to use the correct way so you don't have to fix it later. Here is the correct code to get out of TWRP bootloop:
Code:
dd if=/dev/zero of=/dev/block/bootdevice/by-name/misc bs=256 count=1 conv=notrunc
Yup, if sure does. Any suggestions for how to fix it?
rjcarter3 said:
Yup, if sure does. Any suggestions for how to fix it?
Click to expand...
Click to collapse
Yes I created a guide some while ago located here:
https://forum.xda-developers.com/lg-g5/how-to/guide-fix-wifi-mac-address-changing-t3533841
Note: This fix will stick as long as you don't flash another ROM or wipe system / data when updating a ROM. If you do either of those, you'll need to redo this fix. Unfortunately there doesn't appear to be a permanent fix. I tried to manually edit my misc partition with a Mac address and flash it back, but it didn't work. But my temp fix does work
I didn't realize that by no permanent fix you really meant permanent. I flashed back to stock and it still persists. I guess a full restore isn't really a full restore.
rjcarter3 said:
I didn't realize that by no permanent fix you really meant permanent. I flashed back to stock and it still persists. I guess a full restore isn't really a full restore.
Click to expand...
Click to collapse
Well, that is why it's not recommended to use those commands and also why I stated that any time you flash a new ROM, even stock, you'll need to redo that fix. However, once you do it, it will stay until you flash a different ROM or wipe system for whatever reason.
jeffsga88 said:
Well, that is why it's not recommended to use those commands and also why I stated that any time you flash a new ROM, even stock, you'll need to redo that fix. However, once you do it, it will stay until you flash a different ROM or wipe system for whatever reason.
Click to expand...
Click to collapse
Oh, ok - I didn't see you say stock, but it doesn't matter. This phone isn't a daily driver for me, so I'm fine to do some experimenting with it. Just really interesting that flashing a full factory restore KDZ file doesn't fix the issue. I flashed to 20A, relocked my bootloader and did OTA updates all the way to 20F and then LGUP back to 20A. Still changed every time.
There seems to be some debate in the other thread if this problem existed even before wiping any misc directories. I think you even mentioned that it appears to be from formatting data to remove encryption. Isn't removing encryption central to the process of rooting altogether? ie, wouldn't this problem exist in any rooted G5 phone and not just those who ran those commands I posted above? I realize that wiping misc will break your fix, but is that what causes it in the first place?
rjcarter3 said:
Oh, ok - I didn't see you say stock, but it doesn't matter. This phone isn't a daily driver for me, so I'm fine to do some experimenting with it. Just really interesting that flashing a full factory restore KDZ file doesn't fix the issue. I flashed to 20A, relocked my bootloader and did OTA updates all the way to 20F and then LGUP back to 20A. Still changed every time.
There seems to be some debate in the other thread if this problem existed even before wiping any misc directories. I think you even mentioned that it appears to be from formatting data to remove encryption. Isn't removing encryption central to the process of rooting altogether? ie, wouldn't this problem exist in any rooted G5 phone and not just those who ran those commands I posted above? I realize that wiping misc will break your fix, but is that what causes it in the first place?
Click to expand...
Click to collapse
Well, technically formatting data shouldn't have anything to do with it as the WiFi Mac address is stored in your misc partition. Reason I thought it might be from formatting data before was because I didn't realize I wiped my misc partition. When first rooting the T-Mobile version it was pretty much necessary to run those commands which wipe it and no one had known about the other commands that were safer, so a lot of people ended up with this issue quite awhile ago and not knowing why. I only figured out why with talking with autoprime after posting my guide to fix it. Also, wiping misc partition after doing my fix doesn't break my fix, wiping your data from TWRP, or flashing a new ROM or stock will break the fix as the fix is stored in data/misc/wifi. Also, reason that flashing a kdz of stock doesn't fix it is because the kdz doesn't rewrite your misc partition. Technically, you should be able to pull your misc partition, edit it to have Mac address again and push back with adb, yet when I tried it didn't fix it.
jeffsga88 said:
Do not use the above commands unless the following one commands doesn't work. Using the above commands wipes your whole misc partition and deletes your WiFi Mac address (you'll end up having a Mac address that changes every reboot). I did make a guide in the guides section to fix this, but better to use the correct way so you don't have to fix it later. Here is the correct code to get out of TWRP bootloop:
Code:
dd if=/dev/zero of=/dev/block/bootdevice/by-name/misc bs=256 count=1 conv=notrunc
Click to expand...
Click to collapse
Worked like a charm, you are the ****ing man, Thanks man.
Skyline GTR78 said:
Worked like a charm, you are the ****ing man, Thanks man.
Click to expand...
Click to collapse
Hey, can you check to see:
a) if you have the same wifi mac address after successive reboots
b) if you do, can you browse to
"/system/etc/wifi"
and open this file in a text editor:
"bcmdhd.cal"
And see if the Mac address is located in the top of the file matches the one in your settings menu? I just want to verify this is the correct hardware address when I use the manual fix for this.
---------- Post added at 03:22 PM ---------- Previous post was at 03:14 PM ----------
jeffsga88 said:
Well, technically formatting data shouldn't have anything to do with it as the WiFi Mac address is stored in your misc partition. Reason I thought it might be from formatting data before was because I didn't realize I wiped my misc partition. When first rooting the T-Mobile version it was pretty much necessary to run those commands which wipe it and no one had known about the other commands that were safer, so a lot of people ended up with this issue quite awhile ago and not knowing why. I only figured out why with talking with autoprime after posting my guide to fix it. Also, wiping misc partition after doing my fix doesn't break my fix, wiping your data from TWRP, or flashing a new ROM or stock will break the fix as the fix is stored in data/misc/wifi. Also, reason that flashing a kdz of stock doesn't fix it is because the kdz doesn't rewrite your misc partition. Technically, you should be able to pull your misc partition, edit it to have Mac address again and push back with adb, yet when I tried it didn't fix it.
Click to expand...
Click to collapse
Thanks - has anyone verified that those who've rooted but not run those commands did not exhibit the MAC changing issue (ie, that it's definitely the cause of the problem and doesn't just duplicate the problem)?
Also, I was trying to follow your directions for the manual fix, created the config file but when I run the command from the terminal, I get this:
sush: cat: /sdcard/config: No such file or directory
Any ideas? Thanks!
rjcarter3 said:
Hey, can you check to see:
a) if you have the same wifi mac address after successive reboots
b) if you do, can you browse to
"/system/etc/wifi"
and open this file in a text editor:
"bcmdhd.cal"
And see if the Mac address is located in the top of the file matches the one in your settings menu? I just want to verify this is the correct hardware address when I use the manual fix for this.
---------- Post added at 03:22 PM ---------- Previous post was at 03:14 PM ----------
Thanks - has anyone verified that those who've rooted but not run those commands did not exhibit the MAC changing issue (ie, that it's definitely the cause of the problem and doesn't just duplicate the problem)?
Also, I was trying to follow your directions for the manual fix, created the config file but when I run the command from the terminal, I get this:
sush: cat: /sdcard/config: No such file or directory
Any ideas? Thanks!
Click to expand...
Click to collapse
Ok, first let's try and keep this on topic, this thread is about TWRP bootlooop not the wifi Mac address. Anything else about the wifi Mac address ask in my wifi Mac address guide thread. I just don't want to get way off topic for people looking to figure out the TWRP bootlooop. Anyways, I will answer both questions though.
So, first answer is the Mac address that's in the bcmdhd.cal is based on what it gets from the config file. If that config come doesn't exist and your wifi Mac address isn't in your misc partition, it will just make up a random Mac address, hence the random Mac address every reboot. If you're wanting your real wifi Mac address, it may be pretty hard to figure it out, why I say just pick something you like and it will stay that each time you reboot.
Second answer, make sure you create the config file (with no extension) at root of internal sd card. Then, copy and paste the command exactly into the terminal and it'll work.
Code:
su -c "cat /sdcard/config > /data/misc/wifi/config"
Hopefully that'll help, if you have any more questions regarding the fix for the wifi Mac address feel free to ask me in that thread.
jeffsga88 said:
Do not use the above commands unless the following one commands doesn't work. Using the above commands wipes your whole misc partition and deletes your WiFi Mac address (you'll end up having a Mac address that changes every reboot). I did make a guide in the guides section to fix this, but better to use the correct way so you don't have to fix it later. Here is the correct code to get out of TWRP bootloop:
Code:
dd if=/dev/zero of=/dev/block/bootdevice/by-name/misc bs=256 count=1 conv=notrunc
Click to expand...
Click to collapse
Thanks! Had to use it after trying to upgrade Lineage on my h830 today. :good:
Fixing with stock recovery
If I've managed to get into the same situation, but tried to fix it by using LGUP to flash the .KDZ of the stock 20a ROM (including stock recovery), and then found that it still does this recovery loop type of thing (shows T-mobile logo for 10 seconds, then boots into stock recovery erasing the data, then repeat) how would I fix it?
Thanks,
Elliot
jeffsga88 said:
Do not use the above commands unless the following one commands doesn't work. Using the above commands wipes your whole misc partition and deletes your WiFi Mac address (you'll end up having a Mac address that changes every reboot). I did make a guide in the guides section to fix this, but better to use the correct way so you don't have to fix it later. Here is the correct code to get out of TWRP bootloop:
Code:
dd if=/dev/zero of=/dev/block/bootdevice/by-name/misc bs=256 count=1 conv=notrunc
Click to expand...
Click to collapse
You saved me with this command :good:
Works fine on LG G6 as well!
jeffsga88 said:
Do not use the above commands unless the following one commands doesn't work. Using the above commands wipes your whole misc partition and deletes your WiFi Mac address (you'll end up having a Mac address that changes every reboot). I did make a guide in the guides section to fix this, but better to use the correct way so you don't have to fix it later. Here is the correct code to get out of TWRP bootloop:
Code:
dd if=/dev/zero of=/dev/block/bootdevice/by-name/misc bs=256 count=1 conv=notrunc
Click to expand...
Click to collapse
I don't usually post on xda as I am not a dev nor am I a mad custom rom lover, but man You have saved me a sleepless night, Thank you! If you are ever in Cork, Ireland I would love to buy you a coffee or a beer!!!!

TWRP backups

So I tried my first Nandroid backup today using TWRP and a howtogeek - "How to Back Up and Restore Your Android Phone with TWRP" guide I found off a quick google search.
Basically TWRP, backup(boot,system,data), reboot to android, shut down, twrp-restore then reboot.
When I would reboot after TWRP-restore, it shows the typical bootloader corrupt error msg.
Shuts down again, shows the bootloader msg, then goes into TWRP, asks for my decrypt password, then begins to run an openrecovery script (I think?) of some sort. I then go to reboot my phone again, bang factory reset mode.
I hope I'm not alone here.:cyclops: I'd just really love to be able to backup/image my phone entirely so I can try out a few custom roms, and for general knowledge sake.
thanks!:silly:
mark7807 said:
So I tried my first Nandroid backup today using TWRP and a howtogeek - "How to Back Up and Restore Your Android Phone with TWRP" guide I found off a quick google search.
Basically TWRP, backup(boot,system,data), reboot to android, shut down, twrp-restore then reboot.
When I would reboot after TWRP-restore, it shows the typical bootloader corrupt error msg.
Shuts down again, shows the bootloader msg, then goes into TWRP, asks for my decrypt password, then begins to run an openrecovery script (I think?) of some sort. I then go to reboot my phone again, bang factory reset mode.
I hope I'm not alone here.:cyclops: I'd just really love to be able to backup/image my phone entirely so I can try out a few custom roms, and for general knowledge sake.
thanks!:silly:
Click to expand...
Click to collapse
What version of TWRP have you been using? I understand, RC2 has issues with properly restoring a backup. (RC is release candidate and is not considered fully stable, however, works well enough to flash custom roms and such).
The partitions on the pixel are set up in a more complex way than previously seen on many android phones, which is why there's no perfectly stable version of TWRP yet. You could try using RC1 to see if you get better luck backing up and restoring, however, you should assume that you may run into other issues and be prepared to deal with them should they arise.
exad said:
What version of TWRP have you been using? I understand, RC2 has issues with properly restoring a backup. (RC is release candidate and is not considered fully stable, however, works well enough to flash custom roms and such).
The partitions on the pixel are set up in a more complex way than previously seen on many android phones, which is why there's no perfectly stable version of TWRP yet. You could try using RC1 to see if you get better luck backing up and restoring, however, you should assume that you may run into other issues and be prepared to deal with them should they arise.
Click to expand...
Click to collapse
I'm running 3.1.0-0RC2 so maybe I'll try RC1. Normally I'd just go off and try everything but unfortunately I'm not in a situation I can simply play with my Pixel and potentially brick it leaving me without a phone for who knows how long.
I don't think there would be any harm with playing with RC1 but I'll research a little bit more into it and see what I can find out first. I heard the partitions are split for redundancy(?) for firmware upgrades and dual-booting. That's something all else on it's own as I've REALLY wanted to get my phone ultimately on a Multi-Rom setup but it seems way too complicated for me at the moment to try on my own even though I'm generally good with this stuff..
Thanks exad for the insight. Any other help is greatly appreciated.
mark7807 said:
I'm running 3.1.0-0RC2 so maybe I'll try RC1. Normally I'd just go off and try everything but unfortunately I'm not in a situation I can simply play with my Pixel and potentially brick it leaving me without a phone for who knows how long.
I don't think there would be any harm with playing with RC1 but I'll research a little bit more into it and see what I can find out first. I heard the partitions are split for redundancy(?) for firmware upgrades and dual-booting. That's something all else on it's own as I've REALLY wanted to get my phone ultimately on a Multi-Rom setup but it seems way too complicated for me at the moment to try on my own even though I'm generally good with this stuff..
Thanks exad for the insight. Any other help is greatly appreciated.
Click to expand...
Click to collapse
I would say use RC1 too. I've used it and never had a problem with it other than the occasional failure to decrypt which is no big deal. Just reboot back into recovery. I would add though, instead of backing up system, backup system image. Also vendor image. If you back up system instead of system image you'll more than likely run into battery drain problems. I'm not sure what causes it but it'll cut your battery life down to only several hours. Using system image doesn't cause that problem.
If you should happen to accidentally backup system instead of system image it's not a huge deal to fix it though. If you're on stock just download the factory image that you are currently on, extract the system.img file and flash it using fastboot. If you're on a custom rom, a dirty flash of the rom will fix it.
mark7807 said:
I'm running 3.1.0-0RC2 so maybe I'll try RC1. Normally I'd just go off and try everything but unfortunately I'm not in a situation I can simply play with my Pixel and potentially brick it leaving me without a phone for who knows how long.
I don't think there would be any harm with playing with RC1 but I'll research a little bit more into it and see what I can find out first. I heard the partitions are split for redundancy(?) for firmware upgrades and dual-booting. That's something all else on it's own as I've REALLY wanted to get my phone ultimately on a Multi-Rom setup but it seems way too complicated for me at the moment to try on my own even though I'm generally good with this stuff..
Thanks exad for the insight. Any other help is greatly appreciated.
Click to expand...
Click to collapse
RC1 and backup system image, vendor image, data and boot.
robocuff said:
I would say use RC1 too. I've used it and never had a problem with it other than the occasional failure to decrypt which is no big deal. Just reboot back into recovery. I would add though, instead of backing up system, backup system image. Also vendor image. If you back up system instead of system image you'll more than likely run into battery drain problems. I'm not sure what causes it but it'll cut your battery life down to only several hours. Using system image doesn't cause that problem.
If you should happen to accidentally backup system instead of system image it's not a huge deal to fix it though. If you're on stock just download the factory image that you are currently on, extract the system.img file and flash it using fastboot. If you're on a custom rom, a dirty flash of the rom will fix it.
Click to expand...
Click to collapse
TheBurgh said:
RC1 and backup system image, vendor image, data and boot.
Click to expand...
Click to collapse
Thanks again guys,
I ran a
fastboot boot twrp.zip to boot to what I thought was like a "live cd" version of twrp
with the rc1 .img and .zip in the sdcard directory I installed the .zip
booted my phone and it forces to recovery everytime now.
did I upset something?
I mean at this point, I could factory reset the google pixel all from the very beginning of time. boot/system the whole shabang, but I think this could be a good lesson from me if I could boot back to system out of this..
Okay. I have RC1 on here and have backed up to USB. I'm extremely tired and going to bed. I'll report back on how the restore goes. THANK YOU ALL!!!
mark7807 said:
Thanks again guys,
I ran a
fastboot boot twrp.zip to boot to what I thought was like a "live cd" version of twrp
with the rc1 .img and .zip in the sdcard directory I installed the .zip
booted my phone and it forces to recovery everytime now.
did I upset something?
I mean at this point, I could factory reset the google pixel all from the very beginning of time. boot/system the whole shabang, but I think this could be a good lesson from me if I could boot back to system out of this..
Okay. I have RC1 on here and have backed up to USB. I'm extremely tired and going to bed. I'll report back on how the restore goes. THANK YOU ALL!!!
Click to expand...
Click to collapse
Okay so, I stayed up a little late and tried a restore. I got this error near the end of the restore "extractTarFork() process ended with error: 255" in which resulted in corruption of files and a failed restore. Was I supposed to unmount data? Is there any reason I can't backup all partitions?
mark7807 said:
Okay so, I stayed up a little late and tried a restore. I got this error near the end of the restore "extractTarFork() process ended with error: 255" in which resulted in corruption of files and a failed restore. Was I supposed to unmount data? Is there any reason I can't backup all partitions?
Click to expand...
Click to collapse
Not sure where to direct you at this point. I have always used RC1 and backed up system image, vendor image, data and boot and never had a problem restoring. Someone with better knowledge will come around.
TheBurgh said:
Not sure where to direct you at this point. I have always used RC1 and backed up system image, vendor image, data and boot and never had a problem restoring. Someone with better knowledge will come around.
Click to expand...
Click to collapse
Yeah very strange I did exactly what you told me to do as well. Any changes to partitions I backup if my phone is rooted by chance??
mark7807 said:
Yeah very strange I did exactly what you told me to do as well. Any changes to partitions I backup if my phone is rooted by chance??
Click to expand...
Click to collapse
Not that I am aware of. Mine is rooted and backups have been smooth sailing.
I recently attempted creating a nandroid backup via TWRP on my rooted Pixel and I'm consistently getting an error: 'cannot create [path]\backup file" message from TWRP. Is there a permission issue that I've overlooked here or does anyone have any thoughts as to why my rooted Pixel would be denying TWRP authority to create the backup?
Thanks
What version of twrp ?
I only use rc1, never seen this.
Yep- RC1. I'm thinking it's in 'read only' mode or something because as soon as it attempts to create the folder/file- no-go.
pstgh said:
Yep- RC1. I'm thinking it's in 'read only' mode or something because as soon as it attempts to create the folder/file- no-go.
Click to expand...
Click to collapse
When you boot into TWRP did it ask for your unlock PIN? If it doesn't/didn't, either keep rebooting into recovery or turn the phone off and go back into recovery until TWRP does ask for your encryption PIN. Sometimes TWRP doesn't ask, and without the PIN being entered, it can't write to the internal storage.
If you click "Install" in TWRP and see a bunch of gobbledygook it's because the internal storage is still encrypted so TWRP can't do anything with it.
You could probably use USB OTG through the USB-C connector, though, to do a backup to it, if you need to.
Tried it again and it worked flawlessly.... it seems sort of buggy in that sometimes it presents the 'pattern' security lock that I use and sometimes it doesn't. After booting up in the bootloader and fastbooting the TWRP boot image slowly and methodically, the security pattern came up and all is perfect- thanks.
---------- Post added at 08:37 PM ---------- Previous post was at 08:36 PM ----------
Now I'm wondering how to best move that backup folder (or a copy of it) over to Google Drive? I have root explorer, but not sure if it is capable of mounting to Google Drive.. any thoughts on best practices here would be appreciated.
Thanks
pstgh said:
Tried it again and it worked flawlessly.... it seems sort of buggy in that sometimes it presents the 'pattern' security lock that I use and sometimes it doesn't. After booting up in the bootloader and fastbooting the TWRP boot image slowly and methodically, the security pattern came up and all is perfect- thanks.
---------- Post added at 08:37 PM ---------- Previous post was at 08:36 PM ----------
Now I'm wondering how to best move that backup folder (or a copy of it) over to Google Drive? I have root explorer, but not sure if it is capable of mounting to Google Drive.. any thoughts on best practices here would be appreciated.
Thanks
Click to expand...
Click to collapse
I can't confirm since I've yet to do a successful backup but... Flashify Pro version looks like an option???
also
Anyone know when TWRP 3.1.0-0 will be out for Pixel? Looks like it addresses boot slots which off first glance seems like quite a fundamental feature no?
Thanks... I'm thinking I'll just adb pull the file over to my desktop... not sure.
pstgh said:
Thanks... I'm thinking I'll just adb pull the file over to my desktop... not sure.
Click to expand...
Click to collapse
Root Explorer does have support for Google Drive. In Root Explorer touch the plus sign in the lower right corner and in the menu that opens choose Google Drive tab.
Can get Root Explorer to connect to Google Drive, but when I select all of the backup files from my Pixel's TWRP backup folder, my only choices are to cut or copy them- so I tried both and then RE creates this little clipboard icon that you presumably click on to paste them once you've opened the proper GD folder.... so I tried that and in both cases (cut and copy) it says 'fail'.... ? Thoughts? I've given RE permission to manage folders and files in GD.
pstgh said:
Can get Root Explorer to connect to Google Drive, but when I select all of the backup files from my Pixel's TWRP backup folder, my only choices are to cut or copy them- so I tried both and then RE creates this little clipboard icon that you presumably click on to paste them once you've opened the proper GD folder.... so I tried that and in both cases (cut and copy) it says 'fail'.... ? Thoughts? I've given RE permission to manage folders and files in GD.
Click to expand...
Click to collapse
It sounds like you've got the right idea. Cut will move the files, copy will do just that. You choose one of the two and browse to the Google Drive tab, find the folder you want to use and then use the little clipboard thing to transfer the files to that folder. If that's what you're doing, the only thing I can think of right off the top of my head would be that you don't have enough space left on Google Drive for the size of the files you're trying to transfer. Try a picture or something and see if it takes that. If so, I'd suspect lack of Drive space is the reason it fails.

Samsung Xcover 4 SM-G390F Root Magisk + TWRP +Disable Encryption Oreo/Pie (2019/2020)

Hi,
Finally I had time to finish my work on Xcover 4. I couldn't disable ForceEncryption by any flashable tool so I prepared 2 version of firmware (Oreo and Pie), both prerooted (Magisk) and free from Force Encryption. Everything except boot.img left untouched, both ROMs are BTU so no brand.
Just flash it with Odin 3.13.3. I recommend to flash CSC_BTU instead of HOME_CSC_BTU. HOME BTU should work as well but then probably You gonna have to format data with TWRP. CSC_BTU is already tested and there are no problems with Encryption.
After flashing just install Lastest Magisk Manager. SafetyNet Passed.
Oreo: G390FXXU4BSB3_BTU_G390FBTU4BSC1_Patched_By_Chamelleon
Code:
https://mega.nz/#!ONoFTIhD!rBOhDR0j874zpyeLiDVwfwOcodRi5OhdxyF0ZTRMslE
PIE: G390FXXU4CSF9_BTU_G390FBTU4CSFA_Patched_by_Chamelleon
Code:
https://mega.nz/#!XBhnRCCY!_IOOtXcLsGZQfVY17JD4YxxzaAWJqy2NoxVSrsJRs5M
If You need TWRP (not necessary to flash this ROMs) flash this version:
TWRP: TWRP-3.1.1_SM-G390F_by_nemo-nemo
Code:
https://mega.nz/#!DIo1SSBT!w4dPPAF3BEcfQmsy7mANO33Lb5Gj4jzDkrrPfbH56uo
Working on both versions, Oreo and Pie. I didn't test backup and recovery options but flashing is working on both. ADB and MTP are not working.
To remove Security Log Agent notifications use SecurityLogAgent Disable. It will disable this annoying app completely.
Hello!
Can you explain because i would like only to root my phone in oreo 8.1 without losing apps and data. Is it possible with your method?
thank you for your answer.
Would anyone happen to know if I can use TWRP for SM-G390F's on SM-G390W's? (the only differences I know of between them are the supported LTE frequencies)
You can try to flash it, just backup your data and if something goes wrong just flash it with back with stock firmware.
Updated main thread
Hi mates
very interesting matter. Will like to make it from a ubuntu 18.04 system? Did someone had tried it ?
Yea, it's a normal ROM so you can flash it with Heimdal.
Chamelleon said:
Yea, it's a normal ROM so you can flash it with Heimdal.
Click to expand...
Click to collapse
thank you C for this fast answer .
Here is the second point :
IS this rom free from google , I mean enough
And the third
any visible amelioration from the XCOV 2 Model in battery standing . I do not care about photos for my purpose .
Only memory, increased by SD, and lasting time
It's completely stock rom without any modifications except integrated Magisk and disabled force encryption. Rest is untouched.
I don't understand what file I should use to flash with Odin.. in the link you posted sends to a download of a zip file of almost 2gb in which there are many files, so from those files which one should I set in Odin?
Flash it like any other stock ROM:
BL file in BL
AP file in AP
CP file in CP
CSC_BTU file in CSC
Everything works great:]
Thanks man.
Hi Chamelleon and thanks for all the effort you've made already!
I successfully flashed the Pie variant of the two ROMs and got it to work. However, turned out that in an app that I'm developing, for some reason, when my device is equipped with G390FXXU4CSF9_BTU_G390FBTU4CSFA, the app doesn't behave in the same way as when G390FXXU4CSF9_ G390FXEO4CSFA has been installed. That's why I would like to be able to root the XEO-version of the firmware. Moreover, there will be many other non-rooted devices equipped with the XEO-version using the app in the near future.
Having flashed my device with G390FXXU4CSF9_ G390FXEO4CSFA, I tried installing the version of TWRP you have provided but I can't figure out how to install Magisk from there. By default, TWRP can't find the Magisk zip-file that I push onto the device. I tried formatting data, as per this post. The post lead me to believe that the files could be found after formatting but even though there were now plenty of TWRP-related folders, I couldn't find the zip. And as ADB and MTP don't seem to work in recovery mode, I'm unable to get the zip file on board after formatting. Booting to system doesn't work either after allowing modifications for TWRP, which might be due to dm-verity preventing boot, but franky I don't understand much of that topic.
You mentioned that you couldn't disable Force Encryption with any flashable tool. Is that the reason why TWRP (or any other tool) couldn't reach the zip file for Magisk?
This is the first time I've attempted rooting a phone so my knowledge regarding the topic is pretty basic.
So I suppose preparing a prerooted and Force Encryption free version of the firmware might be a possibility? I have no idea how to patch a ROM though. Any advice on how to proceed?
Hi, I had no time to play with this during Christmas. If you send me your boot.img I can modify it for you. If You just flash magisk with TWRP it will root your phone but after first reboot whole data partition will be encrypted again and you wont be able to flash anything with twrp or modify data partition without full wipe. For some unknown reason this and probably more Samsung models have different structure of files responsible for encryption and because of this none of pre-made patches are working. Only manual kernel modification can safe from encryption, at least for now.
I'm not a developer so I don't know how to prepare patch for this to allow anyone to flash it, I just found few lines of code in kernel You need to modify to disable encryption.
Chamelleon said:
Hi, I had no time to play with this during Christmas. If you send me your boot.img I can modify it for you. If You just flash magisk with TWRP it will root your phone but after first reboot whole data partition will be encrypted again and you wont be able to flash anything with twrp or modify data partition without full wipe. For some unknown reason this and probably more Samsung models have different structure of files responsible for encryption and because of this none of pre-made patches are working. Only manual kernel modification can safe from encryption, at least for now.
I'm not a developer so I don't know how to prepare patch for this to allow anyone to flash it, I just found few lines of code in kernel You need to modify to disable encryption.
Click to expand...
Click to collapse
Hi, I really appreciate the help!
I sent the boot.img to your paypal donation email. Let me know if you want me to send it to you some other way.
How to flash firmware on linux?
I know that i have to use heimdall but how to load these files into the program because filenames say basically nothing to me.
Thanks in advance.
Also does it delete user data?
SpurguX said:
Hi, I really appreciate the help!
I sent the boot.img to your paypal donation email. Let me know if you want me to send it to you some other way.
Click to expand...
Click to collapse
1. Flash clean ROM, same as boot you send me)
2. Enable OEM Unlock in Developer settings
3. Flash patched boot with Odin as AP/PDA.
4. Install Magisk Manager app
5. Install TWRP and format data partition, option where you need to type "YES"
6. Reboot system and then back to TWRP. If you can mount data and there are no errors it's done.
AndroidBroker said:
How to flash firmware on linux?
I know that i have to use heimdall but how to load these files into the program because filenames say basically nothing to me.
Thanks in advance.
Also does it delete user data?
Click to expand...
Click to collapse
Sorry but I never had a chance to use Heimdall. You can't dirty flash this because when your phone is encrypted and you can't replace kernel corrupting data.
But do I lose my data(Apps settings etc.)?
I'm OK with setting everything up back ,but it would be cool if it kept data.
(I'm going to use other computer that has windows on it btw, and I'm going to flash it with odin)
If your data partition is encrypted you gonna corrupt it by changing kernel. It means You wont be able to access, so yes, you will loose it.
What you mean by encryption some option in the Android or what?
If that's what you mean I haven't set up anything like this

Categories

Resources