[Q] Does absence of Init.d cause Boot-Loop for Link2SD? - Sony Xperia L

What is Link2SD?
Link2SD is an app for Android 2.0+ users on their phone to move applications to the SD card by dual-partitioning the card. First partition gets mounted as external SD and remains available for general use, while the second partition (preferably formatted with an *NIX type file-system, e.g. ext2, ext3, ext4 etc.) holds executable(.apk), data, dalvik-cache(.dex) and library files(.so) for linked/moved application.
Link2SD mounts the second partition of your SD card as /data/sdext2 and makes OS mounts it at boot time. When you select an application and press "Create Link" button you can select which files of the application will be linked and moved to SD card. Apk, dex and lib files can be moved and you can select all three or any two of three or even only one of them. Depending on what you select, Link2SD moves apk file, dalvik-cache (.dex) file and lib files (.so) to SD card's second partition and creates symbolic links in original directories. Phone must be Rooted, of course.
How does mounting of second SD partition work?
After the partitioned SD card is put in the phone, Link2SD asks you to select the file-system of the second partition on SD, just chose the one you used. Once /system/etc/init.d/11link2sd script is created, you have to restart the phone.
What is init.d support and why is it needed?
init.d directory is the container of start-up scripts in a *NIX type system. These scripts are execute during system boot.
Link2SD relies on the execution of /system/etc/init.d/11link2sd script which, in turn, mounts the second partition of SD card as /data/sdext2.
What is the Boot-Loop problem?
The SD card storage is dual-partitioned and put in the phone. Then, Link2SD generates mount script for the second partition of SD card and phone needs to be re-started. Some phones, e.g. Sony Xperia-L runs into infinite boot-sequence a.k.a. boot-loop. In this state, phone boot sequence starts, manufacturer logo is displayed proceeds for a few seconds and restarts. Only solution is to long press the power button or taking out the battery to switch the phone off.
Interestingly, if the dual-partitioned SD card is taken out and the phone is booted without SD card inserted, it boots normally.
What did I do with my Xperia-L so that it started boot-looping?
Rooted Xperia using Rootkit method. It leaved /system/etc/install_recovery.sh and /system/etc/init.d/00stop_ric scripts on the phone's file-system. (Script code listed below). I am using the rooted phone for months without any trouble.
Using an un-partitioned 32GB microSD card, formatted with FAT32, in the phone.
Deciding to give a try to Link2SD, I dual-partitioned the SD using Minitool Partition Manager. First partition was formatted with FAT32 while the second one was formatted with ext4. Sizes of partitions were around ~25GB and ~4.5GB respectively.
Installed Link2SD on phone.
Switched the phone OFF.
Put the dual-partitioned SD back in the phone slot.
Switched the phone ON.
Opened Link2SD app.
Link2SD immediately recognized the second partiton, asking me for its file-system type.
Selected ext4 from the list.
Link2SD generated the mount script and prompted for restart.
Restarted the phone.
Boot-Loop!!!
Switched the phone OFF by taking out battery.
Took the dual-partitioned memory card out.
Switched the phone ON.
Phone starts normally!!!
How did I solve the problem?
I installed Init.d Toggler app as described here.
As described here, I experienced the problem of first partition not being mounted. The error was related to SD Card being empty or the file-system damaged.
I re-formatted the first partition of SD with NTFS.
Installed Paragon exFAT, NTFS & HFS+ app.
Now, the first partition got mounted.
What does Init.d Toggler do?
Appends the following command at the end of /system/etc/install_recovery.sh: /system/bin/sysinit
Creates /system/bin/sysinit script.
Creates /system/etc/init.d directory to put the start-up scripts in.
Does REALLY lack of init.d support cause boot-loop problem?
As the Init.d Toggler solution says,
One of the requirements to use the Link2SD is the support to init.d scripts. Most of the custom roms support this, but not the stock one, giving a boot loop.
Click to expand...
Click to collapse
I doubt that to be the "real" problem underlying the hood. Why?
How come lack of init.d support cause the mount script /system/etc/init.d/11link2sd malfunction? At most, what could have happened is, it would NOT mount the second partition, that's it. Right? But, isn't it surprising to crash or the like during boot?
As stated, even prior to installing Link2SD, there always existed /system/etc/init.d/00stop_ric, which contains almost similar set of commands as that of mount script /system/etc/init.d/11link2sd created by Link2SD. It used to work like a charm. I guess, because of init.d support not being there in stock ROM, the script had never been executed before I used Init.d Toggler.
Had the lack of init.d support been the reason of boot-loop, how did the phone manage itself to boot normally with the dual partitioned SD card taken out? Please note that, the mount script was still residing in init.d directory.
To be noted that, Xperia L (Stock ROM) boots fine with a dual-partitioned SD card put in, though it never mounts the second partition.
At this point, can anyone help me investigate the root-cause behind the boot-loop problem? Can anyone come up with any idea or satisfactory answer to the query? Does anyone have any idea on how to approach the issue at hand?
Please find the relevant scripts below.
00stop_ric
Code:
#!/system/bin/sh
/system/xbin/busybox pkill /sbin/ric
mount -o remount,rw /
rm /sbin/ric
mount -o remount,ro /
/system/xbin/busybox pkill /sbin/ric
11link2sd
Code:
#!/system/bin/sh
#added by link2sd
LOG=/data/link2sd-11link2sd.log
echo "$(date) mounting..." > $LOG
sleep 2
mount -t ext4 -o rw /dev/block/vold/179:34 /data/sdext2 1>>$LOG 2>>$LOG
mount -t ext4 -o rw /dev/block/mmcblk1p2 /data/sdext2 1>>$LOG 2>>$LOG
mount >> $LOG
echo "$(date) mount finished" >> $LOG
install-recovery
Code:
#!/system/bin/sh
# If you're implementing this in a custom kernel/firmware,
# I suggest you use a different script name, and add a service
# to launch it from init.rc
# Launches SuperSU in daemon mode only on Android 4.3+.
# Nothing will happen on 4.2.x or older, unless SELinux+Enforcing.
# If you want to force loading the daemon, use "--daemon" instead
/system/xbin/daemonsu --auto-daemon &
# Some apps like to run stuff from this script as well, that will
# obviously break root - in your code, just search this file
# for "install-recovery-2.sh", and if present, write there instead.
/system/bin/sysinit
sysinit
Code:
#!/system/bin/sh
export PATH=/sbin:/system/sbin:/system/bin:/system/xbin
/system/bin/logwrapper /system/xbin/run-parts /system/etc/init.d
link2sd-11link2sd
Code:
Wed Jul 23 16:23:57 IST 2014 mounting...
mount: Device or resource busy
mount: Device or resource busy
rootfs / rootfs ro,relatime 0 0
tmpfs /dev tmpfs rw,nosuid,relatime,mode=755 0 0
devpts /dev/pts devpts rw,relatime,mode=600 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
debugfs /sys/kernel/debug debugfs rw,relatime 0 0
none /acct cgroup rw,relatime,cpuacct 0 0
tmpfs /mnt/secure tmpfs rw,relatime,mode=700 0 0
tmpfs /mnt/asec tmpfs rw,relatime,mode=755,gid=1000 0 0
tmpfs /mnt/obb tmpfs rw,relatime,mode=755,gid=1000 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
/dev/block/platform/msm_sdcc.1/by-name/system /system ext4 ro,relatime,data=ordered 0 0
/dev/block/platform/msm_sdcc.1/by-name/userdata /data ext4 rw,nosuid,nodev,relatime,noauto_da_alloc,data=ordered 0 0
/dev/block/platform/msm_sdcc.1/by-name/cache /cache ext4 rw,nosuid,nodev,relatime,data=ordered 0 0
/dev/block/platform/msm_sdcc.1/by-name/persist /persist ext4 rw,nosuid,nodev,relatime,data=ordered 0 0
/dev/block/platform/msm_sdcc.1/by-name/ftmd /ftmd ext4 rw,nosuid,nodev,relatime,data=ordered 0 0
/dev/block/platform/msm_sdcc.1/by-name/LTALabel /lta-label ext4 rw,nosuid,nodev,relatime,data=ordered 0 0
/dev/block/platform/msm_sdcc.1/by-name/ftma /ftma ext4 ro,relatime,nobarrier,data=ordered 0 0
/dev/block/platform/msm_sdcc.1/by-name/modem /firmware vfat ro,relatime,uid=1000,gid=1000,fmask=0337,dmask=0227,codepage=cp437,iocharset=iso8859-1,shortname=lower,errors=remount-ro 0 0
/dev/block/mmcblk1p1 /storage/sdcard1 fuseblk rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096 0 0
/dev/block/vold/179:34 /data/sdext2 ext4 rw,relatime,data=ordered 0 0
/dev/block/vold/259:0 /storage/sdcard0 vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/block/vold/259:0 /mnt/secure/asec vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
tmpfs /storage/sdcard0/.android_secure tmpfs ro,relatime,size=0k,mode=000 0 0
/dev/block/dm-0 /mnt/asec/uk.co.aifactory.chessfree-2 ext4 ro,dirsync,nosuid,nodev,noatime 0 0
/dev/block/dm-1 /mnt/asec/com.wave18.adbwireless-1 ext4 ro,dirsync,nosuid,nodev,noatime 0 0
/dev/block/dm-2 /mnt/asec/com.rerware.android.MyBackupRoot-1 ext4 ro,dirsync,nosuid,nodev,noatime 0 0
/dev/block/dm-3 /mnt/asec/com.rootuninstaller.free-2 ext4 ro,dirsync,nosuid,nodev,noatime 0 0
Wed Jul 23 16:23:59 IST 2014 mount finished

