Reduced System partition prevent Rollback - Honor 5C Questions & Answers

Hi there, i've done some testing with rom for the board on my NEM-L51C432 and i face a problem.
Userdata partition growth from aprox 8 to 10Gb taken for the system partition by one of the rom i installed on the phone. I tried to get back to EMUI but the system partiton is too small to containt the base system.
i've tried many things to put things back
eRecovery,
eRecovery with DNS Change (huawei Firmware tool),
fdisk from adb (lack the ability to choose the part you want to delete)
debloat huawei system.img (still lack of space)
and now i can only have some really light roms with a few gapps with no safetynet or Magisk as it makes my kernel crash
Do you have any idea about how to change the way storage is splitted?
or simply knowing the name of the largest rom of the board
thank you by advance

Related

android rom upgrading doubt

1. whats rooting ?
2. whats recovery for?
developers please tell me ... i read somany things and i am totally no where... windows was good for this
sathara said:
1. whats rooting ?
2. whats recovery for?
developers please tell me ... i read somany things and i am totally no where... windows was good for this
Click to expand...
Click to collapse
you need root for flashing custom roms that are not HTC/Google branded
you use recovery for backup your old Rom before you flash the new one ( so if brick it you can flash your old backup again )
Thats what i know
1. Rooting means get the root access right, since Linux system has very strict access control, without root access it is not possible to do any system level changes (including flashing the customized rom, change the system settings...)
2. Recovery is a special partition located in the rom, actually a recovery is a pre-built system image (a small fixed Linux system) that can be boot. With booting the recovery you can do a lot of changes to the normal booting system (ie. the /system and change the kernel with located in the boot partition in the rom). And with a lot of person's effort, the recovery image now getting easier by many preconfiged script on the menu, so that can get the system update, backup/restore and other system level changes)
rdcsueq said:
1. Rooting means get the root access right, since Linux system has very strict access control, without root access it is not possible to do any system level changes (including flashing the customized rom, change the system settings...)
2. Recovery is a special partition located in the rom, actually a recovery is a pre-built system image (a small fixed Linux system) that can be boot. With booting the recovery you can do a lot of changes to the normal booting system (ie. the /system and change the kernel with located in the boot partition in the rom). And with a lot of person's effort, the recovery image now getting easier by many preconfiged script on the menu, so that can get the system update, backup/restore and other system level changes)
Click to expand...
Click to collapse
1. That is correct.
2. That is correct.
Well done. You have passed the test. You may collect your cookie and be dismissed.
thanks bro ... i got every thing cleared and i flashed custom rom
This is insane... Creating new thread for the questions that are already answered....

[RECOVERY][TREBLE] TWRP 3.2.3-0L v1.3 Labs Mod for the ZTE Axon 7

