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
Filter by
Sorted by
Tagged with
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?
Pablo Fernandez's user avatar
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 ...
Abhishek Dwivedi's user avatar
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 ...
midnite's user avatar
  • 5,216
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 ...
fadedbee's user avatar
  • 43.7k
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 ...
Thomas Hofmann's user avatar
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.
user1253435's user avatar
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 ...
Andrew T.'s user avatar
  • 4,606
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 ...
SirKnigget's user avatar
  • 3,634
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 ...
Sagar's user avatar
  • 2,335
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, ...
Zyris Development Team's user avatar
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/...
Travis's user avatar
  • 2,180
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 ...
Bjarke Freund-Hansen's user avatar
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 ...
CodeGuru's user avatar
  • 736
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 ...
Tomcat's user avatar
  • 1,405
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://...
krupal.agile's user avatar
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 ...
Mita_'s user avatar
  • 763
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 ...
David Prun's user avatar
  • 8,353
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.
teoREtik's user avatar
  • 7,896
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, ...
Poly Bug's user avatar
  • 1,542
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 ...
Foad Rezek's user avatar
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 /...
Deepak Singh's user avatar
  • 1,129
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 ...
Max's user avatar
  • 3,904
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 ...
Veaceslav Gaidarji's user avatar
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 ...
powder366's user avatar
  • 4,401
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 ...
Daniel Benedykt's user avatar
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 ...
dead programmer's user avatar
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 ...
user3837683's user avatar
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 ...
Manishika's user avatar
  • 5,516
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 ...
GNK's user avatar
  • 1,058
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 ...
Vasiliy's user avatar
  • 16.3k
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 ...
tynn's user avatar
  • 39.4k
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 ...
woodsdog's user avatar
  • 283
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: ...
Christian Rädel's user avatar
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-...
Mr G's user avatar
  • 297
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?
Bhaumik Shukla's user avatar
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....
Sudhansu's user avatar
  • 840
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 ...
No Name's user avatar
  • 761
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 ...
RobGThai's user avatar
  • 5,969
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 ...
btalb's user avatar
  • 6,987
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 ...
James T's user avatar
  • 1,079
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 ...
michael's user avatar
  • 3,905
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/...
Eddy.Liu's user avatar
  • 253
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 ...
Ashwani Kumar's user avatar
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 ...
Sagar Trehan's user avatar
  • 2,421
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? ...
Peng's user avatar
  • 241
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://...
user3011609's user avatar
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 ...
user2074216's user avatar
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 ...
Daniel Z.'s user avatar
  • 3,158
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 ...
stack overflow's user avatar
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 ...
Behnam's user avatar
  • 6,570

1
2 3 4 5
64