[Q] HTC One refuses to mount /system as rw - Android Q&A, Help & Troubleshooting

Hi,
I've been Google'ing all over and now am really stuck
I have an HTC One with Android 4.2.2 installed on it and the phone is ROOTED
I want to do something really simple however, due to a puzzling Busybox install I keep getting caught out!
So here's the issue; I want to install Archlinux on the phone in a chroot... documentation is here:
<can't post link>
no probs
Though the issue I'm facing is wget can't resolve host, I try nslookup and get the internal loopback address of the phone "127.0.0.1/localhost".
This seems to be due to no resolv.conf file existing in /system/etc... using information described here:
<can't post link>
I attampted:
Code:
mount -o remount,rw -t yaffs2 /dev/block/<output from mount cmd> /system
mount -o remount,rw /system
mount -o rw,remount /proc /system
these seem to work for a while as "mount" shows /system being rw..... only after a while this seems to revert back to ro?
Additionally if I try installing anything like Busybox from Stephen Stericson the phone just crashes and reboots itself?? - using both "normal" and "smart" install methods.
Busybox X seems to work well for the current runtime, however, after reboot it's gone?
I have absolutely no idea how to solve this as I've been reading and reading and reading and the closest thing I came up with is a watchdog timer mentioned on a Sony handset but then if there is such a thing on my HTC how to find the pid to kill it?
Unfortunately standard *NIX commands don't really seem to work well, ie.
Code:
ps aux | grep watch
so I have no idea how to even begin finding it.
I have tried using various GUI apps additionally which also just reboot the phone when checking the "remount /system rw" option.
Has anyone got any advise or suggestions that could help me win the battle??
Many thanks.

.....well I hope this helps someone now but found an app called: HTC One RW which did the trick!
Busybox installed properly, nslookup worked and now running shell script to install Archlinux

Related

Using all of the NTs storage

