Project Mainline: Don't You Think Updates Will Take Way Too Much Space on older devices? - Treble-Enabled Device Guides, News, & Discussion

Project Mainline consists of modularising system components in updatable packages, APEX files. Updating uses a versioning system where new APEX files are presented to the user as "Google Play System Updates". These files are updated in much the same way as APKs. That also means that when there is an update these get stored in /data (userdata partition), as per the explanation in the official Android documentation:
The new APEX is stored in /data and, similar to APKs, the newly installed version shadows the version already present in the built-in partition. But unlike APKs, the newly installed version of the APEX is only activated after reboot.
Click to expand...
Click to collapse
As a consequence, these updates do not survive a factory reset and serve more as a stopgap in-between full OTA system updates (which of course do persist after reset).
Another consequence is that all these APEX file updates in /data take a lot of space. In addition to system apps (APKs) being updated and taking space on /data, now whole parts of the OS are being modularised and its updates replicated in /data, leaving increasingly lower space in the userdata partition, the further Project Mainline gets. For newer devices with plenty of space that's not a problem, but on XDA we also like to extend the usable life of older devices, which may therefore not benefit from having their system components "APEXed".
In sum, what I would like to know from anyone interested in this discussion, and especially experienced Android users or developers is this:
"For older or low end devices with lower storage capacity, are you going to discourage users from using Google Play Services or at least from updating the system using the APEX updating scheme?"

Related

[Q] keep specific system files from deletion during CM ROM update?

