segfault in listing /data/init.d

ls -alh /data/init.d/

__bionic_open_tzdata_path: ANDROID_ROOT not set!

Why is this ?

Comments

  • very odd -- I'll try the fix they mention

  • Let me know if it helps and we will include it by default in emteria.OS.

  • well it seems the only way to properly set the environment is to always set this after you login...

    export ANDROID_DATA=/data ANDROID_ROOT=/system

    I don't see any other way to do this seeing that there is no bash - no proper $HOME and mount points are all ro

  • OK got a fix for you @kalkov

    edit /system/etc/mkshrc

    add

    export ANDROID_DATA=/data ANDROID_ROOT=/system

    Mine looks like this......

    # Copyright (c) 2010, 2012, 2013, 2014
    #       Thorsten Glaser <tg@mirbsd.org>
    # This file is provided under the same terms as mksh.
    #-
    # Minimal /system/etc/mkshrc for Android
    #
    # Support: https://launchpad.net/mksh
    
    : ${HOSTNAME:=$(getprop ro.product.device)}
    : ${HOSTNAME:=android}
    : ${TMPDIR:=/data/local/tmp}
    export HOSTNAME TMPDIR
    export ANDROID_DATA=/data ANDROID_ROOT=/system
    
    if (( USER_ID )); then PS1='$'; else PS1='#'; fi
    PS4='[$EPOCHREALTIME] '; PS1='${|
            local e=$?
    
            (( e )) && REPLY+="$e|"
    
            return $e
    }$HOSTNAME:${PWD:-?} '"$PS1 "
    
  • @kalkov did you add this yet for the next release ?

  • Thanks for the provided fix. To do it like this, we would need to introduce changes into the Google mksh project, which we didn't modify so far. This isn't a big problem (we do so in other cases), but each single modification will slow down our releases in future (since we will have to merge Google's changes into our own code base). We are currently checking if there is another way to achieve the same goal.

  • Does android have a option to use /etc/profile ? if so then put it in there because sh/dash is suppose to read that file unless google also killed that off if they recompiled sh which I hope they weren't that stupid to break sh.

Sign In or Register to comment.