Related

Missing space with new Apps2SD method

I was trying to use the new Apps2SD method by Marcus and I seem to be running into a problem. When I try to remove the unionfs partition through either G-Parted or disk utility I cannot remove/format it.
As far as I'm aware unionfs is NOT supported in G-parted nor in Mac OS. I only have a 1GB FAT32 partition and the other 3GB seem to be lost. I searched the forums and Google but cannot find anything. Does anyone have any suggestions?
im not sure what are you trying to do, but you can repartition removing phone's sd card and plugin it into a computer. If you want to repartition / change partitions with you phone acting as sd card reader connected with usb, you will have to undo unionfs process before trying to repartition / make any changes to sdcard
that last can be acomplished removing /data/init.rc and /data/a2sd.sh and rebooting the phone.
if this doesnt help you, provide more info, like the output of "df" command.
What I'm trying to do is restart Marcus's unionfs Apps2SD by destroying the partitions so I can get a fresh start. I tried deleting the 2 files you told me about but that didn't work. Heres the output of df:
# busybox df
Filesystem 1K-blocks Used Available Use% Mounted on
tmpfs 49356 0 49356 0% /dev
tmpfs 4096 0 4096 0% /sqlite_stmt_journals
/dev/block/mtdblock3 92160 60244 31916 65% /system
/dev/block/loop0 492 492 0 100% /system/modules
/dev/block/loop1 3524 3524 0 100% /system/xbin
/dev/block/mtdblock5 91904 23756 68148 26% /data
/dev/block/mtdblock4 30720 1160 29560 4% /cache
/dev/block//vold/179:1
991664 0 991664 0% /sdcard
Thanks!

[06/06/09] Haykuro 6.0r1 boot.img with atime+ext3 mod (and now hero)

