Re: [android-porting] Re: How to add support for USB WIFI for the RTL8192CU/EU module?

2020-01-21 Thread Tranphong Vu
There is existing rule in sepolicy that prohibit you to do it. Your new
rule conflict with the old rule. You need to change the old rule or find
another rule for this.

Vào 23:00, T.3, 21 Th1, 2020 Dave McLaughlin 
đã viết:

> I finally have something close to working. I managed to build Android 7.0
>> with an RTL8188CUS module and this gets detected and I can see my wifi
>> network in the search.
>>
>
> The issue that remains is the SEPOLICY and I get an audit denied as
> follows:
>
> [  128.99] init: Starting service 'p2p_supplicant'...
> [  151.40] type=1400 audit(1579495192.328:5): avc: denied { read } for
> pid=1375 comm="wpa_supplicant" name="rfkill" dev="tmpfs" ino=9258
> scontext=u:r:wpa:s0 tcontext=u:object_r:device:s0 tclass=chr_file
> permissive=0
>
> I ran audti2allow which generated the following, which I placed in wpa.te
> but the build complains with the error below.
>
> allow wpa device:chr_file {read open };
>
> The following error appears in the build output.
>
> FAILED: /bin/bash -c "(out/host/linux-x86/bin/checkpolicy -M -c 30 -o
> out/target/product/nanopi3/obj/ETC/sepolicy_intermediates/sepolicy.tmp
> out/target/product/nanopi3/obj/ETC/sepolicy_intermediates/policy.conf ) &&
> (out/host/linux-x86/bin/checkpolicy -M -c 30 -o
> out/target/product/nanopi3/obj/ETC/sepolicy_intermediates//sepolicy.dontaudit
> out/target/product/nanopi3/obj/ETC/sepolicy_intermediates/policy.conf.dontaudit
> ) && (out/host/linux-x86/bin/sepolicy-analyze
> out/target/product/nanopi3/obj/ETC/sepolicy_intermediates/sepolicy.tmp
> permissive >
> out/target/product/nanopi3/obj/ETC/sepolicy_intermediates/sepolicy.permissivedomains
> ) && (if [ \"userdebug\" = \"user\" -a -s
> out/target/product/nanopi3/obj/ETC/sepolicy_intermediates/sepolicy.permissivedomains
> ]; then echo \"==\" 1>&2; echo \"ERROR: permissive domains not
> allowed in user builds\" 1>&2; echo \"List of invalid domains:\" 1>&2; cat
> out/target/product/nanopi3/obj/ETC/sepolicy_intermediates/sepolicy.permissivedomains
> 1>&2; exit 1; fi ) && (mv
> out/target/product/nanopi3/obj/ETC/sepolicy_intermediates/sepolicy.tmp
> out/target/product/nanopi3/obj/ETC/sepolicy_intermediates/sepolicy )"
> libsepol.report_failure: neverallow on line 263 of
> system/sepolicy/domain.te (or line 9058 of policy.conf) violated by allow
> wpa device:chr_file { read open };
>
> Any idea why this doesn't work?
>
> --
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/android-porting/a5f608d1-8bdd-4a85-a469-ccddd0c0460e%40googlegroups.com
> 
> .
>

-- 
-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-porting/CADfFnWhOm2ytwUs8F_ZcKhB5XD3Kqgs3CD1Da8zKhZq1XazKvg%40mail.gmail.com.


Re: [android-porting] How to add support for USB WIFI for the RTL8192CU/EU module?

2020-01-08 Thread Tranphong Vu
Hi Dave McLaughlin,
First i think you need to check device driver for wifi usb in your kernel.
It seems it is not work.
st1. you can check it with below command :
$ ifconfig -a
$ifconfig up $yourinterface
If this shows your wifi interface and you can up/down your wifi network
interfacem you can continue to the step 2 :

st2. Android uses wpa supplicant tool to control wifi operation ( connects
to a wifi network, scan ...)
so you don't need to enable Android wifi HAL to check this feature.
instead of this, you can use some tools in wpa supplicant package to check
the operation of your device driver.
If it works fine go to step 3:

st3.
Enable Wifi HAL, WPA supplicant. Usually this part not different so much
between devices.
But it have some modifications to support some specify feature or fixing
some specific issue on a device.
About this part, you should need support from Vendor or you can debug it
step by step.

Thanks,
Vu Tran


Vào Th 3, 7 thg 1, 2020 vào lúc 01:41 Dave McLaughlin <
davemclaughli...@gmail.com> đã viết:

