android-source

How are the default AOSP launcher shortcuts installed in a ROM build?

自闭症网瘾萝莉.ら 提交于 2020-01-05 05:31:45
问题 I'm building my own version of AOSP (using code from the Code Aurora repos for a custom device) and trying to determine how shortcuts to certain apps are being added automatically to the launcher's db (Launcher3 on Marshmallow to be more specific). I want to change these around and remove/reposition some of them. (In this particular instance the apps in question are those from the GMS suite.) I understand that apps can try to get their shortcuts onto the launcher's workspace by sending a

How are the default AOSP launcher shortcuts installed in a ROM build?

痞子三分冷 提交于 2020-01-05 05:31:31
问题 I'm building my own version of AOSP (using code from the Code Aurora repos for a custom device) and trying to determine how shortcuts to certain apps are being added automatically to the launcher's db (Launcher3 on Marshmallow to be more specific). I want to change these around and remove/reposition some of them. (In this particular instance the apps in question are those from the GMS suite.) I understand that apps can try to get their shortcuts onto the launcher's workspace by sending a

Unknown package name of class file

北战南征 提交于 2020-01-04 05:37:08
问题 I have two libraries that I want to add to AOSP: Azure Storage & Jackson Core When Azure Storage depends on Jackson. Following this instructions, I've added both of them under [MAIN_FOLDER]/external and with the following Android.mk files: For Jackson - LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE := jackson LOCAL_MODULE_TAGS := eng debug optional LOCAL_SDK_VERSION := current LOCAL_SRC_FILES := $(call all-java-files-under, src/main) include $(BUILD_JAVA_LIBRARY) and for

Updating WebView on AOSP Android 6.0

让人想犯罪 __ 提交于 2020-01-03 17:23:48
问题 I am working on a device based on AOSP Android 6.0 (Marshmallow). I wanted to update standard Android webview to the latest version for using the latest JavaScript. For this I replaced external/chromium-webview/prebuilt/arm64/webview.apk with the latest version. Also in the frameworks/base/core/res/res/values/config.xml I changed the value of config_webViewPackageName from com.android.webview to com.google.android.webview . But when I tried to launch some application that using webview (for

user data directory in Android 4.3

Deadly 提交于 2020-01-03 08:48:08
问题 User data in android 4.2 onwards is stored at /data/user/<userId> But still I found /data/data directory in android 4.3 filesystem. I think it is there to store application data that is common for all users and /data/user/<userId> is used for storing user specific application data. Is this true? 回答1: No. /data/data always belongs to the primary user. You can see this by listing /data/user directory: /data/user/0 is a soft-link to /data/data and the permissions are set so that only this "user

Download Android code for Contacts application

北战南征 提交于 2020-01-02 10:02:14
问题 I am trying to download Android source code for Contact,Dialer and CallLog applications from the git repository. I have tried the following on my mac(running SnowLeopard): 1. Create a bin dir and a android dir for putting all the downloaded files 2. Added both of the directories to the PATH environment variable 3. run the following commands to get the repo script and make it executable: $ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo $ chmod a+x ~/bin/repo 4. cd

Receive broadcasts in stopped application

可紊 提交于 2020-01-02 08:22:51
问题 By default, an application which in stopped state (not yet run even once) could not receive broadcasts . There is a way to receive it if we add the flag FLAG_INCLUDE_STOPPED_PACKAGES to the broadcast intent. My problem is that I need to receive system intent android.intent.action.MEDIA_MOUNTED (and I don't want to add that flag to it). How can I receive it even in stopped application? It seems to me that for sure it's possible because for example com.android.shell application is able to

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

点点圈 提交于 2020-01-02 07:02:33
问题 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

iptables forwarding through pptp

泪湿孤枕 提交于 2020-01-01 19:55:52
问题 I am creating my own AOSP that contains my own apps and services. One of those services creates ppp0 interface and tries to link specific apps to be forwarded through that interface. I have tried these commands but it was not working as expected. iptables -t mangle -A OUTPUT -m owner --uid-owner 10088 -j MARK --set-mark 100 ip route add via 10.0.0.201 dev ppp0 table 100 ip rule add from all fwmark 100 table 100 iptables -t nat -A POSTROUTING -m owner --uid-owner 10088 -j SNAT --to-source 10.0

What is in android.util.Log#println_native()?

江枫思渺然 提交于 2020-01-01 19:33:15
问题 Here is the android.util.Log source code. At the very bottom (line 340), what is in the method: public static native int println_native(int bufID, int priority, String tag, String msg); i guess println_native() is more or less like its println() , just with an int bufID different. But even i got the codes of println_native() , i still lack com.android.internal.os.RuntimeInit (line 19, the import ) to simulate android.util.Log in old Android version. 回答1: Just did some digging in the android