[Application] write text via adb - HD2 Android Q&A, Help & Troubleshooting and Genera

Hey Guys
Out of curiosity i wrote a small program today that lets you write texts via adb.
It sends "adb shell input text" and "adb shell input keyevent" via adb. Since the character set of adb is limited not all characters will work but its enough for sms and short mails.
You can also send all keyevents you want by using the keyevent button and enter the keyevent number you want.
I don't plan to go on developing. As i wrote before it was just curiosity that made me write that tool and i want to share my work.
Have fun
Ulti~
Edit: Sorry, wrong section. please move it to the app section
Edit2: Or just close it. I will recreate it in the Application Subforum.

Related

cannot delete sms messages

Somehow I let my ritual of deleting my messages get away from me and now I have an inbox with over 2k messages...and I can delete none of them. Anytime I try my app (both the stock one and handcent) lock up and become non responsive.
Any advice?
So, I got impatient and did a data wipe (i backed up first). It obiviously got rid of my messages. But I decided that I don't like losing everything else, so I tried to restore my backup. No go. It returns something about needing to run it in the console?
The more advice I could get at this point, the better...
I have a fix for this that I helped brock do. I knew I should have made it public. lol. One day too late! I'll post it here in a little bit.
Edit:
So yea I too have noticed that when trying to delete large threads (500+ texts) it will typically FC. Sometimes if I click "wait" enough it will eventually delete, however 1000+ threads never seem to go. This work around will wipe ALL of your threads, however it's much better than wiping your entire phone. The best advice I guess would be to just clear them out every 250 texts or so.
These instructions are for windows. If you have mac or linux then you'll just need to change the parts about pulling the db from the phone.
Code:
mkdir c:\temp
adb pull /data/data/com.android.providers.telephony/databases/mmssms.db c:\temp (this will backup the database to your computer at c:\temp, just in case)
adb remount
adb shell
rm /data/data/com.android.providers.telephony/databases/mmssms.db
reboot
Let me know if you have any problems. Maybe I should add this is a fix in my apps installer program, just like clearing the cache.
Flip, you are a wizard! Thank you!
hello ive got exactly the same problem i have atleast 5k messages in on thread and cant delete them i dont understand what to do with that code you have put up flipzmode can you shed some light on it for me please .
Connect your phone via USB.
Bring up command prompt (or terminal if in osx or Linux)
Change directory to where you're adb is and then input flip's commands.
nvm got it wewt~
and adding this to app installer would be hot~
Permission Denied
I am Getting a "permission Denied" after i Type in the command, "adb pull /data/data/com.android.providers.telephony/databases/mmssms.db c:\temp"..... phone is rooted and i did verify that the phone is pulling up in the bridge... Any help is greatly appreciated
i had to do this: (just put in w/e drive your adb is on if it isnt a H~ more then likely a C drive)
cd H:\android-sdk-windows\tools
adb pull /data/data/com.android.providers.telephony/databases/mmssms.db H:\temp (this will backup the database to your computer at H:\temp, just in case)
adb remount
adb shell
rm /data/data/com.android.providers.telephony/databases/mmssms.db
reboot
all this is complete jiberish to me im not very compouter literate with these codes etc been trying for ages to figure it out and delete these messages its really doing my head in now
cant delete sum msgs how n where do i put that code so i can delete msgs over +1000
sprint hero messages
still cannot get this to work, i have changed the dir to F but i still get errors that says adb is not a rec. internal or ext command
plz help
I had the same problem (about 1600 messages for one contact) I set the phone's display to never turn off so it wouldn't go to "sleep" then I clicked delete on the thread and walked away for about 15 minutes and it eventually deleted. It seemed like the screen turning off and going to the lock screen is what was making the messaging app unresponsive.
riotkid976 said:
Connect your phone via USB.
Bring up command prompt (or terminal if in osx or Linux)
Change directory to where you're adb is and then input flip's commands.
Click to expand...
Click to collapse
What is "Abd"? It is not recognizable in my command prompt!! Please help!!! Thanks!!
I'm adding this in to my kitchen so it can be done with the click of a button. I'll post here when it's released.
Fresh is Sick
Thanks Fresh i definitely that was the easiest way to delete the threads and it worked great. Can't wait for the next best thing you put out there!
SOO glad I found this thread. My girlfriend doesn't even have this phone but this thread has solved her issue with her mms.apk force closing. This needs to be pinned or something.

Pershoot Kernel question