> The source I have is built for the Samsung S5P6818 and on one board there
> is an AP6212 connected via an emmc SDIO connection. This provides Wifi via
> SDIO and BT view UART.
>
> The board I am working with has no built-in WiFi and I have tried a number
> of modules using the RTL8192CU, RTL8188EU, BCM43438 but none of them get
> detected as a wifi device. Dmesg shows they are detected as a USB device.
>
> I have tried to add the RTL8192CU as this is included in the Linux 3.4
> kernel and I have built this as a module and included this in the build.
> This is copied to the /system/lib/modules/ directory.
>
> I have found a number of references to doing this with the RTL8192CU and
> included the following in my BoardConfig.mk
>
> # wifi
> BOARD_WIFI_VENDOR := realtek
>
> ifeq ($(BOARD_WIFI_VENDOR),realtek)
> WPA_SUPPLICANT_VERSION  := VER_0_8_X
> BOARD_WLAN_DEVICE   := rtl
> BOARD_WPA_SUPPLICANT_DRIVER := NL80211
> BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE)
> BOARD_HOSTAPD_DRIVER:= NL80211
> BOARD_HOSTAPD_PRIVATE_LIB   := lib_driver_cmd_$(BOARD_WLAN_DEVICE)
> WIFI_DRIVER_MODULE_NAME := "rtl8192cu"
> WIFI_DRIVER_MODULE_PATH := "/system/lib/modules/rtl8192cu.ko"
> endif
>
> I have been unable to find lib_driver_cmd_rtl so I created this as a copy
> from the bcmdhd directory that was present in the source for the original
> BCM43438 AP6212 driver. This might be why it fails but I see no references
> to interface type in that code. ???
>
> Realtek references the wpa_supplicant source but I can't locate this
> online.
>
> When the board boots, dmesg shows the USB device was detected but I see
> the following in the debug output when I try to enable the WiFi in settings.
>
> [ 9393.896000] dw_mmc dw_mmc.1: Hardware locked write error
> [ 9393.912000] dw_mmc dw_mmc.1: Hardware locked write error
> [ 9394.932000] dw_mmc dw_mmc.1: Data0: Never released by cmd52
> [ 9395.936000] dw_mmc dw_mmc.1: Data0: Never released by cmd52
> [ 9395.936000] dw_mmc dw_mmc.1: Hardware locked write error
> [ 9396.94] dw_mmc dw_mmc.1: Data0: Never released by cmd0
> [ 9396.94] dw_mmc dw_mmc.1: Hardware locked write error
> [ 9397.948000] dw_mmc dw_mmc.1: Data0: Never released by cmd8
> [ 9398.952000] dw_mmc dw_mmc.1: Data0: Never released by cmd5
>
> This I think is the issue but I am unable to figure out where the
> reference to the mmc port is in the source code. My modules is on USB, not
> mmc.
>
> I have tried to get Android 5.1 drivers from Realtek but have so far
> failed to get any response from them.
>
> --
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/android-porting/fd57c6e1-8b84-411c-bf0d-ffb6560e6746%40googlegroups.com
> 
> .
>

-- 
-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-porting/CADfFnWimMHvi42nzPeHZKX3%2B34Pm0eFC21fxOPjMpGGYboGYUA%40mail.gmail.com.


Re: [android-porting] Accelerometer Porting

2019-12-03 Thread Tranphong Vu
Hi Gianmaria,
You need a HAL sensor implement to let Android system know that there is
sensor in kernel.
You can refer to this HAL sensor implement
http://androidxref.com/9.0.0_r3/xref/hardware/invensense/65xx/

Thanks,
Vu Tran

Vào Th 2, 2 thg 12, 2019 vào lúc 21:54 Gianmaria Iaculo <
gianmari...@nventa.it> đã viết:

> Good morning,
> I need a little help with accelerometer porting, I'm new to this task and
> right now I'm a little bit confused. I've read the documentation on Google
> Sensors Stack here:
> https://source.android.com/devices/sensors/sensor-stack
> but I'm not able to go ahead.
>
> Actually I've my accelerometer (Freescale MMA8451) connected to I2C and
> correctly working, my kernel drivers are loaded and i can see
> under /sys/class/input/input2  enable, name and so on. I can set enable = 1
> with cat and I can read values with getevent.
>
> Now the hard part.. I have to add this to the HAL, cause android continues
> to say "no accelerometer connected". It's not clear to me what are the
> following steps.
>
> 1) What to add in sensors.h
> 2)Do I need a sensor.cpp ? Or kernel drivers are enough?
> 3) What else?
>
>
> Any help or hint will be appreciated.
>
> Gianmaria
>
> --
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/android-porting/4751ca88-e0dd-4a88-8902-c6abdc3cce0b%40googlegroups.com
> 
> .
>

