[Q] -viperboy- HTC One Disable system rw flash fail - Sprint HTC One (M7)

Just got HTC One launch day.
Immediately began work on rooting the phone. Installed TWRP and got root access for the most part, but found that this did not give rw access to the system partition.
Found viperboy's post regarding this issue. When I tried to flash the zip file "Sprint_One_Root_Disable_System_RW_Protection.zip" the phone rebooted. After, SuperSU was no longer installed nor was su for root access. TWRP is now no longer able to flash anything at all. The phone still works fine but I seem to be back to ground zero.
Just hoping someone else has encountered this.
- Update -
Upon further exploring I found that all the files were pushed to the android system and that the su file still exists in /system/xbin/, but There is no longer permission to run said command. I tried manually re-pushing all the files but no change.
It seems if anything (even TWRP) tries to access the system partition the phone reboots.

Related

[Q] Cant get MB886 into custom recovery

I have been trying for hours to install a custom recovery in my AT&T Atrix HD (mb886) phone. Every time I go through the flashing process, no matter what recovery I try, and whether I use the stock SDK fastboot or one of alternatives, when I try to boot into recovery, I get an ominous error message about how my bootloader is unlocked, and Motorola and ATT will not honor the warranty, and so on. However - it then always boots into the normal startup. I did try holding down both volume buttons when I cycled the power button, and I briefly (about 5 seconds, maybe?) got what looked like a text-based recovery menu, but then the error message popped up again, and I'm back to ????? is going on.
Any help? I have read a number of article/forums online, but all assume that your recovery is working so you can install a custom ROM. I have done this on a couple of Android tablets in the past, so I know I'm not totally stupid, but I can't seem to get past the AT&T nanny.
How can I fix this?
Android 4.1.1
System 98.4.20.MB886.ATT.en.US
If I remember correctly, I had to rename install-recovery.sh (or something like that) by adding .bak to the end of the filename. Boot into fastboot, flash your recovery, and try to boot into recovery.
Nevadadave said:
I have been trying for hours to install a custom recovery in my AT&T Atrix HD (mb886) phone. Every time I go through the flashing process, no matter what recovery I try, and whether I use the stock SDK fastboot or one of alternatives, when I try to boot into recovery, I get an ominous error message about how my bootloader is unlocked, and Motorola and ATT will not honor the warranty, and so on. However - it then always boots into the normal startup. I did try holding down both volume buttons when I cycled the power button, and I briefly (about 5 seconds, maybe?) got what looked like a text-based recovery menu, but then the error message popped up again, and I'm back to ????? is going on.
Any help? I have read a number of article/forums online, but all assume that your recovery is working so you can install a custom ROM. I have done this on a couple of Android tablets in the past, so I know I'm not totally stupid, but I can't seem to get past the AT&T nanny.
How can I fix this?
Android 4.1.1
System 98.4.20.MB886.ATT.en.US
Click to expand...
Click to collapse
That warning you see is just the boot logo and can be gotten rid of by flashing a custom logo. Stock Moto boot logos on this platform have two images -- one for locked and another for unlocked bootloaders. It's a non issue and just confirms that the bootloader is unlocked.
You accessed that menu by powering up and holding both volumes and power. Volume down scrolls and volume up selects in there.
To install a custom recovery, boot into fastboot mode and flash it with fastboot. Mythtools, maybe BootMyHD, can do that for you if you don't have moto-fastboot binary or are unable to run "moto-fastboot flash recovery recovery.img" with your phone plugged into a rear usb port in fastboot mode with a terminal/command prompt open to the directory with the recovery image.
More questions
audit13, how do I access that file to change the name? I tried again this morning, and after doing the boot to recovery key sequence, I got a menu, and before it went away, I selected boot to recovery, but got the dead android icon. I tried several other options and it just did a normal boot. Still stumped.
skeevydude, I have tried installing a couple of custom recoveries, using fastboot, and when I do, I get a message saying all went well, but when I boot up, it either does the "failed Android" or just boots up normally. I'll try Mythtools and BootMyHD, but it seems that there is something else going on here.
Nevadadave said:
audit13, how do I access that file to change the name? I tried again this morning, and after doing the boot to recovery key sequence, I got a menu, and before it went away, I selected boot to recovery, but got the dead android icon. I tried several other options and it just did a normal boot. Still stumped.
skeevydude, I have tried installing a couple of custom recoveries, using fastboot, and when I do, I get a message saying all went well, but when I boot up, it either does the "failed Android" or just boots up normally. I'll try Mythtools and BootMyHD, but it seems that there is something else going on here.
Click to expand...
Click to collapse
Maybe something else going on. Are you flashing using the rear usb port of your PC? It really does matter.
To answer the first question about install-recovery, once you're rooted, use Root Explorer or something similar, mount /system as read/write, go to /system/etc, rename the file install-recovery.sh to install-recovery.sh.bak, and reboot.
If you have adb installed on your PC you can do
adb root
adb shell mount -o remount,rw /system
adb shell cp /system/etc/install-recovery.sh /system/etc/install-recovery.sh.bak
adb shell rm /system/etc/install-recovery.sh
adb reboot
I'll try it and see what happens
skeevydude said:
Maybe something else going on. Are you flashing using the rear usb port of your PC? It really does matter.
To answer the first question about install-recovery, once you're rooted, use Root Explorer or something similar, mount /system as read/write, go to /system/etc, rename the file install-recovery.sh to install-recovery.sh.bak, and reboot.
If you have adb installed on your PC you can do
adb root
adb shell mount -o remount,rw /system
adb shell cp /system/etc/install-recovery.sh /system/etc/install-recovery.sh.bak
adb shell rm /system/etc/install-recovery.sh
adb reboot
Click to expand...
Click to collapse
OK, I did not know about USB port preference. I'll try it and see what happens. Thanks!
No joy
Nevadadave said:
OK, I did not know about USB port preference. I'll try it and see what happens. Thanks!
Click to expand...
Click to collapse
Well, I tried front and back USB ports, in all cases, adb says "adb can't run as root in production builds". adb sees the phone, but about all I can do is start fastboot, but once there adb doesn't work until I reboot.
I tried running the remount command, but got a message, "Operation not permitted" I'm assuming because I could not root into the phone. Titanium backup shows that the phone is, indeed, rooted.
Stuck again...
Install Root Explorer, find the file, add .bak to the end, reboot to fastboot, install Philz, boot into recovery.
audit13 said:
Install Root Explorer, find the file, add .bak to the end, reboot to fastboot, install Philz, boot into recovery.
Click to expand...
Click to collapse
I tried that, got a "Rename failed". It appears that the file is set to read-only, and the Root Explorer doesn't seem to have a way to change that. I'm open to additional suggestions. I had thought that root access would allow me to do things like change file permissions, but I cannot do this with Root Explorer. Everything I try, I get a message that it can't be done, because the file system is read-only.
At the top of the file list, it says "mounted as r/o, but nothing shows to change that, although I see num,erous web posts that claim that there should be a "R/W" button somewhere.
Better luck
Nevadadave said:
Well, I tried front and back USB ports, in all cases, adb says "adb can't run as root in production builds". adb sees the phone, but about all I can do is start fastboot, but once there adb doesn't work until I reboot.
I tried running the remount command, but got a message, "Operation not permitted" I'm assuming because I could not root into the phone. Titanium backup shows that the phone is, indeed, rooted.
Stuck again...
Click to expand...
Click to collapse
OK, I dropped Root Explorer and loaded ES File Explorer. ES Explorer allowed me to change the file R/W permissions and rename the stock recovery file.
adb would still not allow me to get to root, so I loaded adbd insecure from the Play store, and that gave me root access. I flashed the CWR 6.0.4.4, and so far (fingers crossed) I was able to boot to CWM and I'm backing up my system now. Hopefully, the next update will be to say that I have a new ROM installed...
Nevadadave said:
OK, I dropped Root Explorer and loaded ES File Explorer. ES Explorer allowed me to change the file R/W permissions and rename the stock recovery file.
adb would still not allow me to get to root, so I loaded adbd insecure from the Play store, and that gave me root access. I flashed the CWR 6.0.4.4, and so far (fingers crossed) I was able to boot to CWM and I'm backing up my system now. Hopefully, the next update will be to say that I have a new ROM installed...
Click to expand...
Click to collapse
All you need to gain r/w access is to click on the ro button to change it to read/write.
audit13 said:
All you need to gain r/w access is to click on the ro button to change it to read/write.
Click to expand...
Click to collapse
Audit13 I'm not sure what you mean here. Root Explorer never indicated a "R/O" button or any other way to change permissions, it just kept saying that the file system was write-protected. ES File Explorer was very easily able to change this and allow me to remove the automatic recovery overwrite.
So, at this point, I have Cyanogen 10.2 running on my Atrix HD, and although I have found a few glitches, it is faster and it is now MINE!
Nevadadave said:
Audit13 I'm not sure what you mean here. Root Explorer never indicated a "R/O" button or any other way to change permissions, it just kept saying that the file system was write-protected. ES File Explorer was very easily able to change this and allow me to remove the automatic recovery overwrite.
So, at this point, I have Cyanogen 10.2 running on my Atrix HD, and although I have found a few glitches, it is faster and it is now MINE!
Click to expand...
Click to collapse
In Root Explorer, You'll see the words "Mounted as r/o". To the right will be a button that says "Mount R/W".
I went with Validus 5.1 over 10.2.

