[How-To] Upgrade/Downgrade any MATCHING ROMS without losing /Data - Nook Color General

Hello
My name is Alvin and I really want to help the people who are new to Android hacking/rooting/flashing/roming<made that up . This post may not be interesting or super helpful, but I want to help people with a question that's not usually mentioned.
Upgrading/Downgrading, that's the Technology world right now. It's important people know how to keep up by upgrading without having to lose all their data.
Upgrading/Downgrading Difficulty Level: 2
(Scale of 1, being Beginners, to 10, being a developer)
To upgrade a ROM without losing data, you must me under these certain circumstances,
The ROMS match. THAT'S IT. Well what do I mean by "Rom Matches"???
The /data has to be compatible with the newer ROM.
The ROMs that are not compatible with the same data.
NC Stock to any other ROMS
THE DATA MUST BE WIPED BOTH GOING FROM STOCK AND GOING BACK TO STOCK. THE DATA IS NOT COMPATIBLE.
The ROMs that ARE Compatible:
CM7<>CM7
CM7<>CM9
CM7<>CM10
Custom ROMs<> Any CM ROM.
Note: Downgrading the Android OS and keeping Data is fine, but some items may be broken or incompatible after being modified in a newer Android Version.
NOW you read all the circumstances and determined that your Nook Color is OK to upgrade+keeping /data partition, here are instructions if you don't already know them.
Open any type of Recovery. CWM or TWRP. SD or Emmc.
Go to Mounts and Storage at the bottom
Carefully select Format /system
Next, select format /cache
Now, we are leaving the /data alone.
Click Back or use the power button to do so.
Click Install Zip from SDCARD.
Find your .zip file that you want to flash to upgrade/downgrade your Nook.
When finished, you may apply GApps which is optional. GApps was formatted with /system. If you need to find gapps, go to: goo.im
Reboot and the New ROM should look like it was used before by you.
Note: The location of these instructions are based on C.W.M. All instructions are same on other recoveries.
If this post helped you, I would appreciate a thanks because it would make my day.
If this post provides any false information, typos or errors, please tell me so because this is a great learning experience for me.
If there are any questions, I will answer them withing 48 hours. Valid till 11/4/12. After that I'll check periodically.
P.S I love smiley faces.
Sources: Picture from neown.com

Hey -- I'm just about to try these steps. It seems really self-explanatory to me, I'm more than a beginner but not quite at developer. I'd say I'm like a 6 or 7 in your list.
However, the one thing I haven't tried yet is upgrading to a newer ROM. I flashed Nameless v2.0.2 for the HTC Desire C and now they're at version 5. I just did a FULL backup using CWM Touch for the Desire, and I'm about to do what you suggest. I have a custom lockring, battery icon and boot animation, I guess I'll just have to push those three things back on afterward? I think everything will go smoothly, I even have a separate SD card to flash from ^^
Anyway, I guess that's not really a question... I just want to make sure these steps apply to any ROM... but logically it seems like it would.
-AC

Hey, if i downgrade my rom (Android N) with only remove the system, and install the lower rom (Android M) is it will delete the installed application and the data too?

Related

[Roms]DualRom-The dual booting solution for Incredible. Use any Rom!!(Update)4-26-11

