10-20-2018, 05:05 PM
Has anyone tried to use the Android TV stuff (ie: services, store) instead of the standard Android stuff? I'm looking to use the current Android 7.1 build as a basis for making my own Android TV setup.
Google Play Store ON clean install TinkerOS_Android 7 Nougat V14.1.2.50
|
10-20-2018, 05:05 PM
Has anyone tried to use the Android TV stuff (ie: services, store) instead of the standard Android stuff? I'm looking to use the current Android 7.1 build as a basis for making my own Android TV setup.
10-20-2018, 05:45 PM
(This post was last modified: 10-20-2018, 07:16 PM by k247tEK. Edited 11 times in total.)
(10-20-2018, 05:05 PM)AngryManMLS Wrote: Has anyone tried to use the Android TV stuff (ie: services, store) instead of the standard Android stuff? I'm looking to use the current Android 7.1 build as a basis for making my own Android TV setup. hi AngryManMLS, that would be nice.. ;-].. but I think ASUS see the tinker board.. more of a development board... ]]].... its security is wide open.. I tried the TVLauncher from the Play store... with TinkerOS_Android 7 Nougat V14.1.2.50... but.. went back to default Launcher3 as I don't have Air Mouse or touch screen setup... yet ]]]].... found this link.. https://tinkerboarding.co.uk/forum/thread-347.html but looks like it needs root.. [.. on TinkerOS_Android 7 Nougat V14.1.2.50 no joy yet... only adb root shell.. and termux root shell... SuperSU APP not working.... well... you can install SuperSU... but just don't restart the tinker board ]]]]]]]............. ---------------------- hope it helps, k.
10-20-2018, 07:10 PM
(This post was last modified: 10-29-2018, 03:47 AM by k247tEK. Edited 16 times in total.)
GPIO, Tinker Board & the world… continue from post[19]
GPIO (general purpose input/output) pins along the top edge of the board... https://tinkerboarding.co.uk/wiki/index.php/GPIO following Pi GPIO A powerful feature of the Asus Tinker Board.. is the row of GPIO (general-purpose input/output) pins along the top edge of the board. A 40-pin GPIO header.. Any of the GPIO pins can be designated (in software) as an input or output pin and used for a wide range of purposes. Voltages Two 5V pins and two 3V3 pins are present on the board, as well as a number of ground pins (0V), which are un-configurable. The remaining pins are all general purpose 3V3 pins, meaning outputs are set to 3V3 and inputs are 3V3-tolerant. Outputs A GPIO pin designated as an output pin can be set to high (3V3) or low (0V). Inputs A GPIO pin designated as an input pin can be read as high (3V3) or low (0V). This is made easier with the use of internal pull-up or pull-down resistors. Pins GPIO2 - [ASUS 252] and GPIO3 [ASUS 253] have fixed pull-up resistors, but for other pins this can be configured in software. before I get a breadboard, resistors, capacitors, LEDs and diodes to connect to the tinker boards GPIOs.. plug in Pibrella – The easiest way to play with electronics on your tinker board… ;-]... ![]() As well as simple input and output devices, the GPIO pins can be used with a variety of alternative functions, some are available on all pins, others on specific pins. PWM (pulse-width modulation) (@/sys/class/pwm/pwmchip0) Software PWM available on all pins.... ?????? Hardware PWM available on GPIO12 [ASUS 239], GPIO13 [ASUS 238], GPIO18 [ASUS 184], GPIO19 [ASUS 185] SPI (@/sys/bus/spi/devices) SPI0: MOSI (GPIO10) [ASUS 257]; MISO (GPIO9) [ASUS 256]; SCLK (GPIO11) [ASUS 254]; CE0 (GPIO8) [ASUS 255], CE1 (GPIO7) [ASUS 251] (spi2.0 -> ../../../devices/platform/ff130000.spi/spi_master/spi2/spi2.0/) SPI1: MOSI (GPIO20) [ASUS 187]; MISO (GPIO19)[ASUS 185]; SCLK (GPIO21) [ASUS 188]; CE0 (GPIO18)[ASUS 184]; CE1 (GPIO17)[ASUS 164]; CE2 (GPIO16) [ASUS 223] (spi2.1 -> ../../../devices/platform/ff130000.spi/spi_master/spi2/spi2.1/) I2C Data: (GPIO2) [ASUS 252]; Clock (GPIO3) [ASUS 253] EEPROM Data: (GPIO0) [ASUS 233]; EEPROM Clock (GPIO1) [ASUS 234] ???? Serial TX (GPIO14) [ASUS 161]; RX (GPIO15) [ASUS 160] so.. two rows of GPIO pins, which are connections between the tinker board, and the real world... Output pins are like switches that the tinker board can turn on or off (like turning on/off a LED light)... But it can also send a signal to another device... Input pins are like switches that you can turn on or off from the outside world (like a on/off light switch)... But it can also be a data from a sensor, or a signal from another device... That means that you can interact with the real world, and control devices and electronics using the tinker board and its GPIO pins..;-]... "A journey of a thousand miles begins with a single step".. so just get one of the lights to turn on/off ]]].......
following.. GPIO API.. Shell GPIO can be used direct from the shell: to turn the Pibrella's Green light on / off... Code: echo 17 > /sys/class/gpio/export could not get echo command to work with tsudo.. (need to read more on android permission & chcon... maybe [[[...) also remember.. as SUPERSU App is not installed... you will need pc/mac/vm.. on same LAN as tinker board.. to ssh into and then adb back into tinker board to run.. Code: su --daemon In addition the on board LEDs are at: GPIO.ASUS ---------------------------------------------------------------------------------------------------- PWR_LED 3 # /sys/devices/platform/gpio-leds/leds/pwr-led ACT_LED 48 # /sys/devices/platform/gpio-leds/leds/act-led LED1_LED 49 # /sys/devices/platform/gpio-leds/leds/led1-led ---------------------------------------------------------------------------------------------------- have not found Ethernet LEDs yet.. ]]]]]........... recap.. got tinker board.. installed TinkerOS_Android 7 Nougat with working play store.. installed and setup termux with ssh server.. and got root shell.. connected Pibrella.. and got green LED to turn on and off... now.. what ?... well... go & read up on coding / programming ;-]...... tbc... ------------------- hope it helps, k.
10-24-2018, 06:35 PM
(This post was last modified: 10-29-2018, 04:03 AM by k247tEK. Edited 7 times in total.)
Termux on TinkerOS Android 7 Nougat Controlling GPIO Pins from Bash Scripts...
following Simon Prickett : Controlling Raspberry Pi GPIO Pins from Bash Scripts: Traffic Lights Accessing the GPIO Pins from a Bash Script Without adding further dependencies, Bash scripts can access and control the tinker board's GPIO pins using sysfs. This presents as a set of filesystem paths which can be manipulated to configure individual pins as inputs or outputs and to set and read their values. On the tinker board, these paths look like Code: /sys/class/gpio/gpio<pin_number> and each has a /direction and /value, for example for GPIO 17: Code: /sys/class/gpio/gpio17/direction The pin numbering scheme used by sysfs is the ASUS GPIO one... so.. you will have to modify the original PIN assignment in trafficlights.sh for the three LEDs.. Code: .. create and change to pibrella folder under code in home.. Code: mkdir -p ~/code/pibrella create file with > nano trafficlights.sh Code: #!/data/data/com.termux/files/usr/bin/bash for termux and not #!/bin/bash.... if you ever try to run a bash script and it fails with command not found.. etc.. try to fix with Code: termux-fix-shebang trafficlights.sh next make file executable .. Code: chmod 700 trafficlights.sh then run trafficlights.sh as root.. Code: tsudo ./trafficlights.sh interesting.. that tsudo now works with bash shell script.. when I first tired to make green led blink with for loop and echo commands.. tsudo... failed to run...??? and I had to use tsu to drop into root shell then run.. Code: for i in {1..5}; do echo 1 > /sys/class/gpio/gpio17/value; sleep 0.1; echo 0 > /sys/class/gpio/gpio17/value; sleep 0.1; done which works for bash shell but not sh (The Bourne shell or the POSIX sh language specification...) ;-].... for that I had to use while loop.. Code: i=1; while [ "$i" -le 100 ]; do echo 1 > /sys/class/gpio/gpio17/value; sleep 0.1; echo 0 > /sys/class/gpio/gpio17/value; sleep 0.1; echo "Flash $i"; i=$(( $i + 1 )); done so. should be able to use tsudo if you make a blink function.. ]]]]......... read up on.. Ryans Tutorials: What is a Bash Script? ----------------------;-].. hope it helps, k. next> continue reading up on coding.. Apache.. PhP.. PhP-Apache.. WebSocket.. Node.js.. node-RED & wiringPi.... lots of fun...]].....
10-27-2018, 12:05 PM
(This post was last modified: 10-31-2018, 08:39 AM by k247tEK. Edited 10 times in total.)
Termux on TinkerOS Android 7 Nougat gpioTB function utility to control tinker board's GPIO pins using sysfs...
following Luke Sandell: Raspberry Pi GPIO via the Shell create file.. under ~/code/pibrella/ > nano gpioTB Code: #!/data/data/com.termux/files/usr/bin/bash Can be called as a script or sourced so that the gpioTB function can be called directly.. make copy of gpioTB to ~/kPATH/bin.. Code: cp -p gpioTB ~/kPATH/bin ..now some more functions built with gpioTB... create file.. > nano bincount Code: #!/data/data/com.termux/files/usr/bin/bash simply run as root.. from ~/code/pibrella/ Code: tsudo ./bincount next.. create file > nano chaser Code: #!/data/data/com.termux/files/usr/bin/bash simply run as root.. from ~/code/pibrella/ Code: tsudo ./chaser next.. create file > nano blinkLED Code: #!/data/data/com.termux/files/usr/bin/bash .. if noTime given.. then default time of 1 second... ;-].. to flash green LED @ 1 Hz.. run as root... Code: tsudo ./blinkLED 17 1 1 create file > nano buzzer Code: #!/data/data/com.termux/files/usr/bin/bash run as root... Code: tsudo ./buzzer 184 1 1 so... that's all of the Pibrella Outputs now working under SYSfs... but for the Inputs..... hmmmm.... it's a real head-banger [[[[..... trying to get any input pin / button working under TinkerOS_Android 7 Nougat V14.1.2.50... Pibrella's Input button @ pin 254... value always reads High... "1"... no matter if button is pressed or not.. you can get value to "0" by setting active_low True / "1".. using Code: echo 1 > /sys/class/gpio/gpio$pin/active_low ..even tried to set edge to both.. Sysfs interface and interrupt.. to enable interrupt on falling edge & on the rising edge.. Via sysfs interface, you can request a change of state interrupt processor... Code: echo "both" > /sys/class/gpio/gpio$pin/edge & checking.. > cat /proc/interrupts Code: bash:4.4][root]@~/code/pibrella:# cat /proc/interrupts & watch -n 1 cat /sys/kernel/debug/gpio Code: Every 1s: cat /sys/kernel/debug/gpio 2018-10-27 12:52:01 so... I've almost given up on finding any inputs on the Pibrella that will work with the tinker board.. have to find a way to disable spi / i2c / 1wire.. ??? on a raspberry pi there is config menu to do this ]]]... but on tinker board.. hmmmm... Pibrella button is on PIN 23 [ASUS 254].. input A on PIN 21 [ASUS 256] , B on PIN 26 [ASUS 251], C on PIN 24 [ASUS 255], D on PIN 19 [ASUS 257]... tbc.... tinkering on ;-].... got Solderless breadboard.. Tactile pushbutton switch ..several jumper wires and went on a hunt for some inputs... luckily.. the first 2 free pins next to the Pibrella.. were PIN 33 [ASUS 238] & 34 [Ground]... perfect ;-]]]]]...... connected to pin 1 and 2 of the Tactile pushbutton switch on the Solderless breadboard... .. then create file.. > nano button Code: #!/data/data/com.termux/files/usr/bin/bash Code: tsudo ./button press the Tactile pushbutton switch & the green LED on the Pibrella comes ON ;-]...... with message on screen.. Code: maybe button is pressed [1] Time...;-]... well... its a start... now need to get wiringPi for Android setup.. maybe will have more control over tinker board's GPIO.. MANY, Many Thanks to lobo.. has a very helpful write up.. wiringPi for Android.. ------------------------- hope it helps, k. next> Termux on TinkerOS Android 7 Nougat with WiringPi for Android setup... tbc.. ;-]..
10-27-2018, 03:23 PM
Great!
My heartfelt praise for your information work.
Light blue words might be a link. Have you try to click on them?
![]()
10-31-2018, 06:37 AM
(This post was last modified: 11-03-2018, 10:42 PM by k247tEK. Edited 6 times in total.)
Termux on TinkerOS Android 7 Nougat with WiringPi for Android setup
following lobo: wiringPi for Android wiringPi TinkerBoard wiringPi for TinkerBoard ported to Android. To compile the library, execute from the jni folder the command: Code: "/path/to/your/SDK/ndk-bundle/ndk-build -B" sooo... it took me some time to figure out that I had to download the android tool nkd-build ]]]..... as I'm using a KDE neon 18.04 VM.. download... android-ndk-r18b-linux-x86_64.zip and exteract to ~/temp/android-ndk-r18b/ then create symbolic link to folder in home folder.. Code: ln -s ~/temp/android-ndk-r18b ~/android-ndk then download the wiringTinker_Android from github.. and extract to .. ~/temp/wiringTinker_Android-master before you compile.. have to modify file > nano ~/temp/wiringTinker_Android-master/jni/Application.mk Code: NDK_TOOLCHAIN_VERSION=clang .. and also this file.. > nano +366 ~/temp/wiringTinker_Android-master/jni/gpio/readall.c .. go to line 366... ;-].. & change the line. Code: .. .. also this file.. > nano +38 ~/temp/android-ndk-r18b/sysroot/usr/include/sys/user.h .. go to line 38... ;-].. & change the line Code: .. and finally from post [16] of wiringPi for Android thread.. > nano +932 temp/wiringTinker_Android-master/jni/wiringPi/wiringPi.c .. go to line 932... ;-].. & add the line. Code: .. now.. To compile the library, execute from the jni folder the command: Code: cd ~/temp/wiringTinker_Android-master/jni with no warnings ;-].... Code: k247@KDEneon184:~/temp/wiringTinker_Android-master/jni$ ~/android-ndk/ndk-build -B The libraries need to be installed to the /system/lib/ folder on the TinkerBoard and the gpio binary to the folder /system/bin/: Code: adb connect 192.168.1.x now.. > adb shell.... to drop into Android root shell and check gpio is working.. ;-]... Code: rk3288:/ # gpio ..run gpio readall Code: rk3288:/ # gpio readall Thank you lobo.... ;-]]]]]].........
now I just need to figure out how to use it... & if it will run from inside Termux with tsudo..... well.. gpio readall function works.. but.. gpio read pin#.. just reads 0.. [[[... might be caused by Pibrella pins # shared with spi / pwm ??? also.. setup.. vncserver for X11 server with i3 tiling window manager, tbc... Termux on TinkerOS Android 7 Nougat with WiringPi setup... hope this helps, ------------------ k.
10-31-2018, 06:49 AM
(This post was last modified: 10-31-2018, 06:50 AM by lobo. Edited 1 time in total.)
Yeah, you're welcome. Thank you also for your work. Seems, that I have to update the source on github...
Install Magisk, if you need root.
10-31-2018, 08:48 AM
(10-31-2018, 06:49 AM)lobo Wrote: Yeah, you're welcome. Thank you also for your work. Seems, that I have to update the source on github... Hi lobo, will love to install root.. as I'm using Termux ]]]]... & I have to figure out how to flash in Linux ;-].. it takes me a bit of time to re-read instructions over... again.. Many many thanks for you write ups ]]]]]... ------------------ k.
12-19-2018, 11:53 AM
https://tinkerboarding.co.uk/wiki/index....Play_Store
I did everything from guide but at last when I opened play store , it is saying that "couldn't sign in there was a problem communicating with Google servers try again latet " |
« Next Oldest | Next Newest »
|