sudo apt-get install oathtool libpam-oath
Generate a secret.
export HEX_SECRET=$(head -10 /dev/urandom | md5sum | cut -b 1-30)
Generate the TOTP details, 6 digits long.
oathtool --verbose --totp $HEX_SECRET
Enter the base32 secret in Android FreeOTP.
Create and populate the /etc/security/users.oath file.
sudo bash -c "echo HOTP/T30 $USER - $HEX_SECRET >> /etc/security/users.oath"
sudo chmod 0600 /etc/security/users.oath
Forget the secret!
unset HEX_SECRET
prefix /etc/pam.d/sshd with
auth sufficient pam_oath.so usersfile=/etc/security/users.oath window=10 digits=6
Allow this in sshd and restart.
sudo sed -Ei -e 's/(ChallengeResponseAuthentication) no/\1 yes/' /etc/ssh/sshd_config
sudo service ssh restart
Test with
ssh localhost
You should see:
One-time password (OATH) for `USER':
To avoid otp for some users prefix /etc/pam.d/sshd with
auth [success=1 default=ignore] pam_succeed_if.so user in user1:user2
[ view entry ] ( 2107 views ) | print article
ffmpeg -i input.mp4 -pix_fmt yuv420p -vcodec libx264 -acodec aac output.mp4
[ view entry ] ( 1549 views ) | print article
kio-mtp and mtp-detect stopped working
But jmtpfs seams to work - i decided to mount on usb plug in with an udev rule
#> apt-get install jmtpfs/etc/udev/rules.d/99-jmtpfs.rules
#> mkdir -p /media/mtp
ACTION=="add", ENV{ID_MTP_DEVICE}=="1", RUN="/usr/bin/jmtpfs -o allow_other /media/mtp"
ACTION=="remove", ENV{ID_MTP_DEVICE}=="1", RUN="/bin/fusermount -u /media/mtp""
A little bit faster is simple-mtpfs, but you have to compile
apt-get install libusb-dev libmtp-dev
git clone https://github.com/phatina/simple-mtpfs.git
cd imple-mtpfs
./autogen.sh
mkdir build && cd build
../configure --prefix=/usr
make
sudo make install
/etc/udev/rules.d/99-simple-mtpfs.rules
ACTION=="add",ENV{ID_MTP_DEVICE}=="1",RUN="/usr/bin/simple-mtpfs -o allow_other /media/mtp"
ACTION=="remove", ENV{ID_MTP_DEVICE}=="1", RUN="/bin/fusermount -u /media/mtp""
[ view entry ] ( 5011 views ) | print article
build standalone toolchain from Android NDK.
cd WORKINGDIR
wget http://dl.google.com/android/ndk/androi ... 64.tar.bz2
tar -xjv android-ndk-r8e-linux-x86_64.tar.bz2
run this script ( make-standalone-toolchain.sh )
#!/bin/bash
export ANDROID_NDK=android-ndk-r8e
export ANDROID_NDK_TOOLCHAIN_ROOT=android-toolchain-14
$ANDROID_NDK/build/tools/make-standalone-toolchain.sh \
--system=linux-x86_64 \
--toolchain=arm-linux-androideabi-4.4.3 \
--platform=android-14 \
--install-dir=$ANDROID_NDK_TOOLCHAIN_ROOT
remove "--system=linux-x86_64" for 32 Bit Linux
build openssl for android
git clone https://github.com/guardianproject/openssl-android.git
cd openssl-android
../android-ndk-r8e/ndk-build
cd ..
link missing header and copy libs into android toolchain
ln -s ../../../../../rockchip-rk30xx-mk808/include/linux/dvb android-toolchain-14/sysroot/usr/include/linux/dvb
ln -s ../../../../openssl-android/include/openssl android-toolchain-14/sysroot/usr/include/openssl
cp openssl-android/libs/armeabi/libssl.so android-toolchain-14/lib
cp openssl-android/libs/armeabi/libcrypto.so android-toolchain-14/lib
build tvheadend for android
wget https://github.com/innbox/tvheadend/archive/tvheadend-android.zip
unzip tvheadend-tvheadend-android.zip
cd tvheadend-tvheadend-android
./configure --disable-avahi \
--disable-libav \
--enable-bundle \
--enable-android \
--arch=armeabi-v7a \
--cc=../android-toolchain-14/bin/arm-linux-androideabi-gcc \
--android_toolchain=../android-toolchain-14
make
adb push build.linux/tvheadend /data/dvb
adb push ../android-toolchain-14/lib/libssl.so /data/dvb
adb push ../android-toolchain-14/lib/libcrypto.so /data/dvb
adb shell
root@android:/data/dvb # ./tvheadend -C
Because of bad signal i applied and modified a patch for tvheadend git master
git clone https://github.com/tvheadend/tvheadend.git
cd tvheadend
git checkout e343bfdcca877d4a19a2d86d1713fb0f46ab0b50
patch -p1 <tvheadend-android.patch
[ view entry ] ( 5688 views ) | print article
Pull rk3066 kernel source from omegamoon
git clone git://github.com/omegamoon/rockchip-rk30xx-mk808
With the toolchain (4.6) from omegamoon on dvbt usb stick plugin i got with dmesg
af9015: command failed:166
af9015: command failed:1
af9015: command failed:39
af9015: command failed:3
af9015: eeprom read failed:-1
dvb_usb_af9015: probe of 2-1.3:1.0 failed with error -1
With toolchain (4.4.3) taken from Android NDK it worked
Run default config with this script
TOOLCHAIN=./omegamoon/toolchain/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-
ARCH=arm CROSS_COMPILE=$TOOLCHAIN make mk808-hdmi-720p_defconfig
Select needed dvb modules for kernel config with
make menuconfig
Compile with this script
TOOLCHAIN=./omegamoon/toolchain/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-
ARCH=arm CROSS_COMPILE=$TOOLCHAIN make -j2
If everything is ok copy the modules with adb and insmod them
adb push dvb-core.ko /mnt/sdcard
adb shell
root@android:/ # cd /mnt/sdcard
root@android:/ # insmod dvb-core.ko
root@android:/ # dmesg
if module loading failed and you see in dmesg output
Unknown symbol _GLOBAL_OFFSET_TABLE_ (err 0)
add -fno-pic to CFLAGS_MODULE of the main Makefile
For my af9015 i need these modules
af9013.ko dvb-core.ko dvb-usb.ko mt2060.ko mxl5007t.ko tda18271.ko
dvb-pll.ko dvb-usb-af9015.ko mc44s803.ko mxl5005s.ko qt1010.ko tda18218.ko
with this firmware dvb-usb-af9015.fw
adb remount
adb push dvb-usb-af9015.fw /etc/firmware
To load i use the script startdvb
insmod dvb-core.ko
insmod dvb-pll.ko
insmod dvb-usb.ko
insmod af9013.ko
insmod mc44s803.ko
insmod mt2060.ko
insmod mxl5005s.ko
insmod mxl5007t.ko
insmod qt1010.ko
insmod tda18218.ko
insmod tda18271.ko
insmod dvb-usb-af9015.ko
mkdir /dev/dvb
mkdir /dev/dvb/adapter0
ln -s /dev/dvb0.frontend0 /dev/dvb/adapter0/frontend0
ln -s /dev/dvb0.demux0 /dev/dvb/adapter0/demux0
ln -s /dev/dvb0.dvr0 /dev/dvb/adapter0/dvr0
ln -s /dev/dvb0.dvr0 /dev/dvb/adapter0/dvr0.ts
chmod 777 /dev/dvb*
To unload i use the script stopdvb
rmmod dvb_usb_af9015
rmmod af9013
rmmod mc44s803
rmmod mt2060
rmmod mxl5005s
rmmod mxl5007t
rmmod qt1010
rmmod tda18218
rmmod tda18271
rmmod dvb_usb
rmmod dvb_pll
rmmod dvb_core
rm /dev/dvb/adapter0/frontend0
rm /dev/dvb/adapter0/demux0
rm /dev/dvb/adapter0/dvr0
rm /dev/dvb/adapter0/dvr0.ts
rmdir /dev/dvb/adapter0
rmdir /dev/dvb
test and upload
adb shell
root@android:/data # cd /data
root@android:/data # mkdir dvb
adb push . /data/dvb
root@android:/data # cd dvb
root@android:/data/dvb # ./startdvb
lsmod shows loaded modules
dmesg shows kernel logs
For testing i pushed droidtv.apk and installed with
root@android:/ # pm install droidtv.apk
compile against linux media
git clone git://linuxtv.org/media_build.git
cd media_build
i use following script to compile
#!/bin/bash
export ARCH=arm
export CROSS_COMPILE=$(pwd)/../android-toolchain-14/bin/arm-linux-androideabi-
export DIR=$(pwd)/../rockchip-rk30xx-mk808
export MYCFLAGS=-fno-pic
./build
#make -j4
when you see something like
CC [M] XXXXX.o
press Ctrl-C
remark "./build" and unremark "make -j4"
make menuconfig
//[ ] Misc devices --->
uncheck
Multimedia support / Encoders, decoders, sensors and other helper chips --->
< > SMIA++/SMIA sensor support
if not unchecked you get something like
./media_build/v4l/smiapp-core.c: In function 'smiapp_registered':
./media_build/v4l/smiapp-core.c:2359: error: implicit declaration of function 'devm_regulator_get'
./media_build/v4l/smiapp-core.c:2359: warning: assignment makes pointer from integer without a cast
to build dib9000.ko uncheck "Multimedia support / Autoselect"
if you see "exported twice. Previous export was in vmlinux" then
this happens for modules built into rk3066 kernel and selected as modul.
[ view entry ] ( 3328 views ) | print article
| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | Next> Last>>