android-source

Android native - How does native code written in jni run with root permission?

一个人想着一个人 提交于 2021-02-02 09:11:44
问题 I have an Android application that call a native shared library by jni. This shared library invokes some loadable kernel modules .ko My app run fail when jni calls the function in shared library that invokes kernel module. But when I write an executable using this shared library, it works fine when call above function. I found that my app run with user name is "u0_axx" and my executable run by command line with root. So maybe it doesn't have permission to invokes kernel module. My question is

Android native - How does native code written in jni run with root permission?

牧云@^-^@ 提交于 2021-02-02 09:11:28
问题 I have an Android application that call a native shared library by jni. This shared library invokes some loadable kernel modules .ko My app run fail when jni calls the function in shared library that invokes kernel module. But when I write an executable using this shared library, it works fine when call above function. I found that my app run with user name is "u0_axx" and my executable run by command line with root. So maybe it doesn't have permission to invokes kernel module. My question is

Android native - How does native code written in jni run with root permission?

ぐ巨炮叔叔 提交于 2021-02-02 09:10:00
问题 I have an Android application that call a native shared library by jni. This shared library invokes some loadable kernel modules .ko My app run fail when jni calls the function in shared library that invokes kernel module. But when I write an executable using this shared library, it works fine when call above function. I found that my app run with user name is "u0_axx" and my executable run by command line with root. So maybe it doesn't have permission to invokes kernel module. My question is

#### failed to build some targets (1 seconds) ####

最后都变了- 提交于 2021-01-29 08:05:27
问题 I am building unofficial AOSP rom for my device(OnePlus One) I followed the steps in to initialise I have used the following commands source build/envsetup.sh lunch aosp_arm64-eng make -j4 output: ============================================ PLATFORM_VERSION_CODENAME=REL PLATFORM_VERSION=10 TARGET_PRODUCT=aosp_arm64 TARGET_BUILD_VARIANT=eng TARGET_BUILD_TYPE=release TARGET_ARCH=arm64 TARGET_ARCH_VARIANT=armv8-a TARGET_CPU_VARIANT=generic TARGET_2ND_ARCH=arm TARGET_2ND_ARCH_VARIANT=armv8-a

Using NDK header when building vendor module with VNDK enabled

允我心安 提交于 2021-01-28 05:34:49
问题 I have a native vendor module built with AOSP (android 9.0.0_r35). This module uses android/input.h header. Note that this header is included in the android NDK. When enabling the VNDK, building module fails with fatal error: 'android/input.h' file not found error. This is caused by android build system (see compiler.go) who does not export the CommonGlobalIncludes when VNDK is enabled so frameworks/native/include (containing input.h) is not in include list. I tried adding libandroid to LOCAL

error: failed parsing overlays when build AOSP source

强颜欢笑 提交于 2021-01-27 12:50:55
问题 Today I has downloaded AOSP and I am trying build newest android version with lunch option is aosp_car_x86-userdebug But after about 50 minutes, I got the message log as below... warn: removing resource com.android.bluetooth:string/map_acceptance_timeout_message without required default value. warn: removing resource com.android.bluetooth:string/map_auth_notif_message without required default value. warn: removing resource com.android.bluetooth:string/map_auth_notif_ticker without required

android 11 open source project for emulator problem before custom rom

那年仲夏 提交于 2020-12-13 03:23:24
问题 I try to build android open source project, I am at the beginning of it. Initially, I have successfully built android-11.0.0_r17 source code. I have obtained the out files (system.img, ramdisk.img and userdata.img). When I tried to execute following emulator command, it has been failed. I mean, the system has run in a loop and in every cycle the following message has been appeared. $ emulator -avd a25x86 -verbose -show-kernel -system /home/ubuntu/aosp/out/target/product/generic_x86/system.img

How to Add Pre-built App (System App) in AOSP source code

谁说我不能喝 提交于 2020-12-04 05:28:28
问题 I was trying to add an APK in AOSP version 10 as system application. I have followed the procedure mentioned in almost different links which is here Add apk in AOSP but nothing worked. The process mentioned in this link and the steps I followed are: Put my Apk in Aosp_root/packages/apps/my-app-folder/my-app.apk Write Android.mk of my-app.apk in /my-app-folder Code of Android.mk LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE_TAGS := optional LOCAL_MODULE := Signal LOCAL

How to Add Pre-built App (System App) in AOSP source code

孤者浪人 提交于 2020-12-04 05:25:34
问题 I was trying to add an APK in AOSP version 10 as system application. I have followed the procedure mentioned in almost different links which is here Add apk in AOSP but nothing worked. The process mentioned in this link and the steps I followed are: Put my Apk in Aosp_root/packages/apps/my-app-folder/my-app.apk Write Android.mk of my-app.apk in /my-app-folder Code of Android.mk LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE_TAGS := optional LOCAL_MODULE := Signal LOCAL

Anyway to control Soong when to pick Android.bp and when not?

*爱你&永不变心* 提交于 2020-12-02 10:39:33
问题 With new build system i.e. "Soong" , Android replaced Android.mk with Android.bp . Also Android Q onward, Soong will pick all Android.bp files no matter where all are present. Earlier, For 2 level and 3 level modules, it was not picking up Android.bp file unless instructed by "optional_dirs" . Now this too has been deprecated. Quoting from android source code's platform/build/soong/root.bp: // Soong finds all Android.bp and Blueprints files in the source tree, // subdirs= and optional_subdirs