[Q] Why can not open file at /dev/<file> from native HAL in Android 5.0.2 - Android Q&A, Help & Troubleshooting

Hi every one,
Currently, I am integrating peripheral for our company's device. This device is developed base on MSM8974AC platform. I have built linux driver and native HAL for that peripheral, these code are worked on Android 4.4.4 KK but when I reuse them on Android 5.0.2, I got a problem as follows:
- Linux driver has created device file at /dev/sfh7776.
- I have set permission 777 in init.rc file and check permission by command "ls -l /dev/sfh7776" then I got mesage "crwxrwxrwx"
- Native HAL open this device file by function ret = open("/dev/sfh7776",O_RDWR); but ret = -1, it means can not open this dev file.
Any one help me resolve this problem? Thank you very much.

Related

modinfo on Android

Hi, i need to know why modinfo isn't working on Android and if there is someother command that replaces it?
Thanks
You can try "insmod".
It needs the path the kernel module file as parameter. E.g.
insmod /path/to/module.ko
Trying to explore / understand installed modules
st_voss said:
You can try "insmod".
It needs the path the kernel module file as parameter. E.g.
insmod /path/to/module.ko
Click to expand...
Click to collapse
I have read that to understand all the drivers / modules installed on my Android device, I must look at everything in these two directories: /system/lib/modules and /sys/module
my device has no modules directory in the /system/lib directory.
in /sys/module, I have:
kernel
printk
wakelock
userwakelock
earlysuspend
spurious
omap3epfb
keyboard
vt
bridgedriver
scsi_mod
usbcore
musb_hdrc
omap_hdq
w1_bq27000
usbhid
binder
lowmemorykiller
snd
snd_timer
snd_pcm
snd_dummy
oprofile
tcp_cubic
rfkill
pvrsrvkm
omaplfb
bc_example
tiwlan_drv
None of these directories has any files ending in .ko? Using Root Explorer to search for *.ko, finds only these:
/etc/wifi/tiwlan_drv.ko
/system/bin/sgx/omaplfb.ko
/system/bin/sgx/pvrsrvkm.ko
Can someone help me figure out how to get the equivalent of modinfo details for these?
Thanks.
Environment info:
device runs Android 2.1 I use adbKonnect to connect wirelessly with my PC
PC is running XP

[Q] Android + PHP + SSL issues

Hey Everyone,
I recently downloaded and installed "PHP for Android." I created a .php file that utilizes an SSL connection with port 2195. When I tried running it, I get the following error message:
HTML:
Error:14094410:SSL routines:func(148):reason(1040) in /mnt/sdcard/sl4a/scripts/lot.php on line 19
Warning: stream_socket_client(): Failed to enable crypto in /mnt/sdcard/sl4a/scripts/lot.php on line 19
Warning: stream_socket_client(): unable to connect to ssl://gateway.sandbox.push.apple.com:2195 (Unknown error) in /mnt/sdcard/sl4a/scripts/lot.php on line 19
This is my line 19:
"$apns = stream_socket_client('ssl://gateway.sandbox.push.apple.com:2195', $error, $errorString, 2, STREAM_CLIENT_CONNECT, $streamContext);"
I researched what "reason(1040)" means, and supposedly it means that the port is closed. But what firewall is blocking it? The same exact script works when I execute it from my computer from the same wifi connection. Could it be a firewall inside the Android OS?
Any input will be greatly appreciated!!
Thanks!
Does anyone know?
Hey,
We also got that error with the iPhone Push service, and it was due to the certificate not being set correctly (actually the certificate file didn't exist).
I hope this solves your problem if you haven't solved it by now.
Regards,
Chris

android app: network access for external programs

Dear All,
I am trying to develop an app which calls a external program (written in C) using Runtime.getRuntime().exec method. This program is basically an gstreamer based rtsp server and it works good if I run from the android command prompt. However, when I run the program from the app, I am getting the following error.
Failed to bind socket (Permission denied)
I had given the network access in my AndroidManifest.xml file.
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
I also tried this
String cmd = "ping localhost";
Runtime.getRuntime().exec(cmd);
for which I got
ping: icmp open socket: Operation not permitted
I also tried to run an another program from an app (which shows an image on the android screen - surfaceflinger sink). So, I included android.permission.ACCESS_SURFACE_FLINGER in the manifest file. However, it wasn't able to display on surfaceflinger sink.
So, I have a feeling that these permissions are not passed on to these external programs. Is there a way to achieve this? I don't want to convert these 'C' based programs to Java. Can anyone please help me out.
Thanks,
Krishnan

[Dev Help] USB/IP on android

I'm working on a project that requires an android port of the USB/IP project. I managed to build the required modules for the phone kernel (using the NDK) and build the user space application (using crosstool-ng for glibc requirements) but I cannot find any information on the net how to set the correct permissions for the usbip userland application. When I execute the usbip binary I get "sh: usbip: permission denied" although I'm logged in on the phone as root (su) and the permissions are correct.
Any help will be appreciated.

Help me to get DRM/Widevine on my self compiled LineageOS

Hi guy i'm building LineageOS for Razer Forge TV. The rom works fine but i can't get DRM/Widevine to work.
The board for this device it's apq8084 like shamu, quark and kccat6.
I succesfuly build the vendor tree including this blobs:
Code:
/vendor/lib/libdrmfs.so
/vendor/lib/libdrmtime.so
/vendor/lib/liboemcrypto.so
/vendor/lib/libprdrmdecrypt.so
/vendor/lib/libQSEEComAPI.so
/vendor/lib/libwvdrm_L1.so
/vendor/lib/libWVStreamControlAPI_L1.so
/vendor/lib/drm/libdrmprplugin.so
/vendor/lib/drm/libdrmwvmplugin.so
/vendor/lib/mediadrm/libprmediadrmdecrypt.so
/vendor/lib/mediadrm/libprmediadrmplugin.so
/vendor/lib/mediadrm/libwvdrmengine.so
But nothing seems to work. Boardconfig.mk contains:
Code:
# DRM Protected Video
BOARD_USES_LIBDRM := true
BOARD_WIDEVINE_OEMCRYPTO_LEVEL := 1
I also try using blobs from shamu as many other roms similars for this board, with no luck.
As far i see in logcat the device can't get or create certs and credentials, so it's keep falling back to L3.
With L3 i can't get TV Netflix or casting to work...
Here is the logcat: https://pastebin.com/F43RkkKa
Any help or clue will be appreciated!
Thanks
Well this is hard to solve...as far i see in the logs in some point QSEECOMAPI or OEMCrypto fails to encrypt (or decrypt?) probably certs...
I test it all, even with bullhead blobs, no luck. I also replace the proprietary kestore.qcom.so with the opensource provided by LineageOS and i get the same error....
Code:
WVCdm : Could not read /data/mediadrm/IDM1013/ay64.dat2: No such file or directory
QSEECOMAPI: : Error::send command ioctl failed. ret = -1, errno = 22
DrmWidevineDash: Error: OEMCrypto_Initialize ioctl returns -1
WVCdm : DeviceFiles::RetrieveHashedFile: /data/mediadrm/IDM1013/L3/cert.bin does not exist

Categories

Resources