Broken SD card reader help - HTC Sensation

My HTC Sensation has a broken SD card reader, and I have been reading about mounting an .img file stored on /data to /sdcard/storage but I've tried with no success. What options are there for having something at /sdcard so I can use apps like the camera? It can't be that hard, right?
If you knew something about android partitions, I would love to hear your advice!
Thanks

ketchup539 said:
My HTC Sensation has a broken SD card reader, and I have been reading about mounting an .img file stored on /data to /sdcard/storage but I've tried with no success. What options are there for having something at /sdcard so I can use apps like the camera? It can't be that hard, right?
If you knew something about android partitions, I would love to hear your advice!
Thanks
Click to expand...
Click to collapse
We can use /data partition space for the sdcard.. But we need to setup.. A loop back device..
I'll try to do it on my phone first.. And when I got it working ill give you the steps to do it.. Stay tuned
Sent from my HTC Sensation 4G using xda premium

ganeshp said:
We can use /data partition space for the sdcard.. But we need to setup.. A loop back device..
I'll try to do it on my phone first.. And when I got it working ill give you the steps to do it.. Stay tuned
Sent from my HTC Sensation 4G using xda premium
Click to expand...
Click to collapse
That would be so amazing of you - thanks.
This is what I've done so far without success on CM10:
Code:
mkdir /sdcard/storage
su
dd if=/dev/zero of=/data/storage.img bs=1024 count=5242880 (1024x1024x5 --> 5Gb)
busybox mkfs.vfat /data.storage.img
losetup -d /dev/block/loop0 (this command prevents the "resource busy" error)
mount -o loop -t vfat /data/storage.img /sdcard/storage
This doesn't work because you need an SD card to link a partition to it. If you try it, make sure you remove your sd card.

ohh you are there almost
couple of pointers here
1. dont delete the existing loop devices (-d is to delete)
2. you need to link the loop device to the file you have created
losetup /dev/block/loopx /data/storage.img (x being the available loop number)
busybox mkfs.vfat /dev/block/loopx
3. reduce the size a bit for the storage.img to around 500MB
4. mount the created loop device to the sdcrad mnt point (/mnt/storage.img)
mount /dev/block/loop0 /mnt/sdcard
5. also if loop0 is busy you can try the other loop devices
like loop1,loop2 etc etc
to check the binding type losetup /dev/block/loopx (x being the loop number)
it should give you details of it

Awesome, I'll try this soon. I'm really glad you've come to my help! What is a phone without external storage
Sent from my HTC Sensation using xda app-developers app

Okay, I get this error when I try to mount the image to /mnt/sdcard.
255|[email protected]:/ # mount -o loop4 -t vfat /data/storage.img /mnt/sdcard
mount: Block device required
Sent from my HTC Sensation using xda app-developers app

ketchup539 said:
Okay, I get this error when I try to mount the image to /mnt/sdcard.
255|[email protected]:/ # mount -o loop4 -t vfat /data/storage.img /mnt/sdcard
mount: Block device required
Sent from my HTC Sensation using xda app-developers app
Click to expand...
Click to collapse
You should use -o loop only not -o loop4
Check my previous post again.. I've re edited it
Sent from my HTC Sensation 4G using xda premium

I'm still getting various errors.
[email protected]:/ # losetup /dev/block/loop4 /data/storage.img
[email protected]:/ # mount -o loop -t vfat /dev/block/loop4 /mnt/sdcard
ioctl LOOP_SET_FD failed: Device or resource busy
I don't think I quite understand what a loop is, and I don't know what I'm doing wrong. Could you give me some clear steps so I can start from scratch? Thanks
Sent from my HTC Sensation using xda app-developers app

