wm/am not found from adb shell - android

Phone: OnePlus 3t. Rooted. No updates.
Booting problems, so adb started from TWRP recovery screen.
Whether I enter "wm size reset" or "am size display-reset", it is telling me "/sbin/sh/: wm: not found" or "/sbin/sh: am: not found" respectively.
If I try it in TWRP terminal I get the same, except "sh:" instead of "/sbin/sh/:".
First time using adb tools, so I could be doing something basic wrong.
Can't use phone until I manage to fix the resolution issue. Grateful for any help.

That is because TWRP has no screen management. The use of certain commands in TWRP is restricted and limited.
am stands for activity manager, which is a process from the Android Operating System, but when you start on recovery mode not every layer of the OS is started.
I hope it helps.

Related

ADB - Empty list of devices when running 'adb devices' command

I've a Honor 10 View Lite with a broken screen (it's not usable) and I would try to recover data from it.
Following some tutorials it seems possibile to do that with ADB and the phone in recovery mode (holding power button + volume up).
I've installed ADB drivers through UniversalAdbDriver.msi and Fastboot version 1.4.3 Portable on Windows 10.
Being the screen black it's difficult to understand if the phone reboot in custom recovery mode or in normal mode, but when I open shell on the same folder of Fastboot and type 'adb devices' no device is found. I've also tried connecting another phone in recovery mode (Huawei Mate 10 Pro perfectly working) but the problem is still the same, no device found.
What can be the problem? Some wrong or missing installations?
I also have to specify that both the phones have USB debugging disabled and I hope this is not a problem because in the broken phone it's impossible to find a way to enable it. That's also the reason why I'm trying to recover data through ADB and not through programs like FoneLab and so on that required USB debugging enabled.
I will also accept advices on solutions different from ADB to recover data in these conditions, if they exists.
Thank you
I don't think adb will work for this unless usb debugging is enabled. At least, the device might show up in "adb devices" list, but it would show up as "unauthorized" and you wouldn't be able to pull data off it.
What kind of data are you trying to retrieve? Don't suppose you have cloud backup?
If it's just the screen that's broken maybe you can find a way to mirror the screen onto an external display somehow.

ADB No Devices Found / Tablet restart

I have andoroid tablet which starts only to boot screen. No combination of power and vol +/- leads to recovery. Tablet is responsible when connected to PC. So I would like to try reset is via ADB.
When I connect tablet to PC, it apears for few second in device manager. I was able to install driver and now it apears as MediaTek PreLoader USB VCom. But unfortunately only for few seconds.
So when I run ADB.exe devices - list of attached devices is empty. adb server is running.
Any tips what to try please?
Thank you
Try checking if you have the appropriate adb driver installed for your tablet.
Also, I recommend using Universal ADB Driver. It works for pretty much any android device.
However, you must have ADB options enabled beforehand on your tablet (before it went unresponsive). Otherwise, ADB will not be of any use to you.

Nexus 7 developer build

I've been fighting Nexus Root Toolkit for a while and decided I must be missing something obvious. I have a Nexus 7 2013 edition. I flashed it 6 mos ago and the result was a fully-rooted device that, when I opened an adb shell, the shell opened as root. I recently flashed it up to Marshmallow and I no longer have root when the shell opens. For the life of me, I cannot figure out how to get that back.
When I do adb root, I get a warning that adbd cannot run as root in production builds, so clearly I have a production build and need to change it, but I'm not sure how or to what.
I have figured this out - took a while to remember. NRT comes with a "modified boot.img" which can be used, according to the tool, to "temporarily boot a modified boot.img to enable running privileged commands". Last time around, I replaced the boot image with this temporary image.
I'd do that now, but the current modified boot image never fully boots. I get full device access via adb (including shell which defaults to root), but the OS won't fully load.
I will update this answer when a new boot image is released which actually works. Meanwhile, it'll be tedious but I'll just keep putting it into 'temp boot image" mode when I need this access.

Galaxy Note 1 not listed under adb devices

