does honor 7x has treble partition /vendor? - Honor 7X Questions & Answers

As title

Honor 7x has Vendor Partition

letschky said:
Honor 7x has Vendor Partition
Click to expand...
Click to collapse
Hi letschky, just a quick question please, when you say it has 'Vendor Partition', is that actually a partition? Or is it simply a different directory?
I ask because if it is a totally separate partition, then an update to treble is almost a given. If it's just a separate directory (a symlink), then an update to treble enabled would still be kind of 'up in the air' (but it sill seems very likely, which is good!)
Thanks, will have my 7x in a few weeks

sorry but i sell my 7x and go to the Honor View 10.
Extract Update.app with Huawei extractor and you see Vendor Partition
vendor -> /dev/block/mmcblk0p47
or here
https://forum.xda-developers.com/honor-7x/development/mount-partition-layout-profile-xml-t3727990

optionalmgrr.la said:
As title
Click to expand...
Click to collapse
I think all recent huawei/honor phones have the vendor partition?
According to this article https://android.gadgethacks.com/how-to/check-if-your-android-phone-supports-project-treble-0181781/ the difference between a vendor folder in a non-treble device is that it is under system, and in a phone with treble support and vendor partition it is under root.
I ordered a 7x hoping for treble support, it should arrive early next week. I'll be sure to check if it has its vendor folder under root.

