Updating/Replacing system files - Hero CDMA General

Going through the steps in this thread to update the lockscreen images, I have a question about messing around with the system files.
Which is the better method?
1) While the phone is up and running, start adb shell and mount the system using this command:
Code:
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
or
2) Boot into the modified recovery screen, start adb shell and then use these steps:
Code:
mount /system
{copy, move, edit files files... whatever...}
umount /system'
reboot
Would the second method be the more correct (or cleaner) method, or does it not really matter?

You might want to replace the second part with just
Code:
{copy,move,edit,etc}
mount -o remount,ro -t yaffs2 /dev/block/mtdblock3 /system
The first step already mounts the partition so the mount in step 2 is kinda redundant. Also, a reboot can be helpful, I've not found it necessary in most cases...the phone adjusts pretty well to change usually (at least it adjusts to removal of programs or even taking rosie out and adding it back in).

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.

[Q] Writing to system?

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

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.

[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.

Mounting error

Hi,
I am unable to edit build.prop (flashing B15 and B13-chinese bootstack enabled nav bar - I want to remove it) as I can not mount /system as RW. When doing so, either via Terminal, ADB Shell or simply a file explorer app, I generally get a "Device busy" error or some other random error.
I have tried those commands so far in Shell:
mount -o remount,rw /system
mount -o remount,rw -t ext4 /dev/block/bootdevice/by-name/system /system
All commands have been tried on the three available kernels.
Any help is much appreciated!

Categories

Resources