Help Needed: Resize System Partition - Xiaomi Mi 4C

Hi,
My system partition size is 1.9GB and I am unable to update from current 7.1.6. The latest ROMs filesize are much larger and thus, the phone will bricked whenever I tried to update to newer ROMs.
I tried fastboot ROMs and the same problem persisted except 7.1.6 versions and below. Of course, CM13 worked because the ROM size is a lot smaller but the camera quality is horrible. sMIUI and xiaomi.eu ROMs do not work, resulting in bricking (hard brick- I cannot power up). The only way out is to install 7.1.6 Fastboot ROM via MiFlash.
I tried wiping and even formatting my file partitions to clean away rubbish but do not resolve the fundamental problem that the system partition size is only 1.85GB (1.5GB filled).
Any ways to format/resize my system partition?
PS: The phone is rooted and I have the latest SuperSU (2.74) and TWRP (3.0.2) installed.

Fastboot edl should rewrite all the partition data that is needed, expect the one part that has your imei numbers (take backup before you start)
Here's the guide:
http://en.miui.com/thread-237832-1-1.html

Related

[Q] Pre-flash, some questions

I'm about to flash my first custom ROM on my Desire S.
It's S-OFF, rooted and fully backed up (nandroid, titanium backup, SD to PC).
I tried to read as much as possible abut the flashing process and some of the android internals. Excuse me if my questions are still a bit noobish, I tried to read a lot.
I've decided to try CM7 and repartition my SD card to add an ext4 sd-ext partition.
Before I flash, I still have some questions:
- Where is HBOOT located exactly? /boot ?
- Where is the recovery (ClockworkMod in my case) located? /recovery ?
- Revolutionary installed ClockworkMod. However, ROM Manager also offered me to flash it (that's what I did). Did ROM Manager overwrite the ClockworkMod in /recovery?
- Assuming that /boot and /recovery are critical (from my previous questions), and that they are backed up and available (nandroid backup files) on my PC, can I always push those back with adb in case something goes wrong?
- What's the correct order for the flash + repartition?
Repartition first, allow the wipe (data + everything) to wipe the SD during flashing, copy data back after new ROM is running?
- What's the safest/best way to flash? From HBOOT/recovery? Or ROM Manager? Or do they actually do exactly the same?
I.e. ROM Manager rebooting and starting ClockworkMod?
Sorry for all the questions. I'm pretty sure that the flash will work fine, but I always like to know more about the internals first.
Quark^2 said:
I'm about to flash my first custom ROM on my Desire S.
It's S-OFF, rooted and fully backed up (nandroid, titanium backup, SD to PC).
I tried to read as much as possible abut the flashing process and some of the android internals. Excuse me if my questions are still a bit noobish, I tried to read a lot.
I've decided to try CM7 and repartition my SD card to add an ext4 sd-ext partition.
Before I flash, I still have some questions:
- Where is HBOOT located exactly? /boot ?
- Where is the recovery (ClockworkMod in my case) located? /recovery ?
- Revolutionary installed ClockworkMod. However, ROM Manager also offered me to flash it (that's what I did). Did ROM Manager overwrite the ClockworkMod in /recovery?
- Assuming that /boot and /recovery are critical (from my previous questions), and that they are backed up and available (nandroid backup files) on my PC, can I always push those back with adb in case something goes wrong?
- What's the correct order for the flash + repartition?
Repartition first, allow the wipe (data + everything) to wipe the SD during flashing, copy data back after new ROM is running?
- What's the safest/best way to flash? From HBOOT/recovery? Or ROM Manager? Or do they actually do exactly the same?
I.e. ROM Manager rebooting and starting ClockworkMod?
Sorry for all the questions. I'm pretty sure that the flash will work fine, but I always like to know more about the internals first.
Click to expand...
Click to collapse
Very impressed to see someone actually ask intelligent questions....and seek a real understanding..
Unfortunately its now my dinner time....so I only have a few minutes....so I'll attempt to answer quickly:
YES (boot.img in backup), YES (recovery.img in backup) and unless you play lots of games and require lots of ext space this device has a decent amount of internal storage so that it doesn't require sd-ext partitions (that's just my opinion anyway - these partitions are something from when devices had minimal internal storage)
What I will say is yes you downgraded the CWM version that revolutionary had installed with an older one from ROM Mananager. So you'll be much better of to install EXT4 recovery (which is based on CWM) and overwrite the old CWM, so simply download this file onto your SD card and flash it from recovery over the existing CWM recovery....then when you reboot recovery you'll have the EXT4.
what are the advantages of ext4 recovery exactly? im also running the CWM from the CWMM.
kazen44 said:
what are the advantages of ext4 recovery exactly? im also running the CWM from the CWMM.
Click to expand...
Click to collapse
For a start its based on the same code base as CWM, but, has lots of added functionality, is far more user friendly, is constantly being updated and can be themed! The support is immense as well, just look at the thread.
there's too many to mention, simply read the EXT4 forum link in the page above so see them for yourself!
Just the file system conversion part of it is worth it!
whats the advantage of ext4 on a phone instead of ext3? ive worked with both filesystems quite a lot on my desktop PC. but there does not seem to be a major diffrence. i know that EXT4 supports journaling far better then ext3 does. but thats about the only thing i notice as diffrent on my linux install.
Actually boot and hboot are different things. I'm not 100% sure but I think that the kernel is located in the /boot partition, you are able to format it or replace its content from within the recovery.
Hboot is the initial bootloader that is located in a secure block of eMMC, you can't access it from recovery and can't backup it. If you completely wipe all partitions accessible through recovery, you still can easily install new ROM or restore from backup, even if you lose your recovery you can still restore it through fastboot. Phone with damaged or incorrect hboot is definitely a brick, it won't be accessible through PC connection and won't load up. Normally it's only possible to make permanent damage to the phone if you incorrectly flash hboot or radio image, while it's possible to brick even without messing with them, it's usually caused by faulty hardware (eMMC chip).
Ok thanks all so far.
So, HBOOT resides in eMMC and not is easily accessible (but still flashable).
At least, that's what Revolutionary did, my current HBOOT shows "Revolutionary" in the first line.
The kernel resides in /boot, which is the same for all all regular linux distros.
I think I have a clearer picture of the internals now. Still not 100% clear, but getting there.
I am going to flash 4EXTRecovery first, before trying to flash my first custom ROM.
Ofcourse, repeating the backup cycle, just in case.
I'm only left with these questions (for now ;-):
- What's the best way to flash now? From ROM Manager or 4EXTRecovery (from HBOOT manually)?
- Does the Wiping (everything, data + cache) also clear my SD card? I'm fairly sure it does.
Quark^2 said:
I'm only left with these questions (for now ;-):
- What's the best way to flash now? From ROM Manager or 4EXTRecovery (from HBOOT manually)?
- Does the Wiping (everything, data + cache) also clear my SD card? I'm fairly sure it does.
Click to expand...
Click to collapse
ROM Manager loads recovery in order to flash, so there is no real difference. Flashing from HBOOT is only required for updating hboot itself or radio, I'm pretty sure it's better to use recovery to flash everything else.
Wiping everything formats /boot, /system, /data and /cache partitions, it doesn't wipe SD card (would be kinda stupid if it did actually, as CWM recovery places backup files on SD). I still make SD card backups from time to time, just for convenience.
Evilmystic said:
Actually boot and hboot are different things. I'm not 100% sure but I think that the kernel is located in the /boot partition, you are able to format it or replace its content from within the recovery.
Hboot is the initial bootloader that is located in a secure block of eMMC, you can't access it from recovery and can't backup it. If you completely wipe all partitions accessible through recovery, you still can easily install new ROM or restore from backup, even if you lose your recovery you can still restore it through fastboot. Phone with damaged or incorrect hboot is definitely a brick, it won't be accessible through PC connection and won't load up. Normally it's only possible to make permanent damage to the phone if you incorrectly flash hboot or radio image, while it's possible to brick even without messing with them, it's usually caused by faulty hardware (eMMC chip).
Click to expand...
Click to collapse
Thanks for the correction , I also have a slightly clearer picture of the internals myself.
Evilmystic said:
ROM Manager loads recovery in order to flash, so there is no real difference. Flashing from HBOOT is only required for updating hboot itself or radio, I'm pretty sure it's better to use recovery to flash everything else.
Wiping everything formats /boot, /system, /data and /cache partitions, it doesn't wipe SD card (would be kinda stupid if it did actually, as CWM recovery places backup files on SD). I still make SD card backups from time to time, just for convenience.
Click to expand...
Click to collapse
Thanks for the correction , and on thinking it through of course you're right, I also have a slightly clearer picture of the internals myself.

[REPARTITION][CWM-ZIP] Get 1.9 GB extra for user data on N7100!

Hello everyone
This is CWM-Zip script to repartition our N7100 to gain 1.9 GB more for user data partition.
This script is originally from http://forum.xda-developers.com/galaxy-s3/development/guide-extra-1-3-gb-user-data-t2762594 It’s for GT-i9300. Made by @forumber2 :good:. Thanks to him, without his easy simple script, I wouldn’t be able to port this script.
This is how Samsung partitioned N7100
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
After running the script
Please note that this script is not suitable to ROMs that require storing big files in CACHE and PRELOAD or HIDDEN, notably Official ROMs, as you can see that CACHE and PRELOAD got shrank.
I’m not sure if there are some custom ROMs that store files in CACHE and PRELOAD, so check the ROMs installation zip first before using this repartition script. Check by reading update-binary in META-INF and observing folder structure inside the zip file.
I’m using DN3 v5+ and it doesn’t store any files.
I checked Omega v29, it doesn't use PRELOAD to store files, even wiping it before install.
X-Treme v2.1 is safe to install, even wiping PRELOAD before install.
BIG UPDATE 1
For some ROMs like Phoenix ROM requires storing data to PRELOAD, but not CACHE.
Use partition script "Repartition_N7100_16GB_PreloadStockSize587MB.zip" instead of "Repartition_N7100_16GB.zip"
It will partition PRELOAD to size of Stock 587 MBs.
CACHE remains 100 MBs, and SYSTEM remains around 2 GBs. GAINED USERDATA FREE SPACE IS AROUND 1328 MBs.
If your ROM .zip installer doesn't store files in PRELOAD, use "Repartition_N7100_16GB.zip" instead.
FYI, Big CACHE partition is used to store official Samsung OTA updates file, if you are on custom ROMs, then you can’t use Samsung OTA updates anyway. Big cache partition is practically waste of free space, but it is still required for Google Play APK downloads. (Max Google Play APK size is 50 MBs) In fact, Google Play apk downloads are stored in /data/com.android.providers.downloads/files/, cache partition is used to store apk downloads in old Android version. This script will partition CACHE with size of 100 MBs. For any Google Play apps that are bigger than 50 MB, they will use expansion files called .obb to help, those obb are stored in "Internal SD Card/Android/obb".
Samsung Apps APK downloads sometimes can be seen large to something like 300 MBs, but these APK downloads are stored in "/data/data/com.sec.android.app.samsungapps/files" So it won't break Samsung Apps downloads.
PRELOAD or HIDDEN is used to store Samsung crap stuffs like ringtones, Wonders of Nature video, starter beautiful images, VODB folder that is used for S-Pen stroke recognition. When user make a factory reset, all data in internal sd card gets deleted, then stuffs in PRELOAD gets copy to internal sd card. That’s why after factory reset Wonder of Nature video comes back.
ALL USERDATA AND INSTALLED OS ARE GOING TO BE REMOVED, SO BACKUP FIRST!
So let’s get started. You will use "Repartition_N7100_16GB.zip OR Repartition_N7100_16GB_PreloadStockSize587MB.zip OR in the attachment
1.Backup of course, if you don’t do System Nandroid backup, be sure to have ROM installer zip ready in external sd card, if you do Nandroid backup or Titanium Backup, make sure to back up to external sd card because this process will erase internal sd card too.You may backup your internal sd card to external sd card, USB-OTG, or Windows PC.
2.You need to use PhilZ Recovery, it doesn’t work with TWRP, TWRP lacks of “parted” binary required for repartitioning.
I personally used PhilZ Touch 6.25.0 on my N7100. 6.41.6 reported to work as well.
3.Install the ZIP and the script will run, after it finished, it will reboot recovery again.
4.We are not done yet, this script still has some bug that formatted partition can’t be mounted. You can see that you can’t mount some partitions or maybe all, weird.
5.We need to fix mount problem manually by go to Mounts and Storage, then format System, Data, Cache, Preload or Hidden one by one, then go to Power Option and reboot recovery once. DO NOT FORMAT BOOT, MODEM, STORAGE/SDCARD1 (external sd card).
6.We have repartition successfully. Now restore data, install ROMs.
How to restore original stock partition table.
You will need to do this if you want to install stock official firmware.
1 - Download "Odin3_v3.07_with_PIT_16GB_GT-N7100.zip" and extract it somewhere
2 - Download any stock ROM from sammobile.com or samsung-updates.com and unzip it.
2 - Open Odin, click "PIT" button and select " PIT_N7100_16GB_20121102.pit"
3 - Click "PDA" and select official ROM that you've downloaded
4 - Click "Start"
5 - After installation, phone will be stuck at bootanimation, don't panic.
6 - Pull out battery, boot to recovery (you can see some mount errors, don't worry)
7 - Select "wipe data/factory reset" in recovery menu
8 - Select "reboot system now"
I recently update 4.3 MJ5 to 4.4.2 ND3 bootloader via odin successfully, just to inform that after repartition, bootloader update still works. If it fails, make sure to try new usb cable. Mine failed first time because of bad usb cable.
See ND 4.4.2 bootloader here http://forum.xda-developers.com/showthread.php?t=2472270 CTRL+F in the thread and find bootloader.
For some people who curious how to output partition table in Terminal.
First you need to install "parted" binary to /system/bin/
parted binary is in attachment,
then use these command in terminal
su
parted /dev/block/mmcblk0
print
Also programs to show partition tables in Google Play can't show partitions offsets, but this command could.
UPDATE 15/10/2014
I found out that in fact, Google Play apk downloads are stored in /data/com.android.providers.downloads/files/, cache partition is used to store apk downloads in old Android version.
UPDATE 24/10/2015
I also uploaded a new partition script cwm-zip file for AOSP users that will repartition system to size of 1 GB, preload 15 mb, cache 100 mb.
This will gain 3 GB of more userdata space.
Please note that once you have repartition with Repartition AOSP N7100 System 1 GB.zip
You will not be able to install Touchwiz based ROM, Touchwiz based ROMs are bigger than 1 GB.
You will have to repartition again with Repartition_N7100_16GB.zip OR Repartition_N7100_16GB_PreloadStockSize587MB.zip, note that all userdata will be deleted.
Note that I personally don't use Note 2 anymore, but this script should work. It's just simple script editing from previous files.
1 GB system partitioning for AOSP/CM is not working as
psndna88, AGNI kernel maker, tests
"it seems we cannot change SYSTEM size, else the bootloader boots only into download mode"
Thanks a lot. I will try it later.
I did repartition my device about a year ago, but I did it manually and used parted program that comes with cwm recovery. The process is fairly simple if you are familiar with unixlike OS'es. The advantage of parted us that you can resize /system partition too (CM11 requires just 400 mb on /system, and default is 1800mb).
I just tried it. It all went fine. Thanks!
My question is, can we have more space, or this is the max we can have?
I guess some space must be reserved though, so the phone can work properly.
steff195 said:
I just tried it. It all went fine. Thanks!
My question is, can we have more space, or this is the max we can have?
I guess some space must be reserved though, so the phone can work properly.
Click to expand...
Click to collapse
Yes we can have just a little bit more space. You may try to shrink cache partition to 60 mbs, shrink preload to 4 mb. That would gain 54 mbs only. I configured cache and preload to be bigger than this for safety purpose. Maybe it will be use to store small files in the future. We also need to keep the number of partitions to be the same as stock one, else everything will malfunction. I still have no ideas what does OTA and TOMBSTONES do.
Sent from my GT-N7100 using XDA Free mobile app
great guide, will try
reminds me of the htc days when we could s off and flash various hboots to increase/decrease various partitions
so, this will accomodate all current custom roms ? edit - just read your warning to check : thanks:
ninekaw9 said:
Yes we can have just a little bit more space. You may try to shrink cache partition to 60 mbs, shrink preload to 4 mb. That would gain 54 mbs only. I configured cache and preload to be bigger than this for safety purpose. Maybe it will be use to store small files in the future. We also need to keep the number of partitions to be the same as stock one, else everything will malfunction. I still have no ideas what does OTA and TOMBSTONES do.
Sent from my GT-N7100 using XDA Free mobile app
Click to expand...
Click to collapse
Then I'll just leave it this way. Don't want my phone to malfunction if I push this to the extreme.
Thanks again!
steff195 said:
Then I'll just leave it this way. Don't want my phone to malfunction if I push this to the extreme.
Thanks again!
Click to expand...
Click to collapse
only a small problem, it does not format anything and says that there is no sim inside, I sincerely hope that you manage to solve the problem ....
also the modem is not installed ...
I saw your post on the DN3 V5+ thread which led me... Seems to be a great concept, especially considering that one of the first things I do upon flashing a stock-based rom is to delete most Sammy things on it.
I understand that you need Philz to flash this; will the latest V6.41.4 do?
Also, do you know of anyway to save all system settings so as to restore them later? I can backup apps and their data but not the stock system settings themselves.
Can we increase system partition???
I need more space in system......
ulkika said:
only a small problem, it does not format anything and says that there is no sim inside, I sincerely hope that you manage to solve the problem ....
also the modem is not installed ...
Click to expand...
Click to collapse
Man, I tried via Philz 6.41.6, since it was recommended in OP. I usually use TWRP, had a nandroid backup of everything including Modem made with TWRP which I placed on external card.
Had the mounting problem after flashing script and rebooting recovery, but I manually solved them, as described in 1st post. Then reflashed TWRP and restored my nandroid from external card. Then also restored my internal sd files (music, games obb, etc) which I saved on pc.
I have no error, I have ND3 modem present, all fine, phone works as before. And 12.1gb total space instead of 10.4 which I had before.
Thanks again!:good:
ulkika said:
only a small problem, it does not format anything and says that there is no sim inside, I sincerely hope that you manage to solve the problem ....
also the modem is not installed ...
Click to expand...
Click to collapse
How come your modem firmware is gone?
Have you try installing ROMs again, most rom installer will flash modem firmware.
My script doesn't touch modem partition at all.
Just partition cache and after that, see the partition table.
Rickav said:
I saw your post on the DN3 V5+ thread which led me... Seems to be a great concept, especially considering that one of the first things I do upon flashing a stock-based rom is to delete most Sammy things on it.
I understand that you need Philz to flash this; will the latest V6.41.4 do?
Also, do you know of anyway to save all system settings so as to restore them later? I can backup apps and their data but not the stock system settings themselves.
Click to expand...
Click to collapse
steff195 used Philz 6.41.6, and it worked.
Well, DN3 v5+ update-script has the commands to delete Android Setting Database on install.
Because you restore data first, then flash DN3v5+ which triggering deletion of Android Setting Database.
So you have to backup android setting database using titanium backup before repartition, then restore after repartition.
Or after repartitioning, install DN3 v5+ first, then restore data using nandroid.
I also have weird problem after deleting Android Setting Database on DN3 v5+. New setting generated is really courrupted. It breaks home button, notification toggles expanding, lock screen, and much more. Everybody else seem to be fine of android setting database regeneration. Weird.
MBariya said:
Can we increase system partition???
I need more space in system......
Click to expand...
Click to collapse
Yes you can.
Extract my .zip script, then open the updater-binary with your favorite text editor, I prefer Notepad++.
Find these line
parted /dev/block/mmcblk0 mkpart primary 168MB 270MB -> CACHE
parted /dev/block/mmcblk0 mkpart primary 270MB 2417MB -> SYSTEM
parted /dev/block/mmcblk0 mkpart primary 2417MB 2432MB -> HIDDEN
parted /dev/block/mmcblk0 mkpart primary 2432MB 2440MB -> OTA
parted /dev/block/mmcblk0 mkpart primary 2440MB 15.8GB -> USERDATA
It is pretty easy to understand indeed, first number after word "primary" is the start offset of the partition, second one is the end.
You may change those number. But remember that CACHE partition must always be bigger than 50 MBs to store google play apk download. Google stated that google play apk max size is 50 mb, bigger than that will use .obb to help.
I recommend you to keep OTA size 8 MB, cause I don't know what it does.
HIDDEN can be shrink up to 5 MB I doubt. I suspect that shrink up to 4 MB can cause issue, I don't know if you set size for 4 MB, will it exceed minimum partition size required.
However, numbers in red can't be changed, they must be 168MB and 15.8 GB the same.
And do not change order of partitions, and there must be 5 partitions. You can't remove HIDDEN and OTA, else partition order and number will wrong, and I think a lot of things will break, including recovery.
After you modified the script. Zip them and put in your phone and flash! :laugh:
philz_touch_6.41.6-n7100.zip.md5 but the problem is that not format data,i solve whith reinstall nd3 and after root and restore system but the patch is not functionally at my device.
---------- Post added at 11:50 AM ---------- Previous post was at 11:45 AM ----------
ninekaw9 said:
How come your modem firmware is gone?
Have you try installing ROMs again, most rom installer will flash modem firmware.
My script doesn't touch modem partition at all.
Just partition cache and after that, see the partition table.
Click to expand...
Click to collapse
I do not know what happens because of it, I can not see the pictures because you do not know how to send to you but that happens on the screen while doing the second restart to do manually format the system tells me that the memory is not formatted.
then I tried to reinstall the old rom and told me that he could not find the modem, it does not restart no line present it tell insert telephone card ... in the end I had to reinstall ND3, before I tried it with the pit from you and given after but not without changing anything in the system memory space....
ulkika said:
philz_touch_6.41.6-n7100.zip.md5 but the problem is that not format data,i solve whith reinstall nd3 and after root and restore system but the patch is not functionally at my device.
---------- Post added at 11:50 AM ---------- Previous post was at 11:45 AM ----------
I do not know what happens because of it, I can not see the pictures because you do not know how to send to you but that happens on the screen while doing the second restart to do manually format the system tells me that the memory is not formatted.
then I tried to reinstall the old rom and told me that he could not find the modem, it does not restart no line present it tell insert telephone card ... in the end I had to reinstall ND3, before I tried it with the pit from you and given after but not without changing anything in the system memory space....
Click to expand...
Click to collapse
I am very confused with your language. After you used my script, did you go to "Mounts and Storage", then format SYSTEM DATA CACHE PRELOAD?
only an other question,i use x-treme rom 2.1 is possible that is the problem...
ulkika said:
only an other question,i use x-treme rom 2.1 is possible that is the problem...
Click to expand...
Click to collapse
I'm downloading it and will diagnose the installation file.
ninekaw9 said:
I am very confused with your language. After you used my script, did you go to "Mounts and Storage", then format SYSTEM DATA CACHE PRELOAD?
Click to expand...
Click to collapse
after reboot of first install, is impossible for me format prelod .system and cache....
ulkika said:
after reboot of first install, is impossible for me format prelod .system and cache....
Click to expand...
Click to collapse
Try this Philz Touch version. It is the version that I used to repartition on my device.
I'm still downloading your ROM, mediafire is quite slow today.

System Partition reporting 20GB but can't find files

Background: I have unlocked the bootloader and used Team Win Recovery project to root the phone. I'm running the latest Sailfish Google stock img.
Problem: Android 7.1.1. is reporting close to full, unable to receive emails and trouble with taking pictures etc. When running a check on file sizes via the OS, all partitions are as expected except the /system partition is reporting 20GB. When viewing the system partition via TWRP terminal window I can't find 20GB worth of files.
Questions: Could OS be reporting the cumulative SLOT A and SLOT B system partitions? If so, how would I clean up the system partition in this case? I think TWRP is loaded on one slot and the OS is loaded on the other but I'm not sure because I did rooting a couple months ago.
Any help would be appreciated. Thanks in advance.
Downalod the 7.1.1 stock image and run flash all.bat then start over, it's probably your best bet.

Question about A/B paritions, TWRP, flashing order and rebooting

I've read many threads about the A/B parition scheme and I'm not new to flashing so I do know how it works. But some things still confuse me:
1) Which is the correct flashing order for ROM/TWRP/Magisk/Open GApps/Kernel? Like this?
Clean: ROM & TWRP, reboot, Open GApps & Magisk & custom kernel, done?
Dirty: ROM & TWRP, reboot, Magisk & custom kernel, done?
So after a reboot Magisk and after that the custom kernel?
2) Why is it necessary to reboot after ROM & TWRP flash?
3) When is slot A and B switched? After every reboot or what triggers the switching mechanism?
4) AFAIK there is no firmware zip or something similar like with the OnePlus 5T am I correct? When I have OOS installed and want to switch to a custom ROM how should i format /data or internal storage or is this even necessary? Do they all use the same encryption? Do I need to flash the custom ROM twice or shall I wait for the first OTA update? Because that would mean I have to boot to TWRP, flash ROM & TWRP, reboot, flash Gapps, Magisk and custom ROM, reboot to the other slot and do the same?
5) Do I need to wipe internal storage when encrypted and switching ROMs or is it unaffected (so only wipe /data)?
6) Is there any way to know which partition is used when booting the ROM or only in TWRP?
Thanks in advance!
Macusercom said:
I've read many threads about the A/B parition scheme and I'm not new to flashing so I do know how it works. But some things still confuse me:
Click to expand...
Click to collapse
1. Follow instructions on the custom rom OP, but that order will usually work.
2. Rebooting makes sure you are on the active slot, which will change with a full OOS flash.
3. Only when flashing the full OOS package or installing an update through the update engine. Some roms might also switch the slot, though I am not familiar with which ones. Again, just be sure you follow the installation instructions for that rom.
4. Varies by rom. Normally not necessary to format unless rolling back to an earlier security patch.
6. There are apps like DevCheck that will show you which slot is active.
So if I’m on slot A and go to the recovery, flashing the ROM changes slot B and then triggers the switch so that rebooting to recovery results in me being at slot B. From there Gapps etc. if flashed on the same slot so tafter a reboot everything is done? Is that correct? Makes it more clear to me now.
Any issues or changes with keymaster aren’t an issue now? So switching between ROMs without wiping would be possible (although with some issues after boot) but it would boot? Or would you need to format /system, /data and internal storage?
Wiping internal storage never is recommended which makes me ask why? On the 5T a full wipe was required as different ROMs use different keymaster versions etc. Was kinda a bit annoying.

