FIX: extsd2internalsd broken after Verizon 4.1.2 OTA - Verizon Samsung Galaxy S III

Loong time lurker, first time poster. I couldn't post a reply in the development forum, obviously. Maybe someone can link to this in relevant threads over in development.
This is a guide for those who are/were using the extsd2internal to swap storage which no longer works after the 4.1.2 OTA or want to do take advantage of this mod: http://forum.xda-developers.com/showthread.php?t=1849860 OR it MIGHT work for other ROMs which want to use this method for the Galaxy S3.
After the OTA, and getting back up and running, I could not get the script to work correctly with this error: "no such file or directory" and doing some sleuthing, it seems Verizon (in their infinite wisdom) changed the mounts, or maybe it did this because gremlins/gnomes, maybe because Vzw/Samsung knows about the swapping method, who knows. Anyways, here is the fix that worked for me:
PreReqs:
Stock ROM 4.1.2 OTA
Rooted (duh)
BusyBox
SManager ads
Terminal Emulator
Root Explorer in R/W mode
extsd2internalsd mod installed/script in the correct place!
BACKUPS!! Make a nandroid backup before you do ANY tinkering people, and copy it to a safe place like your computer.
Let me be clear, for the love of bits and bytes, do not just keep one copy on the sdcard in the phone!!
1) To find the /dev/block/vold for the external sd card, open Terminal Emulator and run this command. Grant it root access when prompted:
Code:
su ls /dev/block/vold
Write down or make a note of the numbers. (For me there were only 2, 179:32 and 179:33) Now run these commands:
Code:
adb shell
cat /proc/mounts
There will be a whole lot of text that shows up, you are looking for "/dev/block/vold/179:xx" and in the same line there is "/storage/extSDCard"
Alternate method, after you are in shell run command and look for mmcblk1p1:
Code:
cat /proc/partitions
The number in the "minor" column, that's the new number!
Double-check that the blocks are right for the sd card's partition size.
Note: I tried using mmcblk1 and it didn't work, then tried mmcblk1p1 and VIOLA! Yay, trial and error.
2) In SManager, edit the extsd2internal script, and replace the 179:97 to 179:*new number* (again, for me it was 179:33)
3) Reboot or just "run" the script in SManger and wait a few moments, then check Settings>Storage.
Here is what my script looks like:
Code:
#!/system/bin/sh
#extsd2internalsd is a modification that allows to switch internal sd to external sd and viceversa. With this you can use default internal sd only for app storage #and the external sd to store all apps resource and all others stuff. The resut is a very big increase of installable apps on gs3
#All credits to Mattiadj of xda forum for the idea and script and to mike1986 for the cmw zip.
#xda thread url at http://forum.xda-developers.com/showthread.php?t=1772234
#Script Modified for U.S. Galaxy S3s by Zedomax at GalaxyS3Root.com to be compatible when sdcard is not inserted.
busybox mount -o remount,rw /
busybox mount -t vfat -o umask=0000 /dev/block/vold/179:33 /mnt/sdcard
busybox mount -t exfat -o umask=0000 /dev/block/vold/179:33 /mnt/sdcard
if busybox mount | busybox grep vold/179:33; then
busybox mount -o bind /data/media /mnt/extSdCard
fi
If this didn't work for you, I am a complete n00b, so I will do my best, but don't expect much.
Things to double check:
Permissions on the extsd2interal script in Root Explorer should have all the boxes checked EXCEPT the last 3 at the bottom.
SManager script should be set to "Su" and "Boot"
OTA Headaches? Use this guide to keep root and boot unlocked worked PERFECTLY: http://forum.xda-developers.com/showthread.php?t=2186574#8 I did a nandroid restore to pre-OTA since it borked the first go-around, and then used this method.
Take home message: MAKE BACKUPS!
Credits / Current Build of this mod:
http://forum.xda-developers.com/showthread.php?t=1772234
This mod does work, and just replacing the old with the new (still have to add it in SManager) will get the job done. The new script is significantly different, and I am sure there are reasons, but without a changelog...
Forum Community: Created the thread here because I couldn't find another thread specific to this environment with all the relevant information in one place. If anyone has seen any errors of my ways, please, please reply with what's up.

Related

[TUTORIAL] Install applications into SD Card for Samsung Galaxy 5 (i5500)