Well, there was a lot of chatter today about the speed increases on cyanogen's JF-1.51 ROM today, attributed to some changes in the ramdisk (see below). Attached is a boot.img with the same modifications but for Haykuro's 6.0r1 build - go ahead and download it now or read on for more details. Note: you'll only notice a difference if you run your apps/cache from your SD card.
The Changes
The only change is to mount your SD card's ext2 partition with the 'noatime' option. This is exactly what cyanogen did in his JF build, as per his post here. I also added the 'nodiratime' option. This is merely a very minor change in the runme.sh script of the boot ramdisk. [See below for more info on the ext3 mod, added 05/27/09]
By default, ext2 maintains the last access time ('atime') of every file and directory in the filesystem. This means that every time you access (read or write to) a file, this time will be reset and you'll be writing to your SD card. Two problems: 1) SD cards are slow as it is; requiring a write every time you access a file is going slow your whole system down. 2) SD cards fail after enough writes to the same location, so you're reducing your card lifetime by not having these options.
ext3 'auto' mod
Cyanogen added this to his latest build, so again, merely making this available for Haykuro 6.0r1 users. He wrote a bit more detail here which is working reading too.
In short: No other ROMs or app2sd solutions handle a clean shutdown of the ext2 partition, and Android doesn't have fsck tools. The result is that shutting down or crashing can corrupt your ext2 partition and you can lose data. Meanwhile, ext3 is a journaling file system; it recovers gracefully from unclean shutdowns. It's also backwards compatible, you can still mount an ext3 as ext2, you just lose journaling capability.
The mod mounts the 2nd SD partition as type 'auto', which means it will read your existing partition as ext2 and in the future as ext3 if you upgrade. This is more for advanced users but I'll try post some simple instructions below. Make sure you download the boot-haykuro-6.0r1-atime-ext3.zip image.
What about hero? (added 06/06/09)
This is a modded kernel 2.6.29 with unionfs support from daproy. Besides the atime+ext3 stuff, by request I also added support to run /system/init.rc and /data/init.rc (needed by some scripts).
http://turtle.wastelands.net/dragon/...uto-initrc.zip
See also:
1) Daproy's release: http://forum.xda-developers.com/showthread.php?p=3905574#post3905574
2) Release in this thread: http://forum.xda-developers.com/showpost.php?p=3909682&postcount=10
Note: you also need to
1) adb remount
2) push wlan.ko /system/lib/modules
How to apply
Download and unzip the file to get your new boot.img
Option 1:
Code:
adb push boot.img /sdcard
adb shell
# cat /dev/zero > /dev/mtd/mtd2 write: No space left on device [this is ok, you can ignore]
# flash_image boot /sdcard/boot.img
(or mount your SD card, copy the image, and run the above commands in a terminal).
Option 2:
1. Boot into fastboot mode (boot with power+camera)
2. fastboot flash boot boot.img
How to check if it's working
Type 'mount' in an adb shell or your phone's terminal, and look for the 'noatime' and 'nodiratime' option on your ext2 mount point. (If you go ahead with the ext3 mod and upgrade, you'll see it will show up as ext3 in the mount list below).
Code:
$ adb shell
# 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/mtdblock3 /system yaffs2 rw 0 0
/dev/block/mtdblock5 /data yaffs2 rw,nosuid,nodev 0 0
/dev/block/mtdblock4 /cache yaffs2 rw,nosuid,nodev 0 0
/dev/block/mmcblk0p2 /system/sd ext2 rw,[b]noatime,nodiratime[/b],errors=continue 0 0 <--
/dev/block//vold/179:1 /sdcard vfat rw,dirsync,nosuid,nodev,noexec,uid=1000,gid=1000,fmask=0711,dmask=0700,allow_utime=0022,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8 0 0
If things go wrong
If for some reason you can't boot after trying this, you can restore your system simply by reapplying Haykuro's image (boot with power+home and alt-s). Alternatively, I'm attaching the original boot.img as well, which you could reflash with option 2 above.
How to upgrade your ext2 partition to an ext3
I found this really easy on Linux. People can write about alternative methods, but this worked great for me: (substitute /dev/sdb2 below as necessary)
1. Connect to USB and mount your SD card in Android
2. Unmount your ext2 partition from inside linux (e.g. sudo umount /dev/sdb2)
3. sudo tune2fs -j /dev/sdb2 (this adds a journal to the filesystem)
4. adb shell, reboot (or just reboot phone without tapping 'turn off USB storage')
Even though I found this really simple and didn't even bother to make a back up first, I'm really familiar with Linux and linux filesystems -- this should be considered advanced use, and I'm not responsible for you losing your entire ext3 partition.
Note - I agree with cyanogen; I don't think the journal writes is a big performance impact or will wear out your card. This is a relatively small amount of extra data on each write... very low performance/wear impact and for me very worth the benefits.
References
1. Original launch thread of cyanogen's JF 1.51 build
2. Boot Image how to referenced by cyanogen's post
I'm also attaching my compiled versions of mkbootfs and mkbootimg in case anyone wants to play around without downloading and compiling the 2.3 GB Android source.
Worked like a charm thanks man!
This worked perfectly for me! Great job on this; noticable speed improvements for me
Not a great improvement.. Apps are starting circa a second faster..
anyone try this or have a method for Haykuro's Hero build?
boot.img for JACHero r1.4
jroid said:
anyone try this or have a method for Haykuro's Hero build?
Click to expand...
Click to collapse
Which build? I think beta 4 is out yes? I haven't moved over to Hero yet because of the bluetooth issue. Nevertheless, I just made a boot.img for JACHero1.4 - it's untested, but can't imagine it giving any problems... you can always just reapply the update.zip if things go wrong (I still take no responsibility though ). It will probably work with the recent hero builds, let me know how it goes.
I was reffering to the official build he dropped w/ rosie.
thanx I'll give it a shot
confirmed. works on hero build.
very noticeable speed improvement. thanks
# cat /dev/zero > /dev/mtd/mtd2 write: No space left on device
cat /dev/zero > /dev/mtd/mtd2 write: No space left on device
write: No space left on device
# flash_image boot /sdcard/boot.img
flash_image boot /sdcard/boot.img
# 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/mtdblock3 /system yaffs2 ro 0 0
/dev/block/mtdblock5 /data yaffs2 rw,nosuid,nodev 0 0
/dev/block/mtdblock4 /cache yaffs2 rw,nosuid,nodev 0 0
/dev/block/mmcblk0p2 /system/sd ext2 rw,errors=continue 0 0
/dev/block//vold/179:1 /sdcard vfat rw,dirsync,nosuid,nodev,noexec,uid=1000,gid=
1000,fmask=0000,dmask=0000,allow_utime=0022,codepage=cp437,iocharset=iso8859-1,s
hortname=mixed,utf8 0 0
# reboot
reboot
C:\>adb shell
# 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/mtdblock3 /system yaffs2 ro 0 0
/dev/block/mtdblock5 /data yaffs2 rw,nosuid,nodev 0 0
/dev/block/mtdblock4 /cache yaffs2 rw,nosuid,nodev 0 0
/dev/block/mmcblk0p2 /system/sd ext2 rw,noatime,nodiratime,errors=continue 0 0
/dev/block//vold/179:1 /sdcard vfat rw,dirsync,nosuid,nodev,noexec,uid=1000,gid=
1000,fmask=0000,dmask=0000,allow_utime=0022,codepage=cp437,iocharset=iso8859-1,s
hortname=mixed,utf8 0 0
#
Click to expand...
Click to collapse
confirmation #2 it works on hero w/ Rosie
From another thread:
http://forum.xda-developers.com/showpost.php?p=3905574&postcount=42
daproy said:
Ok I reverted the recent commits to the 2.6.29 tree and camera works fine again and I patched in UnionFS. Sorry for the mess guys. I guess it shows I should have tested it before uploading. I put the kernel zImage in there separate as well in case people wanted to make their own boot.img
http://drop.io/tgbvqky
Click to expand...
Click to collapse
For those that were asking, here are some mods to daproy's great work.
* Mounts the 2nd partition as type 'auto' - ext3 if u have it, else ext2.
* Mounts with noatime and nodiratime options
* Includes appropriate calls to /system/init.rc and /data/init.rc
http://turtle.wastelands.net/dragon/android/hero-boot-unionfs-2-atime-auto-initrc.zip
Kinslayer81 said:
From another thread:
http://forum.xda-developers.com/showpost.php?p=3905574&postcount=42
For those that were asking, here are some mods to daproy's great work.
* Mounts the 2nd partition as type 'auto' - ext3 if u have it, else ext2.
* Mounts with noatime and nodiratime options
* Includes appropriate calls to /system/init.rc and /data/init.rc
http://turtle.wastelands.net/dragon/android/hero-boot-unionfs-2-atime-auto-initrc.zip
Click to expand...
Click to collapse
Hey thanks for the new kernel package.
Simple question.
I had now problem fastbooting the boot.img or adb pushing the wlan.ko but what do I do with the kernel file? Anything, or is it just there in case I want to make changes to the boot or wlan.ko files?
Ext3 on flash media drastically reduces the lifetime because of the frequent writes to the journal, a simple search on google brings up tons of things against the idea, yaffs2 or jffs would be a better decision because it is optimized for flash media and has a journal, not everyone has a class 6 sdhc, and ext3 will cause curruption in any lower class sd, and it will reduce a class's lifetime as well, there is plenty of docs and specs on this, if u prefer speed over reliability/sd lifetime have fun
defconoi said:
Ext3 on flash media drastically reduces the lifetime because of the frequent writes to the journal, a simple search on google brings up tons of things against the idea, yaffs2 or jffs would be a better decision because it is optimized for flash media and has a journal, not everyone has a class 6 sdhc, and ext3 will cause curruption in any lower class sd, and it will reduce a class's lifetime as well, there is plenty of docs and specs on this, if u prefer speed over reliability/sd lifetime have fun
Click to expand...
Click to collapse
This has been discussed ad nauseam.
Even in average high use (compiling the linux kernel!), ext3/journalling with the noatime option results in LESS THAN A 4% INCREASE IN WRITES. Even an abnormal case ('make clean' on the linux kernel, i.e. deleting literally thousands of files) maxed out at a 40% increase, which for deletes really isn't such a big deal. http://thunk.org/tytso/blog/2009/03/01/ssds-journaling-and-noatimerelatime/
Yaffs2, etc, ARE WORSE FOR YOUR SD CARD, which implements it's own hardware anti wear levelling. If you have the hardware and software both swapping around locations, you're doing more work, making things slower, and shortening the life of your card. Flash file systems are contra indicated for SD and other such media.
And it's not about preferring speed over reliability. Ext3 will be slightly slower than ext2, but it's definitely more reliable, because when you shut down, your phone crashes or something else goes wrong, it can recover gracefully instead of YOUR EXT2 PARTITION BECOMING CORRUPT and you losing your data.
I hope this issue is closed now.
ccyrowski said:
Hey thanks for the new kernel package.
Simple question.
I had now problem fastbooting the boot.img or adb pushing the wlan.ko but what do I do with the kernel file? Anything, or is it just there in case I want to make changes to the boot or wlan.ko files?
Click to expand...
Click to collapse
Yea I did the steps with the boot.img and wlan.ko and it appears to be working (noatime and nodiratime are showing). But whats the deal with the kernal file?
sacredsoul said:
Yea I did the steps with the boot.img and wlan.ko and it appears to be working (noatime and nodiratime are showing). But whats the deal with the kernal file?
Click to expand...
Click to collapse
It was included by daproy for ROM developers. I just left it in there to provide the complete package. You can safely ignore it
Kinslayer81 said:
It was included by daproy for ROM developers. I just left it in there to provide the complete package. You can safely ignore it
Click to expand...
Click to collapse
Ah. Thanks man! Enjoying my speedy JACHero Optimized build with this boot.img.
i pushed the wlan and use fastboot to flash the boot.img but when i check with the "mount" command it shows :
i'm using Jac's ROM
/dev/block/mmcblk0p2 /systemsd ext2 rw,errors=continue 00
instead of this:
/dev/block/mmcblk0p2 /system/sd ext2 rw,noatime,nodiratime,errors=continue 0 0
I get a wifi unable to start.
ifconfig tiwlan0 in Terminal returns No such device. Any help guys? Yes I tried rebooting already.
EDIT: Posted this on JACHero thread too. Posting here to get more response...
adb remount
adb push wlan.ko /system/lib/modules
Click to expand...
Click to collapse
Microsoft Windows [Version 6.1.7100]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\Shanker>cd C:\android-sdk-windows-1.5_r1\tools
C:\android-sdk-windows-1.5_r1\tools>adb remount
remount succeeded
C:\android-sdk-windows-1.5_r1\tools>adb push wlan.ko /system/lib/modules
1117 KB/s (676043 bytes in 0.591s)
C:\android-sdk-windows-1.5_r1\tools>
Click to expand...
Click to collapse
I rebooted and I still cant start wifi. Btw I am using the kinslayer81 boot.img for JACHero 1.4...
namsir said:
i pushed the wlan and use fastboot to flash the boot.img but when i check with the "mount" command it shows :
i'm using Jac's ROM
/dev/block/mmcblk0p2 /systemsd ext2 rw,errors=continue 00
instead of this:
/dev/block/mmcblk0p2 /system/sd ext2 rw,noatime,nodiratime,errors=continue 0 0
Click to expand...
Click to collapse
i got the samething.... when i check to see if its working with "mount"
it doesnt show the noatime, nodiratime :\
Kinslayer81 said:
From another thread:
http://forum.xda-developers.com/showpost.php?p=3905574&postcount=42
For those that were asking, here are some mods to daproy's great work.
* Mounts the 2nd partition as type 'auto' - ext3 if u have it, else ext2.
* Mounts with noatime and nodiratime options
* Includes appropriate calls to /system/init.rc and /data/init.rc
http://turtle.wastelands.net/dragon/android/hero-boot-unionfs-2-atime-auto-initrc.zip
Click to expand...
Click to collapse
can we do aufs/unionFS on Haykuro's original hero build? I've got the new boot.img and wlan.ko and ext3 FS, just wondering what I would need to do.

