flashing basics - Xiaomi Redmi Note 4 Questions & Answers

hii,
My device is currently running on miui 8.5.4.0 global stable,i want to flash los 14.1,and planned some steps in order to revert back to miui safely.please correct me if i am wrong.
1.boot into twrp recovery.
2.Take full backup of current working rom including system.
3.clear data/system/cache/dalvik.
4.flash firmware-los rom-gapps-reboot.
Steps to revert back:-
1.boot into twrp recovery.
2.clear data/system/cache/dalvik.
3.restore full miui backup including system.
4.flash lazy flasher zip to disable dm-verity and forced encryption.
5.reboot.
i have just learnt basics completely but i had some doubts so i posted the entire procedure i thought to do.
thanks.

After taking backup first go to Wipe menu and "Format Data" , type yes and reboot recovery, it will remove encryption - then you can wipe data/system/cache etc..

/system wipe is never necessary .. You can skip that

Hollow6 said:
/system wipe is never necessary .. You can skip that
Click to expand...
Click to collapse
doesn't it mess up with firmware flash of custom rom?does a custom rom contains a system partition of its own to be flashed?or it just replaces or moves required system files to system partition of stock rom? help me to clear my concept!

k3lcior said:
After taking backup first go to Wipe menu and "Format Data" , type yes and reboot recovery, it will remove encryption - then you can wipe data/system/cache etc..
Click to expand...
Click to collapse
what is the difference between format data and wipe data? isn't it same?i am asking so because i havnt seen such option in recovery before.

sorabhsolanki said:
doesn't it mess up with firmware flash of custom rom?does a custom rom contains a system partition of its own to be flashed?or it just replaces or moves required system files to system partition of stock rom? help me to clear my concept!
Click to expand...
Click to collapse
Every ROM does contains its own system ..
When you flash any ROM (a full fledged ROM not OTAs) , the previous system is replaced by the later one ..
---------- Post added at 05:54 AM ---------- Previous post was at 05:50 AM ----------
sorabhsolanki said:
what is the difference between format data and wipe data? isn't it same?i am asking so because i havnt seen such option in recovery before.
Click to expand...
Click to collapse
You'll have to understand what Format Exactly we are here talking about .. When you go to TWRP/wipe , you are provided with 2 options , Format and Advanced wipe .
The format option is set to "wipe" the partitions, /data /cache /dalvik , that is generally what we require in order to flash ROMs , the wipe Option is hence the same as format , but I think the guy above is talking about Full fledged Wipe that includes the "internal storage" as well which can be selected by twrp/wipe/advanced wipe

Hollow6 said:
Every ROM does contains its own system ..
When you flash any ROM (a full fledged ROM not OTAs) , the previous system is replaced by the later one ..
Click to expand...
Click to collapse
thanks.one more question.
why dont i need to disable dm-verity and forced encryption after flashing custom rom?why kernel doesn't trigger it,because in that case there is a modification in system partition and dm-verity feature of kernel should prevent the rom from booting.

The "kernel" itself also gets replaced by a modified kernel .. But then again , I'm not sure as to why DM verity doesn't kick in , better ask the Developers (Y)

sorabhsolanki said:
hii,
My device is currently running on miui 8.5.4.0 global stable,i want to flash los 14.1,and planned some steps in order to revert back to miui safely.please correct me if i am wrong.
1.boot into twrp recovery.
2.Take full backup of current working rom including system.
3.clear data/system/cache/dalvik.
4.flash firmware-los rom-gapps-reboot.
Steps to revert back:-
1.boot into twrp recovery.
2.clear data/system/cache/dalvik.
3.restore full miui backup including system.
4.flash lazy flasher zip to disable dm-verity and forced encryption.
5.reboot.
i have just learnt basics completely but i had some doubts so i posted the entire procedure i thought to do.
thanks.
Click to expand...
Click to collapse
when you want to revert back you dont need to wipe anything or flash disable dm verify, just restore your previous nandroid backup and thats all

Related

[Q] Flahsing to franco ROM