The below info will remain for historical informations but this system has been replaced by a better system found at http://forum.xda-developers.com/showthread.php?t=1100777
DualRom ***Dual boot 2 roms on your Droid Incredible***
Team ADX presents your dual booting solution for the Droid Incredible. Please Read entire post before using any of the zips given. Undo zip in second post to put your phone back to the state it was in before flashing these zips.
I have added some empty shells to allow people to use any rom. See bottom of first posts.
DualRom comes in DualRomSenseFroyo and DualRomCM7. We wanted to give you the option to basically use the opposite of what you would use as your normal rom. CM7 is CM7. It was compiled from CM7 source and only made changes needed for it to boot off interanl storage. SenseFroyo is stock rom with Ziggy's kernel to allow overclocking. I did not remove any bloat since you will have over 5GB's free so there is plenty of room. I don't use sense roms so I'm not familiar with what sense tweaks are out there but I may research and make changes to the sense rom in future updates. I chose these roms because I wanted roms that would be very stable right out of the box. This is a new method for dual booting and there hasn't been any wide testing yet so you should still consider this Beta till there is more feedback. Everything has been stable in the limited testing. All feedback encouraged and appreciated.
DualRom Terminology for this post
PhoneRom - refers to the rom that is installed normally on your phone
InternalRom - refers to the DualRom version that you install
{
"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"
}
* Who is Team ADX?
For those that don't know us Team ADX was formed by a few Dev's from the HTC Droid Eris. We collaborate on projects together even though we've all branched to different phones. Team ADX is Conap, Workshed, and Gnarlyc. Conap has the Droid Incredible and will handle most of the support in this thread. The Team ADX account is usually only used for the op and all follow posts will be done with our personall accounts.
* Why would you want 2 roms on your phone?
Sometimes you can't decide between Sense and CM/Aosp roms. Both have thier benifits and both have thier downfalls. Why not have both on your phone. For app developers this is a great solution so that you can easily test your apps on Sense and Aosp roms. Also it's just another cool reason to root right?
* Any downside to this?
The only downside for this is that it uses the entire 6.5Gb of internal storage that the incredible has. The reason it does is because the emmc which includes the 6.5GB of internal storage also includes the 750mb's for the data partition and the 200mb's for the cache partition of the phone. For this reason HTC has locked this from being repartitioned. I did not find a way to unlock it although there probably is. I personally don't use the internal storage on my phone at all since most apps defaut to sdcard. If you don't use or need to use your internal storage this is a great alternative to what you can use it for. I tested many methods which included putting the rom on SD card or rearanging the partitions where the normal rom is stored and I found this method to be most stable and the least intrusive to your normal rom.
* How does it work?
With this DualRom setup you will be able to keep your current rom and even change your current rom on your phone in the normal fashion you are used too. There is a zip file to flash before flashing your DualRom that will set up your current rom to work with DualRom. It only makes minor changes to your current rom and I will explain that during install instructions. The DualRom will then get installed to the internal storage of the phone. An app called DR Reboot written by Conap specifically for this setup will be installed in both roms that will let you boot back and forth between the 2 roms. There will also be zips automatically added to your sd card that will allow you to choose which rom you want to boot to from recovery.
* Is this risky?
With any phone modification done with root there is always risk involved. From my testing I determined the phone would not let me repartition the internal storage therefore not letting me screw up the phone. As long as you use the zips we provide there should be no issues. As always though flash at your own risk!!!!
* Is this compatible with my rom?
DualRom should work with any rom you use. For the DR Reboot app to work you will need a rom with busybox installed but that is pretty standard. If DR Reboot does not work for you you can use recovery to boot back and forth. The zip you flash in recovery only takes a few seconds so this is still a much faster option then doing nandroid/restore's.
* How do I install this? What do the zips do?
The zip files are named with a number to start. Flash in the order of the numbers. All my testing was done with CWM v2.5.1.2.
1DRPrep-setupEMMCforRomFlash.zip We flash this zip first. All it does is change the filesystem of the internal storage partition(6.5gb) from fat32 to ext3. THIS WILL ERASE ALL FILES FROM YOUR INTERNAL STORAGE. Please backup any files you want to keep. This zip can also be used to reformat if you decide you want to switch from one version of DualRom to another(i.e. Sense to CM7). This zip will take a few minutes to flash so be patient.(I know my progress bars don't move right in recovery but it is working).
2SetupPhoneRomForDualBoot.zip We flash this second. This zip will do a couple of things. It installs the app into your current rom that will allow you to boot back and forth. It also backups the boot.img from your current rom to your sdcard so that it can use it when you want to boot back to the Phone Rom. It add's another zip to sdcard that allows you to boot back to Phone Rom from recovery. It also adds an edited vold.fstab to your current rom so that your phone will not complain that it can no longer fine the interal storage since your using it for something else. If you have dualrom already installed and decide to flash another normal rom to your phone you can just re-run this zip after flashing the normal rom.
3DualRomSenseFroyo.zip or 3DualRomCM7.zip These are the actuall roms. They will install the rom to the internal partition and also put a zip on your sdcard that allows you to boot the internal storage rom from recovery if you need too. Please flash only one of these.
* I've installed it now what?
Once you have flashed the first 3 zips your phone is ready to reboot. Reboot the phone and it will boot to the internalrom. This is a first boot so it will take a few minutes but not really longer then the first boot on a normal rom. Once it boots go through the normal setup of the rom. Then you can look in the app drawer and you well see DR Reboot app. I would reccomend placing a shortcut to this on a home screen somewhere for ease of access. Open DR reboot and from there you can reboot to the phone rom, internal rom, or recovery.(See Photo at top of post) You can still use the normal reboot options of the rom if you want to boot back into the same rom you are in. Alternativley you can boot to recovery and flash the bootphonerom.zip or the boot-internal.zip's to boot to either rom. These are a backup mainly in case the DR Reboot app malfunctions (occasionally it fails to flash the boot.img)and you need to get back into one rom or the other. I would not delete them from the sdcard. That's it....use the roms as normal and boot back and forth as you wish.
* My phone won't reboot to the phonerom even after flashing the phonerom.zip in recovery?
This is why we do a nandroid backup. Restore it now and then reflash the 2SetupPhoneRomForDualBoot.zip.
* What about tweaks/zips/themes?
If the phone is booted into either rom then anything you apply will get applied to the rom you are booted in...(i.e. metamorph). Keep in mind I have not tested much as of yet with the internal rom but in theory it will work fine. The phone rom will continue to work as normal. Any flashable tweaks/themes will only affect the phone rom. The install scripts would need to be modified to apply them to the internal rom. It shouldn't be too hard to modify them and I will try to post some instructions on that later.
* What about ADB?
ADB will acess what ever rom you have booted at the time.
* Will this allow us to boot other operating systems(i.e. WM, IOS)?
No they are not bootable on android devices and don't know if they ever will be. This will allow us to boot larger Rom Ports as some of the Rom's are getting larger then our internal storage.
** KEY POINTS TO REMEMBER
1. Everytime you flash a normal rom please flash 2SetupPhoneRomForDualBoot.zip after to update your stored boot.img.
2. Try to stick with more stable tweaks on the internalrom untill we can work out a easy way to wipe data/cache or a way to make a reliable nand.
3. Nandroid is your friend. Don't forget to do your normal Nandroid's in recovery for the phonerom before flashing any zips.
4. Zips are numbered in order so you can flash them in order.
5. Enjoy your 2 roms!!!
** TODO List
1. Make data/cache wipes available
2. Watch to see if the roms sharing the .android_secure folder on sd is going to be a big problem. So far in my testing is has not been an issue.
3. Make some type of Nandroid available...We have a something but it's not very reliable so working on a more stable method.
*Thanks to:
Cyanogenmod for thier great work http://www.cyanogenmod.com/
Htc I guess for sense and for making quality phones.
Ziggy471 for his kernel http://www.ziggy471.com/
TeamADX members for all they do!!!
XDA member unCoRrUpTeD for getting me interested in Dual Booting
Everyone and anyone who contributes to open source projects
Downloads
FLASH AT YOUR OWN RISK
1DRPrep-setupEMMCforRomFlash.zip - THIS ZIP WILL ERASE EVERYTHING ON YOUR INTERNAL STORAGE WHEN FLASHED. YOU HAVE BEEN WARNED MD5-ea34104a4b8ee11ee3d6442c13c0f93c
2SetupPhoneRomForDualBootV2.zip MD5-f2a55ed14f720332cfe9f88d32918a9f
V2 fixes flash_image binary not having execute permissions causing phone to not boot from phone rom to internal rom. Make sure you are on phonerom and reboot to recovery and just flash this zip if you've already installed DualRom.
3DualRomSenseFroyoV2.zip
V2 includes update boot.img that i added in the test zip i posted. That's the only change.
DRSenseUpdatetoV2.zip
If you flashed v1 of sensefroyo you can just flash this to update so you don't need to wipe.
3DualRomCM7v3.zip
v3
Updated to CM7.02 Stable
v2
Adds new boot.img that automatically fixes the filesystem on reboot.
DRCM7v2Update.zip
Updates DRCM7 to v2 with no wipe if you already have DualRomCM7 installed.
How can I use other roms with this?
I made some rom "shells". You can open the zip of the rom you want to use and drag the system and data folders and drop them in the "shell" zip. There is a shell for miui 2.3, cm/aosp 2.3, and Sense 2.2. This way you all have the option to use any rom without me releasing other peoples work.
MIUI-GB-shell.zip
Sense-2.2-shell.zip
CM-AOSP-GB-shell.zip
* What if I want my phone back to normal?
This Zip will completely undo the changes to your phone rom and will reformat your internal storage back to fat32 so it can be used for storage again.
UndoDualRom.Zip
* Nandroid Backup and Restore
DualRomNandroid.zip Boot to your internal rom and then boot to recovery. Then flash this zip in recovery and it will create a folder called DR on your sdcard in /DualRom/backups/. If you want to make multiple backups then you can rename the DR folder to whatever you want. If you want to restore the backup just rename the folder back to DR. If your only making one backup you can leave it named DR. If you make another backup without renaming the folder then it will overwrite the old backup.
DualRomNandroidRestore.zip Guess what this does ...flash this to restore the backup you made with the DualRomNandroid.zip. This script will restore from the DualRom/backups/DR/ folder on your sdcard. Rename whichever backup you want to restore back to DR.
All zips are provide as is. Use at your own risk.
If you have suggestions/ideas/improvements feel free to let us know. I will note here that I have looked at symlinking the database's for mms and phone logs so they would show on both roms but it seems to cause issues. I beleive the issues have something to do with CM7/2.3 databases is not the same as Sense/2.2 database. I know people have had problems when trying to restore that type of data when switching roms so it's probably the same case here. If anyone has idea's or knowledge more in depth on that issue feel free to share!!!!
So how does this work with SMS/phone logs? If I get a text while on one ROM, and switch to the other, will it still be read with the other? Same thing for phone calls.
This looks like a groundbreaking project, and I look forward to trying this out
TheWhiteBandito said:
So how does this work with SMS/phone logs? If I get a text while on one ROM, and switch to the other, will it still be read with the other? Same thing for phone calls.
This looks like a groundbreaking project, and I look forward to trying this out
Click to expand...
Click to collapse
Currently they act independently of each other so you will only see it on the rom booted up. At some point I will attempt to merge them as much as possilbe. I will need to test what backups and databases are compatible between CM and Sense.
Team ADX said:
* Will this allow us to boot other operating systems(i.e. WM, IOS)?
No they are not bootable on android devices and don't know if they ever will be. This will allow us to boot larger Rom Ports as some of the Rom's are getting larger then our internal storage.
Click to expand...
Click to collapse
This sounds sick, especially having the space to port large roms like Sense 3.0! Looking forward to whatever comes out of this.
Wow this is great ill try it out once there's some way to nandroid.
Wow good job guys. Just wanted to give you some props and say ill definitely be watching this thread for updates and sometime soon I will definitely try it out. Keep up the great work, and thanks.
Sent from my ADR6300 using XDA Premium App
kschwarz88 said:
This sounds sick, especially having the space to port large roms like Sense 3.0! Looking forward to whatever comes out of this.
Click to expand...
Click to collapse
Oh yes *licks lips* Sense 3.0, here we come!
r3nz024 said:
Wow this is great ill try it out once there's some way to nandroid.
Click to expand...
Click to collapse
You can nandroid your current rom in recovery as normal and flashing this won't have much affect on your current rom other then adding the app that lets you boot into the other. The only thing you can't back up is the rom on the internal storage. But even if the internal rom goes all crazy on you it won't affect your current rom.
Is there a way to restore the EMMC partition to FAT32 if I decide not to keep the dual ROM functionality? aka: what's a command I could stick inside of a CWM zip to format back to FAT32?
Is this working with the most recent recovery? I know the OP says it was tested with the older 2.X version
jonesh said:
Is there a way to restore the EMMC partition to FAT32 if I decide not to keep the dual ROM functionality? aka: what's a command I could stick inside of a CWM zip to format back to FAT32?
Click to expand...
Click to collapse
I added a zip to return the phone to normal if you wanted to go back. The zip does this for you but if you wanted to change the filesystem back to fat32 manually you would go into recovery and do:
adb shell
parted dev/block/mmcblk0
mkfs
it will prompt you that it will erase all data and type yes and hit enter
then you choose partition number 3 hit enter then type fat32 hit enter and it will reformat to fat32. The zip does this as well as removing the app from the phonerom and the other files that were installed.
chris61292 said:
Is this working with the most recent recovery? I know the OP says it was tested with the older 2.X version
Click to expand...
Click to collapse
I'm use to working with amon's and not CWM so I'm not sure what the changes were. I know they changed the way you mount the partitions so i'm not sure if i did it the old way or knew way. I will check into it and fix it if it needs to be. Are the newer recovery zip's still compatible with the older recoveries I assume?
Wow! Conap is here! All over the dl...... ty u shed, conap, and company
I saw this and got excited for a WP7 dual boot solution :< we can dream can't we?
very cool. OMFGB and OMGB at the same time xD
Team ADX said:
I'm use to working with amon's and not CWM so I'm not sure what the changes were. I know they changed the way you mount the partitions so i'm not sure if i did it the old way or knew way. I will check into it and fix it if it needs to be. Are the newer recovery zip's still compatible with the older recoveries I assume?
Click to expand...
Click to collapse
as long as the old recoveries support edify, there shouldnt be an issue
r2DoesInc said:
as long as the old recoveries support edify, there shouldnt be an issue
Click to expand...
Click to collapse
Thankyou...
So, sacrificing our emmc for a larger partition would also open up options for larger android roms like a full Sense 2.0/3.0 Rom wouldn't it?
phoenixs4r said:
So, sacrificing our emmc for a larger partition would also open up options for larger android roms like a full Sense 2.0/3.0 Rom wouldn't it?
Click to expand...
Click to collapse
Yes room is not an option here. That doesn't mean it is easier to port but room is definitely not an issue. As soon as i can find the links to some of these larger roms i'll look at them although I'm more accustomed to building from source then I am to porting.

[HOWTO] Changing Filesystem to F2FS on the Sprint S4

This guide is for the Sprint Galaxy S4 only and as of now it is only compatible with two kernels: KToonsez S4 Kernel 4.4 AOSP (4/17 or later) and PoKernel 1.7 F2FS ONLY Build. This guide CANNOT be used on Touchwiz or Android 4.3 yet. I will update it when and if that becomes possible
*Disclaimer: You are doing this to your phone under your own consent. This is an experimental procedure and may not work on some hardware revisions or on devices where certain conditions are not met. You assume all the risk by flashing any of the software below or changing your filesystems. I am not responsible if your phone does not work based on the method I am describing below. Modify at your own risk.
This guide had to be updated in order to correct misinformation. The guide will follow KT's instructions explicitly until it gets to the formatting of the system partition
***If you want to format your /system partition to F2FS please read that section first as it requires steps to be taken from your currently working AOSP rom!***
First, go this link download the file:TWRP-KT.ALL-IN-1.zip
http://goo.gl/HLz4al
Formatting Data and Cache to F2FS
NOTE: Follow these steps EXACTLY, do NOT add or remove any steps, period!!!!
1. Backup everything from your internal SD to your PC or external SD, since the entire internal SD is going to get wiped out with format!!!!!!!!!!
2. Download the files from the folder that you got these instructions from (Ignore the OLD WAY folder) and SAVE TO THE EXTERNAL SD!!!
3. ONLY DO THIS STEP IF YOU ARE ON AN OLD VERSION OF MY TWRP. Flash TWRP-KT.ALL-IN-1.zip (this is what gives us the ability to format using F2FS)
4. Reboot recovery
5. Go to "Settings" and check the box to force F2FS for data and cache (you can also check the box to include /system partition if you want to convert your ROM's zip to use that too)
6. Go to "Wipe->Advanced" option and wipe the "Cache" partiton
7. Go to "Wipe->Format Data" option (THIS WIPES YOUR ENTIRE INTERNAL SD CARD, all files and folders, all gone so make a backup to your external SD or PC!!!!!!!!!!!!!)
8. This step you have 2 choices:
A. Flash your ROM/gapps to start completely fresh
B. Go to restore option and ONLY restore your "Data" (you can also restore /system if you are doing the f2fs conversion on /system partition too)
9. ONLY DO THIS STEP IF YOU INSTALLED A NEW ROM. Flash my newest kernel (needs to be a kernel dated 05.05.2014 or newer)
10. DONE!!!!!!!!!!!!!
11. KTweaker has a new option under "Tools" screen to "Get Partition info" to double check your work.
Formatting System Partition with F2FS (Required: KT SGS4 Kernel 4/28 or later!)
Steps:
1.) Before doing any F2FS conversion with the above instructions, use your currently working AOSP ROM to grab the AOSP 4.4 Kernel from HERE (4/28 or later only!) and save it to your external memory card
2.) Once it is saved reboot to recovery and install it (Flashing a kernel in TWRP is Install -> Folder where kernel is -> Click KT 4/28 kernel -> Swipe to install -> Clear cache/dalvik -> Main menu -> click advanced -> Fix Permissions -> Reboot to system)
3.) After you are back in your working AOSP ROM with KT 4/28 kernel installed, download the AOSP rom you want to use and save it to your external sd card (You can leave the filename as it is, the program will rename it for you)
4.) Open KTweaker and click "Tools" and at the very bottom choose "F2FS: Convert ROM ZIP"
5.) It will ask you to locate the file, ask if you're sure, and then it will do the conversion; upon completion the zip file that was created will have "-F2FS.zip" at the end of it
6.) Now you can follow the steps above, but when you get to step 9A you will use the "-F2FS.zip" file instead of the standard ROM file
This procedure is necessary because KTweaker changes your favorite ROM to pass the command mkfs.f2fs so that your system partition is formatted to F2FS before the files are installed. I did this myself to verify and it works a treat. One crucial step to remember though is that after you install your F2FS converted ROM you absolutely must install KT's kernel so your phone will boot.
Returning to EXT4
NOTE: Follow these steps EXACTLY, do NOT add or remove any steps, period!!!!
1. Backup everything from your internal SD to your PC or external SD, since the entire internal SD is going to get wiped out with format!!!!!!!!!!
2. Download the files from the folder that you got these instructions from (Ignore the OLD WAY folder) and SAVE TO THE EXTERNAL SD!!!
3. ONLY DO THIS STEP IF YOU ARE ON AN OLD VERSION OF MY TWRP. Flash TWRP-KT.ALL-IN-1.zip (this is what gives us the ability to format using F2FS)
4. Reboot recovery
5. Go to "Settings" and uncheck the box to force F2FS for data and cache (If you checked the box to include /system partition uncheck it first)
6. Go to "Wipe->Advanced" option and wipe the "Cache" partiton
7. Go to "Wipe->Format Data" option (THIS WIPES YOUR ENTIRE INTERNAL SD CARD, all files and folders, all gone so make a backup to your external SD or PC!!!!!!!!!!!!!)
8. This step you have 2 choices:
A. Flash your ROM/gapps to start completely fresh
B. Go to restore option and ONLY restore your "Data" (you can also restore /system if you are doing the f2fs conversion on /system partition too)
9. ONLY DO THIS STEP IF YOU INSTALLED A NEW ROM. Flash my newest kernel (needs to be a kernel dated 05.05.2014 or newer)
10. DONE!!!!!!!!!!!!!
11. KTweaker has a new option under "Tools" screen to "Get Partition info" to double check your work.
FAQ
Q: Why can't I use this on Touchwiz?
A: It has been developed for the most recent Linux kernel 3.8 and has been implemented in kernels built for 4.4.x OSP builds. This isn't to say it cannot be used on Touchwiz, it is a filesystem and as long as there is a kernel that offers support for reading it installed on your device it should theoretically work on your hardware. However, this can be proven/disproven by the devs here and I will update this answer if it cannot be implemented in a backwards fashion.
Q: Are there advantages to using F2FS?
A: It is built and intended for use on flash filesystems which our devices run exclusively. So since it was developed for flash memory there will be a benefit to using it as it matures. However, this does not imply that benchmarks will increase or your whole phone will become more responsive, its intent is to have files be accessed and written more efficiently. It is supposedly also built for the long-term user who does not constantly reformat their devices because it is supposed to handle large amounts of old files and cleaning more effectively that EXT4. Source: https://www.kernel.org/doc/Documentation/filesystems/f2fs.txt
Q: Will this trip Knox?
A: No more than installing a custom recovery would. So if you already had a custom recovery (Read: TWRP, PhilZ, CWM) in place you are safe following this guide. For now of course; I do not know if there will be another iteration of Samsung software that locks down the device futher.
Q: Can I clear Cache and Dalvik to troubleshoot after changing my filesystem?
A: I tried this myself and the answer is yes. As long as you are using the F2FS custom recovery made by KToonsez you can wipe Cache and Dalvik from recovery and it will rebuild your system. Something I did notice is that first boot will stay on the splash screen longer with F2FS than with EXT4. I saw it hang on the splash screen of my Liquid rom for an extra minute before actually booting and showing cache rebuild. **Your Mileage May Vary**
Q: Why isn't the System Partition formatted into F2FS?
A: This can be done now with KTweaker. See section above.
Q: What ROMs can I use with this filesystem?
A: Any 4.4.x rom (most are 4.4.2 now) that is compatible with either KToonsez S4 AOSP kernel or Pokernel 1.7 F2FS Only.
Q: In Advanced Wipe, Preload has been added to the options of things to wipe. Should I?
A: Ktoonsez answer found HERE was that he has never wiped preload. So I suggest against it unless you know what you are doing.
Thanks
Linux, Google, and Samsung (all this neat stuff comes from those communities)
TWRP Team for their custom recovery and its updates
Ktoonsez for his awesome kernel and the modified recoveries
CPA Poke for his awesome kernel that has F2FS support baked in
LuigiBull23 for edits and reminding me to add content
XDA for giving us a place to host experimental phone procedures
The XDA Devs for all the work they do for us with their time
The XDA community for providing feedback and making this a great place to hang out
If I forgot anyone specifically please let me know and I will update this section or any section
Enjoy and let us know how it works on your device!
Great guide my friend!
delete
Thanx great guide
Sent from my SPH-L720 using XDA Premium 4 mobile app
Great guide OP! Always nice to have a thread to link to.
I'm sure it's been talked about but your posts doesn't mention the ramdisk files. They're listed but not talked about. Now I'm somewhat limited myself in understanding everything there is to know about these things but are those files to do with eventually formatting the system partition to f2fs?
May be worth putting a little note in there regarding those files... You know how some folks go flash crazy once in recovery lol
Sent from my SCH-I545 using Tapatalk
Mistertac said:
Great guide OP! Always nice to have a thread to link to.
I'm sure it's been talked about but your posts doesn't mention the ramdisk files. They're listed but not talked about. Now I'm somewhat limited myself in understanding everything there is to know about these things but are those files to do with eventually formatting the system partition to f2fs?
May be worth putting a little note in there regarding those files... You know how some folks go flash crazy once in recovery lol
Sent from my SCH-I545 using Tapatalk
Click to expand...
Click to collapse
Hello again.. Lol
The ramdisk mod is now obsolete as it's already included in the kernel zip, which will automatically determine whether you're still on EXT4 or F2FS and make the required changes to the ramdisk accordingly. So no need to flash anything but the kernel as usual after following the steps.
OK yea I figured it was either to do with what I said or to do with the kernel obviously. Just figured I'd ask anyways
Sent from my SCH-I545 using Tapatalk
I'll be the first to admit that I wasn't entirely sure what the ramdisk files were for. I knew they might have been for advanced users considering they were offered, but not listed in the instructions. I didn't know for sure and I didn't want to use the word "obsolete" because, well, I was so wrong before
I am glad LuigiBull23 jumped in and answered that for us. I'll get it added into the the guide so future users know what they are or are not used for. Keep the questions coming, I love learning about this stuff!
I'll be the first to admit that I wasn't entirely sure what the ramdisk files were for. I knew they might have been for advanced users considering they were offered, but not listed in the instructions. I didn't know for sure and I didn't want to use the word "obsolete" because, well, I was so wrong before
I am glad LuigiBull23 jumped in and answered that for us. I'll get it added into the the guide so future users know what they are or are not used for. Keep the questions coming, I love learning about this stuff!
Click to expand...
Click to collapse
I understand. A lot of people were and still are confused about these files..
In short, during the testing phases of F2FS, KT compiled a separate zip for changes to the ramdisk that in turn would reflect the EXT4/F2FS mount points as a means to avoid possible bootloops and such. It was indeed a success and as a result was included in his kernel.
Now, upon flashing the kernel it is able to determine which partitions are formatted as EXT4 or F2FS and mod the ramdisk accordingly. He only left the files on his server in case he ever needed them again. So they are most definitely OBSOLETE. You certainly wouldn't have gone wrong using the term in this case.
Updated the guide for KT's new all-in-one TWRP recovery that will allow you to switch back and forth between F2FS and EXT4. I used his exact instructions from his guide in all areas except for the system formatting section which I wrote. If you are using his custom TWRP recovery go ahead and grab the new one so you can use it in the future!
F2FS with CM11 Nightly
When I used KTweaker to convert my latest CM 11 nightly, it came back and said that it was done but could not find all the lines to modify. Is this ok?
mwilder817 said:
When I used KTweaker to convert my latest CM 11 nightly, it came back and said that it was done but could not find all the lines to modify. Is this ok?
Click to expand...
Click to collapse
I know it has been forever since you posted this and I apologize for the late answer, but I imagine that if you received that error you got a bad download of CM11. I've personally converted the snapshot and several nightlies of CM11 and they all passed nicely.
So for anyone getting this, if you get a similar error message: Re-download the ROM you are converting
to bad its still not possible with touchwiz, love to use f2fs on a stock rom for my sgs4-lte.
is it possible in the near future that we can use f2fs on those devices with a Samsung stock rom, using another kernel is no problem.
or is this hard to tell ?
Hello, I've been trying to use this to change my filesystem because I'm coming from CM12 and I'm trying to flash a GPE rom on my S4. But after flashing I am rebooting straight to recovery. Also I'm using the latest TWRP.
RealMikeyTaylor said:
Hello, I've been trying to use this to change my filesystem because I'm coming from CM12 and I'm trying to flash a GPE rom on my S4. But after flashing I am rebooting straight to recovery. Also I'm using the latest TWRP.
Click to expand...
Click to collapse
Make sure you are using a version of TWRP that support F2FS. I don't think the standard issue TWRP does. @AntaresOne has one that does support F2FS and is based on the latest version (2.8.3.0). That's the one I use. Of course, I'm hooked on his CM12 ROM as well. He does really good work!!
mwilder817 said:
Make sure you are using a version of TWRP that support F2FS. I don't think the standard issue TWRP does. @AntaresOne has one that does support F2FS and is based on the latest version (2.8.3.0). That's the one I use. Of course, I'm hooked on his CM12 ROM as well. He does really good work!!
Click to expand...
Click to collapse
But doesn't it have to be in EXT4 for it to work for a GPE ROM?
RealMikeyTaylor said:
But doesn't it have to be in EXT4 for it to work for a GPE ROM?
Click to expand...
Click to collapse
You are probably right. I haven't tried the GPE ROM yet.
Sent from my SPH-L720 using XDA Free mobile app
RealMikeyTaylor said:
But doesn't it have to be in EXT4 for it to work for a GPE ROM?
Click to expand...
Click to collapse
Yup gpe uses ext4 on all partitions because it uses tw framework