I was just wondering if there is some way to keep specific system files from being deleted while flashing a new ROM (at least when not doing a full wipe)?
For example, third party applications like "Theft Aware" or any other app that was manually converted to system app are deleted by the cyanogenmod update script (and of course, need to be re-installed from scratch)- Is there a way to add exclusion criteria or something like that, thus keeping these files between flashing updates of the same ROM?
Solution found
Found a solution for Cyanogenmod rom (I guess it should work in other variants and flavors too)- adding it just in case it is of interest to other users:
Got it from the old/inactive theft aware forum: http://tinyurl.com/d8vjkba
I tried it with other system applications that I have installed manually or converted from user apps- and it works great- saves all the hassle of reinstalling these applications (if you flash lots of nightly builds it's quite a pain in the... )

[Q] Lollipop, /system partition almost full

Hi all,
I updated my Nexus 7 to lollipop using the factory image (just to have a fresh start ..), but I noticed the available free space on /system partition is just a few Mb's.
After rooting (just superSu, no busybox) available space is 1.7 Mb and after editing the hosts file it is just 700 kb. I deleted the ringer tones (quite useless on a wifi only tablet) and that gave me 2.5 Mb of extra room. Any other tip to increase the /system free space ? The partition is typically read-only, but is it dangerous to be so low on free space ?
I'm afraid that could pose an issue on future upgrade, do you think google might consider re-partitioning the internal flash ?
thanks
bye
The above are reasonable questions.
Not being an expert, I wonder how much file system manipulation may be accomplished with an "in place" update.
I don't think the lack of file system headroom is a problem.
For upgrades down the road, cross that bridge when and if you get there. This device is not likely to receive another major update such as this.
I too deleted all my ringtone files save one. Also, I froze certain Google apps I'm unlikely to use. No ill effects that I can see.
With only 670 Mb of /system partition google has to decide what is in and what is out: as an example the launcher is still the old basic one because it has a smaller footprint. My Nexus 5 has googleNow launcher by default because its /system partition is 1 GB (and only 40Mb free). There will be a moment when the system files will not fit in 670 Mb and the nexus 7 will be abandoned ...
Sure the tablet is 2 years old and lollipop is very likely the last update, but I hope it will still be eligible for a 5.1 update (if any).
bye
Enrico
maybe something related with
http://forum.xda-developers.com/nexus-4/general/how-to-fix-internal-storage-16gb-8gb-t2033692
No, that is a different issue (which I also had and fixed with a factory reset). The /system partition is 670 Mb by google design and it is filled with system files.
For Google, 3 Mb of free space is more than enough, but if you have to root and/or do other changes, that might be a problem.
bye
i deleted all the programs in system that could be installed from the play store. even launcher since i installed the Now launcher.
Freed up a lot of system space and seems to have stopped most of the system lag.
I deleted the Maps and Chrome APKs, it looks like the updated versions of those google apps went into /data anyway so it wasn't needed in /system
I deleted some gapps with titanium (chrome, documents, "edicola" i don't know english name) but at reboot I have a lot of system UI error, so I return back to 4.4.4.
How I have to use for delete unwanted system apps?
Thanks!
When it comes to perceived or measured performance, it is inconsequential for a read-only filesystem to be nearly full. And /system is designed to be mounted read only - so there are no processes trying to write things there anyway.
It only matters to folks who might want to add additional content to the /system partition - and even then only at the moment of that operation; even if they fill it to 100% capacity, that will not cause a single performance issue.
Move along folks - nothing to see here.
Performed a full clean install last night, there was some lag. I rebooted a few times left it idle for a while but no difference. I'm doing this as I want to install Phantom kernel and move to F2FS which apparently needs a little more space free. So I moved some apps out of system to data and the difference was instant and noticeable.
bftb0 said:
When it comes to perceived or measured performance, it is inconsequential for a read-only filesystem to be nearly full. And /system is designed to be mounted read only - so there are no processes trying to write things there anyway.
It only matters to folks who might want to add additional content to the /system partition - and even then only at the moment of that operation; even if they fill it to 100% capacity, that will not cause a single performance issue.
Click to expand...
Click to collapse
That is exactly my feelings, I do not care if currently I have left only few Mb AFTER rooting and other tweaks, the partition is read-only and nobody is writing there during normal operation. After the initial adjustments, the tablet is smooth and runs fine even if the partition is nearly full.
I'm worried about future upgrades (if any): if an OTA fails because there is not enough space to update the /system partition (due to customised extra files) and/or after the OTA upgrade there is no room to add the superSu app to root ... then we are in trouble.
bye
Enrico
enryfox said:
I'm worried about future upgrades (if any): if an OTA fails because there is not enough space to update the /system partition (due to customised extra files) and/or after the OTA upgrade there is no room to add the superSu app to root ... then we are in trouble.
Click to expand...
Click to collapse
If the current OTA update is how future OTA updates will be installed (and there's no reason to suggest it's not) then any change you make to System will cause the OTA to fail, even if you change back everything. Meaning it will fail, not because it ran out of space because of the customized files you mentioned, but because it was tinkered with even the slightest bit.
So if the OTA behavior is like the current one, then do whatever you want to System, delete stuff, fill it up to the brim, doesn't matter because come next OTA time you'll have to flash the stock system image file anyway, if you wanna keep your data, or flash the then new stock firmware entirely, like you did this time.
dtg7 said:
If the current OTA update is how future OTA updates will be installed (and there's no reason to suggest it's not) then any change you make to System will cause the OTA to fail, even if you change back everything. Meaning it will fail, not because it ran out of space because of the customized files you mentioned, but because it was tinkered with even the slightest bit.
Click to expand...
Click to collapse
Actually I started with a rooted 4.4.4 and sideloaded the 5.0 OTA: it worked and the the update was applied successfully. My problem was that /system was really full to the brim, with 0 bytes left and that is way I applied the factory image. With current grouper 5.0 official image there is simply not enough space to root, install busybox and change the hosts file, we need to make some room to get all three tweak's.
I'm surprised future OTA's will not work simply because we tinkered with system files; until now I always applied new OTA's over rooted system files and they always worked (from 4.3 all the way up to 4.4.4).
bye
Enrico
enryfox said:
Hi all,
I updated my Nexus 7 to lollipop using the
factory image (just to have a fresh start ..)
Click to expand...
Click to collapse
enryfox said:
Actually I started with a rooted 4.4.4 and sideloaded the 5.0 OTA: it worked and the the update was applied successfully.
Click to expand...
Click to collapse
Kind of conflicting statements there...
Anyway here's what I understood about Lollipop OTAs: http://www.androidpolice.com/2014/1...e-means-update-will-fail-system-modified-way/
So in conclusion I'm just gonna do whatever to system and flash stock system when next OTA comes around.
dtg7 said:
Kind of conflicting statements there...
Click to expand...
Click to collapse
no Conflicts here :
enryfox said:
Actually I started with a rooted 4.4.4 and sideloaded the 5.0 OTA: it worked and the the update was applied successfully. My problem was that /system was really full to the brim, with 0 bytes left and that is way I applied the factory image.
Click to expand...
Click to collapse
the OTA + root process left me with a /system partition full and there was no way to free space (I do not know why) so I had to restore the factory image.
The new OTA policy, as for my experience, does not apply to the our Nexus 7: the android 5.0 OTA applied to my rooted nexus7 flawlessly; if it wasn't for the rooting process filling up the /system partition, I would have kept it as it was.
bye
Enrico
i think same Problems in my moto g 5.0.2 LP stock 20mb free space in /Sys.
Someone should make a deodexed stock ROM, so there'd be more free space? I'd do it myself but my PC isn't powerful enough to run the deodex tool and my upload speed is 350kb/s so I wouldn't be able to upload it anywhere (400-500MB)
Inviato dal mio XT1032 utilizzando Tapatalk
It's all the apps that the ROM flashed into the system partition. I found myself with 1MB free. I needed that space for root apps so I installed Titanium Backup and uninstalled several apps that you can grab from the Play Store. I got to 103MB free in /system.
I wasn't sure if uninstalling the foreign language keyboards would cause problems, so I left those alone. If anyone know if they can be safely removed please let me know.
Anywho, I'll list what I removed.
Chrome
YouTube
Drive
Maps
Street View
Google+
Wallet
Play Music
Sound Search
Don't forget to reboot after uninstalling. Then install from the Play Store.
LuvMyDroid said:
It's all the apps that the ROM flashed into the system partition. I found myself with 1MB free. I needed that space for root apps so I installed Titanium Backup and uninstalled several apps that you can grab from the Play Store. I got to 103MB free in /system.
I wasn't sure if uninstalling the foreign language keyboards would cause problems, so I left those alone. If anyone know if they can be safely removed please let me know.
Click to expand...
Click to collapse
The foreign languade keyboards (as well as the ASUS keyboard) are among the things I've uninstalled to free up some space in the system partition. I've seen no ill effects. My system partition has about 65 MB free. Here's what I've uninstalled:
ASUS Keyboard
Docs
Google Hindi Input
Google Korean keyboard
Google Pinyin Input
Google Play Games
Hangouts
Sheets
Slides
Talkback
I confirm that, also, N7 3G is smoother than before with lollipop 5.0.2 with more space in system partition

How to install apps to system partition and keep them update to save space?

As far as I know one can't re-size the partitions of a I9509... But there is a huge amount of lost space in system partition specially when on a debloated custom ROM.
Therefore I thought isn't there a way to simply install apps to system partition and keep them (automatically) updated there either... Is there a solution for that?
Or any other idea how to use that senseless wasted space?
Thx a lot!
You could use Titanium Backup to make apps into system apps. But it could make them malfunction.
I'm using Link2SD. It has a free option to integrate system app updates into system or turn a user app into a system app.
TB needs the paid version for that.
- Deleted -
Interesting, means when I change a user app into system app it will updatr normally through play store in normal storage but then link2sd can integrate it into that system app...
Is that done in a batch procedure or do I have to do it for every app by myself?
Yeah, I would do that with ES file explorer but still one would have to update the apps manually what means a lot of work because the updates would be installed in normal storage for normal system apps...
Titanium Backup has an "Integrate update into app" option that moves the update to the app folder
link2sd is single apps, even plus Beware of google play services and/or services Framework, integrating their updates can cause annoying failure loops sometimes leading to pulling the battery to reboot. I tend to do them last or solo as a result. Tasker might be able to do the job for bulk or automatic, I haven't used it much, so idk.
Have no problem integrating GPServices or PlayStore into system on stock firmware. Doing it on GPE for example makes the playstore unusable.
As for the batch option there isn't one but the system updates are not that frequent to need this option

[Discuss] Modularize /data to prevent clean flash all the time

While Primary idea behind Project Treble allowing the OS layer to be updated independently - without relying on /vendor things (For starters/newbies https://www.xda-developers.com/project-treble-custom-rom-development/ )
Here at XDA we tinker around ROMs all the times. Irrespectively of ROM's stability, causal users always get stuck due to necessity to clean flash every time they want to try new ROM/new version of android
Dirty flash often creates conflicts with framework-res, System-Ui, etc etc such system apps data after a new ROM/Update and create unnecessary issues. Thus mostly considered as taboo. Whereas running Stock does not need to data wipe throughout device update lifecycle.
So, I would want discuss about the possibility of having /data modular to ROM as User App data is not going to change (Based on which root backup solutions like Titanium backup,etc work). This should enable the possibility of flashing any ROM, and User apps working smoothly on new ROM (just like device-specific blobs, etc in vender) unless major android version change is detected.
@ XDA Devs, Is this technically feasible?
Obviously its possible, i use this trick since last year.
In this trick, the app wont deleted, but, the app-data will erase.
Also everything inside/data (excluding media) erase.
But, the large sized /data/app will be intact.
Btw, it wont work, if u rollback to previous android version.
Only works within same version of multiple roms/ upgrading Android version
afridi.shahriar said:
Obviously its possible, i use this trick since last year.
In this trick, the app wont deleted, but, the app-data will erase.
Also everything inside/data (excluding media) erase.
But, the large sized /data/app will be intact.
Btw, it wont work, if u rollback to previous android version.
Only works within same version of multiple roms/ upgrading Android version
Click to expand...
Click to collapse
People are ok to lose app data if they want to roll back to previous versions of android. My context is reg. Project Treble which is only supported from Oreo..
Btw., Senior developers/tweakers pls think about this. Lets discuss if implementation of this is possible down our ROMs lane!!
arvindgr said:
People are ok to lose app data if they want to roll back to previous versions of android. My context is reg. Project Treble which is only supported from Oreo..
Btw., Senior developers/tweakers pls think about this. Lets discuss if implementation of this is possible down our ROMs lane!!
Click to expand...
Click to collapse
Hey. U don't need trebel/oreo to change ROM without deleting apps.apk, even i used this trick since......mmmm marshmallow 6.0.x
Is this referencing deleting /data/data/?
It works... But can have issues based on ART optimization...
Which is why the full wipe is recommended... Not for stability... But for troubleshooting
Sent from my PH-1 using Tapatalk
Maybe even just deleting /data/data for just the system apps, keeping the user app data in tact. Its definitely possible with a basic recovery script. Maybe we can look into that
rignfool said:
Is this referencing deleting /data/data/?
It works... But can have issues based on ART optimization...
Which is why the full wipe is recommended... Not for stability... But for troubleshooting
Click to expand...
Click to collapse
Thread is related to not deleting /data/data/ on ROM changes. Won't such ART Optimisation issues go off when cache is cleared?
This same is done on stock ROMs and even official Lineage OS updates don't require clean flash
tytydraco said:
Maybe even just deleting /data/data for just the system apps, keeping the user app data in tact. Its definitely possible with a basic recovery script. Maybe we can look into that
Click to expand...
Click to collapse
Yeah, when treble overcomes some major system partition shortfalls, /data shouldn't that hard.
Basically, this should ideally allow us switch between ROMs seemlessly...
I was able to do this about 3 years ago when I had an s3 mini, I had a custom rom available called Vibrant os but I wanted some apps to be pre-setup it included a data folder with data/app and data/data included along with data/system for wallpaper
took me a while and I had to find the folder permissions for each folder and do the set permissions command in the updater script but I was able to somewhat do this
I've taken the same code applied it but with set metadata changed to set perm
and I've reverted back to stock EMUI from resurrection remix project treble and all my apps have come across ( the data/data folder is next but atleast it is possible )
some google apps don't work if downgrading though
right now i'm copying data/app to my sdcard manually, wiping system, moving it back then doing my script
My goal is for the script to move data/app and data/data to the sd card, format data partition as f2fs, move data/app and data/data back then set the permissions
So basically, split /data/data into...
/data/data_system
/data/data_user
...?
I guess it's possible, but it would require changes at the ROM level. Maybe only framework, but possibly also in native code (e.g. zygote, not sure).
But... I don't think this really has anything to do with Treble.
CosmicDan said:
So basically, split /data/data into...
/data/data_system
/data/data_user
...?
I guess it's possible, but it would require changes at the ROM level. Maybe only framework, but possibly also in native code (e.g. zygote, not sure).
But... I don't think this really has anything to do with Treble.
Click to expand...
Click to collapse
i've managed to downgrade back from pixel experiece 8.1.0 to EMUI 8.0.0 and keep my apps ( data for the apps is tricky finding out the right read, write, execute permissions )
Livi-Tech said:
i've managed to downgrade back from pixel experiece 8.1.0 to EMUI 8.0.0 and keep my apps ( data for the apps is tricky finding out the right read, write, execute permissions )
Click to expand...
Click to collapse
It's not really, you just run restorecon command recursively on the tree - as long as file_contexts is intact then it will set permissions (and, more importantly, contexts) as they should be.

How to install a custom Rom with the small system partition size??

Hi all.
Dug an original 2012 nexus 7 (16GB) out of the drawer to see if it could be refreshed a bit and brought back in to some sort of use.
I've put Lineage 14.1 on it and rooted with the nexus toolkit but I had to install the pico Gapps as there is only 689mb of system space. I've trawled the internet looking for a solution on how to make the system partition slightly bigger to accomodate a larger rom and all i came up with was using "Parted" to try and resize the partitions. I've tried everything but i can't get a reading from mmcblk0. Keeps telling me that there's no such file or words to that effect. I know it's there because i can see it. I'm clearly doing something wrong in adb. I see Roms for CRDroid that combined with Gapps pico are too big to fit on. They've been made so there's obviously a way to get them on there that i'm missing.
Would anybody be willing to give me a guide on how to get the system partition bigger?
Thanks very much
There is no possibility to re-orgainize partition sizes for the Nexus 7. The only idea which could work in my opinion: create an image file on the /data partition, move the content from e.g. /system/apps there and bind mount the image file to /system/apps
Unfortunately this new concept needs to be supported by your custom recovery, too, otherwise you would not be able to install any app. Long story, short answer: much work to be done and it's not really needed as you can download almost all Gapps from the playstore and then these apps will be installed on the /data partition.
Btw. custom ROMs occupying too much space on /system probably should try to reduce the number of supported languages / features or renounce on pre-compilation of the build-in apps. First startup will take longer but on the other side you gain some additional space ... Just a hint.
Try google "nvflash" for Nexus 7. Attention! This is a low-level utility, if used improperly and there are no backups, RESTORE THE DEVICE WILL BE IMPOSSIBLE!!!
I strongly do not recommend this, the risk of turning the tablet into a brick is very large.
Instead, you can use root file explorer to remove unnecessary system applications and files (for example, media - boot animation, sounds, etc.) to free space.
gmikhail said:
Try google "nvflash" for Nexus 7. Attention! This is a low-level utility, if used improperly and there are no backups, RESTORE THE DEVICE WILL BE IMPOSSIBLE!!!
I strongly do not recommend this, the risk of turning the tablet into a brick is very large.
Instead, you can use root file explorer to remove unnecessary system applications and files (for example, media - boot animation, sounds, etc.) to free space.
Click to expand...
Click to collapse
Hi.
Spent the last hour or so trying to decipher what nvflash actually was. I think the penny has dropped. You wern't recommending it as a way to get more space. You were potentially recommending it as a failsafe so i could mess about with the partitions without bricking it????
Anyway, thanks very much. I think i'll just have a look at uninstalling some of the non required files to free up the space. I assume the best way would be to install the ROM of choice, go in and uninstall stuff and hopefully if enough space has been created, be able to flash gapps?
@blueplasticsoulman probably you would like to have a look at Magic GApps 2017.11.9, they are implementing more or less the solution I pointed out in my other post. I didn't try yet, but sounds promising to me.
AndDiSa said:
@blueplasticsoulman probably you would like to have a look at Magic GApps 2017.11.9, they are implementing more or less the solution I pointed out in my other post. I didn't try yet, but sounds promising to me.
Click to expand...
Click to collapse
Thanks for that. I did get the problem sorted by installing the rom and then removing things that wern't required such as stock email, telephone functions (not sure why they are in the rom anyway) gallery and some wallpapers. That created enough space to then be able to install pico gapps. Runs quite nice on CRdroid although it probably wont get used as we all have newer tablets. Still, nice to know it runs good after 6 years. :good:

Categories

Resources