[Q] Getting full adb access in recovery - Android Q&A, Help & Troubleshooting

is there any way to get the full set of adb commands working while in recovery? ive tried on a few phones and the result is pretty much always the same for anything i try and run, su for example: "/system/bin/sh: su: not found" adb install gives "/system/bin/sh: pm: not found"
also rather annoyingly ive found that in many cases i cannot modify the system (or any other, even /data) partition at all, i was trying to push a custom build.prop to a one V (s-off, supercid, dev unlocked, rooted) but whenever i try and do anything like that i get "permission denied: read only file system" i tried a chmod 777 it changed the permissions correctly when checked with ls -l but still getting read only, also done adb remount with no luck. im also getting this prob on my sensation XL again real s-off, supercid, dev unlocked, rooted (tried on both gingerbread and ics)
(oh for those wondering how i got real s-off on the XL and one V, i have a riffbox)

Related

passwd: command not found

short story:
There is no passwd command in my system bin, so I am unable to change the (or effectively, add a) root password.
longer story:
So, as soon as I got my HTC Droid Eris, I installed that root 2.1 leak from HTC. After going through several Terminal applications, I found one that didn't force close every time I tried to use it. I was about to log into root with "su" but I didn't know the root password. I tried Googling around, but I found nothing relevant. I then proceeded to try entering the "su" command anyway and to my surprise, their was NO ROOT PASSWORD. I've been panicking for the last two days trying to find a way to get the passwd command into my bin, but it doesn't look like it's going to work. I've even done some crazy things like try to copy the passwd command from my openSUSE box into the bin (Yes, I understand that it probably wouldn't have been compatible, but it's worth a shot). After doing some research, I learned that the /system/bin directory is read-only. That explains why I kept getting device cross-over errors whenever I tried moving the command from my SD card into the internal memory. Also, I found where the HTC devs installed the "su" command in the leaked 2.1root. It's in the /system/xbin directory.
Does anyone have a solution to this? I'm worried about hackers and being rickroll'd by some idiot's worm. I've been keeping my 3G mobile network off and only using secured Wi-fi to access the Internet
Umm, why are you trying to change the root password? Also when you do su in a shell our shouldn't ask you for a password. The risk of getting hacked are almost zero because the hackers have bigger targets to go after such as the iphone or motorola droid.
Sent from my Eris using the XDA mobile application powered by Tapatalk
This command will mount system as writeable
Code:
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
Use one of the custom roms with SuperUser.apk (all of them) for security. We don't have passwords for shells on android.

[Q] Rooting Galaxy Ace S5830D Stock ROM - suid file scanner?

Hi All,
I'm not sure anyone had luck rooting the stock ROM for this device (S5830DTLKI4) but I haven't so far. Some people seem to claim they did in other threads but I suspect they haven't really. What I mean is they managed to install another rom which is rooted from cwm, but I don't think they actually got the stock rom rooted. Here's what I have managed to do so far.
I installed cwm. From cwm I installed Superuser (from AndroidSU). You would think that I'm done but not quite. The suid bit does not stick on su after a reboot.
I got a root shell from adb using a modified zergRush script. I can remount /system writeable and set the suid bit on su, but similar problem, suid bits are gone after reboot.
I figured the underlying file system (rfs) on /system does not really support suid bit so they get trashed on reboot. So what I did is that I slightly modified the init script on the stock rom so that it applies suid bit on su at boot time (repackage the rom and installed that).
That worked, now I have a suid /system/bin/su binary after reboot, however shortly after the device is booted, it suddenly shutdown. How long it takes before the device shutdown varies from a few seconds to a minute or two but this always seems to happen while some "media analyzer" process is running (I see a message to that effect in the top message bar).
I speculated that this process could be scanning for suid binaries and either deliberately or accidentally shutdowning the device when it found one.
I tried a little experiment that seemed to confirm the theory: if I try to race against that process (start a root shell and remove the suid bit on su), the device remains stable. I wait a little bit for the "analyzing media" message to disappear and set the suid bit back on su and my device remains stable.
Anyone aware of something to that effect with other ROM/devices?
Cheers,
dg
What are the hardware specifics on this model?
Wow, this is so technical! Interesting!
What about flashing update.zip via Stock Recovery?
Sent from my GT-S5830 using Tapatalk
I'm just curious cuz I haven't seen this model in samfirmware.com