-- 
-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-porting/CADfFnWh%3DSAa8%2BbpJWdHk-QyO42mXVQqgF4M5cHi2uQeArF%3DeMg%40mail.gmail.com.


Re: [android-porting] USB remote wakeup : Wake up system from suspend via a USB HID device (e.g.wireless keyboard)

2019-07-17 Thread Tranphong Vu
Hi Dehqanpour,
About 1,
I dont sure that interrupt number is increased when it happens while device
in suspend state. But i think system should record this.
About 2,
Normally android would not be wake up from bluetooth mouse. At you see in
my code example, this code is need to wake up device from usb keyboard. So
if you want to wake up device from usb wireless mouse you need to aplly
this code to your wireless mouse device.

Now i think you should confirm 1 with usb mouse. Normally usb mouse would
wake up device because original hid usb drive apply my example code for usb
mouse hid class. You can disable this feature by remove the above code for
usb mouse hid.
Then check the irq is increased or not in suspend state. If it is same with
your usb mouse you can apply code for your wireless mouse. If not i think
you need to find a method to let usb wireless mouse generate irq in suspend
state like dont power off usb wireless when device enter suspend state ...

Regards,
Vu tran

On Wed, 17 Jul 2019, 01:53 Dehqanpour,  wrote:

> Hi Tranphong Vu!
>
> Thank you for your response.
>
> 1. I tested the "/proc/interrupts" and pasted a sample of it here:
> https://paste.ubuntu.com/p/kf4TqxzBYN/
>
> In my experiment, I found that the keyboard (which is a standard
> wireless keyboard) is associated with "xhci-hcd:usb1" IRQ and the
> counter increases by two for each key press. (one IRQ for key down and
> one for key up which seems reasonable)
>
> BUT the IRQ number , remains the same after suspend (i.e. 62). What is
> the problem? Is it my mistake to identify correct IRQ entry?
>
>
>
> 2. The code snippet you posted was already in my AOSP tree too. I
> examined that HID driver which is a well-known generic driver and I
> guess the problem is not from there. (maybe I am wrong)
>
>
> P.S. I also posted my problem in more details at stackoverflow at here:
> https://stackoverflow.com/q/56914772/
> I wish if you could take a look at it.
>
> Thanks
> Saleh
>
>
> On 7/16/19, Tranphong Vu  wrote:
> > Sorry i miss the example code for this,
> > This is example code in my AOSP linux kernel to enable this feature for a
> > usb keyboard.
> > that uses USB HID driver.
> >
> >   *if* (interface
> > <http://test.zien.vn:8082/source/s?defs=interface&project=MX50_N>->desc
> > <http://test.zien.vn:8082/source/s?defs=desc&project=MX50_N
> >.bInterfaceSubClass
> > <
> http://test.zien.vn:8082/source/s?defs=bInterfaceSubClass&project=MX50_N>
> > == USB_INTERFACE_SUBCLASS_BOOT
> > <
> http://test.zien.vn:8082/source/s?defs=USB_INTERFACE_SUBCLASS_BOOT&project=MX50_N
> >
> > &&
> >   interface
> > <http://test.zien.vn:8082/source/s?defs=interface&project=MX50_N>->desc
> > <http://test.zien.vn:8082/source/s?defs=desc&project=MX50_N
> >.bInterfaceProtocol
> > <
> http://test.zien.vn:8082/source/s?defs=bInterfaceProtocol&project=MX50_N>
> > ==
> >   USB_INTERFACE_PROTOCOL_KEYBOARD
> > <
> http://test.zien.vn:8082/source/s?defs=USB_INTERFACE_PROTOCOL_KEYBOARD&project=MX50_N
> >)
> > {
> >   usbhid_set_leds
> > <
> http://test.zien.vn:8082/source/xref/MX50_N/kernel/cht/drivers/hid/usbhid/hid-core.c#usbhid_set_leds
> >(hid
> > <http://test.zien.vn:8082/source/s?defs=hid&project=MX50_N>);
> >   device_set_wakeup_enable
> > <
> http://test.zien.vn:8082/source/s?defs=device_set_wakeup_enable&project=MX50_N
> >(&dev
> > <http://test.zien.vn:8082/source/s?defs=dev&project=MX50_N>->dev
> > <http://test.zien.vn:8082/source/s?defs=dev&project=MX50_N>, 1);
> >   }
> >
> >
> > Regards,
> >
> > Vu Tran
> >
> >
> >
> > Vào Th 3, 16 thg 7, 2019 vào lúc 23:19 Tranphong Vu <
> > tranphongvu070...@gmail.com> đã viết:
> >
> >> Hi Mohammad Saleh Dehghanpour,
> >>
> >> base on your description, i think you need to enable wake up feature in
> >> your usb wireless keyboard.
> >> 1. Base on my hardware experience, your usb hardware should support
> this.
> >> But we should confirm this
> >> Cat proc/interrupt to get the irq number of your usb wireless device.
> >> Let device enter suspend state
> >> do some thing with your wireless hardware
> >> wake up device. check the number of irq happens for your wirelese
> device.
> >> If they are different it means your hardware support this go to step 2.
> >> if
> >> not your hardware does not,
&g

Re: [android-porting] USB remote wakeup : Wake up system from suspend via a USB HID device (e.g.wireless keyboard)

2019-07-16 Thread Tranphong Vu
Sorry i miss the example code for this,
This is example code in my AOSP linux kernel to enable this feature for a
usb keyboard.
that uses USB HID driver.

*if* (interface
<http://test.zien.vn:8082/source/s?defs=interface&project=MX50_N>->desc
<http://test.zien.vn:8082/source/s?defs=desc&project=MX50_N>.bInterfaceSubClass
<http://test.zien.vn:8082/source/s?defs=bInterfaceSubClass&project=MX50_N>
== USB_INTERFACE_SUBCLASS_BOOT
<http://test.zien.vn:8082/source/s?defs=USB_INTERFACE_SUBCLASS_BOOT&project=MX50_N>
&&
interface 
<http://test.zien.vn:8082/source/s?defs=interface&project=MX50_N>->desc
<http://test.zien.vn:8082/source/s?defs=desc&project=MX50_N>.bInterfaceProtocol
<http://test.zien.vn:8082/source/s?defs=bInterfaceProtocol&project=MX50_N>
==
USB_INTERFACE_PROTOCOL_KEYBOARD
<http://test.zien.vn:8082/source/s?defs=USB_INTERFACE_PROTOCOL_KEYBOARD&project=MX50_N>)
{
usbhid_set_leds
<http://test.zien.vn:8082/source/xref/MX50_N/kernel/cht/drivers/hid/usbhid/hid-core.c#usbhid_set_leds>(hid
<http://test.zien.vn:8082/source/s?defs=hid&project=MX50_N>);
device_set_wakeup_enable
<http://test.zien.vn:8082/source/s?defs=device_set_wakeup_enable&project=MX50_N>(&dev
<http://test.zien.vn:8082/source/s?defs=dev&project=MX50_N>->dev
<http://test.zien.vn:8082/source/s?defs=dev&project=MX50_N>, 1);
}


Regards,

Vu Tran



Vào Th 3, 16 thg 7, 2019 vào lúc 23:19 Tranphong Vu <
tranphongvu070...@gmail.com> đã viết:

> Hi Mohammad Saleh Dehghanpour,
>
> base on your description, i think you need to enable wake up feature in
> your usb wireless keyboard.
> 1. Base on my hardware experience, your usb hardware should support this.
> But we should confirm this
> Cat proc/interrupt to get the irq number of your usb wireless device.
> Let device enter suspend state
> do some thing with your wireless hardware
> wake up device. check the number of irq happens for your wirelese device.
> If they are different it means your hardware support this go to step 2. if
> not your hardware does not,
> you can enable this feature.
>
> 2. You need to get the driver of your wireless hardware device(usb hid,
> specific driver ...). dig in this . usb driver would have a Flag to
> indicate that irq for this device would wake up device.
> Only need to set this flag, then done.
>
> Regards,
> Vu Tran
>
> Vào Th 3, 16 thg 7, 2019 vào lúc 23:08 Mohammad Saleh Dehghanpour <
> salehde...@gmail.com> đã viết:
>
>> Hello
>>
>>
>> I have an AOSP tree compiled on my board. I bought a wireless keyboard
>> and connected it to my board via usb port. I expect when the board is in
>> the suspend state, it will wakeup by pressing a key on keyboard. But it is
>> not so.
>>
>>
>> Anyone has an idea about how to handle remote wakeup for usb in android
>> stack?
>>
>>
>> I tried several ways in my bootloader (uboot), kernel, etc. But no
>> effect. Additionally I made an experiment and found out that in the sleep
>> state, my usb port (which has a dongle in it) has just 1-5 mA. But it
>> should be higher for the dongle to work!
>>
>>
>> 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.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/android-porting/c0d82a42-d03b-4048-b044-025a64bc19db%40googlegroups.com
>> <https://groups.google.com/d/msgid/android-porting/c0d82a42-d03b-4048-b044-025a64bc19db%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> 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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-porting/CADfFnWikQ31ehpdCgfL3Mp9QO2B5PFKjF6TbD7pT7X8Em-BtHg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-porting] USB remote wakeup : Wake up system from suspend via a USB HID device (e.g.wireless keyboard)

2019-07-16 Thread Tranphong Vu
Hi Mohammad Saleh Dehghanpour,

base on your description, i think you need to enable wake up feature in
your usb wireless keyboard.
1. Base on my hardware experience, your usb hardware should support this.
But we should confirm this
Cat proc/interrupt to get the irq number of your usb wireless device.
Let device enter suspend state
do some thing with your wireless hardware
wake up device. check the number of irq happens for your wirelese device.
If they are different it means your hardware support this go to step 2. if
not your hardware does not,
you can enable this feature.

2. You need to get the driver of your wireless hardware device(usb hid,
specific driver ...). dig in this . usb driver would have a Flag to
indicate that irq for this device would wake up device.
Only need to set this flag, then done.

Regards,
Vu Tran

Vào Th 3, 16 thg 7, 2019 vào lúc 23:08 Mohammad Saleh Dehghanpour <
salehde...@gmail.com> đã viết:

> Hello
>
>
> I have an AOSP tree compiled on my board. I bought a wireless keyboard and
> connected it to my board via usb port. I expect when the board is in the
> suspend state, it will wakeup by pressing a key on keyboard. But it is not
> so.
>
>
> Anyone has an idea about how to handle remote wakeup for usb in android
> stack?
>
>
> I tried several ways in my bootloader (uboot), kernel, etc. But no effect.
> Additionally I made an experiment and found out that in the sleep state, my
> usb port (which has a dongle in it) has just 1-5 mA. But it should be
> higher for the dongle to work!
>
>
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/android-porting/c0d82a42-d03b-4048-b044-025a64bc19db%40googlegroups.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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-porting/CADfFnWhb09w9ao67WH8kKNV8%2B1R5OvP_4SZ3%3DHkysFfOuit9Pg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-porting] google android doesn't support ac3

2019-06-06 Thread Tranphong Vu
Hi Hai Nguyen,
Can anyone can tell me why google does't support AC3 format on android?
>> I don't have the answer for this.
In this case, how i can play a video with ac3 audio?
>> I gues you should develop your AOSP base on the the release from your
SOC vendor. Google original does not support this , it's not mean your
current AOSP does not support it. Usually AOSP vendor support more codec
than original google AOSP because they already have hardware codec for
this. You should check it by your self, the above link is for Android
Application developer. I remember all your vendor AOSP codec would be
mentioned in some file like media_profile.xml , sorry i dig in this along
time so i don't remember exactly.

In the case your aosp vendor does not support the codec that you want to
have  you must implement this by your self. Of course , this should be a
software codec because if your soc has support hardware codec they usually
add this to their AOSP. First of all, you can try your luck by dig in to
some other android AOSP like cynamod,... may be they already add this, or
have some code that you can resue. By the way there are 2 step that you
need to implement your codec :
- Implement your software codec.
- Integrate this to your AOSP ( include export this to Application
developer)
The most important thing is that you need to have the working flow of a
software codec. To do this you can dig in media framework, modify some code
to force media framework use software codec instead of hardware codec. Then
follow this to see what will you need to do. About the alogrith for your
codec, you can refer to linux framework, they usually have this .
Sorry but i only can give you the general step. May be the other already
have android AC3 software codec for you.


Vào Th 5, 6 thg 6, 2019 vào lúc 21:07 Hai Nguyen 
đã viết:

> Hi ALL
> Can anyone can tell me why google does't support AC3 format on android?
>
> Below is the all supported media format:
> https://developer.android.com/guide/topics/media/media-formats
>
> In this case, how i can play a video with ac3 audio?
>
> Thanks,
> Hai
>
> --
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/android-porting/81821c25-c4d5-4b11-b9da-5cecd4d47297%40googlegroups.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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-porting/CADfFnWhut16JTcZPspu-oqzCyf5GeowY_o_H15q6NtYeQiP13w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-porting] How to disable "Android is starting" animation

2019-06-04 Thread Tranphong Vu
Hi Jijo ,

You can disable this by replace above animation resource by a black image.

Vào 20:57, T.2, 3 Th6, 2019 Jijo Joseph  đã
viết:

> Hi All,
>
> When the phone boots up just before showing the home screen, I"m getting
> an animation "Android is starting". Please see the attached file.
>
> Could you please me tell how to get rid of it? Is that something we need
> to do by changing source or changing any value in any config file?
>
>
> Regards,
> Jijo
>
> --
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/android-porting/e11c4841-a666-430a-86ec-56a44e14585e%40googlegroups.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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-porting/CADfFnWixYja7OQ28ptegmdDR-n714W_nLDjA0bHnkXZa557BnQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-porting] how to enable android.hardware.thermal@1.1

