android-source

how to compile and modify android 4.0.3 source code in eclipse using windows

穿精又带淫゛_ 提交于 2019-12-25 01:33:59
问题 I have downloaded the android source code 4.0.3, installed cygwin with make and gcc, and downloaded ndk and sdk, integrated eclipse with cdt and adt. Using windows 7 64bit. Can you guys tell me how to build this source code in eclipse in order to customize the native settings menu. Thanks in advance. FYI :I have been through google, stackoverflow, but couldn't find any lead which works. 回答1: See these pages in the Developer docs: Initializing a Build Environment. This page seems to indicate

Implementation of remote()

别等时光非礼了梦想. 提交于 2019-12-24 14:05:26
问题 I'm trying to find the implementation of remote(), as in: remote()->transact(CODE, data, &reply); Do you guys know where it is? Searching Google turned out futile. Or if you know what that function does, it would be a big help for me. Many thanks Update: it seems remote() will return a pointer to an object of type BBinder, IBinder, BpBinder, or IPCThreadState but I'm not sure which one. 回答1: The implementation of remote is simple: class BpRefBase : public virtual RefBase { protected:

How to make android build system embed annotations.jar in an app?

别等时光非礼了梦想. 提交于 2019-12-24 10:39:43
问题 I am building Superuser on Android Open Source Project 4.0.4. I: fetched the git repo in packages/apps , issued mm in packages/apps/Superuser and faced following issue: http://pastebin.com/50vGLhH1 I read that I have to embed annotations.jar in android app's dependencies. There are howto do that with eclipse, but cannot find my answer with aosp source code. Anyone knows? 回答1: Not sure if this will work, do try adding below line in Android.mk LOCAL_STATIC_JAVA_LIBRARIES += annotations 来源:

Context error of custom system service

依然范特西╮ 提交于 2019-12-24 08:29:57
问题 I have created a system service that communicates with a zigbee device. Updated APIs and created system.img and flashed on the device and made custom SDK for android programming. In the Mainactivity class, try { ZigbeeManager zm = (ZigbeeManager) getSystemService(Context.ZIGBEE_SERVICE); zm.write("Hello World!\r"); } catch (Exception ex) { Log.d(TAG, "Error in Zigbee Service: " + ex.toString()); } I am getting an error over the words "Context.ZIGBEE_SERVICE". It says "Must be one of : list of

Custom AOSP Keyboard Error: DictionaryProvider ClassNotFoundException

会有一股神秘感。 提交于 2019-12-24 05:13:07
问题 I'm trying to build the AOSP keyboard from the 5.0.2 branch after adding some custom code to obtain pressure values for key touches. I'm using lunch full-eng to build the source and using mm to build LatinIME after I've added my changes. I'm then pushing LatinIME to /system/apps/ on my Galaxy S3 after removing the previous version. I'm running an unofficial version of CM12 5.0.2 on the device. The error I get is below which appears to have nothing to do with my code changes but more likely in

Android: How to build and replace modified AOSP code

浪尽此生 提交于 2019-12-24 03:32:06
问题 I am starting to work with stage fright frame work to implement hardware decoder in android prior to Jelly bean in my video conferencing application. I have downloaded and built the android source code in Mac system. I am not clear with the whole idea of working with AOSP. And my questions are (with respect to stagefright framework) Where can I find the libstagefright.so after AOSP build ?. If I use the OMX codec in my class for decode, how should I link the libstagefright.so to native code

Write meta information during Android package install

前提是你 提交于 2019-12-24 03:28:06
问题 Question: How to write meta information about a package OR Where is the installation intent handled in PackageManagerService in android source? (Description follows.) I'm modifying Android source to save some meta information about a package during installation. It can be stored in any location but has to be readable by the system. My first attempt was to use /sdcard (Android source error reading file from sdcard) But that does not seem to work because of permissions. Now, I want to be able

How to get the all the raw touch points at a particular instant for a tap?

痴心易碎 提交于 2019-12-24 00:57:03
问题 When the touchscreen is tapped once, the finger touches multiple x,y positions on the screen by virtue of the finger being fat. But android only gives me one x,y position at a time (For example, if I use adb shell getevent, it gives me only one x-y coordinate at a time. Of course for a tap it gives multiple x,y positions since the tap lasts for some time and it gives the x-y position for each fraction of that time if x-y slightly changes.) At each instant there are more than 50-100 pixels

How to unpack, modify, pack and flash `system.img.ext4` file using Odin?

↘锁芯ラ 提交于 2019-12-23 23:19:49
问题 I have a system.img.ext4.lz4 file that is compatible with my Samsung S10 5G(Qualcomm) device. I have extracted system.img.ext4 file from the system.img.ext4.lz4 using unlz4 system.img.ext4.lz4 command. I want to play with its content. So I have decided it in two steps: Flash system.img.ext4 without modification : Using tar -cvf AP.tar system.img.ext4 command, I have created a AP.tar file. Flashed AP.tar file using Odin3 v3.13. It flashed successfully. Flash system.img.ext4 with modification :

Get Currently Active User in Android

筅森魡賤 提交于 2019-12-23 20:32:16
问题 I'm looking for a way to get the current active user in Android. I'm building a system app so I can use hidden methods, but specifically it has to be the current ACTIVE user, and not the user for a given process. For instance, if you install an app using ADB the process is going to say the user id is the owner. This means that UserHandle.myUserId() will not work for what I need :( 回答1: So I found a method that does exactly what I need it to do. There is a static method in ActivityManager that