[Q] S-OFF, no root. Options for root and/or SU

I've got a device and need either root or su for system app development, but want to do this in the least invasive way possbile. The twist... this is likely a pre-release device and came from HTC with S-OFF (HBOOT-1.01.0000).
With S-OFF (but no root) what are the options for getting root and/or SU installed?
pukebag said:
I've got a device and need either root or su for system app development, but want to do this in the least invasive way possbile. The twist... this is likely a pre-release device and came from HTC with S-OFF (HBOOT-1.01.0000).
With S-OFF (but no root) what are the options for getting root and/or SU installed?
Click to expand...
Click to collapse
Least invasive: Install superuser/su from adb, leaving stock recovery in place. LMGTFY: http://www.equisoforum.com/Thread-ADB-Shell-Pro-Root-method
Better route: Flash CWM or TWRP recovery to phone, then flash superuser/su package from recovery.
junkmail9 said:
Least invasive: Install superuser/su from adb, leaving stock recovery in place. LMGTFY: no_urls_from_noobs
Better route: Flash CWM or TWRP recovery to phone, then flash superuser/su package from recovery.
Click to expand...
Click to collapse
(please forgive if anything I have below is nonsense... I'm slowly building my understanding)
I don't believe the 1st method will work. I can't 'adb remount' because I don't have root on the device ('remount failed: Operation not permitted'). If remount worked I'd be good, because as you suggest I could push the su apk/permission/scripts to the device. I also tried remounting the /system partition as RW but no luck ('mount: Operation not permitted').
I'll try the 'traditional' CWM route. I just wasn't sure if having S-OFF opened up any other options for getting root, mounting /system as RW, or...
Thanks much.
pukebag said:
(please forgive if anything I have below is nonsense... I'm slowly building my understanding)
I don't believe the 1st method will work. I can't 'adb remount' because I don't have root on the device ('remount failed: Operation not permitted'). If remount worked I'd be good, because as you suggest I could push the su apk/permission/scripts to the device. I also tried remounting the /system partition as RW but no luck ('mount: Operation not permitted').
I'll try the 'traditional' CWM route. I just wasn't sure if having S-OFF opened up any other options for getting root, mounting /system as RW, or...
Thanks much.
Click to expand...
Click to collapse
I have always used the "Better Route". However, I was under the impression that s-off unlocked the partitions.
Out of curiosity, did you try the following command anyway: (adb push su /system/bin) ?
junkmail9 said:
I have always used the "Better Route". However, I was under the impression that s-off unlocked the partitions.
Out of curiosity, did you try the following command anyway: (adb push su /system/bin) ?
Click to expand...
Click to collapse
At least in this case /system is mounted RO:
- adb shell mount | grep system -> /dev/block/mmcblk0p33 /system ext4 ro,relatime,user_xattr,barrier=1,data=ordered 0 0
- adb push foobar.txt /system/bin -> 'failed to copy foobar.txt to /sytem/bin/foobar.txt : Read-only file system
This isn't a regular consumer device so it's at least a little funky. For example, it doesn't get OTA updates and is stuck with an old RUU (htc sense 4.0... ruu 1.31.605.1 (? not sure where exactly to get RUU version). It also has the 'normal' CID (VZW__001).
It might get a little interesting digging up workable bootloader and supercid method, now out-of-date for basically everyone else.
pukebag said:
At least in this case /system is mounted RO:
- adb shell mount | grep system -> /dev/block/mmcblk0p33 /system ext4 ro,relatime,user_xattr,barrier=1,data=ordered 0 0
- adb push foobar.txt /system/bin -> 'failed to copy foobar.txt to /sytem/bin/foobar.txt : Read-only file system
This isn't a regular consumer device so it's at least a little funky. For example, it doesn't get OTA updates and is stuck with an old RUU (htc sense 4.0... ruu 1.31.605.1 (? not sure where exactly to get RUU version). It also has the 'normal' CID (VZW__001).
It might get a little interesting digging up workable bootloader and supercid method, now out-of-date for basically everyone else.
Click to expand...
Click to collapse
If you're already S-OFF, you shouldn't need to do anything with supercid. Just put the phone into fastboot and flash a custom recovery - either CWM (link) or TWRP (link), depending on your preference. Follow the "manual installation" steps in the thread of your choice. I have been very happy with PhilZ's Touch CWM.
Also - first thing to do after installing the recovery is to make a nandroid backup of the (semi) pristine state of your phone.

How do recover data from unrooted and boot-looped LG L9-II?

Dear users,
I read multiple threads throughout internet and couldn't find working solution. My lg with kitkat 4.4.2 had lagged so I removed battery. After this phone is boot-looping with startup animation forever.
I can explore files with adb shell when phone is in recovery mode but don't have access to dalvik-cache. Command "su rm -rf /system/data/dalvik-cache" gives "permission denied nor "adb backup -all" cause "unlock your device and confirm...".
I cannot root phone by copying SuperSu files into /system/app. The command "su cp.. " gives no answer and later when exploring /app there's no SuperSu program.
I was trying to explore through sudo nautilus on Ubuntu during using one of rooting tutorial but the phone just disappears in the list of mounted devices.
I have important data like phone contacts, messages and some pictures inside phone memory. I didn't backup all of them formerly.
Any ideas?
likkufri said:
Dear users,
I read multiple threads throughout internet and couldn't find working solution. My lg with kitkat 4.4.2 had lagged so I removed battery. After this phone is boot-looping with startup animation forever.
I can explore files with adb shell when phone is in recovery mode but don't have access to dalvik-cache. Command "su rm -rf /system/data/dalvik-cache" gives "permission denied nor "adb backup -all" cause "unlock your device and confirm...".
I cannot root phone by copying SuperSu files into /system/app. The command "su cp.. " gives no answer and later when exploring /app there's no SuperSu program.
I was trying to explore through sudo nautilus on Ubuntu during using one of rooting tutorial but the phone just disappears in the list of mounted devices.
I have important data like phone contacts, messages and some pictures inside phone memory. I didn't backup all of them formerly.
Any ideas?
Click to expand...
Click to collapse
Could you elaborate on "disappears?" Usually if something is present and suddenly disappears in lubuntu, that means the connection was broken (either physically or by software, such as when switching drivers by running a command). Anyway, have you tried letting it sit for a day or something? I figure the reason it "lags" might potentially affect booting time.
It's also helpful to know what data you want out of it. Some things need root, some things don't need root. If all you want is file X in user space, I imagine that'd be infinitely easier than trying to get a random bootloader setting.

?? Get Temp root, mount, as soon as I run "rm /data/su.img >NUL" phone reboots ??

?? Get Temp root, mount, as soon as I run "rm /data/su.img >NUL" phone reboots ??
I know little to anything. Maybe I am missing some attributes or a watchdog app I am not aware of? I have been trying to root a galaxy s6 SM-G920AZ it also has a locked bootloader as well. I have gotten to the point I have tried every root app including Chinese ones. I found "MobileGo" they go by many names and I tried one of the well-known ones and it got half root in 1 time. I give it a try within 30 seconds it says root. I start loading supersu and busybox and rebooted did some looking around came across this g920a and g925a root
A boot root does not work any longer for me. But the SuperSU manager .bat file looked good except a su here a cd there. I tried it as a batch no go. So I did it line for line and as soon as I get to "adb shell rm /data/su.img >NUL" within the batch file. Phone reboots and root is gone. What am I missing? Is there a watchdog app or am I mounting wrong? Below I will paste the commands I ran via adb I could run on a terminal. I never post but this is making want it even worse.
Phone is the SM-G920AZ I have it running 6.0.1, SP = June 1, 2016, Kernel Jun 8th 2016. Build = MMB29K.G920AZTUU4CPF2. Bootloader locked down. No Oem Unlock.
Procedure: Using a 1 click root pc app seems to get root after a wipe / reset within 45 seconds. I am getting 2-3 temp roots before I reset brings it back down to a minute or less. Then I connect via adb below are commands I have run than the last one phone reboots.
adb wait-for-device
adb shell
adb shell su
adb shell mount -o rw,remount /system
adb shell mount -o rw,remount rootfs /
adb shell cd data
adb shell rm /data/su.img >NUL <---- As soon as I send it the screen goes dark.
Like I said I do not know a lot. So it may be something basic or goog is throwing more roadblocks on the opensource I did the search here and on google but could not find much with a good timestamp. 2011 was a while back. Thanks for any info I am going to return to searching myself.

Categories

Resources