2019-05-17 Thread Tranphong Vu
Hi Hai Nguyen,
You need to find the service that implement this interface and add this to
your build process.
If you BSP does not have  service that implements this interface you need
to implement this by your self
Regards,
Vu Tran

Vào Th 2, 13 thg 5, 2019 vào lúc 21:49 hai nguyen 
đã viết:

> Hi friends,
>
> Could please anyone can help me this issue. I got the following error log,
> how can i enable android.hardware.thermal@1.1 for my system?
>
> [   28.608329] init: Received control message 'interface_start' for
>> 'android.hardware.thermal@1.1::IThermal/default' from pid: 1063
>> (/system/bin/hwservicemanager)
>> [   28.646746] init: Could not find service hosting interface
>> android.hardware.thermal@1.1::IThermal/default
>>
>
> Thanks,
> Hai
>
> --
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/android-porting/dc27b977-592f-44bd-98fa-a42c82365e4e%40googlegroups.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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-porting/CADfFnWjKAG%3Dtx_GyDL8asUMuGUC8k4nfreq8EdzU4LJj%2BVBr%3DQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-porting] Re: How to remove a system service in Android

2019-04-30 Thread Tranphong Vu
Which android version are you working ?

Vào 21:55, T.2, 29 Th4, 2019 hai nguyen  đã viết:

