ADB no longer executes commands - "Killed" error - Android Q&A, Help & Troubleshooting

After "adb shell" successfully finding the device, every "sm" command results in "Killed" response - why? It goes something like this:
Code:
1|a3y17lte:/ $ sm list-disks
Killed
I tried executing "su" command, it succeeded, but didn't change anything - still getting "Killed" responses

+++

I'm having that same problem here, have you flash the .zip from app sd to internal?

Related

[Q] ls does not sort

When I start the ADB shell from the Windows command line, and type the command "ls", the list of files I get is not sorted by name. Also, if I enter "ls -r" which should reverse sort, I get the error message "no such file". If I type "busybox ls -l", I get the expected sorted list. Also, other commands like "busybox ls -la" work.
My Phone is a Samsung Captivate i897, rooted from Gingerbread with Corn Kernel v7.06 with Superuser and BusyBox installed.
How can I get the Busybox version of the shell commands to run without having to type "busybox" all the time?
The same problem
How to force sort in ls result ?

[Q] AOSP ADB push /sdcard/ permission denied

I noticed on some of the recent AOSP ROMs (AICP and Vanir that I remember for sure) that trying to "adb push <file> /sdcard/" results in a basic permission denied error. I tried "adb push <file> /storage/emulated/0/" and got a slightly more specific error saying that the filesystem was mounted as read only. When I tried "adb push <file> /data/media/0/" it went through as expected. I'm rooted with SuperSU 2.14, enabled USB debugging, and granted root to both apps and adb. I tried doing "adb root" and "adb remount" which should've given root and remounted /system as read-write, but I got the same results (using adb and fastboot from the most recent SDK).
It works fine in recovery (TWRP 2.8.0.2), but is there a way to fix it so that the /sdcard/ path works again?

Trouble Pulling img with ADB

I am trying to pull the data partition of my Huawei mate 10 lite to my computer. I used the mount command in TWRP to find its name and then used:
sudo adb pull /dev/block/mmcblk0p59 mmcblk0p59.img
A few minutes after command is run, it gives the error message:
adb: error: cannot write 'mmcblk0p59.img': File too large
The directory where im trying to pull it to has ~500 GB of free space so that's not the issue. Please help.
Seems there is a file size limitation. Try this
Code:
adb exec-out "dd if=/dev/block/mmcblk0p59 bs=4096" > C:\mmcblk0p59.img

adb should not wait for cmd to finish

Hey,
whenever I issue a reboot command via adb to a device that is connected via network / tcp, adb freezes (I guess because it waits for the response to the command that never arrives because the device is offline). Regardless if I use "adb reboot" or "adb shell reboot" ... I tried delaying the reboot with sleep and spawning it separately with & but nothing worked...
Code:
adb shell "sleep 5 &"
adb shell "(sleep 5) &"
adb shell "(sleep 5 &)"
It always waits until execution finished...
Any ideas?
If you invoke the SLEEP command it gets processed - even if forced to get processed in background.
FYI: Running a command in background simply means a user-interaction isn't possible.
jwoegerbauer said:
If you invoke the SLEEP command it gets processed - even if forced to get processed in background.
FYI: Running a command in background simply means a user-interaction isn't possible.
Click to expand...
Click to collapse
Yeah, but when I execute "sleep 5" within the shell, I cannot do anything until sleep finished. When I execute "sleep 5 &" within the sell, I can immediately enter the next command.
Same is NOT true with adb shell. Both "adb shell sleep 5" and "adb shell sleep 5 &" wait until sleep finish.
Of course I want "sleep" to execute in background. I want to execute "sleep 5 && reboot &" so adb has time to read the response and I can execute "adb disconnect" on the host before the device reboots.
Each
Code:
adb [-d|-e|-s <serialNumber>] shell "<shell_command>"
invokes a separate ( new ) terminal session and waits for this session has finished
To get around this open a remote shell, means invoke a terminal session only once and execute the commands desired
Code:
adb [-d|-e|-s <serialNumber>] shell
<shell_command>
exit
I'm sorry but I don't understand what u mean by that :/
I want to run this on my host:
Code:
adb command_that_will_reboot_connected_device_in_5_sec_without_blocking
adb disconnect
...
Any solutions for that?
If BusyBox is installed on device's Android, and if BusyBox has commands crond & crontab & reboot implemented, then you can create on Android a scheduled task to reboot Android by means of crontab
Example ( untested ) what re-boots Android in 1 minute:
Code:
adb shell
mkdir -p '/data/local/tmp/cron'
echo */1 * * * * reboot > /data/local/tmp/cron/crontab
busybox crond -c /data/local/tmp/cron
busybox crontab -c '/data/local/tmp/cron/' '/data/local/tmp/cron/crontab'
exit
Well, that sounds pretty overkill...
Found a solution... I moved the problem to the host by spawning the "hanging" adb process seperately (using windows in this case):
Code:
start adb reboot
timeout /t 3
adb disconnect
...