- T W R P 3.2.3-0L [Labs Mod] -
The Swiss Army Knife TWRP Mod for the Axon 7​
INTRODUCTION
This was a long term project that I have been using for a long time. I created some scripts to make it easier and faster to flash new roms and quickly restore the daily driver configuration after a testing session. For easier access I modified the TWRP interface to add direct access to the scripts. They had many problems but they were good to me since I created them and I knew how to used them well, but they were not ready for other users.
But the time has come and I have cleaned up most of the annoyances in the tools and in the UI. I have named it "Labs Mod" since it allows me to have my flashing lab on the go, making it extremely easy to switch to different configurations, or recover the daily driver configuration in a few minutes. I believe it is free of major bugs and now I can concentrate on adding new scripts, and more options to the current scripts.
FEATURES
On top of the latest improvements introduced in the official TWRP 3.2.3-0, this mod offers the following added features:
Full vendor partition support (mount, format, wipe, partition image flash, TWRP backup and restore).
Integrated Bootstack backup and restore.
Modem firmware image flash
Reboot to EDL
Button to enable device mapper verity (DM-Verity) enforcing
Button to disable the eMMC write protection (disemmcwp)
Backup/Restore internal storage to the TWRP Backup folder in the external SD. Ensure you have enough free space, free space check is not yet implemented.
EDL backup zip creation. Dual zip use since the resulting zip can be installed using TWRP from the phone or using MiFlash from the computer. It offers the following package creation options:
OS: Operating system (boot, vendor and system).
GPT: Partition table only.
CONFIG: Device config data (IMEI, SN, MAC, etc).
BOOTSTACK: Boot firmware without modem.
MINIMAL: Includes GPT+bootstack+modem+recovery.
EMERGENCY: Minimal + device config.
FULL: Minimal + OS.
FACTORY: Includes Full + config.​
Integrated Treble PARTY tool for creating and removing the vendor partition. Vendor partition is required for Treble ROMs. Removal is required for flashing old non-treble roms.
Lockscreen security removal. Removes password, pattern, fingerprint, etc... (in case you forget your password or the security descriptor gets corrupted).
Google account binding removal (in case you want to wipe from within recovery and test with different google accounts).
Bootloader unlock message removal.
New! Expand OS partitions (Vendor and System) to fit the whole partition. Useful for expanding the GSI filesystem for having space for adding GApps or moving apps to system.
New! Deep Wipe function performs a low level wipe of the partition data, erasing the remaining the portions of the eMMC that stored the partition information.
REQUIREMENTS
You need an unlocked Axon 7
INSTALLATION
WARNING, THIS SOFTWARE COULD WIPE ALL THE DATA IN YOUR DEVICE, INCLUDING THE INTERNAL STORAGE.
IT REQUIRES TWRP CUSTOM RECOVERY IN AN UNLOCKED DEVICE, OTHERWISE YOUR DEVICE COULD BE BRICKED.
!!! Whatever you do, it is at your own risk !!!​
Follow these steps:
1. Download the TWRP Labs Mod image to your External SD card.
2. Boot to TWRP and select the Install option in the main manu.
3. Tap on the install image button and select your external SD. select the image file you downloaded, select the recovery partition and confirm.
4. Reboot to recovery again to ensure the changes are applied properly.
DOWNLOAD
TWRP_3.2.3-0L_v1.3-Axon7-Labs_Mod.img Flavor of the mod using the official TWRP 3.2.3-0 Kernel binary (Quick boot even when using F2FS, full ADB support, NO B12 Oreo encryption). Use this if you do not plan on using device encryption. Please note that you won't be able to use any tool of this version if your device is encrypted.
TWRP_3.2.3-0L_v1.3.B12-Axon7-Labs_Mod.img Device encryption enabled flavor of the Labs mod. It use the 3.2.1-8 TWRP Kernel binary (Long boot when using F2FS, NO ADB support, B12 Oreo encryption). Use this one if you use device encryption. Please note that this flavor doesn't support adb interface.
NOTES
1. I do not have the time and expertise to dig into kernel hack so this is why I do not provide a unified kernel with fast F2FS boot, ADB and B12 encryption. Probably people developing kernels could help on this issue. It would be nice having a kernel with proper F2FS boot support, B12 encryption and ADB interface. Until then, there is no other way than having 2 flavors depending on the features we require.
SOURCES
C'mon, all of them are scripts!!! the sources are at glance. Use them in your projects but don't forget to give credit to the source !!!
CREDITS
@NFound for the recovery kernel binary supporting Oreo B12 encryption.
@someone755 for the keycheck binary I use in my scripts.
@Chainfire for the TWRP install script hacks.
I hope you enjoy it as much as I did creating and learning throughout the enlightenment journey.
Nice.
Any info on the scripts that are included?
voetbalremco said:
Nice.
Any info on the scripts that are included?
Click to expand...
Click to collapse
Well, all of them are Bourne shell scripts. Some of them are stupidly simple such as those in the Reboot menu, and others in the Advanced > Oki Labs menu are very elaborated, specially:
- PARTY tool: for creating and removing the vendor partition. I released it a few days ago as a separated tool that could well work in other devices.
- EDL backup: for creating EDL flashable backups of a configuration. This tool will probably require a full thread due to the concepts involved. The big feature is that the generated zip can be also flashed using any TWRP.
- Internal Storage Backup/Restore: TWRP doesn't offer a straightforward solution for backing up the internal storage, since it is excluded from the data backup, now it is possible to create a backup and restore the contents of the internal SD in case you want to mess up with the userdata partition. Now this script creates a set of files under the TWRP/backup folder. I am planning to add the possibility of having different backup folders, the same way the GUI treats the data partition.
That is looking very sweet!!!
I'm excited, nice work man!
This is just fantastic!
Well, the non b12 version can't decrypt my device, running los 15.1
also, the lab options did nothing, and when I pressed on PARTY the recovery froze on me.
Hmm.
nfsmw_gr said:
Well, the non b12 version can't decrypt my device, running los 15.1
also, the lab options did nothing, and when I pressed on PARTY the recovery froze on me.
Hmm.
Click to expand...
Click to collapse
Well, that's why in the OP I provide 2 flavors of the mod. If you require decrypt then you have to use the B12. PARTY will not work either if your device is encrypted and you are using the 3.2.3-0L. In your case, using device encryption, you have to use the 3.2.3-0L(B12). You will have all the functions except for ADB. PARTY will work fine too.
Oki said:
Well, that's why in the OP I provide 2 flavors of the mod. If you require decrypt then you have to use the B12. PARTY will not work either if your device is encrypted and you are using the 3.2.3-0L. In your case, using device encryption, you have to use the 3.2.3-0L(B12). You will have all the functions except for ADB. PARTY will work fine too.
Click to expand...
Click to collapse
Got it.
I thought the B12 version was for stock-based ROMs.
Okay I'll flash the other one once I get home, thanks.
nfsmw_gr said:
Got it.
I thought the B12 version was for stock-based ROMs.
Okay I'll flash the other one once I get home, thanks.
Click to expand...
Click to collapse
I'll clarify it a bit more to avoid any misunderstanding. Sorry about that.
Oki said:
I'll clarify it a bit more to avoid any misunderstanding. Sorry about that.
Click to expand...
Click to collapse
Thnx for this tool ! I'll test that this weekend.
It would be great if you'd make a small guide on this with a couple of situations / a possible indepth review with screens / what's possible and what's definitely not possible with this twrp tool.
Anyway seems very promising :good:
Sheesh...i have no external sd card
I have garde flashed your TWRP_3.2.3-0L (B12) -Axon7-Labs_Mod.img but this version says when starting in twrp that my password is wrong. the version 3.2.1.8 of nfound unlocks my password quite normal
Excellent Job! I can't wait to get back my Axon 7 from RMA Services. I'm just going to need sometime to get this running coming from stock MIflavor.
Found bug. Installed the ADB version (thanks Cthulu!), wanted to check the functionality.
Went into the Storage Backup and my phone froze. Rebooting from ADB worked.
EDIT: tried to reproduce the issue - same thing happened 2nd time.
EDIT2: It freezes at any option in Oki Labs
docentore said:
Found bug. Installed the ADB version (thanks Cthulu!), wanted to check the functionality.
Went into the Storage Backup and my phone froze. Rebooting from ADB worked.
EDIT: tried to reproduce the issue - same thing happened 2nd time.
EDIT2: It freezes at any option in Oki Labs
Click to expand...
Click to collapse
I can't duplicate the issue. Are you sure you downloaded it properly? Do you have an SD card? The backup requires an SD card with enough space. Checking for free space is in the todo list for this weekend.
raystef66 said:
Thnx for this tool ! I'll test that this weekend.
Anyway seems very promising :good:
Click to expand...
Click to collapse
Not good enough!
It is downloaded properly. SD card has more than 100gb free space.
As mentioned in edit it is any option that I used in Oki Labs menu that froze my phone
docentore said:
It is downloaded properly. SD card has more than 100gb free space.
As mentioned in edit it is any option that I used in Oki Labs menu that froze my phone
Click to expand...
Click to collapse
What option are you testing? the Storage Backup? What format are you using in your SDCard? Does it happen at the beginning or after a while? Is there any file under TWRP/BACKUPS/STORAGE in your Micro SD after the failure?
@Oki this is amazing. Thank you.
Is it possible to use the recently released kernel sources from los15 to solve the issue of needing two revisions?

