android-things

android.os.ServiceSpecificException: GPIO2_IO02 is already in use (code 16)

[亡魂溺海] 提交于 2019-12-02 00:39:06
问题 I am working on android things(Pico i.MX7D I/O).I got android.os.ServiceSpecificException: GPIO2_IO02 is already in use (code 16) exception,What it means by this? Please help me. My sample program is cloned from https://github.com/androidthings/sample-button. 回答1: This means another app is running in the background and is currently accessing this pin. This may happen if one app is not fully stopped before a new one is opened. You can see all your installed apps by running: adb shell pm list

How to do GPIO on Android Things bypassing Java

被刻印的时光 ゝ 提交于 2019-12-02 00:31:08
问题 I've been trying to access GPIO on Raspberry Pi with Android things using NDK, but after trying several approaches I always find some kind of security wall preventing me from accessing it. The motivation is the sluggish speed I'm getting from GPIO using the Java API. As a basic reference I was able to toggle it on and off at about 2KHz, which happens to be the poorest among this list. See also What is Android Things Raspberry Pi GPIO max frequency?, where so far there's no answer and where I

How to change the date on Android Things device?

谁说我不能喝 提交于 2019-12-01 21:22:41
I'm using Android Things Developer Preview on Raspberry Pi 3 Model B. Is there any way to set the correct date/time/timezone? The easiest way to do this is probably using the date shell command over ADB. It requires root, but all the preview images should allow root access. Here's an example that checks the date, sets it, and then verifies that the date change stuck: $ adb root restarting adbd as root $ adb shell date Sat Jan 1 00:02:40 GMT 2000 $ adb shell date 1227120016 Tue Dec 27 12:00:00 GMT 2016 $ adb shell date Tue Dec 27 12:00:02 GMT 2016 You can determine the format of the date

How to do GPIO on Android Things bypassing Java

和自甴很熟 提交于 2019-12-01 21:21:31
I've been trying to access GPIO on Raspberry Pi with Android things using NDK, but after trying several approaches I always find some kind of security wall preventing me from accessing it. The motivation is the sluggish speed I'm getting from GPIO using the Java API. As a basic reference I was able to toggle it on and off at about 2KHz, which happens to be the poorest among this list . See also What is Android Things Raspberry Pi GPIO max frequency? , where so far there's no answer and where I added a comment about java speed. In fact this work was motivated by the results I got when checking

How do I connect my Raspberry Pi 3 running Android Things to a wifi network?

一世执手 提交于 2019-12-01 10:28:30
I have flashed my Raspberry Pi 3 with the Android Things image, I have not been able to connect it to my wifi network. I have run adb devices but I get no response. Justin Giorgi Take a look at this question: connect to Raspberry Pi 3 using adb The Raspberry Pi isn't a USB device, the USB connection is just for power, so it won't show up in adb devices . You have to connect it to a network first then use adb connect . In short, you have to connect it to network using Ethernet and then follow the instructions using adb command to connect it to Wifi. Yeah, I know it is dumb but it is just the

Can't Connect Camera using Android Camera (1) API on Raspberry Pi running AndroidThings

一个人想着一个人 提交于 2019-12-01 10:16:01
问题 I'm trying to run my standard Android app with QR code scanner on the Raspberry Pi running Android Things version 0.7 with the Raspberry Pi Camera V2 attached. The app and QR scanner runs fine on most Android phones (Lollipop+). On Android Things I can load the app and login fine, but when I open the QR scanner tab I get a crash. It's strange because the camera is detected (Camera.getNumberOfCameras() = 1) and the camera appears to have the front-facing orientation (cameraInfo.facing = 1),

Android Things permission com.google.android.things.permission.MANAGE_INPUT_DRIVERS not found

浪尽此生 提交于 2019-12-01 06:41:19
I use RPi3 with Android Things 0.5.1. Although I have in my AndroidManifest.xml the permission: <uses-permission android:name="com.google.android.things.permission.MANAGE_INPUT_DRIVERS" /> I get the exception: java.lang.SecurityException: Caller lacks required permission com.google.android.things.permission.MANAGE_INPUT_DRIVERS Anybody got working this permission on 0.5.1? That permission is currently marked as a dangerous permission, which would typically require granting at runtime by the user on standard Android. In Android Things, these permissions are granted automatically, but only on

Android Things permission com.google.android.things.permission.MANAGE_INPUT_DRIVERS not found

孤人 提交于 2019-12-01 05:10:55
问题 I use RPi3 with Android Things 0.5.1. Although I have in my AndroidManifest.xml the permission: <uses-permission android:name="com.google.android.things.permission.MANAGE_INPUT_DRIVERS" /> I get the exception: java.lang.SecurityException: Caller lacks required permission com.google.android.things.permission.MANAGE_INPUT_DRIVERS Anybody got working this permission on 0.5.1? 回答1: That permission is currently marked as a dangerous permission, which would typically require granting at runtime by

OTA for Android Things

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-01 01:34:15
问题 How can I update my Android Things preview 1 with preview 2? Is there an automatic OTA available or isn't this possible right now, so that I have to flash the sdcard (from my Raspberry Pi)? 回答1: EDIT1: Currently, OTA is not available.You have to download preview 2 binaries manually and flash to sdcard. EDIT2:(2017 Jun 30) Now,OTA is available using androidthing console. For OTA automatic updates, you have to create factory image then download it and flash it on your sdcard/board. Thats it,

Android Things: Set screen resolution

余生颓废 提交于 2019-11-30 14:23:25
问题 I have a small screen attached to my Raspberry Pi and according to the documentation for the screen: Write the image to a TF card and append the following lines to the config.txt file which is located in the root of your TF card: max_usb_current=1 hdmi_group=2 hdmi_mode=87 hdmi_cvt 800 480 60 6 0 0 0 You must make sure that there are no spaces on either side of the equal sign. But I can't do this on the Android Things drive, as the disk image is not readable 回答1: The original answer was found