[Android-tools-devel] Fwd: Documenting the android build process for tools relevant to us.

Chirayu Desai chirayudesai1 at gmail.com
Thu Jun 9 10:02:33 UTC 2016


Yes, I agree with the location you suggested, it was just something I
temporarily picked for testing and didn't want to change until I had a
working package built.

Trying to get that working as we speak.

On Thu, Jun 9, 2016 at 3:30 PM Hans-Christoph Steiner <hans at at.or.at> wrote:

>
> That approach is even better than using a link :)  But I still think
> that framework-res.apk should not go into /usr/lib/android-sdk.  It is
> not part of the SDK, and I've never seen that file included in a Google
> SDK package.  It should go somewhere like:
>
> /usr/share/android-framework-res/framework-res.apk
>
> .hc
>
> Chirayu Desai:
> > Re-sending e-mail as first attempt got rejected due to URL blacklist.
> >
> > The content / patch at the URL is:
> > diff --git
> a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/AndrolibResources.java
> >
> b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/AndrolibResources.java
> > index 0175f3420a..00e4a66579 100644
> > ---
> a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/AndrolibResources.java
> > +++
> b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/AndrolibResources.java
> > @@ -576,7 +576,7 @@ final public class AndrolibResources {
> >          }
> >
> >          if (id == 1) {
> > -            try (InputStream in =
> >
> AndrolibResources.class.getResourceAsStream("/brut/androlib/android-framework.jar");
> > +            try (InputStream in = new
> > FileInputStam("/usr/lib/android-sdk/ramework-res.apk");
> >                   OutputStream out = new FileOutputStream(apk)) {
> >                  IOUtils.copy(in, out);
> >                  return apk;
> >
> >
> > ---------- Forwarded message ----------
> > From: Chirayu Desai <chirayudesai1 at gmail.com>
> > Date: Thu, Jun 9, 2016 at 12:29 AM
> > Subject: Re: [Android-tools-devel] Documenting the android build
> > process for tools relevant to us.
> > To: Hans-Christoph Steiner <hans at at.or.at>
> > Cc: Android tools Maintainer
> > <android-tools-devel at lists.alioth.debian.org>, 殷啟聰
> > <seamlikok at gmail.com>
> >
> >
> > On Thu, Jun 9, 2016 at 12:17 AM, Hans-Christoph Steiner <hans at at.or.at>
> wrote:
> >>
> >> Since framework-res.apk has to be built anyway, then I think it makes
> >> sense to package it.  Sorry I was a bit late to catch up on all the
> >> details here.
> > My existing patch is not on top of master and won't cleanly apply there.
> > Currently master has some code which we may not want / change / is
> > work in progress, do we want it there? If so, i can update my patch.
> > Kai-Chung, what do you think?
> >>
> >> In terms of apktool's path, I think the apktool should Depend: on
> >> android-framework-res, then use a symlink to make sure it is in a path
> >> where apktool expects it, i.e. debian/links.
> > What upstream currently does is include the apk inside apktool.jar as
> > 'brut/androlib/android-framework.jar'
> > I have that working, and have a better version of the patch that is
> > present on my gitlab account locally.
> > However, an alternative approach would be to make apktool read
> > framework-res.apk directly from /usr.
> > I'm trying that right now with <blacklisted URL snipped> (ignore the
> > method deletion, I removed it for testing as it was unused, to avoid
> > confusion), but it isn't working.
> > I'm not seeing the error right now though, so I'll check this again
> > first thing tomorrow morning.
> >>
> >> .hc
> >>
> >> Chirayu Desai:
> >>> The platform packages naming / location sounds good.
> >>>
> >>> However, a lot of what the platform zip contains is not available in
> >>> Debian right now, and won't really be used anytime soon.
> >>> Also, it is generated by grabbing a bunch of components which are
> >>> built as part of either the standard Android build process or the
> >>> Android SDK build process, both of which are complex. So it would be
> >>> best to evaluate what we need from it right now and get that building.
> >>>
> >>> As for framework-res.apk, as discussed on IRC, it is already built for
> >>> android.jar, so we can have a separate package for it which would be
> >>> used by android.jar as well as apktool right now.
> >>> I have that working, see:
> >>>
> https://gitlab.com/cde/debian_android-tools_android-platform-frameworks-base/commit/1ea978033eb92e0c7c14f1ca40c61d84b2a2e7f1
> >>>
> >>> On Wed, Jun 8, 2016 at 4:56 PM, Hans-Christoph Steiner <hans at at.or.at>
> wrote:
> >>>>
> >>>> I don't see framework-res.apk in the official Android SDK at all, I
> >>>> think that's an OS filename, not an SDK file.  In the SDK, the
> framework
> >>>> res files are bundled into android.jar and/or installed into the
> subpath
> >>>> data/res/.
> >>>>
> >>>> Also, the platforms packages will be arch-independent since they
> contain
> >>>> nothing that is meant to be executable by the machine that they are
> >>>> installed on.
> >>>>
> >>>> .hc
> >>>>
> >>>> 殷啟聰:
> >>>>> Hi,
> >>>>>
> >>>>> I was also wondering which package should provide the
> >>>>> "framework-res.apk". aapt looks good but in fact the APK is unrelated
> >>>>> to this program. How about libandroid-23-java which provides the
> >>>>> "android.jar"?
> >>>>>
> >>>>>   1. "framework-res.apk" is built during the process of building
> "android.jar".
> >>>>>   2. aapt is arch-dependent package and "framework-res.apk" is
> >>>>> arch-independent file, although I don't know if this point actually
> >>>>> matters. Probably reduce the burden of buildd.debian.org ?
> >>>>>
> >>>>> Cheers,
> >>>>> Kai-Chung Yan
> >>>>>
> >>>>> 2016-06-07 19:24 GMT+08:00 Markus Koschany <apo at debian.org>:
> >>>>>> On 05.06.2016 11:47, Chirayu Desai wrote:
> >>>>>>> Hello everyone,
> >>>>>>>
> >>>>>>> This is to serve as a recap of the discussion had on IRC
> >>>>>>> (#debian-mobile) on June 2.
> >>>>>>> One of the major things discussed was the build process of
> >>>>>>> android.jar, we looked at how it is built in the android tree. I
> feel
> >>>>>>> like that could be documented in a place, so I created a wiki page
> >>>>>>> [1].
> >>>>>>
> >>>>>> Good idea. I presume shipping framework-res.apk with
> >>>>>> src:android-framework-base would be an easy task. The question is
> which
> >>>>>> package should provide the resource files? Maybe aapt? Apktool
> already
> >>>>>> depends on aapt, so that would be like killing two birds with one
> stone.
> >>>>>>
> >>>>>> Markus
> >>>>>>
> >>>>>>
> >>>>>> _______________________________________________
> >>>>>> Android-tools-devel mailing list
> >>>>>> Android-tools-devel at lists.alioth.debian.org
> >>>>>>
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/android-tools-devel
> >>>>>
> >>>>>
> >>>>>
> >>>>
> >>>> _______________________________________________
> >>>> Android-tools-devel mailing list
> >>>> Android-tools-devel at lists.alioth.debian.org
> >>>>
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/android-tools-devel
> >
> > _______________________________________________
> > Android-tools-devel mailing list
> > Android-tools-devel at lists.alioth.debian.org
> >
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/android-tools-devel
> >
>
> _______________________________________________
> Android-tools-devel mailing list
> Android-tools-devel at lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/android-tools-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/android-tools-devel/attachments/20160609/b25c5ec5/attachment.html>


More information about the Android-tools-devel mailing list