apps on sdcard -- can't install apps anymore - G1 General

I'm having a strange problem. I'm trying to update a few apps and I keep getting errors. I have a rooted RC33 and I have the apps on /system/sd/app.
It looks like I have space:
Code:
# busybox df -h
busybox df -h
Filesystem Size Used Available Use% Mounted on
tmpfs 48.4M 0 48.4M 0% /dev
tmpfs 4.0M 0 4.0M 0% /sqlite_stmt_journals
/dev/block/mtdblock3 67.5M 67.2M 284.0K 100% /system
/dev/block/loop0 1.5M 1.5M 0 100% /system/modules
/dev/block/loop1 3.1M 3.1M 0 100% /system/xbin
/dev/mmcblk0p2 1.0G 63.1M 913.9M 6% /system/sd
/dev/block/mtdblock5 74.8M 60.1M 14.7M 80% /data
/dev/block/mtdblock4 67.5M 1.4M 66.1M 2% /cache
/dev/block/mmcblk0p1 6.4G 4.6G 1.8G 73% /sdcard
#
Most apps seem to install OK, but there are a few I've tried to install today (qsearch, mybackup, quickoffice) that give me errors. It will say install unsuccessful and the error is either "insufficient storage available" (which seems odd) or "could not delete old application" (which also seems strange).
Any ideas? I'm stumped.
And yes, I've rebooted several times.
Thanks
P.S. Is it normal that my /data/app-private is empty? I just noticed that...
Oh, also, here's the debug log:
Code:
D/PackageParser( 58): Scanning package: /data/app/vmdl23451.tmp
W/PackageManager( 58): Package source /data/app-private/com.qo.android.am.apk does not exist.
I/installd( 37): unlink /data/dalvik-cache/[email protected]@[email protected]
D/dalvikvm( 58): GC freed 15380 objects / 698304 bytes in 442ms
I/vending ( 483): com.android.vending.AssetDownloader$DownloadManagerBroadcastReceiver$MyPackageInstallObserver.packageInstalled(): Package install from content://downloads/download/336 failed: Could not delete old application.
-- more info --
So I tried chmod 777 app-private and then created an empty file com.qo.android.am.apk since that is what it was complaining about. Then I tried installing again. The debug log shows:
Code:
D/PackageParser( 58): Scanning package: /data/app/vmdl23453.tmp
D/PackageManager( 58): Scanning package com.qo.android.am
I/PackageManager( 58): /data/app/vmdl23453.tmp changed; unpacking
D/installd( 37): DexInv: --- BEGIN '/data/app/vmdl23453.tmp' ---
D/dalvikvm( 1564): DexOpt: load 541ms, verify 2688ms, opt 214ms
D/installd( 37): DexInv: --- END '/data/app/vmdl23453.tmp' (success) ---
D/PackageManager( 58): Services: com.qo.android.quickoffice.NotifyingService com.qo.android.ipc.RemoteServiceQW com.qo.android.ipc.RemoteServiceQS
D/PackageManager( 58): Receivers: com.qo.android.quickoffice.MyStartupIntentReceiver
D/PackageManager( 58): Activities: com.qo.android.quickoffice.NotifyingDialogActivity com.qo.android.am.Quickoffice com.qo.android.quickoffice.Quickoffice com.qo.android.am.EulaActivity com.qo.android.quicksheet.Quicksheet com.qo.android.quickword.Quickword
I/installd( 37): move /data/dalvik-cache/[email protected]@[email protected] -> /data/dalvik-cache/[email protected]@[email protected]
E/PackageManager( 58): Couldn't move package file to: /data/app-private/com.qo.android.am.apk
I/installd( 37): unlink /data/dalvik-cache/[email protected]@[email protected]
W/PackageManager( 58): Package source /data/app-private/com.qo.android.am.apk does not exist.
D/PackageManager( 58): Removing package com.qo.android.am
D/PackageManager( 58): Services: com.qo.android.quickoffice.NotifyingService com.qo.android.ipc.RemoteServiceQW com.qo.android.ipc.RemoteServiceQS
D/PackageManager( 58): Receivers: com.qo.android.quickoffice.MyStartupIntentReceiver
D/PackageManager( 58): Activities: com.qo.android.quickoffice.NotifyingDialogActivity com.qo.android.am.Quickoffice com.qo.android.quickoffice.Quickoffice com.qo.android.am.EulaActivity com.qo.android.quicksheet.Quicksheet com.qo.android.quickword.Quickword
D/ActivityManager( 58): Uninstalling process com.qo.android.am
I/vending ( 483): com.android.vending.AssetDownloader$DownloadManagerBroadcastReceiver$MyPackageIns
tallObserver.packageInstalled(): Package install from content://downloads/download/338 failed: Insufficient storage available.
At this point, I am getting the insufficient space message (as shown in the log). Previously, I was getting the could not delete app message (as shown in the log above this one).

I get this error occasionally too... I don't know why it happens, but it's usually for protected apps.
EDIT: Also, I have my /data/app folder on an ext2 partition on my miccroSD card, but the app-private remains on the phone. I don't know what's going on... I want to buy dxTop, but I don't think that it will install...

I got the same error while trying to install parkmark free. I've been contemplating moving everything back to the phone to install and then move them back to the SD. PITA but I would like to nab it before it is no longer available.

Blarg -- there must be a way, no? Maybe they got smart and are checking to see if /data/app is a symlink? JesusFreke, help us!

It's happening for every protected app which gets installed in the /data/app-private directory...
I don't get it though. I haven't even touched that folder. I've just symlinked /data/app to /system/sd/app

amgupt01 said:
It's happening for every protected app which gets installed in the /data/app-private directory...
I don't get it though. I haven't even touched that folder. I've just symlinked /data/app to /system/sd/app
Click to expand...
Click to collapse
Same here -- that's the only symlinking I did (well, aside from the caches).

I wonder if un-symlinking the apps dir (putting it back to "normal"), installing and then re-symlinking (and copying the new stuff) would work. Does that seem risky? So maybe something like:
Temporarily rename the symlink to app.DISABLED
Create a new app directory (a "real" directory)
Install the new app(s)
Copy whatever is in the new ("real") app directory to the symlinked (now named "app.DISABLED") directory
Remove the "real" app directory and rename the symlink back to app
I'm just wondering if it is dangerous to rename the app directory while apps may be running as suddenly they won't be able to find themselves and that could upset things.

I'll try that. If it works, I'll make a GScript out of it and I'll post the two .sh scripts (one for before installing, one for after) here.