So many years on forum, still many times i manage to brick/bootloop my phone.. Help!

I need some explanation to make things clear..
1) First and most important. If you want to make a clean install, what you have to wipe? Should you format data also, and why? Format data affects system? Can you format data and still boot into rom? When you format/wipe all, is there something left in the phone? If no, then why still i can see in mount settings, that the folders still have Mb/Gb inside them? What are they? I guess you can';t delete everything from the phone? For example now i am stuck on custom animation bootloop. So there is still data left.
2) Format data make your encrypted or decrypted? Or just removes all encryption and if a) you install a rom you go automatically encrypted, b) you install a rom and flash no_verity you go decrypted?
3) If i go decrypted, the only way to go encypted is to install stock OS and why?
4) When is necessary to have the stock rom flashed in order to flash custom rom afterwards? If you want to install a different android version from the one that you have? Any other reason? Is it necessary to install the whole stock image, or just enough to install firmware + radio?
5) If you wipe/format all, the phone has some firmware,radio,vendor etc stored inside or it's empty 100%?
6) Is it 100% safe to install a TWRP through TWRP?
And now let's say the problem i had. But i think i know where was the problem.. I had installed android pie + xXx no_limits on my oneplus5 and i was decrypted. Some months later i decided to try something else, so i installed an AOSP android 10 version. I just wipe/format system,data,dalvik,cache then flashed rom, gapps, magisk. But i had some bugs on this version, lags and huge battery drain. Also whenever i was booting into TWRP it moved me on Mount --> Decrypt screen.. And i don't know why?
Now that i try to figure i know that the problem was i install a custom android 10 rom, without first installing the android 10 stock rom? In order to get the proper firmware etc? Or what? The instructions for installing the rom are the following, which i followed them 100% :
NOTE:
WE ARE ENCRYPTED (FILE BASED FORCED ENCRYPTION). So if you are unencrypted format data partition or use any no_verity solution you want. We don't support it.
1. Download the ROM and GApps and transfer them to your device.
2. Boot to recovery (TWRP recommended). Bluspark twrp recovery recommended.
3. Wipe the System, Cache, and Data (you might need to format the data partition in some cases!).
4. Flash firmware. Actual one is 9.0.11. Download.
5. Flash the ROM Zipfile.
6. Reboot to TWRP recovery.
7. Flash the GApps (optional, needed for e.g. Google Playstore to work) and Magisk (optional too if you want a root solution).
8. Reboot and set up your device.
Click to expand...
Click to collapse
The ROM should contain everything you need to enjoy Android Q. You don't need to install any Add-ons, simply download the latest ROM and GApps, then follow the flashing instructions and go!
If you want the device to run the ROM "rooted", you can flash a root solution of your choice after the ROM Zipfile.
It is STRONGLY recommended to fully wipe your device before flashing and please avoid restoring system apps and system data with Titanium Backup (or with any backup/restore app) as this can cause stability issues that are very hard to debug, restoring regular apps is fine though.
Click to expand...
Click to collapse
The only system app i restored was the Vanced youtube, but i don't this is the source of my problems.
Thanks in advance!
Guys i think i cleared some things on my mind..
When you install a rom you go encrypted. So you have to FORMAT data RIGHT AFTER installing the rom and then flashing no_verity? Am i right? When you format data do you lose Magisk also?
lazostat said:
I need some explanation to make things clear..
1) First and most important. If you want to make a clean install, what you have to wipe? Should you format data also, and why? Format data affects system? Can you format data and still boot into rom? When you format/wipe all, is there something left in the phone? If no, then why still i can see in mount settings, that the folders still have Mb/Gb inside them? What are they? I guess you can';t delete everything from the phone? For example now i am stuck on custom animation bootloop. So there is still data left.
2) Format data make your encrypted or decrypted? Or just removes all encryption and if a) you install a rom you go automatically encrypted, b) you install a rom and flash no_verity you go decrypted?
3) If i go decrypted, the only way to go encypted is to install stock OS and why?
4) When is necessary to have the stock rom flashed in order to flash custom rom afterwards? If you want to install a different android version from the one that you have? Any other reason? Is it necessary to install the whole stock image, or just enough to install firmware + radio?
5) If you wipe/format all, the phone has some firmware,radio,vendor etc stored inside or it's empty 100%?
6) Is it 100% safe to install a TWRP through TWRP?
And now let's say the problem i had. But i think i know where was the problem.. I had installed android pie + xXx no_limits on my oneplus5 and i was decrypted. Some months later i decided to try something else, so i installed an AOSP android 10 version. I just wipe/format system,data,dalvik,cache then flashed rom, gapps, magisk. But i had some bugs on this version, lags and huge battery drain. Also whenever i was booting into TWRP it moved me on Mount --> Decrypt screen.. And i don't know why?
Now that i try to figure i know that the problem was i install a custom android 10 rom, without first installing the android 10 stock rom? In order to get the proper firmware etc? Or what? The instructions for installing the rom are the following, which i followed them 100% :
The only system app i restored was the Vanced youtube, but i don't this is the source of my problems. Formatting data does not effect system in most cases.
Thanks in advance!
Click to expand...
Click to collapse
1) a clean install involves wiping system, data, cache and dalvik cache. All of these partitions must be wiped in order to remove data things that might conflict with the new software that you intend to flash. Yes, you can wipe data and still boot into your ROM. Yes, there are things still on the phone even after wiping the device, but, the things left behind are in partitions that are separate from what you can actually wipe, these other, separate partitions contain all the other stuff that is essential for your device to be able to function. These parts have nothing to do with the ROM that you are using and have nothing to do with what you have installed in your data partition. TWRP does not wipe /data/media partition(internal storage), /data/media is where your personal user data is stored, such as, photos, videos, downloaded files, data from apps such as games, etc. Basically, /data/media contains things that you have stored that are not apps. Your internal storage will still have all the files and folders that were there before you did the wipe. If you want to wipe internal storage, you have to specifically select your internal storage when you use TWRP to wipe the device, it will not wipe internal storage by default. If you still have a custom animation even after wiping the device, it is probably because the boot animation is in your system partition, that can only be removed by selecting the /system partition when using TWRP to wipe the device.
2) Formatting data "should" remove encryption. No, flashing a new ROM after removing encryption will not encrypt the device again unless you specifically choose to encrypt the device in its settings. Flashing no verity only eliminates issues involved with rooting a device and getting root to actually work without corrupting the device.
3)I'm not sure but I think you can encrypt a device without using stock.
4) It depends on which device you have, what your current firmware version is and what you are trying to flash. Some devices require a certain firmware to be installed before flashing certain custom ROMs but it is a case by case scenario. There is no specific answer to this, there is only the question of whether your specific device requires this or a question of whether the custom ROM that you are trying to flash requires this. This is best answered by reading the thread where the ROM is posted, if your device requires installing a certain stock firmware before flashing the custom ROM, it will tell you that somewhere in the thread for that ROM. Whether you need to install the entire firmware or just parts of the firmware also depends on which device you are using in some cases, you might only need the modem or only the bootloader or maybe both, or maybe none, or maybe the complete firmware.
5) As I stated above, there are partitions on the device that do not get wiped when using TWRP to wipe the device. If it wiped EVERYTHING, the device would no longer function at all, it wouldn't be able to power on, it wouldn't be able to boot into any of its modes and you wouldn't be able to flash anything at all on the device, not even it's original stock firmware. There are software elements that MUST remain on the device in order for it to continue to function.
6) It is perfectly safe to use your existing version of TWRP to flash another TWRP version, assuming the new TWRP is also built for your specific model number.
If you have installed a custom ROM and you are having issues, you need to go to the thread where you got the ROM and post your issues/questions there. The users there will know more about your device and what you actually need to do and the developer may also need to fix things in their ROM to solve the issues that you are experiencing.
Sent from my SM-S767VL using Tapatalk

Categories

Resources