TWRP FOR P9 EMUI8 Supports Encryption and Decryption

Is there any TWRP for P9 EMUI8 which supports Encryption and Decryption ?
md sabuj said:
Is there any TWRP for P9 EMUI8 which supports Encryption and Decryption ?
Click to expand...
Click to collapse
There is no TWRP properly supporting Chinese Oreo encryption on P9 in a way that:
- you don't need to format Data and make changes to Vendor partition
- you just need to enter your Android unlock pin/pass whenever you boot to TWRP
- with that that TWRP can properly read/write to Data and Internal memory
However, there is a Chinese TWRP (language can be switched to English) that you can for one time remove encryption from Data (it is not enough to format Data but it must be also edited an fstab file on Vendor partition)
After that encryption is removed and you can fully use TWRP for e.g. Nandroid backups, installations from Internal memory, installations to Data partition, editing on Data partition (in case of e.g. bootloops with Magic modules), etc.
Also, once encryption was removed you can switch back to your preferred TWRP from that Chinese TWRP (that TWRP has some other issues)
It was long ago couple of us experimented with, you can start from the following post and follow the links (but always compare the dates, newer posts from the same pearson mean they were written with more experience and understanding of the matter):
https://forum.xda-developers.com/showpost.php?p=80029346&postcount=1843
Good thing is that (once you don't want it anymore), stock Oreo can be fully reinstalled and encryption reinstated. E.g., eventually I did it on two my P9s (almost a year ago), but I was no more updating the posts about
Of course, once Data is decrypted, it can be also used for TWRP when working with GSI/AOSP ROMs (not only with stock Oreo)

Question Regarding twrp

Can anybody explain why isn't there a wipe system option in the twrp in advanced wipe section...
In earlier devices that I've used ,the wipe system option has always been there.
Or is this happening only in the nebrassy recovery for sweet?
just a query!
Same question.. Can an expert answer this? Thanks
In my opinion normally it's not needed and for newbie it's dangerous
- I'm no expert at all, but missing option for wipe /system is not there for a reason (on my previous surya device (when it was launched) the first builds of recoveries had option to wipe /system, but people find out very quickly that wipe /system on super partition is not a good idea, very few ended with bricked devices, after that wipe /system was removed from recoveries)
- on A9 /system had its own partition and very simply put - it was easy to manipulate, situation changed with A10 (A11), when /system become like virtual partition (along with /vendor, /product and whatever manufacturer of the phone decided to put there) or directory if you like in super partition and its RO by default (unless flashing to it, you can't manipulate it directly on file system level - every wipe option in recovery means you simple delete some files here and there and you can't delete files on Read Only virtual partition)
- problem is much more complicated and I'm explaining it as I understand it - I can be wrong on detail, but this is roughly the situation
- if you're active tester and/or flashaholic who likes to test ROMs as they are released it is a good idea to flash (before you flash new custom ROM) either recovery version of latest MIUI available for your device (or maybe Xiomi.eu ROM based on that) - inclueded installation scripts will clean your super partition to the certain level - so you can for example flash stubborn ROM, that refused boot so far, etc. - its not wipe and I agree - clean slate is always better, than breadcrumbs of the previous flashes left here and there, but here we are...
- sure - direct control over /system part of super partition would be nice - and I hope that one day TWRP or OFOX devs will tame that "super" beast and return wipe /system when it will be safe for us to use it as before...

ROG 2 phone soft bricked

Hello,
today I did have a strange experience with my ROG 2 and my best guess is that there is some UFS problem, but a second opinion or ideas are welcome.
During a bike ride when I was wifi scanning (apps: "Tower collector", "Radio Beacon"), navigating and listening to an audio book, the phone just went dark. I thought from previous experience on a Note 3 that it might have overheated. Pretty much stress proofed from the previous phone.
Yes - it was warm in its bike pocket but really not overly hot.
The phone is an ebay buy 2 months old and has been ever since with omnirom, stable so far. I only noticed that the RGB LED here has no blue light, but I plainly did not care.
I tried to boot it after some 10 minutes again and the phone would not go past its omnirom boot screen until it reboots after some time, boot loops.
30 Minutes later at home I wondered then what is going on, and I copied off the TWRP backup from the phone I took two days ago, just in case.
I then tried to restore the same backup, but the phone switched off during restore after ~30%. This was reproducible, so I thought this may be something with the backup, maybe I cannot restore a partition. When I restore I had all partitions marked and I tested them one by one. The restore of single partitions worked, one by one, except vendor as it was marked read only and data as it failed unpacking (my recent backup then is dead?).
I then tried formatting the partitions, so "data", originally f2fs. I lack experience with journal recovery on f2fs so went to ext4. System was ext4 and was just wiped. I lost of course other data on the internal storage so tried to restore again with my copied backup. It restores, but it cannot boot and just bootloops. I now formatted all partitions, including vendor.
Finally, I tried downloading omnirom again and installed it. It won't boot, it doesn't even get to the boot animation, but just boot loops.
I reformatted data back to f2fs. But no change here.
Trying more: lineageos won't flash for unknown reasons, it immediately dies as "Error installing zip file". Checksum of the downloaded zip is correct.
I downloaded a stock rom and installed it. This is now the best result so far - It does want to boot.
Here I get a boot animation and this incredibly lame "tching" sound (it is a phone, not a sword...). But it also stops there and never continues. Yes, first boot takes longer, but not 10 minutes.
Any ideas what else to try with this phone?
So far, I can boot twrp via sideload and interact with it fine. But that will be it; ran out of ideas.
Happy for suggestions.
Gaya
Use raw firmware to restore everything.
Install latest firmware zip on both slots.
After installing custom roms go to wipe -> format data by typing yes. Otherwise rom wont boot
thanks for getting back, If by raw firmware you meant the ASUS stock, I did. Not sure why data wipe after installation or double install to a/b partition would make a difference, but in the end I am new to this a/b concept, looks though like standard dual boot to me. Tried it, but no difference.
- installed asus firmware to inactive B
- switched to B partition
- installed asus firmware to inactive A
- wiped data
- started, so far same behaviour after 15 minutes of waiting (boot animation with sound, then it repeats boot animation until ...).
There are Two kind of rom raw firmware (used to restore bricked device) and recovery rom (zip file we use for update)
Raw firmware will flash ROM to both the slots, while recovery rom only flash to one slot. So you need to Only select reboot to recovery after flashing ROM to switch to the updated slot.
No, stock rom is not exactly raw firmware. RAW firmware uses EDL mode (in bootloader) to flash the stock rom. Download A10 raw from here version .90.
when extracting it you will see some files.
Steps To flash Raw:
* enable usb debugging in phone.
*connect the phone via side port to pc
open command prompt and run this command
adb devices
adb reboot bootloader
Now go to the folder where you extracted the raw firmware & run "flashall_AFT.cmd" as admin
wait [there will be no output]. After 15 -20 mins your device should boot. If you have any old version stock rom data the phone will carry the data to new version. If you have any custom rom/ updated version of stock rom data, it will ask to factory reset, so do that.
wiping is not exactly formatting so do it the right way
Why format: the one where you format by typing "yes" .If you switch between Roms ( stock to custom or vice versa) and go back to older versions (v .100 to .60) the old/previous rom data cant be used with new one so you must format data.
when formatting is not necessary : If you want to upgrade both stock images (version .90 to .100) & custom rom (v 1 to 1.2) i.e., flashing stock rom and then custom rom over it, you dont need to format data because you can reuse the data from custom rom to updated custom rom.
A/B device use two partition instead of one. so the upgrade can happen in the background. On restart you will switched to updated slot. So room for error is less.
The wiping here should be the same as formatting, as it is running the mke2fs (as per TWRP settings). But raw rom I do not have (I believe).
The link you have there seems broken, could you repost it again?
I did download the stock ROM earlier from ASUS directly, to not violate policies, HTTP links etc, here is only the path on asus . com
pub/ASUS/ZenFone/ZS660KL/UL-ASUS_I001_1-ASUS-17.0240.2103.75-1.1.229-user.zip
That is the one I installed via recovery. Am not sure what is in your mentioned flashall_AFT.cmd though, but suspect some adb sideload at least.
I eventually succeeded, but of course would liek to know
1) why
2) what happened?
I did follow a video about flashing the stock rom, basically as you explained (factory reset and data wipe), twice to a and b partition. That made the device bootable. Why is this needed?
I tested wiping system again (I am used to doing clean flashes) and installed omnirom again, and it failed booting.
I installed again the a/b with stocks, factory reset and data wipe and installed omnirom as dirty flash. All is well.
Now I was able to restore my backup finally without the device switching off and it did not complain about the data backup. So finally I am with my phone again rom and copy data to my fresh partition.
as to 1) why?
I understand a/b partition as sort of windows/linux dual boot with a more separate bootloader maybe. So I do not see the point in flashing the stock rom twice or in rendering the device unbootable when wiping system.
and as 2) what happened.
I may only guess: I did an omnirom upgrade 2 days earlier that worked fine and was the reason for my nandroid.
During my ride, the phone had some whateverissue and rebooted. I am unsure whether i tested booting but assume that after the upgrade it flashed to the other partition and it was not bootable. It does not make sense as this would make a/B partitions rather hard for custom rom makers, e.g. people complaining all the time.
Other guess: there was a file system issue with f2fs. Problem with data partition seems to cause bigger issues.
When I flash to ext4 after testing the bootable rom with a wiped data, it would not boot anymore. After factory reset again, it mke2fs the data partition again, back to f2fs and the device booted again happily.
Thanks for the help. Happy to know/learn more about this issue, as I would love to prevent or handle them quicker with more of I know what I'm doing.
Android Dual Partition (A/B) is made for seamless updates i.e, Dual system/vendor partition but uses same data partition. Lets say you are currently in slot A when you apply system update the slot B gets updated. As always rebooting the device switches to the B partition after update. & further update flashes the system to the A partition.
Basically there is no need to flash stock rom twice, unless you are coming from stock [one partition might be in higher firmware version than other] or there is new stock version with some minor/major upgrades to firmware files.
Our custom ROMs are not stand alone, Mostly it only replaces the system files and keep the vendor same as stock. (also this keeps the ROM update file size to be minimum)
you might even have different version of Android in A/B partition.
Here is a scenario on How A/B works:
Say you are currently using your device in B-slot and A9 so partition on slot-A will be A9 partition slot-B be A9. After that you are doing system update to A10 from System update (not via TWRP)
now you will have A10 on slot-A and A9 on slot-B.
then you want to go to custom rom, so you flashed say omni on A-slot and rebooted & it will surely work.
After that you are using inbuild system update from custom rom any applied it. now the system update will overwrite the A9's system files but (the device specifically needs A10s vendor to work properly). Now comes the fun part i.e., soft brick, boot looping, and corrupt images
That's why you have to flash latest stock to both A and B slots, and overwrite them all with system files from custom rom (also should be flashed once in slots A and B) to get neat experience from custom ROMs.
If you understand what was written above, then you will know the reason behind soft brick.
stock rom flashed only once (firmware image variation may affect stability)
custom rom only flashed in one slot (switching slot will boot loop device)
Not using Reboot to recovery to flash (you will be flashing to the same slot over and over & thus rebooting will boot loop)
Not formatting data ( Just Maybe, your custom ROM and stock uses different file system for data partition)
For Raw files search "ASUS rog 2 RAW firmware images" those files will be around 3 GB in size.

Categories

Resources