Hi guys,
could anyone explain me please how to enable usb charging with Pershoot´s Kernel (boot-cm_2636.4_ux-oc-xtra-vfpv3-d16_fp-101811)?
I rly don´t get this:
adb shell echo 1 > /sys/class/power_supply/battery/force_usb_charging
Thank you very much.
Sure bud,
The script you posted is meant to be run in a command prompt using the tablet's ADB interface. To access this you need the Android SDK (that is the tool for app development) installed on your PC. You can look up how to do this all over the interweb.
To make your life easier though, download a terminal emulator app from the Market, there are plenty of free ones. Once you've done that open it and run the script as follows
su
echo 1 > /sys/class/power_supply/battery/force_usb_charging
The "su" command gives you root access just as "adb shell" would in command prompt.
The catch is the script is not persistent after reboot. So you will need to run it again if you reboot the tab. This doesn't really bother me cause I only use it for charging in the car and it takes like 30 seconds to type in the script.
Enjoy!
Thank you very much!
Now it´s working.
FillTheVoid said:
Sure bud,
The script you posted is meant to be run in a command prompt using the tablet's ADB interface. To access this you need the Android SDK (that is the tool for app development) installed on your PC. You can look up how to do this all over the interweb.
To make your life easier though, download a terminal emulator app from the Market, there are plenty of free ones. Once you've done that open it and run the script as follows
su
echo 1 > /sys/class/power_supply/battery/force_usb_charging
The "su" command gives you root access just as "adb shell" would in command prompt.
The catch is the script is not persistent after reboot. So you will need to run it again if you reboot the tab. This doesn't really bother me cause I only use it for charging in the car and it takes like 30 seconds to type in the script.
Enjoy!
Click to expand...
Click to collapse
how do you make it stick ?
I ask this question in another forum and the result was, it´s not possible (maybe wrong).
By the way, after I enable USB charge, my notebook can´t find my Tab anymore.
Mondfahrer said:
I ask this question in another forum and the result was, it´s not possible (maybe wrong).
By the way, after I enable USB charge, my notebook can´t find my Tab anymore.
Click to expand...
Click to collapse
I found a way to very easily get it running.
download terminal emulator.
Go to system preference of terminal emulator and there is an option to enter initial command to after you start terminal emulator.
so just type in:
su - root
echo 1 > /sys/class/power_supply/battery/force_usb_charging
Whenever you start teminal emulator, it will enable usb charging
I use this app to NTSF http://forum.xda-developers.com/showpost.php?p=13337600&postcount=6

[Q] Can't Side Load Apps on Root NST Glow

I recently rooted my Nook Simple Touch Glow and when I try to side load apps through dropbox I get an error "Install Blocked; For security reasons you phone is set to block installation of applications not sourced in the Android Market."
I've read up and there should be a check box in the applications menu that allows unknown sources. The trouble is there is no applications menu.
Any idea on how to fix this?
Thanks in advance!
If you have sqlite3 on your desktop or your Nook, you can just do:
Code:
adb pull /data/data/com.android.providers.settings/databases/settings.db settings.db
sqlite3 settings.db
update secure set value=1 where name='install_non_market_apps';
.q
adb push settings.db /data/data/com.android.providers.settings/databases/settings.db
Sqlite
I haven't used Sqlite before. I downloaded it. Do I just run the text you posted in the dos box?
Also, do I need to have the nook attached through usb?
Well, you have to have ADB working however you use ADB.
That's either WiFi or USB.
The quoted code is normally what you enter.
check in dos box that you have sqlite3 command available. Also you need working android debug bridge (adb) working, through wifi or usb, in your case it would probably be through wifi. I do not recommend you to continoe unless you learn something about adb and make it work. (search forum or use google)
the rest is piece of cake. first (adb) command from #2 downloads one database from nook. Another 3 commands opens that database locally, changes the security setings that enables installation of non-market application and quits sqlite3 client.
last command uploads the changed database back to nook.
ADB?
Thanks for getting back to me. Unfortunately, I really don't know what ADB is.
I haven't used any of these tools. Can you give me a little more detail? I'd hate to make a mistake and screw something up.
Thanks again!
Mark
Sqlite
Thanks for the instructions. I was able to turn on the ADB bridge using adbWireless and connect the device.
I'm confused about the command line in SQLite3. I entered everything as listed, but nothing happens. I don't want to copy over the settings.db until I know it has been changed.
What should SQLite say if I have entered in the command properly?
Thanks again
Code:
sqlite3 settings.db
update secure set value=1 where name='install_non_market_apps';
select value from secure where name='install_non_market_apps';
.q
As you can see I have added one 'select' command into sql section. If your database has been updated properly, select command should print new value 1 (before zero).
I have written this command right now, don't have a chance to test it but it should work.. at least it cannot screw up anything.
Sqlite
I'm entering everything as is and either I get
...> with nothing after it
or
Error: near "sqlite3": syntax error.
In either case, the select command does not tell me if it is updated.
Again, sorry for asking so many times. I'm close!!
Sqlite
I figured out what I was doing. I opened the SqLite window separately when it should have all be in the one cmd window.
So what exactly did this do? I keep getting the same error message that it can't install non market apps. Is there a menu setting I should change?
Thanks again
Got it
Just rebooted and now it's working. Thanks!!
A simpler way to do this, assuming you've used something like GlowNooter and is to go into Nook Color Tools and uncheck and recheck the Non-Market Installs. This will allow you to sideload.