[Q] TWRP 2.8.7.1 - Cannot see files under /sdcard

Hi guys, I've been using TWRP for a long time, but this one is a bit of a head-scratcher for me. I'm running stock Android MMB29S on my N6, unlocked bootloader, and unrooted. I decided to install TWRP 2.8.7.1 and then root it with Beta supersu 2.66. The fastboot flashing of TWRP went fine the first time, and I opted to leave TWRP read-only. But I didn't install supersu right afterwards. Rather, I rebooted into system first, and downloaded supersu. When I attempted to reboot into recovery again to flash supersu, I'm finding out that stock recovery has overwritten TWRP. Ok, no problem, I re-flashed TWRP, but this time I allowed it to modify the system (instead of read-only). Now, I'm unable to see anything under /sdcard or any of the other folders when I go to flash the zip. Under the "Mount" Menu, I see that only "cache" is checked. Didn't want to mess with anything there.
Rebooting into system now gives me the "Your device is corrupted..." spiel, which I'm not concerned about, but I really do need to be able to see files in TWRP. Would re-installing TWRP be an option or even a different version of it?
mount system. if its still empty after that, use twrp to locate the right place in the filesystem. yes, like a file explorer app twrp can act
The solution to my problem was actually as simple as just removing the lockscreen passcode. I was wondering why TWRP was asking for that in the first place. Once I removed the lockscreen PIN and went back into TWRP I was able to see all the files. Happily rooted now. :good:

