Jump to content

Mount /system RW fix(?)


Guest Nebril

Recommended Posts

What a smart and creative solution! Thanks a lot for all your work and effort. I will post my results.

Is it literary switching boot and recovery? If I understand correctly I can flash those zips (using terminal or some flash/zip manager) then boot up with power+vol.up like recovery and it will boot with ability to mount system R/W. I can do modifications then. Do I need to flash it back to normal (which will cause my system to be R/O again right? But the modifications stay) or can I have the phone with switched boot and recovery? I don't care if I have to boot up with power+vol.up.

Once again, thanks!

Yes that's all it's doing, anything you change when booting from recovery will stick even if you switch back afterwards
You can leave it switched if you want so long as you always boot from recovery as booting normally will take you into TWRP
Like I said though when you want to revert back you will need to flash your revert from boot first, boot into recovery and then flash the revert again.

 

Link to comment
Share on other sites

Guest Umrtvovacz

Yes that's all it's doing, anything you change when booting from recovery will stick even if you switch back afterwardsYou can leave it switched if you want so long as you always boot from recovery as booting normally will take you into TWRP
Like I said though when you want to revert back you will need to flash your revert from boot first, boot into recovery and then flash the revert again.

 

Thanks a lot.

Link to comment
Share on other sites

Update: Using the same method as ZTE ZMAX you can have TWRP installed to boot and boot installed to recovery and it works just fine
I now have RW access to /system when booting from recovery and I can switch back fairly easily by flashing them back to their original spots

It work won't 'just fine'. Write protection renders the recovery pretty much useless. You can't restore nandroid backups in case you messed up your /system and you can't use it install any ROMs either. Good thing is that you can at least use it to write TWRP back to the recovery partition which you could again use to restore your device in case you've done something stupids that makes your device unbootable (say completely remove /system/build.prop or something else).

(I don't know if it's just my device but to revert back I need to flash the revert zip twice, once from boot (meaning I have two TWRP, one on boot and another on recovery) and the second from recovery)

Likely because, in addition to /system, writing to boot partition is also prohibited.

Best and safest way is to keep TWRP where it belongs (recovery partition) and make necessary changes to /system using TWRP.

Edited by KonstaT
Link to comment
Share on other sites

Guest Umrtvovacz

Best and safest way is to keep TWRP where it belongs (recovery partition) and make necessary changes to /system using TWRP.

Can I replace my hosts file with one created/modified on different device, and if I can, how to do it in TWRP?

Edited by Umrtvovacz
Link to comment
Share on other sites

Can I replace my hosts file with one created/modified on different device, and if I can, how to do it in TWRP?

Yes, you can use hosts file created on another device.

TWRP has a file manager you can use to copy it in place (/system/etc/hosts - set permissions to 644).

Edited by KonstaT
Link to comment
Share on other sites

Guest Umrtvovacz

Yes, you can use hosts file created on another device.

IIRC TWRP has a file manager (not a TWRP user myself) you can use to copy it in place.

I will look into that. It would be awesome solution, as only thing I need to modify in system is hosts. And if I ever need to modify anything again I could use the same process.

Thanks for your help. Sorry for stupid questions.

Edited by Umrtvovacz
Link to comment
Share on other sites

  • 5 weeks later...
Guest patient81

You want to make a .img file of your boot partition first

dd if=/dev/block/bootdevice/by-name/boot of=/sdcard/boot.img

Then create your flashable zip by modifying updater-script found in TWRP (META-INF/com/google/android)

ui_print(" FLASHING BOOT.IMG TO RECOVERY PARTITION ");
package_extract_file("boot.img", "/dev/block/bootdevice/by-name/recovery");
ui_print(" FLASHING RECOVERY TO BOOT PARTITION ");
package_extract_file("recovery.img", "/dev/block/bootdevice/by-name/boot");
ui_print("DONE");

Then simply put your boot.img you created and put it into the TWRP zip so that you have both recovery.img and boot.img there