DISCLAIMER: DO THIS AT YOUR OWN RISK. I AM NOT RESPONSIBLE IF YOU BRICK / RUIN YOUR PHONE IN ANY WAY.
Hi Everyone,
I have some good news for the owners of Samsung Galaxy 5 (i5500) Smartphones.
Doing some research on Google and reading about efforts from other people who could install applications on SD card on other android phones, I was able to develop a method to install application into SD card for the Galaxy 5. Better yet, you won't even need a custom Rom.
Before I get into the specifcs let me state that the following steps are manual and no application is provided to automate the process, so advanced computer skill is required and some knowledge of unix/linux is a plus.
Here we go: PLEASE READ THE WHOLE THING BEFORE YOU START. I MAY HAVE OMMITED SOME COMMANDS OUT OF LACK OF ATTENTION.
1) You'll need to root your phone. There is a lot of guides about this available, just google for it. I've used the SuperOneClick Root to do this.
2) Partition your sd card like this: 1 - FAT, 2 - Linux ext2. Again, there is a lot of guides about this on the net, just google again. I've used Paragon Partition Manager 2010 to lower the size of my FAT partition, leaving a 550MB unallocated space at the end of the card. Then I formatted this space as ext2 in linux, using ubuntu live CD. Most guides around there recommends that you keep this partition between 500~750MB, so I didn’t try with greater sizes. Also, i kept my partition 1 as FAT 16, but FAT 32 might actually work too, try that if you want and post me a reply.
3) Download Titanium Backup (or another app backup tool) from market and backup your applications. You may need to restore your applications to correct some permission problems that may occur after completing this guide.
4) Install busybox. BusyBox is a software application that provides many standard Unix tools, which are not available on stock android. You can get a copy of busybox by clicking on “problems?” button on Titanium Backup main window. It will get installed on /data/data/com.keramidas.TitaniumBackup/files.
5) If you still don’t have Android SDK installed on your PC, download and install it from Google. You’ll need ADB (Android Debug Bridge), which is included in the SDK, to proceed. Now open a shell connection with your device by typing:
Code:
adb shell
Just keep in mind that you MUST be logged as root. Root command prompt is recognized by the # character. If you don’t have root type the ‘su’ command. If even with ‘su’ you couldn’t get root, please review step 1.
6) Create ‘sd’ folder int /system:
Code:
cd /system
mkdir sd
7) Mount ext2 partition into /system/sd
Code:
mount -t ext2 /dev/block/mmcblk0p2 /system/sd
8) Create a folder to store the applications into ext2 partition:
Code:
cd /system/sd
mkdir app
9) Copy busybox to /system/bin
Code:
cat /data/data/com.keramidas.TitaniumBackup/files/busybox > /system/bin/busybox
chmod 755 /system/bin/busybox
10) Copy your applications to ext2 partition:
Code:
busybox cp /data/app/* /system/sd/app/
11) Change permissions of copied applications:
Code:
cd /system/sd/app
chown system.system *
chmod 644 *
12) Now comes the tricky part: making Android mount your new partition at boot time. All the hard work would be useless if Android discarded the mount points every time we restarted our phones. To do this we’ll need to create 2 scripts and store then into /system/etc. Obviously the scripts should be started by init.rc and need to run as root. Fortunately Android’s init.rc have a gap that makes this possible. The scripts are named install-recovery.sh and init-sd2.sh.
install-recovery.sh content:
Code:
#!/system/bin/sh
/system/etc/init-sd2.sh&
init-sd2.sh content:
Code:
#!/system/bin/sh
MYLOG=/data/install-recovery.log
echo "$(date) Starting install-recovery.sh" > $MYLOG
echo "$(date) Waiting SD to become ready..." >> $MYLOG
sleep 10
mount -t ext2 /dev/block/mmcblk0p2 /system/sd 1>>$MYLOG 2>>$MYLOG
mount -o bind /system/sd/app /data/app 1>>$MYLOG 2>>$MYLOG
mount >> $MYLOG
echo "$(date) Finishing install-recovery.sh" >> $MYLOG
If you plan to edit this files on windows I recommend a tool that is capable of keeping UNIX file format, just like notepad++ free tool.
13) After placing the scripts, change their permissions:
Code:
cd /system/etc
chmod 555 install-recovery.sh
chmod 555 init-sd2.sh
14) Rename the default application folder. If everything works fine you can remove this later to save space:
Code:
cd /data
mv app app_old
mkdir app
chown system.system app
chmod 755 app
15) Restart your phone and cross your fingers
16) If you have problems with your widgets don’t worry. You just need to remove then from your homescreen and add again.
17) Check if your applications are running as they should. Restore backups you’ve made with Titanium Backup for the applications showing problems.
18) If your partition didn’t mount at boot, check log file at /data/install-recovery.log
19) From now on your new applications will be installed on your SD Card. You can modify the scripts to store other folders from /data into the ext2 partition as needed. I’ve been running my applications from SD Card for a week now without any problems or bugs.
20) If you can’t make it work, post your question here and I will try to help you out.
21) Donations are welcomed, just drop some money into my paypal account. Just kidding
Good luck and cya!
can this script use for moving /data/data to EXT2?
if can, from where i should start type the script?
i'm still newbie on this
so i'm alittle bit confused, i hope you can help me and sorry for my bad english
i'm already succes from step 1 to step 11
but i'm little confused at step 12
can you explain how to make the script?
should i make those 2 script via notepad++ and then copy it to /system/sd and then continue to step 13?
or should i just type everything on step 12 after step 11 in cmd prompt?
the problem is, if i make the script from notepad++ the android system will just discard my mount point when i restart my phone
and if i just type everything on the step 12 in comand prompt, when i'm type chmod 555 install-recovery.sh and chmod 555 init-sd2.sh like in the step 13, it always say that install-recovery.sh and init-sd2.sh file is not found?
so what should i do?
i'm stuck on step 12
step 12, type it on notepad++ and then you have to change the extension of the file with .sh, after that copied the 2 files to /system/etc
andikasuhendar said:
step 12, type it on notepad++ and then you have to change the extension of the file with .sh, after that copied the 2 files to /system/etc
Click to expand...
Click to collapse
i've already done that
but when i make the script via notepad ++, i'm already make the save type become .sh, so isn't it just the same?
but when i reboot the phone it's still not working
But how to copy this two script files to system/etc??? it's saying permision denied..
But how to copy this two script files to system/etc??? it's saying permision denied..
Click to expand...
Click to collapse
I'm use root explorer to move it to system/etc
The script can be moved but it still doesn't work at all :-(
-------------------------------------
Sent via the XDA Tapatalk App
And i can't move them even with root explorer.. i don't get what i'm doing wrong (
@agus
about the scripts, u can check with root explorer, try to view the script and make sure it was the exact same from the script above, coz i experience the same problem for the first time i try this. if u sure that the script are same then try to execute it using root explorer and then go to titanium backup and see if there is there is another storage (usually there is internal and SD card only).
@stasic
use the root explorer to copy the script to /system/etc, don't forget to change the root explorer option from R/O to R/W, this option should be on top of the page, just touch it to change from R/O to R/W.
andikasuhendar said:
@agus
about the scripts, u can check with root explorer, try to view the script and make sure it was the exact same from the script above, coz i experience the same problem for the first time i try this. if u sure that the script are same then try to execute it using root explorer and then go to titanium backup and see if there is there is another storage (usually there is internal and SD card only).
@stasic
use the root explorer to copy the script to /system/etc, don't forget to change the root explorer option from R/O to R/W, this option should be on top of the page, just touch it to change from R/O to R/W.
Click to expand...
Click to collapse
veeeerrrryyyyyyyyy biiiiiiigggggggggggg thaaaaaaannnnnkkkkkssssss brrroooo
you was right, after i check the script via root explorer, the script was not the same, after i fix it, everything works like a charm
in a step 2... how to change linux ext2???
any software can change from FAT to ext2???
I've changed root explorer option to R/W and still no luck..
@agus
sama2 bro AKA ur welcome bro, have fun with the app2sd hehehe
@nima
search on google, how to format EXT2, if i correct u can use paragon partition for windows user, but if u use macintosh u can just go to disk utility and make partition with EXT2 format
@stasic
go to the /system/etc and see if it already R/W or still R/O
It's written that R/W but when I copy and paste still nothing happens..
thx guy.... i must try it
andikasuhendar said:
@stasic
go to the /system/etc and see if it already R/W or still R/O
Click to expand...
Click to collapse
i've rooted my g5 using superoneclick
but i still have R/O in /system/etc
when i tap R/O on the screen, i wont changed to R/W
what should i do?
maaf inggris nya acak2an
@siap
siapakahaku said:
i've rooted my g5 using superoneclick
but i still have R/O in /system/etc
when i tap R/O on the screen, i wont changed to R/W
what should i do?
maaf inggris nya acak2an
Click to expand...
Click to collapse
In your PC command prompt execute:
Code:
adb shell
Make sure you are loged in as root and in ADB SHELL try this:
Code:
mount -o rw,remount /dev/stl12 /system
Then execute:
Code:
mount
If your mount result has a line like the one bellow, with the rw set, you'll be able to copy the files.
Code:
/dev/stl12 /system rfs rw,vfat,llw,check=no,gid/uid/rwx,iocharset=utf8 0 0
@stasic
stas1c said:
It's written that R/W but when I copy and paste still nothing happens..
Click to expand...
Click to collapse
Try the same thing I posted above. I don't have Root Explorer installed here, so you should be able to finish this guide without it.
stuck in step 2
cant mkdir....
Hi, nice guide!
I succeded with this the first time I tried but now I have changed to a larger sd card and I can't get it to work.
The log file says that it failed to mount the mmcblk0p2 folder, and now when I check it doesn't even exist. What should I do?
Hope I can get help.. thankful for response. /Mattefacit

Rooting 2.3.6 Samsung Replenish!!! Success!!!

alt link: http://forums.androidcentral.com/sa...-guide-stock-2-3-6-replenish.html#post1651482
REVISED TUTORIAL IN ROOTING 2.3.6 SAMSUNG REPLENISH
warning for experienced adb users!: this was made with noobs in mind. you may learn something (from me! a noob! XD) but anyways, enjoy!
this does not affect anything on the phone except for adding the ability to access root permissions. CWM is not permanent, it disappears after you use it, and nothing on the phone is affected, as far as i know, but i had just factory reset the phone, so use at your own risk...
you may need to know:
root of a drive- drives are designated C:\ or D:\ or whatever letter in windows. Just go to "computer" and double click the first item. That location is the "root" of a drive.
Note: make sure you have at least 400 mb of memory (i know, thats alot, but just in case) on your sd card so you can back up your entire phone! i reccomend doing every optional step!!! It'll save you hassle if you have problems. If you can't make room for some reason, and you still wanna try, you should skip step 8. I don't suggest it though.
1. download "odin.zip" and "su" here: https://www.box.com/shared/620b03e95cc0814fefc8 and unzip to your desktop. if you dont have the android sdk, simply copy the "adb.exe" file from "odin.zip" to the root of your primary drive for later. Just go to "computer" and double click the top icon/item. It should say something about C:/. If you're on Mac, sorry. Idk much about it. As for Linux, I have no clue how you'd even try to do this. I love Linux but, sadly, can't experiment with this in it. WINE has its limits....... And I don't think adb or Odin would work.
2. download the "su" file and put into into "platform-tools" where you installed the android sdk, if you have it, or put onto the root of your primary drive if you havent.
3. start phone while holding "spacebar" and "p". "downloading..." should appear on the screen in yellow text
4. plug into the computer and run "Odin_Multi_Downloader_v4.42.exe"
5. select SPHM580.ops for "OPS" and Replenish-CWM5.tar for "One Package" (they should be the only options) DO NOT CHANGE ANYTHING ELSE!!!!!
6. hit "Start" and DO NOT REMOVE PHONE FROM USB.
7. as the phone reboots, hold "u" until CWM opens and set the phone down. you should close Odin now.
8. use the volume keys to navigate to the backup and restore option and use enter to select backup. wait for it to finish completely and take you back to the the CWM main UI. backing up here creates a pure recovery, untouched by anything. CWM is NOT installed into this recovery. continue with the guide.
9. open the command prompt (type cmd.exe in search or run in the start menu, depending on your version of windows) or use some form of terminal emulator on your operating system of choice. command prompt is preferred due to the fact i know it can get the job done, but do what you will.
10. navigate to the drive your sdk is on and into "platform-tools" or to the folder you put the adb.exe and su files on. the default should be [name of drive]:\Users\[username]\. use the "cd.." command til youre at the root of the drive, and if you installed the sdk, type "cd android-sdk-windows/platform-tools" or just go to the root of the drive and go to the next step if you havent. just be sure adb.exe and su are there.
11. type this in line for line, with enters in between. the blue "~#" in the later lines is the prompt you should have. do not type this. it will be in blue. (clockworkmod should still be open on your phone at this point)
adb shell
~#mount -o remount,rw -t rfs /dev/block/stl12 /system
~#exit
adb push su /system/bin/
adb shell
~#chmod 777 /system/bin/su
~#reboot
DO NOT CLOSE THE COMMAND PROMPT YET FOR THE SAKE OF CONVENIENCE
If you have problems with that, try using CWM to mount "/system". Some friendly people over at androidcentral pointed that out. I personally didn't have that problem, but I'm glad it's fixed.
12. when your phone has rebooted, go back to the open command prompt, which should be where it was before you typed "adb shell"
13. type "adb shell". you will see a prompt of "$." type "su." if you have a prompt of "#" rejoice! you have permanent root! now you can go on the Play Store and find "Superuser" and "Busybox" (they should be free. if you cant find it, get ahold of me and ill try to supply the newest updates) if not, and you have a backup from optional step 2, you should go through til you hit CWM and restore the backup. if not, make one now and reattempt everything aside from downloads and the moving the files around on your computer. Also, someone said something about "chmod 06755 /system/bin/su", so if you might try using that instead of "chmod 777 /system/bin/su". 777 worked for me, but maybe this works better for you.
OPTIONAL FINISH STEP: I dont know how you install CWM permanently, but you should do this so you can make backups of your rom and store them somewhere like on a box.com or mediafire.com account if you decide to mess with something on your phone. (use hjsplit to break it into pieces for uploading and reassemble after download for flashing if its too big). to use a recovery, enter CWM (either the way i have here or if you have permanently installed, just reboot and hold "u") and navigate to "backup and restore," "restore," and select the recovery you wish to use on your sd card (make sure when you take out a backup for storage, you zip up the entire folder with the name that contains the date and time of your backup.) it will overwrite everything on your phone to be exactly like it was when you backed it up.
good luck! have fun!
Note: if you rename the CWM backup file, make sure it DOESN'T HAVE A SPACE or it'll give you something about md5 or something not matching. If it says this, remove any spaces in the name and try again. I had it happen on my xperia play and freaked, thinking it was soft-bricked permanently one time, til I found out about cwm's glitch with that.
Also, I uploaded pretty much everything needed for rooting the phone, with comments pertaining to each file. This includes current (as of July 31, 2012) copies of Superuser.apk, a busybox installer, and the busybox and su binaries, as well the Odin package containing the tools to temp flash CWM.
the odin.zip file and the process of achieving CWM temp-flashing was found at http://forums.androidcentral.com/sa...method-samsung-replenish-android-2-3-6-a.html and credit for that part is given to joshua.worth, although I took it a different path than he did.
Update to above info: to simplify things, I uploaded all relevant files to box so people can get them easier. The su file went missing from xda, most importantly, so I fixed that, and added an updated binary in case someone has trouble with the other one.
contact me at [email protected] if you cant pm me.
Sorry if it takes a while to respond. Life's been kinda crazy for me lately, and I am using my new phone (no service) to do this over wifi.
ahh... well, turns out unrooting cannot be done with a CWM backup... you probably have to find a nandroid or a clean version of kernel with rom. the su file dissapears, although root is still there. ill keep playing with it, i have an idea why root stays although su disappears from the system files. anyways, i will still supply a backup thats pre-rooted for anyone who is willing to have a fresh start on their replenish. it will have superuser.apk preinstalled along with busybox, and everything else will be wiped. this will be a sprint backup, so if anyone has the boost version and is willing to back up with CWM and factory reset, then follow my guide, install busybox and superuser.apk, then back it up again, id be eternally grateful to have a copy
by the way, if anyone has problems with restoring a backup due to "md5" tags or whatever it is, make sure the name of the backup has no spaces. i was freaking out til i found that tip on an obscure forum (well, to me. i dont have a Motorola. lol. just a Sony Ericsson and 2 Samsungs)
update: sorry i havent uploaded the backup. i realized it would give whoever used it the number on this phone and i have to fix that. havent had time to anyways, plus it would only work on a sprint phone. it would convert any boost mobile to sprint, so thats a no-go. sorry...
does this work for the boost mobile replenish that is 2.3.6 if so how long does it take to odin
It should work. And Odin just flashes cwm (really fast) for the duration of the next boot cycle, which it automatically initiates, so hold the recovery button (I think it's u) as it goes into it and you'll have temp root. Make sure it's in download mode before you start. Remember, it cannot be unrooted, so if you value your warranty, plz think twice before doing it. I'm just here to supply the how-to if you decide to, not to say you have to. If you do, enjoy root access!
isavegas said:
It should work. And Odin just flashes cwm (really fast) for the duration of the next boot cycle, which it automatically initiates, so hold up (I think it's u) as it goes into it and you'll have temp root. Make sure it's in download mode before you start. Remember, it cannot be unrooted, so if you value your warranty, plz think twice before doing it. I'm just here to supply the how-to if you decide to, not to say you have to. If you do, enjoy root access!
Click to expand...
Click to collapse
Thanks. I did not know if there is a fail safe if something went wrong. so I was second guessing. Very simple to do thank you assuming with odin I made a back up. if I where to mess my system up I can use odin and restore my backup and I be back up and running again no need to sbf
i keep getting : ~ # mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
mount: mounting /dev/block/mtdblock3 on /system failed: Invalid argument
bscabl said:
i keep getting : ~ # mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
mount: mounting /dev/block/mtdblock3 on /system failed: Invalid argument
Click to expand...
Click to collapse
hmm... i am familiar with the error (ive gotten it with 3 different phones in my attempt to root it, but i have succeeded each time regardless) but are you sure you actually have clockworkmod OPEN on your phone when the error shows up? i cant actually do anything from my end, because i no longer have a computer i can use to test anything, or the replenish i rooted with the method... but i opened the cwm several times before thinking to test the adb and seeing the "~#". i actually restarted the phone and did it again before actually rooting it, seeing if i had rooted it or what, and tho i got the same prompt every time it was booted in cwm, it wouldnt show up if i allowed the phone to boot normally after using odin, i HAD to ACTUALLY boot into the cwm menu, which is completely seperate from the OS itself, although it has access to the system files.
by the way, copy and paste this directly into the command prompt when you get to the step to avoid human error. mount -t rfs -o remount,rw /dev/block/stl9 /system
or, if it wont work, try this mount -o remount,rw -t yaffs2 /dev/block/mtdblock4 /system
sorry bout the babbling XD. anyways, cwm should be circumnavigating the root permissions. hmm.... if you still have problems after that, try skipping to the adb push for the "su" file.
sorry i havent been on top of the thread. ill set up an email notification.
and by the way, something i found very useful on my xperia play when it went into infinite reboot, you can always just restore the system files in the advanced restore option, allowing you to keep all of your app data if, later down the line, your phone needs to be restored. hope this helps. it helped me XD thought id lose all of my messages, but nope. i decided to explore the advanced restore and yay! i got to keep them XD
UPDATE
I don't know if it matters to you anymore, but apparently, some people have trouble with this and fix it by going to the mount menu in CWM and mounting /system
Couple of corrections:
chmod 777 /system/bin/su
should be chmod 06755 /system/bin/su
and then following that command should be
ln -s /system/bin/su /system/xbin/su
and I saw someone say this is unrootable. Thats not correct. Simply running the unroot script would unroot. Doomlord made a nice one.
To use it do the following:
Code:
adb push unroot /data/local/
adb shell chmod 777 /data/local/unroot
adb shell su -c "/data/local/unroot"
adb reboot
[code]
The above will unroot almost any android device.
halfcab123 said:
Couple of corrections:
chmod 777 /system/bin/su
should be chmod 06755 /system/bin/su
and then following that command should be
ln -s /system/bin/su /system/xbin/su
and I saw someone say this is unrootable. Thats not correct. Simply running the unroot script would unroot. Doomlord made a nice one.
To use it do the following:
Code:
adb push unroot /data/local/
adb shell chmod 777 /data/local/unroot
adb shell su -c "/data/local/unroot"
adb reboot
[code]
The above will unroot almost any android device.[/QUOTE]
Unfortunately, Doomlord's method didn't work on it. I tried all manner of one clicks and manual versions and only this got even temporary root. It's a workaround based on forcing the phone to boot into a custom recovery. (I call it custom bc its not an "official" recovery.) And I chose the chmod by looking through many manual ways to root, and that one was popular, and it works. I had full root access afterwards. I tried to unroot afterwards, however, so I could take screenshots and stuff, but the su file would reappear, even after manual deletion or restoring to an unrooted backup. Anyways, point is, this is the only method I could get to work at all, and it does work.
But the "chmod" night help other people, so ill make note of it in the post just in case. Thanks for the info.
Sent from my rooted R800at using xda app-developers app
Click to expand...
Click to collapse
Important fix----
If step 11 doesn't work, go to the "mount" menu in cwm and mount /system. Some people on androidcentral were kind enough to mention that this fixed their problem with mounting /system as rewritable
Sent from my R800at using xda app-developers app
isavegas said:
Important fix----
If step 11 doesn't work, go to the "mount" menu in cwm and mount /system. Some people on androidcentral were kind enough to mention that this fixed their problem with mounting /system as rewritable
Sent from my R800at using xda app-developers app
Click to expand...
Click to collapse
thats because your command is wrong
shabbypenguin said:
thats because your command is wrong
Click to expand...
Click to collapse
How? Throughout my own rooting of one of the phones, I had this working perfectly. Every time I hit a snag, I found a way around it and documented it. A few other people had errors show up because the phone itself hadn't mounted the system, but the problem was resolved, and only a couple people had any other problems, and they were unrelated to that. I assure you, every command works properly, as far as I know.
exactly my point. your command to mount system is wrong.
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
lets break it down shall we?
mount - this is teh command
-o remount,rw - this is where you tell it what option you want, in this case remounting as rw.
-t yaffs2 - here you are telling mount that it should expect a yaffs2 formatted device, which is not what the samsung replenish is. the replenish uses RFS (robust file system), the best way i can describe it is like telling your windows computer that your hard drive is fat32 when its actually ntfs.
/dev/block/mtdblock3 - this is where you tell mount what you are looking to mount, the issue here is that the replenish doesnt use MTD blocks, it uses STL's and BML's.
/system here is where you are trying to mount the said device to..
out of 5 parts you did get 3 correct tho. you might wish to modify your guide to reflect the actual mount command, for your device it is the following:
mount -o remount,rw -t rfs /dev/block/stl12 /system
and that will kick out system as r/w
shabbypenguin said:
exactly my point. your command to mount system is wrong.
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
lets break it down shall we?
mount - this is teh command
-o remount,rw - this is where you tell it what option you want, in this case remounting as rw.
-t yaffs2 - here you are telling mount that it should expect a yaffs2 formatted device, which is not what the samsung replenish is. the replenish uses RFS (robust file system), the best way i can describe it is like telling your windows computer that your hard drive is fat32 when its actually ntfs.
/dev/block/mtdblock3 - this is where you tell mount what you are looking to mount, the issue here is that the replenish doesnt use MTD blocks, it uses STL's and BML's.
/system here is where you are trying to mount the said device to..
out of 5 parts you did get 3 correct tho. you might wish to modify your guide to reflect the actual mount command, for your device it is the following:
mount -o remount,rw -t rfs /dev/block/stl12 /system
and that will kick out system as r/w
Click to expand...
Click to collapse
Hmmmm.... Odd..... *shrugs* I had no problem with the command, but I guess other ppl had pickier computers or phones. Hell, Vista's buginess might have worked in my favor that time XD. Thanks for the pointer. I didn't really understand the exact way the replenish was built. I just found a lil guide for making it boot into cwm and found it allowed for me to use that as an exploit to root the device. In fact, I've done the same kind of stuff to root the samsung Intercept, except I made their own software flash a pre-rooted kernel. anyways, I'll update the guide on xda and androidcentral. Thanks!
isavegas said:
Hmmmm.... Odd..... *shrugs* I had no problem with the command, but I guess other ppl had pickier computers or phones. Hell, Vista's buginess might have worked in my favor that time XD. Thanks for the pointer. I didn't really understand the exact way the replenish was built. I just found a lil guide for making it boot into cwm and found it allowed for me to use that as an exploit to root the device. In fact, I've done the same kind of stuff to root the samsung Intercept, except I made their own software flash a pre-rooted kernel. anyways, I'll update the guide on xda and androidcentral. Thanks!
Click to expand...
Click to collapse
chances are you had system mounted in cwm without knowing it.
for future knowledge always check the devices fstab for where to mount and filesystem type
https://github.com/Shabbypenguin/android_device_replenish/blob/master/recovery/recovery.fstab
as you can see the proper mounts from the files i used to make CWM for the replenish
shabbypenguin said:
chances are you had system mounted in cwm without knowing it.
for future knowledge always check the devices fstab for where to mount and filesystem type
https://github.com/Shabbypenguin/android_device_replenish/blob/master/recovery/recovery.fstab
as you can see from the files i used to make CWM for the replenish the proper mounts
Click to expand...
Click to collapse
Eh, maybe. For all I know the first thing I did was mount everything with cwm. I DID do this several months ago. I don't even have the phone anymore. The owner of the phone was gonna give it to me after upgrading, but she sold it, so I kept her 500gb laptop hard drive instead. Popped it out of the external hdd casing and stuck it in a laptop. XD. It now has Linux on it.
Anyways, I've updated the guide to have the right command and note that if it doesn't work to use cwm to mount /system. And how do you find the fstab? Just Google it? Or is it somewhere on the device?
Btw, do you know anything about cwm? It refuses to properly back up my xperia play anymore. The .android_secure folder keeps giving it errors.
isavegas said:
Eh, maybe. For all I know the first thing I did was mount everything with cwm. I DID do this several months ago. I don't even have the phone anymore. The owner of the phone was gonna give it to me after upgrading, but she sold it, so I kept her 500gb laptop hard drive instead. Popped it out of the external hdd casing and stuck it in a laptop. XD. It now has Linux on it.
Anyways, I've updated the guide to have the right command and note that if it doesn't work to use cwm to mount /system. And how do you find the fstab? Just Google it? Or is it somewhere on the device?
Btw, do you know anything about cwm? It refuses to properly back up my xperia play anymore. The .android_secure folder keeps giving it errors.
Click to expand...
Click to collapse
its where the recovery is on the device. each device has their own fstab. as for your error sounds like a conflict, either with cwm itself or that folder
shabbypenguin said:
its where the recovery is on the device. each device has their own fstab. as for your error sounds like a conflict, either with cwm itself or that folder
Click to expand...
Click to collapse
It HAS to he cwm, because the folder is regarded as super hidden by the device. The folder itself can be seen, but the contents can ONLY be edited by the rom or a pc, and I haven't touched it with a pc before. It's where your apps go when you move them to the sd card. I've been trying to back my phone up with cwm because I wanted to test the jelly bean alpha release for it. its the xperia play 4g. Stupid backup crashes every time I try and it ends up eating up what room is left in my sdcard.
i followed your guide and have root in shell. however i cant get root permission on any apps, the window doesnt pop up asking me for permission. i also get a toast notification saying superuser access denied for whatever app im trying to open. any ideas?
arodey said:
i followed your guide and have root in shell. however i cant get root permission on any apps, the window doesnt pop up asking me for permission. i also get a toast notification saying superuser access denied for whatever app im trying to open. any ideas?
Click to expand...
Click to collapse
What does your Superuser log show?
Sent from my PC36100

[Q] Mount external sd without -noexec flag

Hey Guys,
I'm interested in lots of stuff, regarding my phone and so i began writing a skript, which moves files from sdcard0 to sdcard1.
This Skript calls another skript and this Skript calls another one.
Well long story short, of course it doesnt work, because i cant change the permissions of the skript-files to rwx.
How can i change the mount type of my sdcard to -exec, so that i can execute stuff from my sdcard...
Thanks for your help in advance, greetz Esok
AFAIK only linux filesystems "accept" linux permissions,
means format your sd card with ext3 or ext4, than you can change file permissions, but I do not know whether your moto remembers the card
hmmm gotta try this one day.
have read in some forum, that there is some kind of an -noexec flag, which is always set unter android.
Well nevermind, the question i asked is stupid, because it doesnt 100% relate to my problem, as i see right now....
So here is what is wrong:
The scripts are lying on the INTERNAL-sd
The internal Sd doesnt have -noexec flag. This is the external, as i found out using .
Code:
mount | grep sdcard0
mount | grep sdcard1
but within the output of
Code:
mount | grep sdcard0
i found the line:
default_permission,allow_other 0 0
Click to expand...
Click to collapse
, i think this is why i cant change the permissions, isnt it?
I also found, that the filesystem on the internal seems to be "fuse". Anyone knows what this means?
so new question: how to solve this problem? oO
is remounting an option or is there any other way?
As it seems, the sdcard1 doesnt have this "default_permission" line, but it has the -noexec flag set...
Maybe i can do something via external sdcard...
i'll give it a try
esok44 said:
hmmm gotta try this one day.
have read in some forum, that there is some kind of an -noexec flag, which is always set unter android.
Well nevermind, the question i asked is stupid, because it doesnt 100% relate to my problem, as i see right now....
So here is what is wrong:
The scripts are lying on the INTERNAL-sd
The internal Sd doesnt have -noexec flag. This is the external, as i found out using .
Code:
mount | grep sdcard0
mount | grep sdcard1
but within the output of
Code:
mount | grep sdcard0
i found the line: , i think this is why i cant change the permissions, isnt it?
I also found, that the filesystem on the internal seems to be "fuse". Anyone knows what this means?
so new question: how to solve this problem? oO
is remounting an option or is there any other way?
As it seems, the sdcard1 doesnt have this "default_permission" line, but it has the -noexec flag set...
Maybe i can do something via external sdcard...
i'll give it a try
Click to expand...
Click to collapse
Although its been a long time since I had to dive into it, I'm really leaning toward FAT filesytems always being mounted noexec in Linux. Either way though, you can still point the interpreter at the script and it will run; for example if you script is at /storage/sdcard0/script.sh you can run it by doing /system/bin/sh /storage/sdcard0/script.sh or possibly even just sh /storage/sdcard0/script.sh and the same would apply to the external sdcard.
I use an app called smanager to run scripts via shortcuts and theres a plugin for widgets if you use a launcer that doesn't like to do shortcuts. It has selections to run things as root as well but I end up just calling root explicitly, running the script as a normal user and I do the same thing you're talking about where a scripts calls another script.
So for example I have Maps and Facebook frozen and I have a script for both of them but only part of it needs root access. So my Maps script, for example, unfreezes maps using root, starts it using the same user as smanager, then it calls another script that checks every couple of seconds if maps is still open. When I've closed it, the second script ends and the rest of the first script executes which kills maps and freezes it again.
So it looks roughly like this from memory:
Code:
/system/bin/sh /system/xbin/su -c "pm enable com.google.maps"
am start com.google.maps/com.whatever.starts.maps.up
/system/bin/sh /system/xbin/su -c "/script/that/stays/open/till/maps/closes/which/makes/this/script/pause/.sh"
/system/bin/sh /system/xbin/su -c "whatever.I.used.to.kill.all.instances.of.maps"
/system/bin/sh /system/xbin/su -c "pm disable com.google.maps.or.something.like.that"
Note that in the above, if I call the script with /system/bin/sh /location/of/script or even possibly sh /location/of/script , that I probably don't need all the paths that follow; most notably the /system/bin/sh since its already established when we call the script in the first place. It could look more like this (I just happened to write it along the lines of the above when I went about making my scripts):
Code:
/system/xbin/su -c "pm enable com.google.maps"
am start com.google.maps/com.whatever.starts.maps.up
/system/xbin/su -c "/script/that/stays/open/till/maps/closes/which/makes/this/script/pause/.sh"
/system/xbin/su -c "whatever.I.used.to.kill.all.instances.of.maps"
/system/xbin/su -c "pm disable com.google.maps.or.something.like.that"
note that the am start didn't need to be called by its path, for example.
I think, but can't remember, that I needed to call su by abosolute path, though. Also, I used a shebang #!/system/bin/sh at the begining of my scripts but don't know if thats necissary or not if you're going to call it by the interpreter in the first place.
If this was a some other script, like python, then it stands to reason that you can put the shebang as the first line as the path to your python and still call it from the shell and it would work; so if your script was:
Code:
#!/path/to/a/python/interpreter
import something
while this:
do this
print "I'm awesome"
and the script was called pythonscript.py then /system/bin/sh /path/to/pythonscript.py and possibly sh /path/to/pythonscript.py would most likely work and is worth a try.
Try it out and see how you go.
One last thing; if you call root explicity in a script every time you need it then you'lle get a popup for permissions every time it asks for root in the script the first time you run it, but if you use an app to launch that script then once the app has root permissions you won't get hassled at every instance. You'lle want to turn toasts off for the app though, or you'lle see one every time root is called in a script.
Hi again.
I just got execute permissions on my external sdcard. It didn't work on the internal one.
It looked like this after playing with a lot of various things
mount -o remount,rw,noatime,exec /storage/sdcard1
though most likely rw and noatime were not needed, probably just needed
mount -o remount,exec /storage/sdcard1
but would have to restart the phone to be sure.
This was using adb. some apps, for example my titanium backup, have problems in JB writing to the external card and I had it remounting properly to work around this at one point, but left the computer and came back, closed out windows, then forgot what I had done without saving any work and wasn't able to figure it out again. It was an fmask, dmask, or umask.
In any case, assuming you want to run scripts on your internal card (which is mounted using fuse by the way, instead of just vfat, which may be intentional to keep permissions from being messed around with), you can also write one to the external card and then after remounting it (you can create a command in tasker for this that runs on boot) just use it as a helper script, so it would look like this:
Code:
#!/system/bin/sh
/system/bin/sh [email protected]
or you might need to use quotes around [email protected] ... "[email protected]" ... its been a long time and I forget how I did this
So [email protected] is just the arguments you give to a script and if your script is called helper.sh and you say ./helper.sh /sdcard/myscript.sh then it should run the script.
[email protected] is like saying $1 $2 $3... and so on; getting the arguments except getting all of them in one string.
Also, one last thing; with my last phone, Samsung SGS2, I made a tiny fat partition on my external sd and then made the rest ext4. The tiny fat partition got mounted at boot and an extra device file was created along with the files created for sdcard0 and sdcard1, and that enabled me to mount the ext4 partition how I wanted to. It wasn't usable for much because it didn't play well with apps such as media players and ... well alll of them, but if you make a small ext4 partition after the larger fat partition then it may do the same as my Samsung did and provide you with a device file to mount and to put your scripts on. I think its easier to just mount the external drive with the execute option and use a helper script, or use smanager as described in my above post, or use tasker to create an app for your scripts but thats going to make a simple command into a really big app.

[GUIDE] How to mount ext4 formatted MicroSD card on Android 4.2.2 Phone/Tablet.

Why?
MicroSD cards are traditionally formatted using ExFAT filesystem. The trouble is that while universally compatible, ExFAT is rather primitive filesystem prone to data loss, and poor speed. Linux ext4 on the contrary is highly reliable and very fast.
Trouble is that, and I quote, "Android supports devices with external storage, which is defined to be a case-insensitive and permissionless filesystem." (see http://source.android.com/devices/tech/storage/)
Well that pretty much narrows it down to dumb stuff like ExFAT.
Note: As of JB (Android 4.1) default umask is 077, which means that files created by apps on the ext4 formatted SD card will only be readable by the same apps, unless you manually update permissions. See this thread for more: http://forum.xda-developers.com/showthread.php?t=889471&page=5​
The good news is that Android has Linux at its core, which naturally supports ext4, and actually all of the internal storage is (or will be in near future) formatted this way. The design limitation mentioned above is somewhat artificial and is enforced by
restricted functionality of funky little daemon, called vold. The sole purpose of vold is not monitor external storage,
detect filesystem on it, mount it as specified in /etc/vold.fstab (or vold.xxx in Android 4.3), and then report to the Volume Manager.Volume Manager in turn notifies the MTP application, and all other apps, displays icons and handles rest of user-visible stuff.
Stock Android vold only supports ExFAT/vfat filesystem. It has been improved in Cyanogenmod to support ext4 and NTFS filesystems, but for those of us stuck with OEM Android this goodness in unavailable. In my experience simply re-building vold from CM as part of AOSP,
while yields an executable, this executable results in a boot loop for an unclear reason.
All hope lost seemingly, yet there is a silver lining.
Silver Lining?
If MicroSD card is mounted manually in the way that vold can see it, re-running vold will properly report it to the Volume Manager and it will be recognized and utilized by apps.
In theory this is easy to accomplish on any rooted device, in practice there are a number of obstacles:
On a locked device, it is not possible to update init script to run the commands at system bootup.
Since Android 4.2, mount propagation no longer work (as described here http://forum.xda-developers.com/showthread.php?p=36889027),
so if sdcard is mounted in terminal, vold will still not see it. Hence the mount operation has to be done in adb.
Furthermore in Android 4.2.2, running adb on localhost is broken as a result of it loosing its private key.
See here https://code.google.com/p/android/issues/detail?id=48126 for more.
The solution?
Pre-requisites:
Rooted device (don't have to be unlocked) with USB debugging enabled.
MicroSD card formatted as ext4 (inserted)
Terminal app, such as Android Terminal Emulator https://play.google.com/store/apps/details?id=jackpal.androidterm&hl=en
Familiarity with adb.
Step 1 - Fix adb localhost.
Open terminal and type the commands:
Code:
su
setprop service.adb.tcp.port 5555
adb kill-server
stop adbd
start adbd
HOME=/sdcard adb start-server
adb connect localhost
adb -s localhost:5555 shell
exit
stop adbd
cat /sdcard/.android/adbkey.pub >> /data/misc/adb/adb_keys
start adbd
Step 2 - Install scripts.
Please note that the script msd2.sh has to be modified if your device uses different partition names.
To get list of partition names available run command:
Code:
adb shell cat /proc/partitions
There are 3 (very simple) scripts:
sd.sh is just a convenience so that you don't have to type su everytime.
It calls msd1.sh which takes care of starting localhost adb in a reliable way.
It then executes msd2.sh in adb shell, which actually does the mounting trickery.
To install scripts, download the zip file below, open terminal, unzip the archive and change into msd directory.
Then connect your phone to your PC and run the following commands:
Code:
adb push sd.sh /sdcard/sd.sh
adb push msd1.sh /sdcard/msd1.sh
adb push msd2.sh /sdcard/msd2.sh
adb shell
su
mount -o rw,remount /system
cp sd.sh /system/xbin/
cp msd1.sh /system/xbin/
cp msd2.sh /system/xbin/
chmod 755 /system/xbin/*.sh
mount -o ro,remount /system
exit
exit
Step 3 - Profit.
In terminal app run command:
Code:
sd.sh
There will be some messages in notifications bar and then you will be asked if it is ok to restart MTP application. Click Ok.
That should be it.
Note that this last command will have to be executed every time device reboots (see obstacle #1).
You can automate it using Script Manager app from marketplace. In this case, ask Script Manager to run msd1.sh instead, marking it as Root script.
Disclaimers
I've developed and tested this procedure on Samsung Galaxy S4 Active phone from ATT.
Should work for any other Android 4.2 device.
The steps outlined are non-destructive if done properly and should not affect any other functionality, yet obviously I do not assume any responsibility for you damaging your device in the process.
It is a good idea to read the linked articles before performing the procedure, to get a better understanding of what is actually going on.
Motorola Droid 4 (xt894)
Hello!
if you have a Motorola Droid 4 you need to change the third row in "msd2.sh" from
"mount -t ext4 /dev/block/mmcblk1p1 /storage/extSdCard && sleep 5 && /system/bin/vold" to
"mount -t ext4 /dev/block/mmcblk0p1 /storage/sdcard1 && sleep 5 && /system/bin/vold"
in order to get it to work, thanks for the guide!
Best Regards
/ Rasmus
It works well on TW based MIUI
It works well on TW based MIUI, so many many thanks!!!
But I still have the permission problems mentioned.
AOSP based MIUI is ext4 compatibile out of the box, and without permission problems.
This trick is amazing, but the permission issue make it useless ...
I can not shot a picture and than have to manually change the permission of tehf ile in order to view it on the gallery ...
Is there a definititive solution?
My lg l3 e400..sd card not mounted
to sashavasco:
sir, pls help configuring my phone...the codes u've given at the top part seems to work accordingly..but after when i entered the command
"cat /sdcard/.android/adbkey.pub >> /data/misc/adb/adb_keys"
it says: "no such file or directory"
can you point out the problem of the device plss...
i appriciate your response..
my phone s LG L3 E400..CYANOGENMOD 9..external sd wont mount on my device
sashavasko said:
Why?
Step 1 - Fix adb localhost.
Open terminal and type the commands:
Code:
su
setprop service.adb.tcp.port 5555
adb kill-server
stop adbd
start adbd
HOME=/sdcard adb start-server
adb connect localhost
adb -s localhost:5555 shell
exit
stop adbd
cat /sdcard/.android/adbkey.pub >> /data/misc/adb/adb_keys
start adbd
Click to expand...
Click to collapse
I am getting an error here: adb -s localhost:5555 shell stating device offline. I've done this 6 times now, and it's always the same error
Galaxy S4 i337 NC1 Rooted
kevp75 said:
I am getting an error here: adb -s localhost:5555 shell stating device offline. I've done this 6 times now, and it's always the same error
Galaxy S4 i337 NC1 Rooted
Click to expand...
Click to collapse
the same for me...
same error "unable to connect to local host:5555"
rooted Asus memo-7 build ME173X_US_user_4.2.404152_20140714 release-keys. But thanks for the heads up on Cyanogenmod.
>>If MicroSD card is mounted manually in the way that vold can see it, re-running vold will properly report it to the Volume Manager and it will be recognized and utilized by apps.
Re-running vold crashes it ("Segmentation fault") if sdcard is already mounted in ext4. If not, it restarts gracefully.
Stock android 4.4.2. AFAIK, vold must inform userspace stuff that sdcard is available, without it, android do not see any sdcard at all...
What can be done here?
p.s. Is there anywhere patched or recompiled vold which supports ext4?
Gigionaytor said:
the same for me...
Click to expand...
Click to collapse
same here too. Please help.
ZeroBubble said:
same here too. Please help.
Click to expand...
Click to collapse
Same error!
I had to modify terminal commands a bit to allow me to connect properly. Only moving the "start adbd" command down because the key needed to be appended to "adb_keys" before starting the service back up.
Code:
su
setprop service.adb.tcp.port 5555
adb kill-server
stop adbd
HOME=/sdcard adb start-server
cat /sdcard/.android/adbkey.pub >> /data/misc/adb/adb_keys
start adbd
adb connect localhost
adb -s localhost:5555 shell
exit
I'm also still dealing with the "msd1.sh" script execution consistently asking about my fingerprint and not remembering it. If I don't press "continue" quick enough it claims the resource is busy, which prompted me to also change the msd1.sh script sleep from 2 to 5. I have gotten the notification that msd2.sh has been elevated, which seems like it ran, but my partition still doesn't get mounted, even though I've got the right one from the /proc/partitions output.
Another note, because I had BusyBox installed, I needed to prepend "busybox" (no quotes) to the mount command in the msd2.sh or else that wouldn't work either.
Anyone have thoughts?
I followed DemisesAngel suggestion. There was no error this time but nothing happens when running any of the 3 scripts. I tried mmcblk1 and mmcblk1p1, also changed microsd path to match, /MicroSD, but nothing works. Even with manual ext4 mount command ...
Clicking mount in settings still results in incompatible storage and file explorer shows no sdcard.
Edit: Set permissions, script will run but nothing mounts unsupported file system ...
Error directory already exist
I folllow the steps but i.think I meaaes up.
When u run through DemiseAngel scripts
At:
car /sdcard/.android/adbkey.pub >> /
Error:tmp-mkish:cant create /:Is a directory
To I attempt to find and rm it, or would that mess something up
Rca RCT677W22
I dont know if this thread is closed but I have one simple question, can I somehow partition sdcard and have a little space for music and other stuff, and to use ext4 partition alongside with this, lets say "visible" partition ( I mean on windows).
WrathBand said:
I dont know if this thread is closed but I have one simple question, can I somehow partition sdcard and have a little space for music and other stuff, and to use ext4 partition alongside with this, lets say "visible" partition ( I mean on windows).
Click to expand...
Click to collapse
First, I have been able to create a formatted partition of less than the full size of an SD card. I did this because my Android seems to have issues with anything larger than 16GB and all I had lying around was a 64GB. I did not try to do anything with the remaining space. Maybe it could work, maybe not. I would have my doubts.
Second, thanks for this discussion. Here is what "kind of" works on my Android 5.1 TV computer:
su -mm -c mount -t ext4 -o noatime /dev/block/mmcblk0p1 /storage/sdcard1 && sleep 5 && /system/bin/vold
chown -R root:sdcard_r /storage/sdcard1
chmod 771 /storage/sdcard1
I say "kind of" because this is still not seen as a true, external storage card by Android or file manager apps (and the like). However, all apps can read/write/traverse the folder tree and do what they need to. You do NOT have to be root except to do this. As things stand for me now, I have to re-issue this upon every re-start of Android. But using Tasker makes this pretty easy to accomplish.
long as a problem remains so do this thread ! . Well i am on 7.x and wonder if the op would post a method or even approach for getting a
Code:
ext4
partitioned sdcard so that vold is well aware of that and will mount sdcardfs on that giving all apps access to the partitions. I have 3 of these on my card .
Is there a method to auto mount ext4 partition on external SD that works on lineageOS 17.1 on S4 i9506?

[Q] [KatKiss 4.4.2 rev 019] Mount bind only running in root env

This "problem" (google claims security measure, but it shouldn't be so hard to disable) exists on at least nexus devices as well. I have found questions posted on small forums elsewhere; however, there were for early, all around buggy builds that had problems galore.
The issue I have is that when following the standard procedure to mount -o bind, the mount is only visible to root, which would be fine and dandy if anyone else could run the mount command.
>su
#mkdir -p /storage/emulated/legacy/Manga
#mount -o bind /storage/sdcard1/Manga /storage/emulated/legacy/Manga/
#mount
spits out everything mounted including the bind
#ls /storage/emulated/legacy/Manga
lists all my manga as it should
#exit
>mount
lists everything except bind
>ls /storage/emulated/legacy/Manga
>
I don't know what the exact terminology is for this, whether it's runlevel or userspace or what, but nothing except for root has privileges to run mount -o bind, and nothing but root can see it if it does.
This is not detrimental in this circumstance as I just don't want to lose all of my Perfect Viewer completed marks, but there are some instances where this could be quite necessary.
I read it could be an SELinux issue, so I disabled the <insert unpleasant word describing a nagging hinderance>, and it didn't affect much.
I'm not sure what to try from here, an alternative to cross-fs linking on a multi-application scope would be fine but symlinking isn't it.
I found out this is not a KatKiss problem, but a supersu problem. SuperSU has a wip multiuser implementation, and it has a mount master argument, which commonly is quite unstable. So my problem is now (on rev 23) that KatKiss seems to refuse letting superuser change apps (chainfire -> chainsdd).
KatKiss has many startup scripts that handle SuperSU. I gave up on trying to switch apps. What I have figured out is that due to the way 4.4 works with the sdcard as an emulated disk (whatever that means) and doesn't actually have direct access to it, but instead it routes it through a daemon binary that controls the sdcard. So until that is configurable somehow, mounting anything inside /sdcard reliably appears to be impossible. For an extra bit of "usefulness" as Operation Iron Fist calls it, I'll attach an init.d script for 4.4 that recreates the stock /Removable directory system. Just remove the ".txt" and place it in /system/etc/init.d, if you don't have the directory, use ROM Toolbox or SManager to run it as root on startup.

Categories

Resources