hi, i wanna ask...if i wanna flash to another devoid.Franco ROM (previously using void.echo) do i still need to dl the Terminal Emulator & Custom Recovery Tool Image and its Flash Image then run the Terminal Emulator & key in the codes then only start flashing another ROM?
i've did tat at the first time i flashed to a void.echo ROM now i wanted to flash to devoid.franco, do i still need to repeat all that step again? or i just enter the "power button, volume down button and home button" mode then wipe then flash will be good?..need advice thanks..
Just wipe and flash..
thanks for quick reply!
another question...how do i know that i already have the ext partition?...after i wipe everything included wipe ext..do i still need to create again?
Wiping doesn't remove partition..
On Mike mod
can we install franco kernel on mike mod 6.5.2
If your from void#echo previously, do these:
1. Backup all your user apps+contacts via Titanium Backup and all SMS via SMS backup
(they're all available free in the market)
2. Turn off phone. Reboot to recovery (hold power button+home+vol down)
3. Wipe user data, .android secure, cache, dalvik-cache, battery stats, and wipe ext.
4. Since your on void#echo already, you don't need to partition your sdcard.
5. Download devoid.franco, use usb-toggle on the recovery menu and copy it from pc to your phone while on the recovery and flash it.
6. Reboot (first boot might take a while)
7. Configure settings, Install titanium backup and sms restore app, Then restore all apps+settings+SMS. Enjoy~
8. Well if you know already what your doing and want some further improvements (completely optional, just do a nandroid backup incase) :
8.1 Reboot to recovery
8.2 Flash the latest kernel version from franco's thread
8.3 Reboot
8.4 Flash the ZRAM module
8.5 Reboot and Enjoy your phone
Thanks Kira.Lawliet!
hmm...i actually partition my sdcard again...yea..i flash before saw your reply ._.
will it harm? i partition my sdcard again....n flash to devoid.franco
You have to partition only if you want apps2sd. Else let it be. You can easily remove the ext partition by partitioning with 0mb ext partition in recovery.
sanmore said:
can we install franco kernel on mike mod 6.5.2
Click to expand...
Click to collapse
definitely you can. just flash your device with mik_os mod first. then flash the franco kernel (v15 now) and lastly flash the ZRAM initializer.
just make sure you wipe the cache and dalvik cache first before you're flashing.
flashing
Ok guys just remember that rom flashing requires you to follow rom partition conditions while kernel flashing may not need to recreate partitions. In my case, I'm using Nessy Hypnos2 and been running with much fluidity after flashing FrancoKernel 14.2. But I did wipe all just to make sure there wont be any conflicts. HYPNOS2 + FRANCOKERNEL 14.2 is like coffee and cream, a perfect match like newlyweds.

[Q] Build a CWM ROM without data wipe - possible or not ?

Hi,
All is in the title,
I woulld like to build my custonROM.
As I am a noob , I would like to use CWM.
I already succeed in building a wipe ROM
Is there any way to make a CWM ROM without wipe (I didn't succeed in) ?
If Yes, are there some conditions ? or some special features to write in the updater-script ? or a special way to build the update.zip ?
Thanks in advance
Well do you mean the ROM requires a wipe to work, or that the zip is wiping?
There will be a line in updater-script for wiping /data in the latter case.
If you're needing to do the wipe to make it work, then you need to look at the ROM you are going from and to...
pulser_g2 said:
Well do you mean the ROM requires a wipe to work, or that the zip is wiping?
There will be a line in updater-script for wiping /data in the latter case.
If you're needing to do the wipe to make it work, then you need to look at the ROM you are going from and to...
Click to expand...
Click to collapse
Thanks for the answer
If I don't use a wipe script, I have some bootloops.
In the way I build the Rom, I am obliged to use a wipe script.
My question was general. Is there a way to make a non wipe customRom working With CWM ?
Thanks
when I want to CMW flash a custom ROM without loosing data nor cache (homescreens, contacts, bookmarks ...). Am I obliged to wipe some data in /data in order to avoid bootloops ?
I was thinking about wiping data/data/ witch should be automatically rebuit. if I am right, are there some other folders I am obliged to wipe ? (dalvik-cache ... ?)
Thanks,
sicopat said:
when I want to CMW flash a custom ROM without loosing data nor cache (homescreens, contacts, bookmarks ...). Am I obliged to wipe some data in /data in order to avoid bootloops ?
I was thinking about wiping data/data/ witch should be automatically rebuit. if I am right, are there some other folders I am obliged to wipe ? (dalvik-cache ... ?)
Thanks,
Click to expand...
Click to collapse
There's no requirement to wipe anything on /data, if same package signatures are used. You shouldn't get boot loops.
pulser_g2 said:
There's no requirement to wipe anything on /data, if same package signatures are used. You shouldn't get boot loops.
Click to expand...
Click to collapse
Ok, If I have well understood,
I want to flash a deodexed ROM over an official ROM, I will have to wipe.
I want to flash a new version (same signature) of my deodexed ROM over the old version, the wipe is not necessary ?
Thanks +++
I succeed in flashing my customROM over herself without loosing anything
[Mode Noob ON] :
If my script, replace everything in /System, why would I have some troubles with signature ?
cause of data cache ?

Update 4.4.2

Hi.
I have the stock rom 4.2.2 its root and a Twrp Recovery.
So i want to update it to 4.4.2.
My Problem is OTA doesnt work because, i have a boot loop i come only into Recovery.
Meanwhile im out of the bootloop.
I wanted to ask if I can update without data loss.
Thanks in advance.
Galaxy05 said:
Hi.
I have the stock rom 4.2.2 its root and a Twrp Recovery.
So i want to update it to 4.4.2.
My Problem is OTA doesnt work because, i have a boot loop i come only into Recovery.
Meanwhile im out of the bootloop.
I wanted to ask if I can update without data loss.
Thanks in advance.
Click to expand...
Click to collapse
Can you nandroid backup in recovery? If so I would do that or titanium backup and copy the backup to PC then use the link below to get back to stock. Then you can update to 4.4.2 root with ioroot25 and use autorec to get custom recovery (twrp).
http://forum.xda-developers.com/showthread.php?t=2432476
OfficialPerson said:
Can you nandroid backup in recovery? If so I would do that or titanium backup and copy the backup to PC then use the link below to get back to stock. Then you can update to 4.4.2 root with ioroot25 and use autorec to get custom recovery (twrp).
http://forum.xda-developers.com/showthread.php?t=2432476
Click to expand...
Click to collapse
What does nandroid backup save? Privat Files? Like (Whatsapp, Pics, Music and so on)
Galaxy05 said:
What does nandroid backup save? Privat Files? Like (Whatsapp, Pics, Music and so on)
Click to expand...
Click to collapse
A nandroid backup is basically a clone of your whole phone so it saves everything.
OfficialPerson said:
A nandroid backup is basically a clone of your whole phone so it saves everything.
Click to expand...
Click to collapse
It's not exactly a clone of the whole phone. It's basically a clone of the currently installed ROM including data, settings, cache. To back up your apps and stuff use Titanium Backup or Copy. To backup music and video and photos, sync that to cloud storage or copy to your pc.
Sent from my LG-D800 using Tapatalk
Jank4AU said:
It's not exactly a clone of the whole phone. It's basically a clone of the currently installed ROM including data, settings, cache. To back up your apps and stuff use Titanium Backup or Copy. To backup music and video and photos, sync that to cloud storage or copy to your pc.
Sent from my LG-D800 using Tapatalk
Click to expand...
Click to collapse
Or i flash the new 4.4.2 Rom with the LG tool. I must not do wipe because I have an older stock rom.
OfficialPerson said:
A nandroid backup is basically a clone of your whole phone so it saves everything.
Click to expand...
Click to collapse
Uhmmmmm, nope, not truth.
None of your personal stuff will be backed-up.
I have flashed all is Good.
But i have a Problem with the root.
When i press: apply update from adb, its doing nothing.
The recovery says: Now send the package you want to apply to the device with "adb sideload <filename>"....
votinh said:
Uhmmmmm, nope, not truth.
None of your personal stuff will be backed-up.
Click to expand...
Click to collapse
Oh ok my bad on that part then I was told it clones all your data rom and all. I did a backup and restore
and I had everything from before but I guess its because I didnt factory reset the phone.
OfficialPerson said:
Oh ok my bad on that part then I was told it clones all your data rom and all. I did a backup and restore
and I had everything from before but I guess its because I didnt factory reset the phone.
Click to expand...
Click to collapse
Yeap, each phone will behave differently and for this specific G2, Factory Reset will wipe EVERYTHING.
votinh said:
Yeap, each phone will behave differently and for this specific G2, Factory Reset will wipe EVERYTHING.
Click to expand...
Click to collapse
So when people say to wipe everything like when installing a rom do they mean factory reset from the settings menu or from recovery?
OfficialPerson said:
So when people say to wipe everything like when installing a rom do they mean factory reset from the settings menu or from recovery?
Click to expand...
Click to collapse
Oh, no no, especially on this G2. Nope, don't do that.
"Wipe" when updating/installing new ROM is
+ wipe dalvik cache // a must regardless of dirty install or clean install
+ wipe data cache (?) // a must regardless of dirty install or clean install
+ wipe data // this will wipe data partition. Must be done when fresh installing new ROM (basically not an update)
+ wipe system // only need in some case, generally, you don't need to do this step
For this G2, if you Factory Reset, you will lose every personal stuff that on the phone, all end-user partition.
votinh said:
Oh, no no, especially on this G2. Nope, don't do that.
"Wipe" when updating/installing new ROM is
+ wipe dalvik cache // a must regardless of dirty install or clean install
+ wipe data cache (?) // a must regardless of dirty install or clean install
+ wipe data // this will wipe data partition. Must be done when fresh installing new ROM (basically not an update)
+ wipe system // only need in some case, generally, you don't need to do this step
For this G2, if you Factory Reset, you will lose every personal stuff that on the phone, all end-user partition.
Click to expand...
Click to collapse
Oh ok because for the Mahdi 2.5 rom for G2's he says to wipe "EVERYTHING". So I'm guessing that would be a case
where you need to wipe system as well then? Thanks for the clarifications.
I've been playing around with 5 Android devices and so many custom ROMs. Some do require FULL wipe including format system, some others don't.
Just read the instruction of the ROMs' authors and you should be fine.
votinh said:
Uhmmmmm, nope, not truth.
None of your personal stuff will be backed-up.
Click to expand...
Click to collapse
A nandroid copies the phone set up as is at the time of the back up. Everything, settings, call history, text messages, contacts, app versions... Everything!
---------- Post added at 09:53 AM ---------- Previous post was at 09:47 AM ----------
votinh said:
Oh, no no, especially on this G2. Nope, don't do that.
"Wipe" when updating/installing new ROM is
+ wipe dalvik cache // a must regardless of dirty install or clean install
+ wipe data cache (?) // a must regardless of dirty install or clean install
+ wipe data // this will wipe data partition. Must be done when fresh installing new ROM (basically not an update)
+ wipe system // only need in some case, generally, you don't need to do this step
For this G2, if you Factory Reset, you will lose every personal stuff that on the phone, all end-user partition.
Click to expand...
Click to collapse
Always wipe system when going from rom to rom. The new rom will install new system stuff.. Never wipe "internal storage"!

How to correctly swtich ROM's

Hi there,
I may be being stupid here I want to move from Lineage OS to crDroid. Im currently on the latest 01/01/2019 LOS build, with 8.12.24 vendor firmware. I didnt flash the disable encryption patch so my device is encrypted. Im guessing I need to remove any security off the lock screen? Im using the unofficial TWRP build - 12/12/2018.
So to make the switch, do i need to wipe my data, or can I migrate over?
And when I go to flash, which wipes do I need to do before installing the ROM?
Im just worried about flashing and then locking my phone with the encryption because I've missed a step This is my first phone that uses android 9.0, and im not used to the forced encryption stuff.
If someone could give me a lil list of steps, that would be much appreciated!
Thanks!
That I do is:
-wipe system, data, cache, Dalvik
-flash new rom, flash gapps
**Flash any custom kernel if you want
Now here is the differences
1) if I want keep the encryption but format the internal storage I just do a factory reset or format data or internal storage, all are the same and reboot in the system
2) if I don't want keep the encryption, I reboot into recovery, later format data, then flash the zip to keep the phone unencrypted (FDE? I don't remember the name exactly but it is in a post on the guide section), and last flash magisk, then reboot system
3) if you have the phone without encryption and you want keep it in that way, just do the wipe to the system,data,cache,dalvik then flash system, gapps, any kernel at your choice, magisk and reboot into system
PD: remember if you flash a vendor zip, the phone will be encrypt
PS:I hope that I don't get wrong in something

Removing Data Encryption

I have TWRP installed, but when I wipe data, encryption still is active. TWRP is essentially useless if it can't access /data to do a complete backup/restore. Can someone post steps of how to remove encryption?
You need to install a file called TREBLE-Disable-Forceencrypt using TWRP. Here is the link : https://androidfilehost.com/?fid=1322778262904004415
Make sure to FORMAT DATA in TWRP (not a simple /data wipe, a format, where you need to type yes) and then flash your new system and after that this zip.
_cab13_ said:
You need to install a file called TREBLE-Disable-Forceencrypt using TWRP. Here is the link : https://androidfilehost.com/?fid=1322778262904004415
Make sure to FORMAT DATA in TWRP (not a simple /data wipe, a format, where you need to type yes) and then flash your new system and after that this zip.
Click to expand...
Click to collapse
Thanks cab13, that did the trick. Appreciate it. I backed up, and then deleted the /data partition, and TWRP warned "No OS"! Restored my backup, so all is working in both directions with TWRP. Thank You!
No big deal Enjoy your phone.
I've created a thread for the Umidigi One Max modding, check it out : https://forum.xda-developers.com/android/development/umidigi-one-max-custom-rom-modding-t3942521/

Categories

Resources