Done! That is your switcher zip that you flash when you want to modify /system files (You won't be able to boot by just holding the power button, you will have to boot into recovery by holding vol up + power)

To create a revert zip you simply copy the one you have just made and rename boot.img to recovery.img and recovery.img to boot.img

(I don't know if it's just my device but to revert back I need to flash the revert zip twice, once from boot (meaning I have two TWRP, one on boot and another on recovery) and the second from recovery)
 

Nebril, any chance you could share your switcher and revert zips so others can benefit from this? I only ask because I'm travelling at the moment and don't have access to a PC.

The constant system write protection is driving me crazy! Can't even get adaway to work despite trying all the solutions on the adaway thread. 

Link to comment
Share on other sites

Guest patient81
Rooted with mobilego and hosts stay modified after reboot (just tested)

My hosts appear to stay modified as Adaway shows that it is updated and working. However, I get ads everywhere! My root is working fine but I'm sure the system R/O is hampering me here. Has anyone made these switchable zips?

Link to comment
Share on other sites

Rooted with mobilego and hosts stay modified after reboot (just tested)

if you can root with mobilego you dont have protected system of course it stays..........

Link to comment
Share on other sites

Guest patient81
if you can root with mobilego you dont have protected system of course it stays..........

Are you saying that mobilego also alters the system partition to maintain read and write? Even after reboots?

Link to comment
Share on other sites

Guest LiNe171

The one's with only-read partition cant be rooted with mobilego..

Install kingroot or something else.. You just need root for a few minutes.. Root it, install TWRP, enter recovery mode and in recovery mode click on "Reboot system" then TWRP will ask you if you want to install SuperSU and you say yes.. If it doesnt ask you.. Download the supersu.zip from xda (version 2.46), root again, go to recovery mode and flash the supersu.zip and then you have root.

Link to comment
Share on other sites

Guest patient81
The one's with only-read partition cant be rooted with mobilego..

Install kingroot or something else.. You just need root for a few minutes.. Root it, install TWRP, enter recovery mode and in recovery mode click on "Reboot system" then TWRP will ask you if you want to install SuperSU and you say yes.. If it doesnt ask you.. Download the supersu.zip from xda (version 2.46), root again, go to recovery mode and flash the supersu.zip and then you have root.

Thanks for your input but I've had root since I got the phone, mentioned that I already have root in the above comments.

My request was if anyone has already created the zips that have been mentioned in this thread that they could share them for the rest of us?

Link to comment
Share on other sites

Guest patient81
Here is my hosts file with aggressive add blocking. Make sure you have the webserver running.

hosts

Thank you, I appreciate your help with this. I'll give your hosts file a bash.

I actually had some success with this myself today and managed to get some ads blocked. My method was;

- set Adaway to use data/data/hosts to get the most up to date list

- use twrp to mount system and delete the hosts at system/etc

- again with twrp, move the hosts from data/data/hosts to system/etc and set the correct permissions (644)

- reboot and change Adaway to use system/etc hosts

This worked and blocked most ads but I'll try your hosts and see if it's like you say, more aggressive.

I actually used twrp in a similar way to move an edited build.prop with the changed entries to allow a smooth xposed. Worked well. Sorry if that's a bit off topic.

Link to comment
Share on other sites

Guest Umrtvovacz

I actually used twrp in a similar way to move an edited build.prop with the changed entries to allow a smooth xposed. Worked well. Sorry if that's a bit off topic.

That's useful bit of info, thanks.

Link to comment
Share on other sites

  • 2 months later...
1 hour ago, Nebril said:

Update: Still works with 5.1.1 managed to install busybox, adaway and build.prop tweaks

Is there any chance you could explain on your explanation on how to do this. I'm not great with this kind of stuff, but desperately need to edit build.Prop in order to use xposed. Many thanks :) 

Link to comment
Share on other sites

Guest Textman
On 9/11/2015 at 9:43 PM, macbreakweeklyfan said:

What are you struggling with? 

 

1/ Open terminal

2/ Type "su" (enter)
 

3/ Type "mount -o remount,rw /system" (enter)

Done.

These are trivial Linux commands - there's not much TO go wrong, unless you're not rooted properly.

For me it says mount: read-only system.

 

So... s***.

Link to comment
Share on other sites

Guest cashflow67
On 12.10.2015 at 7:42 PM, LiNe171 said:

The one's with only-read partition cant be rooted with mobilego..

Install kingroot or something else.. You just need root for a few minutes.. Root it, install TWRP, enter recovery mode and in recovery mode click on "Reboot system" then TWRP will ask you if you want to install SuperSU and you say yes.. If it doesnt ask you.. Download the supersu.zip from xda (version 2.46), root again, go to recovery mode and flash the supersu.zip and then you have root.

No we don't have actually root. It LOOKS LIKE ROOTED! System rw protection fools root and never allows root thnigs on phone! Remove system apps, edit build.prop etc. can't be done! I hope f... ZTE will find a solution for this system rw problem!

Link to comment
Share on other sites

On 1/9/2016 at 2:01 PM, cashflow67 said:

No we don't have actually root. It LOOKS LIKE ROOTED! System rw protection fools root and never allows root thnigs on phone! Remove system apps, edit build.prop etc. can't be done! I hope f... ZTE will find a solution for this system rw problem!

zte won't fix that so just use twrp to do it like any sane person would...

 

Edited by kunft
Link to comment
Share on other sites

  • 1 month later...
On 13/10/2015 at 8:16 PM, patient81 said:

Thank you, I appreciate your help with this. I'll give your hosts file a bash.

I actually had some success with this myself today and managed to get some ads blocked. My method was;

- set Adaway to use data/data/hosts to get the most up to date list

- use twrp to mount system and delete the hosts at system/etc

- again with twrp, move the hosts from data/data/hosts to system/etc and set the correct permissions (644)

- reboot and change Adaway to use system/etc hosts

 

This worked and blocked most ads but I'll try your hosts and see if it's like you say, more aggressive.

 

I actually used twrp in a similar way to move an edited build.prop with the changed entries to allow a smooth xposed. Worked well. Sorry if that's a bit off topic.

Wow it worked!

Link to comment
Share on other sites

  • 2 months later...
Guest xpozitron

It might be stupid question, but if this system R/W issue is done by bootloader and there are some phones without this would not it be possible to dump the bootloader (aboot ?) from unaffected phone and flash it in aboot while in twrp recovery? And Yes I understand that messing with bootloader means possible hardbricked phones.

Link to comment
Share on other sites

Guest KonstaT
8 hours ago, xpozitron said:

It might be stupid question, but if this system R/W issue is done by bootloader and there are some phones without this would not it be possible to dump the bootloader (aboot ?) from unaffected phone and flash it in aboot while in twrp recovery? And Yes I understand that messing with bootloader means possible hardbricked phones.

Well, that was the idea but not one seems to care enough to do anything about it. This is my previous post about dumping the partitions.
http://www.modaco.com/forums/topic/376617-we-need-a-fix-for-the-system-write-protected-phones-can-anyone-help/?do=findComment&comment=2269462

'config' partition is actually the FRP (factory reset protection) partition that was enabled in 5.1 update. AFAIK no one (who has some idea what he/she is doing) has even tried if the bootloader is unlocked/unlockable after the 5.1 update. This means checking 'OEM unlock' box in developer setting, booting to bootloader, installing required fastboot driver, and trying if fastboot accepts any commands (e.g. 'fastboot oem unlock' or even simple 'fastboot reboot').

But yeah, if you have both kind of devices, you can dump the whole eMMC and NV memory (using QPST) from both devices and diff them. Might be quite difficult to find where the write protection is toggled but still possible.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.