[Q] Move from CM-11 to CM-13

I have CM-11 (2016-08-15 nightly) installed on my HD+, along with CWM recovery "6046", and am happy with it. However, my other Android devices have Android 6.0, so I thought I'd consider CM-13. Questions:
Is moving to TWRP a requirement? I see statements that CWM recovery is no longer in active development. So what? Are changes being made (see next item) just for the sake of change (a popular activity in software development), or are there real advances that TWRP enables?
In preparation, I downloaded the cm_ovation-ota-MOB31K.161125.zip and open_gapps-arm-6.0-nano-20170117.zip files. I was astounded by the sixe of the latter. What is with the "Open Gapps" files??? I note that the pico one for v4.4 is 2.5 times the size of the one I have been using ( pa_gapps-modular-pico-4.4.4-20141110-signed.zip ). I thought these were supposed to be basic, minimal files.
I'm looking for an install procedure from CM-11. I assume that just means upgrade to TRWP if necessary, and then just use that to install the above zip. I see no discussions of this in this subforum; is it all over in the "Development" forum?
What is the performance of CM-13 like, and is it now stable enough for daily use? I see a long thread peppered with "thank you"s that started two years ago, and I'm wondering if there's anything more succinct.
DeanGibson said:
I have CM-11 (2016-08-15 nightly) installed on my HD+, along with CWM recovery "6046", and am happy with it. However, my other Android devices have Android 6.0, so I thought I'd consider CM-13.
Click to expand...
Click to collapse
FWIW -- I had enjoyed good performance CM11 until about mid last year when many commonly used apps started to become unresponsive and oftentime crashed (force-closed). So over the holidays break I took the plunge and upgraded to Amaces' LN14.1 experimental build lnos_ovation-ota-NMF26Q.170104, so far the performance is as good as it used to be with CM11.
Questions:
Is moving to TWRP a requirement? I see statements that CWM recovery is no longer in active development. So what? Are changes being made (see next item) just for the sake of change (a popular activity in software development), or are there real advances that TWRP enables?
Click to expand...
Click to collapse
Every major release of CM, starting from CM7 -> CM9 -> CM10 to CM11, has required a new and non-backward compatible version of CWM.
I don't believe that CWM 6.0.4.6 can flash CM12 and CM13, and you can find pointers on what recovery versions are needed and are available at https://forum.xda-developers.com/nook-hd/development/boot-sd-external-recoveries-twrp-2-8-3-t3314870.
In preparation, I downloaded the cm_ovation-ota-MOB31K.161125.zip and open_gapps-arm-6.0-nano-20170117.zip files. I was astounded by the sixe of the latter. What is with the "Open Gapps" files??? I note that the pico one for v4.4 is 2.5 times the size of the one I have been using ( pa_gapps-modular-pico-4.4.4-20141110-signed.zip ). I thought these were supposed to be basic, minimal files.
Click to expand...
Click to collapse
I used the minimalist pico package, and then added afterward a couple of missing essential apps like Google Maps.
I'm looking for an install procedure from CM-11. I assume that just means upgrade to TRWP if necessary, and then just use that to install the above zip. I see no discussions of this in this subforum; is it all over in the "Development" forum?
Click to expand...
Click to collapse
The most straightforward route which I found and used is to create a SD-based recovery using the pre-packaged SD image available at https://notredame.app.box.com/s/26a4bygh9vbaw7jjq08xr5evomvaw5ww/1/3332706778, just unzip and burn the image to SD then add to the card the ROM, GApps, and (EMMC) TWRP zip files you wish to flash. Then boot up the SD card into TWRP, (optionally backup your CM11 ROM system & data), do "wipe /data & factory reset", and flash the 3 zip files and you are set to go.
Alternatively you can try to use a similar approach as outlined at https://forum.xda-developers.com/nook-hd/general/how-to-updating-hd-hd-internal-emmc-to-t2863171 -- i.e., use CWM 6.0.4.6 to flash new TWRP then boot into the new TWRP to wipe and flash new ROM and GApps. This was the route I took when I upgraded to CM12.1 to try it out.
digixmax said:
... Alternatively you can try to use a similar approach as outlined at https://forum.xda-developers.com/nook-hd/general/how-to-updating-hd-hd-internal-emmc-to-t2863171 -- i.e., use CWM 6.0.4.6 to flash new TWRP then boot into the new TWRP to wipe and flash new ROM and GApps. This was the route I took when I upgraded to CM12.1 to try it out.
Click to expand...
Click to collapse
Thanks very much for the info! That's what I did, and it was simple and (reasonably) quick. I note that CM wants to go ahead and install the CWM recovery. I assume I should not let it do so.
Now, to get Titanium Backup to think it's got root. This appears to be a bit of silliness. I tried several "superuser" apps (including the "phh" one), to no avail so far ...
Edit: OK, here it is ...
belfastraven said:
There is still a "bug" I believe, in that when the cm/ln rom is first installed on a device with a clean data partition (after a wipe or factory reset), even though developer options will say you have root, you actually don't. Changing the root selection to something else and then changing it back causes the necessary system file to be created. As long as you don't wipe data, you will not have to do this again on dirty flashes. What is new in the last few months is that, accessible through developer options, there is a rudimentary root manager available in the rom, where you can determine how root requests from various applications should be handled and see which apps have requested root access.
Click to expand...
Click to collapse