ketchup539 said:
I'm still getting various errors.
[email protected]:/ # losetup /dev/block/loop4 /data/storage.img
[email protected]:/ # mount -o loop -t vfat /dev/block/loop4 /mnt/sdcard
ioctl LOOP_SET_FD failed: Device or resource busy
I don't think I quite understand what a loop is, and I don't know what I'm doing wrong. Could you give me some clear steps so I can start from scratch? Thanks
Sent from my HTC Sensation using xda app-developers app
Click to expand...
Click to collapse
You did everything correct except the last step
These are the steps
1. Do dd command as you mentioned initially
2. Give the image a Filesystem... The second command you did initially
3.setup a loop device to it...
losetup /dev/block/loopx /data/storage.img
4.then do a simple mount (this is where you did a mistake earlier)
mount /dev/block/loopx /mnt/sdcard
That's all
Note: you should not mention loop and file system type in the mount command again.. That's what causing the issue
Sent from my HTC Sensation 4G using xda premium

For some strange reason, I can't do a simple mount.
[email protected]:/ # mount /dev/block/loop4 /mnt/sdcard
Usage: mount [-r] [-w] [-o options] [-t type] device directory
Sent from my HTC Sensation using xda app-developers app

ketchup539 said:
For some strange reason, I can't do a simple mount.
[email protected]:/ # mount /dev/block/loop4 /mnt/sdcard
Usage: mount [-r] [-w] [-o options] [-t type] device directory
Sent from my HTC Sensation using xda app-developers app
Click to expand...
Click to collapse
Mention the type. And options too
-t vfat -o rw
Sent from my HTC Sensation 4G using xda premium

Okay, so technically it should be mounted at /mnt/sdcard, but the system still can't access it. When I navigate to it with a file explorer it says 'an unknown error has occurred' and no other apps can see it either.
Sent from my HTC Sensation using xda app-developers app

Or else we ditch the complete loop device concept
Do this
1. Using dd make the storage.img
2. Give the files system
3 . Then mount
mount -t vfat -o rw, loop /data/storage.img /mnt/sdcard
Sent from my HTC Sensation 4G using xda premium
---------- Post added at 11:57 AM ---------- Previous post was at 11:09 AM ----------
ketchup539 said:
Okay, so technically it should be mounted at /mnt/sdcard, but the system still can't access it. When I navigate to it with a file explorer it says 'an unknown error has occurred' and no other apps can see it either.
Sent from my HTC Sensation using xda app-developers app
Click to expand...
Click to collapse
Ohh the mount point is the same?
Damn im on sense rom.. I'm not sure how the mount points are defined in cm10
We can find the mount point easily though
Do this
do ll /sdcard
It will give you to what mount point it got linked to
Sent from my HTC Sensation 4G using xda premium

Okay, I suppose you meant 'du’ instead of 'do', because the shell doesnt recognise 'do'. Here is the result:
1|[email protected]:/ # du /sdcard
0 /sdcard
I am very very grateful of your help. If you accept donations I would be more than inclined to give you something for your time.
Sent from my HTC Sensation using xda app-developers app

ketchup539 said:
Okay, I suppose you meant 'du’ instead of 'do', because the shell doesnt recognise 'do'. Here is the result:
1|[email protected]:/ # du /sdcard
0 /sdcard
I am very very grateful of your help. If you accept donations I would be more than inclined to give you something for your time.
Sent from my HTC Sensation using xda app-developers app
Click to expand...
Click to collapse
the command is not do lol
the command is
ll /sdcard
it will give me the mount path
first we'll get this setup and running ..then we'll think of donations

Haha okay.
[email protected]:/ # ll /sdcard
lrwxrwxrwx root root 2012-09-24 17:54 sdcard -> /storage/sdcard0
Sent from my HTC Sensation using xda app-developers app

ketchup539 said:
Haha okay.
[email protected]:/ # ll /sdcard
lrwxrwxrwx root root 2012-09-24 17:54 sdcard -> /storage/sdcard0
Sent from my HTC Sensation using xda app-developers app
Click to expand...
Click to collapse
see the mount point is different
so the final mount command
is
mount -o remount,rw -t vfat /dev/block/loop4 /storage/sdcard0
if the above not working try simpel mount
mount /dev/block/loop4 /storage/sdcard0
if its still not working then we will try another approach ..let me know
EDIT: check your PM
---------- Post added at 01:08 PM ---------- Previous post was at 12:38 PM ----------
Any Update ?

