Lekensteyn / make-gapps-zip

Documentation and tools for reproducible update.zip builds
MIT License
12 stars 9 forks source link

Wildcard mismatch #1

Closed tonyp closed 9 years ago

tonyp commented 9 years ago

Hi, thanks for this great compilation, I used it to write a simple gapps debloat script for personal use :+1:

While going through it I noticed one minor error. You write:

The libenj*.so and libnj*.so files all start and terminate with the character sequence NJDC. These files match:

But actually the wildcard should be libennj*.so plus the single file libEnjemailuri.so.

Lekensteyn commented 9 years ago

Thank you for your report, it's fixed now.

I still haven't got time for further attempts on producing a minimal gapps package from the factory images. By debloating, do you mean taking a gapps zip provided by some third party and then stripping the unnecessary files?

tonyp commented 9 years ago

Well sort of. I'm not using a custom ROM but the official factory images by Google (the advantage of having a Nexus phone). I just wanted to get rid of unnecessary system files and used this as a reference. I don't need many of their apps and, especially including the automatic updates on the data partition, they take up a lot of space.

Regarding the minimal gapps approach: I did some experiments with building a minimal package a while ago, but the goal was a different one: I had to build a minimal gapps package for tegra2 devices as all gapps zips (starting from Android 4.3) floating around were including modules containing neon-instructions which failed terribly on tegra2 devices. The files can still be found here, but I doubt it will give you any additional insight, your investigation seems to be complete and you "just" need to work on the scripts.

Lekensteyn commented 9 years ago

The analysis was done by comparing a CM build (from source) with the Nexus 5 factory image, this was quite helpful to remove the bulk of unimportant files. My concern is not just about space, but also about having useless apps which start automatically. Most Google apps can be installed/are installed via Play anyway, so I am looking for the bare minimum to get Play working without "the Google experience".

AFAIK there is something about the odex files which need to be merged back into apk files, undoing the optimizations ("de-odexing"). Unfortunately, smali is not yet ready for these ART odex files. (Please correct me if I am wrong.)

tonyp commented 9 years ago

Yes definitely, that's another main reason I like to get rid of the (g)apps I don't use and why I called it "debloat" earlier. I mainly mentioned the space reason first as I used to just "freeze" these apps until recently when I thought "why not get rid of them alltogether". I kept the apps to be able to do OTAs, but with using Xposed I need a manual factory image reflash anyways so they can go.

For a minimum approach I know there are some xda threads who offer some more-or-less minimal packages (just not automatically generated) as well. I used to use some thread for reference for the tegra2 package I mentioned above (but added certain apps where a non-neon Playstore version didn't exist or caused issues). Maybe they offer some further reference, a quick Google search brought me to this one, which appears to be up-to-date.

Regarding the odex files: Is this really an issue? The gapps files I used so far were all deodexed and a look at my /system partition shows only apk files, no odex ones (although this might be different due to art nowadays, are gapps usually odexed at Googles factory images?).

Lekensteyn commented 9 years ago

There are multiple threads that link to "minimal gapps", but none of them allow for reproduction of the same files in an open manner. This project exists to change that.

And yes, odex is an issue, some ART APKs are odexed. My impression was that these cannot be transferred to different firmware with different framework packages.