I am going to bring this up to the group. I am looking for the method to block the OTA updates. I enjoy my rooted Evo phones. It is a freedom I enjoy and plan to protect.
I am getting tired of pressing cancel every day. If I want to update, I want to be the one to control it.
I have been looking for a method to disable the OTA update prompts. From the board, I was able to find this.
Thread 6450334
I have tried it on my Evo with no luck
adb shell
# mount -o remount,rw -t yaffs2 /dev/block/mtdblock4 /system
mount -o remount,rw -t yaffs2 /dev/block/mtdblock4 /system
# cd /etc/security
cd /etc/security
# mv otacerts.zip otacerts.zip.bak
mv otacerts.zip otacerts.zip.bak
failed on 'otacerts.zip' - Directory not empty
# ls
ls
otacerts.zip
cacerts.bks
# mv otacerts.zip otacerts.zip.bak
mv otacerts.zip otacerts.zip.bak
failed on 'otacerts.zip' - Directory not empty
Anyone know why otacerts.zip is in use and cannot be renamed. I did some different methods, but no luck.
Has someone done this before or knows of a better method of blocking the OTA updates from Sprint. I am open for a solution.
check with chuckhriczko, he successfully completed what you are trying to do. Also check out his ROM...it already has this action implemented into the ROM
techie4971 said:
I am going to bring this up to the group. I am looking for the method to block the OTA updates. I enjoy my rooted Evo phones. It is a freedom I enjoy and plan to protect.
I am getting tired of pressing cancel every day. If I want to update, I want to be the one to control it.
I have been looking for a method to disable the OTA update prompts. From the board, I was able to find this.
Thread 6450334
I have tried it on my Evo with no luck
adb shell
# mount -o remount,rw -t yaffs2 /dev/block/mtdblock4 /system
mount -o remount,rw -t yaffs2 /dev/block/mtdblock4 /system
# cd /etc/security
cd /etc/security
# mv otacerts.zip otacerts.zip.bak
mv otacerts.zip otacerts.zip.bak
failed on 'otacerts.zip' - Directory not empty
# ls
ls
otacerts.zip
cacerts.bks
# mv otacerts.zip otacerts.zip.bak
mv otacerts.zip otacerts.zip.bak
failed on 'otacerts.zip' - Directory not empty
Anyone know why otacerts.zip is in use and cannot be renamed. I did some different methods, but no luck.
Has someone done this before or knows of a better method of blocking the OTA updates from Sprint. I am open for a solution.
Click to expand...
Click to collapse
I am assuming you are in the system when doing this? If so, you need to back out into recovery and do it. We currently don't have write access to the system partition while Android is running. Only in recovery. Highly recommend you look up Rom Manager on the market and use that to install the "fake-flash" recovery. It's truly the best recovery we have atm.
But you are doing it correctly except you wrote cd /etc/security. It should be /system/etc/security. The following is all you need.
Code:
adb shell
mount -o remount,rw -t yaffs2 /dev/block/mtdblock4 /system
cd /system/etc/security
mv otacerts.zip otacerts.zip.bak
You can ls to make sure it worked but that should do it. Reboot and voila. Never press cancel again.
chuckhriczko said:
But you are doing it correctly except you wrote cd /etc/security. It should be /system/etc/security. The following is all you need.
Click to expand...
Click to collapse
from my brief experience last night with this, /etc is a symlink to /system, so /etc or /system/etc is the exact same thing, doesn't matter.
i took the build.prop in the PC36IMG.zip which shows itself with test-keys, removed those and used release-keys, and the OTA appeared when it hadn't before!
now it downloaded the OTA but verification failed. i had to copy over ota-certs.zip from a stock EVO and those allowed the OTA update to pass verification.
if you wanted to reverse the process and prevent OTA updates from downloading, you can manually change your build.prop to show you as already having .6 software package loaded and it won't show any OTA available anymore.
it might be better to actually load the .6 software though which will adjust the build.prop, but thats my personal recommendation and not related to your request. im also running PC36IMG.zip on .1 software and also get the OTA update prompt but i plan on loading .6 software soon.
another factor to consider is the radio version also ...
joeykrim said:
from my brief experience last night with this, /etc is a symlink to /system, so /etc or /system/etc is the exact same thing, doesn't matter.
i took the build.prop in the PC36IMG.zip which shows itself with test-keys, removed those and used release-keys, and the OTA appeared when it hadn't before!
now it downloaded the OTA but verification failed. i had to copy over ota-certs.zip from a stock EVO and those allowed the OTA update to pass verification.
if you wanted to reverse the process and prevent OTA updates from downloading, you can manually change your build.prop to show you as already having .6 software package loaded and it won't show any OTA available anymore.
it might be better to actually load the .6 software though which will adjust the build.prop, but thats my personal recommendation and not related to your request. im also running PC36IMG.zip on .1 software and also get the OTA update prompt but i plan on loading .6 software soon.
another factor to consider is the radio version also ...
Click to expand...
Click to collapse
Oh I didn't know about the symlink. Good call.
Good point. I forgot to mention I did change the build number in the build.prop to be .6 instead of .1 so maybe that helps.
chuckhriczko,
I first tried it in system and no luck, then I went to recovery. I figured the active system partition was the issue.
Now I know I was in the wrong place. I will get Rom Manager and take a look at your customized ROM.
Nice job on the ROM. Love to say goodbye to those Sprint Apps.
Thanks for the quick response.
C:\Program Files (x86)\android-sdk\tools>adb shell
# mount -o remount,rw -t yaffs2 /dev/block/mtdblock4 /system
mount -o remount,rw -t yaffs2 /dev/block/mtdblock4 /system
mount: mounting /dev/block/mtdblock4 on /system failed: Invalid argument
# exit
exit
C:\Program Files (x86)\android-sdk\tools>adb devices
List of devices attached
HT05VHL13839 recovery
C:\Program Files (x86)\android-sdk\tools>
I get stuck there. I am rebooted into recovery mode and properly attached as you can tell from the adb devices command. Any ideas?
Problem solved:
adb shell
mount /dev/block/mtdblock4 /system
cd /system/etc/security
mv otacerts.zip otacerts.zip.bak
chuckhriczko said:
But you are doing it correctly except you wrote cd /etc/security. It should be /system/etc/security. The following is all you need.
Code:
adb shell
mount -o remount,rw -t yaffs2 /dev/block/mtdblock4 /system
cd /system/etc/security
mv otacerts.zip otacerts.zip.bak
You can ls to make sure it worked but that should do it. Reboot and voila. Never press cancel again.
Click to expand...
Click to collapse
Will this work on the Incredible as well?
SteelH said:
C:\Program Files (x86)\android-sdk\tools>adb shell
# mount -o remount,rw -t yaffs2 /dev/block/mtdblock4 /system
mount -o remount,rw -t yaffs2 /dev/block/mtdblock4 /system
mount: mounting /dev/block/mtdblock4 on /system failed: Invalid argument
# exit
exit
C:\Program Files (x86)\android-sdk\tools>adb devices
List of devices attached
HT05VHL13839 recovery
C:\Program Files (x86)\android-sdk\tools>
I get stuck there. I am rebooted into recovery mode and properly attached as you can tell from the adb devices command. Any ideas?
Problem solved:
adb shell
mount /dev/block/mtdblock4 /system
cd /system/etc/security
mv otacerts.zip otacerts.zip.bak
Click to expand...
Click to collapse
So to reverse this could I use cmd
mv otacerts.zip.bak otacerts.zip
??
Thanks.
How about:
adb shell
su
pm disable com.google.android.gsf/com.google.android.gsf.update.SystemUpdateActivity
pm disable com.google.android.gsf/com.google.android.gsf.update.SystemUpdateService
pm disable com.google.android.gsf/com.google.android.gsf.update.SystemUpdateService\$Receiver
This should disable the OTA updates without removing any files from system.
Related
I seem to be frequently flashing or messing up my G1 so I decided to write some shell scripts to help out but they seem to only half work if at all. Actually I'm not sure what they did because they displayed no output.
This script is supposed to backup the default init.rc and mountd.conf files then replace the existing ones with the modified ones.
Though it does not work.
Code:
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
mkdir /system/sd
busybox cp -a /system/etc/mountd.conf /sdcard/recovery/mountd.conf.bak
busybox cp -a /system/init.rc /sdcard/recovery/init.rc.bak
busybox cp -a /sdcard/recovery/mountd.conf /system/etc/mountd.conf
busybox cp -a /sdcard/recovery/init.rc /system/init.rc
then this is the next set to move the apks and the program caches which doesn't work.
Code:
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
busybox cp -a /data/app /system/sd
rm -r /data/app
ln -s /system/sd/app /data/app
busybox cp -a /data/app-private /system/sd/app-private
rm -r /data/app-private
ln -s /system/sd/app-private /data/app-private
rm -R /data/data/com.android.browser/cache/webviewCache
ln -s /sdcard/cache/webviewCache /data/data/com.android.browser/cache/webviewCache
rm -R /data/data/com.android.vending/cache
ln -s /sdcard/cache/marketCache /data/data/com.android.vending/cache
rm -R /data/data/com.google.android.street/cache
ln -s /sdcard/cache/streetCache /data/data/com.google.android.street/cache
reboot
Plus both run and output no errors either. Who knows what problems I'll run into because I have no idea what they actually did.
Anyone see anything wrong here?
Well I'll help you.
1-) After you back up the mount and stuff and put the other back, you MUST reboot before keep going.
2-)After boot then you can copy the files or make the symlink. I suggest you dont copy the app to the sdcard on teh scrip since they should be there already. so do that manually once then the script just delete the folders and then crate the symlinmks.
I have a menu that does that and I have got some experience as why it works one day and not the other.
Rafase282 said:
Well I'll help you.
1-) After you back up the mount and stuff and put the other back, you MUST reboot before keep going.
Click to expand...
Click to collapse
I took the reboot out after the mountd.conf and init.rc did not appear to copy due to the lack of /dev/mmcblk0p2 hoping to see some sort of output why it did not run. Unfortunately it runs and backs up the files but does not replace them with the modded ones.
Rafase282 said:
2-)After boot then you can copy the files or make the symlink. I suggest you dont copy the app to the sdcard on teh scrip since they should be there already. so do that manually once then the script just delete the folders and then crate the symlinmks.
Click to expand...
Click to collapse
Not copying the apps is a good idea, modified the script to not do so.
Rafase282 said:
I have a menu that does that and I have got some experience as why it works one day and not the other.
Click to expand...
Click to collapse
Does Android require that you do a chmod on all shell scripts first?
On Debian I usually just use sudo sh ./ and it runs the script w/o changing anything on the file permissions so I figured Android would be similar if I just ran them as root. Still I see a lot of people requiring a chmod 777 on any guide referring to running shell scripts.
I will try that and report back with my findings. Thanks for replying.
Does Android require that you do a chmod on all shell scripts first? I just have to type m oon anywhere in the androud shell and my scripts run, for that i put it on /system/bin and do a chmod 4755 to the file. it is still needed to type su before you run the script.
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
mkdir /system/sd
cp /sdcard/media/Data/mountd.conf /system/etc/mountd.conf
cp /sdcard/media/Data/init.rc /system/init.rc
Thats my code for copying the modified files to the right place. So maybe you should try that.
Oh for androoid you dont unless you put it on /system/bin then you will have to use sude and sometiems it still wont run due to lack or permisions so is better to do a chmod 4755
Well I made the changes suggested and did a chmod on all the files prior to running but with no luck.
The odd thing is if I use the shell scripts as a guide list it works perfectly but if I try to launch them as a shell script all sorts of strange undesirable things happen to my phone.
The time consumed trying to use the scripts and recover from what happens from what they do out weight the effects of typing everything in.
joshtheitguy said:
Well I made the changes suggested and did a chmod on all the files prior to running but with no luck.
The odd thing is if I use the shell scripts as a guide list it works perfectly but if I try to launch them as a shell script all sorts of strange undesirable things happen to my phone.
The time consumed trying to use the scripts and recover from what happens from what they do out weight the effects of typing everything in.
Click to expand...
Click to collapse
you can only run the script once .. when the "ln -s" has already been done it has to be undone before trying to run the script again .. otherwise you would be copying the files onto themselves .. not sure if you've tried running it more than once
LucidREM said:
you can only run the script once .. when the "ln -s" has already been done it has to be undone before trying to run the script again .. otherwise you would be copying the files onto themselves .. not sure if you've tried running it more than once
Click to expand...
Click to collapse
These scripts were intended for my usage after a system restore from a update.zip file which wipes /system in the process.
My intentions were to:
1. remount the fs rw
2. copy the original init and mountd files to the sd then copy the modified to their respective places in the system folders then reboot
3. reboot then create the sym links appropriately then move my caches too
Well unfortunately the only thing that works is the backing up of the original init and mountd files.
joshtheitguy said:
These scripts were intended for my usage after a system restore from a update.zip file which wipes /system in the process.
My intentions were to:
1. remount the fs rw
2. copy the original init and mountd files to the sd then copy the modified to their respective places in the system folders then reboot
3. reboot then create the sym links appropriately then move my caches too
Well unfortunately the only thing that works is the backing up of the original init and mountd files.
Click to expand...
Click to collapse
yes .. but you can't create the sym links when they already exist .. running the update.zip only wipes the /system .. not /data .. if the links were there before the update.zip they will be there after
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 tried all kinds of syntax, and now I'm here. What am I doing wrong? Thanks
Try:
mount -o remount,rw /system
The remount option automatically looks up the info for /system so you shouldn't have to bother with the details.
Hmm, I tried that thanks, and I still got 'Usage: mount [-r] [-w] [-o options] [-t type] device directory'
Hmm, I can't think of any reason that wouldn't work but it sounds like your phone is locked down pretty tight. Do you know if others have been able to remount /system?
What version of busybox do you have? Maybe you could try updating it. There are one or two free busybox updater apps on the market, if you can use them.
Have you tried just 'adb remount'?
Does the mount command require busybox? Do you have that properly installed?
That requires adbd itself to be run in root mode (this is different from being rooted on the phone) & you could do that only on insecure boot image. mount/unmount both happen to come from the busybox package. It would be hard to contemplate that Motorola actually changed that but nothing would stop them from. You could try updating the busybox utility onboard your phone. There is nothing with your usage of the command - it would work the same way on my Nexus S
I do have Busybox in /system/xbin. Thinking that maybe the xbin directory may need to have the rewrite permissions, I changed its permissions to 777 using the chmod command in phone Terminal. I did the remount command 'mount -o remount,rw -t ext3 /dev/block/mmcblk0p12 /system' in shell on the phone, and I THOUGHT I BRICKED! Haha, but it just turned off, and I rebooted to find that my button backlights were turned off...which I fixed with the brightness file.
Anyhow, I think I'll just use the chmod command because that seems to work. NeoA, I think you are right about the adbd to run in root mode, because I've seen discussions about that before.
Thanks for the feedback guys! At least I know I wasn't having syntax errors to say the least
So did it remount it as rw? The mount command was running before, just giving errors, but if it's running that should mean the permissions were ok.
try
Code:
busybox mount -o remount,rw /system
Fr4gg0r said:
try
busybox mount -o remount,rw /system
Click to expand...
Click to collapse
"mount: can't find /system/app in /proc/mounts"
but
Code:
busybox chmod 777 /system
is good enough for me, for now
marlasinger said:
Code:
busybox chmod 777 /system
is good enough for me, for now
Click to expand...
Click to collapse
Using chmod to change permissions won't actually give you rw access to the system partition since it won't change whether it's mounted as read-only or r/w. To be able to run the chmod command, the system must already have been mounted as r/w or you would have received a "Read-only file system" error. It must have gotten mounted as read/write when the remount command caused a reboot. You can see how /system is mounted by just typing "mount" in adb shell which will list all of the mounted partitions.
Hey guys,
Loaded BAMF 1.5 yesterday and have been enjoying the ROM thus far. However, I've been trying to push my custom widget.txt to the \system\customize\ folder so I can have my own power controls in the notifcation bar. I have tried the Mount rw/ro app from the Market, and have also tried mounting rw using adb (mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system).
Each time, when I use the command: adb push widget.txt /system/customize/ I get the error: failed to copy 'widget.txt' to '\system\customize\': Read-only file system
Where am I going wrong?
Seth
sethschmautz said:
Hey guys,
Loaded BAMF 1.5 yesterday and have been enjoying the ROM thus far. However, I've been trying to push my custom widget.txt to the \system\customize\ folder so I can have my own power controls in the notifcation bar. I have tried the Mount rw/ro app from the Market, and have also tried mounting rw using adb (mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system).
Each time, when I use the command: adb push widget.txt /system/customize/ I get the error: failed to copy 'widget.txt' to '\system\customize\': Read-only file system
Where am I going wrong?
Seth
Click to expand...
Click to collapse
I'm pretty sure the TB is using EXT3, not YAFFS2.
Try
Code:
mount -o remount,rw -t ext3 /dev/block/mtdblock3 /system
Even easier, assuming you have busybox. busybox mount isn't as lame as the standard mount which is provided, so you don't have to tell it as much, it can figure things out on its own:
busybox mount -o remount,rw /system
busybox mount -o remount,ro /system
Click to expand...
Click to collapse
even easier.
sysrw
sysro
Doesn't anyone ever read the first post of my rom?
I'm an idiot. Thanks for the ext3 vs yaffs2 reminder.
I'll try busybox at some point also to check
And to Adrynalyne, apparently I didn't read the first post...my bad. Thanks for reading mine, though. I'll pay closer attention in the future.
Seth
Hi guys,
If any one getting error while remounting system partition in rw mode using adb, please follow these steps :
C:\Android\android-sdk-windows\tools> adb remount
remount failed: No such file or directory
SOLUTION:
Connect to your device usb adb: [FOR ROOTED DEVICES ONLY]
C:\Android\android-sdk-windows\tools> adb shell
$su
#mount -o remount,rw /dev/stl12 /system
(do your desired work like copy some files on system/media folder , then remount the system partition in ro mode again)
# cd /
#mount -o remount,ro /dev/stl12 /system
#exit
$exit
Thats all
FYI if you want to know the dev partitions mounted on your device :
C:\Android\android-sdk-windows\tools> adb shell
$ su
# mount
cheers
Did you map the other partitions by any chance? I'd like to be able to make a full backup to eventually be flashed back with Heimdall or ODIN. I already have a system.rfs (stock + root) that could be made in a tar image.
I've see tutorials for other Samsung phones but these need to be adapted to our exact setup. I haven't found anything generic enough to know how to go about mapping things.
It might also help those who flashed GT-S5660 ROMs on the Bell Canada GT-S5660M, as the screen brightness issues sound very much like kernel issues to me...
I can't quite tell what the difference is between stl and bml either. (I'll probably try dd'ing the different blocks, except stl5, and peek around with a hex editor...)
Goodbye,
Darkshado
I did not write these scripts. I claim zero credit for them. I pulled them from somewhere (another ROM or a mod for another phone, I can't remember.) I am simply passing on the information.
Here is a way you can add two scripts to change your /system from read-only to read-write and visa-versa. I am not going to hold your hand through this one. If you don't understand it, then don't do it. This is only for those that want a command line script to set their system filesystem to RW and back to RO in a simple way. This is only for people that are comfortable with the command prompt and adb shell to begin with. I am not responsible if you brick your phone.
I'll say it again. I am not responsible if you brick your phone.
Save a text file called: ro that contains:
Code:
#!/system/bin/sh
fs=`mount | grep system | awk '{print $5}'`
mount -t $fs -o remount,ro /dev/block/stl9 /system
Save a text file called: rw that contains:
Code:
#!/system/bin/sh
fs=`mount | grep system | awk '{print $5}'`
mount -t $fs -o remount,rw /dev/block/stl9 /system
Then open a command prompt and change directory to where you have the ro and rw files located. Notice that the ro and rw files DO NOT have any file extension on them. These should NOT show up as text files with Notepad icons when using Windows Explorer. If they do, then you need to take the .txt off the end of the filename. If you can't see it, then you have to be sure to show the hidden extensions.
The following steps assumes that you either have adb.exe and related files in the same directory as your rw and ro scripts OR you have added adb.exe to the PATH environment variable on your computer system.
When you are ready do this:
Code:
adb push rw /data/local/tmp/rw
adb push ro /data/local/tmp/ro
adb shell chmod 0755 /data/local/tmp/rw
adb shell
/data/local/tmp/rw
cp /data/local/tmp/rw /system/xbin/rw
cp /data/local/tmp/ro /system/xbin/ro
chmod 0755 /system/xbin/ro
chmod 0755 /system/xbin/rw
/system/xbin/ro
reboot
Notice that the last command will reboot your phone. This is only necessary if you want these scripts to be usable immediately. When you have rebooted, you should be able to type the command: rw to set your /system to read-write and ro to set your /system to read-only
Personally, I skip that last "reboot" command and I just run /system/xbin/ro manually until the next time I reboot my phone anyway.
These two scripts should be compatible with what ever file system you have on /system since if you read the script it actually checks the file system type first and then uses that response in the next line.
Use at your own risk, though.
EDIT: On Gingerbread, I had to use /dev/block/stl10 instead of /dev/block/stl9 above.