hi ,
is it possible to send sms via adb shell from pc to android phone (via usb) ??
thegodfather13 said:
hi ,
is it possible to send sms via adb shell from pc to android phone (via usb) ??
Click to expand...
Click to collapse
Not sure why you would like to do this aside for just bragging rights or whatever BUT I think this is what you might be looking for.....
http://code.google.com/p/desktopsms/
mazdarider23 said:
Not sure why you would like to do this aside for just bragging rights or whatever BUT I think this is what you might be looking for.....
http://code.google.com/p/desktopsms/
Click to expand...
Click to collapse
Bumping this for great justice.
Have a remote server out in the boonies that I have to monitor... I can pay 10k for a cellular monitoring package or I can stick an android on it (already tested for signal and amazingly enough has it) and have it spit out console commands to ADB with it's status.
Anyone have any ideas?
---------- Post added at 10:47 PM ---------- Previous post was at 10:20 PM ----------
combustiblemonkey said:
Bumping this for great justice.
Have a remote server out in the boonies that I have to monitor... I can pay 10k for a cellular monitoring package or I can stick an android on it (already tested for signal and amazingly enough has it) and have it spit out console commands to ADB with it's status.
Anyone have any ideas?
Click to expand...
Click to collapse
Fixed my own question with a shell script (win32/64):
Code:
@echo off
adb shell am start -a android.intent.action.SENDTO -d sms:%1 --es sms_body %2 --ez exit_on_sent true
ping -n 2 localhost>nul
adb shell input keyevent 22
ping -n 2 localhost>nul
adb shell input keyevent 66
this is adapted from the linux shell version listed here:
http://webcache.googleusercontent.c...s-using-android-adb+&cd=6&hl=en&ct=clnk&gl=us
Use the country code & use quotes around your message if you have more than one word. For example:
smsScript.cmd 15551234 FUBAR!
smsScript.cmd 15551234 "zomg, the server is FUBAR!"
Hello,
I was trying your script on my phone and it gives me an error:
Code:
Error: Activity not started, unable to resolve Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 pkg=android.intent.action.SENDTO }
I'm I doing something wrong?
Thank you
Some time ago I sucessful use Linux smstools to send SMS from PC using Android phone connected via USB.
Hello guys!
Please, could you point me how to achieve the following functionality?
I would like to be able to send text messages (SMS) directly from android shell/commandline. The idea is that in Android from a terminal I will invoke e.g.:
Code:
sendsms +639xxxxxxxx "The body of the message"
and the sendsms app will send the message "The body of the message" to the specified number +639xxxxxxxx. I won't be using it directly, but I'd like to call it from scripts.
At stackoverflow under 4043490 thread two methods are mentioned:
a) use adb
Code:
adb shell am start -a android.intent.action.SENDTO -d sms:CCXXXXXXXXXX --es sms_body "SMS BODY GOES HERE" --ez exit_on_sent true
adb shell input keyevent 22
adb shell input keyevent 66
Where CCXXXXXXXXXX is country-code followed by phone number. This may not work correctly on non-standard android installations, you will need to find the correct keyevent values to pass.
b) use a service call
Code:
service call isms 5 s16 "17079876543" i32 0 i32 0 s16 "SMS TEXT HERE"
But none of them works for my rooted Alcatel OT 8008D with Android 4.2.1. If I run the adb command (a) from terminal with root rights, it complains "error: device not found".
The service call (b) ends with a message "Result: Parcel(00000000 '....')" but nothing happens, no SMS being sent. Similar behaviour has been reported at stackoverflow under thread 20680167.
Please, do you have any tips?
Thanks in advance!
hi
I have to deceive the hdmi connection to use the app on the shield TV.
My app does not run when it detects HDMI.
HDMI connections appear to be detected in / sys / devices / virtual / switch / HDMI / state
If "state" file is 1, it is connected. If it is 0, it is not connected.
So I want to change the value to 0 by using the kernel modification application.
But I do not know this command. Help me
View attachment 4118874
I can switch from the kernel application.
View attachment 4118875
I put the path as I want, but it does not work.
How do I write commands?
I do not know what is different between Enabled and Applying.
What should I write these two to change the status of that file to 0?
Which application is that? Can You provide me the link?
Will it let me set a switch to run a shell command to set permissions on a file and a shell command to restart the UI?
If You remove the permissions to /sys/ devices/virtual switch/HDMI/state for all users are groups and then Restart the Android User Interface without doing a reboot. The app that blocks HDMI should work.
I uninstalled com.android.updater, and fow a while everything was OK. Then today the battery was depleted, and after recharging the phone went into a bootloop. I had to install com.android.updater again, and after that everything went back to normal.
How did I find out it was com.android.updater? When in a bootloop, the Android system is actually already up and running. I was able to do adb logcat. There I saw that the system was looking for com.android.updater.
Code:
04-18 17:07:20.036 7445 7606 E AndroidRuntime: *** FATAL EXCEPTION IN SYSTEM PROCESS: Thread-4
04-18 17:07:20.036 7445 7606 E AndroidRuntime: java.lang.RuntimeException: System error: connot find system app : com.android.updater
Note that I'm using the original China Stable ROM version 10.4.4.0(PFKCNXM), all stock, locked bootloader, not rooted. Except for the customization that we can do without root: Install Google services etc, and disable/uninstall packages through ADB.
I didn't want to upgrade to MIUI 11 because I've seen reports of it being slow and draining battery, and I want the NFC functionality, so I had to stick with China ROM.
I can't find that in my Mi 9T Pro (using the latest xiaomi.eu 20.3.27)
When I search Update I find pl.zdunex25.updater, com.android.dynsystem and com.google.android.configupdater and have all 3 frozen with SDMaid.
DeepAnger said:
I can't find that in my Mi 9T Pro (using the latest xiaomi.eu 20.3.27)
When I search Update I find pl.zdunex25.updater, com.android.dynsystem and com.google.android.configupdater and have all 3 frozen with SDMaid.
Click to expand...
Click to collapse
Oh I'm using the China Stable ROM version 10.4.4.0(PFKCNXM), sorry for not mentioning it earlier. I think custom ROMs might be immune to this sort of thing. Thanks, I've updated the post with my ROM info.
I uninstalled com.android.updater, and i cant restore it(. Do you can help me? I use redmi 4 and firmware miui_HMNote4Global_V8.5.6.0.MBFMIED_6f4b63e4fd_6.0. How i can restore one app whitout reinstall all?(
Brooont said:
I uninstalled com.android.updater, and i cant restore it(. Do you can help me? I use redmi 4 and firmware miui_HMNote4Global_V8.5.6.0.MBFMIED_6f4b63e4fd_6.0. How i can restore one app whitout reinstall all?(
Click to expand...
Click to collapse
Process of restoring generally depends on how did you 'uninstall' - please precisely describe how you did
I connect phone to computer with adb, click "debloater" and write com.android.updater in "custom" field, and click uninstall.
Brooont said:
I connect phone to computer with adb, click "debloater" and write com.android.updater in "custom" field, and click uninstall.
Click to expand...
Click to collapse
Still depending on how your debloater worked, try the folowing command(s):
adb shell cmd package install-existing com.android.updater
if it fails then:
adb shell pm enable com.android.updater
First make sure that adb connection is properly established:
adb devices
C:\adb_run\bin>adb devices
List of devices attached
NF8LHYVSNJZTGY7L recovery
C:\adb_run\bin>adb shell pm enable com.android.updater
adb server is out of date. killing...
* daemon started successfully *
/sbin/sh: pm: not found
C:\adb_run\bin>adb shell cmd package install-existing com.android.updater
/sbin/sh: cmd: not found
C:\adb_run\bin>
Something wrong...
Brooont said:
C:\adb_run\bin>adb devices
List of devices attached
NF8LHYVSNJZTGY7L recovery
C:\adb_run\bin>adb shell pm enable com.android.updater
adb server is out of date. killing...
* daemon started successfully *
/sbin/sh: pm: not found
C:\adb_run\bin>adb shell cmd package install-existing com.android.updater
/sbin/sh: cmd: not found
C:\adb_run\bin>
Something wrong...
Click to expand...
Click to collapse
Something wrong/strange with your adb deamon
Btw, you used certain Debloater - you should better ask in the corresponding Debloater forum/thread how to un-do
Š¢hanks!
wpyh said:
I uninstalled com.android.updater, and fow a while everything was OK. Then today the battery was depleted, and after recharging the phone went into a bootloop. I had to install com.android.updater again, and after that everything went back to normal.
How did I find out it was com.android.updater? When in a bootloop, the Android system is actually already up and running. I was able to do adb logcat. There I saw that the system was looking for com.android.updater.
Code:
04-18 17:07:20.036 7445 7606 E AndroidRuntime: *** FATAL EXCEPTION IN SYSTEM PROCESS: Thread-4
04-18 17:07:20.036 7445 7606 E AndroidRuntime: java.lang.RuntimeException: System error: connot find system app : com.android.updater
Note that I'm using the original China Stable ROM version 10.4.4.0(PFKCNXM), all stock, locked bootloader, not rooted. Except for the customization that we can do without root: Install Google services etc, and disable/uninstall packages through ADB.
I didn't want to upgrade to MIUI 11 because I've seen reports of it being slow and draining battery, and I want the NFC functionality, so I had to stick with China ROM.
Click to expand...
Click to collapse
Would it be safe to disable in ADB, rather than uninstall?
Also, is it only responsible for OS updates, or does it handle things like updating the Google Play app?
hey guys..
is there any method for unrooted device..? disable commanda is not working.;
C:\Users\Desktop\fastboot_adb(1.0.32)_071114_r21>adb shell pm disable-user --user 0 com.android.
updater
Package com.android.updater new state: default
t-mobile_mda said:
hey guys..
is there any method for unrooted device..? disable commanda is not working.;
C:\Users\Desktop\fastboot_adb(1.0.32)_071114_r21>adb shell pm disable-user --user 0 com.android.
updater
Package com.android.updater new state: default
Click to expand...
Click to collapse
I would suggest not touching android.updater. it gives bootloop if disabled or uninstalled
What should we remove then
Everyting was working fine using the SHELL Command in order to remove bloatware from my device to remove any application using ANDROID 12 ONEUI 4.1.1
After updating to ONEUI 5 ANDROID 13 on December 6 2022, now im not able to get the ADB SHELL Command working it gives me and error.
Can someone let me know if there is a fix for this? like i said everything was working before upgrading to ONEUI 5 ANDROID 13
MacBook-Air platform-tools % ./adb shell
b4q:/ $ pm list packages
Exception occurred while executing 'list':
java.lang.SecurityException: Shell does not have permission to access user 150
com.android.server.am.ActivityManagerService.handleIncomingUser:14870 android.app.ActivityManager.handleIncomingUser:4802 com.android.server.pm.PackageManagerShellCommand.translateUserId:3499
at com.android.server.am.UserController.handleIncomingUser(UserController.java:2672)
at com.android.server.am.ActivityManagerService.handleIncomingUser(ActivityManagerService.java:14870)
at android.app.ActivityManager.handleIncomingUser(ActivityManager.java:4802)
at com.android.server.pm.PackageManagerShellCommand.translateUserId(PackageManagerShellCommand.java:3499)
at com.android.server.pm.PackageManagerShellCommand.runListPackages(PackageManagerShellCommand.java:965)
at com.android.server.pm.PackageManagerShellCommand.runListPackages(PackageManagerShellCommand.java:861)
at com.android.server.pm.PackageManagerShellCommand.runList(PackageManagerShellCommand.java:720)
at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:222)
at com.android.modules.utils.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:97)
at android.os.ShellCommand.exec(ShellCommand.java:38)
at com.android.server.pm.PackageManagerService$IPackageManagerImpl.onShellCommand(PackageManagerService.java:6922)
at android.os.Binder.shellCommand(Binder.java:1085)
at android.os.Binder.onTransact(Binder.java:903)
at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:4909)
at com.android.server.pm.PackageManagerService$IPackageManagerImpl.onTransact(PackageManagerService.java:6906)
at android.os.Binder.execTransactInternal(Binder.java:1321)
at android.os.Binder.execTransact(Binder.java:1280)