Behaves as if it has TWO /system partitions

I recently got my Nexus 6 back with a new (to me) motherboard installed. After allowing multiple OTA updates to the current (March 2017) firmware, getting my apps installed and setup, etc., I went to make some changes to the /system partition.
Knowing that /system is mounted read-only normally, I downloaded the current copies of adb and fastboot, as well as TWRP. I booted my phone into fastboot, ran fastboot boot twrp.img, mounted /system, and used adb to make a change. I then booted normally, but didn't see the effect of the change, so I checked with adb, and the change wasn't there. OK, that could be a few things, so I went back into TWRP, and -- this is where it gets weird -- saw the change.
Yes, if I boot up on TWRP and mount /system, I see whatever changes I have made to the /system partition visible when running TWRP, but when I boot the stock bootloader, I don't see any of them. It is behaving as if there are two /system partitions: one visible when booting with TWRP and the other visible when booting with stock.
I've never seen this before. Any thoughts?
NoelJB said:
...
Knowing that /system is mounted read-only normally, I downloaded the current copies of adb and fastboot, as well as TWRP. .
I've never seen this before. Any thoughts?
Click to expand...
Click to collapse
Is TWRP the latest version 3.1.0.0?
Did you use a recent rootexplorer?
For instance prev, version ES file explorer does not work with recent Android.
When booting TWRP-recovery normally the system partition needs to be mounted manually.
Why do you use adb to make changes to system, instead of the file manager of TWRP?
> Is TWRP the latest version 3.1.0.0?
Yes.
> Did you use a recent rootexplorer? For instance prev, version ES file explorer does not work with recent Android.
Not rooted, hence using TWRP to edit the /system partition.
> When booting TWRP-recovery normally the system partition needs to be mounted manually.
Yes, hence my comment about mounting /system.
> Why do you use adb to make changes to system, instead of the file manager of TWRP?
What would it matter? The contents of /system shown by the TWRP file manager are identical to those shown by adb shell. My problem is that the contents don't match what I see when booting with the stock bootloader. As I said, it is as if TWRP were showing one /system partition, and the stock bootloader were showing another.
NoelJB said:
... adb instead of the file manager of TWRP.....
What would it matter?.
Click to expand...
Click to collapse
.... using a shell and an 2nd device is rather different. I prefer the filemanager; it's more direct.
Sorry no more thoughts....
Lemme guess...
You're on the bone stock kernel...
If that's the case... There's a thing that keeps stuff from working... I wish I could be more help but... It's been almost 2 years since I've seen this...
I THINK you can flash any other kernel and it will solve your problem... Or maybe one of the root solutions would do it too...
Sent from my Nexus 6 using Tapatalk
did you solve it?

