CIFS Script on GT-I9500 GAlaxy S4 - Galaxy S 4 Q&A, Help & Troubleshooting

Hi,
So I made a script to try and mount CIFS storage to my Galaxy S4 in the system file directory at boot. I have a WIFI and a 3G version both are giving me trouble. All apps I have tried fail cause none have an option to mount a system folder.
Any ways here are my scripts:
for 3G
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
mkdir /system/cifs
mkdir /system/cifs/localMountDir
busybox mount -t cifs //IPADDRESS:445/ /system/cifs/localMountDir -o unc=\\\\IPADDRESS:445\\,username=X,password=X
was not sure if I need to specify a port (445) or not..either way I cannot connect it says no such device
WIFI script:
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
mkdir /system/cifs
mkdir /system/cifs/localMountDir
busybox mount -t cifs //192.168.0.150/b /system/cifs/localMountDir -o unc=\\\\192.168.0.150\\b,username=X,password=X
Again i tried this with & without port no luck
I have been able to connect via ANDSMB app while over wifi (not over 3 G yet) so I know the above information should connect at least when on WIFI.
Using this guys blog post for inspiration
http://www.wyattspace.com/2013/08/1...ount-cifs-network-samba-shares/#comment-28381

Related

WiFi - Ad Hoc somthings i did not understand

Hi every body !
I made my G1 connecting with Ad Hoc mode:
Code:
adb shell mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
adb push tiwlan.ini /data/misc/wifi/tiwlan.ini
adb push wpa_supplicant.conf /data/misc/wifi/wpa_supplicant.conf
adb shell mount -o ro,remount -t yaffs2 /dev/block/mtdblock3 /system
And i have made a correct tiwlan.ini and wpa_supplicant.conf, this is why it works like a charm.
Now, i have two problems:
1- After every reboot, i can't start my Wifi(no Wifi at all, it is OFF), i have to redo all that script
2- Even i made a Shell Script, noway, it works only by using the ADB. Here is a very basic script that i tried:
Code:
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
cp -f ./tiwlan.ini /data/misc/wifi/tiwlan.ini
cp -f ./wpa_supplicant.conf /data/misc/wifi/wpa_supplicant.conf
mount -o ro,remount -t yaffs2 /dev/block/mtdblock3 /system
Any idea ?
Thank you.
G1 - Cyanogen 5.0.8-N1
(Sorry for my english writing)
Hi !
UP
I didn't resolve the problem yet
A+
I don't know how much of the script you understand, but your /system partition doesn't seem to be mounted until you run that script. That doesn't seem normal, /system sounds rather important :-/ If you don't know how to undo whatever modifications you have made, I would recommend resetting your phone to factory settings. It should fix it.

mount /system with adb shell in recovery

hello, i need to restore my framework-res.apk from backup on my phone. i googled around and found some ways but they arent working. i can adb shell in while in recovery but i cant boot to android and /system isnt mounted.
i tried mount -o rw,remount /dev/block/mtdblock3 /system and mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system in adb shell and get "mount: mounting /dev/block/mtdblock3 on /system failed: Invalid argument"
also tried doing adb remount but get "remount failed: Unknown error: 0"
anyone know whats going on? i have 318 rom and streakmod recovery. sorry if this is considered android development. i dont think it is so its in streak general.
I believe /system shound be /dev/block/mtdblock6, so you should be able to use: mount -t yaffs2 /dev/block/mtdblock6 /system
yeah i just got the answer in freenode irc #dellstreak too and this did work. thank you.
[11:18pm] meralias: mount /dev/block/mtdblock6 /system
[11:21pm] meralias: actually: mount -t yaffs2 /dev/block/mtdblock6 /system
edit: [11:24pm] • meralias also goes as 'kantras'
sly.

[Q][possable solution found??][universal??] data2ext

I have made a file to mount an sdcard second partition to "/data". It needs to go in "/system/etc/init.d/". Can some have a look to tell me if it would work or not as I don't have a partition sdcard.
-Download link: http://db.tt/paxqo1b
Code:
#!/system/bin/sh
if [ -e /dev/block/platform/msm_sdcc.1/by-num/p2 ]
then
busybox mount -o rw,remount -t yaffs2 /dev/block/mtdblock10 /;
busybox umount /data;
busybox mount /dev/block/platform/msm_sdcc.1/by-num/p2 /data;
busybox chown system system /data;
busybox chmod 771 /data;
busybox mount -o ro,remount -t yaffs2 /dev/block/mtdblock10 /;
fi;
Why would you want the whole data partition on the sdcard? It will ruin it a lot quicker, and also slow the phone down if the card isn't fast enough.
Jack

[WTF][4.2.2] "mount -o remount ro /" doesn't work but "mount -o remount,ro /" does??

[WTF][4.2.2] "mount -o remount ro /" doesn't work but "mount -o remount,ro /" does??
Mod: You can delete this thread... Sorry, I was so nervous about that....
Hey Guys,
I was developing on my kernel in init.rc and I recognized that / doesn't get remounted read-only in my script.
I couldn't understand that. The command runs, but / don't get mounted ro. WTF???!
So I tested a bit and here is what I found out:
Code:
mount -o remount rw /
remounts / rw.
Code:
mount -o remount ro /
Doesn't remount / read-only.
Instead,
Code:
mount -o remount,ro /
works.
What the hell is going on here??!? I am using Android 4.2.2. Also happens with stock-kernel. Can someone confirm this?
I am pretty sure I used the old command on Android < 4.2.2 and it worked. Or?!
It doesn't matter if you use toolbox or busybox.
Thanks,
vorcers
Edit:
ahh,
Code:
mount -o remount /
remount's / rw. That solves the mystery. :silly:
This also happens on real systems. I think there is some bug in mount / the remount option. Because any word behind remount and prior / is ignored / no error. Instead, if you swap ro and remount, mount prints errors.

[MOD] extsd2internalsd - anyone got it working on s4 yet?

On my Note 2 - I use the script below in my system/etc/init.d folder which makes the phone think the microsd card is the internal drive - awesome way to overcome the 16gb limitation.
#!/system/bin/sh
sleep 5
busybox mount -o remount,rw /
busybox mount -t exfat -o umask=0000 /dev/block/vold/179:49 /mnt/sdcard
if busybox mount | busybox grep vold/179:49; then
busybox mount -o bind /data/media /mnt/extSdCard
fi
Anyone got something similar working on S4 yet (I'm waiting on my S4 to arrive)?
i'm waiting on something like this
Yes you can use folder mount from play store. Needs to be rooted first.
Sent from my GT-N7100 using xda premium
mikehayes said:
On my Note 2 - I use the script below in my system/etc/init.d folder which makes the phone think the microsd card is the internal drive - awesome way to overcome the 16gb limitation.
#!/system/bin/sh
sleep 5
busybox mount -o remount,rw /
busybox mount -t exfat -o umask=0000 /dev/block/vold/179:49 /mnt/sdcard
if busybox mount | busybox grep vold/179:49; then
busybox mount -o bind /data/media /mnt/extSdCard
fi
Anyone got something similar working on S4 yet (I'm waiting on my S4 to arrive)?
Click to expand...
Click to collapse
http://forum.xda-developers.com/showthread.php?t=2263914
thank me if i helped
the only thing i want is extsd2internalsd to work on my i9500! the hell with all this single file or folder moving. that app changes the entire cards. it worked great on my s3, and now i am looking for it for my new s4.

Categories

Resources