No system & vendor partitions in custom recoveries. - Redmi Note 9S / Note 9 Pro (Indian Model) Question

TWRP, Pitchblack, OrangeFox, whatever recovery I try, I always end up with this Super partition. And I can't see how much size it is. It's just sitting 8192MB by default.
Aren't there any recoveries that show partitions normally like system, vendor separately, with actual sizes filled ?

MPK99 said:
TWRP, Pitchblack, OrangeFox, whatever recovery I try, I always end up with this Super partition. And I can't see how much size it is. It's just sitting 8192MB by default.
Aren't there any recoveries that show partitions normally like system, vendor separately, with actual sizes filled ?
Click to expand...
Click to collapse
That's because there are no dedicated partitions for system, vendor, and product. They are all located inside one partition called "super". Think of it as one big partition that houses other smaller partitions. The size of the individual partitions is variable hence you'll only be able to see the size of the super partition.
The size of the super partition is fixed and cannot be resized after a rom is installed. The super partition was created to eliminate the need for vendors to allocate specific sizes for sub partitions. Before the super partition, each partition had to be allocated a specific size and any free memory left after writing data to it could not be used when other partitions required more space. This free space was therefore wasted.
In the super partition, the sub partitions can be the exact size of the files contained within them. Any free space is left inside the super partition and can therefore be used by other sub partitions if they need it.
Unfortunately, the biggest setback for developers is that they cannot modify the contents of sub partitions once they're made read only (usually on the first boot after installing a new rom). People who try to modify these partitions often get into boot loops forcing them to reinstall the stock rom.

twistyplain said:
That's because there are no dedicated partitions for system, vendor, and product. They are all located inside one partition called "super". Think of it as one big partition that houses other smaller partitions. The size of the individual partitions is variable hence you'll only be able to see the size of the super partition.
The size of the super partition is fixed and cannot be resized after a rom is installed. The super partition was created to eliminate the need for vendors to allocate specific sizes for sub partitions. Before the super partition, each partition had to be allocated a specific size and any free memory left after writing data to it could not be used when other partitions required more space. This free space was therefore wasted.
In the super partition, the sub partitions can be the exact size of the files contained within them. Any free space is left inside the super partition and can therefore be used by other sub partitions if they need it.
Unfortunately, the biggest setback for developers is that they cannot modify the contents of sub partitions once they're made read only (usually on the first boot after installing a new rom). People who try to modify these partitions often get into boot loops forcing them to reinstall the stock rom.
Click to expand...
Click to collapse
Understood. But can we access /system & /vendor folders & modify files in it through root explorer.
So you're saying there's no way to remove system bloatware & unwanted apps ?

twistyplain said:
That's because there are no dedicated partitions for system, vendor, and product. They are all located inside one partition called "super". Think of it as one big partition that houses other smaller partitions. The size of the individual partitions is variable hence you'll only be able to see the size of the super partition.
The size of the super partition is fixed and cannot be resized after a rom is installed. The super partition was created to eliminate the need for vendors to allocate specific sizes for sub partitions. Before the super partition, each partition had to be allocated a specific size and any free memory left after writing data to it could not be used when other partitions required more space. This free space was therefore wasted.
In the super partition, the sub partitions can be the exact size of the files contained within them. Any free space is left inside the super partition and can therefore be used by other sub partitions if they need it.
Unfortunately, the biggest setback for developers is that they cannot modify the contents of sub partitions once they're made read only (usually on the first boot after installing a new rom). People who try to modify these partitions often get into boot loops forcing them to reinstall the stock rom.
Click to expand...
Click to collapse
Thx for explanation bro. Currently I have this issue. Can you take a look into this thread below & answer there ?
Unable to decrypt FBE device
Plz anybody help this out... I unlocked bootloader, then immediately flashed Pitchblack recovery, then booted into recovery. Initially console shows decrypted FBE device with default password. But Encryption status : Encryped So I went into wipe...
forum.xda-developers.com

MPK99 said:
Understood. But can we access /system & /vendor folders & modify files in it through root explorer.
So you're saying there's no way to remove system bloatware & unwanted apps ?
Click to expand...
Click to collapse
In some custom miui roms like miui eu it is possible without causing a bootloop. Sometimes a bootloop will occur because of the root explorer you use. However, of you're still on stock rom you'll very likely end up in a bootloop. AOSP roms don't have this weaknesses but they're not as stable as miui.
I recommend installing a debloated rom like MiuiMix or miui eu. Then get help from the support forums to find out how to get into system without killing the rom.