XT1900-7 no permissions in TWRP

Greetings.
could not really find anything within this forum that would describe my problem adequately, so I will just ask here, hoping someone had the same.
I recently received this device (XT1900-7), successfully unlocked bootloader and went on to boot and install TWRP.
Booting it temporarily is childs play, but doing anything else within TWRP seems to be pointless. Flashing the TWRP installer results in a bootloop when trying to access TWRP.
To flash LineageOS 16.0 a persistent installation of TWRP is not required (right?) so I really do not care that much about it failing to install properly, I will be just fine with flashing LineageOS from the temporary TWRP.
Here comes the trouble though. I have not yet tried to wipe anything, as I suspect it of not working properly in my case.
Trying to run a backup, something I always prefer to do before wiping and flashing anything, is not possible due to permissions error - it fails to create the TWRP folder. I am also unable to push anything via adb to /sdcard and the contents of /sdcard are rather confusing. There are folders whose names contain random numbers and letters. Checking inside these folders shows that they seem to have an unlimited amount of subfolders.
Opening a terminal in TWRP (as well as adb shell) throws linker warnings (/system/etc/ld.config.txt seems to be missing for /sbin/toolbox) about it being unable to read said file. It does so with every command I submit to the shell.
When I unmount /data I am able to push to the device (though still not to /sdcard - again missing permissions).
Also when switching to slot B it gives me "Error changing bootloader boot slot to B" with "Failed to mount /vendor (invalid argument)".
Relevant data:
I have not done a firmware update, it is still running on Android 7.1.1 and I do not intend to do an update since the stock rom is to be replaced by LineageOS anyways.
As mentionend: XT1900-7, 64GB mmc, 4GB DRAM and so on...
I am able to push files to /tmp for example which allows me to flash the twrp-installer.
Edit: TWRP version is the latest available (3.3.1-0)
Is there anyone who had similar issues and might provide help?
No need to ELI5, I'm at least experienced in Linux, not that much in Android. Previous phone was a G4 Play which was pretty straightforward (unlock, fastboot flash recovery and flash away whatever I felt like).
If you need any more information I will be happy to provide it.
Thanks in advance to anybody that can give me a hint or clue to solve this.
Well. Nvm. It works flawlessly with twrp-3.2.1-1. Seems to be something with latest version. Thx anyways

Question Easiest way to just modify etc/hosts.

