Question about recovery in twrp. - Galaxy Tab 2 Q&A, Help & Troubleshooting

Have a question about the mount settings in my recovery. I know that target box means it is mounted/RW and untagged is unmounted/Ro. But my /system partition keeps getting set to Ro and when i need to flash things it needs to be on RW. Is that bc my device is Samsung and thereforth has protected bootloader set? I'v been reading trough script files and think i can adjust some of them so they mount as RW instead of Ro. I know that /system is set to RO bc of safe against accidental alteration/removement. But it would be much easier to flash or install updates/programs/apps/etc that way. Hope anyone can give some advice for me.
P.S. i use the ROM Toolbox Lite Scripter bc it has a lot standard scripts already and changing them is easy. And u can just copy that script into an Terminal Emulgator thats rooted and then run it to alter/install it so u can read back whats been changed?

A. Nieveen said:
Have a question about the mount settings in my recovery. I know that target box means it is mounted/RW and untagged is unmounted/Ro. But my /system partition keeps getting set to Ro and when i need to flash things it needs to be on RW. Is that bc my device is Samsung and thereforth has protected bootloader set? I'v been reading trough script files and think i can adjust some of them so they mount as RW instead of Ro. I know that /system is set to RO bc of safe against accidental alteration/removement. But it would be much easier to flash or install updates/programs/apps/etc that way. Hope anyone can give some advice for me.
P.S. i use the ROM Toolbox Lite Scripter bc it has a lot standard scripts already and changing them is easy. And u can just copy that script into an Terminal Emulgator thats rooted and then run it to alter/install it so u can read back whats been changed
Click to expand...
Click to collapse
Usually, the ROM updater script will mount/unmount system. I do not know if that is the case here.

Related

[Q] Extracting RFS filesystem images from Linux

Does anyone have tips on extracting RFS images on a Linux box?
So far everything I've found on extracting RFS images indicated to either:
1) Use MagicISO/PowerISO - these are proprietary Windows tools, I'd prefer not to have to reboot or move to another machine
2) Mount it as a VFAT filesystem - this didn't work for me last time I tried it
Any other suggestions? It's not something I usually bother with as I'm almost always doing kernel work or working with already-extracted userland filesystems, but with all of the AT&T Gingerbread leaks coming out I'd like to be able to analyze these without waiting for someone to CWM it up.
Mount it as loop.
http://forum.xda-developers.com/showthread.php?t=751827
LinuxBozo said:
Mount it as loop.
http://forum.xda-developers.com/showthread.php?t=751827
Click to expand...
Click to collapse
That's what I tried before (see 2) above) - didn't work. Tried both autodetect and forcing vfat.
Maybe just that particular RFS image (was one of the ones from gtg's Ultimate Unbrick packages) was wonky... Will try again tonight with I3/I4.
Works Here (TM) ;-)
LinuxBozo said:
Works Here (TM) ;-)
Click to expand...
Click to collapse
Weird. Whatever RFS image I was trying to mess with last time around must've been mangled... UCKI3 mounts fine.
i missed this thread, i was messing with the kk1 leak and wanted to create a rooted package without flashing it rooting and dumping it, problem is i cant set permissions when i mount the image to a loop. i can read and write but i cant change the permissions of su to 6755 or antthin other than 0755 it just says operation not permitted. i tried to fdisk the loop and turn off dos compatibility mode which seemed to cause issues on my flash drive, though it might work but it wont stick.
any suggestions from the local gurus? im sure the fix is simple but from how much time ive spent on it it might make more sense to flash it root it and dd the rooted /system partition
Dani897 said:
i missed this thread, i was messing with the kk1 leak and wanted to create a rooted package without flashing it rooting and dumping it, problem is i cant set permissions when i mount the image to a loop. i can read and write but i cant change the permissions of su to 6755 or antthin other than 0755 it just says operation not permitted. i tried to fdisk the loop and turn off dos compatibility mode which seemed to cause issues on my flash drive, though it might work but it wont stick.
any suggestions from the local gurus? im sure the fix is simple but from how much time ive spent on it it might make more sense to flash it root it and dd the rooted /system partition
Click to expand...
Click to collapse
You can't really do anything but read only operations from vanilla linux because while RFS is VFAT under the covers, there are other things to it. Writing to it once mounted as loop will cause havoc. You would have to actually have RFS driver in the kernel to do anything other than read operations. Which means, mounting as loop on your phone, or getting RFS into your own linux kernel (not gonna happen, since it's closed source)
LinuxBozo said:
You can't really do anything but read only operations from vanilla linux because while RFS is VFAT under the covers, there are other things to it. Writing to it once mounted as loop will cause havoc. You would have to actually have RFS driver in the kernel to do anything other than read operations. Which means, mounting as loop on your phone, or getting RFS into your own linux kernel (not gonna happen, since it's closed source)
Click to expand...
Click to collapse
Ok so if I wanted to release an Odin package it would mean dumping it from my phone then. Gotcha!
Thanks.