renatofontes said:
I think all recent huawei/honor phones have the vendor partition?
According to this article https://android.gadgethacks.com/how-to/check-if-your-android-phone-supports-project-treble-0181781/ the difference between a vendor folder in a non-treble device is that it is under system, and in a phone with treble support and vendor partition it is under root.
I ordered a 7x hoping for treble support, it should arrive early next week. I'll be sure to check if it has its vendor folder under root.
Click to expand...
Click to collapse
It might be a good idea to clarify this, to avoid unnecessary confusion...
"root" in this context isn't 'root access', it's the 'root' of the drive. But, because a drive can be 'partitioned' (think Windows C: drive or maybe and additional Windows D: drive - if partitioned), when that comes to linux, the partitions will look like: (as noted in letschky's post) will be like /dev/sda with an additional partition being like /dev/sdb.
So... the point is this; you CAN have a vendor directory at the root of a drive, but it will be (if it's not trebelized) a symlink, and it will point to (/dev/sda)/system/vendor. So just seeing 'vendor' at root doesn't mean it is treble enabled.
It's like with Windows, if you had 2 partitions; if you were at C:\ you would be at the root of the C drive. If you typed in D: and hit enter, you would go to the D partition of the drive and be at D:\. You would now also be at 'root', but they are not the same.
There has to be another partition, not just a 'vendor' directory under root.

AsItLies said:
It might be a good idea to clarify this, to avoid unnecessary confusion...
"root" in this context isn't 'root access', it's the 'root' of the drive. But, because a drive can be 'partitioned' (think Windows C: drive or maybe and additional Windows D: drive - if partitioned), when that comes to linux, the partitions will look like: (as noted in letschky's post) will be like /dev/sda with an additional partition being like /dev/sdb.
So... the point is this; you CAN have a vendor directory at the root of a drive, but it will be (if it's not trebelized) a symlink, and it will point to (/dev/sda)/system/vendor. So just seeing 'vendor' at root doesn't mean it is treble enabled.
It's like with Windows, if you had 2 partitions; if you were at C:\ you would be at the root of the C drive. If you typed in D: and hit enter, you would go to the D partition of the drive and be at D:\. You would now also be at 'root', but they are not the same.
There has to be another partition, not just a 'vendor' directory under root.
Click to expand...
Click to collapse
Is there a way to know for sure if the vendor folder is actually a symlink to another partition or just a normal folder?

Farewell...
letschky said:
sorry but i sell my 7x and go to the Honor View 10.
Click to expand...
Click to collapse
We're Going To Miss You At The Party...
Congrats on your new Honor device ! It appears to be a fine machine..
I was hoping to get to know you better and tap some of that knowledge of yours
Take Care... and enjoy your View 10 !

Thank you, i am very happy with it!

the fingerprint scanner on the front alone can be used as Navbar,and the navbar can be hidden,ok this is offtopic,but it has to be

renatofontes said:
Is there a way to know for sure if the vendor folder is actually a symlink to another partition or just a normal folder?
Click to expand...
Click to collapse
Sure, just look at what the symlink points to. My LG g6 had a 'vendor' partition at root, but it pointed to /system/vendor of the **same** partition, not a different partition.

i can confirm that the h7x will receive full treble support with the upcomming oreo/emui8 update.
Regards

Remember...
optionalmgrr.la said:
As title
Click to expand...
Click to collapse
It's Still Vendor's Choice..
Even if a device has a Vendor folder under the root directory appearing to denote somewhat guaranteed P. Treble support,
that does not mean that the Vendor "Will" support P. Treble..
Lucky for us... it's a *Go* on the 7X..

Related

[REF] LVM Partition Remapping

OK, this thread is going to be a work in progress, intended to serve as a reference for the work I've been doing on LVM partition remapping.
My work was done initially on a Find 7, but this should eventually be usable on many other devices (I have the Find 5 and N1 in mind for when I return from vacation). Also, this would not have been possible without the work Steven676 did years ago on the Nexus S, which has been used by all AOSP-derivative projects to support the Samsung Aries (Galaxy S) family for quite some time now.
The current state of things is that the patches are solid and work very well for the system side of things, but there is still a bit of work needed on the recovery side of things. This is due to TWRP having an architectural limitation I need to work on - Whether a device uses emulated storage or not is set at compile time, which is a problem if your design requires automatic detection of configuration at run time.
One of the key design goals here was to support both normal and LVM configurations automatically with a single build that detects which configuration is present on a device at run time.
A second key design goal was that the underlying partition table of the device is not touched in any way. Touching the partition table of a mobile device in the field is a fundamentally dangerous operation, as many partitions contain data that is device-unique or will render a device unbootable if altered. Recovery methods that involve DDing partition images to nonstandard partitions is asking for trouble due to typos... There's no protection against a user typoing the name of a critical partition.
Initially, I'm going to dump the contents of an email I wrote to someone giving them documentation on how to integrate LVM into their project. Over time I'll clean up and reorganize this post, including adding some more links. Also, since this email was written, I've added a LOT of comments to each patch explaining what is going on.
For additional documentation, especially a more user-oriented view of things (such as how to set this up if you want to use it with Omni nightlies) - see the Omni nightlies thread on XDA.
So here goes:
How it's implemented - the complete patch set is at:
https://gerrit.omnirom.org/#/q/topic:find7_lvm - Expect this to periodically change as work on this feature continues (Note: All patches required to support nightly builds of Omni have been merged. At this point, all remaining work that I expect is on polishing up TWRP.)
With the rest of this post, I'll talk about each individual patch and what it does.
https://gerrit.omnirom.org/#/c/9273/ - This is a patch against frameworks/base which adds an alternative to storage_list.xml called storage_list_lvm.xml - The frameworks will choose storage_list_lvm.xml instead of storage_list.xml if the property ro.lvm_storage is set to 1 - The device init scripts will set this property if they detect an LVM configuration.
https://gerrit.omnirom.org/#/c/9207/ - This is an Omni-specific patch. Omni builds for both the Find 7 and OnePlus One (also known as find7op) and both share a common device tree. The LVM patches do not apply to the find7op, so we move init.recovery.rc out of the msm8974-common tree - You likely don't have to worry about this unless you also have a -common tree for find7 and find7op
https://gerrit.omnirom.org/#/c/9276/ - Normal Android kernel ramdisks do not include busybox or any form of shell, making it impossible to run shell scripts without /system mounted. Since we need to run a shell script prior to mounting partitions, we need to add busybox to the ramdisk. This patch does that. For legal reasons you may wish to replace busybox with system/core/toolbox and system/core/sh - I have not tried doing so. If you choose to stay with busybox, you will have to provide the busybox source code in order to comply with the GPL.
https://gerrit.omnirom.org/#/c/9205/ - This adds the LVM binary and LVM configuration file to the ramdisks of both normal boot and recovery. This patch does not actually begin doing anything with the binaries, I separated it out from the other patches as a way to keep things organized so I could start working with the binaries when I began this project. The original source code and documentation for the binary is at https://github.com/steven676/android-lvm-mod
One change I made in lvm.conf that differs from the Samsung aries family (galaxysmtd, fascinatemtd, captivatemtd, etc.) is that I changed the filter line to only allow the userdata and sdcard partitions. This prevents LVM's vgscan from accidentally determining another partition is a physical volume, and also prevents users from accidentally running pvcreate on a critical partition.
https://gerrit.omnirom.org/#/c/9206/ - This is where all of the "heavy lifting" is done. I'm going to work on adding more comments to the init scripts and shell scripts to document them tonight and tomorrow, but I'll try to explain things here.
Android's init system is a bit limited in that it's very difficult to have conditional behavior defined in init.rc - which appears to be why Qualcomm loves to use shell scripts called from init. Similarly, much of the LVM magic happens in three shell scripts (which execute at three different phases within the boot sequence).
In the early-init phase, the two "wait" blocks ensure that the underlying block devices are ready before vgscan/vgchange are called. This will probably slow down booting by a few fractions of a second unfortunately.
vgscan will scan the volumes defined in lvm.conf (in this case, only the userdata and sdcard partitions) for LVM physical volumes. If LVM physical volumes are detected and form a proper volume group, vgscan will create appropriate device nodes. With the configuration I'm using, the device node will be /dev/lvpool/userdata - which consists of a single logical volume that merges the sdcard and physical userdata physical volumes (partitions). The configuration of lvm.conf prevents LVM commands (especially pvcreate) from altering partitions we don't want to alter. If someone accidentally tries to, for example, run pvcreate on the system partition, it will give an error indicating that the partition was not part of the filter.
vgchange will activate the physical volumes detected by vgscan
lvm_init.sh will check to see if /dev/lvpool/userdata exists, and copy fstab.qcom.lvm to fstab.qcom, init.fs.rc.lvm to init.fs.rc, and twrp.fstab.lvm to twrp.fstab if it does. If it does not, it selects fstab.qcom.std, etc.
In the "on init" section, the init script exports all environment variables from init.fs.rc, and creates all storage-related directories and symlinks needed for both configurations (except for when they conflict). lvm_symlinks.sh will create directories/symlinks that must be configuration-specific. Just like lvm_init.sh - it decides what to do based on whether /dev/lvpool/userdata exists
In the "on fs" section - we do an SELinux restorecon on /dev/mapper/lvpool-userdata (/dev/lvpool/userdata would probably work here too). If it doesn't exist, this will fail gracefully without causing any issues.
In "on early-boot" - lvm_setprop.sh uses /system/bin/setprop to set ro.lvm_storage to 0 or 1 depending on the detected configuration. The property service is not available until early-boot - so this cannot be in lvm_init.sh or lvm_symlinks.sh This propery is used by the frameworks/base patch above to determine which storage_list to choose.
At the end of the init.qcom.rc, the fuse daemon for emulated storage is added for all configurations. (I could not figure out a good way to make this conditional based on whether LVM was present or not). In a non-LVM configuration, it runs but is harmless - it maps /data/media (which is empty) to /mnt/shell/emulated (which nothing is looking at due to the environment variables and symlinks set in the "on init" section )
You will probably notice that Omni's standard storage configuration is fairly different from ColorOS - this is due to the way KitKat storage works, but it allowed us to get away without using Oppo's ext4 permissions hacks in our kernel (by remapping permissions instead, in a manner similar to how the emulated storage system works) The way we handle our /sdcard partition does interoperate without issues with the ColorOS approach.
https://gerrit.omnirom.org/#/c/9279/ is a patch specifically for TWRP. TWRP currently determines whether to use emulated storage (/sdcard on /data/media) at build time instead of at run time. Until I have time to fix this, the patch here operates as a workaround. It is similar to the behavior of the fuse sdcard daemon in the previous patch - it maps /data/media to /sdcard whether the configuration is actually emulated storage or not. If the device is not using emulated storage (LVM), mapping of /data/media to /sdcard is still mostly harmless. However it does result in undesirable changes to TWRP's user interface. DO NOT USE THIS APPROACH IN PRODUCTION RELEASES. It's a horrible hack. You'll need to figure out how to properly do /data/media handling depending on whether LVM is present or not based on how your own recovery architecture works.
https://gerrit.omnirom.org/#/c/9281/ adds "raw" sdcard and userdata partition entries to the partition table for the LVM configuration. This allows a user to return their device to a standard configuration by formatting the underlying sdcard and userdata partitions directly, instead of the removelvm ZIP at the beginning of this email. - To be abandoned, this patch was squashed into 9206
FAQ
Q: Coldbird already had repartitioning support. Why did you create this different approach?
A: Even before he started work, I strongly recommended that he not touch the partition table of the device. It's a really bad idea and is fundamentally dangerous. It's pure luck that someone hasn't hardbricked yet. (A number of people have come close.) If you read through his thread and the ColorOS 2.0.2 thread, you'll see that the repartitioning approach fails frequently, and in multiple ways. (Missing partition contents, partition table ending early, etc. The latter is really scary, one person had the process fail at mmcblk0p19 - what if someone else's partition table write operation aborted even earlier?.) Also, nearly everyone that has implemented support for that approach has needed a separate build to support it. (Oppo is the first to manage autodetection.) I also provided him all of the reference information from Steven676's work.
LVM is far safer. The underlying partition table is not touched in any way. Instead, LVM remaps sectors on the fly so that two partitions that are not adjacent to each other on the physical storage appear as a single contiguous partition to the filesystem drivers. Linux has supported LVM for on the order of a decade, if not more. I've been using LVM on my file server since 2006. (Yes, the system is 8 years old and still working other than needing a new power supply after a thunderstorm. Nothing to do with LVM. ) In addition, the lvm.conf configuration used here provides protection against accidental typos causing damage. Undoing the changes is as simple as doing a wipe of /data and /sdcard from any standard recovery and can be done in seconds, not of running a special batch file that runs a bunch of fastboot commands and takes 4-5 minutes. Similarly, the LVM setup process currently described in the Omni thread involves flashing a single ZIP from recovery that takes only 10-15 seconds, and most of that process is flashing an LVM-aware recovery. (The only limitation currently is that the ZIP must be on external storage - USB OTG or MicroSD)
To put it simply, it Just Works. No need to back up a pile of partitions other than /data and /sdcard because those partitions are never touched or altered.
Q: I have a device with a ridiculously oversized /system partition, can I get some of that back for /data?
A: Yes, you can. Add the physical /system partition to the lvm.conf filters and add it to the lvpool when creating it, then create a smaller /system LV out of this big pool. (see updater.sh in device/samsung/aries-common/ of any AOSP-derivative for hints here.) Be careful though - leave enough spare space for growth (new Android versions, etc.) While it should be possible to use some of the LVM tools along with ext4 resize tools to reorganize the LVs without wiping, this is very difficult and you'll probably have to make users wipe /data if you want to alter /system.
*reserved 2*
Nice work, I hope all the patches can be widely used on some other devices and other roms.
systop said:
Nice work, I hope all the patches can be widely used on some other devices and other roms.
Click to expand...
Click to collapse
Yup. I know Andre from PA was working on it last week but I haven't heard from him lately.
My priority when I return from vacation will be fixing up the TWRP side of things. It's working for now, but the user interface on non-LVM configs is a little funky thanks to RECOVERY_SDCARD_ON_DATA being compile time. This has never been a problem before since a single TWRP binary never had to support two different configurations before. I plan on either doing a property-based approach or fstab-based like CWM. (It should be possible for someone to make a CWM build that automatically detects configuration without any modifications to CWM, based on reading the code - but I haven't tried it myself.)
Once TWRP is in better shape, I plan on doing the Find 5 and N1. These will have the challenge of not having a MicroSD slot, so I may have to change TWRP so that it use /tmp instead of /sdcard when doing "adb sideload", or at least gives the user that option.
Good stuff :good: I don't really need it as of yet, but when my new device is provided (warranty) I will surely give this a try.
I hope ayysir will merge the LVM support very soon ^^
Find 7u PA 4.6 beta 1
Awesome work mate. I have avoided other methods because I'm always the guy that will have a device fail at very bad timing; like during boatloader or SBL stage.
I'm really glad you have continued to work on this. I have hit thanks a few times but would also like to thank you here
tork987 said:
I hope ayysir will merge the LVM support very soon ^^
Find 7u PA 4.6 beta 1
Click to expand...
Click to collapse
He had issues with merging support, hopefully now that I've added more documentation he can try again.
how are the *.std files created?
atm this is tough for me to port from omni to cm base which AOSPA Oppo trees
ayysir said:
how are the *.std files created?
atm this is tough for me to port from omni to cm base which AOSPA Oppo trees
Click to expand...
Click to collapse
the std files are also part of the device tree
https://github.com/omnirom/android_device_oppo_find7/tree/android-4.4/configs
ayysir said:
how are the *.std files created?
atm this is tough for me to port from omni to cm base which AOSPA Oppo trees
Click to expand...
Click to collapse
For the fstabs - they are simply moves/renames of the fstab files and other storage-related items from the standard Oppo configuration (they should appear as renames/moves in the Gerrit commit...)
For the init.fs.rc file - all of the "export <blah>_STORAGE" lines from init.qcom.rc/init.find7.rc are cut out of the RC file and put into .std
Obviously, the .lvm versions of the files are the ones where the fstab has been altered to support a single data partition with emulated storage.
Amazing work and amazing posts. Thanks a lot for your sharing. ?
I've got a question related to your configuration (/data and /sdcard merged) : are the LV hot-resizables?
Wendigogo said:
Amazing work and amazing posts. Thanks a lot for your sharing. ?
I've got a question related to your configuration (/data and /sdcard merged) : are the LV hot-resizables?
Click to expand...
Click to collapse
In theory, you could probably use some of the ext4 resizing tools to do something like this, but I haven't looked into it as there isn't much point in the current config (since the LVM userdata volume is allocated to use all space on the volume group).
Something like that might be more useful if someone ever uses LVM to regain some of the wasted /system partition space on certain excessively bloated devices (like some GS4 units).
Entropy512 said:
In theory, you could probably use some of the ext4 resizing tools to do something like this, but I haven't looked into it as there isn't much point in the current config (since the LVM userdata volume is allocated to use all space on the volume group).
Something like that might be more useful if someone ever uses LVM to regain some of the wasted /system partition space on certain excessively bloated devices (like some GS4 units).
Click to expand...
Click to collapse
Thanks for your answer.
Seems I misunderstood the way it's implemented here. All space is allocated to /data? So there's no more internal sdcard right?
But in that case an external sdcard is mandatory. How is it managed when there's no sdcard?
Enjoy!
Wendigogo said:
Thanks for your answer.
Seems I misunderstood the way it's implemented here. All space is allocated to /data? So there's no more internal sdcard right?
But in that case an external sdcard is mandatory. How is it managed when there's no sdcard?
Enjoy!
Click to expand...
Click to collapse
Android has supported emulated storage (where /data/media is mapped to /sdcard with a special FUSE daemon that makes /sdcard have DOS-like permissions despite an underlying ext4 partition) since ICS. It's pretty much the standard in all new devices - the Find 7 is to my knowledge the only device launched in 2014 not to use emulated storage. Most devices in 2013 also did - Oppos were again the rare exception.
As I understand it - for some reason Chinese users prefer the legacy pre-ICS partitioning scheme. My guess is due to UMS vs. MTP - MTP is required for access to emulated storage, UMS can't be used, but a lot of older desktop OSes have issues with MTP. So Oppo finds themselves in conflict between their home market (China) and expanding in the West. That said, the Find 7 was kind of a screwup in achieving this goal, since the internal sdcard partition was ext4 which meant UMS was a no-go for it.
Entropy512 said:
Android has supported emulated storage (where /data/media is mapped to /sdcard with a special FUSE daemon that makes /sdcard have DOS-like permissions despite an underlying ext4 partition) since ICS. It's pretty much the standard in all new devices - the Find 7 is to my knowledge the only device launched in 2014 not to use emulated storage. Most devices in 2013 also did - Oppos were again the rare exception.
As I understand it - for some reason Chinese users prefer the legacy pre-ICS partitioning scheme. My guess is due to UMS vs. MTP - MTP is required for access to emulated storage, UMS can't be used, but a lot of older desktop OSes have issues with MTP. So Oppo finds themselves in conflict between their home market (China) and expanding in the West. That said, the Find 7 was kind of a screwup in achieving this goal, since the internal sdcard partition was ext4 which meant UMS was a no-go for it.
Click to expand...
Click to collapse
I've got it now. Thanks for your explanations
I saw that Oppo phones didn't follow Android guidelines (yet?) by not using the emulated_storage mounting method but I didn't know why.
And your right, mtp doesn't work in Windows XP (or is hard to make working) and there's a lot of Asian people still using it. Obvious once you said it...
And that's also why only external sdcard is accessible in UMS mode in recovery.
Thanks again for your enlightenment. ?
Reading some of the comments on G+ it looks like Oppo might be using this solution for their KitKat release. I would be so pleased if they did.
Sent from my X9076 using Tapatalk
kishd said:
Reading some of the comments on G+ it looks like Oppo might be using this solution for their KitKat release. I would be so pleased if they did.
Sent from my X9076 using Tapatalk
Click to expand...
Click to collapse
You could be pleased...
Wendigogo said:
You could be pleased...
Click to expand...
Click to collapse
Had some problems with camera focus on earlier versions of omnirom for find 7. Now those have been addressed. I installed Omni and am on the nightlies with lvm. My find 7 and find 7a will not see another rom again.

Dual Partitions?

I heard talk of the partitions in these pixel phones being different than the Nexus phones were. Like how the Nexus phones had bootloader, radio, system, recovery, boot, userdata, and cache. What do they mean when they speculate "dual partitions"? And for that matter, how are they going to update older Nexus devices if the partitions are different than the Pixel? A lot of questions I know, but hell, figured why not ask away.
I want to know how much space the 32GB variants have left after the dual partitions are accounted for.
LLStarks said:
I want to know how much space the 32GB variants have left after the dual partitions are accounted for.
Click to expand...
Click to collapse
I think I saw a video that showed 29GB
Edit: formatted to 29 but 24.3 available
H4X0R46 said:
I heard talk of the partitions in these pixel phones being different than the Nexus phones were. Like how the Nexus phones had bootloader, radio, system, recovery, boot, userdata, and cache. What do they mean when they speculate "dual partitions"? And for that matter, how are they going to update older Nexus devices if the partitions are different than the Pixel? A lot of questions I know, but hell, figured why not ask away.
Click to expand...
Click to collapse
Current devices have a single "system" partition, containing the OS and included apps, which gets patched when an OTA update is released. You can't use the phone when the OS is being patched and it's a slow process.
With the new feature, the new phones will have two system partitions (let's call them A and B). The phone can run the OS from one of these partitions (A), while the other partition is upgraded by an OTA update in the background (B). When the upgrade has been downloaded and applied to partition B, the phone can quickly reboot into the OS on partition B, making the upgrade much faster from a user point of view.
The next time the phone installs an update, it can apply it to partition A in the background.
All existing devices will simply continue to use the existing partition structure and patching process.
Daveoc64 said:
Current devices have a single "system" partition, containing the OS and included apps, which gets patched when an OTA update is released. You can't use the phone when the OS is being patched and it's a slow process.
With the new feature, the new phones will have two system partitions (let's call them A and B). The phone can run the OS from one of these partitions (A), while the other partition is upgraded by an OTA update in the background (B). When the upgrade has been downloaded and applied to partition B, the phone can quickly reboot into the OS on partition B, making the upgrade much faster from a user point of view.
The next time the phone installs an update, it can apply it to partition A in the background.
All existing devices will simply continue to use the existing partition structure and patching process.
Click to expand...
Click to collapse
So basically, Android OS would be installed on both partitions? That's too weird. That will take some getting used to!
It's more than just 2 system partitions, as those aren't the only potential partitions affected by an update. llabtoofer posted the exact duplicate partitions a while ago on Twitter.
I want to the size of each partitions.
Please show below via adb shell.
cat /proc/partitions
ls -l /dev/block/platform/soc/7824900.sdhci/by-name
*7824900.sdhci is diffrent name folder.
Milly7 said:
It's more than just 2 system partitions, as those aren't the only potential partitions affected by an update. llabtoofer posted the exact duplicate partitions a while ago on Twitter.
Click to expand...
Click to collapse
Hey I know this post is a little old but do you happen to know where I can find that post ?
aholeinthewor1d said:
Hey I know this post is a little old but do you happen to know where I can find that post ?
Click to expand...
Click to collapse
Very old post lol. You should search XDA for a user named llabtoofer. He knows a lot about HTC phones. I'm quite sure he will answer. You can also search for him on Twitter which is where he originally posted it prior to the phones release date.

Root App Folder Permissions and Navigation

Guys, I'm having a tough time deleting a file or two that were recently installed in the root's /product folder and I guess I don't understand what I am doing wrong, or what security is in place to prevent me from doing this. I would greatly appreciate any help or suggestions here. I cannot change permissions to make the folder recursively rw. I first started with Root Explorer and Solid Explorer. Both are capable of changing permissions but failed saying it was a "system folder". I used terminal to setenforce to 0, and tried with su from terminal and could not manually change folder permissions using chmod either. I thought maybe TWRP would be the answer, so I booted recovery and tried mounting the data partition (I think it's on data) and used file manager to browse to the folder, but I cannot see the contents of the folder nor can I delete it. What am I missing here? Is the TWRP mount function busted atm? Last night I reflashed November's update with the -w thinking it might "overwrite" the folder, but there was no joy there either. I do have a couple of TWRP backups of the data folder and that is my next step. Before I apply the December image tonight, I'm going to restore the most recent /data partition backup. There has to be a way to get control of that folder and it's contents but so far it has eluded me.
Cheers and TIA.
As far as I'm aware, the only way currently to write to the product partition is to fastboot flash it. I've went as far as to modify TWRP fstab to mount it in recovery and use the file manager to replace the bootanimation only to have it either never write properly or for it to "correct" itself. Not sure which happened.
Sent from my Pixel 3 XL using Tapatalk
I appreciate the response... anything helps. Product is a folder in root also and that is what I am trying to access. Unless there is some kind of symlink linking that product folder to the product partition. I don't know. When I flashed the full image yesterday I would have thought that partition.img (nested in the zipfile) would have been flashed, too. Maybe I can try fastboot formating the product partition. Can't hurt. Thanks again!
Edit: Just found this thread where you also contributed. I'll try to flash that partition with the partition.img and see what happens. I just want to reset it to stock.
superchilpil said:
As far as I'm aware, the only way currently to write to the product partition is to fastboot flash it. I've went as far as to modify TWRP fstab to mount it in recovery and use the file manager to replace the bootanimation only to have it either never write properly or for it to "correct" itself. Not sure which happened.
Click to expand...
Click to collapse
I flashed product.img first and it rendered the phone unbootable... corrupt. I then went back into TWRP and wiped system and ran the flash-all script in fastboot and re-rooted. The net result is the product folder is unchanged. Everything is up and running just fine. That folder is just untouchable for me so far. Next I will format data and re-flash. I didn't fully understand what you meant about the custom kernel being the solution but so far EX is not working. May reach out to flar2 and see if he can make some kind of change to his kernel to support mounting this partition? Thanks again.
v12xke said:
I flashed product.img first and it rendered the phone unbootable... corrupt. I then went back into TWRP and wiped system and ran the flash-all script in fastboot and re-rooted. The net result is the product folder is unchanged. Everything is up and running just fine. That folder is just untouchable for me so far. Next I will format data and re-flash. I didn't fully understand what you meant about the custom kernel being the solution but so far EX is not working. May reach out to flar2 and see if he can make some kind of change to his kernel to support mounting this partition? Thanks again.
Click to expand...
Click to collapse
Yeah I have yet to be able to mount the product image to modify it, but I haven't tried all that much lately. I'm pretty sure it's fixable with a kernel edit but that's beyond my ability, and even if I could I have a 8 year old laptop that wouldn't be able to build it.
What are you trying to accomplish? The bootanimation?
Sent from my Pixel 3 XL using Tapatalk
superchilpil said:
Yeah I have yet to be able to mount the product image to modify it, but I haven't tried all that much lately. I'm pretty sure it's fixable with a kernel edit but that's beyond my ability, and even if I could I have a 8 year old laptop that wouldn't be able to build it. What are you trying to accomplish? The bootanimation?
Click to expand...
Click to collapse
No, I see boot animation in that folder, and yes we all used to use it, but this time it's just an apk from apkmirror that wrote to that system partition (don't ask me how) and now I can't uninstall or update it. com. breel.wallpapers18. I tried to uninstall it using pm uninstall, but it uninstalled it for user 0 so it remains as a system app, and not available to me. I can't uninstall it completely or upgrade... or even use it! It's just a fk'in set of Google live wallpapers I like, but now want to re-set. Waay too much time spent on this so I'm (just about) ready to flush and start over. Every year Google makes it harder for us (fans) to customize our own phones. wtf? Pissed.

Changing Partition Sizes of internal flash memory

Hi,
after removing all the bloatware and some apps I will never use there is a little over 1G of free space in my system_root partition. Since both system a/b and userdata partitions are on sda I assume it is the same physical device. So in theory it should be possible to shrink the systems partitions and grow the userdata. Has anybody tried to do this? Does anybody know what type of encryption is used on userdata - it doesn't seem to be luks. I have a linux background and am quite surprised how much android differs from what I am used to...
Cheers
Paul
alpinista82 said:
Hi,
after removing all the bloatware and some apps I will never use there is a little over 1G of free space in my system_root partition. Since both system a/b and userdata partitions are on sda I assume it is the same physical device. So in theory it should be possible to shrink the systems partitions and grow the userdata. Has anybody tried to do this? Does anybody know what type of encryption is used on userdata - it doesn't seem to be luks. I have a linux background and am quite surprised how much android differs from what I am used to...
Cheers
Paul
Click to expand...
Click to collapse
In theory it's possible. But in practice it's extremely difficult, especially with all the partitions on todays devices. Changing a partition effects all partitions after it and they all need to be recreated. It's also extremely dangerous if you don't really know what your doing. I successfully did it on an old skyrocket just for fun. But I wouldn't want to try it on the pixel. I'm not even sure what the dual slots would entail.
Sent from my [device_name] using XDA-Developers Legacy app
alpinista82 said:
Hi,
after removing all the bloatware and some apps I will never use there is a little over 1G of free space in my system_root partition. Since both system a/b and userdata partitions are on sda I assume it is the same physical device. So in theory it should be possible to shrink the systems partitions and grow the userdata. Has anybody tried to do this? Does anybody know what type of encryption is used on userdata - it doesn't seem to be luks. I have a linux background and am quite surprised how much android differs from what I am used to...
Cheers
Paul
Click to expand...
Click to collapse
What bloatware did you remove?
airmaxx23 said:
What bloatware did you remove?
Click to expand...
Click to collapse
Everything that is not related to basic phone functionality or camera. Like two dozen apps. arcore, vrcore, all the carrier and e-sim stuff, play music/video, and a lot of other unnecessary stuff.
This is an answer to jd1609, I hit the wrong button:
Yeah, I thought so. Android has evolved quite a bit since cm14 (Android 7.1). I am just starting to understand whats going on with a/b partitions. I still don't quite understand why they had to go with sparse images instead of just raw images. Most probably to confuse me a bit more ....
But thanks a lot for sharing your experiences.
Cheers
Paul

Android 11 - Removing system apps, is it still possible?

Heya all,
this is one of my first threads here. I recently got an Mi 10T Pro, and after rooting it, I tried to somehow de-bloat it. There's a lot of stuff that I either don't need, or downright don't want in my phone (I'm looking at you Facebook).
Some of the apps I was able to uninstall with a root-level uninstaller, however, as I found out, sometime since... Android 10? The whole /system partition is mounted RO, and apparently can no longer be remounted as RW, so some of the deeper system apps can no longer be so easily removed.
Yes, I know that removing system apps is a risk, don't bring it up, I wouldn't be rooting my phone if I wasn't also willing to tinker with it.
Is there still a way to remove the deeply seeded applications? (For example the "Mi Video" app that resides in /system/app/MiuiVideoPlayer/MiuiVideoPlayer.apk)
You could disable them with some of the debloating methods. You won't gain space on system partition, and it's not really recommended because system partitions today really don't like to be mounted rw because of dynamic partition scheme...
They can be uninstalled with this tool
https://forum.xda-developers.com/t/tool-xiaomi-adb-fastboot-tools.3887359/
calinorg said:
You could disable them with some of the debloating methods. You won't gain space on system partition, and it's not really recommended because system partitions today really don't like to be mounted rw because of dynamic partition scheme...
Click to expand...
Click to collapse
Huh, never heard of that. Is there someplace I could read up on the dynamic partitioning? I am familiar with the way Linux deals with disk partitions, and as that was the same way Android worked before, I am confused now.
nesoler said:
They can be uninstalled with this tool
https://forum.xda-developers.com/t/tool-xiaomi-adb-fastboot-tools.3887359/
Click to expand...
Click to collapse
Thanks! I'll check it out.
Aldenar said:
Huh, never heard of that. Is there someplace I could read up on the dynamic partitioning? I am familiar with the way Linux deals with disk partitions, and as that was the same way Android worked before, I am confused now.
Thanks! I'll check it out.
Click to expand...
Click to collapse
Dynamic Partitions | Android Open Source Project
source.android.com
Basically, dynamic partitioning allows oem to resize partitions as needed without messing up the system, but the downside is that twrp and non-dynamic apps see only one super partition, which contains other partitions inside. Newer twrp builds (3.5.0+ ) have support for dynamic partitions but it's still under development and there's much stuff to consider. Basically, if you make system partition rw and put a file inside, you change it's properties (and size), but in super partition system partition stays the same size and format, so basically you overwrite something, and things get out of hand
That's why only recommended way to change anything in system and other partitions is to make magisk script to do it, because magisk knows how to approach system and other partitions in a way that it won't kill everything...
calinorg said:
Dynamic Partitions | Android Open Source Project
source.android.com
Basically, dynamic partitioning allows oem to resize partitions as needed without messing up the system, but the downside is that twrp and non-dynamic apps see only one super partition, which contains other partitions inside. Newer twrp builds (3.5.0+ ) have support for dynamic partitions but it's still under development and there's much stuff to consider. Basically, if you make system partition rw and put a file inside, you change it's properties (and size), but in super partition system partition stays the same size and format, so basically you overwrite something, and things get out of hand
That's why only recommended way to change anything in system and other partitions is to make magisk script to do it, because magisk knows how to approach system and other partitions in a way that it won't kill everything...
Click to expand...
Click to collapse
Aaah. Yes, thank you for the explanation. It sounds kinda like LVM in Linux - One "Super" partition like a Volume Group with individual partitions like Logical Volumes, able to be dynamically resized, while leaving any of the free space to use for the other partitions.
Ah well, at least I managed to disable some of the apps. Turns out the Xiaomi ADB Tools only really called "pm uninstall --user 0 *package.name*", so nothing special.
Aldenar said:
Aaah. Yes, thank you for the explanation. It sounds kinda like LVM in Linux - One "Super" partition like a Volume Group with individual partitions like Logical Volumes, able to be dynamically resized, while leaving any of the free space to use for the other partitions.
Ah well, at least I managed to disable some of the apps. Turns out the Xiaomi ADB Tools only really called "pm uninstall --user 0 *package.name*", so nothing special.
Click to expand...
Click to collapse
Yes, something like LVM, but it keeps partitions in read-only state, to prevent users from modification. If you change even 1 byte, partition is flagged dirty and not even e2fsck couldn't fix it... basically, until we get proper tools with proper support, messing the partition layout in android is a big no-no...
Yes, XAT is just a frontend for pm uninstall, but it's easier than typing commands, and also it keeps a nice list of uninstalled apps, so you can re-enable them with one click...
cant disable using titanium backup either
paul999 said:
cant disable using titanium backup either
Click to expand...
Click to collapse
As far as I can see, disabling a system app is still possible. Just not uninstalling as that would require a writeable /system partition which currently, as pointed out above, isn't really possible. I even tried the Titanium Backup's exploit method, but didn't work either. App's still installed, albeit disabled.

Categories

Resources