> in my systen, there is no android manifest.xml like you said, so i go to
> ServiceManager.java to remove where initializes those services, right now,
> i have only 1 service is ISecureElement/Sim1 and ISecureElement/eSe1, i
> dont know where are them i can remove>
>
>
> On Thursday, April 25, 2019 at 1:35:28 AM UTC+7, Hai Nguyen wrote:
>>
>> Hi All,
>> in my android, i dont use some services such
>> as IVibrator, IConsumerIr, IOemLock..
>> When android booting up, it show the log below:
>> [   19.366191] init: Received control message 'interface_start' for
>> 'android.hardware.vibrator@1.0::IVibrator/default' from pid: 1086
>> (/system/bin/hwservicemanager)
>> [   19.381717] init: Could not find service hosting interface
>> android.hardware.vibrator@1.0::IVibrator/default
>> [   19.392740] init: Received control message 'interface_start' for
>> 'android.hardware.vibrator@1.0::IVibrator/default' from pid: 1086
>> (/system/bin/hwservicemanager)
>> [   19.407356] init: Could not find service hosting interface
>> android.hardware.vibrator@1.0::IVibrator/default
>> [   19.418522] init: Received control message 'interface_start' for
>> 'android.hardware.vibrator@1.0::IVibrator/default' from pid: 1086
>> (/system/bin/hwservicemanager)
>> [   19.434711] init: Could not find service hosting interface
>> android.hardware.vibrator@1.0::IVibrator/default
>> [   19.445618] init: Received control message 'interface_start' for
>> 'android.hardware.ir@1.0::IConsumerIr/default' from pid: 1086
>> (/system/bin/hwservicemanager)
>> [   19.460252] init: Could not find service hosting interface
>> android.hardware.ir@1.0::IConsumerIr/default
>> [   19.609981] init: processing action (sys.sysctl.extra_free_kbytes=*)
>> from (/init.rc:725)
>>
>>  i dont want to see the log and dont want to init these service, So Could
>> anyone can help me how to remove these services that don't make Android app
>> crashes or something else...?
>>
>> Thanks,
>> Hai
>>
> --
> --
> 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.