amgupt01 said:
I'll try that. If it works, I'll make a GScript out of it and I'll post the two .sh scripts (one for before installing, one for after) here.
Click to expand...
Click to collapse
I got bold and tried it and it worked (I did get a few errors about some apps force-closing because I moved directories around). Here's what I did:
cd /data
mv app app.SDCARD
mkdir app
chmod 771 app
chown 1000:1000 app
Went to Market and installed the app that wouldn't install earlier
busybox cp -a app/* /system/sd/app
mv app app.ORIGINAL
mv app.SDCARD app
Voila! My newly installed app works. A reboot should resolve any background apps (like the caller-ID app) that were running while I moved the directories.
If you wanna make some scripts out of that, I'm sure it would help others. A quick "run this" then install then "run that" kind of operation.
EDIT: That worked for a new app. To replace an existing app, I had to do this:
Code:
busybox cp -a /system/sd/app/<old-app> /data/app
before updating so that it could delete the old app. That worked for a replacement (update).

mlevin said:
Blarg -- there must be a way, no? Maybe they got smart and are checking to see if /data/app is a symlink? JesusFreke, help us!
Click to expand...
Click to collapse
I'm wondering if they are checking to see if /data/app is a symlink -- or maybe if /data/app and /data/app-private are on the same filesystem (which could be solved by moving both app and app-private over to the card). Hmm...

I'll try putting app-private to SD card...
EDIT: ARE YOU KIDDING ME? Every single app that wasn't working before, is now working once I moved the app-private to /system/sd as well...
I feel retarded.

amgupt01 said:
I'll try putting app-private to SD card...
EDIT: ARE YOU KIDDING ME? Every single app that wasn't working before, is now working once I moved the app-private to /system/sd as well...
I feel retarded.
Click to expand...
Click to collapse
Wow. That was easy. I'll do that on mine as well. Cool.
EDIT: Yup, after symlinking and a quick reboot, that worked for me as well!

HELP PLEASE:
Cant update or download new apps from market to SD card.
I can only download & update apps on internal storage and then move them to SD... But If I have app on SD I cannot update or install app.. I always get - Installation Unsuccessful
I am using Leedroid NOA2SD 2.4.1. Tried to format SD card, unmount and mount SD.. nothing helps.
Titanium Backup:
Internal: 23 MB free
SD card: 1.29 GB free
SD card (a2sd): 1.90 MB free
Can you help me with any idea?
Tnx

I have a log file but I cant send it :|

Related

Titan nand android

can i use this method for vogue, instead for Titan
http://forum.xda-developers.com/showthread.php?t=593786
No it is made for the vogue not out titan. You would probably brick your phone.
unfortunately, the nbh rom is meant for the vogue only. i have been looking around to see if anyone has a working version for the titan, but it seems to require a slight modification to the kernel and a different bootloader. neither of these i have any idea on how to begin to do. the kaiser folks might have something going for them.. there doesnt seem to be much action here though.
edit: after looking through dzo's posts, i have hope that it may be done in the future as he has mentioned developing a method for polaris and kaiser after perfecting the vogue. however, the hardware itintializations on the vogue are proving more difficult and i am sure that will be even harder when trying to adapt the kernel for different phones.
Yes the kernel is the issue. I have a fair amount of experience with WM nand and nbh files and was able to fix the .nbh from the other thread to flash to a titan. Android even boots in the background and creates a log file of the boot process but too much of the hardware (including the screen I assume) is different and the screen never comes on and recovery mode does not work.
I have no idea of how to get the kernel and fix it to make this work and don't have the time to figure it out. It works off of SD with Haret because the default.txt file makes the right kernel arguments for the hardware and the hardware is initialized in WM before booting linux.
Each time I have tried it though I can just re-flash the phone with a WM rom and I'm back to normal. The hardspl makes it pretty hard to brick this phone.
jeffgarret said:
Yes the kernel is the issue. I have a fair amount of experience with WM nand and nbh files and was able to fix the .nbh from the other thread to flash to a titan. Android even boots in the background and creates a log file of the boot process but too much of the hardware (including the screen I assume) is different and the screen never comes on and recovery mode does not work.
Click to expand...
Click to collapse
i saw that and was wondering if you wouldnt mind explaining how you did it or post your modified nbh with the understanding that it is not actually working in its current state.
can u use the kaiser nand file on the titan
I have the ION version running very well on my mogul off SD and Haret. The performance and force closes would improve if run from nand I think. I will gladly assist in the development of a flashable Android ROM.
Any experts available to lead the way?
2 for testing
I got two mogul's that can go up for testing. let me know.
i tried the Vogue nbh, and it gets to 33% and then resets the phone saying that it is not compatible. I have also put the Ion Android 1.5 build on my phone it works very well. I hope someone can post a titan nbh soon.
http://forum.xda-developers.com/showpost.php?p=5875083&postcount=572
so close yet so far, i got android to install on the titan through harret using mym's warm donut nomorootfs, a custom default.txt and Magister2k7's zimage. got through the install perfectly, even said "android installed" but when it tryed to start... got a error... waited 20 minutes to see if it would boot and nothing at all, im going to try it one more time and this time post the exact error, will edit the post when im done, hopefully i can get it working, if and when i do i will upload a copy of the exact files i used for easy acess for all you who want android on your titan.
EDIT: here we go, the boot log. if you cant tell by looking at this, its having trouble mounting the system and data images. oh well, closer then i have ever been before. and i will keep trying different methods til i succeed.
Code:
** /dev/block/mmcblk0p1
** Phase 1 - Read and Compare FATs
Attempting to allocate 121 KB for FAT
Attempting to allocate 121 KB for FAT
** Phase 2 - Check Cluster Chains
** Phase 3 - Checking Directories
/data.img has too many clusters allocated
Drop superfluous clusters? yes
** Phase 4 - Checking for Lost Files
Update FATs? yes
Attempting to allocate 121 KB for FAT
215 files, 1233184 free (38537 clusters)
***** FILE SYSTEM WAS MODIFIED *****
Formatting...
256+0 records in
256+0 records out
mke2fs 1.38 (30-Jun-2005)
mke2fs: cannot determine if /sdcard/andboot/system.img is mounted
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
65536 inodes, 262144 blocks
13107 blocks (5.00%) reserved for the super user
First data block=1
32 block groups
8192 blocks per group, 8192 fragments per group
2048 inodes per group
Superblock backups stored on blocks:
8193, 24577, 40961, 57345, 73729, 204801, 221185
Writing inode tables: 0/32 1/32 2/32 3/32 4/32 5/32 6/32 7/32 8/32 9/3210/3211/3212/3213/3214/3215/3216/3217/3218/3219/3220/3221/3222/3223/3224/3225/3226/3227/3228/3229/3230/3231/32done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 29 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
256+0 records in
256+0 records out
mke2fs 1.38 (30-Jun-2005)
mke2fs: cannot determine if /sdcard/andboot/data.img is mounted
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
65536 inodes, 262144 blocks
13107 blocks (5.00%) reserved for the super user
First data block=1
32 block groups
8192 blocks per group, 8192 fragments per group
2048 inodes per group
Superblock backups stored on blocks:
8193, 24577, 40961, 57345, 73729, 204801, 221185
Writing inode tables: 0/32 1/32 2/32 3/32 4/32 5/32 6/32 7/32 8/32 9/3210/3211/3212/3213/3214/3215/3216/3217/3218/3219/3220/3221/3222/3223/3224/3225/3226/3227/3228/3229/3230/3231/32done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 23 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
Installing...
Android Installed
Fixing Permissions on files
chown: /data/app_s: No such file or directory
chmod: /data/app_s: No such file or directory
chown: /system/bin: No such file or directory
chmod: /system/bin: No such file or directory
chown: /system/xbin: No such file or directory
chmod: /system/xbin: No such file or directory
chown: /system/bin/netcfg: No such file or directory
chmod: /system/bin/netcfg: No such file or directory
chown: /system/bin/ping: No such file or directory
chmod: /system/bin/ping: No such file or directory
chown: /system/bin/pppd: No such file or directory
chmod: /system/bin/pppd: No such file or directory
chown: /system/etc/bluez: No such file or directory
chmod: /system/etc/bluez: No such file or directory
chown: /system/etc/ppp: No such file or directory
chmod: /system/etc/ppp: No such file or directory
chown: /system/etc/bluez: No such file or directory
chmod: /system/etc/bluez: No such file or directory
chown: /system/etc/dbus.conf: No such file or directory
chmod: /system/etc/dbus.conf: No such file or directory
chown: /system/etc/dhcpcd/dhcpcd-run-hooks: No such file or directory
chmod: /system/etc/dhcpcd/dhcpcd-run-hooks: No such file or directory
chown: /system/bin/su: No such file or directory
chmod: /system/bin/su: No such file or directory
chown: /system/init: No such file or directory
chmod: /system/init: No such file or directory
chown: /system/etc/init.d: No such file or directory
chmod: /system/etc/init.d: No such file or directory
grep: /system/etc/apns-conf.xml: No such file or directory
sed: /system/etc/apns-conf.xml: No such file or directory
/bin/instscripts/fixperms: line 90: can't create /system/etc/apns-conf.xml: nonexistent directory
sh: 2: unknown operand
e2fsck 1.38 (30-Jun-2005)
e2fsck: while determining whether /dev/block/loop1 is mounted
/dev/block/loop1: clean, 129/65536 files, 15800/262144 blocks
e2fsck 1.38 (30-Jun-2005)
e2fsck: while determining whether /dev/block/loop0 is mounted
/dev/block/loop0: clean, 11/65536 files, 8286/262144 blocks
mount: mounting /data/sysfiles/su on /system/bin/su failed: No such file or directory
mount: mounting /data/sysfiles/su on /system/xbin/su failed: No such file or directory
mount: mounting /data/sysfiles on /system/etc/ppp failed: No such file or directory
any success?
i have USCC titan (running ppck 23569 with spl-2.40) i have ran the android 1.5 off sd-card before but i sure would like it running off the nand (and would really like wifi to work) i dont even have cell service so wifi is most important to me.
i use skype a tiny bit but mostly just surf.
@nyterage: i'm having the same issue with fixing permissions:
Fixing Permissions on files
chown: /data/app_s: No such file or directory
chmod: /data/app_s: No such file or directory
chown: /system/bin: No such file or directory
chmod: /system/bin: No such file or directory
chown: /system/xbin: No such file or directory
chmod: /system/xbin: No such file or directory
chown: /system/bin/netcfg: No such file or directory
chmod: /system/bin/netcfg: No such file or directory
chown: /system/bin/ping: No such file or directory
chmod: /system/bin/ping: No such file or directory
chown: /system/bin/pppd: No such file or directory
chmod: /system/bin/pppd: No such file or directory
chown: /system/etc/bluez: No such file or directory
chmod: /system/etc/bluez: No such file or directory
chown: /system/etc/ppp: No such file or directory
chmod: /system/etc/ppp: No such file or directory
chown: /system/etc/bluez: No such file or directory
chmod: /system/etc/bluez: No such file or directory
chown: /system/etc/dbus.conf: No such file or directory
chmod: /system/etc/dbus.conf: No such file or directory
chown: /system/etc/dhcpcd/dhcpcd-run-hooks: No such file or directory
chmod: /system/etc/dhcpcd/dhcpcd-run-hooks: No such file or directory
chown: /system/bin/su: No such file or directory
chmod: /system/bin/su: No such file or directory
chown: /system/init: No such file or directory
chmod: /system/init: No such file or directory
chown: /system/etc/init.d: No such file or directory
chmod: /system/etc/init.d: No such file or directory
Did you managed to fix the issue and figure out what caused it ?
In my case, even if I'm getting those errors while trying to "fix permissions" the android is booting up.
It's a little bit slow in my opinion but it's working(the wireless is not working and I don't know why because the guy who did it posted photos with wireless working).

NexusHD2-ICS-CM9 A2SD Discussion

How to increase the internal storage size for the NexusHD2-ICS-CM9 ROM.
May 17 updated:
Another choice. Don't need to flash anything.
Just install Link2SD app from the Google Play (a.k.a. Android Market).
Jan. 20:
Flash any of the A2SD scripts below when you install too many apps and the internal memory (i.e. data partition) is out of space.
Caution: Don't use any of them if you are not an advanced user. Otherwise you may have low volume, performance lag and other strange issues.
Installation guide for 40ad2sdx-a2Recovery.zip
Installation guide for Data2SD.
Installation guide for AD2SDX - AMARULLZ DATA TO SD-EXT.
This rom gets better by the hour! Thank you very much Tytung
Sent from my HD2 using XDA App
Thanks
Does the freeze issue related to A2SD ? My phone working and connected to GSM network but the touch screen is not working at all.
Thank you very much Tytung for the nice Rom !!!!
From the other thread:
manu44 said:
I have installed the Rom v1.1 by using the 40ext script to move the dalvik to sd card
and now i used it without the script
The DIfferemce is there
- No more apps lagging...Whatsapp used to take around 25 sec to show up when i was using my adtosd script
- No more screen lagging
- No more low sound issue
Click to expand...
Click to collapse
Of course you will get no more low sound issue, but since I have changed the read ahead SD speed to 2048 (not sure if thats the reason though) and changed the script that it copies all to SD card ext partition, I have a lot fewer lags than before, when the read ahead was 8mb and I used the unmodified Amarullz script (which leaves dalvik on internal).
Here are my posts for reference:
geenyous said:
Thanks tytung, will upload there next time.
Hmm, but I am using Amarullz script and still have ~300mb left.
Appears that it does the same as the app2sd script TyphooN is using, so every app you install still leaves a bit on internal but the majority goes to sd-ext. This would be about right as I have now 50mb less internal than with TyphooN (150mb partition compared to 200 now) and I had roughly 57mb free space on TyphooN internal with the same apps installed.
Anyone has an idea what to do besides uninstalling some apps?
Thx!
Click to expand...
Click to collapse
bobjbain said:
You can delete the stuff in the cache directory under /sd-ext/data_s/com.android.providers.downloads
...
That's bizarre, I don't know where it gets the 208m for /sd-ext when I have 2G ext4 partition on my card.
And why is /data 1G??
Anyway geenyous, in adb cd to /sd-ext/data_s/com.android.providers.downloads and issue a 'df *' that will tell you how much free space the system actually thinks you have in that directory.
HTH
Click to expand...
Click to collapse
This didn't work, that directory was almost empty...
uzi2 said:
http://forum.xda-developers.com/showpost.php?p=21216357&postcount=384
http://forum.xda-developers.com/showpost.php?p=21232738&postcount=438
http://forum.xda-developers.com/showpost.php?p=21233560&postcount=445
Click to expand...
Click to collapse
OK, just to report on the above Issue:
I have now reinstalled everything with the modified script posted by uzi2 above, now I have plenty of space (actually the internal sd-ext is empty, feels like bit of a waste) as all my stuff is on sd-ext4 (SD card), even dalvik cache. I can now install and update apps again. Just to make it clear for everyone: there is an sd-ext, which is located on NAND and there is sd-ext4 which is located on your SD card after you format it properly.
If you look at Amarullz script, you will see that per default, it will leave dalvik cache as well as system apps on sd-ext (internal). Now, this together with a 200mb system partition will lead to the sd-ext filling up as you install more apps which are considered system apps and consequently you will not be able to dl and update from market anymore. What uzi did, is remove the parts from the script that copy dalvik and those apps to sd-ext. Now, sd-ext is empty, no matter how many apps you install. Maybe it would be good to keep dalvik on sd-ext and only remove the "system apps move to sd-ext" part of the script? Dalvik was like 170mb of size last time I checked, is that constant or number of apps dependent? I must say I don't see any performance issue with dalvik on SD, but it just feels like a bit of a waste
Btw, I also changed the SD speed fix value to 2048 from ~8000 in the script as I think I can recall to have read that this would give the best performance.
Here is the code I am using atm (all the same like uzis except the SD speed):
Code:
#!/system/bin/sh
#
# AMARULLZ DATA TO SD-EXT MOD FOR ANDROID ( AD2SDX )
# ==================================================
#
# by amarullz [at] yahoo [dot] com
# xda-developers : amarullz
# (c) 2011
# * Oct 19 (ALPHA01)
#
# Info: ~ For Changing Log
##
###
# Initializing
###
#-- SDCard Speed Fix
if [ -e /sys/devices/virtual/bdi/179:0/read_ahead_kb ]
then
/system/xbin/echo "2048" > /sys/devices/virtual/bdi/179:0/read_ahead_kb;
fi;
#-- Unmount /sd-ext if it already mounted
busybox umount /sd-ext;
#-- Mount /data and move it to /sd-ext
busybox mount /data;
busybox mount --move /data /sd-ext;
#-- Mount sd-ext to /data ( You Will Get 1GB/2GB Internal Memory :D )
busybox mount -t ext4 -o noauto_da_alloc,data=ordered,commit=15,barrier=1,nouser_xattr,errors=continue,noatime,nodiratime,nosuid,nodev /dev/block/mmcblk0p2 /data;
busybox chown 1000:1000 /data;
busybox chmod 771 /data;
###[ SDEXT mmcblk0p2 STRICT ]###
# app, app_s, lib_s, app-private, data : should in /data (mmcblk0p2)
#
# ~ ALPHA02 - Add framework_s into (mmcblk0p2) strict - MODIFIED
###
for i in dalvik-cache tts_s app app_s lib_s plugins_s app-private framework_s weather_s data;
do
#-- If Symlink in /data, delete it
if [ -h /data/$i ]
then
busybox rm /data/$i;
fi;
#-- If Directory Exists in /sd-ext, move it to /data
if [ -d /sd-ext/$i ]
then
busybox mv /sd-ext/$i /data/;
fi;
#-- If Directory Not Extst in /data, create it
if [ ! -d /data/$i ]
then
busybox mkdir /data/$i;
#-- Just Open All Permissions ;)
busybox chmod 0777 /data/$i;
fi;
#-- Now Create Symlink From /sd-ext to /data
if [ ! -h /sd-ext/$i ]
then
busybox ln -s /data/$i /sd-ext/$i;
fi;
done;
###
# Now create symlink of the rest non Symlink Directories and Files on /sd-ext to /data
#
# ~ ALPHA02 - Fix ls to ls -a, it's ok, because we test -h for symlink
###
cd /sd-ext;
for i in `ls -a`;
do
if [ $i != ".." -a $i != "." ]
then
if [ ! -h /sd-ext/$i ]
then
if [ ! -h /data/$i ]
then
busybox ln -s /sd-ext/$i /data/$i;
fi;
fi;
fi;
done;
cd /;
###
# It should also need to create the rest non Symlink Directories and Files on /data to /sd-ext
# ~ ALPHA02 - Some Directory may be missing if we don't use it
###
cd /data;
for i in `ls -a`;
do
if [ $i != ".." -a $i != "." ]
then
if [ ! -h /data/$i ]
then
if [ ! -h /sd-ext/$i ]
then
busybox ln -s /data/$i /sd-ext/$i;
fi;
fi;
fi;
done;
cd /;
#-- Of Finished.... :D
And this is the part I would suggest maybe you could leave it in to get dalvik to sd-ext (internal):
Code:
###[ SDEXT mmcblk0p2 STRICT ]###
# app, app_s, lib_s, app-private, data : should in /data (mmcblk0p2)
#
# ~ ALPHA02 - Add framework_s into (mmcblk0p2) strict
###
for i in framework_s app app_s lib_s app-private data;
do
#-- If Symlink in /data, delete it
if [ -h /data/$i ]
then
busybox rm /data/$i;
fi;
#-- If Directory Exists in /sd-ext, move it to /data
if [ -d /sd-ext/$i ]
then
busybox mv /sd-ext/$i /data/;
fi;
#-- If Directory Not Extst in /data, create it
if [ ! -d /data/$i ]
then
busybox mkdir /data/$i;
#-- Just Open All Permissions ;)
busybox chmod 0777 /data/$i;
fi;
#-- Now Create Symlink From /sd-ext to /data
if [ ! -h /sd-ext/$i ]
then
busybox ln -s /data/$i /sd-ext/$i;
fi;
done;
###[ INTERNAL mtdblock5 STRICT ]###
# For performance, dalvik-cache should be on /sd-ext
###
for i in dalvik-cache;
do
#-- If Symlink in /data, delete it
if [ -h /sd-ext/$i ]
then
busybox rm /sd-ext/$i;
fi;
#-- If Directory Exists in /sd-ext, move it to /data
if [ -d /data/$i ]
then
busybox mv /data/$i /sd-ext/;
fi;
#-- If Directory Not Extst in /data, create it
if [ ! -d /sd-ext/$i ]
then
busybox mkdir /sd-ext/$i;
#-- Just Open All Permissions ;)
busybox chmod 0777 /sd-ext/$i;
fi;
#-- Now Create Symlink From /sd-ext to /data
if [ ! -h /data/$i ]
then
busybox ln -s /sd-ext/$i /data/$i;
fi;
done;
And this the part that should be removed:
Code:
###
# Now Important Thing, is to move the com.htc* and com.android* data to /sd-ext (internal)
# For Good performance. So the system applications will run smooth.
#
# System application will read/write in Internal memory, and 3rd apps will run on sdcard
#
# Notice: Will be affected in 2nd boot :D, so Reboot the system after 1st boot...
###
#-- Prepare data_s in /sd-ext ( For system data )
if [ ! -d /sd-ext/data_s ]
then
busybox mkdir /sd-ext/data_s;
#-- Just Open All Permissions ;)
busybox chmod 0777 /sd-ext/data_s;
fi;
#-- Now Move All com.htc* and com.android* to Internal Memory
cd /data/data/;
for i in `ls -d com.htc* com.android*`;
do
#-- Only Non Symlink
if [ ! -h /data/data/$i ]
then
busybox mv /data/data/$i /sd-ext/data_s/;
fi;
done;
#-- Create Symlink of /data/data_s/* to /data/data/ (mmcblk0p2)
cd /sd-ext/data_s/
for i in `ls -d *`;
do
#-- Only If Symlink Not Exists
if [ ! -h /data/data/$i ]
then
busybox ln -s /sd-ext/data_s/$i /data/data/$i
fi;
done;
Or you could do it the other way around, leave system apps on sd-ext (internal) and move dalvik to SD card? Uzi2, as you say your script is tested, did you test this and what were your findings?
I have attached the script in a flashable zip the way I use it now, all on SD card as well as SD speed fix change for anyone that also runs into market install / update troubles.
You have to do a fresh install though, clearing dalvik with the modified script will not move it to SD card and you have to install it the tried way, i.e. flash ROM (kernel), boot, reboot, reboot into recovery, flash script, reboot, set up google account and restore apps. Putting it in right from the beginning gave me bootloops (factory wipe install).
EDIT: Ok, it is confirmed that Dalvik cache is app dependent, it now has a size of 187MB (compared to the 178 I saw before) and I have another 200mb of sd-ext4 left to install more apps. So it is very well possible, that after installing further apps, the 10% space threshold of sd-ext (internal) will be reached again and Market will quit dl / updating apps as it did before. So it looks like the only viable option will be to leave the second part of the script in, the one where all the system (and htc) apps get moved to internal. Looking at the script, it appears that you could put this part in and it will move the apps to internal even after all has been on SD card, can anyone with coding skills please confirm?
Best way to use this script
May i add, that the best possible method is to copy the script file to the ROM zip Before Flashing. This way i didn't encounter any crashes, low volume, whatsoever!
d33f said:
May i add, that the best possible method is to copy the script file to the ROM zip Before Flashing. This way i didn't encounter any crashes, low volume, whatsoever!
Click to expand...
Click to collapse
This is because, there is no need to fix permissions using this method.
Obviously there is no need to wipe dalvik-cache on a fresh install, but if you refrain from doing so on an update, you should not encounter problems.
Please remember to copy the script into init.d on every update.
d33f said:
May i add, that the best possible method is to copy the script file to the ROM zip Before Flashing. This way i didn't encounter any crashes, low volume, whatsoever!
Click to expand...
Click to collapse
I really hate to ruin the party here, especially as I am also a fan of easy solutions, but after I made a factory wipe (a state where most new users will come from when they change CWM partition) and put the script in an otherwise unmodified zip, I had bootloops. And not just one, several.
This then worked for me:
- Format SD card with one FAT32 partition (primary, 32kb block) and one ext4 partition (primary, 4kb block)
- Boot into CWM
- Flash ROM (& Flash Kernel)
- Reboot and don't touch anything
- Reboot into recovery
- Flash script
- Reboot into ROM
- Reboot into CWM and fix permissions
- Reboot into ROM and start setting up your phone
- Done
If you update your ROM, then do the following:
- Unzip script zip (not ROM!)
- Copy the script (called something like "10ad2sd" or "40ad2sdx") to system/etc/init.d/ in ROM zip with something like 7zip
- Boot to CWM
- Flash ROM (& Kernel)
- Done
Thank you for this
This solved all my storage issues. Especially on this new rom. Now I am not experiencing any bugs whatsoever.
geenyous said:
I really hate to ruin the party here, especially as I am also a fan of easy solutions, but after I made a factory wipe (a state where most new users will come from when they change CWM partition) and put the script in an otherwise unmodified zip, I had bootloops. And not just one, several.
Click to expand...
Click to collapse
Was it a bootloop? How long did you leave it, before deciding this?
It will also depend on which a2sd script you use, so just because you encounter problems doesn't mean it's universal.
Edit:Having read the FAQ, I think you may be using Amarullz RC02, whilst I am using Alpha02 (amended)
uzi2 said:
Was it a bootloop? How long did you leave it, before deciding this?
It will also depend on which a2sd script you use, so just because you encounter problems doesn't mean it's universal.
Click to expand...
Click to collapse
You know me, I am not screaming wolf just to get attention. I was using exactly the same script you posted and I never said it was universal. I waited 10 mins, 3 times in a row before I decided to reflash without the script. Took some 3-5 mins and the Set up screen was there. Whatever is the cause here, none of us seem to understand it, at least I don't and you have not posted the reason.
So lets just leave it as it is, if it works, fine, if not, then go the long way, as easy as that
geenyous said:
You know me, I am not screaming wolf just to get attention. I was using exactly the same script you posted and I never said it was universal. I waited 10 mins, 3 times in a row before I decided to reflash without the script. Took some 3-5 mins and the Set up screen was there. Whatever is the cause here, none of us seem to understand it, at least I don't and you have not posted the reason.
So lets just leave it as it is, if it works, fine, if not, then go the long way, as easy as that
Click to expand...
Click to collapse
Even so, 10mins may not be long enough for the ROM to load and the script to perform it's initial functions. You are confusing 2 different versions of the Amarullz script. You may not have read my Edit before replying.
Q !. What tipe of SD card should i use class 4 class 6 or class 10 for a2sd scripts ?
uzi2 said:
Even so, 10mins may not be long enough for the ROM to load and the script to perform it's initial functions. You are confusing 2 different versions of the Amarullz script. You may not have read my Edit before replying.
Click to expand...
Click to collapse
Yes, I have replied before you edited, but still I am using your script
I have never used the one I linked to, just took that from OP. Before using yours I also took the one from Amarullz thread, but the flashable one (added link to FAQ).
Anyhow, it may be that 10 mins are not enough, but I am sure as hell that any other second on this topic is wasted, so I am going to leave it here.
nueloc said:
Q !. What tipe of SD card should i use class 4 class 6 or class 10 for a2sd scripts ?
Click to expand...
Click to collapse
4 or 6 is best.
I've installed 40ad2sdx-a2Recovery.zip as it was said it should be installed, and my phone is going nuts..
EVERYTHING is so slow, even thoe SetCPU is configured correctly.. my phone acts like it's on 400MHz all the time!
Second thing, and the biggest thing are all those FCs.. almost every app is FC, and when I start it again, it SOMETIMES works ok..
Facebook is useless, Market sometimes, Quadrant is giving me <1000 results, Twitter is so slow I can't stand to load up a page, Gallery is working every second time..
And it all worked so darn fast before this App2SD patch..
Hey guys...I've got a problem with the latest ICS build ([15.Jan.2012] NexusHD2-ICS-4.0.3-CM9 V1.1). I'm using a T-Mobile HD2 with MAGLDR v1.13, and I can load ICS up successfully. Calling works and my signal reads full with 3G (with Wind Mobile), but I can't activate the wifi (switching on results in nothing, as if the system attempts to but can't), and 3G appears to be inaccessible with Google Accounts/browser even though it is configured correctly. I've tried wiping, re-installing (with 1024 MB ext4 partition), and putting initrd.gz in an update folder for updating...nothing appears to be working. Can anyone help? Much thanks in advance.
Cold-Tea said:
I've installed 40ad2sdx-a2Recovery.zip as it was said it should be installed, and my phone is going nuts..
EVERYTHING is so slow, even thoe SetCPU is configured correctly.. my phone acts like it's on 400MHz all the time!
Second thing, and the biggest thing are all those FCs.. almost every app is FC, and when I start it again, it SOMETIMES works ok..
Facebook is useless, Market sometimes, Quadrant is giving me <1000 results, Twitter is so slow I can't stand to load up a page, Gallery is working every second time..
And it all worked so darn fast before this App2SD patch..
Click to expand...
Click to collapse
As I understand it, 40a2sdx is Amarullz RC02, which is known to cause problems with this ROM. The Alpha02 is 40a2sd and should work well.
Edit: Sorry, I see that Alpha02 is also 40adsdx. The script I used is based on Alpha01 (40a2sd) - Sorry for the confusion.
The links are now correct in the FAQ
I got problems with touch screen.When i unlock my phone it acts like im still presing or scrolling,and its driving me crazy.When i type sms it presses button by itself,it scroll menu by itself.Even today,when i touch screen the screen get some purple colour,and when im not touching it its ok.Please help me
RyanGDI said:
Hey guys...I've got a problem with the latest ICS build ([15.Jan.2012] NexusHD2-ICS-4.0.3-CM9 V1.1). I'm using a T-Mobile HD2 with MAGLDR v1.13, and I can load ICS up successfully. Calling works and my signal reads full with 3G (with Wind Mobile), but I can't activate the wifi (switching on results in nothing, as if the system attempts to but can't), and 3G appears to be inaccessible with Google Accounts/browser even though it is configured correctly. I've tried wiping, re-installing (with 1024 MB ext4 partition), and putting initrd.gz in an update folder for updating...nothing appears to be working. Can anyone help? Much thanks in advance.
Click to expand...
Click to collapse
mare.djurdjev said:
I got problems with touch screen.When i unlock my phone it acts like im still presing or scrolling,and its driving me crazy.When i type sms it presses button by itself,it scroll menu by itself.Even today,when i touch screen the screen get some purple colour,and when im not touching it its ok.Please help me
Click to expand...
Click to collapse
Please state which version of A2sd you are using, how it is installed and why you think it is a2sd related. Otherwise the main thread may be more appropriate for your questions.
I'll forward this over to the main thread then...I actually don't know what the A2sd version is. x.x

[Q] What determines which partitions get mounted in windows?

I've been looking off and on and having little luck finding the answer. My ultimate goal is to not have the EMMC partitions mounted at all when booting from my CM7 SD card as I have a 32GB card and have plenty of space on it so do not need the 5GB or so that's mounted as /media. I know I can go into the fstab.vold file and change the mounts there that CM7 uses, but what controls which partitions are mounted when connecting it to windows? I either want to alter the EMMC /media partition that's mounted to something else on the SD card (boot maybe? dunno if this is a good idea or not) or remove it from the USB mounting altogether.
- Aerlock
You can remove emmc from vold.fstab and create your own startup script in /data/local/userinit.sh.
Something like: mount /dev/block/mmcblk... /mnt/emmc -t ... -o .........
Note: I am using CM7 and it executes /data/local/userinit.sh at boot. (Look at /etc/init.d/20userinit)
bigsheep123 said:
You can remove emmc from vold.fstab and create your own startup script in /data/local/userinit.sh.
Something like: mount /dev/block/mmcblk... /mnt/emmc -t ... -o .........
Note: I am using CM7 and it executes /data/local/userinit.sh at boot. (Look at /etc/init.d/20userinit)
Click to expand...
Click to collapse
Thanks, I already had that in mind for changing the actual partitions mounted in Android, but what I would like to figure out (and am having absolutely zero luck with) is how to change what shows in Windows/OSX/Linux when I plug it into a USB port. Currently when I connect my Nook I have the sdcard partition show up and the internal media partition show up in windows. I want to change those so that I can get a different partition to who instead of the emmc partition.
- Aerlock
Aerlock said:
Thanks, I already had that in mind for changing the actual partitions mounted in Android, but what I would like to figure out (and am having absolutely zero luck with) is how to change what shows in Windows/OSX/Linux when I plug it into a USB port. Currently when I connect my Nook I have the sdcard partition show up and the internal media partition show up in windows. I want to change those so that I can get a different partition to who instead of the emmc partition.
- Aerlock
Click to expand...
Click to collapse
You can use the samuelhalff Nook Color UMS app to select mapping of partitions to USB
http://forum.xda-developers.com/showthread.php?t=952456
Windows is normally only going to show results for partitions which are formatted as FAT(32) and won't show the ext3/4 partitions used for system and data.
bobtidey said:
You can use the samuelhalff Nook Color UMS app to select mapping of partitions to USB
http://forum.xda-developers.com/showthread.php?t=952456
Windows is normally only going to show results for partitions which are formatted as FAT(32) and won't show the ext3/4 partitions used for system and data.
Click to expand...
Click to collapse
Hrmmm...this works temporarily. I can use this app to change whats mounted but I need to re-run and remount at every disconnect and reconnect. What I really would like to find is the files/config that determines which partitions to mount at the time the Nook is connected to the computer. If I could find that info I'd be a happy Nooker.
- Aerlock
Anybody got an idea where I can look this info up? Or what files I should start poking around in to make these changes? I tried PMing samuelhalff last week and haven't gotten a reply yet.
- Aerlock
Aerlock said:
Anybody got an idea where I can look this info up? Or what files I should start poking around in to make these changes? I tried PMing samuelhalff last week and haven't gotten a reply yet.
- Aerlock
Click to expand...
Click to collapse
I can tell you what you need to change. The partition to mount is stored in /sys/devices/platform/usb_mass_storage/lun0/file. The 'file' is a text file with the partition number in it. For instance, if you wanted to mount the boot partition in emmc you would add "/dev/block/mmcblk0p1" (without the quotes) to the file. Then you could do the same with lun1 to mount something else. After you put the value in the file and save it, just plug in the cable. It will show up as a drive letter. (Do not select the 'turn on USB storage' button that pops up in android, that changes the files to point to /media (emmc) and /sdcard, and when you exit the mode, it clears them to null.)
I leave it to you to figure which partitions to mount and how to change the file when you need it. Remember, Windows can only read fat partitions, which on emmc is /rom (2?), /boot (1) and media (8). /system (5), /data (6), and /cache (7) are all ext and Windows cannot read ext without third party software help.
Not sure why you want to do this. If you are wanting to mount the SD boot partition on an SD installed system, it is ...mmcblk1p1.
leapinlar said:
I can tell you what you need to change. The partition to mount is stored in /sys/devices/platform/usb_mass_storage/lun0/file. The 'file' is a text file with the partition number in it. For instance, if you wanted to mount the boot partition in emmc you would add "/dev/block/mmcblk0p1" (without the quotes) to the file. Then you could do the same with lun1 to mount something else. After you put the value in the file and save it, just plug in the cable. It will show up as a drive letter. (Do not select the 'turn on USB storage' button that pops up in android, that changes the files to point to /media (emmc) and /sdcard, and when you exit the mode, it clears them to null.)
Click to expand...
Click to collapse
Thank you! Thank you! Thank you! I've been trying to find this info off and on for a few months now. I wasn't able to get it to go away with fiddling with the vold.fstab so I knew it was somewhere else but I didn't know where exactly.
So if I were to leave that file blank would it have nothing show up when I connect the NC to windows? Or do I need to do something else to disable the second lun?
leapinlar said:
I leave it to you to figure which partitions to mount and how to change the file when you need it. Remember, Windows can only read fat partitions, which on emmc is /rom (2?), /boot (1) and media (8). /system (5), /data (6), and /cache (7) are all ext and Windows cannot read ext without third party software help.
Click to expand...
Click to collapse
Thanks again, I'd found this out on my own while playing with mounting the various partitions in the vold.fstab but it's helpful to get someone else to confirm my findings.
leapinlar said:
Not sure why you want to do this. If you are wanting to mount the SD boot partition on an SD installed system, it is ...mmcblk1p1.
Click to expand...
Click to collapse
My ultimate goal is to disable the second partition mount in Windows. I only want to have the SD card data partition show up, I want to completely separate the emmc boot from the SD boot. I may also want to add the boot partition from the SD card at a later time so I can do upgrades when I have a computer but no SD card adapter/reader.
Also (just theoretically, for my understanding) would it be possible to add more luns by creating the dirs and files in the /sys/devices/platform/usb_mass_storage/ directory?
- Aerlock
Aerlock said:
So if I were to leave that file blank would it have nothing show up when I connect the NC to windows? Or do I need to do something else to disable the second lun?
Also (just theoretically, for my understanding) would it be possible to add more luns by creating the dirs and files in the /sys/devices/platform/usb_mass_storage/ directory?
Click to expand...
Click to collapse
There are always going to be two drives show up when you plug it in (lun0 and lun1). They are non functional until you press the button to turn on (because the two files are empty). When you press the button the software populates the files with the emmc and sdcard partition locations and the drives become functional.
I'm not sure how to prevent emmc from showing if you want just sdcard. Maybe you can set permissions on one to be all boxes unchecked. But two drives will always show, just one may be non functional. Another option would be to set the two luns to be what you want and set permissions to be read only. Then maybe pushing the button will have no effect.
But two drive letters will always show.
No, there can only be two lun files. It is built into the operating system.
Edit: I am going to experiment and get back to you.
Edit 2: I've got it all fixed for you. I attached a rar file to the board. Just unrar and you will find two files
The first, 55mountsingleSD, will cause just the SD card to mount. The second drive letter should disappear.
The second, 56mount2customdrives, will mount the boot partition of emmc and the SD card. You can edit the file to change which two partitions you want Windows to see.
Place one (only one) of these files in the /system/etc/init.d folder and change its permissions to match the other files in that folder.
When you reboot with one of these files in that folder, the drive(s) are ready for mounting in Windows. All you have to do is plug in your USB cable. The drive(s) should show in Windows automatically. Do NOT select the "Turn on USB storage" button (just hit the back button). If you do, it will unmount emmc and the SD card in CM7 and you will have to go to settings to re-mount them. Also, be sure to "eject" the drives in Windows before disconnecting the cable.
NookColorUMS will not work anymore because I accomplished this by locking the lun files. If you want to use it, just remove the file from init.d or rename it with .bak and reboot and everything will return to normal.
Enjoy
Have you tried this? I'm looking for feedback. BTW, for others interested, this will not work on CM9 since it does not currently support UMS mounting.
leapinlar said:
Have you tried this? I'm looking for feedback. BTW, for others interested, this will not work on CM9 since it does not currently support UMS mounting.
Click to expand...
Click to collapse
Sadly I haven't had a chance to try it. I've got a 2 year old and a sick wife at home so my time has been limited. Good news is the wife is almost back to normal now and I should be able to play with these tomorrow or this weekend.
- Aerlock
P.S. Thanks for the scripts. They'll save me lots of trial and error making my own.
leapinlar said:
Have you tried this? I'm looking for feedback. BTW, for others interested, this will not work on CM9 since it does not currently support UMS mounting.
Click to expand...
Click to collapse
Finally got a chance to try these out between projects at work today.
Here's what I get when I run the 55mountsingleSD script in gscript:
Code:
stderr:
stderr:
stderr:
stderr:
stderr: cannot create /sys/devices/platform/usb_mass_storage/lun0/file: permission denied
stderr:
stderr:
stderr:
stderr:
stderr:
stderr:
The first time I ran it I got all 'stderr:' lines. I do have a Boot partition mounted in windows after running this script. I haven't checked to determine if its the SD card or the emmc but it appears to be the SD card at first glance.
Here's what I get when I run the 56mount2customdrives script in gscript:
Code:
stderr:
stderr:
stderr:
stderr:
stderr: cannot create /sys/devices/platform/usb_mass_storage/lun0/file: permission denied
stderr:
stderr: cannot create /sys/devices/platform/usb_mass_storage/lun1/file: permission denied
stderr:
stderr:
stderr:
stderr:
stderr:
stderr:
Again the first time I ran it I got all 'stderr:' lines. This time I have 2 boot partitions mounted in windows, 1 appears to be the emmc and the other the SDcard.
I also took a look at the /sys/devices/platform/usb_mass_storage/lun(x)/file files and heres what I found in them when I had the USB storage turned on:
Code:
lun0 - /dev/block/vold/179:20
lun1 - /dev/block/vold/179:8
Since you've been so helpful with these scripts I've got some more questions for you.
Where are the settings for the USB storage stored? For example what do I change if I want the 'Turn on USB storage' button to mount the sdcard and boot partitions of my SD card instead of the sdcard and emmc media partitions?
Or how do I disable the USB storage screen from popping up when I connect the USB cable so I can just use the script.
Also how do I unmount the partitions when I'm done in windows? Just delete the contents of those two files?
- Aerlock
Aerlock said:
Finally got a chance to try these out between projects at work today.
Here's what I get when I run the 55mountsingleSD script in gscript:
Code:
stderr:
stderr:
stderr:
stderr:
stderr: cannot create /sys/devices/platform/usb_mass_storage/lun0/file: permission denied
stderr:
stderr:
stderr:
stderr:
stderr:
stderr:
The first time I ran it I got all 'stderr:' lines. I do have a Boot partition mounted in windows after running this script. I haven't checked to determine if its the SD card or the emmc but it appears to be the SD card at first glance.
Here's what I get when I run the 56mount2customdrives script in gscript:
Code:
stderr:
stderr:
stderr:
stderr:
stderr: cannot create /sys/devices/platform/usb_mass_storage/lun0/file: permission denied
stderr:
stderr: cannot create /sys/devices/platform/usb_mass_storage/lun1/file: permission denied
stderr:
stderr:
stderr:
stderr:
stderr:
stderr:
Again the first time I ran it I got all 'stderr:' lines. This time I have 2 boot partitions mounted in windows, 1 appears to be the emmc and the other the SDcard.
I also took a look at the /sys/devices/platform/usb_mass_storage/lun(x)/file files and heres what I found in them when I had the USB storage turned on:
Code:
lun0 - /dev/block/vold/179:20
lun1 - /dev/block/vold/179:8
Since you've been so helpful with these scripts I've got some more questions for you.
Where are the settings for the USB storage stored? For example what do I change if I want the 'Turn on USB storage' button to mount the sdcard and boot partitions of my SD card instead of the sdcard and emmc media partitions?
Or how do I disable the USB storage screen from popping up when I connect the USB cable so I can just use the script.
Also how do I unmount the partitions when I'm done in windows? Just delete the contents of those two files?
- Aerlock
Click to expand...
Click to collapse
Did you read my post? Those scripts were not meant to run in gscript. Thats why you are getting those error messages. They were meant to put in /etc/init.d. They have to be run at boot time to have the right permissions to do things.
The settings for 'turn on' are stored in the operating system program code. You will not be able to change that.
Again, the scripts are not to be run after booting. They run at boot time and are there waiting for you to plug in the cable. When the cable is plugged in, they automatically show up in windows (depending on which script you put in init.d). Just hit the back button when the pop-up comes up to get rid of it. To disconnect the drives in Windows, use the eject command by right clicking on the drive in Windows Explorer. Then unplug the cable and it is ready for next time you plug in. Don't do anything with the files. Just never press the 'Turn on' button, ever. Just hit back to get rid of it.
If you want different partitions to show, edit the script file before you re-boot.
leapinlar said:
Did you read my post? Those scripts were not meant to run in gscript. Thats why you are getting those error messages. They were meant to put in /etc/init.d. They have to be run at boot time to have the right permissions to do things.
The settings for 'turn on' are stored in the operating system program code. You will not be able to change that.
Again, the scripts are not to be run after booting. They run at boot time and are there waiting for you to plug in the cable. When the cable is plugged in, they automatically show up in windows (depending on which script you put in init.d). Just hit the back button when the pop-up comes up to get rid of it. To disconnect the drives in Windows, use the eject command by right clicking on the drive in Windows Explorer. Then unplug the cable and it is ready for next time you plug in. Don't do anything with the files. Just never press the 'Turn on' button, ever. Just hit back to get rid of it.
If you want different partitions to show, edit the script file before you re-boot.
Click to expand...
Click to collapse
I feel stupid now. I did read that the first time. When I went back and got the files to test I just skimmed your post and thought I knew what I was doing. Let me try these again and I'll post the results.
- Aerlock
where are these files in cm 10.1
Hi there,
I'm running CM 10.1 aka 4.2 on a Samsung I9000..I'm wondering if you can point me in the wright direction where these files are stored....
And what to change...
As said in the private message i would like to make my second SDCARD or a folder from it visible on the first sdcard even when I connect to Windows.
Vold.fstap doesn't help me in this case..
Already a big thank you for pointing in the right direction
Is there a posibility to repost the scripts I understand they'll have to be in init.d...
Kind Regards
Guy Forssman
How on Samsung I9000 CM 10.1
With putty as the tool and SSHDroid running as app
I do a "ls /dev/block/vold"
results in 179.0 179.1 179.2 179.8 179.9
"ls /dev/block/platform" results in s3c-sdchi.0 s3c-sdchi.2 s5pc110-onenand
"mount" learns me
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)
none on /dev/cpuctl type cgroup (rw,relatime,cpu)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
/sys/kernel/debug on /sys/kernel/debug type debugfs (rw,relatime)
none on /acct type cgroup (rw,relatime,cpuacct)
tmpfs on /mnt/secure type tmpfs (rw,relatime,mode=700)
tmpfs on /mnt/asec type tmpfs (rw,relatime,mode=755,gid=1000)
tmpfs on /mnt/obb type tmpfs (rw,relatime,mode=755,gid=1000)
/dev/block/mtdblock3 on /cache type yaffs2 (rw,nosuid,nodev,relatime)
/dev/block/mtdblock5 on /radio type yaffs2 (rw,relatime)
/dev/block/mtdblock2 on /datadata type yaffs2 (rw,relatime)
/dev/lvpool/system on /system type ext4 (ro,relatime,barrier=1,data=ordered)
/dev/lvpool/userdata on /data type ext4 (rw,nosuid,nodev,noatime,errors=panic,barrier=1,nomblk_io_submit,data=ordered)
/dev/block/mtdblock4 on /efs type yaffs2 (rw,relatime)
]/dev/block/vold/179:9 on /storage/sdcard1 type 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)
/dev/block/vold/179:1 on /storage/sdcard0 type 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)
tmpfs on /storage/sdcard0/.android_secure type tmpfs (ro,relatime,size=0k,mode=000)
/dev/block/dm-2 on /mnt/asec/me.shkschneider.dropbearserver-1 type ext4 (ro,dirsync,nosuid,nodev,noatime,barrier=1)
and indeed windows 7 shows me a walkman icon with 2 entrys
SD card
USB storage
The content of the external micro sd card is on the SD card which Windows8 shows
The content of the internal memory is shown on windows8 in the USB storage
The phone itself doesn't shown the usb mount icon
It seems that even after a reboot the settings stay
I did a "setprop persist.sys.usb.config mtp,adb"
"echo /dev/block/vold/179:1 > /sys/devices/platform/s3c-usbgadget/gadget/lun0/file"
"echo /dev/block/vold/179:9 > /sys/devices/platform/s3c-usbgadget/gadget/lun1/file"
Forssound said:
With putty as the tool and SSHDroid running as app
I do a "ls /dev/block/vold"
results in 179.0 179.1 179.2 179.8 179.9
"ls /dev/block/platform" results in s3c-sdchi.0 s3c-sdchi.2 s5pc110-onenand
"mount" learns me
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)
none on /dev/cpuctl type cgroup (rw,relatime,cpu)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
/sys/kernel/debug on /sys/kernel/debug type debugfs (rw,relatime)
none on /acct type cgroup (rw,relatime,cpuacct)
tmpfs on /mnt/secure type tmpfs (rw,relatime,mode=700)
tmpfs on /mnt/asec type tmpfs (rw,relatime,mode=755,gid=1000)
tmpfs on /mnt/obb type tmpfs (rw,relatime,mode=755,gid=1000)
/dev/block/mtdblock3 on /cache type yaffs2 (rw,nosuid,nodev,relatime)
/dev/block/mtdblock5 on /radio type yaffs2 (rw,relatime)
/dev/block/mtdblock2 on /datadata type yaffs2 (rw,relatime)
/dev/lvpool/system on /system type ext4 (ro,relatime,barrier=1,data=ordered)
/dev/lvpool/userdata on /data type ext4 (rw,nosuid,nodev,noatime,errors=panic,barrier=1,nomblk_io_submit,data=ordered)
/dev/block/mtdblock4 on /efs type yaffs2 (rw,relatime)
]/dev/block/vold/179:9 on /storage/sdcard1 type 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)
/dev/block/vold/179:1 on /storage/sdcard0 type 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)
tmpfs on /storage/sdcard0/.android_secure type tmpfs (ro,relatime,size=0k,mode=000)
/dev/block/dm-2 on /mnt/asec/me.shkschneider.dropbearserver-1 type ext4 (ro,dirsync,nosuid,nodev,noatime,barrier=1)
and indeed windows 7 shows me a walkman icon with 2 entrys
SD card
USB storage
The content of the external micro sd card is on the SD card which Windows8 shows
The content of the internal memory is shown on windows8 in the USB storage
The phone itself doesn't shown the usb mount icon
It seems that even after a reboot the settings stay
I did a "setprop persist.sys.usb.config mtp,adb"
"echo /dev/block/vold/179:1 > /sys/devices/platform/s3c-usbgadget/gadget/lun0/file"
"echo /dev/block/vold/179:9 > /sys/devices/platform/s3c-usbgadget/gadget/lun1/file"
Click to expand...
Click to collapse
If you want those luns to be different, you echo a different /dev/block... to the file instead of the vold locations. Looks like it uses /dev/block/mtdblock with a partition number after it for the interior partitions. Look in /dev/block/platform and those sc3-h... folders and see if it lists partition numbers either for interior or sdcards.
Sent from my HD+ running CM10 on SD with XDA Premium
rest the question
how do i make these commands flash proof?
Already the commands I did made the car find my phone and played the music..
It also played system sounds, my movies etc etc
I just did a
/dev/block/platform # ls
s3c-sdhci.0 s3c-sdhci.2 s5pc110-onenand
/dev/block/platform # cd s5pc110-onenand
/dev/block/platform/s5pc110-onenand # ls
mtdblock0 mtdblock1 mtdblock2 mtdblock3 mtdblock4 mtdblock5 mtdblock6
"cd /dev/block/platform/s3c-sdhc1.0"
"ls"
result by-num mmcblk0 mmcblk0p1 mmcblk0p2
cd /dev/block/platform/s3c-sdhci.2
/dev/block/platform/s3c-sdhci.2 # ls
by-num mmcblk1 mmcblk1p1
So if I only would mount the music folder from my external folder onto a folder on the internal folder?
Or is it easyer to just mount the whole extenal sd card ?
Forssound said:
how do i make these commands flash proof?
Click to expand...
Click to collapse
I'm not sure what you mean flash proof. Do you mean so they stick after flashing a new rom? To do that you need to put the commands in /data. And for that to work, your rom has to support userinit.d or bootcompletehook.sh in /data. Each device is different. Look in your init.d folder and see if it has a script that calls userinit.d. You said you had CM10.1 and usually CM supports userinit.d. Create a folder in /data/local named userinit.d and put your scripts there. They get run right after init.d scripts are run. Be sure to set the script file permissions to execute.
Sent from my HD+ running CM10 on SD with XDA Premium
leapinlar said:
I'm not sure what you mean flash proof. Do you mean so they stick after flashing a new rom? To do that you need to put the commands in /data. And for that to work, your rom has to support userinit.d or bootcompletehook.sh in /data. Each device is different. Look in your init.d folder and see if it has a script that calls userinit.d. You said you had CM10.1 and usually CM supports userinit.d. Create a folder in /data/local named userinit.d and put your scripts there. They get run right after init.d scripts are run. Be sure to set the script file permissions to execute.
Sent from my HD+ running CM10 on SD with XDA Premium
Click to expand...
Click to collapse
I found a init.rc on /data/local/tmp
it's huge
in /system/etc/init.d I found 2 files 00banner and 90userinit
vi 90userinit is this
#!/system/bin/sh
# call userinit.sh and/or userinit.d/* scripts if present in /data/local
if [ -e /data/local/userinit.sh ];
then
log -p i -t userinit "Executing /data/local/userinit.sh";
logwrapper /system/bin/sh /data/local/userinit.sh;
setprop cm.userinit.active 1;
fi;
if [ -d /data/local/userinit.d ];
then
logwrapper busybox run-parts /data/local/userinit.d;
setprop cm.userinit.active 1;
fi;
so it seems that I can make a
/data/local/userinit.d
this file should be executable and what do you advise I put in it?
---------- Post added at 11:01 PM ---------- Previous post was at 10:51 PM ----------
Is it better to use
setprop persist.sys.usb.config mass_storage,adb
or
setprop persist.sys.usb.config mtp,adb
further you talk about the /dev/block/platform and those sc3-h... folders
I found the following
echo /dev/block/vold/179:9 > /sys/devices/platform/s3c-usbgadget/gadget/lun1/file"
Is there a reason to choose to use one above the other?

[GUIDE] LogStructuredFileSystem SuperThread (nilfs2,f2fs)

Disclaimer, apply the following at your own risk, I plan to test most if not all of what I post but can't guarantee that you will not cause damage or lose data, and if you do I take no responsibility, that being said it is a simple adaption to current installations.
This is in no way (currently) a replacement for ext4 (or NAND), and shouldn't be seen as a replacement for NativeSD (I'm just piggybacking of their installation zips) compatibility across the board just isn't good enough yet.
Mark 1 - Nilfs2
Code:
Nilfs2 should be good as a replacement for lower class cards and may show a speed improvement on class 2/4 cards. If your installing on a fresh card and have the means to use nilfs2 then please try before/after using ext4 and report back your findings. Any requests for things currently using ext4 will be looked at to make them compatible with nilfs2 if possible.
[B]Partition creation[/B]
Currently only via a Linux OS, will try and trick a recovery to create a nilfs2 instead of ext but no promises
[I]Method 1. Terminal[/I][CODE]sudo apt-get install nilfs-tools
sudo mkfs -t nilfs2 /dev/sdc2
Changing sdc2 to the partition thats to be formatted, look in gparted to be sure your formatting the correct one
Method 2. Disk Utility
You can use Disk Utility from within a LinuxOS
Method 3. Gparted live
Partition creation should be possible using a gparted live usb or cd
Method 4. On device
Copy mkfs.nilfs2 binary to /system/xbin
duplicate fstab renaming to mtab
sudo mkfs.nilfs2 /dev/block/mmcblk0p2
ROM Modifications
Currently, starting with a NativeSD zip as a base only need to alter the install.sh and modify a few lines within the init (within /kernel/bootsd/initrd.gz)
INSTALL.SH
Code:
mount -t ext4 /dev/block/mmcblk0p2 /ext4p
change to
mount -t nilfs2 /dev/block/mmcblk0p2 /ext4p
INIT
Code:
mkdir -p /NativeSD
mount -t ext4 -o rw,noatime,nodiratime,barrier=0 /dev/block/mmcblk0p2 /NativeSD
change to
mkdir -p /NativeSD
mkdir -p /nilfs
mount -t nilfs2 /dev/block/mmcblk0p2 /nilfs
mount -t nilfs2 -o rw,noatime,nodiratime,barrier=0 /dev/block/mmcblk0p2 /NativeSD
ROM Installation
Installation confirmed working via CWM, and modified 4ext (recoverymod) (will need to test others)
After Install modifications
Download Nilfs2.zip from #2 , using a root browser or adb copy the system folder to / (thus adding the folders /files to /system). Then need to change permissions of /system/xbin/nilfs_cleanerd , /system/etc/nilfs_cleanerd.conf and /system/etc/init.d/04nilfs to 755 (permissions required will probably change at some point)
Backup
Backup of NILFS2 partition can be done by CWM but only if android is also in NAND as it needs to backup the whole system.
REQUEST: Help from any one who has experience with NiLFS2, and ideally people who have gotten the cleaner to run properly, I'm sure it ran correctly several times, but can't as yet recreate how I got it to work. Let me know if you think you can help [/COLOR][/B]
User Experience
Xylograph's user experience and benchmark NAND / EXT4 / NiLFS2
AnTuTu and Androbench benchmarks[/CODE]
F2FS
Code:
[SIZE="2"][B]Partition creation[/B]
[I][B]Linux only[/B][/I]
Download [URL="http://sourceforge.net/projects/f2fs-tools/"]f2fs tools[/URL] and extract,
cd into folder and run the following[CODE]autoreconf --install
sudo chmod +x configure
sudo ./configure
sudo make
sudo make install
Now you can format:
Code:
sudo umount /dev/sdd1
sudo mkfs.f2fs /dev/sdd1
[/SIZE][/CODE]
To do list
Tidy up the Aroma installer to say nilfs2 instead of ext
Modify a recovery (needed still???)
Modify installer to allow NAND/ext4/nilfs2 installation
Optimize init.d script
Optimize init mounts
Possible beneficial references from across the web
NiLFS website
Not sure if ext4 would have the same problem as ext2
Btrfs
Kernel updates??
Credits / Thanks
Unhelpful for the nilfs2 binaries
Xylograph and securecrt for NativeSD Installation method
ROM devs. (Updated as ROM diffs. added)
Xylograph for AOKP, PA, CyanX
Smokin901 for MIUI
Tytung for Nexus-HD2
Rick1995 for BareBones CM7
Kernel devs.
Securert
Tytung
NILFS2 SuperThread
Will fill this out in due course,
New setup, with sdcard partitions being FAT32 / EXT4 / ANY
requirement for different ROMs should be just the initrd and to change rom_name in a few files.
First change build is on post 34
Fyi. it would be relatively simple to change it to FAT32 / ANY / ANY so if you don't want an additional partition using two (fat32/nilfs2) shouldn't be a problem.
Attached is the different installer files, should be self explanitory, really just need the NAND_ANY_ANY one, but there you go.
NAND_ANY_ANY is the only one without included initrd.gz's, will eventually add a readme detailing what you need to change in the zip, for installing other ROMs and attach a list of initrd's for different roms and partition types / locations
ROM diff files attached, edit the files in the relevant NativeSD zips. And install via recovery.
Have modified securecrt's diff file for BBCM7 - although am having some issues wouldn't advise its use (yet) DON'T USE BBCM7
General
The nilfs2 mounts with the general mount script mount and not the mount.nilfs2.
Need reports on any settings that should help the system; for example noop seems to be the best i/o scheduler for me but have no confirmation from others
Attached Files
ROM 7zip files contain the different files from there corresponding NativeSD zip
All bins and .conf that I've found can be found in nilfs.7z
Nilfs2.zip contains the 3 files needed for the cleaner to work, just copy system over using a root browser and give the three file execution permission.
Init.d script
Original - confirmed working - just point to nilfs_cleanerd . If not already present add the following to /system/etc/init.d/ and chmod +x (or chmod 755) it via terminal/root explorer
Code:
#!/system/bin/sh
/system/xbin/nilfs_cleanerd
Currently trying the following - will probably be implemented within ramdisk at some point - adapted from unhelpful's user_init
Code:
#!/system/bin/sh
export PATH=$PATH:/system/xbin
exec >/system/nilfs2_mount.log
exec 2>&1
set -x
umount /nilfs
time mount -t nilfs2 -o noatime /dev/block/mmcblk0p2 /nilfs
nilfs_cleanerd -c /system/etc/nilfs_cleanerd.conf /dev/block/mmcblk0p2 /nilfs
Edit: files attached as ROM_NAME_initrd.gz need to just be renamed as initrd.gz
HypoTurtle said:
Current relevent files can be found here
Click to expand...
Click to collapse
Thx a lot, however would you be so kind to do the same with BareBoneCM7 NativeSD?
You haven't specified in the starting post how exactly lines should be modified in the init (within /kernel/bootsd/initrd.gz) and also install.sh...
Thanks for creating this thread, HypoTurtle!
Let the ideas start to flow
I'm sure nilfs2 will take over ext4 storage as prefered format once all details are ironed out and recoveries are updated to support it.
It's technically superior to other formats for any solid state memory device.
(BTW, I sent you a PM earlier)
I'm now running CyanMobileX with your nilfs2 binaries. It's just runs flawless!, speedy and I feel my data is very safe in case of any abrupt crash or power failure.
can some one make nilfs2 for this rom :victory:
http://forum.xda-developers.com/showthread.php?t=1681906
HypoTurtle said:
After Install modifications (needs clarification in terms of location)
Will tidy this up as they should/can be included in installation/flashable zip; but using adb/root browser copy the bins and .conf file into /system/xbin. And add a script to /system/etc/init.d initiating /system/xbin/nilfs_cleanerd. Then give the files execution permissions.
Click to expand...
Click to collapse
*.conf file into /system/xbin but not into /etc ?
One more notion: why not to put all these files from nilfs.7z into directories already inside ROM installation zip? (You advise to do it only after installation is complete)
ioy said:
*.conf file into /system/xbin but not into /etc ?
Click to expand...
Click to collapse
Yep, the .conf goes under "system/etc"
ioy said:
*.conf file into /system/xbin but not into /etc ?
One more notion: why not to put all these files from nilfs.7z into directories already inside ROM installation zip? (You advise to do it only after installation is complete)
Click to expand...
Click to collapse
Sorry yes, the default install location for the .conf would be in /etc (or /system/etc; same folder).
Integration of the binaries into the ROM is something I did state would be done eventually, but think that would also require digging through the zip to find where permissions are added and change those, and have had a bit of a hit and miss experience with the cleaner at the moment, want to make sure I have the permissions correct and it's working well before integration.
Kwag, could you make a post listing the benefits of nilfs2, as you know a lot more than I do.
HypoTurtle said:
Kwag, could you make a post listing the benefits of nilfs2, as you know a lot more than I do.
Click to expand...
Click to collapse
Already have
http://forum.xda-developers.com/showpost.php?p=31657498&postcount=716
Here's a copy:
Checksums
Immediate recovery after system crash (no fsck needed at all!)
Continuous (tailored) snapshots of the fs.
Those are benefits of nilfs over ext4. Ext4 has none of those!
no way to creat nilfs on ubuntu cause when i open termenal and command
mkfs -t nilfs2 /dev/sdb2
it give me Error: cannot open device: /dev/sdb2
so any ideas.....
seaman2k said:
no way to creat nilfs on ubuntu cause when i open termenal and command
mkfs -t nilfs2 /dev/sdb2
it give me Error: cannot open device: /dev/sdb2
so any ideas.....
Click to expand...
Click to collapse
sorry, might need sudo ; so sudo mkfs -t nilfs2 /dev/sdb2 failling that try formatting it to ext4 in gparted then try again.
Code:
[SIZE="2"]E/PackageManager( 1471): Couldn't create temp file for downloaded package file.
E/AndroidRuntime( 1471): *** FATAL EXCEPTION IN SYSTEM PROCESS: PackageManager
E/AndroidRuntime( 1471): java.lang.NullPointerException
E/AndroidRuntime( 1471): at com.android.server.PackageManagerService$FileInstallArgs.createCopyFile(PackageManagerService.java:5247)
E/AndroidRuntime( 1471): at com.android.server.PackageManagerService$FileInstallArgs.copyApk(PackageManagerService.java:5255)
E/AndroidRuntime( 1471): at com.android.server.PackageManagerService$InstallParams.handleStartCopy(PackageManagerService.java:5051)
E/AndroidRuntime( 1471): at com.android.server.PackageManagerService$HandlerParams.startCopy(PackageManagerService.java:4902)
E/AndroidRuntime( 1471): at com.android.server.PackageManagerService$PackageHandler.doHandleMessage(PackageManagerService.java:516)
E/AndroidRuntime( 1471): at com.android.server.PackageManagerService$PackageHandler.handleMessage(PackageManagerService.java:461)
E/AndroidRuntime( 1471): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 1471): at android.os.Looper.loop(Looper.java:130)
E/AndroidRuntime( 1471): at android.os.HandlerThread.run(HandlerThread.java:60)
E/AudioHardwareQSD( 1827): Cannot open /dev/audience_a1026 -1
E/HTC Acoustic( 1827): Update ADIE table ID 0
E/HTC Acoustic( 1827): Update ADIE table ID 2
E/HTC Acoustic( 1827): Update ADIE table ID 5
E/HTC Acoustic( 1827): Update ADIE table ID 7
E/HTC Acoustic( 1827): Update ADIE table ID 8
E/HTC Acoustic( 1827): Update ADIE table ID 10
E/HTC Acoustic( 1827): Update ADIE table ID 51
E/HTC Acoustic( 1827): Update ADIE table ID 53
E/HTC Acoustic( 1827): Fail to open /system/etc/TPA2018.csv -1.
E/SoundPool( 1844): error loading /system/media/audio/ui/Effect_Tick.ogg
E/SoundPool( 1844): error loading /system/media/audio/ui/KeypressStandard.ogg
E/SoundPool( 1844): error loading /system/media/audio/ui/KeypressSpacebar.ogg
E/SoundPool( 1844): error loading /system/media/audio/ui/KeypressDelete.ogg
E/SoundPool( 1844): error loading /system/media/audio/ui/KeypressReturn.ogg
E/GSM ( 1929): Wrong network type: 0
E/GSM ( 1929): Wrong network type: 0
E/GSM ( 1929): Wrong network type: 0
E/GSM ( 1929): Wrong network type: 0
E/GSM ( 1929): Wrong network type: 0
E/GSM ( 1929): Wrong network type: 0
E/GSM ( 1929): Wrong network type: 0
E/GSM ( 1929): Wrong network type: 0
E/NetworkLocationProvider( 1970): releaseCheckLocationLock: wake lock has already been released
E/WifiStateTracker( 1844): DHCP request failed: Timed out waiting for DHCP to finish
E/ConnectivityService( 1844): Attempt to connect to WIFI failed.[/SIZE]
logcat attached for BB7 when trying to install an app from the market, what happens is when downloading a app it downloads fine, but doesn't install, screen just turns off an app isn't installed. Haven't seen this posted elsewhere so may be nilfs2 related, anyone have any ideas.
HypoTurtle said:
logcat attached for BB7 when trying to install an app from the market, what happens is when downloading a app it downloads fine, but doesn't install, screen just turns off an app isn't installed. Haven't seen this posted elsewhere so may be nilfs2 related, anyone have any ideas.
Click to expand...
Click to collapse
Yeah I think I already mentioned it in the NativeSD thread.. it's because securecrt is using a method to share the '/root of your 'ext' partition/app' folder with all NativeSD roms, but that folder doesn't have the right permissions and so the whole system is failing..
This needs proper modifications in the updater script first just like the 'nilfs_cleanerd' stuff..
Xylograph said:
Yeah I think I already mentioned it in the NativeSD thread.. it's because securecrt is using a method to share the '/root of your 'ext' partition/app' folder with all NativeSD roms, but that folder doesn't have the right permissions and so the whole system is failing..
This needs proper modifications in the updater script first just like the 'nilfs_cleanerd' stuff..
Click to expand...
Click to collapse
Thanks just noticed that myself (the app folder in the root of the partition)
HypoTurtle said:
Thanks just noticed that myself (the app folder in the root of the partition)
Click to expand...
Click to collapse
I advise you to use the init script (ramdisk) structure found in my roms and leave the 'sharing data/app' folder aside untill it's properly inplemented
HypoTurtle said:
Code:
[SIZE="2"]E/PackageManager( 1471): Couldn't create temp file for downloaded package file.
E/AndroidRuntime( 1471): *** FATAL EXCEPTION IN SYSTEM PROCESS: PackageManager
E/AndroidRuntime( 1471): java.lang.NullPointerException
E/AndroidRuntime( 1471): at com.android.server.PackageManagerService$FileInstallArgs.createCopyFile(PackageManagerService.java:5247)
E/AndroidRuntime( 1471): at com.android.server.PackageManagerService$FileInstallArgs.copyApk(PackageManagerService.java:5255)
E/AndroidRuntime( 1471): at com.android.server.PackageManagerService$InstallParams.handleStartCopy(PackageManagerService.java:5051)
E/AndroidRuntime( 1471): at com.android.server.PackageManagerService$HandlerParams.startCopy(PackageManagerService.java:4902)
E/AndroidRuntime( 1471): at com.android.server.PackageManagerService$PackageHandler.doHandleMessage(PackageManagerService.java:516)
E/AndroidRuntime( 1471): at com.android.server.PackageManagerService$PackageHandler.handleMessage(PackageManagerService.java:461)
E/AndroidRuntime( 1471): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 1471): at android.os.Looper.loop(Looper.java:130)
E/AndroidRuntime( 1471): at android.os.HandlerThread.run(HandlerThread.java:60)
E/AudioHardwareQSD( 1827): Cannot open /dev/audience_a1026 -1
E/HTC Acoustic( 1827): Update ADIE table ID 0
E/HTC Acoustic( 1827): Update ADIE table ID 2
E/HTC Acoustic( 1827): Update ADIE table ID 5
E/HTC Acoustic( 1827): Update ADIE table ID 7
E/HTC Acoustic( 1827): Update ADIE table ID 8
E/HTC Acoustic( 1827): Update ADIE table ID 10
E/HTC Acoustic( 1827): Update ADIE table ID 51
E/HTC Acoustic( 1827): Update ADIE table ID 53
E/HTC Acoustic( 1827): Fail to open /system/etc/TPA2018.csv -1.
E/SoundPool( 1844): error loading /system/media/audio/ui/Effect_Tick.ogg
E/SoundPool( 1844): error loading /system/media/audio/ui/KeypressStandard.ogg
E/SoundPool( 1844): error loading /system/media/audio/ui/KeypressSpacebar.ogg
E/SoundPool( 1844): error loading /system/media/audio/ui/KeypressDelete.ogg
E/SoundPool( 1844): error loading /system/media/audio/ui/KeypressReturn.ogg
E/GSM ( 1929): Wrong network type: 0
E/GSM ( 1929): Wrong network type: 0
E/GSM ( 1929): Wrong network type: 0
E/GSM ( 1929): Wrong network type: 0
E/GSM ( 1929): Wrong network type: 0
E/GSM ( 1929): Wrong network type: 0
E/GSM ( 1929): Wrong network type: 0
E/GSM ( 1929): Wrong network type: 0
E/NetworkLocationProvider( 1970): releaseCheckLocationLock: wake lock has already been released
E/WifiStateTracker( 1844): DHCP request failed: Timed out waiting for DHCP to finish
E/ConnectivityService( 1844): Attempt to connect to WIFI failed.[/SIZE]
logcat attached for BB7 when trying to install an app from the market, what happens is when downloading a app it downloads fine, but doesn't install, screen just turns off an app isn't installed. Haven't seen this posted elsewhere so may be nilfs2 related, anyone have any ideas.
Click to expand...
Click to collapse
In the BB7 the same happened on Ext4, it had been reported many times even before NILFS-NativeSD idea arrived.
Xylograph said:
I advise you to use the init script (ramdisk) structure found in my roms and leave the 'sharing data/app' folder aside untill it's properly inplemented
Click to expand...
Click to collapse
Yeah thats the first thing I tried, but still not working correctly.
Other than removing the following from the init is there anything I've overlooked?
Code:
# create app data/app dir
mkdir -p /NativeSD/app
mkdir -p /data/app
mount --bind /NativeSD/app /data/app
if [ ! -d /data/.cache ];then
mkdir -m 0770 /data/.cache
chown 1000:2001 /data/.cache
fi
ln -s /data/.cache /cache
RecoveryMOD seems to run fine (Magldr - android on nand), and installs as expected.
HypoTurtle said:
Yeah thats the first thing I tried, but still not working correctly.
Other than removing the following from the init is there anything I've overlooked?
Code:
# create app data/app dir
mkdir -p /NativeSD/app
mkdir -p /data/app
mount --bind /NativeSD/app /data/app
if [ ! -d /data/.cache ];then
mkdir -m 0770 /data/.cache
chown 1000:2001 /data/.cache
fi
ln -s /data/.cache /cache
RecoveryMOD seems to run fine (Magldr - android on nand), and installs as expected.
Click to expand...
Click to collapse
Hmm.. have you compared the updater-script with for example the CyanMobile one ?
I also made an RecoveryMOD2 that will only mount the fat32, mmcblk0p2 and if available mmcblk0p3...
Xylograph said:
Hmm.. have you compared the updater-script with for example the CyanMobile one ?
I also made an RecoveryMOD2 that will only mount the fat32, mmcblk0p2 and if available mmcblk0p3...
Click to expand...
Click to collapse
Couldn't see anything relevant there, Could it be something in init.htcleo.rc? Have tried commenting everything at on fs, but still not fixed. There's also some mounts for squashfs files in init.rc (for modules and xbin) that seem redundant.

[How-To] [Link2SD] Solve "mount: No such file or directory" error on stock ROM

[How-To] [Link2SD] Solve "mount: No such file or directory" error on stock ROM
I rooted my Galaxy S3 Mini (GT-i8190) (following seedrom193's tutorial), but I'm still on the stock Android ROM.
I was trying to use Link2SD with a correctly partitioned SD card (10GB primary FAT32 + 4GB primary ext2), but got the following error, which showed every time I tried to recreate mount scripts:
"Mount script cannot be created. mount: No such file or directory"
Also, on every reboot, I would get a "Mount warning" from Link2SD, requiring me to "quick reboot" my phone. After that (second) reboot, Link2SD would work correctly, but shortcuts on my home screen to linked apps were missing.
After much googling I figured that maybe the problem was caused by my (stock) ROM not having init.d support. So I used this method to add init.d:
http://forum.xda-developers.com/showthread.php?t=1933849
Init.d worked properly, but I still got the same error in Link2SD. Then, I used Root Explorer to look at my file system (any other root browser would work too I guess) and found the cause. Here's the contents of /data/data/com.buak.Link2SD/files/init-link2sd.sh, which I *guess* is a copy of the script Link2SD is trying to get to run at boot:
Code:
set +e
echo "$(date) mounting..." > $LOG
sleep 4
mount -t ext2 -o rw [COLOR="Red"][B]/dev/block/vold/179:98[/B][/COLOR] /data/sdext2 1>>$LOG 2>>$LOG
mount -t ext2 -o rw /dev/block/mmcblk1p2 /data/sdext2 1>>$LOG 2>>$LOG
mount >> $LOG
echo "$(date) mount finished" >> $LOG
Apparently, the device node /dev/block/vold/179:98 does not exist, because Android's vold mounting system doesn't automatically mount the second partition of the SD card. This causes the "mount: No such file or directory" error on the first mount command. However, the second mount command (from /dev/block/mmcblk1p2) should work. For some reason, this error seems to keep Link2SD from installing the boot script.
So, I decided to create an init.d script of my own. Using Root Explorer, I created and edited a file named "11link2sd" in /system/etc/init.d/ and inserted the following text:
Code:
#!/system/bin/sh
sleep 4
mount -t ext2 -o rw /dev/block/mmcblk1p2 /data/sdext2
This solved the problem for me, and I can now use Link2SD without needing the extra quick reboot. I figured I'd share my solution in case anybody else had the same problem. I do suggest that anybody who tries to do the same thing first check the init-link2sd.sh file for that /dev/block/mmcblk1p2 bit, to make sure it''s the same.
Link2SD 2nd Partition getting full
Hi,
I saw that you are using Link2SD and seems to have a good understanding of the subject. I am new to using Android!
Maybe you could help. I think I properly installed Link2SD and that it is working correctly (I don't know of any way to check that).
When I go into the menu and ask for storage, I get the following: it is in french, but "libres" means "free".
Interne (85% Libres)
/data
Total: 4,37 Go Utilisés: 658 Mo Libres: 3,73 Go
Carte SD (85% Libres)
/storage/emulated/legacy
Total: 4,37 Go Utilisés: 658 Mo Libres: 3,73 Go
Externe SD (98% Libres)
/storage/external_SD
Total: 27,42 Go Utilisés: 516 Mo Libres: 26,92 Go
Carte SD 2nde Partition (9% Libres)
/data/sdext2
Total: 2,34 Go Utilisés: 2,12 Go Libres: 230 Mo
Système (23% Libres)
/system
Total: 1,67 Go Utilisés: 1,28 Go Libres: 407 Mo
Cache (98% Libres)
/cache
Total: 787 Mo Utilisés: 12,58 Mo Libres: 774 Mo
As you can see the 2nd partition is almost full.
Is it possible to remove the SD card, resize the 2nd partition and put it back in the phone without loosing everything?
I am not sure if that can be done with link2sd installed.
Thanks for your help.
Jacques
Hello Jacques,
Your Link2SD seems to be working just fine. Here's how I can tell:
jacques_xda said:
Carte SD (85% Libres)
/storage/emulated/legacy
Total: 4,37 Go Utilisés: 658 Mo Libres: 3,73 Go
Click to expand...
Click to collapse
This is your internal memory, and plenty of it is now empty, probably thanks to Link2SD.
jacques_xda said:
Carte SD 2nde Partition (9% Libres)
/data/sdext2
Total: 2,34 Go Utilisés: 2,12 Go Libres: 230 Mo
Click to expand...
Click to collapse
This is the second partition which you created and which is indeed almost full. Unless you intentionally put other files there (which I assume you didn't, or you'd have known about it ), this partition was filled by Link2SD, with over 2 Gb of data. So Link2SD is working as it should, freeing your internal memory by moving stuff to that second partition.
Now, as for your second question:
jacques_xda said:
Is it possible to remove the SD card, resize the 2nd partition and put it back in the phone without loosing everything?
I am not sure if that can be done with link2sd installed.
Click to expand...
Click to collapse
Yes, but I recommend taking a backup of your SD card first, just to be safe. If your power fails or your card reader is disconnected during re-partitioning, you might lose data.
Assuming you're using Windows, you will need to make sure that MiniTool Partition Wizard is installed first (link can be found here). Also, you will need to have a way to back up the second SD card partition (which I assume contains an ext file system) over to Windows. You can copy over the files using Ext2Fsd, DiskInternals Linux Reader or Ext2explore, or find some program for creating an image of an ext partition in windows.
Then, take these steps:
1. Turn off your phone (and do not turn it on again!)
2. Take your SD card out of your phone and connect it to your computer using a card reader
3. To make a backup, copy everything on both partitions of your SD card to your computer
4. Use Partition Wizard to shrink the first partition on your SD card, and use the resulting unallocated space to expand the second partition (don't forget to press the "Apply" button!)
5. Safe-remove your SD card and put it back in your phone
6. Turn your phone on again
This should enlarge your extra partition without causing any problems with Link2SD. If you really want to be safe, you could use Link2SD to unlink all of your apps before step 1, and re-link them after step 6. Based on the information you provided, you should have just enough internal memory to do so.
Bonne chance!
link2SD resize ext partition
Warre101 said:
Hello Jacques,
Your Link2SD seems to be working just fine. Here's how I can tell:
This is your internal memory, and plenty of it is now empty, probably thanks to Link2SD.
This is the second partition which you created and which is indeed almost full. Unless you intentionally put other files there (which I assume you didn't, or you'd have known about it ), this partition was filled by Link2SD, with over 2 Gb of data. So Link2SD is working as it should, freeing your internal memory by moving stuff to that second partition.
Now, as for your second question:
Yes, but I recommend taking a backup of your SD card first, just to be safe. If your power fails or your card reader is disconnected during re-partitioning, you might lose data.
Assuming you're using Windows, you will need to make sure that MiniTool Partition Wizard is installed first (link can be found here). Also, you will need to have a way to back up the second SD card partition (which I assume contains an ext file system) over to Windows. You can copy over the files using Ext2Fsd, DiskInternals Linux Reader or Ext2explore, or find some program for creating an image of an ext partition in windows.
Then, take these steps:
1. Turn off your phone (and do not turn it on again!)
2. Take your SD card out of your phone and connect it to your computer using a card reader
3. To make a backup, copy everything on both partitions of your SD card to your computer
4. Use Partition Wizard to shrink the first partition on your SD card, and use the resulting unallocated space to expand the second partition (don't forget to press the "Apply" button!)
5. Safe-remove your SD card and put it back in your phone
6. Turn your phone on again
This should enlarge your extra partition without causing any problems with Link2SD. If you really want to be safe, you could use Link2SD to unlink all of your apps before step 1, and re-link them after step 6. Based on the information you provided, you should have just enough internal memory to do so.
Bonne chance!
Click to expand...
Click to collapse
Hi,
Thanks for your response. I have a question: do I need to unmount the SD card before closing the phone and pulling it out?
If the answer is yes, when I put it back and open the phone, will it mount automatically?
Jacques
Hello Jacques,
I think it will re-mount automatically, but don't have any similar experience with my own phone. With my own device, the micro-SD expansion slot is underneath the battery, so I have no choice but to turn off the phone before removing the SD. By consequence, the OS offers no option to unmount the SD card (that I know of at least).
However, once you turn your phone on again, your SD card should be mounted automatically. Have you rebooted (or turned your phone off and then on again) since using Link2SD? If yes, then it's probably fine. I would recommend that you don't unmount your SD card while the phone is running and apps are still linked; your linked apps would probably stop working.
Warre101 said:
Hello Jacques,
I think it will re-mount automatically, but don't have any similar experience with my own phone. With my own device, the micro-SD expansion slot is underneath the battery, so I have no choice but to turn off the phone before removing the SD. By consequence, the OS offers no option to unmount the SD card (that I know of at least).
However, once you turn your phone on again, your SD card should be mounted automatically. Have you rebooted (or turned your phone off and then on again) since using Link2SD? If yes, then it's probably fine. I would recommend that you don't unmount your SD card while the phone is running and apps are still linked; your linked apps would probably stop working.
Click to expand...
Click to collapse
Hi,
I closed the phone and took off the SD card without any problem.
I made an image of the content with ext2explore.
I then use MiniTool Partiton to try to extend the ext4 partition. The problem is there: MiniTool Partition cannot handle the job!
On the SD card, I have one FAT32 Partition and one ext4 linux patition. MiniTool can resize the FAT32 partition, leaving an unallocated space between the FAT32 and the ext4 partition, but it cannot resize the ext4 partition to take advantage of the unallocated space! I can move the ext4 partition closer to the FAT32, leaving the unallocated space at the end; that is all I can do with MiniTool.
Of course I could delete the ext4 partition and create a new one, using all the unallocated space. But then , will I be able to load the ext4 image I created before in that new partition, since it is not the same size? When ext2explore create an image, does it make a clone of the partition (content, size, etc...) there is no explanation or help on that product!
I will try with Gparted to see what it does and try to simply copy the content of the ext4 partition instead of creating an image.
Thank again for helping.
Jacques
Hello Jacques,
That's odd. I did almost exactly the same thing you described here (except for using ext2 rather than ext4) and was able to resize my ext2 partition using Partition Wizard. I first shrunk the FAT32 partition, then moved and resized the ext2 to use all the unallocated space. Have you tried first pressing apply after you shrink the fat32 and move the ext4? In any case, GParted should also work.
I can't help you with ext2explore as I have no direct experience with that program. You might be able to get some help in other parts of this forum.
If you want to try deleting that ext4 partition and creating a new one, you may be able to do this by first unlinking your apps back to your internal memory in Link2SD (as I suggested in an earlier post), re-partitioning and then re-linking with Link2SD.
Warre101 said:
Hello Jacques,
That's odd. I did almost exactly the same thing you described here (except for using ext2 rather than ext4) and was able to resize my ext2 partition using Partition Wizard. I first shrunk the FAT32 partition, then moved and resized the ext2 to use all the unallocated space. Have you tried first pressing apply after you shrink the fat32 and move the ext4? In any case, GParted should also work.
I can't help you with ext2explore as I have no direct experience with that program. You might be able to get some help in other parts of this forum.
If you want to try deleting that ext4 partition and creating a new one, you may be able to do this by first unlinking your apps back to your internal memory in Link2SD (as I suggested in an earlier post), re-partitioning and then re-linking with Link2SD.
Click to expand...
Click to collapse
Hi,
It is realy odd! I created that ext partition with the same tool! Now I can move it, but not resize it....I will try with Gparted with my old computer running Linux (Ubuntu)...later on, expecting it will work fine.
Thanks again,
Jacques
I rooted my moto e 2nd gen 4g phone and made partition on my 16gb sd card using ext4 FAT32. After partioning sd card then i inserted it in my phone to use link2sd but when i try to recreate mount script an error pop up every time showing " mount script cannot be created. No such file or directory" please help me. If any solution you know.
ankit gaur said:
I rooted my moto e 2nd gen 4g phone and made partition on my 16gb sd card using ext4 FAT32. After partioning sd card then i inserted it in my phone to use link2sd but when i try to recreate mount script an error pop up every time showing " mount script cannot be created. No such file or directory" please help me. If any solution you know.
Click to expand...
Click to collapse
Hi,
Try to mount with ext2 instead of ext4. I had the same problem trying to mount with ext2; I then try with ext4 and it worked|
Regards,
Jacques
ankit gaur said:
I rooted my moto e 2nd gen 4g phone and made partition on my 16gb sd card using ext4 FAT32. After partioning sd card then i inserted it in my phone to use link2sd but when i try to recreate mount script an error pop up every time showing " mount script cannot be created. No such file or directory" please help me. If any solution you know.
Click to expand...
Click to collapse
jacques_xda said:
Hi,
Try to mount with ext2 instead of ext4. I had the same problem trying to mount with ext2; I then try with ext4 and it worked|
Regards,
Jacques
Click to expand...
Click to collapse
That looks exactly like the problem I had. I suggest you first try Jacques' idea (changing ext2 into ext4 or vice versa) and if that doesn't work, use the method I put in the very first post. Let us know if you have any problems with that...
Been trying to get link2sd to work for awhile now
My init-link2sd.sh file looks a bit different though. For me, it looks like:
set +e
echo "$(date) mounting..." >$LOG
sleep4
mount-t vfat-o
rw,uid=1000,gid=1000,unmask=133,dmask=0002 /
dev/block/vold/179:34/data/sdext2 1>>$LOG 2>>
$LOG
mount -t vfat-o
rw,uid=1000,gid=1000,unmask=133,dmask=0002 /
dev/block/mmcblk1p2 /data/ sdext2 1>>$LOG 2>>
$LOG
Mount >> $LOG
echo "$(date) mount finished" >> $LOG
chmod 773 /data/dalvik-cache
Whenever I try to use Link2SD, it gies me the "mount: No such file or directory error," would you be able to help me?
A couple of things stand out to me; I'll go through the script you posted step by step:
FinalFreeze said:
set +e
echo "$(date) mounting..." >$LOG
sleep4
Click to expand...
Click to collapse
A space is missing between "sleep" and "4". Was it lost in copy-pasting?
FinalFreeze said:
mount-t vfat-o
rw,uid=1000,gid=1000,unmask=133,dmask=0002 /
dev/block/vold/179:34/data/sdext2 1>>$LOG 2>>
$LOG
Click to expand...
Click to collapse
I expected this to be on a single line like this:
Code:
mount-t [B]vfat[/B]-o rw,uid=1000,gid=1000,unmask=133,dmask=0002 /dev/block/vold/179:34/data/sdext2 1>>$LOG 2>>$LOG
Is it like that in your file?
Anyway, I notice the second argument in the mount command is "vfat". If you use the "recreate mount scripts" in Link2SD, which option do you use for the file system? Does it correspond to the way your SD card is partitioned? I used EXT2.
FinalFreeze said:
mount -t vfat-o
rw,uid=1000,gid=1000,unmask=133,dmask=0002 /
dev/block/mmcblk1p2 /data/ sdext2 1>>$LOG 2>>
$LOG
Click to expand...
Click to collapse
This is the information you would need to follow the tutorial that I posted. You could try putting the following in an init.d script:
Code:
#!/system/bin/sh
sleep 4
mount -t [B]ext2[/B] -o rw,uid=1000,gid=1000,unmask=133,dmask=0002 /dev/block/mmcblk1p2 /data/sdext2
Note that I'm assuming here that your SD card uses an EXT2 partition, as shown in bold.
FinalFreeze said:
Mount >> $LOG
echo "$(date) mount finished" >> $LOG
chmod 773 /data/dalvik-cache
Click to expand...
Click to collapse
The last line (starting with chmod) is something I haven't seen before. If you create your own init.d script, you may need to add the same line.
Warre101 said:
I rooted my Galaxy S3 Mini (GT-i8190) (following seedrom193's tutorial), but I'm still on the stock Android ROM.
I was trying to use Link2SD with a correctly partitioned SD card (10GB primary FAT32 + 4GB primary ext2), but got the following error, which showed every time I tried to recreate mount scripts:
"Mount script cannot be created. mount: No such file or directory"
Also, on every reboot, I would get a "Mount warning" from Link2SD, requiring me to "quick reboot" my phone. After that (second) reboot, Link2SD would work correctly, but shortcuts on my home screen to linked apps were missing.
After much googling I figured that maybe the problem was caused by my (stock) ROM not having init.d support. So I used this method to add init.d:
http://forum.xda-developers.com/showthread.php?t=1933849
Init.d worked properly, but I still got the same error in Link2SD. Then, I used Root Explorer to look at my file system (any other root browser would work too I guess) and found the cause. Here's the contents of /data/data/com.buak.Link2SD/files/init-link2sd.sh, which I *guess* is a copy of the script Link2SD is trying to get to run at boot:
Code:
set +e
echo "$(date) mounting..." > $LOG
sleep 4
mount -t ext2 -o rw [COLOR="Red"][B]/dev/block/vold/179:98[/B][/COLOR] /data/sdext2 1>>$LOG 2>>$LOG
mount -t ext2 -o rw /dev/block/mmcblk1p2 /data/sdext2 1>>$LOG 2>>$LOG
mount >> $LOG
echo "$(date) mount finished" >> $LOG
Apparently, the device node /dev/block/vold/179:98 does not exist, because Android's vold mounting system doesn't automatically mount the second partition of the SD card. This causes the "mount: No such file or directory" error on the first mount command. However, the second mount command (from /dev/block/mmcblk1p2) should work. For some reason, this error seems to keep Link2SD from installing the boot script.
So, I decided to create an init.d script of my own. Using Root Explorer, I created and edited a file named "11link2sd" in /system/etc/init.d/ and inserted the following text:
Code:
#!/system/bin/sh
sleep 4
mount -t ext2 -o rw /dev/block/mmcblk1p2 /data/sdext2
This solved the problem for me, and I can now use Link2SD without needing the extra quick reboot. I figured I'd share my solution in case anybody else had the same problem. I do suggest that anybody who tries to do the same thing first check the init-link2sd.sh file for that /dev/block/mmcblk1p2 bit, to make sure it''s the same.
Click to expand...
Click to collapse
Mount script error
Mount Script cannot be created
Moun Invalid arguement
I've been at this every day for a week i inserted the txt file with ur script rebooted and nothing same old bs script error. PLEASE tell me som1 knows A REAL WORKING FIX.
I've tried fat32/ext2 fat32/ext4 fat32/fat32 The mount DOES NOT EXIST. i have int.d support How do I create the mount? Not just a file directory?
Hi, I have tried the script, but at restart seems not to run because no mount is done, so no partition.
I use CM13. Any ideas? Thank you.
mikeroku said:
Hi, I have tried the script, but at restart seems not to run because no mount is done, so no partition.
I use CM13. Any ideas? Thank you.
Click to expand...
Click to collapse
That's difficult to tell based on the information you provided. Can you look for this file:
Code:
/data/data/com.buak.Link2SD/files/init-link2sd.sh
and post the contents please?
Hey...my problem is mounting the second partition...I've been literally trying since yesterday....no luck using the mini tool to format any of the ext's and lost a lot of time trying different fixes....typing in "cannot mount 2nd partition" on google leaves me with so many results that don't have actual fixes...any help?
Stabbey said:
Mount script error
Mount Script cannot be created
Moun Invalid arguement
Click to expand...
Click to collapse
psantos1091 said:
Hey...my problem is mounting the second partition...I've been literally trying since yesterday....no luck using the mini tool to format any of the ext's and lost a lot of time trying different fixes....typing in "cannot mount 2nd partition" on google leaves me with so many results that don't have actual fixes...any help?
Click to expand...
Click to collapse
Hey guys,
Some time ago my phone started having the exact same problem that Stabbey describes: mounting the second partition no longer works, manually mounting the second partition results in the "Invalid argument" error when running this command in a terminal emulator:
Code:
mount -t ext2 -o rw /dev/block/mmcblk1p2 /data/sdext2
This started happening after I installed an update for busybox and some other apps and then rebooted. Something might have changed in the mount applet of busybox with that update, and that might have broken the mount command. Right now I don't know for sure if this is the case; I haven't figured out how to roll back the busybox update yet. In any case, if I can't manually mount, it certainly won't work on startup with init.d, so I'm stuck for now.
I'm sorry I can't give any of you a solution right now. If anyone else wants to take a crack at it, my problems started after installing busybox 1.25.1, so a version *before* that might work.
大神你好:
这是个非常厉害的好办法!您帮我解决了这个疑难杂症!让我手机重新获得新生,而且问题分析得非常准确。
致敬!
机油
Hi Warre101
thank you so much for your solution!
However, I still have a small issue:
When I created a file in the init.d folder, I ended with a .txt file while the others in that folder have no extension. I wrote the code you mentioned. Then with Universal init.d app, I executed the file, and it worked -> the partition get mounted. But, when I reboot my phone, it is not done automatically: I have the error message on Link2sd, then I have to come back to Universal init.d, execute the script, and come back to Link2sd to see it is mounted. Do you have an idea to have it done automatically?
the init-link2sd.sh file is like this (when the partition in mounted) :
Code:
set +e
echo "$(date)mounting..." > $LOG
sleep 2
mount -t ext4 -o rw /dev/block/vold/public:179_130 /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
chmod 773 /data/dalvik-cache
The partition I created using minitool is in ext4
The 11link2sd.txt file is:
Code:
#!/system/bin/sh
sleep 2
mount -t ext4 -o rw /dev/block/mmcblk1p2 /data/sdext2
Then in /data I got a new file link2sd-boot-receiver-mount.log:
Code:
Tue Oct 24 09:47:50 CEST 2017 mounting...
mount: No such file or directory
rootfs / rootfs ro,seclabel 0 0
tmpfs /dev tmpfs rw,seclabel,nosuid,relatime,mode=755 0 0
devpts /dev/pts devpts rw,seclabel,relatime,mode=600 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,seclabel,relatime 0 0
selinuxfs /sys/fs/selinux selinuxfs rw,relatime 0 0
debugfs /sys/kernel/debug debugfs rw,seclabel,relatime 0 0
none /acct cgroup rw,relatime,cpuacct 0 0
none /sys/fs/cgroup tmpfs rw,seclabel,relatime,mode=750,gid=1000 0 0
tmpfs /mnt tmpfs rw,seclabel,relatime,mode=755,gid=1000 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
pstore /sys/fs/pstore pstore rw,seclabel,relatime 0 0
/dev/block/platform/mtk-msdc.0/11120000.msdc0/by-name/system /system ext4 ro,seclabel,relatime,data=ordered 0 0
/dev/block/platform/mtk-msdc.0/11120000.msdc0/by-name/userdata /data ext4 rw,seclabel,nosuid,nodev,noatime,discard,noauto_da_alloc,resuid=10010,data=ordered 0 0
/dev/block/platform/mtk-msdc.0/11120000.msdc0/by-name/cache /cache ext4 rw,seclabel,nosuid,nodev,noatime,discard,noauto_da_alloc,data=ordered 0 0
/dev/block/platform/mtk-msdc.0/11120000.msdc0/by-name/protect1 /protect_f ext4 rw,seclabel,nosuid,nodev,noatime,nodelalloc,noauto_da_alloc,commit=1,data=ordered 0 0
/dev/block/platform/mtk-msdc.0/11120000.msdc0/by-name/protect2 /protect_s ext4 rw,seclabel,nosuid,nodev,noatime,nodelalloc,noauto_da_alloc,commit=1,data=ordered 0 0
/dev/block/platform/mtk-msdc.0/11120000.msdc0/by-name/nvdata /nvdata ext4 rw,seclabel,nosuid,nodev,noatime,discard,noauto_da_alloc,data=ordered 0 0
adb /dev/usb-ffs/adb functionfs rw,relatime 0 0
tmpfs /storage tmpfs rw,seclabel,relatime,mode=755,gid=1000 0 0
/dev/block/loop1 /su ext4 rw,seclabel,noatime,data=ordered 0 0
/dev/fuse /mnt/runtime/default/emulated fuse rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/fuse /storage/emulated fuse rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/fuse /mnt/runtime/read/emulated fuse rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/fuse /mnt/runtime/write/emulated fuse rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/block/vold/public:179,129 /mnt/media_rw/319C-76D0 vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1023,gid=1023,fmask=0007,dmask=0007,allow_utime=0020,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/fuse /mnt/runtime/default/319C-76D0 fuse rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/fuse /storage/319C-76D0 fuse rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/fuse /mnt/runtime/read/319C-76D0 fuse rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/fuse /mnt/runtime/write/319C-76D0 fuse rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/block/mmcblk1p2 /data/sdext2 ext4 rw,seclabel,relatime,data=ordered 0 0
Tue Oct 24 09:47:50 CEST 2017 mount finished
I used MiXplorer that I found on thi forum as a file explorer and to create the script file.
I am on Android 6.0, stock ROM but not original (eg when I bought the phone the stock ROM was on Android 5, then I discovered they changed to Android 6 so I downloaded the new stock ROM from the official website and flashed it).
Thank you for your help !

Categories

Resources