Adding XBMC to custom rom
#1
Hi guys,
I'm building a custom rom for DroidTV X1 device and I'm facing the following problem:
If I manually install XBMS from apk file it copies apk to /data/app/ and libraries to /data/data/org.xbmc/xbmc/lib
Everything runs fine

But if I add it to the /system/apps then it doesn't copy lib files to /data/data/org.xbmc/xbmc/lib although it creates the folder.
if i try to start it it runs for the first time quite slow and than crashes. and after that it crashes every time I'm trying to run it

Am I doing something wrong?
Is it actually possible to add XBMC to the firmware so I would have XBMC pre-installed after factory reset?

The device is RK3066 SoC, 1GB ram, 4GB internal storage.
Reply
#2
For system apps, lib files should be in /system/lib. One way to go about it is first install XBMC as a user app, then copy out all the files from /data/data/org.xbmc/xbmc/lib. Then in your custom rom, put all those lib files into /system/lib and the XBMC apk into /system/app.
Reply
#3
I've tried that, but it doesn't work. XBMC crashes when I try to start it.
Reply
#4
on my Onda V972, I use a "preinstall-script" to install user apps at the end of the first boot.
something like this:

In your extracted "Rom-Folder":
first create directory /system/preinstall and copy your apps into it.

second create: '/system/bin/preinstall.sh'
(example code):
Code:
#!/system/bin/busybox sh

BUSYBOX="/system/bin/busybox"

mkdir /bootloader
mount -t vfat /dev/block/nanda  /bootloader

if [ ! -e /data/system.notfirstrun ]; then    
    echo "do preinstall job"    
  
    /system/bin/sh /system/bin/pm preinstall /system/preinstall
    /system/bin/sh /system/bin/pm preinstall /sdcard/preinstall

    $BUSYBOX cp /system/etc/chrome-command-line /data/local/
    $BUSYBOX chmod 777 /data/local/chrome-command-line
    
    mkdir /data/data/com.android.settings/shared_prefs

    $BUSYBOX cp /system/settings/com.android.settings_preferences.xml /data/data/com.android.settings/shared_prefs
    $BUSYBOX cp /system/settings/accounts.db /data/system/users/0/accounts.db
    $BUSYBOX cp /system/settings/wpa_supplicant.conf /data/misc/wifi/wpa_supplicant.conf

    $BUSYBOX chmod 666 /data/data/com.android.settings/shared_prefs/com.android.settings_preferences.xml
    $BUSYBOX chmod 666 /data/system/users/0/accounts.db
    $BUSYBOX chmod 666 /data/misc/wifi/wpa_supplicant.conf


    

    $BUSYBOX touch /data/system.notfirstrun    
    
     mkdir /databk
   mount -t ext4 /dev/block/nandi /databk    
   rm /databk/data_backup.tar
   umount /databk
   rmdir /databk
   echo "preinstall ok"
   exec /system/bin/reboot

elif [ -e /bootloader/data.need.backup ];then
   echo "data backup:tar /databk/data_backup.tar /data"
   mkdir /databk
   mount -t ext4 /dev/block/nandi /databk    
  
   rm /databk/data_backup.tar

   $BUSYBOX tar -cf /databk/data_backup.tar /data
   rm /bootloader/data.need.backup
  
   umount /databk
   rmdir /databk

else
   echo "do nothing"
fi
umount /bootloader
rmdir /bootloader

third: call "preinstall.sh" from init.rc (at least) like this:
Code:
service  preinstall  /system/bin/busybox  sh  /system/bin/preinstall.sh
  user root
  group root
  disabled
  oneshot

on property:sys.boot_completed=1
    start preinstall
Reply
#5
does anyone know how to sign a rom zip file ? I have one rom zip which i have modded to my need but can't figure out how to sign....it fails signature verification every time.
StreamOn Plugin
TV Streams, Shows, Sports
Install Repository
Forum Link
Reply
#6
Try this thread for the tools for signing the android ROM: http://forum.androidgadget.co.uk/showthread.php?tid=119
Reply
#7
(2013-03-05, 01:08)taljan Wrote: Hi guys,
I'm building a custom rom for DroidTV X1 device and I'm facing the following problem:
If I manually install XBMS from apk file it copies apk to /data/app/ and libraries to /data/data/org.xbmc/xbmc/lib
Everything runs fine

But if I add it to the /system/apps then it doesn't copy lib files to /data/data/org.xbmc/xbmc/lib although it creates the folder.
if i try to start it it runs for the first time quite slow and than crashes. and after that it crashes every time I'm trying to run it

Am I doing something wrong?
Is it actually possible to add XBMC to the firmware so I would have XBMC pre-installed after factory reset?

The device is RK3066 SoC, 1GB ram, 4GB internal storage.
I have some problem like this(((
Then I run XBMC apk (installed as system) it does crash dalvik VM with this logcat error:
Code:
I/ActivityManager(  642): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=org.xbmc.xbmc/.Main bnds=[34,200][130,296]} from pid 1860
D/AndroidRuntime( 1860): Shutting down VM
W/dalvikvm( 1860): threadid=1: thread exiting with uncaught exception (group=0x40b9d930)
E/AndroidRuntime( 1860): FATAL EXCEPTION: main
E/AndroidRuntime( 1860): java.lang.RuntimeException: Unable to start activity ComponentInfo{org.xbmc.xbmc/org.xbmc.xbmc.Main}: java.lang.IllegalArgumentException: Unable to find native library: xbmc
E/AndroidRuntime( 1860):        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2180)
E/AndroidRuntime( 1860):        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
E/AndroidRuntime( 1860):        at android.app.ActivityThread.access$600(ActivityThread.java:141)
E/AndroidRuntime( 1860):        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
E/AndroidRuntime( 1860):        at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 1860):        at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime( 1860):        at android.app.ActivityThread.main(ActivityThread.java:5041)
E/AndroidRuntime( 1860):        at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 1860):        at java.lang.reflect.Method.invoke(Method.java:511)
E/AndroidRuntime( 1860):        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
E/AndroidRuntime( 1860):        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
E/AndroidRuntime( 1860):        at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime( 1860): Caused by: java.lang.IllegalArgumentException: Unable to find native library: xbmc
E/AndroidRuntime( 1860):        at android.app.NativeActivity.onCreate(NativeActivity.java:181)
E/AndroidRuntime( 1860):        at org.xbmc.xbmc.Main.onCreate(Main.java:18)
E/AndroidRuntime( 1860):        at android.app.Activity.performCreate(Activity.java:5113)
E/AndroidRuntime( 1860):        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
E/AndroidRuntime( 1860):        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144)
E/AndroidRuntime( 1860):        ... 11 more
W/ActivityManager(  642):   Force finishing activity org.xbmc.xbmc/.Main
I/Process ( 1860): Sending signal. PID: 1860 SIG: 9
I/WindowState(  642): WIN DEATH: Window{41384e18 u0 org.xbmc.xbmc/org.xbmc.xbmc.Splash}
I/ActivityManager(  642): Process org.xbmc.xbmc (pid 1860) has died.
I/qtaguid (  642): Failed write_ctrl(s 0 10061) res=-1 errno=1
But I can't understand what this mean((
I already check all permissions on /data partition but haven't any results.
Maybe somebody help me?
Reply

Logout Mark Read Team Forum Stats Members Help
Adding XBMC to custom rom0