Announcement

Collapse
No announcement yet.

Announcement

Collapse
No announcement yet.

DAMN IT... another "bad" odd bug found :(

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    DAMN IT... another "bad" odd bug found :(

    So in my next ROM I also wanted to implement init.d support.
    Many may not know what that is but it is scripting .sh support on boot. Like running the V6 SuperCharger scripts etc.

    So scripts that I have personally written that look for available disk space like on /sdcard or /external_sd are having a problem.

    It's like WTF?

    All partitions or file systems show up on this ROM, or any other rk3066 ROM I have tried, as 0 bytes in size and 0 bytes available! Seriously.... WTF?

    I have tried every busybox under the sun, tried all kinds of other system files, etc. But bottom line no matter what... any tool you install to look at NON-ROOT file sizes, does not work! Even tools that are ROOT are not reporting disk space properly!
    A prime example. Install ES file explorer and PROP /system. It should tell you how big the partition is, how much space is used, and how much is free. Again try this with the /sdcard. It should at least tell you how much is free! All these tools ALWAYS report 0...... WTF?

    I am exhausted on fixing this issue and thinking it might be a kernel problem.
    ANYONE HEARD OF THIS BEFORE?

    Bob
    "Pzebacz im, bo nie wiedzą, co czynią"
    "Прости им, они не ведают, что творят"
    "Perdona loro perché non sanno quello che fanno"
    "Vergib ihnen, denn sie wissen nicht, was sie tun"
    "Vergeef hen want ze weten niet wat ze doen"
    "Pardonne-leur car ils ne savent pas ce qu'ils font"
    "Perdónalos porque no saben que lo que hacen"
    "Oprosti im, jer ne znaju što čine"
    "Forgive them as they know not what they do"






    #2
    Without proper custom kernel with INIT.d support You Can't make it work((

    Comment


      #3
      Well, on last rom for Yuandao N70, modded by feriross (LINK), i can see all info about partitions through busybox df, native df and es file explorer, include size, used & free space, even as non-root user. And, init.d test script that he included in his rom do its work, so kernel in this rom may support init.d scripts.*

      Comment


        #4
        Originally posted by mixmax1982 View Post
        Without proper custom kernel with INIT.d support You Can't make it work((
        This is not true. I got it to work on my Arnova without init.d kernel support

        df works in a terminal but none of the file manager will show size. It's very odd. For instance onandroid from XDA comes back as no space on sdcard. df shows plenty of space.

        Onandroid is a OS level clockwork backup script that allows you to do a CWM backup without rebooting into CWM.
        Nandroid backups are usually performed in recovery mode. This means you would have to turn off your phone and reboot in recovery mode, which wastes a whole lot of time rebooting and a lot more time offline. For me, this has been a killer as I do...


        But it wont work due to this bug

        Bob
        "Pzebacz im, bo nie wiedzą, co czynią"
        "Прости им, они не ведают, что творят"
        "Perdona loro perché non sanno quello che fanno"
        "Vergib ihnen, denn sie wissen nicht, was sie tun"
        "Vergeef hen want ze weten niet wat ze doen"
        "Pardonne-leur car ils ne savent pas ce qu'ils font"
        "Perdónalos porque no saben que lo que hacen"
        "Oprosti im, jer ne znaju što čine"
        "Forgive them as they know not what they do"





        Comment


          #5
          But this script IS work! I looked into script, it gets free space from busybox df, and df gives real sizes. I made several backups by onandroid to internal card and external sdcard (with some modifications in script), all was successful. All actions i made on Yandao N70 with latest rom.
          But, maybe i don't fully understand this bug and its problem

          Comment


            #6
            The N70 works but the N90 or the N101 ROMs do not work. Onandroid always reports 0 space available.

            I find this interesting

            On my Arnova with Ginderbread
            df command output looks like this:
            filesystem Size Used Free blksize
            /mnt/storage/sdcard 29G 19G 10G 4096

            However when I do a df command on this Yaundao n101 it's different
            /mnt/storage/sdcard 27.9G 1.2M 27.9G 8192

            So it had .x decimal numbers not whole numbers. I think this is confusing Onandroid?

            However if you use
            busybox df
            the output is the same as my gingerbread ROM. So I do not get it.
            I am going to look into the script as it is obviously something different going on.


            What does the output look like on your N70 when you type df command?

            Bob
            "Pzebacz im, bo nie wiedzą, co czynią"
            "Прости им, они не ведают, что творят"
            "Perdona loro perché non sanno quello che fanno"
            "Vergib ihnen, denn sie wissen nicht, was sie tun"
            "Vergeef hen want ze weten niet wat ze doen"
            "Pardonne-leur car ils ne savent pas ce qu'ils font"
            "Perdónalos porque no saben que lo que hacen"
            "Oprosti im, jer ne znaju što čine"
            "Forgive them as they know not what they do"





            Comment


              #7
              Native df shows like this:
              /mnt/sdcard 12.5G 3.4 G 9.1 G 8192
              (spaces before G are real, not typo)

              busybox df (onandroid used busybox df) shows like this:
              /dev/block/vold/31:9 13071888 3567480 9504408 27% /mnt/sdcard

              busybox v1.19.4

              Comment


                #8
                Yea same as mine.... I dont get it.
                I have tried busybox 1.19.4 which is what I put in my ROM. I also tried older ones and the latest 1.20.4

                Onandroid just says I have 1mb available on sdcard and says not enough space.

                I posted on XDA to the guy and gave him my DF and mount dumps:

                app_48@android:/ $ export PATH=/data/local/bin:$PATH
                app_48@android:/ $ su
                app_48@android:/ # busybox df
                Filesystem 1K-blocks Used Available Use% Mounted on
                tmpfs 454964 36 454928 0% /dev
                tmpfs 454964 0 454964 0% /mnt/asec
                tmpfs 454964 0 454964 0% /mnt/obb
                /dev/block/mtdblock8 290576 233604 41972 85% /system
                /dev/block/mtdblock6 2064208 138560 1925648 7% /data
                /dev/block/mtdblock5 115056 4180 110876 4% /cache
                /dev/block/vold/31:9 29304864 1312 29303552 0% /mnt/sdcard
                /dev/block/vold/31:9 29304864 1312 29303552 0% /mnt/secure/asec
                /dev/block/vold/179:1
                11647776 2974968 8672808 26% /mnt/external_sd

                app_48@android:/ # busybox mount
                rootfs on / type rootfs (ro,relatime)
                tmpfs on /dev type tmpfs (rw,nosuid,relatime,mode=755)
                devpts on /dev/pts type devpts (rw,relatime,mode=600)
                proc on /proc type proc (rw,relatime)
                sysfs on /sys type sysfs (rw,relatime)
                none on /acct type cgroup (rw,relatime,cpuacct)
                tmpfs on /mnt/asec type tmpfs (rw,relatime,mode=755,gid=1000)
                tmpfs on /mnt/obb type tmpfs (rw,relatime,mode=755,gid=1000)
                none on /dev/cpuctl type cgroup (rw,relatime,cpu)
                /dev/block/mtdblock8 on /system type ext4 (rw,noatime,nodiratime,barrier=1,data=ordered,noau to_da_alloc)
                /dev/block/mtdblock6 on /data type ext4 (rw,nosuid,nodev,noatime,nodiratime,barrier=1,data =ordered,noauto_da_alloc)
                /dev/block/mtdblock5 on /cache type ext4 (rw,nosuid,nodev,noatime,nodiratime,barrier=1,data =ordered,noauto_da_alloc)
                /sys/kernel/debug on /sys/kernel/debug type debugfs (rw,relatime)
                /dev/block/vold/31:9 on /mnt/sdcard type vfat (rw,dirsync,nosuid,nodev,noexec,noatime,nodiratime ,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_uti me=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
                /dev/block/vold/31:9 on /mnt/secure/asec type vfat (rw,dirsync,nosuid,nodev,noexec,noatime,nodiratime ,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_uti me=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
                tmpfs on /mnt/sdcard/.android_secure type tmpfs (ro,relatime,size=0k,mode=000)
                /dev/block/vold/179:1 on /mnt/external_sd type vfat (rw,dirsync,nosuid,nodev,noexec,noatime,nodiratime ,uid=1000,gid=1015,fmask=0002,dmask=0002,allow_uti me=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
                app_48@android:/ #
                "Pzebacz im, bo nie wiedzą, co czynią"
                "Прости им, они не ведают, что творят"
                "Perdona loro perché non sanno quello che fanno"
                "Vergib ihnen, denn sie wissen nicht, was sie tun"
                "Vergeef hen want ze weten niet wat ze doen"
                "Pardonne-leur car ils ne savent pas ce qu'ils font"
                "Perdónalos porque no saben que lo que hacen"
                "Oprosti im, jer ne znaju što čine"
                "Forgive them as they know not what they do"





                Comment


                  #9
                  wait a sec. busybox df show you right info, total size of your sdcard is 29304864, used 1312, free 29303552 (0% used), all seem right?
                  it's a bug in onandroid script about free space calculation, i've already fixed it on my tablet.
                  previous code:
                  Code:
                  # Available space calculation
                  entry=`busybox df -m $sdcard | busybox tail -1`
                   freespace=`echo $entry | busybox cut -d ' ' -f 3 | busybox cut -d '%' -f 1`
                  patched code:
                  Code:
                  # Available space calculation
                  entry=`busybox df -m $sdcard | busybox tail -1`
                   freespace=`echo $entry | busybox cut -d ' ' -f 4 | busybox cut -d '%' -f 1`
                  And onandroid will not work with external-sd due to line break in busybox df output

                  Comment


                    #10
                    Thanks! that patch worked!

                    I wonder why the script runs fine on my Arnova with the same busybox version?

                    The only thing that still bothers me is that Root Explorer will not report free space.......
                    ES FIle explorer now reports space properly in my latest ROM but root explorer will not.

                    FYI I would not backup to external ssdcard anyway with the sd card corruption issue. However I still have to try formatting sdcard as 8192 blocks.

                    Bob
                    "Pzebacz im, bo nie wiedzą, co czynią"
                    "Прости им, они не ведают, что творят"
                    "Perdona loro perché non sanno quello che fanno"
                    "Vergib ihnen, denn sie wissen nicht, was sie tun"
                    "Vergeef hen want ze weten niet wat ze doen"
                    "Pardonne-leur car ils ne savent pas ce qu'ils font"
                    "Perdónalos porque no saben que lo que hacen"
                    "Oprosti im, jer ne znaju što čine"
                    "Forgive them as they know not what they do"





                    Comment

                    Working...
                    X