1

i'm new here, so i apologize in advance if this is a n00bish question:

how could one remount /system (or any partition, for that matter) in rw and allow suid on a booted system via ADB wifi? here's some particulars:

  • hardware=custom, no exterior ports
  • bootloader=unknown
  • kernel=loop device and module enabled
  • ro.secure=1
  • recovery=OEM
  • version=4.3
  • root=temp
  • busybox=yes, custom
  • mount=ext4; ro; relatime; barrier=1; nosuid

thnx

Matthew Read
  • 50,567
  • 30
  • 145
  • 273

2 Answers2

1

Once your debug bridge is connected, get it running as root with adb root. Then remount the partition read/write using adb shell mount -o rw,remount /system.

Not sure what you mean by the suid part of your question, but if you can elaborate, I will try to answer that as well.

Paul Ratazzi
  • 949
  • 9
  • 22
  • i suppose the suid portion might be redundant, so nvm that. i have tried that one, no luck with it. – particlewave_delta May 18 '15 at 10:21
  • Are you getting an error on either or both of the 'adb' commands? If you are remounting rw and still unable to modify the partition, you may have a bios protection. Some phones, like HTC call this S-ON. This must be changed to S-OFF before the 'mount' command will do anything. It can be difficult to get S-OFF, depending on the model of phone. – Paul Ratazzi May 18 '15 at 11:33
  • adb root returns no error and build.prop shows adb running as root. i get the error when I pass the mount cmd to the shell. – particlewave_delta May 18 '15 at 12:26
  • What exactly is the error you're getting? – dantis May 19 '15 at 11:42
1

Try running everything from the ADB shell.

adb shell
su
mount -o remount,rw /system

If you install something as root "su" you can use chown to change the owner of the file. It's not quite like using suid but at least you can change the owner.

It also looks likes Busybox has suid built in, if you have the right version.

Check out this website for more info.

D. Gibbs
  • 451
  • 3
  • 7
  • tried from the shell and from term emu installed via [adb install]. I have an su binary in /sdcard/Download, as well as one in /data/local, but can't execute the one in /sdcard. i'll try [chown] on the /sdcard/Download binary. thnx for the link. updates to come. – particlewave_delta May 18 '15 at 16:13
  • What error are you getting when trying to execute the binary under /sdcard? You might need to change the permissions chmod 6774 su of the binary. – D. Gibbs May 18 '15 at 18:13
  • "system/bin/sh: ./su: can't execute: Permission denied" – particlewave_delta May 18 '15 at 20:46
  • And your tablet is rooted, correct? – D. Gibbs May 18 '15 at 21:25
  • temp root from a binary pushed to /data/local/ and executed. – particlewave_delta May 18 '15 at 21:35
  • Then try running /data/loca/temp_root <root command to execute> to run it as root and you shouldn't get a permission denied error. where temp_ root is the name of your root program and is the command to be executed as root. I've never heard of a temp root before though.. – D. Gibbs May 18 '15 at 21:37
  • ok. i haven't tried it that way yet. i'll give it a go tomorrow. – particlewave_delta May 18 '15 at 22:49
  • temp rooting is when you push an su binary thru adb to a directory you can execute from. in my case, /data/local. the root shell is temporary because it doesn't survive reboot. – particlewave_delta May 18 '15 at 22:51
  • @D.Gibbs Isn't it /data/local/temp_root -c <command>? Oh, and the su binary is given 06755 permissions in some Android ROMs, so there's that. – dantis May 19 '15 at 11:45
  • 1
    @aureljared, thanks for the permissions. The command might have -c on some ROM's but I don't remember using it. But that's not to say that I'm mistaken :) @particlewave_delta: why not just root the tablet permanently? – D. Gibbs May 19 '15 at 19:18