android-source

Build aosp on mac 10.12

夙愿已清 提交于 2019-12-06 08:52:45
问题 I used to build aosp on my mac. Recently I upgraded the mac os Mac Sierra (10.12). The I received this error message while building the project: Could not find a supported mac sdk: ["10.8" "10.9" "10.10" "10.11"] The mac sdk version has been upgraded to 10.12 however it is not within the supported mac sdk list. What could be a solution to this problem? 回答1: I have solved this problem on macOS Sierra (10.12.2) with Xcode 8.2. The solution may be helpful: Download MacOSX10.11.sdk on phracker

m3u8 file not playing in Android Emulator

这一生的挚爱 提交于 2019-12-06 08:36:48
I am trying to playback a m3u8 file in Android Emulator. http://devimages.apple.com/iphone/samples/bipbop/bipbopall.m3u8 It's not able to playback the video but audio is heard. I get the following error E/OMXNodeInstance( 39): OMX_GetExtensionIndex failed . I traced the calls and I see that the video decoder is not instantiated properly, I find that OMXNodeInstance::enableGraphicBuffers is getting called and that calls, OMX_ERRORTYPE err = OMX_GetExtensionIndex(...,const_cast<OMX_STRING>("OMX.google.android.index.enableAndroidNativeBuffers"),...); which is then calling OMX_ERRORTYPE

Where to place .so file so that it gets included in the final build

有些话、适合烂在心里 提交于 2019-12-06 07:26:58
I've a .so file which is being referenced by other project in AOSP system package. To make referencing possible I've created a new project in AOSP/external package with two files in it viz Android.mk and the xyz.so file. The Android.mk looks like following. LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE := customutil LOCAL_SRC_FILES := xyz.so include $(PREBUILT_SHARED_LIBRARY) During the compilation it gives me following error. make: * No rule to make target out/target/product/crespo/obj/lib/customutil.so', needed by out/target/product/crespo/obj/EXECUTABLES/abc_agent

How do I preserve file permissions in a custom external project added to Android AOSP?

空扰寡人 提交于 2019-12-06 06:41:20
问题 I've downloaded (using repo) the Android 4.0 OS source code (from here - http://source.android.com/). I'm trying to add a new external project (in external/ for example external/libhelloworld) to the build system so that it is built into the system image. In that project I would like to deploy a shell script and have it keep it's permissions which are rwxr-xr-x but when I build it and load the emulator I see the file permissions have been changed to rw-r--r--. I am deploying the script to

Signing Apk files programmatically in java

百般思念 提交于 2019-12-06 05:50:31
I need to modify preexisting .apk files present in the /data/app folder. After the modifications the signatures change in the Meta-INF folder. So in order to make sure the apk works properly I need to resign them with the correct md5sum. Is it possible to resign the apks programmatically through java, generating private key and certs through code only? I am using Bouncy Castle and this class . Re-sign example: SignedJar bcApk = new SignedJar( new FileOutputStream("out.apk"), signChain, signCert, signKey); JarFile jsApk = new JarFile(new File("in.apk")); Enumeration<JarEntry> entries = jsApk

Android Binder clearing caller identity

折月煮酒 提交于 2019-12-06 04:27:59
问题 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. 回答1: I don't think I can answer better than the description in the official

Eclipse: “Edit Source Lookup Path…”

泪湿孤枕 提交于 2019-12-06 01:55:54
I am developing on a Mac with Eclipse and have the skeleton for an app that implements the standard framework callbacks (onCreate, onDestroy, onPause, etc..). When I set breakpoints in the callbacks the debugger stops and displays a tab that says: ActivityThread.performLaunchActivity(ActivityThread $ActivityRecord,Intent)line:2477 And in the tab page body there is some red text that says "Source not found" and a button that says "Edit Source Lookup Path...". I have tried adding several paths via "Edit Source Lookup Path..." but I can't seem to find the one Eclipse is looking for. Can anyone

adb root works Runtime.GetRuntime().Exec(“su”); does not

感情迁移 提交于 2019-12-06 01:53:49
I am running android 7.1.1 on a custom device with the AOSP compiled from source in the 'userdebug' configuration, which gives root access and debug. I can connect to the device using the android device bridge. adb root adb shell device_name:/ # su All of these commands work fine and I can make changes as a super user. The problem I am having is running the same "su" command from an app Java.Lang.Process suProcess = Runtime.GetRuntime().Exec("su"); The error I am receiving is: Java.IO.IOException: Cannot run program "su": error=13, Permission denied Is there a difference between the adb root/

How to import the Android App project source code in Eclipse?

吃可爱长大的小学妹 提交于 2019-12-06 01:41:00
I downloaded the android source code for callLog UI for the Contacts, Call log, and Dialer applications using this link https://android.googlesource.com/platform/packages/apps/Contacts/ Now, I want to use it on eclipse. But when I try to import the project,it says it didnt found the project. Then I tried to set all the configurations manually, but it show a lot of errors with the importing, the AndroidManifest.xml, with the R.java, etc. So is there any way of import this directly as a project to eclipse? Thanks. File->New Project ->Android Project In the dialog, choose the option "Existing

Checking out Android source from github

空扰寡人 提交于 2019-12-06 00:12:26
问题 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