Re: [android-porting] How to remove a system service in Android

2019-04-26 Thread Tranphong Vu
Hi friend,
You can disable this by remove hidl definition in manifest file and build
config include in your board configuration (usually it is in /device
directory )

Vào Th 5, 25 thg 4, 2019 lúc 01:35 Hai Nguyen  đã
viết:

> Hi All,
> in my android, i dont use some services such
> as IVibrator, IConsumerIr, IOemLock..
> When android booting up, it show the log below:
> [   19.366191] init: Received control message 'interface_start' for
> 'android.hardware.vibrator@1.0::IVibrator/default' from pid: 1086
> (/system/bin/hwservicemanager)
> [   19.381717] init: Could not find service hosting interface
> android.hardware.vibrator@1.0::IVibrator/default
> [   19.392740] init: Received control message 'interface_start' for
> 'android.hardware.vibrator@1.0::IVibrator/default' from pid: 1086
> (/system/bin/hwservicemanager)
> [   19.407356] init: Could not find service hosting interface
> android.hardware.vibrator@1.0::IVibrator/default
> [   19.418522] init: Received control message 'interface_start' for
> 'android.hardware.vibrator@1.0::IVibrator/default' from pid: 1086
> (/system/bin/hwservicemanager)
> [   19.434711] init: Could not find service hosting interface
> android.hardware.vibrator@1.0::IVibrator/default
> [   19.445618] init: Received control message 'interface_start' for
> 'android.hardware.ir@1.0::IConsumerIr/default' from pid: 1086
> (/system/bin/hwservicemanager)
> [   19.460252] init: Could not find service hosting interface
> android.hardware.ir@1.0::IConsumerIr/default
> [   19.609981] init: processing action (sys.sysctl.extra_free_kbytes=*)
> from (/init.rc:725)
>
>  i dont want to see the log and dont want to init these service, So Could
> anyone can help me how to remove these services that don't make Android app
> crashes or something else...?
>
> Thanks,
> Hai
>
> --
> --
> 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.


