Hi,
I'm new to Android, so please bear with me. I just recently picked up a Nexus 4 to play with. It came with 4.2 on it, and I have done the OTA updates to 4.3 and then 4.4. I decided to root the device and followed the instructions here. That all seems to work OK and I can get root using adb.
The first thing I tried to do next was change the hostname from android-something to a hostname that I could remember. I did a bunch of searching here and found the following commands suggested:
Code:
getprop net.hostname
setprop net.hostname
If I run these commands, the hostname changes. The problem is once I reboot, the name is back to what it was originally. I even tried remounting /system as rw, as I saw in some other post, and running the command again like this:
Code:
mount -o remount,rw -t ext4 /dev/block/mmcblk0p1 /system
setprop net.hostname NEWNAME
mount -o remount,ro -t ext4 /dev/block/mmcblk0p1 /system
I tried rebooting after that and the name change still doesn't stick. What am I doing wrong?
bigdweeb said:
Hi,
I'm new to Android, so please bear with me. I just recently picked up a Nexus 4 to play with. It came with 4.2 on it, and I have done the OTA updates to 4.3 and then 4.4. I decided to root the device and followed the instructions here. That all seems to work OK and I can get root using adb.
The first thing I tried to do next was change the hostname from android-something to a hostname that I could remember. I did a bunch of searching here and found the following commands suggested:
Code:
getprop net.hostname
setprop net.hostname
If I run these commands, the hostname changes. The problem is once I reboot, the name is back to what it was originally. I even tried remounting /system as rw, as I saw in some other post, and running the command again like this:
Code:
mount -o remount,rw -t ext4 /dev/block/mmcblk0p1 /system
setprop net.hostname NEWNAME
mount -o remount,ro -t ext4 /dev/block/mmcblk0p1 /system
I tried rebooting after that and the name change still doesn't stick. What am I doing wrong?
Click to expand...
Click to collapse
It shouldn't be changed
Anyway, try this https://play.google.com/store/apps/details?id=com.tiranodroid.change.hostname&hl=es
luiseteyo said:
It shouldn't be changed
Anyway, try this https://play.google.com/store/apps/details?id=com.tiranodroid.change.hostname&hl=es
Click to expand...
Click to collapse
Thanks for the reply. I had seen that there were apps for this, but I figured it would work on the cli if an app could do it.
Why do you say it shouldn't be changed? I've never had a device that you weren't supposed to change the name of.
Related
I'v just rooted my Tab, I don't know if I'm losing the plot but I can't figure out how to write to the system partition? I can't find any apps that will work (for free) and "adb remount" doesn't work. "remount failed: Operation not permitted"
Am I missing something?
alias_neo said:
I'v just rooted my Tab, I don't know if I'm losing the plot but I can't figure out how to write to the system partition? I can't find any apps that will work (for free) and "adb remount" doesn't work. "remount failed: Operation not permitted"
Am I missing something?
Click to expand...
Click to collapse
adb remount doesn't work because /default.prop needs ro.secure set to 0 (not 1). This can't be changed easily without modifying the boot.img.
However, you can remount /system as a r/w filesystem using ADB by opening a shell and:
Code:
su
mount -o rw,remount -t ext3 /dev/block/mmcblk0p1 /system
or
Code:
su
mount -o rw,remount -t ext3 /dev/mtdblock3 /system
Regards,
Dave
foxmeister said:
adb remount doesn't work because /default.prop needs ro.secure set to 0 (not 1). This can't be changed easily without modifying the boot.img.
However, you can remount /system as a r/w filesystem using ADB by opening a shell and:
Code:
su
mount -o rw,remount -t ext3 /dev/block/mmcblk0p1 /system
or
Code:
su
mount -o rw,remount -t ext3 /dev/mtdblock3 /system
Regards,
Dave
Click to expand...
Click to collapse
Thanks, so which should I actually use, the former or the latter?
I've personally used the first command, but I saw the second one on another thread and it seems to work as well.
To be honest, I think it's ignoring the parameter anyway.
Regards,
Dave
hi guys,
i hope someone can help me out with this;
i have rooted my DHD with Visionairy and all works fine, except...
doh...i forgot to check the option to set rw on /system partition
now i have tried the following from Terminal App;
#su
#mount -o rw -t yaffs2/dev/block/mtdblock3 /system
i read somewhere that this should set rw on /system but it didn't work;
then i tried the 'Unroot Now' option in Visionairy but that doesn't work either....
how can i set rw on my /system partition??
thnx in advance!
odin
Hey mate, I had the same problem. Took a mistake while entering mount information before I figured out where I went wrong.
Try entering 'mount' by itself, you'll get all your relivant information. You need to find '/system' in the stings of information and then which 'mmcblk0p*' (the * will be a number, your folder might be something different, like mtdblock3) it is attached to.
I think some ROM's use different locations, as I was told something simmilar to you, which wasn't working, I'm no expert so I had to fiddle and look to find the right string.
For example mine goes;
/dev/block/mmcblk0p25 on /system type ext3 (ro,relatime,errors=continue,data=or)
This told me I had to enter the following string to set it to rw;
mount -o remount,rw -t yaffs2 /dev/block/mmcblk0p25 /system
This seemed to work for me, but I need to enter it every time I restart the handset and want to change something in the /system folder.
I have an Atrix on AT&T. Which means there's a bootloader encryption, and the carrier prevents non-market apk installations, which I have resolved since my phone is rooted and I have changed the boot animation already.
In order to do these things, I found Ghost Commander that would let me chmod my system directories...which is fine, but I feel kind of gimped that I can't do it on terminal.
Basically, what I want to be able to do is remount /system as rw using terminal.
This method doesn't work on both terminal and emulator on my phone. I have done:
Terminal:
Code:
sudo su
cd [sdk directory]
./adb devices
./adb shell
su
mount -o remount,rw -t ext3 /dev/block/mmcblk0p12 /system
and this is where I get stuck because I just get an Invalid argument error.
Here is some info about my sytem -
Usage: mount [-r] [-w] [-o options] [-t type] device directory
/dev/block/mmcblk0p12 /system ext3 ro,noatime,nodiratime, data=ordered 0 0
Been searching for the answers for a while now, and now I'm here. What am I doing wrong? Thanks
there
Code:
mount -o remount,rw /dev/mmcblk0p12 /system
back
Code:
mount -o remount,ro /dev/mmcblk0p12 /system
Hmm, well at least I didn't get any errors this time.
I didn't get a confirmation or that it did anything at all. Is that normal?
Run mount with no parameters and look for the line with that device name, should see rw in that line instead of ro.
Sent from my MB860 using XDA App
Thanks guys, but I resorted to busybox chmod command instead lol
I tried this and got no errors, and using cat /proc/mounts/ I see the path as rw. But when I try to copy I still get the read only file system error.
**Lol, I had the phone in usb storage mode and had to switch it to Windows Media Sync**
I am trying to copy modules to /system/lib/modules/. I have rooted with Gingerbreak. I have superuser permissions both with adb and from terminal emulator. I have changed system to rw both from TE and with ADB. I used this command: mount -o remount,rw -t ext4 /dev/block/mmcblk0p3 system/ What am I doing wrong. System shows up as mounted rw when checking with cat /proc/mounts
Well, that basically works for me, but unless you did a typo on the "system/" only in the forums you got it slightly wrong.
su
mount -o remount,rw /dev/block/mmcblk0p3 /system
Click to expand...
Click to collapse
You don't need the "-t ext4" option.
Do I need busybox? It wasn't a typo. I get "permission denied" when I try to push the file. Not "access denied" as in the name. If it makes any difference. I have tried to cp from adb shell also. Same problem.
After installing busybox all went fine.
I'm rooted via the standard root, with CWM installed.
When I attempt to mount /system as read-write with mount -o rw,remount /dev/block/system /system, about 10 seconds later it remounts as -ro.
This means I can't change anything on there, is anyone else having this issue and is there a fix?
MrLadoodle said:
I'm rooted via the standard root, with CWM installed.
When I attempt to mount /system as read-write with mount -o rw,remount /dev/block/system /system, about 10 seconds later it remounts as -ro.
This means I can't change anything on there, is anyone else having this issue and is there a fix?
Click to expand...
Click to collapse
I had a similar problem once and I fixed it by restoring an old nandroid backup, I was never able to figure out what caused it.
I had the same issue when I installed the ota2 update, then tried to reroot. I think I was able to change permissions by installing, then opening superuser app.
Im on OTA1.
Hello,
I've got the same problem. With the following programs i have read/write access to /system only for seconds:
Esexplorer, file manager hd, root explorer, total commander , especially: adb shell
Strange thing: i have no problems with permissons when using x-plore or titanium backup.
(Currently OTA2)
Installing superuser again does not fix anything.
I have the same problem here (OTA2) :-/
A workaround I found is to chain the remount-command with the command you want to execute on /system:
Code:
$ su
# mount -o rw,remount -t ext4 /dev/block/mmcblk0p3 /system && cp /sdcard/Download/kernel_modules/cifs.ko /system/lib/modules/
# ls /system/lib/modules/
bcm4329.ko
cifs.ko
scsi_wait_scan.ko
Brilliant!