I just installed android sdk. And trying to follow these steps to detect my device. Because my phone was disconnected & dead during an unfortunate/accidental/unwelcome software upgrade.
It's frozen on Samsung start up screen. I was able to use volume + power + home buttons to get into another black screen with now send the package you want to apply to the device with adb sideload <file name>. But not sure how to sideload from adb when I can't even detect my device. All I want is to retrieve my data & start up my device as normal.
Within the Command Prompt under platform tools, I typed adb devices. But no device listed. I am currently installing the Samsung Galaxy Note MTB device driver.
Can someone please guide me to the correct steps? There has to be a way to retrieve the data from the internal memory right?
Edit 1:
According to this article, I am not sure if my phone is bricked or trap in a bootloop...First of all, lets get something straight. Most people use the term "bricked" improperly. A bricked phone means one thing: your phone won't turn on in any way, shape or form, and there's nothing you can do to fix it. It is, for all intents and purposes, as useful as a brick. A phone stuck in a boot loop is not bricked, nor is a phone that boots straight into recovery mode. These are things you can usually fix, and they're a lot more common than a truly bricked phone. If your phone is actually bricked, you won't be able to fix it yourself (but there are things you can do—see the end of this article)
Edit 2:
PC specs : Win Vista, 32-bit
After installing MTP drivers I am at this point. However within adb devices command I only see <aserial number> recovery. It doesn't say <serial number> device
Do I still have a hope to get to my data?
Your phone may be stuck in a BootLoop It wont get detected using adb try using FastBoot if not you should contact your samsung service center to reload software . Your data is lost in this case.
UPDATE
try downloading sp flash tool check your phone is detected if so you can have some hope in data recovery

Adb stops detecting my phone after a while

I am developing for android on a linux machine and I have already created a udev rule for android and it works. After a while if I unplug the device and plug it back in again, adb doesn't recognize the device if I run lusb or dmesg to get information about the device. I tried reload the udev rules and it does not work, I even tried to kill the adb process but it still does not work.
Can someone help?
Anyway, thank you.
This appears to be a real problem on linux, at some point in time a device will no longer be seen by the ADB. What I should really say is almost never be seen by the ADB. In my case I have a Samsung Galaxy Tab 10.1 that was given to attendees of Google I/O 2011. My Ubuntu 10.10 development system was working just fine with this device. Sometime near September 19th the ADB stopped seeing the device! In fact there have been breif moments in time when the device was detected by the ADB. What needs to be made clear about the problem that I and I believe pharaoh are having is not the permissions issue where executing
$adb devices
returns ?????????? for a device. The device simply does not show up in the list. One more important fact is that at no point in time has this device not been detected on my Windows based development machines.
It appears to me that the mechanism that the ADB uses to determine if a device on the USB is in fact a adb_device is fragile and some change in either our devices or our development systems has broken this detection.
Due to some reason sometimes adb gets disconnected, so in that case you have to restart the adb.
Go to DDMS->Devices and you will see Reset adb option in View Menu besides Screen Capture option.
I usually have this problem due to I have installed the adb plugin on Chrome. If I close Chrome and re-connect the device, it appears listed with adb. Hope this helps.
I just had this problem as well with my OnePlus 2.
It was working the previous day. I had then set up port-forwarding using the 'device inspector' dialog in Chrome DevTools. It's supposed to be kept open for it to work, so I kept it open in a tab permanently.
The next day when I connected my device via USB, adb devices didn't list anything. I closed the device inspector dialog in my devtools and suddenly adb recognized my device again. I re-enabled port forwarding after this, but my device is stll being detected.
tl;dr: Close your port-forwarding dialog in Chrome DevTools if it had been kept open even after you removed your device.
I've had this happen before. I disable, and then re-enable debugging on the phone (Setting -> Applications -> Development -> USB debugging, uncheck, then re-check) to get it recognized by adb again.
Try adb kill-server to stop the adb and use another command 'adb devices' to restart it. It should work and it should detect your device again. ( For those who can edit my post: any other commands will start the server not just adb start-server, so don't edit without to leave a comment at least)
May be stupid, but I have been had similar problem right now and after an hour I noticed that the problem was that my USB hub, in which such devices are connected, were not actually connected to the PC.
In fact, the USB wire WAS connected, but they may not being doing good contact for some reason, so it failed randomly from time to time.
Same problem here, using mac os. However connected devices are recognized by Android File Transfer application. It all started with S3 phone (rooted), I thought something wrong with the phone, because Nexus 7 (stock) worked as intended. After 3 days of connecting/reconnecting it stopped being recognized by adb too. Tried to perform a hard reset - didn't help.
adb list - empty list
android file transfer - works perfectly
I'll run out of devices soon
Same problem observed on ubuntu, I tried the following and it worked:
Reference: link
Use the command udevadm from the above reference for ex:
"sudo udevadm test --action="SUBSYSTEM=="usb", ENV{ID_VENDOR_ID}=="[vendor_id]", ENV{ID_MODEL_ID}=="[model_id]" MODE="0666", SYMLINK+="[Device_Name]"" $(udevadm info -q path -n /dev/bus/usb/001/[DevNum])"
This seems to fix some link files and that solved the problem of adb not detecting device after a while.

Categories

Resources