[Q] Cant boot after changing /system attributes using CHMOD

Hi,
i was trying to change the /system permissions using adb shell... commands shown in the attached screenshot
my main purpose was to install CWM for which we need to push modified recovery into /system/bin which requires rw permissions....
to do that i used the command chmod 6 /system from root and then tried to mv recovery file from sd root to /system/bin but that failed
when i checked the /system attributes using stat -c %A /system it returned "d------rw-"
after that i tried to mount the system from shell command but failed... then the phone got hanged and when i removed the USB cable it rebooted straight into recovery...
since the ive tried to check directory listing with adb ls /system command but it returns nothing... adb ls /data also shows only 3 files... i had taken a backup of /system using adb pull but i dont knw how much that'll help...
i did not take any backups before that... was trying to install CWM so that i could take rom backup....
im not able to boot the phone normally...
i would like to know if i can go back to original state?? if not is ther any other solution like flashing a new ROM or something...??
i would like to extract contacts nd messages if possible...
System config:
- Samsung Galaxy S 4G... everything stock
- Rooted!!
thanks in advance...
chi_visor said:
Hi,
i was trying to change the /system permissions using adb shell... commands shown in the attached screenshot
my main purpose was to install CWM for which we need to push modified recovery into /system/bin which requires rw permissions....
to do that i used the command chmod 6 /system from root and then tried to mv recovery file from sd root to /system/bin but that failed
when i checked the /system attributes using stat -c %A /system it returned "d------rw-"
Click to expand...
Click to collapse
'chmod 6 /system' did what you asked it to do. chmod, on a basic level, uses three (3) sets of permissions: global, group, and user. What you effectively did was set the user permissions to rw but blanked out everything else (like chmod 006).
If you can get into the shell, do this:
chmod 755 /system
That should put it back the way it was (7 = rwx for global, 5=rx for group, 5=rx for user)
See if that helps. Report back and let me know.
Real quick; I had my permissions backward. Although you still want 755 it should've read like this:
rwx for user
rx for group
rx for global
I had them backward.
Thanks stephen_w for ur reply...
I cant get into shell when i enter adb shell it throws this message
- exec '/system/bin/sh' failed: Permission denied (13)
any idea??
chi_visor said:
Thanks stephen_w for ur reply...
I cant get into shell when i enter adb shell it throws this message
- exec '/system/bin/sh' failed: Permission denied (13)
any idea??
Click to expand...
Click to collapse
I was worried about something like that. My guess is that your best bet is to see if you can get into download mode and flash a new ROM. Were you on Froyo or GB before? If you were on Froyo & you're trying to get to GB you'll need to insure you flash a ROM with the right boot loaders first, like chadster's KG4 (http://forum.xda-developers.com/showthread.php?t=1183413).
Let me know if I can be of help.
I was worried that I would have to flash a new ROM. Not that i mind doing it but ive not backed up anything!! I'd atleast like to see my contacts somewhere... let me know if that's possible...
So there's no other way to come out of this deadlock??
Im on Froyo... If its possible to roll back to stock Froyo it'll be great... If not i'll go for GB... Ive nothing against GB but i'd like to be sure everything works the way it was b4...
Its great to know you have and understanding of my problem... thanks mate...
chi_visor said:
I was worried that I would have to flash a new ROM. Not that i mind doing it but ive not backed up anything!! I'd atleast like to see my contacts somewhere... let me know if that's possible...
So there's no other way to come out of this deadlock??
Im on Froyo... If its possible to roll back to stock Froyo it'll be great... If not i'll go for GB... Ive nothing against GB but i'd like to be sure everything works the way it was b4...
Its great to know you have and understanding of my problem... thanks mate...
Click to expand...
Click to collapse
If your contacts were set to sync with Google or your carrier, then they will sync back to your phone after you flash. Given you were on Froyo, you can grab one of the Froyo ROMs from the bible (http://forum.xda-developers.com/showthread.php?t=1117554). Those will likely be rooted, deodexed, or something along those lines. If you want pure stock, you can grab that from samfirmware.com. You'll have to register to navigate to the firmware, though. I'd post a link but it wouldn't work right. Just go to the 'mobile' link and look for the SGH-T959V stuff. Either way, KD1 was the latest Froyo out there from Samsung.
Yup... I'll check on samfirmware.com..
sad abt contacts cuz dint sync the latest ones with google...
anyway i'll try the other method...
thanks..
Sorry man. Best of luck to you. Let me know if you get it fixed.
hi stephen_w,
I downloaded the T959VUVKD1 firmware from samfirmware.com....
I used odin to flash it...
after switchin on the phone in download mode... i flashed the firmware by browsing the file in PDA and leaving PIT, BOOTLOADER, Phone and CSC blank...
the process started and after cache.fs... below it was message:Complete(Write) operation failed.... it stopped nd showed fail in red...
i held the power key for a long time but then it started to show a phone linked to the computer with a yellow exclamation sign...
what does this mean?? im not able to boot into either recovery or download mode now...
please help...
ODIN will still see it when it looks that way, so don't fret! I had similar issues before but mine was a faulty download. Try using this one. It's not 100% stock as it's been deodexed, but it should work:
http://www.multiupload.com/7L5YDG8X8V
Ya im downloading tat one... Odin is detecting nd working... so i guess re-flashing should do the trick...
Jus to confirm I should leave fields other than PDA blank rite?
Yes, PDA only & let ODIN decide what should be checked.
Sent from my SGH-T959V using XDA App
Up and running jus like b4...
Thanks bro...
No worries; glad you're working again!

[Q] Any way to overcome write protection of /system?

I unlocked bootloader, flashed recovery, flashed root. Things looked almost sweet and colorful, but here suddenly appears ugly bug (or feature?)
It is not possible to write anything to /system partition.
Ok, not exactly "impossible". It is possible. You remount partition for rw access and can write files, delete files, rename files. You can do whatever you want. But once you reboot, all changes magically disappear.
Which is pretty cool on the one hand, since nothing can write to system even after getting root access.
On the other hand, even if I want to write there, I have to reboot into recovery for that.
Does anyone know how to change this behavior?
SamePaul said:
I unlocked bootloader, flashed recovery, flashed root. Things looked almost sweet and colorful, but here suddenly appears ugly bug (or feature?)
It is not possible to write anything to /system partition.
Ok, not exactly "impossible". It is possible. You remount partition for rw access and can write files, delete files, rename files. You can do whatever you want. But once you reboot, all changes magically disappear.
Which is pretty cool on the one hand, since nothing can write to system even after getting root access.
On the other hand, even if I want to write there, I have to reboot into recovery for that.
Does anyone know how to change this behavior?
Click to expand...
Click to collapse
You need to flash a kernel with /system write enabled. There are stock kernels in the Development section that will help you.

[Completed] [Q] Modify build.prop

I have a Nexus 6 developer edition non rooted phone (build LRX210, phone from Google unsubsidized and not a carrier version). All my other Nexus phones I have rooted and put on a custom rom but this one I am trying to understand more about Android. I am a programmer but I have only done small test programs since I don't have any projects developing for a phone otherwise I would know more... Thanks in advance.
My questions are :
1) I want to modify the build.prop (or any file that is r/o) file but the file I assume is r/o and I can not modify it. How do I modify it? I have the developer tools installed and I have not tried to run "adb shell mount -o remount rw /system" to mount the drive to allow edit access.
2) I just don't understand the purpose of the rooting, etc unless you are putting a custom rom on etc. Am I missing something? A lot of people have said that they have rooted to gain access but I don't see the purpose. Can someone tell me why (besides enhancements in the operating system/roms)?
Thanks in advance
flaalh said:
I have a Nexus 6 developer edition non rooted phone (build LRX210, phone from Google unsubsidized and not a carrier version). All my other Nexus phones I have rooted and put on a custom rom but this one I am trying to understand more about Android. I am a programmer but I have only done small test programs since I don't have any projects developing for a phone otherwise I would know more... Thanks in advance.
My questions are :
1) I want to modify the build.prop (or any file that is r/o) file but the file I assume is r/o and I can not modify it. How do I modify it? I have the developer tools installed and I have not tried to run "adb shell mount -o remount rw /system" to mount the drive to allow edit access.
2) I just don't understand the purpose of the rooting, etc unless you are putting a custom rom on etc. Am I missing something? A lot of people have said that they have rooted to gain access but I don't see the purpose. Can someone tell me why (besides enhancements in the operating system/roms)?
Thanks in advance
Click to expand...
Click to collapse
Rooting Enables User To Access System Files. You Can Do Anything With System.
If You Want To Make Changes In Build.prop You Need To Root Your Phone , Install SuperUser And Then Make Changes