I posted this in the nook touch forum by mistake. Please read below and let me know what you think.
One of the biggest issues I had with my nook was the 16/1GB division between content I can load and content from B&N/etc. Not being able to use that 16GB how I wanted was something I set forth to fix. Here is my solution to make this usable to non-rooted apps.
1) Root if not already rooted.
2) Make a directory inside of /data. I chose /data/usrdata.
3) remount / as RW with the command mount -o remount,rw -t rootfs rootfs / (credit to Indirect for this, as I could't find the command to do so)
4) mkdir /mnt/internal . We need somewhere to mount /data/usrdata/ and /mnt is public enough.
5) busybox mount -o bind /data/usrdata /mnt/internal. Mounts /data/usrdata to /mnt/internal.
6) For good measure, chmod 777 /mnt/internal and chmod 777 /data/usrdata.
Now, /mnt/internal should have whatever free space /data has, and should be read/write accessible from any program. A quick test with touch+terminal emulator shows new files as being created with RW permissions for all.
Alternatives: When I was initially thinking about ways to do this, my first reaction was to just open up /data to be read only to all, then have my usrdata folder be read/write all. However, I know part of android's app security model depends on some of these permissions. While I can't think of anything breaking or sensitive data being leaked, I decided against it. If anyone has any thoughts as to that scenario, I am very interested in hearing about it.
USB support: This will *not* be mountable under USB. Unfortunately you are still limited to transfering the data from a computer to the B&N internal storage or SDcard first, then moving the data internally. The problem that I see with this is similar to my understanding of the galaxy nexus situation, where the system can't unmount its /data partition and let the USB host take over. Another alternative to this could be to write an image file and mount that over usb (I've done this on my Evo, it worked so-so). Problem with that is that it really wouldn't grow/shrink with the storage. I suppose you could do some shell trickery and pipe it through gzip somehow, but that wouldn't help very much.
Let me know what you think and if you have any ways to improve this.
UPDATE: Persistance:
To make this persistant across reboots, run these commands as root:
1) mount -o rw,remount -t ext4 /dev/block/platform/mmci-omap-hs.1/by-name/system /system
2) echo mount -o remount,rw -t rootfs rootfs / >> /system/bin/clrbootcount.sh
3) echo mkdir /mnt/internal >> /system/bin/clrbootcount.sh
4) echo busybox mount -o bind /data/usrdata /mnt/internal >> /system/bin/clrbootcount.sh
5) echo mount -o remount,ro -t rootfs rootfs / >> /system/bin/clrbootcount.sh
All this does is put the following at the end of clrbootcount.sh
mount -o remount,rw -t rootfs rootfs / #Remounts root as RW. Root is regenerated at each reboot, so /mnt/internal is never going exist on a fresh startup
mkdir /mnt/internal #make /mnt/internal, see above
busybox mount -o bind /data/usrdata /mnt/internal #Binds the directory
mount -o remount,ro -t rootfs rootfs / #remounts root as RO. Unsure if this is necessary, but since it runs as RO, its probably better safe than sorry.
Thanks to eded333 for mentioning a good place for the script.
Click to expand...
Click to collapse
I was the one who wrote the script gameman. >.>'
Very nicely done.
Does Android possess a fstab? If so, could these changes (also) be made there and still be persistent?
this is a good work around
Am I understanding this correctly in that if I follow these guidelines I can move my data over to the Barnes and noble alotted storage that we were complaining about not having available?
Sent from my Nook Tablet using Tapatalk
downsay said:
Am I understanding this correctly in that if I follow these guidelines I can move my data over to the Barnes and noble alotted storage that we were complaining about not having available?
Sent from my Nook Tablet using Tapatalk
Click to expand...
Click to collapse
That is correct, from what I understand as well.
Sent from my BNTV250 using Tapatalk
liquidzoo said:
Very nicely done.
Does Android possess a fstab? If so, could these changes (also) be made there and still be persistent?
Click to expand...
Click to collapse
From what I could tell, it does, but its not the normal /etc/fstab. It looks like they have a daemon or something that mounts the sdcard and the media (1gb) drive. When I first looked at its version of the fstab, it looked like it only took a block device, which doesn't quite work for the directory binding.
downsay said:
Am I understanding this correctly in that if I follow these guidelines I can move my data over to the Barnes and noble alotted storage that we were complaining about not having available?
Click to expand...
Click to collapse
Yes that is correct. You still cannot mount it under USB, however. If you have some other way of getting the files there, however, its open as an option. I've been using swiFTP (in the market) to do that. Could also copy and move from the media/sd cards that do mount to the PC, but thats a two step process. I've thought about getting MTP setup so that you can see that folder via USB, but haven't really had a chance to look into how that would work.
*Note, when using swiFTP and other programs more than likely, you may get some file permissions errors or other odd errors about corrupt files. These are just the file permissions that the program defaulted to, and can be fixed by doing a 'chmod -R 777 /mnt/internal/'. Don't have this problem on sdcard or media because they are just FAT32 formatted, which don't support permissions.
Trying to understand ...
gameman733 said:
I posted this in the nook touch forum by mistake. Please read below and let me know what you think.
Click to expand...
Click to collapse
I don't understand the purpose of the mounts. Why not just create /data/usrdata and put your stuff in there?
I know /data has "access-only/no-read" access for non-system apps, but anything in /data/usrdata/ should be visible (and no need to modify clrbootcount.sh).
If you need "/mnt/internal" (I don't see the need for that either), why not just use a soft link (which is permanent)???
The primary reason for using the mounts was that I was originally planning on trying to mount it in a way that would ignore file permissions, but didn't know at the time that you can't do that with a bind mount. Using a simple link would be just as effective in this case.
However.. / is Read only. Even when remounted read-write, this filesystem is actually regenerated every boot. So nothing in /mnt would stay past the next restart.
The purpose for having it in /mnt (could have been anywhere, I suppose, but it seemed a little more appropriate) was for apps that can't browse /data. For example, gameboid and related programs would get to /data and show nothing, because you can't browse it as a non-rooted app. Having a symlink or bind mount elsewhere in the filesystem where they can browse helps with that. The alternative was to remove the no-browsing permissions from /data. I didn't feel comfortable with doing this, however, as I'm sure there are some security risks to doing this. It probably isn't a big deal, but since we have the tools to do it while maintaining those existing permissions, why not go ahead and do that?
Is there a solution that does not require being rooted?
[I was gonna start a thread about this 1.0 GB vs 16GB issue. Glad someone
beat me to it. ]
A day or two ago, I side-loaded a couple of movies, each about 400-MB in size,
and was surprised to notice that I had only 20% of my 1.0GB remaining.
I haven't 'bitten the bullet', and got brave enough to 'root' my Nook yet.
(Still not sure yet whether my wife will keep it, and it's an XMAS-gift for her.)
But, I'm quite fluent in Linux, so if we DO keep it, I'll definitely get around
to doing the 'root'.
Meanwhile, if anyone does find a way, without rooting, to re-allocate these
built-in assigned storage quotas, please post it in this thread.
Cheers...
gameman733 said:
The primary reason for using the mounts was that I was originally planning on trying to mount it in a way that would ignore file permissions, but didn't know at the time that you can't do that with a bind mount.
Click to expand...
Click to collapse
To solve this issue I've compiled fuse kernel module and bindfs userspace utility. Bindfs is similar to "mount -o bind" but can override permissions and ownerships. I can share how-to instruction and compiled binaries if you want

[Q] How can I mount /system as writeable in adb shell?

I thought I'd bricked my NT but it would appear that it is actually alive because it turns up with adb and I can get shell and then issue command su, but what I can't do is replace the old build.prop because file system is not writable. How do I remount it to be writeable from a shell please?
Thanks!
CelticWebSolutions said:
I thought I'd bricked my NT but it would appear that it is actually alive because it turns up with adb and I can get shell and then issue command su, but what I can't do is replace the old build.prop because file system is not writable. How do I remount it to be writeable from a shell please?
Thanks!
Click to expand...
Click to collapse
mount -o rw,remount -t ext4 /dev/block/mmcblk0p8 /system
Type mount to verify rw, make your changes
mount -o ro,remount -t ext4 /dev/block/mmcblk0p8 /system
Type mount to verify ro
Thank you!
hwong96 said:
mount -o rw,remount -t ext4 /dev/block/mmcblk0p8 /system
Type mount to verify rw, make your changes .....
Click to expand...
Click to collapse
I don't have this tablet but a phone with similar problem.
this does not work for me, although I have ROOTED phone MTK6572, android 4.2.2 ;
"/ root" gets RW, but "/system" stays RO.
I get this message:
error
"the item "system" is read only"
I have tried many apps in phone (remount system RW, FX file expl. ....), and mtkdroid-tools and ADB shell in PC.
I have tried many similar version of that command, too, inc. busybox remount. non of those work.
any ideas, what to try next?
what file or thing or item and where I need to change to get this remounting system to RW done?
it is ext4, and remountable.
I have SuperSU in phone but can't update its binaries: /system stays RO, what ever I try...
I can't change audios, anything in /system.
very annoying...
Jack_Rover said:
I don't have this tablet but a phone with similar problem.
this does not work for me, although I have ROOTED phone MTK6572, android 4.2.2 ;
"/ root" gets RW, but "/system" stays RO.
I get this message:
error
"the item "system" is read only"
I have tried many apps in phone (remount system RW, FX file expl. ....), and mtkdroid-tools and ADB shell in PC.
I have tried many similar version of that command, too, inc. busybox remount. non of those work.
any ideas, what to try next?
what file or thing or item and where I need to change to get this remounting system to RW done?
it is ext4, and remountable.
I have SuperSU in phone but can't update its binaries: /system stays RO, what ever I try...
I can't change audios, anything in /system.
very annoying...
Click to expand...
Click to collapse
I understand your frustration, however, you should try to post your question to the MTK6572 or Samsung S4 thread. Anyway, since you have asked I'll answer. The mount point for /system is different on each phone model. There is no one standard /system mount point. On the Nook Tablet and Nook Color it is mmcblk0p8. On your device it is different, so the command you tried will not work.
You need to find out what the /system mount point is for your phone.
Open terminal from phone and type su.
Press enter.
At the # prompt type cat /proc/mtd
Press enter.
Look at the output on the screen and see what the mount point is for /system.
A the the # prompt type mount -o rw,remount -t ext4 /dev/block/enteryoursystemmountpointhere /system
Note: replace enteryourmountpointhere with your mount point from the previous step.
Change /system to ro when done. Hope this works for you.
Also download root checker app to ensure you rooted properly.
hwong96 said:
I understand your frustration, however, you should try to post your question to the MTK6572 or Samsung S4 thread. ......
Click to expand...
Click to collapse
thanks for your responce.
with that "cat ..." I got : "no such file or dir"...
I know already that my mnt point is (did try already these earlier):
mount -o rw,remount /dev/block/mmcblk0p4 system
mount -o remount,rw -t ext4 /[email protected] /system
but no success, " system read only" stays, and no change.
Jack_Rover said:
thanks for your responce.
with that "cat ..." I got : "no such file or dir"...
I know already that my mnt point is (did try already these earlier):
mount -o rw,remount /dev/block/mmcblk0p4 system
mount -o remount,rw -t ext4 /[email protected] /system
but no success, " system read only" stays, and no change.
Click to expand...
Click to collapse
Did you use the root checker app to verify for proper root?
hwong96 said:
Did you use the root checker app to verify for proper root?
Click to expand...
Click to collapse
yes.
I have many apps (e.g. FX, ATools, TitaniumBup, busybox, ES, mount /system rw, SD maid, root expl., adbd insec., rootAppDel, a.s.o.) that use root rights, and phone's superSU gives the rights to them.
AT:s terminal has # prompt, so it must be root. (?)
adbd insecure's current status = binary: insecure; usb debugging: enabled.
I have earlier version SU's binaries working ok, but updating SU made this binary-update-issue: " binary update failure" and so SU-app won't open (it closes after failing binary update), though otherwise it works ok (and worked earlier until I did let G-play to update it, silly me!).
somehow my /system has been "open" i.e. RW earlier, since busybox and superSU has been installed, but now it is "stuck" to that RO-status. "/" opens, but "/system" not.
MTK Droid Root & Tools v2.5.3 (from here xdadevs) gets root shell ok, but fails when trying to install SU, busybox a.s.o. ("read-only system") - and it "crashes".
maybe kernel related? or boot loader, or .... what?
-----
btw, my apologises, that I wrote this issue to this thread, but I found my "problem" here with the search, and after posting I realized that this is "tablet area..."
so this part can be moved to better place by those who know best where to - though not to trash, anyway....
Jack_Rover said:
yes.
I have many apps (e.g. FX, ATools, TitaniumBup, busybox, ES, mount /system rw, SD maid, root expl., adbd insec., rootAppDel, a.s.o.) that use root rights, and phone's superSU gives the rights to them.
AT:s terminal has # prompt, so it must be root. (?)
adbd insecure's current status = binary: insecure; usb debugging: enabled.
I have earlier version SU's binaries working ok, but updating SU made this binary-update-issue: " binary update failure" and so SU-app won't open (it closes after failing binary update), though otherwise it works ok (and worked earlier until I did let G-play to update it, silly me!).
somehow my /system has been "open" i.e. RW earlier, since busybox and superSU has been installed, but now it is "stuck" to that RO-status. "/" opens, but "/system" not.
MTK Droid Root & Tools v2.5.3 (from here xdadevs) gets root shell ok, but fails when trying to install SU, busybox a.s.o. ("read-only system") - and it "crashes".
maybe kernel related? or boot loader, or .... what?
-----
btw, my apologises, that I wrote this issue to this thread, but I found my "problem" here with the search, and after posting I realized that this is "tablet area..."
so this part can be moved to better place by those who know best where to - though not to trash, anyway....
Click to expand...
Click to collapse
Don't know what else to suggest, except maybe contact Chainfire on G+.
.

[Q] Root Archos 70bit2 with sound

Hi,
I need to hide the system bar on Honeycomb Archos 70b. I found the solution (android.serverbox.ch/?p=306) but when I want to root the device with this (jbmm.fr/2012/04/archos-70b-it-root-s) method sound is gone. So, I tried this one (erodov.com/forums/how-root-any-android-device-manually/43325-page2) but I can't access to /UserData/local/tmp/ with nautilus system folders are hidden I guess. Well, I've tried a lot of things but nothing really works because I'm read-only on /system. Even this is not working :
Code:
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
A70b is a nightmare, everything works on A70 and I can't downgrade.
Thanks if you have any idea.
Kevin
PS. Sorry about the links, I'm not allowed to post external link, yet.

[Q] Problem with cifs & umount scripts;Same commands work fine through adb

So here's the deal. I'll start from the beginning.
I've been trying to mount my Windows drives as cifs shares on my phone. I've done this in the past with CifsManager and it's worked great. Now each time I try to use CifsManager I get either invalid argument or it shows that the share is connected, but upon closing and reopening the app it says disconnected. Same thing happens with Mount Manager.(Mount manager runs it's commands fine, with no errors, according to SuperSU, but they don't work)
I know the kernel i'm using has cifs support and I double checked to make sure that the cifs module was loaded correctly.
Upon running:
Code:
mount -o username='user',password='pass' -t cifs '//192.168.1.76/c' '/sdcard/cifs/c'
I kept getting invalid argument. I did a little research, and it appears other people on CM10/10.1 based roms have had the same issue and have had to run this instead
Code:
/system/xbin/mount -o username='user',password='pass' -t cifs '//192.168.1.76/c' '/sdcard/cifs/c'
When I do that it goes through without any errors, and the shares mount like normal.
Code:
busybox mount
Also works.
Now, after i'm finished with the drives I like to unmount them, so I use
Code:
umount /whatever/path/mounted
and everything is fine and dandy.
Which leads me to my main issue, I don't want to have to type these up on my phone every time I want to mount my shares, and I don't want to hook up to adb to mount them either, so I figured i'd just make some scripts and use SManager to add shortcuts or widgets for them.
Whenever I try and run my scripts with SManager I get invalid argument, which leads me to believe i'm making some sort of mistake in the way i'm making the scripts because the same exact commands work over adb.
I made the three following scripts:
Code:
insmod /system/lib/modules/cifs.ko
Code:
busybox mount -o username='*****',password='*****' -t cifs '//192.168.1.76/c' '/sdcard/cifs/c'
Code:
umount /sdcard/cifs/c
All three get invalid argument returned in SManager for all three.
Running this works though.
Code:
sh script.sh
tl;dr
I'm trying to make some scripts to mount my Windows drives because none of the apps on the Play Store work. When I run the commands or the scripts through adb everything works great, but using any app to execute the scripts doesn't work.
Any help or anything that would help shine some light on my issues would be greatly appreciated.
Thanks in advance!

[UPDATED] [FIXED] [TESTED by PoFolk] Azpen A729 G-Sensor problem.

I am aware that there is a problem with updating Busybox and losing your screen rotation/G-Sensor.
I don't have a way to test this, but after extensive reading this is the only thing that makes sense:
Killa said:
"I have fixed this! I went into system/bin and ran the script 'sensors.sh' and poof back to normal! Don't know if I have to run at boot or not but this is a relief."
Click to expand...
Click to collapse
THIS IS AN UNTESTED METHOD. I DON'T KNOW IF IT WILL FIX IT, YET. IF YOU HAVE THIS ISSUE, AND ARE WILLING TO TRY THIS, PLEASE LET ME KNOW BY POST OR PM. HOPE THIS HELPS.
CREDIT: http://www.freaktab.com/
and PoFolk.
Please Follow Instructions on Post #2. Big Thanks to #PoFolk.
Thanks, Mrdownboy. As you say, running the script sh /system/bin/sensor.sh will work to restore auto-rotate on an Azpen A729 whose auto-rotate feature disappeared after installation of busybox. However the effect is not immediate. After runing the sensor script you must then go into the tablet's Settings app, drill down to Accessibility, uncheck Auto-rotate (for the moment), re-check Auto-rotate, and then your screen behaves as before. Unfortunately this work-around does not carry over into reboots.
To carry over into reboots I did the following, assuming that you can ADB shell as root into your A729 and (a belated postscript) you have installed Chainfire's SuperSU Free v2.40:
Code:
# mount -o rw,remount /dev/block/NANDD /system
Confirm that your /system partition is read-write with the following:
Code:
# mount | grep system
You should see rw displayed:
Code:
/dev/block/by-name/system /system ext4 [COLOR="Red"]rw[/COLOR],relatime,data=ordered 0 0
Now the following:
Code:
# touch /system/etc/install-recovery-2.sh
# vi /system/etc/install-recovery-2.sh
You're now in the vi editor for your newly created /system/etc/install-recovery-2.sh script. Tap i once to begin inserting text. Now type the following in the vi editor window:
Code:
#!/system/bin/sh
sh /system/bin/sensors.sh
Now tap Esc key once,
: key once,
w and Enter,
: key once,
q and Enter.
You should now have returned to your command prompt. Now we turn off read-write of the /system directory:
Code:
mount -o ro,remount /dev/block/NANDD /system
Incidentally, if you're intimidated by the vi editor and have a text editor installed on the tablet, use that by all means.
Reboot your Azpen A729 tablet and confirm that auto-rotate has been restored.
-PoFolk
Thanks for the help, I've managed to fix the g-sensor in my cheapo A23 tablet following the info in this thread , but I had to add the remount commands to install-recovery-2.sh and set the correct permissions ( the file didn't exist on my tablet ) so it looks like this :
" #!/system/bin/sh
mount -o remount,rw -t ext4 /dev/block/by-name/system /system
sh /system/bin/sensors.sh
mount -o remount,ro -t ext4 /dev/block/by-name/system /system ".
Thank you again, keep up the good work.
---------- Post added at 10:15 PM ---------- Previous post was at 10:09 PM ----------
P.S. I did everything without adb, using QuickEdit after remounting /system read/write from the terminal.

Categories

Resources