Alternative to app2sd >>>> link2sd

Discussion in 'Huawei Ideos S7 Technical' started by goodoane, Jan 30, 2011.

  1. goodoane
    Offline

    goodoane Junior Member

    Joined:
    Nov 25, 2010
    Messages:
    267
    Likes Received:
    90
    Trophy Points:
    16
    Location:
    Dacia
    @bakpinar
    Original link:[App] Link2SD - xda-developers

    Is not working now on our device but is just a matter of time.
    L.E.
    Now is nativelly working with the internal memory(sdcard)

    Files that you need for this:
    http://rapidshare.com/files/445330883/For_S7.zip

    Remember this it was tested on v104 best buy on an external card.

    A small tutorial for how to here:http://www.androidtablets.net/forum...4-alternative-app2sd-link2sd-3.html#post46002
    Last edited: Feb 11, 2011
    masamad and (deleted member) like this.
  2. probbiethe1
    Offline

    probbiethe1 Super Moderator Staff Member

    Joined:
    Jun 30, 2010
    Messages:
    1,840
    Likes Received:
    138
    Trophy Points:
    0
    Location:
    Gilbert, Arizona
    That looks pretty cool thanks for sharing

    Sent from my incredible using Android Tablet Forum
  3. goodoane
    Offline

    goodoane Junior Member

    Joined:
    Nov 25, 2010
    Messages:
    267
    Likes Received:
    90
    Trophy Points:
    16
    Location:
    Dacia
    The only way to make this working was to manualy make scripts for mounting the ext2 partition and to manualy create sdext2 folder in /data/sdext2.
    1st script install-recovery.sh
    2nd script init-sd.sh
  4. pvella
    Offline

    pvella Junior Member

    Joined:
    Dec 20, 2010
    Messages:
    392
    Likes Received:
    38
    Trophy Points:
    0
    Location:
    Melbourne
    Looks like a good option. How can I move to this with many existing apps in a2sd? Which apps can you move? Does it do apps and data? What about cache?

    Sent from my Ideos S7
  5. goodoane
    Offline

    goodoane Junior Member

    Joined:
    Nov 25, 2010
    Messages:
    267
    Likes Received:
    90
    Trophy Points:
    16
    Location:
    Dacia
    You can move only the downloaded application(no sytem). It dosn't move data or dalvik-cache.

    Sent from my Ideos S7 using Tapatalk
  6. pvella
    Offline

    pvella Junior Member

    Joined:
    Dec 20, 2010
    Messages:
    392
    Likes Received:
    38
    Trophy Points:
    0
    Location:
    Melbourne
    I think this would be a much safer and better solution than the current apps2sd that we are using. I am pretty sure I could script an install-recovery.sh to do the setup automatically. In the apps2sd thread, I have verified that we can use /cache for the dalvik-cache. I don't think there is any real need to move data or private directories, so I think this would be a superior solution and give the option of moving the apps that you want to. It would be best to start with an empty device. I will be doing some testing of this.
  7. pvella
    Offline

    pvella Junior Member

    Joined:
    Dec 20, 2010
    Messages:
    392
    Likes Received:
    38
    Trophy Points:
    0
    Location:
    Melbourne
    Been testing this out. It seems to work well and should generally be more stable.

    Some Observations:
    1) transition from apps2sd is hard, best to start again from a fresh rom and reinstall your apps from backup
    2) setup is a lot simpler, create directory, install the app and then reboot and manually move apps to sdcard
    3) Not all apps can be moved. Not really a problem, it is mainly system ones that dont work
    4) it broke my market when I installed, but easy enough to fix, reinstall and reboot
    5) you have to link your apps, then reboot before it takes effect
    6) gives the option of keeping widgets and sensitive apps on the internal memory, improved stability
    7) Titanium does not report apps2sd correctly, so you have no idea how much space is being used.

    Overall I like it. I am sticking with this for now and will keep doing more testing. I am using it this mod with the /cache mod to give me about 100M of free memory, with all my required apps installed. Not bad really. :)
  8. Markus31788
    Offline

    Markus31788 Junior Member

    Joined:
    Dec 13, 2010
    Messages:
    39
    Likes Received:
    7
    Trophy Points:
    0
    Location:
    Moultrie, Georgia
    Hey... What cache mod are you referring too? I must have missed that! Thanks
  9. pvella
    Offline

    pvella Junior Member

    Joined:
    Dec 20, 2010
    Messages:
    392
    Likes Received:
    38
    Trophy Points:
    0
    Location:
    Melbourne
    Another problem is when you upgrade an app, it someones breaks it. App also needs to be relinked.

    Cache mod is now described in apps2sd. The is an original post here somewhere. It comes from xda forum.

    Sent from my S7
    Markus31788 and (deleted member) like this.
  10. pvella
    Offline

    pvella Junior Member

    Joined:
    Dec 20, 2010
    Messages:
    392
    Likes Received:
    38
    Trophy Points:
    0
    Location:
    Melbourne
    Here is my setup for this.

    I have these files in /system/etc/

    install-recovery.sh
    #!/system/bin/sh
    #
    /system/etc/init-sd2.sh&
    /system/etc/init-camera.sh&
    /system/etc/init-cache.sh&

    init-sd2.sh
    #!/system/bin/sh
    MYLOG=/data/init-sd2.log
    echo "$(date) Starting init-sd2.sh" > $MYLOG
    echo "$(date) Waiting SD to become ready..." >> $MYLOG
    sleep 10
    mount -t ext2 /dev/block/vold/179:2 /data/sdext2 1>>$MYLOG 2>>$MYLOG
    mount >> $MYLOG
    echo "$(date) Finishing init-sd2.sh" >> $MYLOG


    init-cache.sh
    #!/system/bin/sh
    #
    MYLOG=/data/init-cache.log
    echo "$(date) Starting init-cache.sh" > $MYLOG
    if [ ! -d /cache/dalvik-cache ]
    then
    echo "$(date) ( !-d /cache/dalvik-cache)" >> $MYLOG
    mkdir /cache/dalvik-cache >> $MYLOG
    chown 1000:1000 /cache/dalvik-cache >> $MYLOG
    chmod 775 /cache/dalvik-cache >> $MYLOG
    fi

    if [ -L /data/dalvik-cache ]
    then
    echo "$(date) (-L /cache/dalvik-cache)" >> $MYLOG
    rm -f /data/dalvik-cache >> $MYLOG
    mkdir /data/dalvik-cache >> $MYLOG
    chown 1000:1000 /data/dalvik-cache >> $MYLOG
    chmod 775 /data/dalvik-cache >> $MYLOG
    elif [ ! -d /data/dalvik-cache ]
    then
    echo "$(date) (elsif ! -d /data/dalvik-cache)" >> $MYLOG
    mkdir /data/dalvik-cache >> $MYLOG
    chown 1000:1000 /data/dalvik-cache >> $MYLOG
    chmod 775 /data/dalvik-cache >> $MYLOG
    elif [ -d /data/dalvik-cache ]
    then
    for filename in /data/dalvik-cache/*
    do
    if [ -L $filename ]
    then
    rm -f $filename >> $MYLOG
    fi
    done
    mv /data/dalvik-cache/* /cache/dalvik-cache/ >> $MYLOG
    fi
    echo "$(date) Mounting Cache" >> $MYLOG
    mount -o bind /cache/dalvik-cache/ /data/dalvik-cache/ 1>>$MYLOG 2>>$MYLOG
    mount >> $MYLOG
    echo "$(date) Finishing init-cache.sh" >> $MYLOG


    My mounts now look like this

    # mount
    mount
    rootfs / rootfs ro 0 0
    tmpfs /dev tmpfs rw,mode=755 0 0
    devpts /dev/pts devpts rw,mode=600 0 0
    proc /proc proc rw 0 0
    sysfs /sys sysfs rw 0 0
    tmpfs /sqlite_stmt_journals tmpfs rw,size=4096k 0 0
    /dev/block/mtdblock1 /system yaffs2 ro 0 0
    /dev/block/mtdblock6 /data yaffs2 rw,nosuid,nodev 0 0
    /dev/block/mtdblock5 /cache yaffs2 rw,nosuid,nodev 0 0
    /dev/block/mtdblock5 /data/dalvik-cache yaffs2 rw,nosuid,nodev 0 0
    /dev/block/vold/179:2 /data/sdext2 ext2 rw,errors=continue 0 0
    /dev/block//vold/179:1 /sdcard vfat rw,dirsync,nosuid,nodev,noexec,uid=1000,gid=
    1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,s
    hortname=mixed,utf8,flush 0 0

    Space looks like this
    # busybox df -h
    busybox df -h
    Filesystem Size Used Available Use% Mounted on
    tmpfs 207.6M 16.0K 207.5M 0% /dev
    tmpfs 4.0M 0 4.0M 0% /sqlite_stmt_journals
    /dev/block/mtdblock1 160.0M 128.2M 31.8M 80% /system
    /dev/block/mtdblock6 175.0M 141.9M 33.1M 81% /data
    /dev/block/mtdblock5 94.8M 66.7M 28.1M 70% /cache
    /dev/block/mtdblock5 94.8M 66.7M 28.1M 70% /data/dalvik-cache
    /dev/block/vold/179:2
    1.4G 432.4M 968.1M 31% /data/sdext2
    /dev/block//vold/179:1
    13.4G 6.9G 6.5G 52% /sdcard
    #
  11. t.c
    Offline

    t.c Junior Member

    Joined:
    Feb 2, 2011
    Messages:
    25
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Sydney, Australai
    The link appears to have a problem any chance of posting it or can I get it through XDA?
    Edit. Looked at XDA and it's on the Market
    Last edited: Feb 6, 2011
  12. pvella
    Offline

    pvella Junior Member

    Joined:
    Dec 20, 2010
    Messages:
    392
    Likes Received:
    38
    Trophy Points:
    0
    Location:
    Melbourne
    Awesome. Let me know how you get on.
  13. TeacheronAndroid
    Offline

    TeacheronAndroid Junior Member

    Joined:
    Nov 21, 2010
    Messages:
    30
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    NULL
    Is there an easier way to implement this?

    I don't feel like I am confident enough to be able to try and run scripts to get this time. I'm very noobish to all of this.

    At the moment I really want to use my external card more for video and file viewing (PDFs, etc) but I seem unable to do so. Was hoping this could fix that issue or maybe I am having a different one.
  14. pvella
    Offline

    pvella Junior Member

    Joined:
    Dec 20, 2010
    Messages:
    392
    Likes Received:
    38
    Trophy Points:
    0
    Location:
    Melbourne
    No mod needed to do that. S7 will read video and docs straight from sd. That works out of the box.

    Sent from my S7
  15. bakpinar
    Offline

    bakpinar Junior Member

    Joined:
    Feb 6, 2011
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    Hello,

    I am the developer of Link2SD.
    Currently I'm working on to make Link2SD usable on more devices.

    I received some emails which state that Link2SD does not work on Huawei ascend. While investigating the problem I saw your post.

    This is exactly what Link2SD does for making Android mount ext2 partition at boot time. The only difference is Link2SD puts these lines in /system/etc/install-recovery.sh directly
    but you put these in a different script and call it from install-recovery.sh in the background.
    That is the reason of the problem? Did you try with install-recovery.sh script? (without second script)

    Thanks
  16. pvella
    Offline

    pvella Junior Member

    Joined:
    Dec 20, 2010
    Messages:
    392
    Likes Received:
    38
    Trophy Points:
    0
    Location:
    Melbourne
    Awesome work on link2sd, really appreciate the effort of the development community.

    There is no problem with the scripts. This is the way that we have got this to work on the Huawei S7. I would be happy to do more testing for you. We currently do not have a recovery ROM and custom ROMs will come, but for now, the only way we can add mods at boot time is to use the install-recovery.sh. I can send you some screenshots showing link2sd working on my device. It would be amazing to have official support for the Huawei S7 for this application, and I am happy to help you out with testing it. I am sure there are many others in this forum that would like to help out too.

    If you look carefully at the script you will see that it is called a couple of other mods as well. One is the /cache remount mod. The other is a camera fix mod.
  17. xaueious
    Offline

    xaueious Administrator Staff Member

    Joined:
    Jul 9, 2010
    Messages:
    3,486
    Likes Received:
    433
    Trophy Points:
    0
    Location:
    Canada
    This is nice. Might look into this later.
  18. pvella
    Offline

    pvella Junior Member

    Joined:
    Dec 20, 2010
    Messages:
    392
    Likes Received:
    38
    Trophy Points:
    0
    Location:
    Melbourne
    once we get all the other good stuff into a custom ROM, we should be able to run with standard link2sd. It did not work for me as standard. Cannot remember why.

    Sent from my S7
  19. jjnagy
    Offline

    jjnagy Junior Member

    Joined:
    Dec 2, 2010
    Messages:
    24
    Likes Received:
    3
    Trophy Points:
    0
    Location:
    NULL
    Are you sure? I am using these scripts with the cache and camera fix lines removed, so install-recovery.sh should only be running the init-sd2.sh portion. I am still using original ROM on the Huawei S7 from US Best Buy, and it doesn't work properly? If I go in and manually run the init-sd2.sh script I can get link2sd to work until I reboot, and then for some reason the mount to ext2 is lost? So for some reason the script does not seem to run properly when booting up.

    Did you have to do anything else to get the ext2 scripts to work on the S7? Could there be an issue the ROM version I'm using versus yours Singapor?

    Would really appreciate your help and insight into this issue. This is really the only issue I have with the Huawei S7, geeting more app memory space.

  20. pvella
    Offline

    pvella Junior Member

    Joined:
    Dec 20, 2010
    Messages:
    392
    Likes Received:
    38
    Trophy Points:
    0
    Location:
    Melbourne
    The most common problem is CR and LF at the end of lines. Especially if you edit the files in windows. See my notes in the apps2sd section about notepad ++.

    It works awesome on my S7.

    Sent from my S7

Share This Page