Everytime I tried to flash a ROM without wiping system (bc I can't) I got error 7. So I had to do a format data and I lost all of my stuff. Is there any way of wiping system so I don't have to do a format data?

Piusak said:
Everytime I tried to flash a ROM without wiping system (bc I can't) I got error 7. So I had to do a format data and I lost all of my stuff. Is there any way of wiping system so I don't have to do a format data?
Click to expand...
Click to collapse
Once after booting up any rom, check whether the device is encrypted or not. (Security > Encryption)
If it is, then offcourse, in recovery you had to wipe everything if you wanna flash a new rom. This device has dynamic partition update, that merges all OS partitions (system, vendor, product) & encrypts data partition if it's decrypted.
Ofcourse you also can't able to modify partitions while encrypted, caz you'll end up into errors.

Related

[Q] Flash Kernel Using CWM

I am posting here as there is not sub-forum for Xperia Pro.
I want to flash kernel using CWM already installed on my phone. Is it possible? If so, how do I go about it?
PS: I found a thread which is for Samsung phones here.
I don't think so
There is no way to flash a Kernel for SE phones faik
Were is our moderator!
Sent from my MT15i using Tapatalk
Can anyone tell me why kernel cannot be flashed via flash_image and the like. Is it because /boot partition is locked in Xperia phones? Or because the there is no proper flash_image made for Xperia phones?
That's something like ; doing a bypass surgery while you're awake
Something like that ^
Qwerty123 \m/ said:
That's something like ; doing a bypass surgery while you're awake
Something like that ^
Click to expand...
Click to collapse
I am not a complete nooby. flash_image can be used on (at least) Samsung phones, to flash kernels.
I have a nokia n900(linux kernel)...and i can flash kernels from the phone itself...dual boot maemo OS and android...restore the whole system image on the phone itself...but on neoV...it is not possible.
dont know about other android phones because neoV is my first android.
On PC you can update BIOS, on some motherboards you can do it from Windows, on others you can use some utility in BIOS setup program, on another motherboards you need true DOS and use BIOS flash program, same is with PC video cards, with PDAs...
ameer1234567890 said:
Can anyone tell me why kernel cannot be flashed via flash_image and the like. Is it because /boot partition is locked in Xperia phones? Or because the there is no proper flash_image made for Xperia phones?
Click to expand...
Click to collapse
Because SE xperia phones DONT HAVE recovery partitsion!
taaviu said:
Because SE xperia phones DONT HAVE recovery partitsion!
Click to expand...
Click to collapse
Exactly what does flashing a kernel with flash_image have to do with recovery partition?
ameer1234567890 said:
Exactly what does flashing a kernel with flash_image have to do with recovery partition?
Click to expand...
Click to collapse
The phone's internal memory (not the SD card) is solid-state (flash) memory, AKA NAND. It can be partitioned much like a normal hard drive can be partitioned. The bootloader exists in its own partition. Recovery is another partition; radio, system, cache, etc are all partitions.
Here are the standard partitions on an Android phone:
/misc - not sure what this is for.
/boot - bootloader, kernel
/recovery - holds the recovery program (either clockworkmod or RA recovery for a rooted Evo)
/system - operating system goes here: Android, Sense, boot animation, Sprint crapware, busybox, etc
/cache - cached data from OS usage
/data - user applications, data, settings, etc.
The below partitions are not android-specific. They are tied to the hardware of the phone, but the kernel may have code allowing Android to interact with said hardware.
/radio - the phone's radio firmware, controls cellular, data, GPS, bluetooth.
/wimax - firmware for Sprint's flavor of 4G, WiMax.
During the rooting process, a critical piece of the process is disabling a security system built into the bootloader that protects these partitions from accidental (or intentional) modification. This is what's referred to as "unlocking NAND." The security system can be set to active or inactive. S-ON means the security is in place (NAND locked). S-OFF means the security is off (NAND unlocked). When S-OFF, you have the ability to modify all partitions. With S-ON, you only have write access to /cache and /data. Everything else is read-only.
When you flash a custom ROM, that ROM typically includes a kernel and an OS. That means the /boot and /system partitions will be modified at a minimum. Some ROMs require a clean install, so a format of the /data and /cache partitions is sometimes built into the .zip that you flash. This is essentially doing a factory reset. See next paragraph.
When you do a factory reset (AKA: wipe, hard reset, factory wipe, etc.), you are erasing the /data and /cache partitions. Note that a factory reset does NOT put your phone back to its factory state from an OS standpoint. If you've upgraded to froyo, you will stay on froyo, because the OS lives in /system, and that is not touched during a factory reset. So "factory data reset," as it says under Settings > SD & phone storage, causes confusion. It's not a factory reset. It's a factory DATA reset. Now you know the distinction.
The SD card can also be partitioned to include a section dedicated to storing user apps. To create the partition, your SD card needs to be formatted. Typically a user will copy all the contents in the SD card to a PC hard drive, wipe the card and partition it, and then copy everything back.
Original http://www.addictivetips.com/mobile...plained-boot-system-recovery-data-cache-misc/
taaviu said:
The phone's internal memory (not the SD card) is solid-state (flash) memory, AKA NAND. It can be partitioned much like a normal hard drive can be partitioned. The bootloader exists in its own partition. Recovery is another partition; radio, system, cache, etc are all partitions.
Here are the standard partitions on an Android phone:
/misc - not sure what this is for.
/boot - bootloader, kernel
/recovery - holds the recovery program (either clockworkmod or RA recovery for a rooted Evo)
/system - operating system goes here: Android, Sense, boot animation, Sprint crapware, busybox, etc
/cache - cached data from OS usage
/data - user applications, data, settings, etc.
The below partitions are not android-specific. They are tied to the hardware of the phone, but the kernel may have code allowing Android to interact with said hardware.
/radio - the phone's radio firmware, controls cellular, data, GPS, bluetooth.
/wimax - firmware for Sprint's flavor of 4G, WiMax.
During the rooting process, a critical piece of the process is disabling a security system built into the bootloader that protects these partitions from accidental (or intentional) modification. This is what's referred to as "unlocking NAND." The security system can be set to active or inactive. S-ON means the security is in place (NAND locked). S-OFF means the security is off (NAND unlocked). When S-OFF, you have the ability to modify all partitions. With S-ON, you only have write access to /cache and /data. Everything else is read-only.
When you flash a custom ROM, that ROM typically includes a kernel and an OS. That means the /boot and /system partitions will be modified at a minimum. Some ROMs require a clean install, so a format of the /data and /cache partitions is sometimes built into the .zip that you flash. This is essentially doing a factory reset. See next paragraph.
When you do a factory reset (AKA: wipe, hard reset, factory wipe, etc.), you are erasing the /data and /cache partitions. Note that a factory reset does NOT put your phone back to its factory state from an OS standpoint. If you've upgraded to froyo, you will stay on froyo, because the OS lives in /system, and that is not touched during a factory reset. So "factory data reset," as it says under Settings > SD & phone storage, causes confusion. It's not a factory reset. It's a factory DATA reset. Now you know the distinction.
The SD card can also be partitioned to include a section dedicated to storing user apps. To create the partition, your SD card needs to be formatted. Typically a user will copy all the contents in the SD card to a PC hard drive, wipe the card and partition it, and then copy everything back.
Original http://www.addictivetips.com/mobile...plained-boot-system-recovery-data-cache-misc/
Click to expand...
Click to collapse
As I had mentioned before, I am not a nooby.
ameer1234567890 said:
As I had mentioned before, I am not a nooby.
Click to expand...
Click to collapse
Then show us HOW to install kernel via recovery?
Dont talk about Samsung and HTC option to install kernel via recovery. I have HTC Desire my second phone and yes i know there is option install kernel via recover(also im tested ALL desire roms and kernel already).
SE xperia have just different partitions layout and we simply cant flash kernel via recovery.....BUT i dont want tell you its IMPOSSIBLE.
Be nice and show us how to do that
PS:im tottaly noob.
Boot holds kernel and initrd not the actual bootloader, that is what should be writable. Provided the actual bootloader is not damaged it should be possible, however because there is no recovery partition it is riskier, but s1tool can restore bootloader......
Hmm
Sent from my MT11i using Tapatalk
I have S2(of course i have and xperia neo) and i dont flash with CWM i flash with odin or heimdall; CWM method is not sure.
In my opinion,and i'm NOT an expert, it easy to flash a kernel for xperia with flashtool or using fastboot from adb.
OK guys, you might have misread it. I am looking for a way to flash kernel not just using CWM (eventhough the title says so), but using any method without having to connect to a PC. One such possible method is to use flash_image in terminal, which does not work in my phone.
PS: The fact that I am not a noob doesn't make me a pro.

[Q] 4EXT partition sizing -- insufficient information

I ran the partition alignment check and 4EXT indicated that my fat32 partition is out of alignment. The phone is working properly, so... I'm not sure if I really need to do this. Anyway, in the option for partitioning, you can either preserve the fat32 or reformat the whole card. I'm guessing that preserving the fat32 will persist the alignment issue, so a complete format is necessary.
OK...
Well, I have a problem with understanding what to do with the partition sizes. In the Info menu, I see system (789Mb), data (1.1Gb) and cache (102Mb). In the Partitioning menu all you're presented with is EXT1, EXT2, and swap. Does system=EXT1, data=EXT2, and cache=swap? Obviously those existing partitions don't fit within the presented size selections, which... brings me to my next problem.
I have a couple of backups, but now I'm wondering if I change the partition sizes, will my backups no longer work? That would be a serious drawback...
And finally... I had read somewhere a suggestion on recommended partition sizes, but I made the mistake of not saving a bookmark to it and searches aren't turning up anything. I'd greatly appreciate it if someone experienced with 4EXT partitioning could chime in here. Thanks!

Solved -- Running safestrap on sdcard -- looking for input

So I got tired of my weird configuration of running the apps in a mounts2sd with a second ext4 partition on my sdcard and technically nothing should prevent us from running safestrap on the sdcard. So I looked around and it took me a while but I found Hashcode's source code and spent some time studying all the voodoo he does, and most of it is fairly straight forward. Small breakdown:
* Extend TWRP with ifdef statement to add new buttons
* sh scripts get called to perform the functionality for those button
* Swap out some links in /dev/block when you switch between slots and stock
* The entire boot partition including scripts, TWRP, etc are stored in boot image
* The boot image is stored in the stock system under /etc/safestrap
Like I said before, most of the functionality is done in borne shell scripts, but there is some hardcoding in TWRP like creating the .img file to /ss. I really don't want to try to recompile TWRP at this time. As such, I want to limit my changes to the borne shell and configuration INI files only. The simplest answer is to remap /ss from internal storage to the sdcard storage. Another option is to have "system" and "cache" in the internal storage and moving "data" to the sdcard. The difficulty here is since TWRP is hardcoded to create the .img file under /ss, I need to move it during the format stage which happens in the script. The danger with the first option I don't know if the phone will boot if the sdcard is removed. safestrap looks for that directory to figure out the mappings in /dev/block. I think if the directory is missing then it will attempt to create it. After that, things might go bad.
Anyway, what are your thoughts?
i wish and hope your still working on this..my phone is so low in internal storage..i cant even use a rom slot other than stock,,ive been useing stock slot ,flashing custom rom in stock slot....anyways hope you continue to figure this out..i know lots of people would appreciate it..thanks
So I've tried multiple ways and have had to step away, think about it some more, and come back to it. Essentially I was not able to get system to boot off of the sdcard. However, the good news is today I was able to have system and cache on internal storage and data on sdcard. So here are the keys to the kingdom that I have found....
The CM11 (and I assume other) ROMs there is a /system/etc/kexec/ramdisk.img file. This file is extracted (gunzip < ramdisk.img | cpio -iu) into the root directory "/" (rootfs). There is a shell script "/sbin/fixboot.sh" that gets executed by /init at the start of the android (on fs). That script essentially mounts /ss to /emstorage and does all the loop storage links to the system.img, cache.img, and data.img files. I was able to mount another /ss2 to my sdcard and point the userdata to /ss2/safestrap/rom-slot?/userdata.img. The limitation is that vfat limits all files to 4 GB max, so the userdata.img cannot be more than 4 GB of storage.
So an option is I can create an updated ramdisk.img file. You would just drop this into your /system/etc/kexec directory on the slot-rom you want to use it. The only file changed in ramdisk.img is /sbin/fixboot.sh. ramdisk.img is part of the CM11 distribution so you would need to replace it each time you perform an update on that rom slot. Other than that, safestrap would by default create userdata.img to be in internal storage.
The next part I'm going to look at is to create a f2fs partition on my sdcard and have my userdata use that f2fs partition. I figure I should good considerable more I/O as f2fs is suppose to be a good amount faster than ext3/4 and we wouldn't be going through a loop device from ext3 to vfat for all I/O. In addition, my data partition would no longer be limited to 4GB due to the file limitation size of vfat.
Thoughts...
So Spyder doesn't have f2fs on it so I've been running ext4. The kernel would need to be setup to be compiled with it. I have a second 6Gb partition formatted with ext 4 with writeback journaling but per my timing tests I don't think it has made a difference. Now I have more than enough space left in both the data and internal partitions. I don't know if it is just a placebo effect but my apps do seem to start slightly faster.
There doesn't seem much interest in this but it was a fun exercise for me. This will be good enough for me as I'll probably upgrade my phone sometime in the future.
Sent from my XT912 using XDA Free mobile app

Delete android recovery system and use the space otherwise?

Hello,
Would it theoretically possible to delete the recovery system of android and use the space for example for data?
I mean, if you have SPflashtool, you would not need the android recovery, becuase you can flash the phone over pc,
if something is broken on the firmware, so why not deleting it, and use the space the recovery takes normally for other purposes?
Is the recovery system only needed for recovery, or has it other functions too (Booting the normal system for example)?
@Rufus0700
Partitions aren't resizeable on Andoid A-only devices, hence by deleting the mentioned /recovery partition one doesn't gain storage space that can get added/merged to another partition, for example /data partition.
jwoegerbauer said:
@Rufus0700
Partitions aren't resizeable on Andoid A-only devices, hence by deleting the mentioned /recovery partition one doesn't gain storage space that can get added/merged to another partition, for example /data partition.
Click to expand...
Click to collapse
But I think it would be possible to edit the partition table BEFORE flashing the ROM on the phone?

How I can restore partition size to original?

When i was uploading new rom, partitions connect to one. Many roms have a problems with this. Second partition has a 0MB size. I try upload stock rom by flashtool and no results. I want to restore original size. How I can do this? My phone is sony xperia lt30p.
What ROM have you flashed? Have you done a clean install, means having wiped existing Android OS before?
What's the name of the mentioned 0MB partition?
BTW:
Android comes with standard partitons as
/boot
/system
/recovery
/data
/cache
/misc
and their sizes basically are hardcoded.
Never have noticed, heard or read that when a ROM gets flashed a partition with size of 0MB will be created.
Name se
jwoegerbauer said:
What ROM have you flashed? Have you done a clean install, means having wiped existing Android OS before?
What's the name of the mentioned 0MB partition?
BTW:
Android comes with standard partitons as
/boot
/system
/recovery
/data
/cache
/misc
and their sizes basically are hardcoded.
Never have noticed, heard or read that when a ROM gets flashed a partition with size of 0MB will be created.
Click to expand...
Click to collapse
The name second partition is ,,sdcard". Tt isn't sdcard it is internal memory for photos and the like things
jareczex said:
Name se
The name second partition is ,,sdcard". Tt isn't sdcard it is internal memory for photos and the like things
Click to expand...
Click to collapse
Don't confuse /sdard and sdcard.
With regards to /sdcard:
This is NOT a partition on the internal storage memory of the device but rather the ( external ) SD card.
With regards to sdcard:
This simply is a symbolic link to device's /data/media partition what is mounted as /storage/emulated/0
And How i Can restore default memory this partition? Partition with external sdcard has other name.
OK it's the partition named /data/media you're referring to.
If a partitition shows 0MB ( can't get mounted ) then this is because it probably is encrypted. Hence decrypt it. The common method is to perform a Factory Reset. If you've TWRP installed / at your fingertips then decrypting also can be done with TWRP.
This phone is other than many phones
For me, everything you post is crazy stuff: I can not understand what the problem really is.
Since Android is on the market, it has more or less the same partition layout as shown above. And I'm pretty sure your phone has this, too.
I mean about problem, when i am installing rom, show me comunicat ,,Error instaling zip file 'external_sd/android9 sony t/open_gapps-arm-9.0-pico-20201114.zip" and i wanna get rid of this problem, across restore this partition. Do you know, what i have a mean?
My last 2 cents here: Open Gapps isn't a ROM. It's merely a suite of re-compiled Google apps.
FYI: I no longer participate this thread. I hope for you others jump in.
ok, thank you for your help. Information for other people: I can't install apps on this roms, so i want to restore this partition

Categories

Resources