Another thing to add maybe......
Hi guys,
So before I found your attempts, about 3 weeks ago i attempted much the same, however didnt do the whole dd route.
I just did:
mkdir /data/sdcard and then a
mount -o bind /data/sdcard /sdcard
the only issue with that , that i could pick up was
1. filesystem was not vfat (as data is ext)
2. You have more flexible space to play around with, however that too could interfere with /data requirements
3. Even editing the /etc/fstab didnt allow for persistance between reboots. (just a remount required)
Now for questions:
So i have now gone the dd route, mount works , blah blah... BUT - loop dev gets lost after a reboot. anyway of keeping this setting somehow?
That aside - Bonus Material !!
(havent tested this between reboots yet - but
ln -s /dev/block/loop0 /dev/block/mmcblk1p1
and the phone is overjoyed at seeing the SD card where it expects to find it.
k, well my 2c worth, And thanks for the great insight.
J

So you actually got this working? That's amazing! I'd love to help you keep this between reboots, I have some decent ideas on what to do. Let me just get up and try that last command of yours.
Sent from my HTC Sensation using xda app-developers app

Jim.Morrisby said:
Hi guys,
So before I found your attempts, about 3 weeks ago i attempted much the same, however didnt do the whole dd route.
I just did:
mkdir /data/sdcard and then a
mount -o bind /data/sdcard /sdcard
the only issue with that , that i could pick up was
1. filesystem was not vfat (as data is ext)
2. You have more flexible space to play around with, however that too could interfere with /data requirements
3. Even editing the /etc/fstab didnt allow for persistance between reboots. (just a remount required)
Now for questions:
So i have now gone the dd route, mount works , blah blah... BUT - loop dev gets lost after a reboot. anyway of keeping this setting somehow?
That aside - Bonus Material !!
(havent tested this between reboots yet - but
ln -s /dev/block/loop0 /dev/block/mmcblk1p1
and the phone is overjoyed at seeing the SD card where it expects to find it.
k, well my 2c worth, And thanks for the great insight.
J
Click to expand...
Click to collapse
Okay, as for remounting at boot, add a basic script with the commands to remount the card in /etc/init.d, and call it something like 91sdcard. It should look something like this:
Code:
#!/system/bin/sh
commands and whatever
So first off I tried your basic mounting method, and it actually somewhat worked! I could open the camera app, and it thought I had an sd card, but it still couldn't save photos. I guess this is because of the fie system? I could also create files in it through a file explorer. This is the most success I have got since I started to try make a virtual sd card.
I tried to use ln -s /dev/block/loop0 /dev/block/mmcblk1p1 along with my image file and loop devices, but I couldn't get it working for the life of me. Could you elaborate on how you made it work? Thanks

Related

using the internal memory as a virtual sdcard

I managed to break my micro sd card in half today and I wasn't able to pickup a class 10 or 6 replacement locally so I thought I could use some of the 6gb of internal memory as a virtual filesystem to get me out of trouble.
So, after quickly looking at the android docs and the supported busybox commands I created a 2gb sdcard.img in /data and mounted to /sdcard. I copied some files to it with astro filemanager and fired up raging thunder 2 and it went ahead and downloaded the game data to /sdcard/ and worked correctly.
But, a few apps won't recognise it as an sdcard (Motorola SD card and phone storage settings applet) as well as things like PlayPro (states I have no sdcard present). I thought perhaps I could modify the /etc/vold.fstab file to auto mount the sdcard.img I created using vi but I'm a bit clueless as to what I should change on the dev_mount /sdcard line to get it automounted at boot and hopefully fool the rest of the apps into thinking it is a physical sdcard.
Can anyone possibly point me in the right direction? Not sure how to invoke cmd mode in vi using the milestone qwerty either but I'll keep digging.
What I did (roughly), maybe I'm going about it wrong but any advice would be appreciated.
1. rooted device
2. installed the free terminal app from the market
3. fired up the terminal shell
4. su
5. dd if/dev/zero of=/data/sdcard.img bs=1024 count=1 seek=2000000
6. busybox mkfs.vfat /data/sdcard.img (didn't seem to support -F 32)
7. busybox mount -o loop /data/sdcard.img /sdcard/
+ 1 for this, it would be great to can use internal storage for user data
Why do you let this nice post die.. so "flibbulator" found anything more out?.. I'd like to know more.. like if you got it to work with Music Players and Video players??
Try to mount /data/sdcard.img to /mnt/sdcard (/sdcard is a link to /mnt/sdcard)
or try "export EXTERNAL_STORAGE /sdcard"
I made in a different way: created a 4GB storage.img in /data and mounted it in /sdcard/storage, so internal storage is finally usable for user data
the problem was to set mount point on boot, I can't find a way to execute a script on boot (you can't permanently modify init.rc)
flibbulator said:
What I did (roughly), maybe I'm going about it wrong but any advice would be appreciated.
1. rooted device
2. installed the free terminal app from the market
3. fired up the terminal shell
4. su
5. dd if/dev/zero of=/data/sdcard.img bs=1024 count=1 seek=2000000
6. busybox mkfs.vfat /data/sdcard.img (didn't seem to support -F 32)
7. busybox mount -o loop /data/sdcard.img /sdcard/
Click to expand...
Click to collapse
I have actually tried this on my Droid2Global, and I get the error "unknown operand if/dev/zero" I feel like I am missing the point or do not fully understanding how to use the "dd" command?
the correct syntax is:
dd if=/dev/zero of=/data/sdcard.img bs=1024 count=4194340
4194340 --> 4GB
patton82 said:
the correct syntax is:
dd if=/dev/zero of=/data/sdcard.img bs=1024 count=4194340
4194340 --> 4GB
Click to expand...
Click to collapse
Thank you bro.
Quick question I keep getting these errors. I do have a folder in "/" named "sdcard-int"
Better Terminal Emulator Pro
/ # busybox mount -o loop /data/sdcard.img /sdcard-int/
mount: can't setup loop device: No such file or directory
/ # busybox mount -o /data/sdcard.img /sdcard-int
mount: can't read /etc/fstab: No such file or directory
/ #
Sent from my DROID2 GLOBAL using Tapatalk
you can't place anything in root folder, /sdcard is a link to /mnt/sdcard and is created by init.rc (you can't edit init.rc, it's provided by boot.img, so need to extract from boot.img and repack)
I made in this way but I have to manually execute a script or a command from terminal after every boot to mount storage.img
mkdir /sdcard/storage
su
dd if=/dev/zero of=/data/storage.img bs=1024 count=4194340
busybox mkfs.vfat /data.storage.img
mount -o loop -t vfat /data/storage.img /sdcard/storage
Will be lost anything after reboot when use this storage?
Sent from my MotoA953 using XDA App
all the stuff in img file will not be lost, as long as you put it in /data/
on the contrary the mount point must be restored after reboot
patton82 said:
you can't place anything in root folder, /sdcard is a link to /mnt/sdcard and is created by init.rc (you can't edit init.rc, it's provided by boot.img, so need to extract from boot.img and repack)
I made in this way but I have to manually execute a script or a command from terminal after every boot to mount storage.img
mkdir /sdcard/storage
su
dd if=/dev/zero of=/data/storage.img bs=1024 count=4194340
busybox mkfs.vfat /data.storage.img
mount -o loop -t vfat /data/storage.img /sdcard/storage
Click to expand...
Click to collapse
Thank you, I will use the Thank you button when I login via PC.
I still get the same error, I know that I'm doing something incorrectly or maybe I don't understand "mount" comment correctly?
/ $ su
/ # mkdir /sdcard/storage
/ # dd if=/dev/zero of=/data/storage.img bs=1024 count=41943404194340+0 recordsn
4194340+0 records out
4295004160 bytes (4.0GB) copied, 339.823883 seconds, 12.1MB/s
/ # busybox mkfs.vfat /data/storage.img
/ # mount -o loop -t vfat /data/storage.img /sdcard/storage
mount: can't setup loop device: No such file or directory
/ #
I am using my sdcard also, I'm not too sure if that makes any difference?
Sent from my DROID2 GLOBAL using Tapatalk
Better terminal pro uses BASH shell, I presume
try to switch to android shell, in preferences
or to use terminal emulator (free) from market
Okay, I tried Android Terminal Emulator, and this is a new error.
export PATH=/data/local/bin:$PATH
$ $ su
# mount -o loop -t vfat /data/storage.img /sdcard/storage
ioctl LOOP_SET_FD failed: Device or resource busy
#
Not too sure where to go now. I thank you again for all your help, and time.
Sent from my DROID2 GLOBAL using Tapatalk
resource busy, you have to reboot the phone
I use Gscript lite, add a script with the string
mount -o loop -t vfat /data/storage.img /sdcard/storage
and create a shortcut to homescreen, so when I reboot, I can mount the img file in one click
Cool mod for my ROM. Could I take it??
sure, they are simple shell commands
the best would be to do what happen with Samsung Galaxy S: internal storage mounted as sdcard and physical sdcard mounted in a folder /sdcard/sd
storage.img is 3-4 times faster than my peak 8GB class 6
There is an application "Autostart" in the market, which can automatially execute a script with root after boot up.
I up because I'm now also interested in making profit of the huge internal storage. I'd like to put my wikipedia data from wikidroyd to the internal storage. Hopefully I'm skilled enough to follow the given steps...I doubt that though
fKngFtd said:
Okay, I tried Android Terminal Emulator, and this is a new error.
export PATH=/data/local/bin:$PATH
$ $ su
# mount -o loop -t vfat /data/storage.img /sdcard/storage
ioctl LOOP_SET_FD failed: Device or resource busy
#
Not too sure where to go now. I thank you again for all your help, and time.
Click to expand...
Click to collapse
Guys, I need your help! I have exactly. The same problem:
Every time I try to mount my storage.img I get
Ioctl LOOP_SET_FD failed: Device or resource busy.
I rebooted several times and also tried to mount smaller images (first I tried 3gb then I tried 1mb).
Any solution?
Edit: I solved it myself. I always forgot to punch in busybox before the command. Now it worked for me!!
I do have a question now. With help of Gscript I made a shortcut to mount the storage.img to my sdcard. But my pc wont recognise the sdcard as long as the image is mounted. What is the command to unmount the partition so I wouldnt have to reboot my phone before connecting it to the pc...?
Any help is much appreciated! Thx
(Something like busybox unmount -o loop -t vfat...?)
Sent from my MotoA953 using XDA App

[Need help!]Run Ubuntu on SG3

Hey guys,as somebody had already run ubuntu on g1 and n1 etc. I wonder if we can run it on SG3 or not.
I got nexus one's ubuntu.img and the scripts to boot it.But now I got some trouble.
The way to boot it is to mount the image file into a block device.Such as:
su
mount -o rw,remount /dev/block/stl6 /system
mount -o rw,remount /dev/block/stl7 /data
mknod /dev/block/ubu b 7 0
losetup /dev/block/ubu /sdcard/ubuntu/ubuntu.img
But when I mount ubu to a folder like:"/data/local/ubuntu" as ext2 filesystem it shows no such device.
I thought the kernel didn't support the ext2 fs.I even tried ext4 and rfs.rfs fs shows busy.
Anyone can help me?
I'm in kyrillos' 3.3.
Sent from my GT-I5800 using XDA Premium App
ask this Question in the Q & A thread CLOSED

[Q][Kernel]Clemsyn-Blades-3.2 OC v4 on Prime 1.7

From the dev's forum :
- To use Clemsyn-Blades 3.2 OC (v2-4) with PRIME 1.7-final, do following:
Install PRIME 1.7-final
Delete /system/lib/modules/voodoo-sound.ko (eg rename voodoo-sound.bak)
Install Clemsyn-Blades OC kernel
Everything should be fine, voodoo-sound enabled in kernel
Click to expand...
Click to collapse
Forgive my noobness but how do you mount /system in read/write mode instead of read only ?
I tried mount -o rw,remount -t ext4 /dev/block/mmcblk0p1 /system while in root in an adb shell but it screwed the tablet, shut it down and turned it in bootloop...
Can someone script the correct method please ?
Thx
mathmath5151 said:
From the dev's forum :
Forgive my noobness but how do you mount /system in read/write mode instead of read only ?
I tried mount -o rw,remount -t ext4 /dev/block/mmcblk0p1 /system while in root in an adb shell but it screwed the tablet, shut it down and turned it in bootloop...
Can someone script the correct method please ?
Thx
Click to expand...
Click to collapse
This is what I use (because I don't want to try to get all the -o options right, only the ones I know for certain):
$su
# mount -o rw,remount /system
// and after changes
# sync
# mount -o ro,remount /system
# exit
$ exit
...
Hopefully that'll work OK for you. I'm talking about doing this from within terminal emulator, although I'm sure it's the same from adb shell. I just tried it again to be sure.
The idea is that since it's just a change in how it's mounted, it knows everything about how it's mounted already, so just tell it to change the ro/rw flag and to remount. You can see a lot of flags if you just type in # mount | grep system, but entering them correctly and in sequence might be another story.
Good luck -
Disregard
Sent from my Transformer TF101 using Tapatalk
It worked, thanks
Well, method for noobs : use root explorer application
Sent from my Transformer TF101

Journal Disabler For Pico! :D

----------------------- Journaling Disabler For Pico ----------------------
This is just a simple Zip to Disable Journaling on pico! as we use 2 or 3 extra ext4 partitions for OC!
It even clear's /sd-data,/sd-cache - for aosp
and /sd-ext,/sd-data,/sd-cache - for sense 4
Which means you need not always format your sd-card to switch between roms! .. But if you are switching from aosp rom to sense 4 you need to partition the sd-card appropriately!
Steps to USE:
******* Use this Zip Only when installing a Rom from scratch!... cause it wipes everything! ******
-- clear almost everything you can from recovery e.g factory-reset,/system,/boot,/cache etc
-- install this Zip! as like you do with any other zip (Prefered Recovery TWRP 2.4.X)
-- Flash Your Favourite Rom Now!!
I can use this even if i am not oc'ing?? Just like superwipe?
Disabling journal wont harm anything! Right?
Parth_14 said:
I can use this even if i am not oc'ing?? Just like superwipe?
Disabling journal wont harm anything! Right?
Click to expand...
Click to collapse
From the wikipedia's article:
A journaling file system is a file system that keeps track of the changes that will be made in a journal (usually a circular log in a dedicated area of the file system) before committing them to the main file system. In the event of a system crash or power failure, such file systems are quicker to bring back online and less likely to become corrupted.[1]
Click to expand...
Click to collapse
For overclocking, the SD Card is used for the /data and /cache partition. In that case, the SD Card would be read more frequently as the /data and /cache partitions are the most frequently accessed and modified partitions while running the Android system. In that case, using a Journal would slow down the memory access times if the SD Card is not fast enough. Also, as many modifications are made to the /data and /cache partition, the SD Card would be going through the read/write cycle twice the number of times, once for the journaling and once for the "commiting them to the main file system". So, it is likely that the SD Card might get corrupted faster than it normally should. That is the reason why Class 4 and below SD Cards are likely to "go dead" soon when overclocking with cute_prince's new PLL2 overclocking method. And, this is why ateeq72 has made this flashable zip to disable journaling. It would reduce the possibility/risk of losing your SD Card and at the same time allow you to OC your phone.
Using this when you are not OC'ing your phone? I wouldn't recommend that you flash this zip, but you would need a slightly modified zip. Also, journaling, I presume you want to disable in your phone's sd-ext memory. It would increase your phone's performance in case you are using any memory increasing scripts like int2ext which mount the sd-ext partition in the /data folder.
vineethraj49 said:
Using this when you are not OC'ing your phone? I wouldn't recommend that you flash this zip, but you would need a slightly modified zip. Also, journaling, I presume you want to disable in your phone's sd-ext memory. It would increase your phone's performance in case you are using any memory increasing scripts like int2ext which mount the sd-ext partition in the /data folder.
Click to expand...
Click to collapse
Thanks man!
Can you tell what is to be modified in the zip so that i can use it when i am not oc'ing?
Parth_14 said:
Thanks man!
Can you tell what is to be modified in the zip so that i can use it when i am not oc'ing?
Click to expand...
Click to collapse
No need to mod dude, u can use it if u dont OC.
Helped? Thanks maybe!
Parth_14 said:
Thanks man!
Can you tell what is to be modified in the zip so that i can use it when i am not oc'ing?
Click to expand...
Click to collapse
Edit the file named "ateeqscript" using Notepad++.
Make sure the file looks like the one below.
Code:
#!/bin/sh
echo ***************Begin Disable Journaling Partition***************
/sbin/busybox mount -t auto /dev/block/mmcblk0p2 /sd-ext
rm -rf /sd-ext/*
/sbin/busybox umount -l /sd-ext
/tmp/tune2fs -O ^has_journal -c 1 -i 1d -m 0 /dev/block/mmcblk0p2
fsck.ext4 -Dfy /dev/block/mmcblk0p2
sync
echo ***************Data Partion Done***************
echo ***************Finished No Journaling Partions***************
What I have done? Simple. Removed all code related to /sd-data and sd-cache, and kept only commands necessary for the sd-ext partition.
---------------------------------------------------
@OP, I suggest a few changes in your script. First, the mounting commands are run, so, if the sd-ext is already mounted by the recovery (just in case, accidentally it happened), then, you wouldn't (or rather shouldn't) be able to mount it in another folder, namely /sd-data. I would suggest the following change in your flashable zip. Try to make it look something like the one below.
Code:
#!/bin/sh
echo "\"Disabling Journaling\" Script"
echo "Initializing script..."
/sbin/busybox umount -l /sd-ext
/sbin/busybox mkdir /sd-data
/sbin/busybox mount /dev/block/mmcblk0p2 /sd-data
/sbin/busybox mkdir /sd-cache
/sbin/busybox mount /dev/block/mmcblk0p3 /sd-cache
/sbin/busybox mkdir /sd-ext2
/sbin/busybox mount /dev/block/mmcblk0p4 /sd-ext
rm -rf /sd-cache/*
rm -rf /sd-data/*
rm -rf /sd-ext/*
/sbin/busybox umount -l /sd-data
/sbin/busybox umount -l /sd-cache
/sbin/busybox umount -l /sd-ext
echo "Disabling Journal in sd-data"
/tmp/tune2fs -O ^has_journal -c 1 -i 1d -m 0 /dev/block/mmcblk0p2
fsck.ext4 -Dfy /dev/block/mmcblk0p2
echo "Disabling Journal in sd-cache"
/tmp/tune2fs -O ^has_journal -c 1 -i 1d -m 0 /dev/block/mmcblk0p3
fsck.ext4 -Dfy /dev/block/mmcblk0p3
echo "Disabling Journal in sd-ext"
/tmp/tune2fs -O ^has_journal -c 1 -i 1d -m 0 /dev/block/mmcblk0p4
fsck.ext4 -Dfy /dev/block/mmcblk0p4
sync
echo "Partitions Journaling Disabled..."
echo "Finished no journaling partitions"
Do we need to flash this zip for every new rom or just once is enough?
Sent from my HTC Explorer A310e using xda app-developers app
faiPICO said:
Do we need to flash this zip for every new rom or just once is enough?
Sent from my HTC Explorer A310e using xda app-developers app
Click to expand...
Click to collapse
i guess one time is enough no need to flash again and again
@ateeq72
Can you edit this script with just the wiping part? As it is not necessary to disable journal for aosp roms!
Parth_14 said:
@ateeq72
Can you edit this script with just the wiping part? As it is not necessary to disable journal for aosp roms!
Click to expand...
Click to collapse
Its already there I guess
vineethraj49 said:
Its already there I guess
Click to expand...
Click to collapse
I've read that it formats through ext2/4 ! What i want is the parition to be remain untouched..
Parth_14 said:
@ateeq72
Can you edit this script with just the wiping part? As it is not necessary to disable journal for aosp roms!
Click to expand...
Click to collapse
vineethraj49 said:
Its already there I guess
Click to expand...
Click to collapse
journal disabling is required for only ext4 partition for max performace
if u dont use ext4 use any wiping script
the script keval gave format partitions to ext2 only not ext4
sakshamx said:
journal disabling is required for only ext4 partition for max performace
if u dont use ext4 use any wiping script
the script keval gave format partitions to ext2 only not ext4
Click to expand...
Click to collapse
NOTE:------------>Do remember the script of sense will format partitions as EXT2 and script for aosp roms will format partitions as EXT4 and sense 4.1 sctript will also format as EXT4
Click to expand...
Click to collapse
vineethraj49 said:
Click to expand...
Click to collapse
u can check the script it formats as ext2 i had also checked from sd card its ext2
i also had thought that as it was given in thread but its not
is it updated script which u posted in facebook
bloodhound42 said:
is it updated script which u posted in facebook
Click to expand...
Click to collapse
yup! it is!
vineethraj49 said:
@OP, I suggest a few changes in your script. First, the mounting commands are run, so, if the sd-ext is already mounted by the recovery (just in case, accidentally it happened), then, you wouldn't (or rather shouldn't) be able to mount it in another folder, namely /sd-data. I would suggest the following change in your flashable zip. Try to make it look something like the one below.
Code:
#!/bin/sh
echo "\"Disabling Journaling\" Script"
echo "Initializing script..."
/sbin/busybox umount -l /sd-ext
/sbin/busybox mkdir /sd-data
/sbin/busybox mount /dev/block/mmcblk0p2 /sd-data
/sbin/busybox mkdir /sd-cache
/sbin/busybox mount /dev/block/mmcblk0p3 /sd-cache
/sbin/busybox mkdir /sd-ext2
/sbin/busybox mount /dev/block/mmcblk0p4 /sd-ext
rm -rf /sd-cache/*
rm -rf /sd-data/*
rm -rf /sd-ext/*
Click to expand...
Click to collapse
Bro thats why i have mounted sd-ext as "sd-ext2" ! to make sure every recovery doesnt have any issue mounting it!
what is journal?
in many posts i found this about this journal what is this actually..

Finally got root via adb. Now having trouble mounting /system

Back in 5.1.1, I was able to mount the system partition.
Now in 7.0, I couldn't mount it anymore without making my phone crash
I've tried different methods...
Code:
mount -o rw,remount -t ext4 /system
This crashes my phone
Code:
mount -o rw,remount,rw -t ext4 /system
This reports back "...Device or Resource busy"
So then I was thinking that something might be using that directory so I tried to make a system mount point in /mnt, thinking as processes depend on /system, I must make another mount point
So I did, this time, "mount" says system is mounted with "ro,seclabel,relatime,norecovery" as it's option. so when I changed it to "rw,seclabel,relatime,norecovery", it doesn't mount, with no errors
So I tried, with system mounted on /mnt/system,
Code:
# mount -o rw,remount -t ext4 /dev/block/sda18 /mnt/system
(don't worry I know you can do ".../platform/xxxxxxxx.ufs/by-name")
This ALSO crashes my phone
So I pretty much gave up, and looked online, and all I found was the same process, but nothing on "this crashes my phone" or any other.
Agreed
I had the same problem. Hard lock up of phone.
how did u get root via adb??
DDwhite said:
how did u get root via adb??
Click to expand...
Click to collapse
https://forum.xda-developers.com/verizon-galaxy-s6/general/unlock-bootloader-t3688594

Categories

Resources