Question Sideloading Android 13, stuck at "Verifying update package"

Well, I screwed up.
Spoiler: Terminal
PS D:\platform-tools> adb sideload D:\platform-tools\oriole-ota-tp1a.220624.021-a13fd9d0.zip
serving: 'D:\platform-tools\oriole-ota-tp1a.220624.021-a13fd9d0.zip' (~18%)
PS D:\platform-tools> adb devices
List of devices attached
1C151FDF600205 sideload
PS D:\platform-tools> adb sideload D:\platform-tools\oriole-ota-tp1a.220624.021-a13fd9d0.zip
adb: sideload connection failed: closed
adb: trying pre-KitKat sideload method...
adb: pre-KitKat sideload connection failed: no devices/emulators found
PS D:\platform-tools> adb sideload D:\platform-tools\oriole-ota-tp1a.220624.021-a13fd9d0.zip
adb: sideload connection failed: no devices/emulators found
adb: trying pre-KitKat sideload method...
adb: pre-KitKat sideload connection failed: no devices/emulators found
PS D:\platform-tools> adb devices
List of devices attached
PS D:\platform-tools> adb sideload D:\platform-tools\oriole-ota-tp1a.220624.021-a13fd9d0.zip
serving: 'D:\platform-tools\oriole-ota-tp1a.220624.021-a13fd9d0.zip' (~0%)
PS D:\platform-tools> adb sideload D:\platform-tools\oriole-ota-tp1a.220624.021-a13fd9d0.zip
adb: failed to read command: No error
PS D:\platform-tools> adb sideload D:\platform-tools\oriole-ota-tp1a.220624.021-a13fd9d0.zip
adb: sideload connection failed: no devices/emulators found
adb: trying pre-KitKat sideload method...
adb: pre-KitKat sideload connection failed: no devices/emulators found
PS D:\platform-tools> adb sideload D:\platform-tools\oriole-ota-tp1a.220624.021-a13fd9d0.zip
serving: 'D:\platform-tools\oriole-ota-tp1a.220624.021-a13fd9d0.zip' (~0%)
Alright, I'll run it down. So after waiting a bit the first time around, I decided to go ahead and remove the USB cable, cause it wasn't doing anything. Big mistake. It printed "Failed to read 9067738 (or some variation of that) bytes data at offset 2080374784 (or some variation of that): Transport endpoint is not connected", then printed that many times over, then the Android Droid came over and under it said "Error". Now as i retry doing it after entering sideload again, it gets stuck. Am I ****ed or is there still a chance?
Never mind, I talked with some Google reps, and all I needed to do was reboot, I was hesitant to do so because of the red warning stating "WARNING: previous installation has failed. Your device may fail to boot if you reboot or power off.", but it turned out safe .
So did you ever get past the "Verifying Update Package"?
I've seen exactly what the OP attempted and his results and observations. adb always hangs at 'verifying update package'. I was able to reboot and did a factory image install of 13.0. The magisk_patched for its boot hangs at the 'google' logo. I have the update channel set to canary for the magisk app.
Also, flashing the factory image for the last 12.1 releases fails to downgrade.

Categories

Resources