android-source

How to build a part of Android AOSP?

∥☆過路亽.° 提交于 2019-12-02 19:19:25
I am trying to build my own libs and apps in external directory of the AOSP, but the problem is i have to run make each time and the make will compile/build whole the android. In my external apps folder i have Android.mk file, but i cannot build it using ndk-build, it will look for JNI folder and NDK_BUILD_PATH, so the question is: How can i build it without rebuilding whole AOSP? A plain make invocation will not rebuild more than necessary, but even with a leaf library or binary even an incremental build can take a few minutes. If you only want to build your particular module you can look at

Why does a protected android:onClick method in Activity actually work?

微笑、不失礼 提交于 2019-12-02 19:06:19
Suppose you define android:onClick="doClick" in your Activity as protected void doClick(View view) { } The documentation states that This name must correspond to a public method that takes exactly one parameter of type View. This is a given requirement of the underlying Class.getMethod() method, which only finds public methods as the documentation states that it Returns a Method object that reflects the specified public member method of the class or interface represented by this Class object. So how is it possible, that this implementation, which should not work at all, works on some devices

Where is the source code of Android Architecture Components?

不打扰是莪最后的温柔 提交于 2019-12-02 19:00:55
Can't find the source code of new Android Architecture Components. Was it published? If it was, where? If the source is in AOSP, please specify which specific repo project should I use with repo sync [PROJ_NAME] in order to get it. Aidanvii Here is the source for Lifecycle , Room , Paging and ViewModel . As confirmed by Adam Powell, the source code of Architectural Components can be obtained only with the artifacts themselves: As stated in Android team's official blog AndroidX Development is Now Even Better , the source code of AndroidX (previously support) lies in https://android.googlesource

Developing AOSP with Android Studio

孤者浪人 提交于 2019-12-02 18:33:37
I'm trying to setup a development environment to do some custom modifications on the AOSP source code, and would like to use Android Studio as my IDE. After doing the necessary steps, however, Android Studio seems to not be able to recognize some of the classes and methods. Did I do something wrong? Here's a rundown of what I did: I did the necessary preparations (dependencies, etc.) for cloning and building AOSP according to the official documentation. After that, I cloned the AOSP 7.1.1-r11 branch with repo, and then ran the following commands: $ source build/envsetup.sh $ lunch aosp_arm-eng

Android: Create new System Permission in through AOSP source code.

北城余情 提交于 2019-12-02 18:14:55
I was wondering how one can edit Android OS source code to impose a new permission. For example like we have BLUETOOTH permission, if the device offers a new sensor, then how appropriate permission can be created in order for applications to use the new sensor, at application level using manifest entry for the new permission available in android rom. Does anybody know how new Permissions are created on the OS level in AOSP source code?? And i think if we have modified the android source to add the new permission we must compile the our custom SDK for using permission in application development

AOSP building error: symbol not defined

耗尽温柔 提交于 2019-12-02 17:38:40
问题 I'm trying to build the cornerstone based on AOSP 4.3_r2.2. I got a lot of errors during the building like these: frameworks/base/core/res/res/values/public.xml:244: error: Symbol 'config_bluetooth_adapter_quick_switch' declared with <java-symbol> not defined frameworks/base/core/res/res/values/public.xml:1558: error: Symbol 'config_enableDreams' declared with <java-symbol> not defined frameworks/base/core/res/res/values/public.xml:919: error: Symbol 'ic_suggestions_add' declared with <java

What is boot.img file in android?

£可爱£侵袭症+ 提交于 2019-12-02 17:09:15
I am building the android source code and getting new system.img . I try to flash the new system.img on a device and I see that I need another file called boot.img. What is this file ? what is used for ? how can I get it for my device ? boot.img contains the kernel and ramdisk, critical files necessary to load the device before the filesystem can be mounted. You have to generate the boot.img yourself using mkbootimg, a tool provided by AOSP. All the details you need are available at this xda-developers thread. This google discussion thread may also be useful 来源: https://stackoverflow.com

Where and when is generated android.Build.SERIAL in AOSP?

一笑奈何 提交于 2019-12-02 16:16:29
问题 I know, that android.Build.SERIAL is generated at first device boot, but I can't locate where and when exactly. I'm building AOSP Jelly Bean , Android tablet, nosdcard. 2nd question: is this serial number really unique for all Android devices? 回答1: According to this thread, it clearly says that it's unique, but added since API 9 and may be not present on all devices. If you're writing your app for a specific device's model, you could direclty check if it has an IMEI. Otherwise, as you said, I

How to get android's native methods source code

怎甘沉沦 提交于 2019-12-02 16:12:11
Is it possible to get and watch at Android's program component's native methods code. If anyone knows how to, please let me know. Idolon You can find source code for Android native methods using Google Code Search one of the following services: AndroidXRef GitHub (using repo:android/* search term) The search for " SystemClock || android*SystemClock " in AndroidXref will point you to the android_os_SystemClock.cpp file which in turn forwards many of its methods to SystemClock.cpp Other Android .cpp or .h files with native methods implementations could be found in a similar way. mudit If you are

How do you create a loadable kernel module for Android?

ε祈祈猫儿з 提交于 2019-12-02 15:58:42
I know there a number of walkthroughs and tutorials floating around out there which describe this activity, but after having read many of them I still can't get this working. If anyone has the patience to wade through the steps I've taken (posted below) and suggest where I may have gone off track I'd be very appreciative. I've spent about a day and a half staring at make files and reading walkthroughs so literally any suggestions would be helpful. Environment: I'm using an Ubuntu 10.04 32 bit vm. I'm hosting from a 64 bit windows 7 My Core 2 Duo does not have the hardware support for 64 bit