What is 12gb of "other" storage data that I can not seem to find [OP3T, 128GB]

What is 12gb of "other" storage data that I can not seem to find [OP3T, 128GB]
Hello,
I just reflashed OxygenOS from Paranoid android after a clean wipe of data, system, cache etc. After set up, I realised there is 12gb of data being occupied under the "other" storage. I proceeded to factory wipe as well and I still have this 12gb of data.
I can not seem to figure out what this 12gb of data is. It is not the oem_logs. I do not have nandroid back ups. I do have around 4gb of titanium backup that I can account for. That means there is still 7gb of data that I can not seem to find.
Any help with figuring this out?
The only thing I could think of now was to wipe internal memory and flash the rom all over. Is that possible? I heard that wiping internal memory is a no no.
I have included some screenshots. If anyone needs more information, please ask.
(The massive app data is because this morning I finally gave in and redownloaded my spotify playlists. Spent 2 days trying to figure out this damn 12gb other data...)
Edit: Forgot to mention, I am on the latest OxygenOS stable. Rooted with latest Magisk and using TWRP 3.1.1-2
An update
An update.
I deleted the titanium back up. Other storage now shows 7gb.
I used DiskUsage to further pinpoint my data use. 10gb in System and 8ishGB in app data.
I checked System folder, it is 2.8 GB.
10gb minus 2.8gb means around 7gb of data that I do not know what is.
Try look into /storage/emulated directory. I had same problem and in this folder I found missing GB's of storage.
Any apk files you've downloaded, logs you've recorded all in that category. Even large flashable zip files and other firmware files are also under that category.
EatDahPewPew said:
An update.
I deleted the titanium back up. Other storage now shows 7gb.
I used DiskUsage to further pinpoint my data use. 10gb in System and 8ishGB in app data.
I checked System folder, it is 2.8 GB.
10gb minus 2.8gb means around 7gb of data that I do not know what is.
Click to expand...
Click to collapse
Twrp backups
If this happens even after clean flashing a new rom/any rom then its something wrong with the partition.
I was facing a similar issue where my internal storage was being dislpayed as 24.6GB (Instead of 54GB) total capacity.
Can be easily fixed by using twrp, Firstly create a backup of the entire Internal Storage (Media)
Step 1. Go to Wipe>Advanced wipe>(Select all partitions)>Wipe.
Step 2. Go to Wipe>Format Data>(Type YES)>Done!
Step 3. Repeat Step 1.
Flash your rom and it would be fixed.
Mr.RooT said:
Try look into /storage/emulated directory. I had same problem and in this folder I found missing GB's of storage.
Click to expand...
Click to collapse
Hey, Do you know what exactly I am looking for in there?
vighneshpillai90 said:
If this happens even after clean flashing a new rom/any rom then its something wrong with the partition.
I was facing a similar issue where my internal storage was being dislpayed as 24.6GB (Instead of 54GB) total capacity.
Can be easily fixed by using twrp, Firstly create a backup of the entire Internal Storage (Media)
Step 1. Go to Wipe>Advanced wipe>(Select all partitions)>Wipe.
Step 2. Go to Wipe>Format Data>(Type YES)>Done!
Step 3. Repeat Step 1.
Flash your rom and it would be fixed.
Click to expand...
Click to collapse
I think you maybe right. I have flashed a few roms around and noticed it after flashing OOS. I do not know if it was also there before.
I do not care so much about my internal storage (media), I can afford to loose and restart all over.
Will wiping the internal storage be fine? I heard on forums that it messes things up.
Ill probably use OTG USB to flash the rom again. That should be good right?
EatDahPewPew said:
I think you maybe right. I have flashed a few roms around and noticed it after flashing OOS. I do not know if it was also there before.
I do not care so much about my internal storage (media), I can afford to loose and restart all over.
Will wiping the internal storage be fine? I heard on forums that it messes things up.
Ill probably use OTG USB to flash the rom again. That should be good right?
Click to expand...
Click to collapse
I have done all sorts of things with my phone, i have even deleted the root folder using TWRP file manager and managed to bring my device back to life.
So I guess i can assure you that it wont do a thing to your phone if u wipe internal storage
Provided make sure you are using BLU-Spark TWRP.
(BLU-Spark-TWRP v45 for Nougat based roms &
BLU-Spark-TWRP V52 for Oreo based roms).
Do not use the official TWRP as it hasn't been updated since its 3.1.1.2 release.
vighneshpillai90 said:
I have done all sorts of things with my phone, i have even deleted the root folder using TWRP file manager and managed to bring my device back to life.
So I guess i can assure you that it wont do a thing to your phone if u wipe internal storage
Provided make sure you are using BLU-Spark TWRP.
(BLU-Spark-TWRP v45 for Nougat based roms &
BLU-Spark-TWRP V52 for Oreo based roms).
Do not use the official TWRP as it hasn't been updated since its 3.1.1.2 release.
Click to expand...
Click to collapse
I ended up doing the steps but I have TWRP 3.1.1.2. I am a bit out of loop, why is BluSpark better for nougat? I just knew that we needed a specific one for Oreo since TWRP had not been updated
For other people who may come here. I did follow the steps. From 5gb other data, I am now down to 0.8gb. I do not know what that 0.8gb is but ill take it for now.
Steps were
Step 1. Go to Wipe>Advanced wipe>(Select all partitions)>Wipe.
Step 2. Go to Wipe>Format Data>(Type YES)>Done!
Step 3. Repeat Step 1.
Step 4. Flash rom, gapps, etc etc
I DID RUN into a problem at step 2. I got an error and then when wiping or flashing rom, my /data would not mount. I googled and found that if you change the data to different format, ext4 and then abck to f2fs, the /data should mount and you can do whatever.
Maybe it is because of the TWRP version, I was on the latest 3.1.1.2.
EatDahPewPew said:
Hey, Do you know what exactly I am looking for in there?
Click to expand...
Click to collapse
Every folder except emulated directory. Firstly I thought that these other folders are links to their original location, but when I deleted that folders, original folders weren't affected. But delete it at your own risk! It could be coincidence, that these folders weren't linked to original ones.
EatDahPewPew said:
I ended up doing the steps but I have TWRP 3.1.1.2. I am a bit out of loop, why is BluSpark better for nougat? I just knew that we needed a specific one for Oreo since TWRP had not been updated
For other people who may come here. I did follow the steps. From 5gb other data, I am now down to 0.8gb. I do not know what that 0.8gb is but ill take it for now.
Steps were
Step 1. Go to Wipe>Advanced wipe>(Select all partitions)>Wipe.
Step 2. Go to Wipe>Format Data>(Type YES)>Done!
Step 3. Repeat Step 1.
Step 4. Flash rom, gapps, etc etc
I DID RUN into a problem at step 2. I got an error and then when wiping or flashing rom, my /data would not mount. I googled and found that if you change the data to different format, ext4 and then abck to f2fs, the /data should mount and you can do whatever.
Maybe it is because of the TWRP version, I was on the latest 3.1.1.2.
Click to expand...
Click to collapse
With every new update of Oneplus (wether it be Beta or Stable) the bootloader & firmware might (or might not) get updated and hence if u use the old TWRP there are chances of being incompatible with the new builds/roms. If u notice BLU-Sparks TWRP releases, they follow a trend i.e. he releases a TWRP after every major update of Oneplus Roms which is basically to make sure that the recovery is compatible with the newer builds.
So i would suggest you to use the BLU-Spark TWRP to be on the safer side.
Hope i have cleared the doubt. Cheers. Good day. :good:
vighneshpillai90 said:
With every new update of Oneplus (wether it be Beta or Stable) the bootloader & firmware might (or might not) get updated and hence if u use the old TWRP there are chances of being incompatible with the new builds/roms. If u notice BLU-Sparks TWRP releases, they follow a trend i.e. he releases a TWRP after every major update of Oneplus Roms which is basically to make sure that the recovery is compatible with the newer builds.
So i would suggest you to use the BLU-Spark TWRP to be on the safer side.
Hope i have cleared the doubt. Cheers. Good day. :good:
Click to expand...
Click to collapse
Yes! That helps. I guess I should flash the blu spark twrp soon. Or atleast when I am switching roms. Am on the last paranoid android for nougat. Will wait it out until Oreo is out on either oos or some major role.
Do you know where I can find blu spark twrp? I found blu spark kernel but could not find the twrp.
other than media files and unrecognized file extension
like .zip .apk .flac and etc
EatDahPewPew said:
Yes! That helps. I guess I should flash the blu spark twrp soon. Or atleast when I am switching roms. Am on the last paranoid android for nougat. Will wait it out until Oreo is out on either oos or some major role.
Do you know where I can find blu spark twrp? I found blu spark kernel but could not find the twrp.
Click to expand...
Click to collapse
Open the Blu-Spark thread, go to downloads, keep scrolling and you find the twrp among the kernels listed there (Latest is v8.52).

