android-source

Switch from AOSP master to froyo

Deadly 提交于 2019-12-04 09:34:56
问题 I just checked out master with repo. Now I want to switch to froyo. How can I do this without downloading a bunch of stuff again? I don't want to download a bunch of stuff again, I just want to be able to move freely between branches as in a normal git clone. 回答1: Since you downloaded everything with repo, you can easily use repo to switch between branches without downloading everything again: repo init -b froyo; repo sync This will download only the files you need to switch branches, just

Modifying in-call voice playback in Android custom ROM

旧街凉风 提交于 2019-12-04 07:52:12
问题 I would like to modify Android OS (official image from AOSP) to add preprocessing to a normal phone call playback sound. I've already achieved this filtering for app audio playback (by modifying HAL and audioflinger ). I'm OK with targeting only a specific device (Nexus 5X). Also, I only need to filter playback - I don't care about recording (uplink). UPDATE #1: To make it clear - I'm OK with modifying Qualcomm-specific drivers, or whatever part that it is that runs on Nexus 5X and can help

Android Binder clearing caller identity

不问归期 提交于 2019-12-04 07:48:05
Recently I read Android source codes and find that a pair of methods are always called when doing some Binder IPC call. I read the comment, but I can't clearly know the root reason. The pair of method is as follow: final long origId = Binder.clearCallingIdentity(); //other local method. Binder.restoreCallingIdentity(origId); Does anyone know what's the function of that pair of method? It seems to relate to permission. I don't think I can answer better than the description in the official APIs: http://developer.android.com/reference/android/os/Binder.html public static final long

Checking out Android source from github

会有一股神秘感。 提交于 2019-12-04 06:47:35
After going through all of these steps to check out the Android source code (Gingerbread branch), only to come to a compile error, I have decided to try to get the source code from a different source. Here are the steps that I have taken to checkout the source code from the GitHub.com repository. I checked out the repo tool from the GitHub.com repository git clone git://github.com/android/tools_repo.git Inside the repo script file that was downloaded, I changed the location of the repo tool as follows: ## repo default configuration ## #REPO_URL='git://android.git.kernel.org/tools/repo.git'

How to draw text on an EGL texture using Skia SkBitmap?

北战南征 提交于 2019-12-04 06:11:34
问题 I am looking for a way to draw text on EGLTexture using Skia library in C/C++. I am planning to run a program that does it on Android platform during bootup before SurfaceFlinger comes up. Please don't point me to Android Java examples as that is not what I am looking for. I am troubleshooting UI issue at frame buffer level. I am looking for a way to do this in C/C++ using Android native libs (Skia etc). I have a sample program that can render an image using SkBitmap onto EGLTexture. I was

Can I use android.os.* libraries in a standalone project?

久未见 提交于 2019-12-04 04:47:56
问题 I'm trying to develop an external library (not sure if that's the right term) to provide prepackaged functionality in Android projects. Working in Eclipse, I've added the appropriate android.jar file to the build path, and everything is happy both while editing and upon compilation. However, when I use Android's Handler and Message classes (android.os.Handler, android.os.Message) for inter-thread communication, I get exceptions unless I'm running within an Android app, on the emulator or a

Where is the source code for Android's web browser?

别等时光非礼了梦想. 提交于 2019-12-04 04:29:07
Since Android has such pathetic documentation, I'm looking for the source code for the browser so I can see what objects it provides to JavaScript. Where should I look? Is there an online source code browser? Cristian It's in the Git repository: https://android.googlesource.com/platform/packages/apps/Browser https://android.googlesource.com/platform/external/webkit/+/android-3.2.4_r1/WebCore/xml/XMLHttpRequest.h Edit: The applications are now mirrored on github . You can find the browser here: https://github.com/android/platform_packages_apps_browser.git Or try GrepCode : You can even throw a

API Change error when building AOSP 5.1

允我心安 提交于 2019-12-04 01:57:44
Currently trying to build android-5.1.0_r5. I've checked out the sources and made no modifications. However, when compiling I get the following error. Checking API: checkpublicapi-current out/target/common/obj/PACKAGING/public_api.txt:20: error 5: Added public field android.Manifest.permission.BACKUP out/target/common/obj/PACKAGING/public_api.txt:82: error 5: Added public field android.Manifest.permission.INVOKE_CARRIER_SETUP out/target/common/obj/PACKAGING/public_api.txt:106: error 5: Added public field android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE out/target/common/obj/PACKAGING

Error in building Alarm app from android source

不问归期 提交于 2019-12-04 01:54:47
问题 I want to build an app which extends basic alarm clock functionality. Since I am not inventing any wheel in the alarm functionality, I would like to use the android default alarm which is available openly. However I have tried to build it many times but there are just too many errors (mentioned here also): I tried this approach also but I am still not able to build it. Can anyone please guide on how to build the android application provided in git android tree. Links I referred to: Alarm

Is there a working public mirror of android.git.kernel.org?

这一生的挚爱 提交于 2019-12-03 23:29:39
[Sorry for the dumb question. This has got to be a FAQ the past few days, but I can't find anything other than people complaining that the repo is down and to check the news...] I have been unable to use repo to access http://android.git.kernel.org for a while now; obviously this is due to the attack on kernel.org. Unfortunately, I need to pull down versions of the source tree I do not already have. I know that at least some of the packages are mirrored on http://github.com/android , but the manifest file needs to edited (to, e.g., replace / with _) and it doesn't appear to have all of them