android tvheadend compile 
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 ] ( 5632 views )   |  print article
android rk3066 kernel dvb module compile ( my dvbt stick is a af9015 ) 
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 ] ( 3276 views )   |  print article
flash minix neo x5 only with adb 
minix> click right bottom (clock), click settings, click settings on bottom
and choose com.rockchip.settings.
minix> enable Usb debugging
minix> select device and change usb connection (PC) to MTP.
minix> connect minix with USB Cable to PC.

ubuntu> echo 0x2207 >> ~/.android/adb_usb.ini
ubuntu> apt-get install android-tools-adb (get a root shell with adb shell)
ubuntu> sudo adb start-server
ubuntu> adb devices (you should see your minix device)

ubuntu> download http://files.androtab.info/rockchip/rk3 ... X5_CWM.zip
and rename it to update.zip
(http://forum.xda-developers.com/showthr ... ?t=2230186)
ubuntu> adb push update.zip /sdcard/
ubuntu> adb reboot
minix> on boot you are prompted to install the update, confirm it
after install completed
ubuntu> adb reboot recovery
minix> choose install zip from sideload
ubuntu> download http://www.freak-tab.de/petrus/neo_x5_f ... ir_CWM.zip
(http://www.freaktab.com/showthread.php? ... Minix-Roms)
ubuntu> adb sideload neo_x5_finless_12b_720_noair_CWM.zip
minix> reboot system now

Update: I've installed this image now.


[ view entry ] ( 2166 views )   |  print article
Enable USB host API support 
I wondered why
mUsbManager = (UsbManager) getSystemService(Context.USB_SERVICE);
mUsbManager.getDeviceList();
was empty on an 7" cmx rapax LE 070-0508 tablet.

Also USB Device Info showed an empty Android page, but not an empty Linux page.

The solution was a combination of The USB-HOST API Solution and To enable USB host API support:

create two files

android.hardware.usb.host.xml
<?xml version="1.0" encoding="utf-8"?>
<permissions>
<feature name="android.hardware.usb.host" />
</permissions>

android.hardware.usb.accessory.xml
<?xml version="1.0" encoding="utf-8"?>
<permissions>
<feature name="android.hardware.usb.accessory" />
<library name="com.android.future.usb.accessory"
file="/system/framework/com.android.future.usb.accessory.jar" />
</permissions>
Get /system/etc/permissions/tablet_core_hardware.xml file
#> adb pull /system/etc/permissions/tablet_core_hardware.xml
and add
<feature name="android.hardware.usb.host">
into <permissions> section of tablet_core_hardware.xml

At last remount, upload the files and reboot
#> adb remount
#> adb push android.hardware.usb.host.xml /system/etc/permissions
#> adb push android.hardware.usb.accessory.xml /system/etc/permissions
#> adb push tablet_core_hardware.xml /system/etc/permissions
#> adb reboot


[ view entry ] ( 1348 views )   |  print article
extract an android apk package file and decompile it 
Download APK-Multi-Tool-Linux

Extract AndroidManifest.xml, assets, res Folder and smali (disassembly from Java virtual machine) from an apk
$ cd APK-Multi-Tool-Linux
$ java -jar other/apktool.jar d pace-apk-here-for-modding/ANDROID.apk out

Extract jar from apk with dex2jar to get an .jar file
$ d2j-dex2jar.sh ANDROID.apk

Now you can have a look at the java files with jdgui (found a description at reverse-engineer-an-android-app-apk)

or decompile the class files with jad (found a description at stackoverflow)
./jad -o -r -sjava -dDESTDIR path/to/*/.class


[ view entry ] ( 1176 views )   |  print article

<<First <Back | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | Next> Last>>