Questions tagged [android-source]
Questions about the source code and building of Android itself, contributing to the Android project, Android kernel development and porting. Do not use for Android application development questions except where specific to building applications as pre-packaged parts of the system.
android-source
3,154
questions
663
votes
7
answers
290k
views
Where can I find Android source code online? [closed]
Where can I browse the source code for any Android Open Source Project (AOSP) application (for example the Contacts application)? Is the only way to clone the entire source repository for all of AOSP?
173
votes
2
answers
181k
views
adb devices => no permissions (user in plugdev group; are your udev rules wrong?) [duplicate]
I am getting following error log if I connect my android phone with Android Oreo OS to Linux PC
$ adb devices
List of devices attached
xxxxxxxx no permissions (user in plugdev group; are your udev ...
135
votes
3
answers
59k
views
What does @hide mean in the Android source code?
For the Activity source code, line 3898 (close to the bottom):
/**
* @hide
*/
public final boolean isResumed() {
return mResumed;
}
What does @hide mean?
I found my public class ChildActivity ...
105
votes
1
answer
5k
views
Adding a new network bearer to Android
I'd like to add new bearer(s) to Android (rooted/custom build), to be a peer with Wifi and GPRS.
I have done some Android development and I am aware that (in Android 2.2) there are constants for ...
89
votes
10
answers
61k
views
How do I build the Android SDK with hidden and internal APIs available?
I want to rebuild the Android SDK (or rather only the android.jar) to include hidden and internal APIs.
I could not find any documentation or discussion doing on how to go about this. I have an ...
87
votes
3
answers
140k
views
What are ODEX files in Android?
After some android apps installed, I found that it will change to odex file (not apk) in smartphone.
How does it happens? Who can teach me, I am very interested about it.
79
votes
1
answer
92k
views
What is the difference between system apps and privileged apps on Android?
So in 4.3 there was a concept of System applications. APKs that were placed in /system/app were given system privileges. As of 4.4, there is a new concept of "privileged app". Privileged ...
79
votes
1
answer
4k
views
Modifying in-call voice playback in Android custom ROM
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 ...
57
votes
4
answers
151k
views
Restart android machine
we have android + linux m/c, we log in into linux shell and boot the machine in android GUI.
now we have the some script that is running on the same machine through linux shell. In that case when the ...
56
votes
8
answers
86k
views
How to compile the Android AOSP kernel and test it with the Android Emulator?
Has anyone successfully compiled the android kernel and tested it in the Android emulator, and if so is there anything that special that needs to be done?
Documentation for the SDK is excellent, ...
55
votes
8
answers
108k
views
Where is android.os.SystemProperties?
I'm looking at the Android Camera code, and when I try importing android.os.SystemProperties, it cannot be found.
Here is the file I'm looking at:
https://android.googlesource.com/platform/packages/...
54
votes
2
answers
46k
views
How does the Android repo manifest repository work?
The Android source is a large hierarchy of git repositories. They are managed by a custom script called repo. Repo determines which git repositories to manage using a manifest.xml. The manifest.xml of ...
48
votes
4
answers
43k
views
How do I add APKs in an AOSP build?
I need to add some 3rd party APKs to my AOSP build. What folder should I keep these APKs so that when I build the code and the image is created, it is installed in the emulator?
It looks like the ...
48
votes
2
answers
13k
views
Does the Android OS release a wakelock if the app or service holding it is killed?
I have question about wakelock. In cases shown below, does android OS release wakelock (PARTIAL_WAKE_LOCK if you need to specify) to prevent wakelock was left acquired and wasting battery until ...
46
votes
2
answers
2k
views
Generated system.img not running on emulator
I wanted to build a custom ROM for Android TV.
I have followed the steps given on the Android Source Code - AOSP website and downloaded the source using the commands below:
repo init -u https://...
43
votes
8
answers
31k
views
Emulator can't find 'Linux version ' string in kernel image file
I was building AOSP for the Nexus Player and after successful compilation I tried to run the emulator and the message I received is:
emulator: ERROR: Can't find 'Linux version ' string in kernel ...
43
votes
2
answers
23k
views
How does Modem code talk to Android code
I would like to know high level idea of how Android Modem code will call/pass message to Android application layer. Say we take SMS for example. If network sends SMS and Modem (say Qualcomm C code ...
43
votes
4
answers
16k
views
How to get android's native methods source code
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.
42
votes
1
answer
82k
views
What does repo init and repo sync actually do?
I posted this question at Android Enthusiasts but figured it was the wrong place to ask, so I deleted it from there and asking it "again" here.
This is such a noob question, and pardon me if it is, ...
37
votes
1
answer
114k
views
What is boot.img file in android?
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 ...
36
votes
7
answers
90k
views
Can't locate Switch.pm
How do I solve this error?
Can't locate Switch.pm in @INC (you may need to install the Switch module) (@INC contains: /etc/perl /usr/local/lib/perl/5.18.2 /usr/local/share/perl/5.18.2 /usr/lib/perl5 /...
36
votes
3
answers
31k
views
What are strong pointers and weak pointers
I am confused with the notion of "strong pointer" and "weak pointer".
Diane Hackborn herself said that:
The object will remain around while there are strong pointers; it is
destroyed once the ...
35
votes
1
answer
25k
views
How do I set the default properties in an AOSP build?
Where can I change the default Android device properties in my custom AOSP build?
For example:
GPS - ON;
Sync - ON;
Brightness - AUTO;
Bluetooth - OFF;
WiFi - OFF;
Sound - default sound;
Vibrate ...
35
votes
1
answer
22k
views
What to do about curl clone.bundle error on AOSP repo sync
Upon downloading the master branch from AOSP I get the following error:
curl: (22) The requested URL returned error: 404 Not Found
Server does not provide clone.bundle; ignoring.
Why is this error ...
34
votes
2
answers
66k
views
Source of Android's lock screen [closed]
I am looking for the source code of the android lock screen. It can be for any version of Android (1.5, 1.6, 2.0, etc).
I tried looking in the repository at: https://android.googlesource.com/, but it ...
33
votes
2
answers
53k
views
Building a particular module in the android source code
I am working on an android source code which I have downloaded from source.android.com.
After a full build I went through this site http://elinux.org/Android_Build_System which explains the android ...
32
votes
1
answer
12k
views
Does Android use OkHttp internally?
This is a stack trace I get when running an Android app I recently inherited. We're not using OkHttp as an explicitly dependency, and the com.android.okhttp in the trace makes me think the AOSP is ...
32
votes
2
answers
25k
views
What does @UnsupportedAppUsage annotation depict
I am building an Enterprise app which has system permission and it requires to use a function from BluetoothAdapter class setScanMode. This is a hidden API which is only available for system signed ...
30
votes
9
answers
82k
views
SyntaxError: invalid syntax to repo init in the AOSP code
I have tried to repo init the source code Ubuntu build machine and it is successfully able to clone the code.
repo init -u [email protected]:xxx/xx_manifest.git -b xxx
Now I am trying repo init the ...
30
votes
5
answers
6k
views
Where is the source code of Android Architecture Components?
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 ...
30
votes
2
answers
1k
views
Why does a protected android:onClick method in Activity actually work?
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 ...
28
votes
2
answers
44k
views
Android repo command and switching branches
I feel I have a pretty good understanding of git, but when it comes to the repo command, I get lost. I've read about the repo command, but I'm still not sure how it ties everything together.
My ...
28
votes
5
answers
20k
views
Building Android from sources: unsupported reloc 43
When I'm compiling Android 5.1.1, I get dozens of errors like this:
...
...
...
libnativehelper/JniInvocation.cpp:165: error: unsupported reloc 43
libnativehelper/JniInvocation.cpp:165: error: ...
28
votes
8
answers
30k
views
Android x86 porting, unable to make it work
I'm kind of new to the whole porting issue and I got to it because of the slowness in the emulator provided with the Android SDK.
I downloaded the android-x86-3.2-RC2-eeepc and android-x86-3.2-RC2-...
28
votes
1
answer
28k
views
What is the use of LOCAL_MODULE_TAGS?
I want to update my Android.mk file in a package in order to build that new package, but I don't understand what the purpose of the LOCAL_MODULE_TAGS is.
What does the LOCAL_MODULE_TAGS do?
28
votes
1
answer
6k
views
Getting Security exception while trying to fetch networkcapabilities on android 11
I am getting SecurityException followed by RemoteException while trying to access below code. API
val networkCapabilities =
connectivityManager.getNetworkCapabilities(connectivityManager....
28
votes
0
answers
611
views
Error inflating class EmojiPalettesView in LatinIME(AOSP)
I checked out Google LatinIME. Then I imported the java folder into Android Studio.
I ran it, set it up (I chose a keyboard in the phone settings, I chose a language layout)
But during testing (by ...
27
votes
6
answers
31k
views
How can I check out Android source code in Windows OS?
I try to search for it but I just cant. I am running Windows 7 on Lenovo G460 laptop. I tried to install Ubuntu on it but I cannot use Wireless to connect to the internet for some reason.
Is there ...
27
votes
1
answer
4k
views
Android source code and repo - What exactly is happening when getting code
I have come across plenty of short questions on minimal aspects of using repo to get Android source or very broad definitions of what repo does and as a result don't really understand what is ...
26
votes
1
answer
18k
views
What do I need to know to port Cyanogenmod to unsupported phones/tablets?
What do I need to know to port Cyanogenmod to currently unsupported android phones and tablets?
Does it involve modifying and building the kernel from source?
Does it involve modifying and building ...
26
votes
1
answer
14k
views
Create specific device tree for AOSP
I followed official Google`s tutorial to build my own AOSP and succeeded in all steps: I have a "Pure AOSP version" running on a nexus emulator. https://source.android.com/source/building.html
The ...
25
votes
6
answers
59k
views
Android source code compile error: "Try increasing heap size with java option '-Xmx<size>'"
Error happens when I try to compile Android source code(Sourcecode-version: 6.0.1; RAM: 6G; host system: ubuntu 14.04),log is below:
including ./system/netd/Android.mk ...
including ./system/security/...
25
votes
2
answers
42k
views
Simulating power button press to display switch off dialog box
I am trying to invoke the switch off dialog box that appears when we press power button. But i want to accomplish this task from an android application or a Junit test case. I will choose the most ...
25
votes
6
answers
17k
views
Foreground service getting killed from Oreo
I have written a foreground service which is working properly for all OS version lower than Oreo. From Oreo application process is getting killed after 5 minutes of closing and removing the ...
24
votes
4
answers
11k
views
android 7.1.2 + ARMv7
I met this problem when I was compiling the Android 7.1.2 source code after I updated my debian. I do not know what is the real problem .
It seems problem from the flex. However, how can i solve it?
...
23
votes
4
answers
43k
views
AOSP repo sync takes too long
I'm trying to learn Embedded Android from the book with the same name. And the author suggested working with AOSP gingerbread branch. So I followed to download the source:
$ repo init -u https://...
22
votes
1
answer
8k
views
Android: Create new System Permission in through AOSP source code.
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 ...
21
votes
0
answers
467
views
View gets cropped above 10.000 pixel width
UPDATE:
Works on Emulator with Android Oreo (8.X). I have the possibility to do changes right to the android sources, so it would also help if someone knews what in the android sources I have to ...
20
votes
2
answers
22k
views
What is the meaning of AOSP's 'lunch' combinations and what do I need to choose?
I am a new comer to Android devices ROM development. Anyway, I am now in the progress of building AOSP to a Chinese device with a 64-bit processor. I am following the menu at source.android.com, and ...
19
votes
2
answers
502
views
Storage & Network device drivers source code for Nexus 6 and Samsung Galaxy S6
For university research purposes, I am searching for a specific part of Nexus 6, and Samsung Galaxy S6 source code. Particularly, I am interested in "network" & "storage" driver source codes. I ...