Related
Hello everyone. Well, as per the title, after I flashed a new custom ROM (Ivan's AOSP to be specific), my Mi3 refused to boot properly and get stuck in the bootloop at the Mi logo and it would bootloop again and again and again....
Now, if I tried to enter twrp recovery by holding power button + volume up, it would refuse to boot into recovery and just bootloop again. But, I was able to access fastboot mode (don't know why but I could easily boot into fastboot mode)
I downloaded stock ROM for Mi3 and tried to flash it via MiFlash and it succeeded but the device would still bootloop. I also attempted to flash twrp recovery via flashboot and it succeeded, again, but my phone would refuse to at least boot into twrp recovery mode, again. Naturally my phone still had the bootloop at the Mi logo, sigh.
I don't know what to do anymore, aside from sending my phone to repair center that might charge a fortune. Please help!
try to flash official twrp recovery via fastboot
Rahuljs said:
try to flash official twrp recovery via fastboot
Click to expand...
Click to collapse
How to flash it ?? Method pls...
Currently i installed Kingroot in slimbit LP rom but after see people suggest method i uninstalled it & follow him tap root access in devolopment section & reboot but still not get Root access Than i try go in TWRP restore back this rom my phone stuck+ bootloop & keep loading in MI logo only !!! Pls help HELP HELP !! What should i do... i try fastboot flash fastboot rom failed too HELP HELP HELP !!!
Not going to send to phone center & currently my ROM can't not boot because of extend partition before & not stock partition... Help me PLEASE !!!
Many users confirmed the same symptoms. Is it possible that the damage caused by "software" since some people of India have visited the service center and asked to replace the motherboard of which cost $150?
Try flashing the phone via MIUI flashing tool as you were able to access fastboot mode
http://en.miui.com/a-234.html
xypherize said:
Hello everyone. Well, as per the title, after I flashed a new custom ROM (Ivan's AOSP to be specific), my Mi3 refused to boot properly and get stuck in the bootloop at the Mi logo and it would bootloop again and again and again....
Now, if I tried to enter twrp recovery by holding power button + volume up, it would refuse to boot into recovery and just bootloop again. But, I was able to access fastboot mode (don't know why but I could easily boot into fastboot mode)
I downloaded stock ROM for Mi3 and tried to flash it via MiFlash and it succeeded but the device would still bootloop. I also attempted to flash twrp recovery via flashboot and it succeeded, again, but my phone would refuse to at least boot into twrp recovery mode, again. Naturally my phone still had the bootloop at the Mi logo, sigh.
I don't know what to do anymore, aside from sending my phone to repair center that might charge a fortune. Please help!
Click to expand...
Click to collapse
Here is the link for tutorial for flashing recovery via fastboot mode. All commands are same just download the twrp recovery image from here. DON'T FORGET TO RENAME THE IMAGE FILE, BECAUSE ADB DOESN'T RECOGNISE ANY SPECIAL CHARACTER.
what did you do ? I'm stuck in the same situation word by word.
did you solve this issue ?
yohaneseko said:
Many users confirmed the same symptoms. Is it possible that the damage caused by "software" since some people of India have visited the service center and asked to replace the motherboard of which cost $150?
Click to expand...
Click to collapse
Seems like the problem is caused either because of this, or your battery's PCB simply fried because of unknown reason, maybe because faulty charger/cable or wrong charge voltage setting by the kernel? Also, seems like most of the similiar case stems from MM roms, including MIUI's own chinese developer ROM.
Some people with the exact same case stated that after replacing the battery, the device worked again, like this guy on iFixit: https://www.ifixit.com/Guide/Xiaomi+Mi+3+Battery+Replacement/50785
I haven't tested it yet on my bricked device (just ordered the battery today), but I really hope it was just the battery. I think fried mobo is kinda unthinkable, since if the mobo got fried, you probably can't even flash anything since the eMMC would probably also inaccessible.
Hi @rxl.noir, urang Bandung?
How much does it cost for battery replacement? I have sent my Mi3 to the seller because it's not even one year already.
rxl.noir said:
Seems like the problem is caused either because of this, or your battery's PCB simply fried because of unknown reason, maybe because faulty charger/cable or wrong charge voltage setting by the kernel? Also, seems like most of the similiar case stems from MM roms, including MIUI's own chinese developer ROM.
Some people with the exact same case stated that after replacing the battery, the device worked again, like this guy on iFixit: https://www.ifixit.com/Guide/Xiaomi+Mi+3+Battery+Replacement/50785
I haven't tested it yet on my bricked device (just ordered the battery today), but I really hope it was just the battery. I think fried mobo is kinda unthinkable, since if the mobo got fried, you probably can't even flash anything since the eMMC would probably also inaccessible.
Click to expand...
Click to collapse
yohaneseko said:
Hi @rxl.noir, urang Bandung?
How much does it cost for battery replacement? I have sent my Mi3 to the seller because it's not even one year already.
Click to expand...
Click to collapse
Heyaa~
For the battery, you could easily found it on Tokopedia started from 110k, although most of them are shipped from Jakarta. The replacement process is quite easy, you might only need #0 Phillips or any small plus screwdriver, a plastic card (for spudge replacement), and some guts :q. The details and steps are on my prev. post.
I haven't tried to sent it to the seller/distributor, since it might take a long time to get it done.
Just a little update;
I replaced my battery on my Mi3 that have the same exact case as yours, and it finally works. No more short bootloop, no more stuck in fastboot.
A guy over at the oficial oneplus forum (https://forums.oneplus.net/threads/aging-mode.468296/)
found out that if you press vol up and down at the same time the phone boots from a different partition,
instead of sde18(boot) it starts from sde19(boot_aging)
after comparing boot.img with boot_aging.img
it seams that the ramdisk ist the same, just that boot_aging contains an additional kernel module: wlan_aging.ko
also the kernel itself is 2 MB larger than the default one...
Anyhow this mode is probably not use in normal phone operation but rather some part of post production testing/burn-in
So we could probably use it for something useful....
Like switching between two kernels without the full multiboot....
Or may be having two different recoveries...
This is indeed very interesting and could potentially be useful. Switching over between the modified TWRP and standard TWRP could then be a thing?
could be worth a try..
MisterCoolBeans said:
This is indeed very interesting and could potentially be useful. Switching over between the modified TWRP and standard TWRP could then be a thing?
Click to expand...
Click to collapse
Not two different twrp versions since its the boot partition but we could use two different kernels
Solution for a native dualboot maybe?..
This isin't the boot used for unbricking the phone ?
As far as i understand the unbrick process, no it is not.
I think i can be used for dual boot just as well as for a alternative recovery. to my understanding the difference between boot, boot_aging, and recovery is which is booted when. I think if we would blast recovery to boot the phoen would always by default start with recovery, and if we flash boot to recovery we could also implement a sort of dual boot just that than we wouldn't have any recovery.... just my 2 cent
About dualboot, look here: http://forum.xda-developers.com/oneplus-3/how-to/op3-partitions-t3454215 we dont have a spare 3 GB partition, so if we want to dual boot, the new kernel has to be modded to have the system image in the data partition.
Or we use the 1,5 GB unused pace on the last block device as you can see in the partition overvirew I made, for CM with pico gaps that could be enough.
Actually that could be really cool, to have a secondary OS on the phone that does not conflict with the main one
Does that work with unlocked bootloader?
I tryed to press vol up+vol down + power and i get to the normal bootlaoder boot menu,
when i press in the menu power agian it shows a oneplus logo and text fastboot mode but it enters twrp and that is it.
I wonder if this key combination is only avilable when the bootloader is locked...
Apparently you can boot from that partition using the Engineering mode: *#36446337#
if you select "auto aging" the software will than ask you if you wont to reboot...
Anyone remember this thread?
There apparently is a bootloader bug that allows to unlock it without getting the usual boot screen: https://securityresear.ch/2017/02/08/oneplus3-bootloader-vulns/
I wonder if once used these method to unlock you get the option back to boot into the aging boot partition, and if this could be used for something useful.
Like having two different recoveries or switching between different kernels with only one reboot.
One of the most interesting threads currently in OP3 section.
I hope our kernels and recoveries devs join OP in this interesting, challenging and potentially useful quest.
I think the kernel devs will already know about this, so it's probably not that much of a breakthrough, sorry to be that guy although it does remind me of the secondary boot.img for the unbrick of a nexus 5
Has anyone managed to get any Treble ROMs working? I tried the 3 from this post but they just cause a bootloop https://www.xda-developers.com/flash-generic-system-image-project-treble-device/
Do yourself a favour and remove your password / pin / pattern as i've just flashed one via fastboot (no treble recovery)
And it didn't work, now i can't get back into TWRP.
Any ideas?
No new treble ROMs work with our P20 pro's.. its the same for me which is why I'm back on stock for now... As every new version of treble ROMs I have tried do not boot for me they just stick me in a boot loop as well, its the same for the new version of lineageos.. Not sure if it will ever be fixed in the future though on newer builds considering the whole Huawei locking bootloader permanently thing... will probably put developers off Huawei phones all together...
danielfrancisarthurs said:
No new treble ROMs work with our P20 pro's.. its the same for me which is why I'm back on stock for now... As every new version of treble ROMs I have tried do not boot for me they just stick me in a boot loop as well, its the same for the new version of lineageos.. Not sure if it will ever be fixed in the future though on newer builds considering the whole Huawei locking bootloader permanently thing... will probably put developers off Huawei phones all together...
Click to expand...
Click to collapse
How did you get back to Stock? I have no OS now at all lol, i'm in limbo
Erecovery I used.. when booting and you get the unlock boot screen it will tell you to hold volume up I think for 3 seconds to go to erecovery and then just download and restore stock firmware and recovery and let the phone do it's work!
danielfrancisarthurs said:
Erecovery I used.. when booting and you get the unlock boot screen it will tell you to hold volume up I think for 3 seconds to go to erecovery and then just download and restore stock firmware and recovery and let the phone do it's work!
Click to expand...
Click to collapse
Yea i used eRecovery a little earlier myself, we really need twrp which actually allows decryption or even twrp which allows treble
Either that or decrypt and use no verity, haven't bothered with all that yet.
After today though, jesus i'm thinking about it, i literally ended up with nothing, all my wifi networks in work need a second log in, something which eRecovery can't offer.
Completed it when i got home.
Have you managed to install any treble roms? Has anybody?
I don't think it's possible on my device in it's current state, i tried TWRP, Fastboot, several different roms on both and nothing.
Spotted this earlier, might actually work on our devices, what do you think?
https://forum.xda-developers.com/hu...rp-3-2-1-0-t3782866/post76668571#post76668571
It's a treble recovery from the p20 lite forum, similar device, might work, anyone fancy trying it
PS: If i flash this can i just flash my Unofficial TWRP from our forum should it not work? Or can damage be done?
I have no idea! I assume the issues are because of twrp or something in that area.. I have tried flashing system images via fastboot but for some reason I get errors trying it.. I'm not sure what the main issue is on why they don't boot but i would strongly suggest to not try flashing any twrp that's not specifically for our device as you could brick or even break your phone!
danielfrancisarthurs said:
I have no idea! I assume the issues are because of twrp or something in that area.. I have tried flashing system images via fastboot but for some reason I get errors trying it.. I'm not sure what the main issue is on why they don't boot but i would strongly suggest to not try flashing any twrp that's not specifically for our device as you could brick or even break your phone!
Click to expand...
Click to collapse
Apparently you don't need to use twrp at all, I've successfully flashed system images, via fastboot, but they've never booted which is horrible because there's just nothing else here.
In regards to flashing twrp, again apparently if it goes wrong then we can just flash the stock recovery, personally I think flashing another functional recovery would work too. But in all fairness the one in the p20 lite thread doesn't work any more than ours does in the pro thread.
Just hoping things move along.
Yeah I'd assume so.. I haven't been able to flash any image via fastboot but I'd assume it's the ROMs not the recovery.. anyway just heard that Huawei have released the Source code for the P20 so maybe it might be good news for the treble ROMs if they were to implement fixes for the boot loops!
danielfrancisarthurs said:
Yeah I'd assume so.. I haven't been able to flash any image via fastboot but I'd assume it's the ROMs not the recovery.. anyway just heard that Huawei have released the Source code for the P20 so maybe it might be good news for the treble ROMs if they were to implement fixes for the boot loops!
Click to expand...
Click to collapse
Sounds superb on any other flagship in the world, really hope this one picks up, it's a great device, never been happier with a stock ROM before, I think with all aosp lineage ROMs there's going to be huge issues fixing the cameras. Twos hard enough, 3 lol very hard.
Not trying to be negative just a bit worried is all
Can someone take a video of the boot loop
There's actually a method to how this phone loops. It could indicate the problem
Not sure about the camera but there's always ports into the future.. anything is possible! But could be a while till we are able to be booting any decent treble ROMs.. but then again as the source code has been released it may not be that long.. depends how quick the developers for treble react and whether or not they have a Huawei device to work with to fix our issues..
All we can do is hope!
---------- Post added at 11:12 PM ---------- Previous post was at 11:09 PM ----------
I will give it a try flashing a system image again tomorrow and take a video of it if I'm able to! But someone else needs to give it a try too just incase I don't get time please? The best way I can explain it is once the system.img is flashed in twrp I restart system as normal and it boots up normally with the Huawei logo when phone turns on then goes to bootloader unlocked screen and press different buttons for different options to boot from or wait until device boots normally so I wait for it to boot normally and soon as I get past the unlocked bootloader screen it just instantly reboots and just keeps rebooting doing that!
virtyx said:
Can someone take a video of the boot loop
There's actually a method to how this phone loops. It could indicate the problem
Click to expand...
Click to collapse
What signs are you looking for?
First time I tried it went from the press up for 3 seconds page then black, then vibrate then back to solid white Huawei, repeated 3 times until eRecovery asked to wipe.
For me after that point I flashed another and it went through to a lower case android sign, changing times from white to silver in a flow type effect, it stayed that way for around 10 minutes then back to eRecovery, flashing another treble ROM did the same thing.
Currently running: c782, 110, L09 p20 Pro, unofficial twrp and magisk.
The initial installation was via twrp, subsequent flashes wereb performed via fastboot.
Thats pretty much the same for me of what happens! Just boots then get a boot loop and black screen and back to the Huawei logo again from the start.. never able to actually boot a rom..
danielfrancisarthurs said:
Thats pretty much the same for me of what happens! Just boots then get a boot loop and black screen and back to the Huawei logo again from the start.. never able to actually boot a rom..
Click to expand...
Click to collapse
I thought the idea of treble was to match the Android version?
Seems as though it's trial and error with what's allowed.
Treble is still a work in development at the moment.. it doesn't help as well that Huawei are being assholes and making developers want to stay away from Huawei completely due to the whole locking bootloader thing but hopefully there are a couple of developers out there that keeps our devices in mind and hopefully means we will see a fix for our devices soon.. but when that is I have no idea..
danielfrancisarthurs said:
Treble is still a work in development at the moment.. it doesn't help as well that Huawei are being assholes and making developers want to stay away from Huawei completely due to the whole locking bootloader thing but hopefully there are a couple of developers out there that keeps our devices in mind and hopefully means we will see a fix for our devices soon.. but when that is I have no idea..
Click to expand...
Click to collapse
Aye it looks grim, that being said though, the stock ROM with a few tweaks is excellent, I've never once liked a stock ROM before on any device.
Root is easy, twrp is workable, bootloader was a breeze, we only have one actual ROM (LOS) but by all accounts even the p20 Pro camera works exactly the same on that, with that in mind what more do we need?
Course I'd like to be up to my neck in baked ROMs but if you're honest we truly only stick with one or two, as it turns out the two we have are pretty great.
Maybe I'm being optimistic
Just had a reply from another thread, quite interesting...
dladz said:
So in order...
Wipe
Flash ROM / IMG
Factory rest via twrp?
We're you referring to me by the way?
Click to expand...
Click to collapse
Yes, lol
the way i did it was with a stock recovery and system image
boot into erecovery and do a factory reset or a fastboot -w
boot back into the bootloader
flash the system image for the treble rom
then go into erecovery and do a factory reset
and then it should boot no problem at all
twrp cant wipe properly on treble roms
ive done the same on my p20 lite today, all stock and no issues booting at all
let me know how you get on
:good:
From this thread
https://forum.xda-developers.com/huawei-p20-lite/development/recovery-twrp-3-2-1-0-t3782866/page2
Hi, i have been occupied all day to get this to work, it just doesnt. i have followed the exact steps you layed out but when i try to factory reset after flashing the treble rom using fastboot it just gives me the error: "reset failed". I have tried using other GSI images but none work, had to restore my phone thrice because of this. I dont know what is the issue. These are the steps i followed:
1. Went completely stock ( no twrp or root )
2. Successfully factory reset my device.
3. Boot into fastboot and then flash a treble GSI.
4. as soon as the device turned on, went to the recovery to attempt a data wipe but at around 60% of the process completion the recovery gives the error with a red exclamation mark enclosed in the circle.
My device is a CLT-29 (C185). Was really looking forward to treble as my previous device was a Oneplus.
psycho.b94 said:
Hi, i have been occupied all day to get this to work, it just doesnt. i have followed the exact steps you layed out but when i try to factory reset after flashing the treble rom using fastboot it just gives me the error: "reset failed". I have tried using other GSI images but none work, had to restore my phone thrice because of this. I dont know what is the issue. These are the steps i followed:
1. Went completely stock ( no twrp or root )
2. Successfully factory reset my device.
3. Boot into fastboot and then flash a treble GSI.
4. as soon as the device turned on, went to the recovery to attempt a data wipe but at around 60% of the process completion the recovery gives the error with a red exclamation mark enclosed in the circle.
My device is a CLT-29 (C185). Was really looking forward to treble as my previous device was a Oneplus.
Click to expand...
Click to collapse
Ah the OnePlus , got the 5 still with me, great phone, great development.
Perhaps if your device was debrand? Could that be it?
Maybe it's just not meant to be
My device is stuck in the initial boot sequence in which the logo will show as if it is booting normally, then it will stay on this screen until it goes completely blank, at which point I have to hold the power button for a long period of time to get it back to the boot sequence. My phone is unlocked and I was trying my first time at flashing a custom recovery and OS, I flashed my device with TWRP and successfully installed it along with a flash of pixel experience, After using pixel experience I wanted to try lineage OS since it wasn't as good as I hoped, so I tried to get into the TWRP and I could not do it at all I tried every method I could search. After an hour of trying different methods of getting to twrp I tried to re-flash the recovery and that is when the phone because unresponsive and does what I have described above. I currently have access to fast boot and I dont want to go ****ing my phone up more than I have. If anyone can give me a step by step guide on how to fix this it would help so much since im new to android and I cant afford another £400 phone.
Thanks
BJack0 said:
My device is stuck in the initial boot sequence in which the logo will show as if it is booting normally, then it will stay on this screen until it goes completely blank, at which point I have to hold the power button for a long period of time to get it back to the boot sequence. My phone is unlocked and I was trying my first time at flashing a custom recovery and OS, I flashed my device with TWRP and successfully installed it along with a flash of pixel experience, After using pixel experience I wanted to try lineage OS since it wasn't as good as I hoped, so I tried to get into the TWRP and I could not do it at all I tried every method I could search. After an hour of trying different methods of getting to twrp I tried to re-flash the recovery and that is when the phone because unresponsive and does what I have described above. I currently have access to fast boot and I dont want to go ****ing my phone up more than I have. If anyone can give me a step by step guide on how to fix this it would help so much since im new to android and I cant afford another £400 phone.
Thanks
Click to expand...
Click to collapse
try booting twrp
'fastboot boot img name' then flash recovery from there. hope it works.
BJack0 said:
My device is stuck in the initial boot sequence in which the logo will show as if it is booting normally, then it will stay on this screen until it goes completely blank, at which point I have to hold the power button for a long period of time to get it back to the boot sequence. My phone is unlocked and I was trying my first time at flashing a custom recovery and OS, I flashed my device with TWRP and successfully installed it along with a flash of pixel experience, After using pixel experience I wanted to try lineage OS since it wasn't as good as I hoped, so I tried to get into the TWRP and I could not do it at all I tried every method I could search. After an hour of trying different methods of getting to twrp I tried to re-flash the recovery and that is when the phone because unresponsive and does what I have described above. I currently have access to fast boot and I dont want to go ****ing my phone up more than I have. If anyone can give me a step by step guide on how to fix this it would help so much since im new to android and I cant afford another £400 phone.
Thanks
Click to expand...
Click to collapse
Don't worry, things can be recovered easily. Until you get more knowledgeable and you understand more about flashing use this failsafe to recover from (almost) anything
Go here and get the latest fastboot ROM for your phone.
https://xiaomifirmwareupdater.com/miui/raphael/
For now make sure you get the one that matches the region for your phone.
Then follow this guide to flash it
https://c.mi.com/thread-1857937-1-1.html
Use the fastboot flashing section.
Make sure you change the flash option to 'clean all' when flashing. The default option will lock the bootloader again after flashing. If you do the default option with any ROM that is not the same region as the phone you will hard brick the phone, this is why I recommend getting the ROM that matches your phone.
When unpacking the fastboot ROM, it is a Linux/Unix zipped tarball, most Windows zip software will need to extract it twice. The first time will give you a single .tar file (if it doesn't have an extension then rename it and add .tar to the end) You will then need to extract everything from the tar file, which you give you the folder, containing the ROM data, to point the Mi Flash Tool at.
After doing this you, if you've remembered to change the flash option to 'clean all', then you'll have restored to stock and kept the bootloader unlocked. Now you're good to try again.
Keep a copy of the fastboot ROM on your PC and back everything up on your phone before flashing. Then if you get in a mess you know how to easily recover things.
Once you get more experienced there will be other things you might be able to do, depending on the situation, that allow you to get things working without losing everything and needing to start from scratch.
Thanks
Robbo.5000 said:
Don't worry, things can be recovered easily. Until you get more knowledgeable and you understand more about flashing use this failsafe to recover from (almost) anything
Click to expand...
Click to collapse
Thank you so much for the details post, I will try what you have said above and will report back with my results. I have one question if you know the answer ( My phone is the UK edition of the Mi 9T pro ) Would I need to download the global or EEA fastboot version.
BJack0 said:
Thank you so much for the details post, I will try what you have said above and will report back with my results. I have one question if you know the answer ( My phone is the UK edition of the Mi 9T pro ) Would I need to download the global or EEA fastboot version.
Click to expand...
Click to collapse
For safety download the EEA ROM.
I also suggest you immediately flash dm_verity (https://forum.xda-developers.com/k20-pro/how-to/flashing-orangefox-recovery-mi-9t-pro-t3980579), after you flash twrp, wipe data and then flash that
Sent from my Redmi K20 Pro using Tapatalk
Robbo.5000 said:
For safety download the EEA ROM.
Click to expand...
Click to collapse
Everything you said worded flawlessly and your a life saver. If you dont mind do you have a link to a set of guides on how to correctly flash a custom recovery and lineage OS? since when I try to research these guides I get 5 different versions of TWRP and lock my phone out :laugh:
ishaqtkr said:
I also suggest you immediately flash dm_verity after you flash twrp, wipe data and then flash that
Click to expand...
Click to collapse
If you dont mind me asking could you go into slightly more detial on that since I have seen orange fox but I dont understand what dm_verity is.
Please ignore all reply's above as I am going to make another separate post about lineage OS
Thank you for replying and resolving my issue.
Hi,
Today my device was lagging and I restart it. Just after that I get the bootloop (showing MI.com logo). I can't open the recovery menu using the Power + Vol+ combination, but at least I could load FASTBOOT using Power + Vol-.
Using terminal command "fastboot reboot recovery" also doesn't help. I can't turn off the device as well - after some time showing me the logo device reboots again.
History - I have flashed my device ~1.5 year ago using OrangeFox + MIUI 11 raphael. The reason why I did it was my stock firmware didn't allow me to use NFC, there just was no option to enable it. After flashing everything was fine until today. Btw, device is unlocked. I am not sure what ROM version did use exactly because pretty much time passed already.
I spent a day googling for a solution, but didn't find anything.
What can be the reason? Is there a way to fix it?
If you haven't tried it yet, I'd suggest you flash your latest backup (if any) or flash the stock ROM again.
@TrulyPain no, I dont have any backup unfortunately.
Regarding the flashing stock ROM
1. Before I used OrangeFox to flash the device but now I cant boot recovery mode. Is there a safe way to do so?
2. Does only stock ROM fit? No custom?
Tried so many different approaches today. None of custom recoveries worked. I tried to use stock recovery - same result.
The only thing I didn't try is Mi Flash Pro stock ROM flash, but before that I wish to be sure I tried everything else.
Also, the repair specialist told me (remotely, he didn't check the device) that potentially it can be the memory hardware problem and advised me to visit Xiaomi official repair service. But.. it's pretty complicated for me currently.
romahaaa said:
Does only stock ROM fit? No custom?
Click to expand...
Click to collapse
I would recommend starting with the stock ROM as you can then more easily see if it is a hardware-related problem or not. Also, it sets a suitable environment for any custom ROM installed afterward. This, as many custom ROMs, don't contain all partitions and need some partitions to be written by the stock ROM, e.g., the "OEM" partition.
After you have installed stock ROM - if everything works fine - you can install any custom ROM of your choice following the recommended instructions.
We tried 2 difference ways to flash to phone using stock ROM, but no luck. Seems the problem was in the motherboard. Left it for repair, but.. doesn't mater already, as everything has lost. After that case I move to iPhone back - there would never happens this **** with data lost in unexpected cases.
Thanks for the help