[android-porting] Re: on android P, how does a vendor bin load a shared library from platform?
Does your platform enabled VNDK ? Go through this link: https://source.android.com/devices/architecture/vndk On Saturday, September 1, 2018 at 4:42:52 PM UTC+2, Perlman Song wrote: > > On android O, my vendor bin ran without any error. But after the migration > to android P, some errors occur even when compiling. > The errors was shown as blow: > "bin_name (native:vendor) should not link to > libandroid_runtime(native:platform)." > So, how should vendor bin file do to load platform libs ? > Is this problem related to hidl? > Is hidl a good choice? > Could anyone help me ? -- -- unsubscribe: android-porting+unsubscr...@googlegroups.com website: http://groups.google.com/group/android-porting --- You received this message because you are subscribed to the Google Groups "android-porting" group. To unsubscribe from this group and stop receiving emails from it, send an email to android-porting+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [android-porting] Services doesn't get created or Started in vendor partition(VNDK)
Thanks, I'll check them out. On Thu, 21 Jun 2018 at 11:47, chinda keodouangsy < chindakeodouan...@gmail.com> wrote: > Well you can, but the device will certainly crash ;-) > You can enforcing VNDK rules as long that API/ABI and VNDK's name space > are respected, there should be OK (well I believe). > > My assumption is that you have issues with *.bp files somewhere or missing > something when declaring VNDK_SP_LIBRARIES section in device directory ;-) > > *** in your source environments > 1. Check if you don't miss any *.bp files, or any "name space" typo issues > in the cc_binary sections? > 2. Check if the "shared_libs" sections are correctly declared in your *.bp > files > (take a look at /system/bt/vendor_lis as example) > *** in /device/ directory > 3. Check if all your vndk-sp libraries are built. (Android.mk) > 4. If you've declared BOARD_VNDK_VERSION then you have to copy the LL_NDK > libraries by your own! > (take a look at /device/google/marlin/vndk/Android.mk) > 5. Check if all your libraries are declared in VNDK_SP_LIBRARIES somewhere > > Hope this help > > Chinda > > Le jeu. 21 juin 2018 à 11:42, chinda keodouangsy < > chindakeodouan...@gmail.com> a écrit : > >> Well you can, but the device will certainly crash ;-) >> You can enforcing VNDK rules as long that API/ABI and VNDK's name space >> are respected, there should be OK (well I believe). >> >> My assumption is that you have issues with *.bp files somewhere or >> missing something when declaring VNDK_SP_LIBRARIES section in device >> directory ;-) >> >> *** in your source environments >> 1. Check if you don't miss any *.bp files, or any "name space" typo >> issues in the cc_binary sections? >> 2. Check if the "shared_libs" sections are correctly declared in your >> *.bp files >> (take a look at /system/bt/vendor_lis as example) >> *** in /device/ directory >> 3. Check if all your vndk-sp libraries are built. (Android.mk) >> 4. If you've declared BOARD_VNDK_VERSION then you have to copy the LL_NDK >> libraries by your own! >> (take a look at /device/google/marlin/vndk/Android.mk) >> 5. Check if all your libraries are declared in VNDK_SP_LIBRARIES >> somewhere >> >> Hope this help >> >> Chinda >> >> Le mer. 20 juin 2018 à 21:02, Renjith Rajagopal < >> renjith.rajagopa...@gmail.com> a écrit : >> >>> Thank you for response. You mean BOARD_VNDK_VERSION=current in >>> BoardCongiguration ?? >>> Yes. I did changes as mentioned in android official site. It did break >>> lot of things.. >>> >>> Can’t I run without enforcing VNDK rules ? >>> >>> >>> On Tue, 19 Jun 2018 at 18:48, chinda keodouangsy < >>> chindakeodouan...@gmail.com> wrote: >>> >>>> Have you add appropriated modification in the right at >>>> /device/ place? >>>> >>>> Le mar. 19 juin 2018 à 17:24, Renjith Rajagopal < >>>> renjith.rajagopa...@gmail.com> a écrit : >>>> >>>>> Hi, >>>>> To enforce VNDK and Project treble ,I was trying to convert one of my >>>>> system service(which was in /system/priv-app) to /vendor/priv-app. >>>>> I use AOSP for building app. >>>>> But unfortunately I couldn't able see the service created or running >>>>> in latter case. >>>>> Highly appreciated for any pointer. >>>>> >>>>> >>>>> BR >>>>> Renjith >>>>> >>>> -- >>>>> -- >>>>> unsubscribe: android-porting+unsubscr...@googlegroups.com >>>>> website: http://groups.google.com/group/android-porting >>>>> >>>>> --- >>>>> You received this message because you are subscribed to the Google >>>>> Groups "android-porting" group. >>>>> To unsubscribe from this group and stop receiving emails from it, send >>>>> an email to android-porting+unsubscr...@googlegroups.com. >>>>> For more options, visit https://groups.google.com/d/optout. >>>>> >>>> -- -- unsubscribe: android-porting+unsubscr...@googlegroups.com website: http://groups.google.com/group/android-porting --- You received this message because you are subscribed to the Google Groups "android-porting" group. To unsubscribe from this group and stop receiving emails from it, send an email to android-porting+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[android-porting] Re: Calling a class in a .jar library from a system level service
Have you tried making it as PlatformLibrary ? https://android.googlesource.com/platform/vendor/sample/+/acd7c6b02a14e8694d0dced56ea37e79707fba1e/frameworks/PlatformLibrary/README.txt On Friday, January 19, 2018 at 9:58:25 PM UTC+1, Drunczyk wrote: > > Hello, > > I have a service added into the framework with the other standard services > (services.jar). I want the service to be able to call some methods in a > .jar library (extender.jar). When the platform builds, everything is fine, > references to the library get resolved correctly, the library gets into > /system/framework, but when the service tries to call a method in the > library, it gets Error: 0xffe0 "Broken pipe" and logcat shows: > > E/AndroidRuntime( 1104): *** FATAL EXCEPTION IN SYSTEM PROCESS: Binder_B > E/AndroidRuntime( 1104): java.lang.NoClassDefFoundError: Failed resolution > of: Lcom/android/server/extender/TestExtender; > E/AndroidRuntime( 1104): at > com.android.server.newservice.NewService.onTransact(NewService.java:79) > E/AndroidRuntime( 1104): at > android.os.Binder.execTransact(Binder.java:446) > E/AndroidRuntime( 1104): Caused by: java.lang.ClassNotFoundException: > Didn't find class "com.android.server.extender.TestExtender" on path: > DexPathList[[zip file "/system/framework/services.jar", zip file > "/system/framework/ethernet-service.jar", zip file > "/system/framework/wifi-service.jar"],nativeLibraryDirectories=[/vendor/lib, > /system/lib]] > E/AndroidRuntime( 1104): at > dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56) > E/AndroidRuntime( 1104): at > java.lang.ClassLoader.loadClass(ClassLoader.java:511) > E/AndroidRuntime( 1104): at > java.lang.ClassLoader.loadClass(ClassLoader.java:469) > E/AndroidRuntime( 1104): ... 2 more > E/AndroidRuntime( 1104): Suppressed: java.lang.ClassNotFoundException: > Didn't find class "com.android.server.extender.TestExtender" on path: > DexPathList[[directory "."],nativeLibraryDirectories=[/vendor/lib, > /system/lib]] > E/AndroidRuntime( 1104): at > dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56) > E/AndroidRuntime( 1104): at > java.lang.ClassLoader.loadClass(ClassLoader.java:511) > E/AndroidRuntime( 1104): at > java.lang.ClassLoader.loadClass(ClassLoader.java:504) > E/AndroidRuntime( 1104): ... 3 more > E/AndroidRuntime( 1104): Suppressed: java.lang.ClassNotFoundException: > com.android.server.extender.TestExtender > E/AndroidRuntime( 1104): at java.lang.Class.classForName(Native Method) > E/AndroidRuntime( 1104): at > java.lang.BootClassLoader.findClass(ClassLoader.java:781) > E/AndroidRuntime( 1104): at > java.lang.BootClassLoader.loadClass(ClassLoader.java:841) > E/AndroidRuntime( 1104): at > java.lang.ClassLoader.loadClass(ClassLoader.java:504) > E/AndroidRuntime( 1104): ... 4 more > E/AndroidRuntime( 1104): Caused by: java.lang.NoClassDefFoundError: > Class not found using the boot class loader; no stack available > > Is there a way to fix it? > > Thanks > > -- -- unsubscribe: android-porting+unsubscr...@googlegroups.com website: http://groups.google.com/group/android-porting --- You received this message because you are subscribed to the Google Groups "android-porting" group. To unsubscribe from this group and stop receiving emails from it, send an email to android-porting+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[android-porting] Services doesn't get created or Started in vendor partition(VNDK)
Hi, To enforce VNDK and Project treble ,I was trying to convert one of my system service(which was in /system/priv-app) to /vendor/priv-app. I use AOSP for building app. But unfortunately I couldn't able see the service created or running in latter case. Highly appreciated for any pointer. BR Renjith -- -- unsubscribe: android-porting+unsubscr...@googlegroups.com website: http://groups.google.com/group/android-porting --- You received this message because you are subscribed to the Google Groups "android-porting" group. To unsubscribe from this group and stop receiving emails from it, send an email to android-porting+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[android-porting] Re: SELinux audit indicates /system/bin/vdc & /system/bin/sh are unlabeled?
Check the init.rc for these binaries and see whether seclabel is defined in it or not On Thursday, February 8, 2018 at 9:23:56 PM UTC+1, Eric Nelson wrote: > > I am porting Android 7.1 to our IMX53 product. I ran into a problem with > SELinux that doesn't seem to make sense. The boot log looks like this: > > . > > . > > . > > [ 3.506650] Freeing unused kernel memory: 1024K > [ 3.528875] init: init first stage started! > [ 3.553382] SELinux: Permission validate_trans in class security not > defined in policy. > [ 3.562534] SELinux: Class cap_userns not defined in policy. > [ 3.568418] SELinux: Class cap2_userns not defined in policy. > [ 3.574269] SELinux: Class bpf not defined in policy.[ 3.579623] SELinux: > the above unknown classes and permissions will be denied > [ 3.701006] audit: type=1403 audit(3.689:2): policy loaded auid=4294967295 > ses=4294967295 > [ 3.712563] audit: type=1404 audit(3.699:3): enforcing=1 old_enforcing=0 > auid=4294967295 ses=4294967295 > [ 3.745760] init: (Initializing SELinux enforcing took 0.21s.) > [ 3.766315] init: init second stage started! > [ 3.792985] init: Running restorecon... > [ 3.880962] init: waitpid failed: No child processes > [ 3.887834] init: (Loading properties from /default.prop took 0.00s.) > [ 3.903302] init: (Parsing /init.environ.rc took 0.00s.) > [ 3.910929] init: (Parsing /init.usb.rc took 0.00s.) > [ 3.918296] init: (Parsing init.rti.usb.rc took 0.00s.) > [ 3.923605] init: (Parsing /init.rti.rc took 0.01s.) > [ 3.931310] init: (Parsing /init.usb.configfs.rc took 0.00s.) > [ 3.937856] init: (Parsing /init.zygote32.rc took 0.00s.) > [ 3.962443] ueventd: ueventd started! > [ 4.942899] ueventd: Coldboot took 0.97s. > [ 5.078709] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data > mode. Opts: (null) > [ 5.139472] EXT4-fs (mmcblk0p3): mounted filesystem with ordered data > mode. Opts: errors=panic > [ 5.182104] EXT4-fs (mmcblk0p4): mounted filesystem with ordered data > mode. Opts: errors=panic > [ 5.493959] audit: type=1400 audit(5.479:4): avc: denied { execute } for > pid=110 comm="init" name="vdc" dev="mmcblk0p2" ino=654340 > scontext=u:r:init:s0 tcontext=u:object_r:unlabeled:s0 tclass=file > permissive=0 > [ 5.593161] binder: 111:111 transaction failed 29189/-22, size 0-0 line > 3004 > [ 5.607788] audit: type=1400 audit(5.599:5): avc: denied { execute } for > pid=112 comm="init" name="sh" dev="mmcblk0p2" ino=654293 > scontext=u:r:init:s0 tcontext=u:object_r:unlabeled:s0 tclass=file > permissive=0 > [ 6.663334] binder: 111:111 transaction failed 29189/-22, size 0-0 line > 3004 > [ 7.670798] binder: 111:111 transaction failed 29189/-22, size 0-0 line > 3004 > [ 8.678255] binder: 111:111 transaction failed 29189/-22, size 0-0 line > 3004 > [ 9.685626] binder: 111:111 transaction failed 29189/-22, size 0-0 line > 3004 > > . > > . > > . > > As you can see "vdc", and "sh" seem to be missing a label for SELinux. > However, I clearly see the label being set in android source under > /system/sepolicy/file_contexts: > > /system/bin/sh -- u:object_r:shell_exec:s0 > > /system/bin/vdc u:object_r:vdc_exec:s0 > > > > Further, if I try to provide my own label for these same files in > /device/rti/kx10/sepolicy/file_contexts, I get a compile errors: > > out/target/product/kx10/obj/ETC/file_contexts.bin_intermediates/file_contexts.concat.tmp: > > Multiple same specifications for /system/bin/sh. > > out/target/product/kx10/obj/ETC/file_contexts.bin_intermediates/file_contexts.concat.tmp: > > Multiple same specifications for /system/bin/vdc. > > > > So if sh & vdc have a label defined, why does the SELinux audit indicate > these files are "unlabeled"??? > > > > Because of this error I cannot get a shell started to allow me to use > other debug tools (ex. logcat). Does anyone have any ideas, thoughts, or > suggestions that might help me proceed?? > > > > Thanks in advance, > -- -- unsubscribe: android-porting+unsubscr...@googlegroups.com website: http://groups.google.com/group/android-porting --- You received this message because you are subscribed to the Google Groups "android-porting" group. To unsubscribe from this group and stop receiving emails from it, send an email to android-porting+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[android-porting] Re: Is it possible to remove GPS support from build?
It is possible to disable location in framework. Override like following in your device.mk PRODUCT_PROPERTY_OVERRIDES += \ config.disable_location=1 Reference: https://android.googlesource.com/platform/frameworks/base/+/refs/heads/master/services/java/com/android/server/SystemServer.java On Thursday, April 19, 2018 at 10:03:02 PM UTC+2, Husnain Ahmed wrote: > > I want to remove gps services from my nokia 2 android 7.1. Is it possible > to disable gps feature permanently? If it does what steps I need to take > from basic to advance? Options can be cutom os, etc etc but i need step by > step guide > This will be a huge favor to me. > -- -- unsubscribe: android-porting+unsubscr...@googlegroups.com website: http://groups.google.com/group/android-porting --- You received this message because you are subscribed to the Google Groups "android-porting" group. To unsubscribe from this group and stop receiving emails from it, send an email to android-porting+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[android-porting] Re: Permission issue on sysfs access from android application ( .java source code )
You need .te file for your module even though it is permissive mode. Also try move app to /system/priv-app/ which will remove untrusted_app erro On Monday, April 3, 2017 at 6:00:05 PM UTC+2, himanshu wrote: > > Android application in java having permission issues when accessing sysfs > entry. > > try{ > FileOutputStream fos = new > FileOutputStream("/sys/class/shift_reg/shift_reg/value"); > byte mybyte = 1; > fos.write(mybyte); > fos.close();} catch ( Exception e) { > Log.d(TAG, "Failed in writing to Shift Register"); <--- I am always > getting this exception.} > > > 1) Have tried putting 'setenforce 0'. Does't work. Even though enforce > level is permissive. > > 2) Do I have to access using JNI way: ( android-app -> jni -> driver ) > > 3) I have set file permission as 0777 for the sysfs node file. > > > Dmesg Error message: > > [ 417.176302] type=1400 audit(418.589:63): avc: denied { write } for > pid=3164 comm="com.android.cam" name="value" dev="sysfs" ino=9749 > scontext=u:r:untrusted_app:s0 tcontext=u:object_r:sysfs:s0 tclass=file > permissive=1 > > ps -Z > > u:r:untrusted_app:s0 u0_a67 4360 333 > com.android.cam > > -- -- unsubscribe: android-porting+unsubscr...@googlegroups.com website: http://groups.google.com/group/android-porting --- You received this message because you are subscribed to the Google Groups "android-porting" group. To unsubscribe from this group and stop receiving emails from it, send an email to android-porting+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[android-porting] Re: Running car-emulator (Android Automotive)
https://android-review.googlesource.com/c/platform/external/adt-infra/+/502579/ Google is working on it to release Car emulator officially. I could build and run Emulator in x86 version,but not with lunch car_emu_x86_64-userdebug instead aosp_x86_64 configuration. But still need few hacks to make it up and running. On Friday, September 22, 2017 at 6:17:43 PM UTC+2, Kiran Rao wrote: > > I'm trying to build Android Automotive from source. I'm able to > successfully build it using the following commands: > > repo init -u https://android.googlesource.com/platform/manifest -b > android-8.0.0_r11 > source build/envsetup.sh > lunch car_emu_x86_64-userdebug > make -j8 V=1 &>> make.log > > My question is how do I run the emulator? After googling and going through > some stackoverflow posts, I came across this: > > First, I set an env variable in the command-line (The emulator uses this > to determine which emulator to launch) > > export ANDROID_PRODUCT_OUT=/path/to/build_root > > Next, I created a file car-emulator.sh and put this in it > #!/usr/bin/env bash > > ANDROID_BUILD_OUT=/path/to/build_root/out > PREBUILT=/path/to/build_root/prebuilts > EMULATOR_OUT=${ANDROID_BUILD_OUT}/target/product/car-x86_64 > > ${PREBUILT}/android-emulator/linux-x86_64/emulator \ > -sysdir ${EMULATOR_OUT} \ > -system ${EMULATOR_OUT}/system.img \ > -ramdisk ${EMULATOR_OUT}/ramdisk.img \ > -data ${EMULATOR_OUT}/userdata.img \ > -kernel ${PREBUILT}/qemu-kernel/x86_64/kernel-qemu \ > -scale 0.7 \ > -memory 512 \ > -partition-size 1024 > > I also tried to download the relevant (darwin-x86_64) files from the build > machine to my Mac laptop and tried running there. The emulator starts but > crashes immediately. > > Also, I see that the CarService.apk has been generated. Is it sufficient > to install this APK on a device for it to work? Does it depend on anything > else? > -- -- unsubscribe: android-porting+unsubscr...@googlegroups.com website: http://groups.google.com/group/android-porting --- You received this message because you are subscribed to the Google Groups "android-porting" group. To unsubscribe from this group and stop receiving emails from it, send an email to android-porting+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[android-porting] Re: Help me with sepolicy
Please carefully go through the policy definitions/rules made for the fingerprint. What I understand is your service/daemon is trying to access device mmcblk0p24 which you need to provide policy rules. Interpret your denial message using audit2allow tool that ships with AOSP. https://source.android.com/security/selinux/validate On Monday, June 26, 2017 at 5:26:07 PM UTC+2, Pig wrote: > > Hi, I'm building AOSP for my Xiaomi device. My fingerprint policy are > denied and I'm trying to make it work > > [ 35.665744] type=1400 audit(1498189086.388:22): avc: denied { > execute_no_trans } for pid=3018 comm="init" path="/system/bin/gx_fpd" > dev="mmcblk0p24" ino=271 scontext=u:r:init:s0 > tcontext=u:object_r:system_file:s0 tclass=file permissive=0 > > > I was use > > allow init system_file:file execute_no_trans; > > for this but I got this when trying to build > > libsepol.report_failure: neverallow on line 294 of external/sepolicy/init.te > (or line 7687 of policy.conf) violated by allow init system_file:file { > execute_no_trans }; > libsepol.check_assertions: 1 neverallow failures occurred > > -- -- unsubscribe: android-porting+unsubscr...@googlegroups.com website: http://groups.google.com/group/android-porting --- You received this message because you are subscribed to the Google Groups "android-porting" group. To unsubscribe from this group and stop receiving emails from it, send an email to android-porting+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[android-porting] Making Custom SDK and Integrating Car API/Vehicle Services -Android N(7.1.1)
Hi, I'm a newbie to Android AOSP. I was trying to utilize the Car API/Services/HAL provided by Google from Android N version onwards(https://source.android.com/devices/automotive/). My aim is to develop App that uses this Car API.Android N Standard SDK that was downloaded as a part of Android Studio doesn't include those APIs mentioned in link. I verified it by try importing packages(import android.car )..But Car package was not listing at all.I tried building a custom SDK Steps I followed : 1. Downloaded Google AOSP-Android N from git. 2. Verify the existence of those Car services/API are located in /home/symbio/myandroid/packages/services/Car 3. Builded SDK with commands in order : 1 . build/envsetup.sh 2. lunch sdk-eng 3.mm/mma /packages/services/Car 4.make sdk But even I couldn't find or do importing those Car services in newly builded SDK. I'm kind of stuck.Which all makefile Shall I need to change so as to reflect the same ? Any lead will be highly appreciated. Thanks in Advance!!! -- -- unsubscribe: android-porting+unsubscr...@googlegroups.com website: http://groups.google.com/group/android-porting --- You received this message because you are subscribed to the Google Groups "android-porting" group. To unsubscribe from this group and stop receiving emails from it, send an email to android-porting+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[android-porting] Re: Information regarding Android Auto and Android Automotive
Hey Oscar, Have you got any additional information regarding Automotive. I was trying to integrate those feature .But couldnt able to find proper documentation. Regards, RR On Friday, May 19, 2017 at 5:03:57 PM UTC+2, Oscar Dávila wrote: > > Hello, > > I would like to get so information regarding Android Auto and Android > Automotive, as today, I've only found information about how to develop > applications for android auto ( > https://developer.android.com/auto/index.html), however, I have not found > information regarding how to add android auto support to an embedded > system, let's say, add android auto in my embedded platform so I can > connect my phone to it. > > Also I would want to know more about Android Automotive ( > https://source.android.com/devices/automotive) I understand that this is > totally different to Android Auto, as this is the full android OS but with > and automotive porting, is more information about this available out there? > > Regards! > -- -- unsubscribe: android-porting+unsubscr...@googlegroups.com website: http://groups.google.com/group/android-porting --- You received this message because you are subscribed to the Google Groups "android-porting" group. To unsubscribe from this group and stop receiving emails from it, send an email to android-porting+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.