Magisk and /Systempartition rw???

Hey, thank you!
Yes, I really have some very important questions for someone who knows their stuff!
So: I have an almost unknown smartphone, a Beafon X5. With Android 7.0.
A great device, just for one.. "Modder" like me, a bit problematic, because absolutely no custom software can be found for it...
But now I've managed to trying Rootaccess For the device.. With your Awesome app, Mtk Easy root and magisk.
My questions :
# can I somehow change the /system/ directory to rwx 7777 for me? Because now it doesn't work, just because of the systemless root. (at least I think) The chown/chmod commands Not working.
It will be" read-only file system" every time printed. I just want to replace the boot animation.
# Question 2:
Why can I only use after every reboot, mtk-Easy-root again from new, to activate magisk?? Why didnt work magisk, Although the SU is insatlled? Only if the mtk script has been run before, I can use the superuser in the magisk Manager Serve.
Have you an idea for this Problem?
Thank you, and best wishes from germany!
by Felix
Rootbbit said:
Hey, thank you!
Yes, I really have some very important questions for someone who knows their stuff!
So: I have an almost unknown smartphone, a Beafon X5. With Android 7.0.
A great device, just for one.. "Modder" like me, a bit problematic, because absolutely no custom software can be found for it...
But now I've managed to trying Rootaccess For the device.. With your Awesome app, Mtk Easy root and magisk.
My questions :
# can I somehow change the /system/ directory to rwx 7777 for me? Because now it doesn't work, just because of the systemless root. (at least I think) The chown/chmod commands Not working.
It will be" read-only file system" every time printed. I just want to replace the boot animation.
# Question 2:
Why can I only use after every reboot, mtk-Easy-root again from new, to activate magisk?? Why didnt work magisk, Although the SU is insatlled? Only if the mtk script has been run before, I can use the superuser in the magisk Manager Serve.
Have you an idea for this Problem?
Thank you, and best wishes from germany!
by Felix
Click to expand...
Click to collapse
For question 1:
Android as a system (linux-like) mounts the system partition as ro (Read-only) by default when booting. In order to be able to modify it, you need to remount the desired partition as rw (read-write) as follows:
While being a root user (#) enter this command in adb or terminal on your phone:
Code:
mount -o rw,remount /system
To revert back to ro (you should do it after you're done), use:
Code:
mount -o ro,remount /system
For question 2:
That app is based on Mtk-su exploit. You can read an article from xda here. Basically, your device's bootloader stays locked, but root resets every reboot, because the attained privileges are only temporary. (su gets to run from /data/local/tmp).
Remember!!! You Bootloader is still locked, meaning AVB and dm-verity are still active. If you modify system (changing the total checksum), you will brick your device!!! And if you unlock the Bootloader, then what's the point of Mtk-su ..........
Hope I helped you somehow.
Schlank K:
Thank you, but I'm not a complete noobThank you, but I'm not a complete noob Thanks, really. But I tried these methods ed for a long time...
The same thing still happens, I mounted, there is no contradiction, but then nothing actually happened either...
Individual blocks can be mounted in the main directory, but not specifically the system/block. I actually only planned to do this stupid boot animation from the system/media folder. Delete/replace/rename/move zip, whatever, to finally get rid of the thing for my own ani...
And there it started. I've already spent several hours on the net to find a way. There are many options, but none have worked for me so far..
Looks like dm-verity is in effect. Disable it and then mount should work.
xXx yYy said:
Looks like dm-verity is in effect. Disable it and then mount should work.
Click to expand...
Click to collapse
Hey, thanks
I've already tried that. Detects my system Not.
AVB ( dm-verity ) is bootloader related. You typically use Fastboot to disable it.
Rootbbit said:
Hey, thanks
I've already tried that. Detects my system Not.
Click to expand...
Click to collapse
Rootbbit said:
Hey, thanks
I've already tried that. Detects my system Not.
Click to expand...
Click to collapse
In addition
xXx yYy said:
AVB ( dm-verity ) is bootloader related. You typically use Fastboot to disable it.
Click to expand...
Click to collapse
I've already tried that. My fastboot gets the same message. I have already tried the system block mounting, via dev/blocks/ but there I also get the read-only message.
Or mounting via busybox, I've already done everything.
I've googled a lot about it, and found nothing else that helps , otherwise I wouldn't have asked here on xda.
There are these read-only ROMs, how do I recognize them? Is ext4 not also read-only from manufacturer from
Thanks, guys
is your bootloader unlocked!?
you know disable-verity is adb applet, don't you?
you have been warned don't do this on locked bootloader. happy bricking..
btw there is such thing like magisk modules no need to modify system partition at all. just read the Magisk Developer Guides Module Tricks section

Categories

Resources