For digital wellbeing reasons* I'd like to lock myself out a handful of websites by redirecting them to local.
I've tried to follow the guideline using Magisk, only to nearly brick my phone (a friend had to flash the original image). What is the easiest way to simply modify the hosts file without changing too much?
lg lngo
I've been using this Magisk module for a long to block Ads. Just edit etc/hosts and install!
That means you recommend to simply follow this guideline and install Magisk including this plugin?
It may be that the websites you are concerned about are blocked in the hostlist that AdAway would install. If your phone is rooted, consider installing AdAway. I think it can only be installed using F-Droid.
@Rafiul Bari Chowdhury: I edited the hosts file in your zipped module, run it in Magisk: worked fine, after restart I saw the changes (shell cat /etc/hosts). However, after locking it again the device is bricked. I'm looking how to flash the factory image again.
Any ideas what went wrong? Is it not possible to edit root files and relock the phone again so it seems "normal"?
Edit: re-unlocked the phone and it works again. Reset OS (and hosts file), but works. When locked again: "Can't find valid operating system". Any ideas?
Fnokrer said:
@Rafiul Bari Chowdhury: I edited the hosts file in your zipped module, run it in Magisk: worked fine, after restart I saw the changes (shell cat /etc/hosts). However, after locking it again the device is bricked. I'm looking how to flash the factory image again.
Any ideas what went wrong? Is it not possible to edit root files and relock the phone again so it seems "normal"?
Edit: re-unlocked the phone and it works again. Reset OS, but works. When locked again: "Can't find valid operating system". Any ideas?
Click to expand...
Click to collapse
i doubt the phone is bricked. it is either locked up that you can force off by holding down power + vol up + vol down all 3 at the same time for 15 to 30 seconds to force off. you can get into boot loader by power + vol down. then flash the stock image from https://developers.google.com/android/images#barbet
make sure you have the google usb drivers and use chrome installed or nothing work when trying to flash back to stock.
it pretty hard to mess up the bootloader section of the phone. it can be done but you would have to flash a corrupt image to the boot partition.
i use to use adaway https://github.com/AdAway/AdAway/releases/tag/v5.12.0 if i remember right you can modify the host file using that apk
I did id all over again: Flashed latest firmware (barbet-sp2a.220305.012), installed Magisk acc. to Guideline here in the forum. Same result.
Phone wasn't bricked, Boot loader worked fine all the time, sorry for unprecise description. Editing the hosts file simply doesn't last (maybe I have to change the file on partition A and b??!) and 2nd, if locked again the phone won't find the OS.
Gives me two questions:
1.) how actually does the script from Rafiul Bari Chowdhury work, how can it replace the hosts file while I can't do it manually due to read-only partition.
2.) If I change both partitions, A and B, would the change last after I lock the phone again? Then how do I do it and how do I make sure the OS is found.
Is it even possible to change system files and go back into "locked" mode again without any other impacts?
Fnokrer said:
I did id all over again: Flashed latest firmware (barbet-sp2a.220305.012), installed Magisk acc. to Guideline here in the forum. Same result.
Phone wasn't bricked, Boot loader worked fine all the time, sorry for unprecise description. Editing the hosts file simply doesn't last (maybe I have to change the file on partition A and b??!) and 2nd, if locked again the phone won't find the OS.
Gives me two questions:
1.) how actually does the script from Rafiul Bari Chowdhury work, how can it replace the hosts file while I can't do it manually due to read-only partition.
2.) If I change both partitions, A and B, would the change last after I lock the phone again? Then how do I do it and how do I make sure the OS is found.
Is it even possible to change system files and go back into "locked" mode again without any other impacts?
Click to expand...
Click to collapse
did you try adb shell then su ? you can try chmod -R 775 or 777 a file to give full permisions. you probably could get away with just 660 for read and write without execute command. so chmod -R 660 (filename) should allow you to change the file permisions and allow you to write to the file.
as for relocking. i usually leave mine unlocked. i think if you relock it does a verification process of the rom. not sure on that one. maybe a developer can answer that question.
Hey I am trying to figure this out. did OP ever find an answer?
For me, I am on a pixel 5 with android 13, a phone I got from Backmarket. It is an "Unlocked" pixel 5. I thought this would make things easier. According to an article, pixel 5 is "one of the easiest phones to root"
:/
The phone is not A/B, only A
I pulled the magisk image using adb to the file with platform tools
I tried sideloading a hosts file through ADB but I got Error 21.
I have tried rooting the phone with Magisk boot.img but it fails because in Fastboot "Remote: failed to write to partition not found" and in FastbootD there is also an error.
SU is not found when I attempt to use the adb shell. It is Greyed out in the Magisk App
I have mounted the /system with Recovery but then I receive "Remote: no such file or directory"
I am using the most current Platform tools.
Any advice? Really I just want to edit the hosts file
Gnome_chomsky said:
Hey I am trying to figure this out. did OP ever find an answer?
For me, I am on a pixel 5 with android 13, a phone I got from Backmarket. It is an "Unlocked" pixel 5. I thought this would make things easier. According to an article, pixel 5 is "one of the easiest phones to root"
:/
The phone is not A/B, only A
I pulled the magisk image using adb to the file with platform tools
I tried sideloading a hosts file through ADB but I got Error 21.
I have tried rooting the phone with Magisk boot.img but it fails because in Fastboot "Remote: failed to write to partition not found" and in FastbootD there is also an error.
SU is not found when I attempt to use the adb shell. It is Greyed out in the Magisk App
I have mounted the /system with Recovery but then I receive "Remote: no such file or directory"
I am using the most current Platform tools.
Any advice? Really I just want to edit the hosts file
Click to expand...
Click to collapse
Don't do this method...
Once you're rooted with Magisk, open Magisk and go to settings and tap Systemless hosts. This installs the Systemless Hosts module. Then you can just use an app like AdAway (https://f-droid.org/en/packages/org.adaway/) and block the domains you want there.

Categories

Resources