Question Backup partitions from different GSI ROMs

Would it be possible to backup different images from different GSI ROMs to be able to test and restore each one without losing all the apps, configuration, etc. in the process.
For example:
1. Install "GSI name1" configure it, install apps, my Google account, etc.
2. Somehow, make a backup of the required partitions "backup name1" (At the computer?)
3. Install "GSI name2" configure it, install apps, my Google account, etc. (Not necessarily the same apps than before).
4. Somehow make a backup of the required partitions "backup name2".
5. Continue testing other GSI or restoring one of the previous ones from the backups and be able to use the phone as it was before, including apps, configuration, etc.
I can imagine two ways to face this task:
A. Using a custom recovery to backup partitions to SD card.
B. Using fastboot or mtk_client to backup partitions to the PC.
Would be easy? Possible? Not recommendable for some reason?
I am new on this flashing-bricking-sweating-unbricking thing, so I would appreciate feedback.
Thank you!
Hi
If your goal is to test the GSIs, it's easier to use the DSU-sideloader instead of the backup.
This app enables you to dual boot.
You will be able to move back and forth between images. Even if you get into a boot loop, you can return to the original image just by rebooting. 
If you have root, this app will be easier because there will be less operations.
https://github.com/VegaBobo/DSU-Sideloader
I have been taking a look to the DSU concept. It is interesting, but not what I want. Also, it requires the main ROM to be stock ROM (maybe in future is fine to use with custom ROMs).
DSU would be perfect if you want to keep romA and romB working in parallel in your daily life (for example, one for work and business and the other one for gaming and social apps).
What I want to do is to test romA for a while, move to romB for a while, if I prefer romA, reinstall it and forget about romB (literally, delete it). Maybe in few months, backup romA again and check romC for a while...
As I do not want to be swapping from one to another in daily life, it does not make sense to reserve space for having both simultaneously ready to work on the phone.
By now I have been learning about adb and recovery backup options. I need to check more during the next days, but I noticed that from Recovery, I can also use adb (it says not authorized device, but that is for not being rooted yet, I suppose). If it is possible to use adb from recovery after rooting, it would be easy to have a PC software for backing up ROMs easily (system, data and userdata partitions?).
I will keep researching about it...
The DSU does not have to be a stock rom.
It's just desirable.
Currently I have crdroid GSI as the first OS and the second OS is trying several OSs.
If you try it, you'll notice how easy it is.
Currently, TWRP does not support backup or encryption on Android 12. It is the same even if it is the official latest of other models.
I have a 128GB model, so it took too long to back up using mtkclient and I quit halfway through.
The problem is time and encryption, keep them in mind.
Currently, TWRP does not support backup or encryption on Android 12. It is the same even if it is the official latest of other models
Click to expand...
Click to collapse
Well, definitely untrue now as most devices have got it sorted out with decryption, Android 12 being a pain some devices got 13 done before 12, but as of the time you wrote this post my device Motorola stylus 22 5g Qualcomm, we hadn't figured out the decryption yet but you could definitely just patch your fstab in vendor either by hand or with DFE neo, to disable the encryption and TWRP would run fine. You would just have to make that first format reboot back to recovery immediately and while it still stays the data from a fresh format flash the other handy RO2RW re zip and DFE neo. Honestly the boot times are so much better without decryption I don't think I would go back as long as I've got a password on orange fox or whatever.

Categories

Resources