Re: [android-porting] User permissions to open I2C device

2019-04-04 Thread Tranphong Vu
Hi Paul,
You can set permission by configure sepolicy in android. The common step
that i usually use :
Set mode for i2c dev
Set sepolicy for the program that use this sepolicy

You can debug sepolicy error by dmesg | grep deni
You can learn configure sepolicy at
https://source.android.com/security/selinux/implement

Vào 08:02, T.6, 5 Th4, 2019 Paul Kalebu  đã viết:

> I'm writing a user space I2C driver to write to an I2C device, but I'm
> unable to open the device because I don't have permissions. How can I go
> about changing the permissions in AOSP? There doesn't seem to be a
> /etc/udev/rules.d file.
>
> --
> --
> 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.


Re: [android-porting] Integrating Bluetooth module using HCI USB

2019-02-26 Thread Tranphong Vu
Hi friend,
It seem you miss vendor lib . I assume your Bluetooth device driver already
probed and creat a usb hci device. Your vendor lib will talk to usb hci
device.
In the past, I met a hci USB Bluetooth device. It’s kernel driver create a
device at /dev/* and I have a vendor lib to talk to this device. It’s name
seem like libbt_vendor.
In your case I think you need to check the driver that creat hci0 device,
check all feature that driver support in ioctl, open ... and check the
interface that fluoride requires for a Bluetooth vendor lib. Then follow
this to implement Bluetooth vendor lib. I don’t think it is a easy job .
You should contact the ihv of your Bluetooth device and ask them a
Bluetooth vendor lib.

Vào Th 2, 25 thg 2, 2019 lúc 22:00  đã viết:

> We have a board based on imx6 sabresd that we're porting Android to.
> Thanks to a regression in the NXP Oreo BSP we had to revert to Nougat.
>
> This board has a mini PCIE Bluetooth module (RTL8821ae) that talks HCI
> USB. The driver seems to be integrated (hci0 file gets created etc) but I
> am not sure how to integrate the module further. bt_vendor.conf only
> contains references to a UART port and this device doesn't use UART.
>
> It was my impression that Bluedroid lacked USB HCI support, but that
> Fluoride added it. Of course, documentation on Fluoride is impossible to
> find, so I'm not even sure this is true. I've tried going the opposite
> direction by doing HCI protocol conversion, using a patched socat that
> supports HCI, but I can't get that to work (socat closes the socket with
> -ENETDOWN when I start bluetooth_manager). I've also found a git repo,
> "libbt-usb", that claims to convert HCI USB to HCI UART, but I can't get it
> to build on Nougat.
>
> Can anyone point me to a reference describing what is needed to integrate
> this card into the Android stack? Is it even possible/feasible? Any help
> would be greatly appreciated...
>
> --
> --
> 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.


Re: [android-porting] Enabling dual mics in mixer paths .xml file

2019-02-05 Thread Tranphong Vu
Hi my friend,
You need to check your mixer file. Use tinymix to check the work of your
configuration file. If it work with tinymix configuration it should work
with your configuration file, Android framework does not effects this. This
happens in kernel layer. With my experience your mixer configuration is
applied before the other so it does not work as u want.

Vào Th 2, 4 thg 2, 2019 lúc 22:09 Paul Kalebu  đã
viết:

> I've set some tinymix configurations to capture input from two mics at
> once. I've tested it with tinycap and it works just fine. I've tried adding
> those configurations to the mixer paths file (mixer_paths_tasha.xml), but
> it doesn't seem to be working.
>
> *Configurations:*
>
>
>
> * value="1" />
>   value="DMIC" /> name="SLIM TX8 MUX" value="DEC8" /> value="DMIC" /> name="SLIM_0_TX Channels" value="Two" />*
>
> Does anyone know how I can go about setting up dual mic input for an app
> running on Android through the mixer paths .xml file? If that's not
> possible is there another alternative?
>
>
> --
> --
> 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] enable fingerprint feature on Android P

2018-11-27 Thread Tranphong Vu
Hi all,

I am enabling fingerprint feature on Android P with Upek Biometric 
Touchchip/Touchstrip Fingerprint Sensor.
Please help to give me the basic step to enable this feature. Hal, driver, 
integration guide...

Thank so much.

-- 
-- 
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] Re: Implementation of HAL for one of the feature in Android O

2018-11-08 Thread Tranphong Vu
hi Alan Abraham, it is not necessary to create a new interface using HIDL
for accessing a new hardware device. Of course, if you want you can follow
the Android HIDL implementation.If you dig into Android HIDL you will see
what do android do with them and it is not hard to refer.

Vào Th 5, 8 thg 11, 2018 vào lúc 22:10 Alan Abraham 
đã viết:

> Do I need to create a new interface for accessing a new device (connected
> via PCIe) in android? Are there existing HAL interfaces that provides
> generic interfaces?
> How can I add a new interface, like hardware/interfaces/neuralnetworks?
> Something like hardware/interfaces/*customdevice* ?
>
> On Tuesday, May 23, 2017 at 9:01:20 PM UTC+5:30, Glenn Kasten wrote:
>>
>> The current HAL documentation is here:
>> https://source.android.com/devices/#Hardware-Abstraction-Layer
>> It has not yet been updated for O, because O is not open-source yet.
>> That URL will probably be updated sometime after O is open-source.
>>
>>
>> On Monday, May 22, 2017 at 7:34:52 AM UTC-7, Kirti Badkundri wrote:
>>>
>>> Hi All,
>>>  Need help to create my own HAL for one of the feature in
>>> Android O. As, In Android O, there are new concepts like HIDL.
>>> Need inputs from experts.
>>> If possible share the contact number, so that I can discuss. It will be
>>> great help from the Experts.
>>>
>>> Regards
>>> KKB
>>>
>> --
> --
> 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.


Re: [android-porting] New Display Porting

2018-10-18 Thread Tranphong Vu
Hi.
Base on my knowledge I don’t know why you want to port display controller.
It fits to snapdragon soc. about touch controller it bases on the
peripheral interface that you connect your touch controller to soc. you
only need to integrate the touch controller driver to your android bsp.

Vào Th 5, 18 thg 10, 2018 lúc 23:06 Elif Kaplan  đã
viết:

> Hi All!
>
> I am working with Qualcomm Snapdragon820 Board and try to port a new
> display. My board is APS8096 Dev Board  with Android 8.1 on it.
> There is a Display Porting Guide by Qualcomm however for Snapdragon410.
> Still very useful, easy to adapt for SnapD.820.
>
> Still there are things that make me confuse :
>
> *1.* Display/ Panel / Display controller ... They , all , are used
> interchangeably  or in a confusing way.Not only in the guide but in some
> other document by other vendors also .
>  As I understand from the point of hardware
>  Display = Panel + Display controller + Backlight Module (opt) + Touch
> screen controller(opt)
>  Is it right ? Are they also mentioned with these names in the
> software-level /AOSP Level ? Is there a standart naming convention i have
> missed  or am I right to be confused ?
>
> *2*. *The main question* : *how to port display controller and touch
> contrtoller  *
>
> It is  clear that how panel settings (resolution ,color depth etc..) are
> imported/introduced to the system (via device tree and header for
> bootloader) .
> However , also related to the first question , there is no clue  how *display
> controller* or *touch controller* (it is relativly reasonable not to be
> mentioned while it is not a mandatory part of display.) should be ported .
>
> I have dived into the device trees and the kernel for existing display
> related setting and find some entries and drivers for display controller
> and also touch controller.
> They shoud be also introduced to the system , right ?
>
> Any clue would be appreciated .
>
> Thanks and Regards ,
> Elif
>
>
>
>
> --
> --
> 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.