ADB Pull Error

I am getting the following error when I try to pull a TWRP backup from my Nexus 4. Can anyone please help?
Code:
remote object '/sdcard/TWRP' does not exist
It doesn't exist there. /sdcard/ is really a symlink. The actual location is /data/media/0/TWRP, but try /storage/emulated/0/TWRP as well.
Next time type "adb shell" to go into the phone, then type:
find / -type d -iname twrp
this will search the entire phone for folders with the name TWRP and list their path.
/ is the root folder of the phone to search in
-type d means search for folders only, leave it out if you want to search for file names
-iname means to search for terms case insensitive
sent from xda premium app
Thanks for the help eksasol. I've tried to pull many different paths and they all return the same remote object does not exist error. I've even tried sudo adb pull, with the same result. I've tried this, find / -type d -iname twrp but, all I get is Permission denied. If anyone else has got some ideas I'd be happy to hear them. Thanks. :good:
If you are using Ubuntu or linux, typing 'find' only search what is in your PC. You get permission denied because you want to search in a root directly that required root permission.
To search for files in your phone, you need to log into your phone by typing "adb shell". TWRP give you root by default, then you can use the find command.
Since you have root by default in TWRP, you don't need to use sudo, also Android do not have "sudo" installed. The correct way to gain root privilege in linux (Android) is by typing: su -
To tell if you have are root, you should see # where your user name is in the command window.
Once you are done finding the path, you need to exit the adb shell in order to make contact with your PC, so just type exit. Only then you can start using "adb pull".
by the way, its "adb pull /data/media/0/TWRP/ \home\username\backup\"
Rememer in linux (Android), it's case sensitive.
OK, I see my mistakes now. I was not exiting adb shell when typing adb pull. Anyway, thanks to your help, everything is working correctly now. Thank you again, I really appreciate it. Now I can flash the 4.4 update safely.
eksasol said:
If you are using Ubuntu or linux, typing 'find' only search what is in your PC. You get permission denied because you want to search in a root directly that required root permission.
...
by the way, its "adb pull /data/media/0/TWRP/ \home\username\backup"
Rememer in linux (Android), it's case sensitive.
Click to expand...
Click to collapse
Thanks for helping me re-learn that linux (Android) is case sensitive

Broken screen - allow su?

I'm trying to control my Nexus 4 using adb commands from computer, but when I type in adb shell and then su on command prompt I can't click "yes" on the dialog box to enable superuser permissions. How can I do this?
For anyone having the same problem, I found a solution. You'll need USB Debugging for most of this.
-Download a program called MyMobiler to your PC
-Connect your phone via usb and use MyMobiler on the pc toolbar to install the app on the phone
-You'll need to grant superuser permissions if your phone is rooted, so in order to do that you'll need to use adb commands from the Android SDK. Open up a command prompt in the platform-tools folder once you've downloaded SDK
-To get past the lock screen use commands from this link. For me (I don't have a pin or anything, I just needed to get out of the lock screen), I typed "adb shell input keyevent 22" to swipe right to the camera app and then "adb shell input keyevent 3" to hit the home button, which got me to my home screen. If you have a pin, you can type in "adb shell input text 1234" and replace 1234 with whatever your pin is
-Now you can control your screen using the commands on the link above (mainly numbers 19-23)
-If all is running correctly (and you have granted superuser permissions to let MyMobiler run on your phone), you can use the arrow keys to navigate throughout the phone
-If you have any problems, you should follow the MyMobiler start guide
I also followed this guide for help. He uses the app androidscreencast, but that didn't work for me, so I went with MyMobiler.

Categories

Resources