How to replace prebuilt AndroidX libraries with the ones compiled locally? - Android Q&A, Help & Troubleshooting

So Google removed all source code for Android support and Androidx libraries from the AOSP distribution.
I already have a compiled AOSP on my machine, and now I have downloaded and compiled AndroidX separately as well from the AndroidX googlesource website.
So now I want to include these AndroidX compiled libraries with my AOSP distribution, so that when I compile the AOSP source code, it (AOSP) will get compiled with the locally compiled AndroidX libraries. How do I achieve this?

Related

[GPL SOURCE] GPL source code for the Android 4.0 / r14 SDK

kernel, platform, dev-tools, and "extra" source code!
here
to answer the most obvious question:
Jean-Baptiste Queru said:
Here are the GPL source files that match the 4.0 / r14 SDK.
Like we did for all Honeycomb release, this is NOT the full source tree for IceCreamSandwich, these are only the GPL parts that are in the SDK (along with a few associated files), and they're not enough to build the whole IceCreamSandwich for a device.
Click to expand...
Click to collapse
thanks for the link, but the code is useless - no UI libraries, no dalvik to boot JAR's,
no applications... still waiting until google releases the full sources in november
I agree it's mostly useless, but the kernel source at least provides the basic patches needed for the newer version.
the basic patches are for the emulator only.
we need drivers from LG for our hardware, at least a kernel dev like franco can port the drivers to the 3.0
tree, but its a lot of work ... and currently he didnt have a lot of time.

[Q] Android .mk makefiles, prebuilt tools, NDK roles

Hello,
I actually have successfully build some kernels. Mainly, this is the linux way:
- get kernel sources
- get hardware specific changes
- get the toolchain -> i'm using google prebuilt tree, with ARM tool chain 4.4.3 already compiled
- build with usual steps: def_config, configure, kernel, modules
All is ok.
Now, i found Android.mk files. Precisely, a previous kernel, with sensors related to my device, that i would like to port.
But here comes the trouble. I have hard time to do the link between Linux kernel for ARM and Android makefile. I don't see how it goes with my kernel, how i could compile this using the prebuilt tools i could grab from Google.
In short, how to include .mk files into a classic kernel ? What should i get in the end ? A module ? A replacement binary ? More precisely, what is exactly NDK and where it stands in the above layers ?
ARM Linux Kernel <--> Dalvik JVM <--> APK
Last, is it possible with Google prebuilt to compile the .mk without referencing your kernel ?
Thank you !
Thank you for your help
Damn ! Either the questions is too obvious, either it is too complex. Any help ?
Self reply: downloading the NDK is mandatory
- you can use your favorite toolchain, provided with the NDK
- you can embed the .mk into your application, for Eclipse / Android studio, it will use the NDK to compile

[Q] Compiling CM11 kernel with seperate toolchain

HI, I'm trying to compile cyanogen's kernel for mako
however with the compiler I used to compile AOSP sources, cm won't compile without modification to source code.
Can anyone tell the toolchain used by CM for it's releases so I can do a successful complication without source code modification?
Anyone willing to tell the toolchain?

Do I Need To Put The Toolchain On My PATH?

Whilst compiling Cyanogenmod I got this error:
Code:
ccache: FATAL: Could not find compiler "arm-eabi-gcc" in PATH.
Based on the manifest
https://github.com/LineageOS/android/blob/cm-12.1/default.xml#L542
the compiler is platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8
from
https://android.googlesource.com/pl...inux-x86/arm/arm-eabi-4.8/+/android-5.1.1_r37
If I add that full path to my PATH variable I can compile the ROM successfully.
However, that seems wrong to me.
The compiler is already part of the source tree.
Shouldn't something in one of the make files or build scripts be setting this rather than me setting it manually?
Note: I am not using a custom toolchain, it is the standard one from aosp.
opticyclic said:
Whilst compiling Cyanogenmod I got this error:
Code:
ccache: FATAL: Could not find compiler "arm-eabi-gcc" in PATH.
Based on the manifest
https://github.com/LineageOS/android/blob/cm-12.1/default.xml#L542
the compiler is platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8
from
https://android.googlesource.com/pl...inux-x86/arm/arm-eabi-4.8/+/android-5.1.1_r37
If I add that full path to my PATH variable I can compile the ROM successfully.
However, that seems wrong to me.
The compiler is already part of the source tree.
Shouldn't something in one of the make files or build scripts be setting this rather than me setting it manually?
Note: I am not using a custom toolchain, it is the standard one from aosp.
Click to expand...
Click to collapse
Toolchains aren't automatically set, at least for now. Possible causes being...
There are multiple versions of Toolchain that are synced together, and it isn't necessary that the newer version of the same toolchain "must" compile the code with success, which was properly compiled by an older version.
Also, by this, the developer has complete freedom to change the ROM/Kernel toolchain.
Coming to the Question in Thread Title, If you're building a ROM, then toolchain has to be added in PATH
Arvind7352 said:
Toolchains aren't automatically set, at least for now. Possible causes being...
There are multiple versions of Toolchain that are synced together, and it isn't necessary that the newer version of the same toolchain "must" compile the code with success, which was properly compiled by an older version.
Also, by this, the developer has complete freedom to change the ROM/Kernel toolchain.
Coming to the Question in Thread Title, If you're building a ROM, then toolchain has to be added in PATH
Click to expand...
Click to collapse
Thanks for clarifying.
Ideally it should scan the source tree for the compiler by default so it has something to fall back to in case a custom one is not specified.
What confused me is that I don't see this nugget of information specified in any of the guides I read about compiling ROMs.

Enabling kernel page table dump in android

I found this page on enabling kernel page table dump in Android (https://wenboshen.org/posts/2018-09-09-page-table.html). For this I have to edit a defconfig and rebuild the kernel. I built my own AOSP (Android 9, blueline userdebug) but can't locate the defconfig for my device. In fact the arch/arm64/configs/ directory is missing.
How can I create a custom defconfig within the AOSP repo? Or do I have to download the kernel source for my device and rebuild/flash it?
In general what is the relation between AOSP and the kernel source? Does AOSP not build the kernel as part of it?

Categories

Resources