If possible, I'd like to find or code a widget that toggled the speakerphone setting for the car dock, since the stupid thing always forgets it should be checked.
Most of the widgets I've seen are pretty good at firing whatever intent is necessary to get to the appropriate settings (or better yet, toggling it directly).
Does anyone know how to easily discover what intent is fired so I can code a widget and not have to do the following steps during a phone call?
Arrow right to second dock page
Tap Settings
Tap Systems Settings
Scroll down to Dock
Tap Audio
Tap Speakerphone option to check.
Why do ppl keep on doing this plz post this in the right area. the devs are going to move this to Q&A.
Hold up.
So you're saying that "Nexus One Android Development" is NOT the place to ask an API/Development question?
When I ask for an Intent I'm asking for information about something I am perfectly willing to CODE.
Or is "Nexus One Android Development" only for ROM development related questions? Cause if so, they should just rename it: "Nexus One Custom ROM Development" so as not to confuse developers asking hacking/developer questions for app dev.
Randy
I use locale app. and a plugin called locale power source. I have definied what to happen when i plug on power i do that in my car. It's also starts when plug power in at home, but i can live whit that.
Sent from my Nexus One
well, you might not need to code but if you do, i'm sure some ppl would appreciate it. the reason i say you might not need to code is that I know the issue you are talking about and i have experienced it off and on (no pun intended) but since frf83 i haven't experienced the problem and I use the CCH (custom car home) app which is free in the market. it has a settings page that allows you to lock it on speakerphone when docked as well as bluetooth. Another option is using quickdesk. just put dock setting son your quick desk page and although it might take you 3 key strokes to turn on speakerphone it might not be as bad as writing code for a widget that will take up memory and still make you do at least one key stroke. but if you write the code, i'm sure it'll be appreciated.
Did you try decompiling with apktool and looking at the manifest?
No but I definitely will try that. I did find an app that is open source and looked at the code. It uses the AudioManager class and sets the speakerphone option on when it receives the dock intent. However, it is not at all clear from that or the Android documentation that this reroutes audio to the dock speakerphone instead of the one in the phone. I do not believe that it does so I need to determine how the dock app apk sends an intent to bring up those settings. I was hoping someone with experience coding toggle widgets such as gps, lock etc discovered how to bypass the ui and pragmatically change the settings in an arbitrary app.
Randy
Sent from my Nexus One using Tapatalk
eViL D: said:
Did you try decompiling with apktool and looking at the manifest?
Click to expand...
Click to collapse
Did that to GoogleCarHome.apk. Found the manifests file, and I see that it looks for the CAR_DOCK events, but there's no source
So I either need the Java source to it that shows which setting it's getting to determine the off/on state, or the Java source to the Android settings app which sets this independently of the Car App.
I'll continue ripping stuff apart until I find it. If it's in the Settings I wonder if that means it's part of AOSP. If so that might be the way to go. However, I'm not on a Linux box and am not equipped to do native Android development, just APK development using Eclipse + SDK.
Randy
Prod1702 said:
Why do ppl keep on doing this plz post this in the right area. the devs are going to move this to Q&A.
Click to expand...
Click to collapse
I disagree with what you are saying enough to post a reply to it.
The OP is asking a legitimate development related question.
Darn, so nobody knows?
Apologies if it has been asked - didn't find it in a quick search. Anyone used a regular NFC sticker successfully instead of a 20 skip? I really like the idea but would easily make my own. I have tons of tectiles and NFC stickers just kicking around. Heck, even NFC keychains that I'm not using...
I haven't tried it, but if someone can scan a Skip with a phone without the Skip unlock we can make our own.
The Skip is a regular NFC chip with a code, I *think* it is '*motoskip########'
I forget the exact format, but that is close.
According to official docs, you can use non-Skip tags only if you've initially used a Skip tag to activate the app.
Sent from my Moto X
johnny grep said:
According to official docs, you can use non-Skip tags only if you've initially used a Skip tag to activate the app.
Sent from my Moto X
Click to expand...
Click to collapse
I suspect they aren't white listing UUIDs in the app itself so it's either a payload on the tag (which should be fairly simple to replicate in theory) or they are calling home to verify UUIDs. I may have to buy one if I keep the moto x just to find out for sure which is accurate (if someone else doesn't first).
I got a SKIP and you can't scan it with the moto x because the skip app intercepts NFC read.
When I scanned the Skip with a SGS4 the tag payload was close to '*motoskip########'
But since I don't have an non-motox to test with at the moment I can't check right now.
Let me see if I can later. And the Skip comes with 4 tages, the clip on (which I lost on the first day, right after dropping my X) and 3 stickers.
As far as I know any of the 4 can be the master so you shouldn't need anything special.
If I remember correctly the tags are 64kb NXP NFC chips.
#LearnFromMyFail Don't buy a Cellphone while on Vacation
Yoshiofthewire said:
I got a SKIP and you can't scan it with the moto x because the skip app intercepts NFC read.
When I scanned the Skip with a SGS4 the tag payload was close to '*motoskip########'
But since I don't have an non-motox to test with at the moment I can't check right now.
Let me see if I can later. And the Skip comes with 4 tages, the clip on (which I lost on the first day, right after dropping my X) and 3 stickers.
As far as I know any of the 4 can be the master so you shouldn't need anything special.
If I remember correctly the tags are 64kb NXP NFC chips.
#LearnFromMyFail Don't buy a Cellphone while on Vacation
Click to expand...
Click to collapse
Just for reference, you don't need *any* skip tags to set up skip. When you set up the NFC lock screen you get the option to tap your skip to enable. If you use a standard tag (I used an already encoded NTAG203) it will erase this tag and over-write the data set with the appropriate data set. This will then serve as your "master" nfc tag (it's also encoded as a skip tag).
The dump looks like it's an external mime: urn:nfc:ext:motorola.com:xring with a data set that is numeric (I haven't done any sort of testing to find any correlation between the payload, device id, uuid, etc but it's a numeric data set.
Serious effort to reverse engineer and change the "OK Google Now" activation phrase
I just got my Moto X dev edition today, and I plan to try and reverse engineer the activation phrase code in order to change it. I'm going to start by decompiling the touchless application, but I think it will be far more difficult and deeper in the system than that.
Does anyone know where the activation phrase is actually stored? Does anyone know anything about the internal structure of the touchless stuff? And finally, is anyone aware of any other attempts to do this so I can collaborate with them?
Thanks!
glitch003 said:
I just got my Moto X dev edition today, and I plan to try and reverse engineer the activation phrase code in order to change it. I'm going to start by decompiling the touchless application, but I think it will be far more difficult and deeper in the system than that.
Does anyone know where the activation phrase is actually stored? Does anyone know anything about the internal structure of the touchless stuff? And finally, is anyone aware of any other attempts to do this so I can collaborate with them?
Thanks!
Click to expand...
Click to collapse
I got no idea about any of your questions. I wanted to say that doing what your doing would be a very cool feature so thanks for the effort if you get anything going.
I also wanted to mention that I know the OK Google Now phrase is processed on the phone. The voice commands first get processed through Motorola's touchless control app or processes then if it is not recognized as a command it can deal with it then uploads it to google owned google now app. This is why you sometimes get different looking dialers or screens when sending texts depending on if Moto touchless controls handled the action or if google now handled the action.
Just thought of this but I bet it is extremely hard to do what you are doing because no one has created apps to use the low power processor so i presume its locked up somewhere in the phone.
a small start
So, I decompiled the Touchless APK and opened it in Eclipse. I found some interesting stuff in strings.xml, but I think it's just the strings that are displayed to prompt the user This one stood out to me though:
Code:
<string name="hello_moto">OK Google Now</string>
Could it be that the phrase was originally going to be "hello moto" but when Google bought Motorola they changed it for branding purposes?
I think these other string names indicate that could be the case:
Code:
<string name="training_say_hello_moto">Say OK Google Now…</string>
<string name="training_second_hello_moto">Say OK Google Now a second time…</string>
<string name="training_third_hello_moto">Say OK Google Now a third time…</string>
<string name="training_final_hello_moto">Say OK Google Now a final time…</string>
Anyway, if someone wants to change that hello_moto string in the strings.xml file to something else, it might be worth a shot. I can't test any of this yet, because I can't root my phone because it has a spec of dirt under the lens and I'm mailing it back to Motorola to get fixed. But if somebody out there with the knowledge to change this setting in the strings.xml file of the apk wants to try it, I think it's a promising lead.
Hello moto would be cool.. Much better than the OK Moto Magic that was also on the cards... That would just be embarrassing! Good luck man
Sent from my XT1058 using Tapatalk 4
That application is an almighty mess. It has a tremendous amount of classes named things like "a", "aa", "ab", and so forth. Right now, I'm trying to make an Xposed module to send an intent to Tasker rather then start Motorola's interface when the key phase is said. This has been a nightmare of its own. I'm going to start digging for the start phase in earnest once I get this part done.
Sent from my Galaxy Nexus using XDA Premium 4 mobile app
hawkjm73 said:
That application is an almighty mess. It has a tremendous amount of classes named things like "a", "aa", "ab", and so forth. Right now, I'm trying to make an Xposed module to send an intent to Tasker rather then start Motorola's interface when the key phase is said. This has been a nightmare of its own. I'm going to start digging for the start phase in earnest once I get this part done.
Sent from my Galaxy Nexus using XDA Premium 4 mobile app
Click to expand...
Click to collapse
Names like that usually indicate that the code was obfuscated . I would be stunned if they coded it that way!
@glitch003 any luck with this?
Sent from non rooted motoX :'(
I'd totally change "Ok Google Now" to "Jarvis" if I ever had the chance.
hawkjm73 said:
That application is an almighty mess. It has a tremendous amount of classes named things like "a", "aa", "ab", and so forth. Right now, I'm trying to make an Xposed module to send an intent to Tasker rather then start Motorola's interface when the key phase is said. This has been a nightmare of its own. I'm going to start digging for the start phase in earnest once I get this part done.
Sent from my Galaxy Nexus using XDA Premium 4 mobile app
Click to expand...
Click to collapse
It's meant to be an almighty mess, so people like us struggle for months to figure out what the code actually does and to prevent copying of their code
While I haven't been able to change the wakeup phrase, I have changed what happens when you say it. With Tasker, I am able to launch AutoVoice and/or !utter instead of Google Now.
This essentially allows you to control your entire phone with voice, while it's still in your pocket.
Kev1000000 said:
While I haven't been able to change the wakeup phrase, I have changed what happens when you say it. With Tasker, I am able to launch AutoVoice and/or !utter instead of Google Now.
This essentially allows you to control your entire phone with voice, while it's still in your pocket.
Click to expand...
Click to collapse
what exactly are you not launching? From my understanding Moto's runs their own voice recognition stuff, then when it can't recognize the command it then sends it to google now. (even though it looks like it is just running googlw now the entire time it is not. So at what point in the process are you hijacking the code? Also, how easily can you use it? Does it take a long time or does it start just as quick as touchless controls/google now was.
jayboyyyy said:
what exactly are you not launching? From my understanding Moto's runs their own voice recognition stuff, then when it can't recognize the command it then sends it to google now. (even though it looks like it is just running googlw now the entire time it is not. So at what point in the process are you hijacking the code? Also, how easily can you use it? Does it take a long time or does it start just as quick as touchless controls/google now was.
Click to expand...
Click to collapse
It's pretty easy. I simply use Tasker to detect when the Touchless Controls app becomes the foreground app, then immediately kill its process. After that, I launch AutoVoice. With AutoVoice, I can then say "Search" to bring me to Google Now, or "utter" to launch !utter. I can also say any of my home automation commands like, "Turn off the lights" or "Watch TV."
I essentially use the Touchless Controls app as simply a detection of when the phrase was said, and then launch my own processes that I want to launch once it's detected, and kill the app immediately before it sends any data to Google Now.
It's seamless, and extremely quick.
Kev1000000 said:
It's pretty easy. I simply use Tasker to detect when the Touchless Controls app becomes the foreground app, then immediately kill its process. After that, I launch AutoVoice. With AutoVoice, I can then say "Search" to bring me to Google Now, or "utter" to launch !utter. I can also say any of my home automation commands like, "Turn off the lights" or "Watch TV."
I essentially use the Touchless Controls app as simply a detection of when the phrase was said, and then launch my own processes that I want to launch once it's detected, and kill the app immediately before it sends any data to Google Now.
It's seamless, and extremely quick.
Click to expand...
Click to collapse
you want to run a test with a lock on your phone? I'm interested to know if touchless control bypasses the lock or not. I know it can do certain things with the phone in lock. I would assume the few options we have has to do with the fact that once touchless controls pushes the command to google now because it doesn't recognize it they can no longer keep the phone in a locked state. Anyway, if you could run some tests on that and report back I'm interested. Thanks in advance.
I'd like to help
Hey could you upload the apk?
Although I haven't done any reverse engineering before but I have a lot of spare time right now and I'd like to try and help. I just got a developer edition of the Moto X and annoyingly it doesn't seem like there's any easy way to root it right now, since it came with the newest update(at least as far as I can tell).
The only reason that matters to this is that I can't get the apk off of the device, as I don't have the sufficient permissions for data/app. If there's another way to do this then please let me know too!
Thanks
EDIT: nevermind, I realized there's a way to root it if I just unlock the device.
Recompiling with signature
I'm not sure if there is still any interest in this, but I've been trying to work on it nonetheless as a personal project.
This is my first time doing any sort of reverse engineering, and my worry is that we won't be able to sign the app after modifying it.
From what I've read of using apktool, it seems that if you want to keep the signatures you have to move the modified files you have back into the original apk.
Problem is, on OS X there doesn't seem to be a good way to open apks and modify them. Can someone else try and see if it can be recompiled and reinstalled?
Thanks
I messed with this for a short while. I found you can do it just by training. I was able to say "OK f$%& Wad", "OK Moto" and "OK Siri" (joke for my wife). I thought it was due to hex editing some files but that was only a coincidence. Train a phrase using "OK [your word] Now". Sometimes it is tough. Now most of the time you can start it with only "OK [your word]". They use some of the Nuance sdk. Nuance app looks for syllables if I read correctly. I will dig into the files again to see if it can be done more easily. All we need is one guy shouting the phrase and 10 phones want to react. ?
Good luck.
DroidJunk said:
I messed with this for a short while. I found you can do it just by training. I was able to say "OK f$%& Wad", "OK Moto" and "OK Siri" (joke for my wife). I thought it was due to hex editing some files but that was only a coincidence. Train a phrase using "OK [your word] Now". Sometimes it is tough. Now most of the time you can start it with only "OK [your word]". They use some of the Nuance sdk. Nuance app looks for syllables if I read correctly. I will dig into the files again to see if it can be done more easily. All we need is one guy shouting the phrase and 10 phones want to react. ?
Good luck.
Click to expand...
Click to collapse
Well the idea is that we want this to work even if you don't say OK, and you should be able to just say anything you want. Also, it should work without having to try many times.
On a side note, I've run into the issue where basically I can not install on top of the app because it's installed as a system app. I'm not too sure if there's any way to get around this besides removing the permissions check from the device which would be a huge security hole. I also don't even know if that itself will work..
It is probably a signature issue. I have a complete deodex of the original KK dump. If you sign with the same key that might help. You can verify by looking at your logcat when trying to install. Check out data/data/blabla audiomonitor. In the files Dir there is a file svsid_trigger. This is recreated each time you train. I would believe it to be a voice sample if you want to call it that. There are other files in there that when opened show the phrase OK Google now. This is where I hex edited but it did nothing. It will even run without some of these files. My theory is one of these files contains a sample of what it should look like. Decompiling the apk is about as messy as you described. When you check the prefs you see the phrase is set to custom phrase which appears to be a function/class. This also gets rewritten when the phone is booted. Curious to see what happens. I really expect Google or moto to change this. It just does not make sense to have all the phones responding to the same thing. Even with training others can activate it. I was watching a video on the phone and that activated it. LOL
DroidJunk said:
It is probably a signature issue. I have a complete deodex of the original KK dump. If you sign with the same key that might help. You can verify by looking at your logcat when trying to install. Check out data/data/blabla audiomonitor. In the files Dir there is a file svsid_trigger. This is recreated each time you train. I would believe it to be a voice sample if you want to call it that. There are other files in there that when opened show the phrase OK Google now. This is where I hex edited but it did nothing. It will even run without some of these files. My theory is one of these files contains a sample of what it should look like. Decompiling the apk is about as messy as you described. When you check the prefs you see the phrase is set to custom phrase which appears to be a function/class. This also gets rewritten when the phone is booted. Curious to see what happens. I really expect Google or moto to change this. It just does not make sense to have all the phones responding to the same thing. Even with training others can activate it. I was watching a video on the phone and that activated it. LOL
Click to expand...
Click to collapse
I know it's a signature issue when I am trying to install it, but even when I uninstall and install again, I get a permissions issue because it's not installed as a system app.
Also, changing the value of the audio file is interesting, but the problem is that unless we know the algorithms to generate the audio files, I don't know how we can adjust that. It seems cleaner to just go into the code and remove the checks altogether. On the other hand, it takes more investigating, and right now I am completely blocked on this. I don't have much time to mess with this anymore unfortunately, but I do want to try to remove the permissions altogether and see if it will let me install the app as a user app.
Synderesis said:
I know it's a signature issue when I am trying to install it, but even when I uninstall and install again, I get a permissions issue because it's not installed as a system app.
Also, changing the value of the audio file is interesting, but the problem is that unless we know the algorithms to generate the audio files, I don't know how we can adjust that. It seems cleaner to just go into the code and remove the checks altogether. On the other hand, it takes more investigating, and right now I am completely blocked on this. I don't have much time to mess with this anymore unfortunately, but I do want to try to remove the permissions altogether and see if it will let me install the app as a user app.
Click to expand...
Click to collapse
Check here when you get around to decompiling audiomonitor.apk. \AudioMonitor.apk\smali\com\motorola\audiomonitor\uis\training. It might be a good start. I use to be good at smali, but it has been a couple of years.
I was wondering if there was any way to add MAP to the bluetooth profiles to add messaging support for receiving texts in the car. I see that Moto left out this profile for some reason and I kind of miss that feature. I wasn't sure if there was a way to add this and reflash the radio drivers to the phone.
My phone is an unlocked Dev Edition XT1060 on 4.4.
htmwrx said:
I was wondering if there was any way to add MAP to the bluetooth profiles to add messaging support for receiving texts in the car. I see that Moto left out this profile for some reason and I kind of miss that feature. I wasn't sure if there was a way to add this and reflash the radio drivers to the phone.
My phone is an unlocked Dev Edition XT1060 on 4.4.
Click to expand...
Click to collapse
I am not quite sure what you are asking. Do you want to have messages from other programs read out from Moto Assist?
Or do you want to have your texts read out over a different BT profile?
It might not be quite what you are looking for but this app (http://forum.xda-developers.com/showthread.php?t=2123493) was mentioned in this thread (http://forum.xda-developers.com/showthread.php?t=2599230) regarding bluetooth operation in Kitkat.
mechanical tool said:
I am not quite sure what you are asking. Do you want to have messages from other programs read out from Moto Assist?
Or do you want to have your texts read out over a different BT profile?
It might not be quite what you are looking for but this app (http://forum.xda-developers.com/showthread.php?t=2123493) was mentioned in this thread (http://forum.xda-developers.com/showthread.php?t=2599230) regarding bluetooth operation in Kitkat.
Click to expand...
Click to collapse
Not exactly. On my previous phone, when I received a text message, the message would be sent to the car via bluetooth and read aloud. The Bluetooth profile used is called MAP, or Message Access Profile. Motorola did not include this profile in their drivers, presumably to encourage users to use the moto assist feature . I was wondering if it was possible to add this profile and reflash the updated radio drivers. But this may also include adding lines of code to the rom itself. I was unsure if this was even probable to do.