[SOLVED] [Q] cant get dexter's native ext2/3 support working

Trying to get Dexter's native ext2 support working.
I pulled my SD card (8gb) and using GParted within Ubuntu, deleted my FAT32 partition, created 1st partition FAT32 ~7gb, 2nd partition ext2 (1gb), 3rd partition SWAP (64mb)
I understand that with Dexter's 1.1b, when the phne is booted with the card in, it should find the ext2 partition and proceed to move my apps to this partition.
Note, I also tried ext3 in the same partition configuration.
Under memory/sd card sotrage, phone is reading ~6.9GB as expected of the FAT32 partition.
Am I missing a step? Nothing ever gets moved from the phone to the card's ext2 partition.
ext2,3 problem on dexters rom
Sorry first post noob, hopefully im doing this right
I used mini tool partition wizard... i tried ext2 then ext3, made them logical and primary, with the swap partition. (do we need that swap ..i haven't tried it without it).
And the entire memory card wouldn't be recognised/mount at all when turning on the phone. I had to remove the partitions to be able to use the memory card in the normal manner.
is there another step? i was hoping all i had to do was make the partition and it would be done.
help!
did u guys set the ext partition to active?
I did not mark any partition active (none of the many guides on the net say anything about setting partition flags). My layout (per parted) looks like this:
Code:
Number Start End Size Type File system Flags
1 1049kB 6818MB 6817MB primary fat32
2 6818MB 7892MB 1074MB primary ext2
3 7892MB 7959MB 67.1MB primary linux-swap
Which matches every screenshot I have seen of parted/Gparted in any formatting guide.
I did find one that had fat32 marked as lba, but that makes no difference.
R-D said:
I understand that with Dexter's 1.1b, when the phne is booted with the card in, it should find the ext2 partition and proceed to move my apps to this partition.
Note, I also tried ext3 in the same partition configuration.
Click to expand...
Click to collapse
What is the output of "mount" after your phone boots up? Check if it is mounted already. If not try to mount it manually. At least we'll know if the issue is in phone recognizing the partitions.
I realised what i did wrong ..I tried to make the ext2 partition after I 'installed/flashed' dexters rom ...this messed everything up for me.
So I re-did the entire process but made my ext2 partition first. Now its allgood
Don't know if that helps
Sent from my XT720 using XDA App
kousik said:
What is the output of "mount" after your phone boots up? Check if it is mounted already. If not try to mount it manually. At least we'll know if the issue is in phone recognizing the partitions.
Click to expand...
Click to collapse
Here's the default mount output:
Code:
rootfs / rootfs rw 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
none /dev/cpuctl cgroup rw,cpu 0 0
/dev/block/mtdblock7 /system yaffs2 ro 0 0
/dev/block/mtdblock9 /data yaffs2 rw,nosuid,nodev 0 0
/dev/block/mtdblock8 /cache yaffs2 rw,nosuid,nodev 0 0
/dev/block/mtdblock6 /cdrom yaffs2 rw 0 0
tmpfs /tmp tmpfs rw,size=2048k 0 0
tmpfs /skttmp tmpfs rw,size=2048k 0 0
/dev/block/mtdblock0 /pds yaffs2 rw,nosuid,nodev 0 0
/dev/block/mtdblock7 /system/lw yaffs2 ro 0 0
tmpfs /dev tmpfs rw,mode=755 0 0
devpts /dev/pts devpts rw,mode=600 0 0
none /acct cgroup rw,cpuacct 0 0
tmpfs /mnt/asec tmpfs rw,mode=755,gid=1000 0 0
none /dev/cpuctl cgroup rw,cpu 0 0
tmpfs /tmp tmpfs rw,size=2048k 0 0
/dev/block/vold/179:1 /mnt/sdcard vfat rw,dirsync,nosuid,nodev,noexec,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/block/vold/179:1 /mnt/secure/asec vfat rw,dirsync,nosuid,nodev,noexec,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
tmpfs /mnt/sdcard/.android_secure tmpfs ro,size=0k,mode=000 0 0
When I try and mount it manually, which device name is preferred? I found the partitions (1 = fat32, 2 = ext2, 3 = swap) as these names:
/dev/block/vold/179:1
/dev/block/mmcblk0p1
/dev/block/vold/179:2
/dev/block/mmcblk0p2
/dev/block/vold/179:3
/dev/block/mmcblk0p3
I can mount partition 1 manually referencing either device name, but when I try to mount partition 2 it says: mount: No such device
I know it is the right device because I can mount the fat32 partition.
Thanks for your help.
Edit: I saw in dateno1's script in the dev thread, he is doing insmod /system/lib/modules/ext2.ko before the mount, I do not have this module (I know he has it in his download package) but should I already have this in /system/lib/modules? Does this exist already for anyone else? Or am I guessing at the wrong thing?
R-D said:
I can mount partition 1 manually referencing either device name, but when I try to mount partition 2 it says: mount: No such device
I know it is the right device because I can mount the fat32 partition.
Edit: I saw in dateno1's script in the dev thread, he is doing insmod /system/lib/modules/ext2.ko before the mount, I do not have this module (I know he has it in his download package) but should I already have this in /system/lib/modules? Does this exist already for anyone else? Or am I guessing at the wrong thing?
Click to expand...
Click to collapse
"No such device" is indication that the kernel module is not loaded properly.
You may have to insmod ext2.ko yourself to get it to work. If you do not have the .ko files, you can download from http://dateno1.egloos.com/27191 yourself and copy to /system/lib/modules. Also you can see this thread http://forum.xda-developers.com/showthread.php?t=929871 for reference.
Okay, mystery solved!
I am missing these modules as I grabbed the "original" 1.1b update (1.1a-update.zip). This original file was missing these modules and had an incorrect overclock module.
I just re-downloaded 1.1b again, and found that if I look in the ZIP file, it has the missing modules I didnt initially get.
In speaking with Dexter, it seems that he updated the 1.1b (1.1a-update.zip) file twice, but kept the same file and version name. So the 1.1b everyone else is using, is newer than the 1.1b I downloaded, as I downloaded it right after it was first posted and missed the next update as it had the same filename.
Essentially, what amounted to 1.1c was also released as 1.1b ...
So lesson is, either redownload and apply the 1.1b update, or update to 1.2 (or newer as they come).
Thanks for your help.
Oh ! Confusing this 1.1a/b/c !
is it nid to do it manually? 1.1b did detect my ext2.. but in 1.2 did not detect.. i try put ext2 and ext4 ald..

[Q] How to fix /mnt/extSdCard hassles on my GT2?

I recently purchased a large (32G) sdcard for my Galaxy Tab 2 (10.1), so I can have a lot of extra storage for certain apps.
However, the external sdcard is named /mnt/extSdCard, while /mnt/sdcard points to a smaller, internal (non-swappable) sdcard that comes with my tablet. I discovered that a whole slew of apps have been hard-coded to only access /mnt/sdcard as the "external sd card" without the ability to point to any other location, and this cripples my ability to use /mnt/extSdCard as extra-huge storage for some of these apps.
I've rooted my GT2, so my first thought about how to fix this was to go into a terminal as root and make a symlink from /mnt/extSdCard to some subdirectory of /mnt/sdcard. This would allow all those apps to at least see the contents of the swappable sdcard when they access /mnt/sdcard. However, /mnt/sdcard and /mnt/extSdCard are both FAT32 filesystems on which symlinks are not supported.
So I thought of another idea, but before I dive in and possibly screw up my GT2 beyond repair, I want to bounce it by you folks here, to see what you think about the feasibility of the following procedure ...
Step 1: back up /mnt/sdcard onto my desktop computer.
Step 2: back up /mnt/extSdCard onto my desktop computer.
Step 3: in the directory on my computer where I backed up /mnt/sdcard, copy the entire /mnt/extSdCard contents to a subdirectory called "ext". The full path name would then be /mnt/sdcard/ext, and this subdirectory would contain the entire contents of /mnt/extSdCard.
Step 4: using adb, or a terminal on my tablet running "su", or something like RootExplorer, change the contents of /etc/fstab (or whatever that file is called under Android), so that the former mount point for /mnt/sdcard is now called /mnt/extra, and so that the former mount point for /mnt/extSdCard is now called /mnt/sdcard. In other words, the new mount point for the swappable card will be /mnt/sdcard, and the new mount point for the internal card will be /mnt/extra.
Step 5: clear out all of /mnt/sdcard
Step 6: clear out all of /mnt/extSdCard
Step 7: run the following commands as root (or whatever similar commands correspond under Android) ...
umount /mnt/sdcard
umount /mnt/extSdCard
mount -av​
The third command (or its Android equivalent) should perform all the mounts in /etc/fstab so that my renamed mounts will go into effect.
Step 8: restore the backed up /mnt/sdcard contents from my desktop computer to the tablet's new /mnt/sdcard filesystem (including that new "ext" subdirectory)
Step 9: restart my tablet
(or perhaps change the order of some of these steps)
If all this works, /mnt/sdcard should now be the large swappable card containing the original internal sdcard contents plus that "ext" subdirectory with the original contents of "extSdCard". Also, /mnt/extra should be the empty internal sdcard, which I can use for whatever I want. Now, all those apps that are hard coded to look at /mnt/sdcard should see my large, swappable sdcard.
Aside from the differences between the commands I gave above (standard Unix/Linux) and the Andoid versions of those commands, do you folks think this general procedure will work on my GT2?
Thanks in advance.
.​
Another thought: back up /mnt/sdcard and /mnt/extSdCard and then reformat each of them to be ext3 or something similar. Then, restore /mnt/sdcard and /mnt/extSdCard to the ext3 filesystems and issue the following command under "su" in a terminal window:
ln -s /mnt/extSdCard /mnt/sdcard/ext​
If this works, it's a much simpler way to make /mnt/sdcard/ext accessible to all apps which can see /mnt/sdcard.
All I'd have to do is figure out how to reformat both sdcards as ext3. I guess I can find a tutorial for that somewhere.
Do you folks think this will work on my GT2? In other words, can you think of any reason why my GT2 might break if /mnt/sdcard or /mnt/extSdCard are ext3 instead of FAT32?
Thanks.
... or maybe this alternative?
Make an empty subdirectory called "ext" under /mnt/sdcard. In other words, it will be /mnt/sdcard/ext.
Then, somehow set up a mount in /etc/fstab (or whatever corresponds to that in Android) to mount the /mnt/extSdCard device to /mnt/sdcard/ext, instead.
Thoughts?
(Note that if this was my linux box at home, I'd just try all of these things and see what works. But I'm afraid to screw around this way with my Android device without first running these ideas past people who are more experienced with that OS than I am.)
Thanks.
That really sounds like it would work. I don't see why it wouldn't.
I think I'll go cat that fstab.
Edit: no such file ..
[email protected] / $ su
cat /etc/fstab
/etc/fstab: No such file or directory
mount
rootfs / rootfs ro,relatime 0 0
tmpfs /dev tmpfs rw,nosuid,relatime,mode=755 0 0
devpts /dev/pts devpts rw,relatime,mode=600 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
none /acct cgroup rw,relatime,cpuacct 0 0
tmpfs /mnt/asec tmpfs rw,relatime,mode=755,gid=1000 0 0
tmpfs /mnt/obb tmpfs rw,relatime,mode=755,gid=1000 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
/dev/block/platform/omap/omap_hsmmc.1/by-name/FACTORYFS /system ext4 ro,relatime,barrier=1,data=ordered 0 0
/dev/block/platform/omap/omap_hsmmc.1/by-name/DATAFS /data ext4 rw,nosuid,nodev,noatime,barrier=1,data=ordered,noauto_da_alloc,discard 0 0
/dev/block/platform/omap/omap_hsmmc.1/by-name/CACHE /cache ext4 rw,nosuid,nodev,noatime,errors=panic,barrier=1,nomblk_io_submit,data=ordered 0 0
/dev/block/platform/omap/omap_hsmmc.1/by-name/EFS /efs ext4 rw,relatime,barrier=1,data=ordered 0 0
/sys/kernel/debug /sys/kernel/debug debugfs rw,relatime 0 0
/dev/fuse /mnt/sdcard fuse rw,nosuid,nodev,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/block/vold/179:25 /mnt/extSdCard vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
You could use directory bind, i use it for some game directories
http://forum.xda-developers.com/showthread.php?t=1410262
stranxk said:
You could use directory bind, i use it for some game directories
http://forum.xda-developers.com/showthread.php?t=1410262
Click to expand...
Click to collapse
Thanks!
I tried DirectoryBind, and it looks like in principle, it should do what I want. However, I have a couple issues with it. I discuss those issues in that thread.
.​
Thanks to scottx.
Based on your encouraging message, I want to try the procedure I outlined.
So now, I have a few questions that are more specific.
My questions relate to these particular mounts:
/dev/fuse /mnt/sdcard fuse rw,nosuid,nodev,relatime,user_id=1023,group_id=102 3,default_permissions,allow_other 0 0
/dev/block/vold/179:25 /mnt/extSdCard vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
Where are the /mnt/sdcard and /mnt/extSdCard mounts defined in ICS on my GT2, given that there is no /etc/fstab file?
I saw an /etc/vold.fstab file with a definition of the /mnt/extSdCard mount, but it uses a different syntax from what I'm accustomed to seeing in /etc/fstab, and the device name and the parameters differ from the mount info that is shown above for /mnt/extSdCard. Is /etc/vold.fstab the place where I have to specify this mount? If so, how do I relate its syntax to the mount info above?
The /mnt/sdcard mount is not defined in /etc/vold.fstab. Where is this mount defined?
I notice that /mnt/sdcard is mounted from a device called /dev/fuse. If I find the definition of the /mnt/sdcard mount and change the directory name to /mnt/extra like I described above, will that break anything? In other words, are there dependencies during startup that require the /dev/fuse device to be mounted to something whose exact name is "/mnt/sdcard"?
Likewise, if I mount /dev/fuse as /mnt/extra and then change whatever currently defines the mount for /mnt/extSdCard to create it as /mnt/sdcard, will _that_ break anything? ... possibly because of some kind of timing or ordering considerations during the boot-up procedure that relate to the creation and existence of /mnt/sdcard?
Again, I know that I could investigate all this empirically (once I find out where these mounts are defined), but I don't want to do that blindly, in case one of the tests I run ends up rendering my tablet unbootable.
That's why I'm asking these questions here. My sincere thanks for any help that is offered.
.​
HippoMan said:
Thanks!
I tried DirectoryBind, and it looks like in principle, it should do what I want. However, I have a couple issues with it. I discuss those issues in that thread.
.​
Click to expand...
Click to collapse
Check that topic
Thanks. Yes, I saw your message in that topic, and you indeed described the fix to the problem I was having.
And now, I can use DirectoryBind, and that alleviates the need for my complicated manual mount procedure. It provides the exact functionality that I need.
Well, I am having problems with DirectoryBind. I have left a message in the DirectoryBind thread which addresses those issues, and now, I'm back here to continue with my own external sdcard remounting efforts.
For the purpose of this effort, I'll repeat the questions that I asked above ...
My questions relate to these particular mounts:
/dev/fuse /mnt/sdcard fuse rw,nosuid,nodev,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/block/vold/179:25 /mnt/extSdCard vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
There is no /etc/fstab file in ICS on my GT2, so where are the /mnt/sdcard and /mnt/extSdCard mounts defined in this OS?
I saw an /etc/vold.fstab file with a definition of the /mnt/extSdCard mount, but it uses a different syntax from what I'm accustomed to seeing in /etc/fstab, and the device name and the parameters differ from the mount info that is shown above for /mnt/extSdCard. Is /etc/vold.fstab the place where I have to specify this mount? If so, how do I relate its syntax to the mount info above?
The /mnt/sdcard mount is not defined in /etc/vold.fstab. Where is this mount defined?
I notice that /mnt/sdcard is mounted from a device called /dev/fuse. If I find the definition of the /mnt/sdcard mount and change the directory name to /mnt/extra like I described above, will that break anything? In other words, are there dependencies during startup that require the /dev/fuse device to be mounted to something whose exact name is "/mnt/sdcard"?
Likewise, if I mount /dev/fuse as /mnt/extra and then change whatever currently defines the mount for /mnt/extSdCard to create it as /mnt/sdcard, will _that_ break anything? ... possibly because of some kind of timing or ordering considerations during the boot-up procedure that relate to the creation and existence of /mnt/sdcard?
Click to expand...
Click to collapse
Thanks in advance for any insights and suggestions.
.​
OK. I think I finally got everything working using the DirectoryBind app, so none of this complicated stuff is necessary, after all.
Check this post and other info within its containing thread:
http://forum.xda-developers.com/showpost.php?p=27603811&postcount=297
In that post, go down to the part which starts with these words: "OK. It does indeed work" ...
.​
I still don't understand the part where all of this allows a user to move apps to an sd card. I followed the instructions and used directorybind to mount my sd card to /sdcard/sdcard_ext and still can't move apps to sd. Maybe I'm missing something?
I think there's a setting somewhere that allows apps to be moved to the sdcard... in Market settings maybe... I think Titanium Backup can also do it.
This app will not let you move apps to sd aka a2sdgui, link2sd, s2e, etc.. this app is not for that purpose.
This app will let you have some files/folders in the external sd and make the phone think they are in the internal SD aka sdcard (even root browsers will show the files in external and internal SD)
Sent from my GT-P3113 using xda app-developers app

Apps2SD / Data2SD correctly sd card prep for ICS 4.0.4? on Xperia mini Pro (SK17i)

Well ...
Shortly after some investigation i can share a couple informations with all interesting users who use a sony xperia mini pro (SK17i).
I tryed to create 2 partitions on my sd-card and get them working with my mobile phone. It seams that there is no automatic detection that mount any /sd-ext file system by it self. On my desktop box (laptop with ubuntu 12.04) is it no problem to mount the 2 partitions when the device is connected by usb but the mobile device only work by default with an fat32 file system. So we need some work manual configurations to get moving apps or data to an external /sd-ext file system.
With an older cwm version it was easy to let clockworkmod recovery create an /sd-card and /sd-ext file system on android GB. It run automatic and did everything fine. Now i tryed to do it in the offical ICS 4.0.4 ROM and CWM-5.0.2.7-nAa-r2 but no luck. The Option to create the 2 file systems automatic seams to be removed. The other options to format and mount an ext file system are not working or i was not able to understand how to use them correctly.
If you know how to use CWM-5.0.2.7-nAa-r2 and get fat32 and ext-fs configured correctly then please let me know.
Code:
127|[email protected]:/ $ whoami
whoami: unknown uid 2000
1|[email protected]:/ $ su
[email protected]:/ # whoami
whoami: unknown uid 0
1|[email protected]:/ # df
Filesystem Size Used Free Blksize
/dev 170.0M 64.0K 170.0M 4096
/mnt/asec 170.0M 0.0K 170.0M 4096
/mnt/obb 170.0M 0.0K 170.0M 4096
/system 400.0M 323.4M 76.6M 4096
/data 420.0M 126.4M 293.6M 4096
/cache 101.5M 1.1M 100.4M 4096
/data/idd 6.0M 840.0K 5.2M 4096
/mnt/sdcard 28.3G 9.3G 19.0G 32768
/mnt/secure/asec 28.3G 9.3G 19.0G 32768
[email protected]:/ #
When i let titanium backup move an app from internal memoy to sd card it show that on internal memory is more free space and when i unmount the sd card in my phone i cant start the app (android say app not found). So far so good and everything looks fine for me. But what i not understand is why the ext-fs partitions is empty when i mount it on my linux computer?
I thought that it maybe uses the ext-fs while it is not shown as mounted but that is not linux like^^
Code:
[email protected]:/ # cat /proc/filesystems
nodev sysfs
nodev rootfs
nodev bdev
nodev proc
nodev cgroup
nodev tmpfs
nodev debugfs
nodev sockfs
nodev pipefs
nodev anon_inodefs
nodev rpc_pipefs
nodev inotifyfs
nodev devpts
[B]ext3
ext2[/B]
nodev ramfs
vfat
nodev nfs
yaffs
yaffs2
It looks like we have to use ext2 or ext3 on sd-cards because ext4 is not supported by the 4.0.4 stock rom!?
By the way i use a xperia mini pro phone (SK17i) with android ics 4.0.4 - OS is rooted but i left the bootloader locked.
Very good post I shear this
@Daniel.Infante
I made some changes on my old post but i guess you will (maybe) think the same. Thanks for your feedback.
@all
Can someboy help to create a correct startup script that will mount a ext3 file system on a sd card correctly? I am not 100% sure with this and dont like to make my device unbootable with wrong system changes :fingers-crossed:

Categories

Resources