First off, I'm brand new to Android development so please bear with me.
My only goal at this point is to add the ability to choose the notification LED color to the Android 2.2 stock mail app (on the Droid). I've searched all over the place and haven't found an existing solution for this yet.
It seems to me like it should be super easy to add this functionality to the stock mail app. I can already choose my sound and vibrate settings, why not the LED color? Toss in some notification.ledARGB = something (plus the few other lines of code to make it work), a list to choose the color and we're good to go.
My problem, though, is I have no idea where to begin to have access to the code of the stock mail app. I would guess it goes something like:
1. Download the apk
2. Somehow open the source
3. Make the changes I need
4. Turn it back into a useable apk
5. Swap out the existing apk with my new modified one on the phone
I really only care about making this work on my own phone, so I'm not worried about signing the apk with a public cert or anything. I'm rooted as well, so no worries there.
Anyone have any insight? If I basically have the right plan of attack, and advice on the specifics? If I'm totally wrong in my approach, any advice on what I should be doing would be greatly appreciated.
Thanks in advance for any help!
I think this app is a part of AOSP, so you don't have to decompile an apk - grab sources and build them.
Well, that certainly makes sense. Just did some digging, and I found a pile of info about getting the source, git, repo, etc.
Naturally I'm a windows user, so it looks like I'll need to get some linux up and running to actually do anything with the source code. Ubuntu is installing as we speak....
Any tips on what to do next for a newbie like me?
Should I follow all the directions to get Eclipse ready to develop on the linux box?
Do I just need to download the Email.git to do what I want?
What do I do with the Email.git once I've gotten it?
Just gonna give this a little bump. I've got my linux box all set up and i've got the entire android source downloaded. I'm not really sure where to go from here, though.
How do I just modify and compile the email app into an apk? Thanks for any forthcoming handholding, guys.
Hey, so I have made an app for customizing some stuff on my Droid 3, but it works on my nexus 7, and cannot get it to load right on my D3 at the momment but that's not the issue. So what it does right now is I have a settings pannel and the only one I have actually coded is Notification background color. It sends the RGB to AccellerometerRotation in Settings.System. I will make it send to custom places once it is done. But I can then retrieve that in app, and use it to set color filter on a preview I have in my app, so bottom line, my code works.
Now, I need to add this code into the SystemUI.apk so that it will automatically run at some point (any point really) like a change in wallpaper or a reboot. I cannot figure out how to acomplish this. I have tried copypasting from JD GUI, adding my code, building apk for smali, and replacing the smali, but it doesn't work, either force crash or no systembar. I have tried to do this method on both ImageWallpaper class and the SystemUIService class, neither worked. At this point I'm totally stumped as to what to do. I assume adding my own class that would run but TBH, I am totally beat with trying anymore alone. Sometimes, its best to just let someone else take the wheel for a bit haha.
If anyone can help me finish my app, I am rewarding $40 Via PayPal for completion, which Is hopefully insentive enough for all you greedy people to assist haha.
So if any of you know how to do this, i can post the code (will be annoying till I get internet back) if needed, but ide prefer not until I get power and internet. Thanks in advance for all the responses!
I see you all viewing lol, can I get some responses <3 still stuck. I might try to just convert my java to smali and insert it into the existing smali but idk
This is incredibly ridiculous. Why is there a limit on how many messages I can send in a certain period of time? I would like to know if there is any way to remove it. I have searched relentlessly.
1. settings.db doesn't exist anymore and therefore cannot be changed to set a custom limit.
2. I'm rooted, have EX kernel and Pure Nexus 7.1.1 ROM. Neither support changing the limit natively.
Decimation001 said:
This is incredibly ridiculous. Why is there a limit on how many messages I can send in a certain period of time? I would like to know if there is any way to remove it. I have searched relentlessly.
1. settings.db doesn't exist anymore and therefore cannot be changed to set a custom limit.
2. I'm rooted, have EX kernel and Pure Nexus 7.1.1 ROM. Neither support changing the limit natively.
Click to expand...
Click to collapse
The limit is probably set by your carrier. If that's the case you won't be able to change it in the ROM or phone build prop.
jhs39 said:
The limit is probably set by your carrier. If that's the case you won't be able to change it in the ROM or phone build prop.
Click to expand...
Click to collapse
Is it in the build prop? There wasn't a limit on a different phone.
Decimation001 said:
Is it in the build prop? There wasn't a limit on a different phone.
Click to expand...
Click to collapse
The limit just started when you got the 6P? How long were you using the phone before the limit became an issue? Are you on stock or a custom ROM? Who is your phone carrier? Are you using a stock SMS Program or different one? Maybe someone will have an answer if you provide more information. What is the limit, by the way? Do you know? I know that the program Automate limits texts as a security precaution. Maybe a third party program is causing the issue. Have you tried booting into safe mode and seeing if the limit still exists?
jhs39 said:
The limit just started when you got the 6P? How long were you using the phone before the limit became an issue? Are you on stock or a custom ROM? Who is your phone carrier? Are you using a stock SMS Program or different one? Maybe someone will have an answer if you provide more information. What is the limit, by the way? Do you know? I know that the program Automate limits texts as a security precaution. Maybe a third party program is causing the issue. Have you tried booting into safe mode and seeing if the limit still exists?
Click to expand...
Click to collapse
The limit is on my 6P running Resurrection Remix 7.1.1 on francoKernel. NOT on my other Note5 which is 6.0.1 stock kernel and ROM. Both are/were on T-Mobile. Both use Textra. Not sure what the limit is.
Decimation001 said:
The limit is on my 6P running Resurrection Remix 7.1.1 on francoKernel. NOT on my other Note5 which is 6.0.1 stock kernel and ROM. Both are/were on T-Mobile. Both use Textra. Not sure what the limit is.
Click to expand...
Click to collapse
Maybe something went wrong when you installed your custom ROM or Kernel. I've never heard of a text message limit on the Nexus 6P. You get an error message when you try and send a text saying you have reached the limit and the text can't be sent? Or is it a size limit? Or a limit to the number of recipients you can send a message to? I've heard of limits on the latter two but not on total number of messages that can be sent. At least not in North America.
jhs39 said:
Maybe something went wrong when you installed your custom ROM or Kernel. I've never heard of a text message limit on the Nexus 6P. You get an error message when you try and send a text saying you have reached the limit and the text can't be sent? Or is it a size limit? Or a limit to the number of recipients you can send a message to? I've heard of limits on the latter two but not on total number of messages that can be sent. At least not in North America.
Click to expand...
Click to collapse
The limit was both on Pure Nexus and RR. It limits how many messages I can send to anyone within a certain amount of time. I can still press "accept" to send but it's really annoying and spams me.
That kind of sounds like you might have malware/adware installed on your phone. You might want to download something like Malwarebytes and do a scan of your phone.
The SMS limit is built into Android. Previous to N it was a setting that could be altered in the build.prop and an option to change it was baked into RR. With N the settings were moved into the framework (from what I could find it appears it the telephony section?) and the option to change the setting was not baked into the new ROMs.
I have made several posts requesting info on how to change this - but, no one has responded (either they don't know, don't care, or haven't seen my posts). I need this option for work so badly I'm willing to learn how to build my own ROM. But, not worth getting started if I don't know how to fix the one important thing I need changed.
shaneaus said:
The SMS limit is built into Android. Previous to N it was a setting that could be altered in the build.prop and an option to change it was baked into RR. With N the settings were moved into the framework (from what I could find it appears it the telephony section?) and the option to change the setting was not baked into the new ROMs.
I have made several posts requesting info on how to change this - but, no one has responded (either they don't know, don't care, or haven't seen my posts). I need this option for work so badly in selling to learn how to build my own ROM. But, not worth getting started if I don't know how to fix the one important thing I need changed.
Click to expand...
Click to collapse
If the limit is built into Android why is nobody else having the same problem as you? Do you do something with your SMS that the average user doesnt't? Are you using your SMS to send advertising to large numbers of people, for instance?
jhs39 said:
If the limit is built into Android why is nobody else having the same problem as you? Do you do something with your SMS that the average user doesnt't? Are you using your SMS to send advertising to large numbers of people, for instance?
Click to expand...
Click to collapse
I don't understand why you are even asking this... I appreciate you willingness to help out. But... If you can't help out - just don't respond. You have exhibited that you don't have any knowledge of the settings we are speaking of - AND, I explained the setting is now in the framework. So, unless you know of a way to modify the framework without building a custom ROM - then, please stop implying that we don't have an issue - just because you don't understand what the issue is...
Your first response "The limit is probably set by your carrier" was uneducated speculation.
Your second response included several questions the OP had answered in his original post - he stated he had researched the issue, was using a custom rom/kernel... Then, you followed that up by more speculation: "Maybe a third party program is causing the issue. ."
Your third response isn't helpful as you merely question the OP's knowledge that he even knows he has an issue: "I've never heard of a text message limit on the Nexus 6P." Basically, you just admit your ignorance of there being an issue: " I've heard of limits on the latter two but not on total number of messages that can be sent." Which would imply to most that you won't have any knowledge of how to fix said issue.
Your forth response is to suggest there is malware? Again implying that the OP has no idea about what they are speaking.
Finally, when I post and explain that the setting was once there and easily modified with a build.prop change and that the code was moved...
You again imply that we have some sort of 'phantom issue:' "why is nobody else having the same problem as you?"
If you don't know the answer why waste our time? Do a search and you could easily find another post or two here on XDA in which I explained my situation/problem...
Once again, if you can help - we will surely appreciate any assistance! But, if you don't KNOW how to help; please, don't continue to ask questions which suggest we don't know what we are talking about.
@Decimation001 - I did some research and inside the framework there are two sections related to "telephony" (which is where it appears the settings were moved). Seems they are ODEX files. Might be able to de-compile, make a correction, re-compile, replace in current ROM. I'll start looking into it over the next week or so.
I guess you can keep talking to yourself then.
I have got the same problem. I want to sent to silvester round about 140 SMS to my people and got the message because of the limit.
shaneaus said:
Once again, if you can help - we will surely appreciate any assistance! But, if you don't KNOW how to help; please, don't continue to ask questions which suggest we don't know what we are talking about.
@Decimation001 - I did some research and inside the framework there are two sections related to "telephony" (which is where it appears the settings were moved). Seems they are ODEX files. Might be able to de-compile, make a correction, re-compile, replace in current ROM. I'll start looking into it over the next week or so.
Click to expand...
Click to collapse
Can you give me the names of the files? I know how to compile and recompile so I'd be happy to try and make some modifications.
jhs39 said:
I guess you can keep talking to yourself then.
Click to expand...
Click to collapse
No need to get your feelings hurt. But, I'm not here to "just talk to people" or socialize. I'm here to attempt to solve an issue. If you can assist - then, I will be very grateful for any assistance!
@Decimation001:
Here is the old build.prop method (posted from a member on another Android forum:
"Note: If you move to Marshmallow this will not work anymore as the file "settings.db" is irrelevant under Android 6.0 (annoying but true)
You need:
Root
something like Root explorer and sqLite editor
Open this file: /data/data/com.android.providers.settings/databases/settings.db
Go to "global" subsection, then look for the following two entries
"sms_outgoing_check_max_count" and "sms_outgoing_check_interval_ms"
If they don't exist (by default they aren't there) then create them.
Set the first one to whatever you want (its the maximum number of texts you can send per timeframe (eg.1000)
Set the second one to whatever timeframe you are measuring in millisecond units (eg. 1800000)
My settings were
sms_outgoing_check_max_count 1000
sms_outgoing_check_interval_ms 1800000
This example limits my texts to 1000 messages every 30 minutes
Close file, making sure to save saving if requested to do so.
Reboot system. The new settings will override the Android internal ones.
Hacked "
However, I sent him a PM and he does not know how to make the change in the newer versions of Android. From research I did it appeared that Android moved this setting into the Framework under "Telephony" and you can see that in the structure here:
https://www.researchgate.net/figure...-Android-Telephony-system-architecture-from-6
I've been trying to look for the merge/change in the files here:
https://android.googlesource.com/platform/frameworks/opt/telephony/
I haven't found the specific change/code yet.
However, if you use Root Explorer in an installed ROM - you might find the relevant code by unpacking/searching here:
/system/framework/telephony-common.jar/classes.dex
/system/framework/telephony-ext.jar/classes.dex
I'll try to keep looking for the change in the source code - should have occurred during the transition from Android 5.0 to 6.0....
shaneaus said:
No need to get your feelings hurt. But, I'm not here to "just talk to people" or socialize. I'm here to attempt to solve an issue. If you can assist - then, I will be very grateful for any assistance!
@Decimation001:
Here is the old build.prop method (posted from a member on another Android forum:
"Note: If you move to Marshmallow this will not work anymore as the file "settings.db" is irrelevant under Android 6.0 (annoying but true)
You need:
Root
something like Root explorer and sqLite editor
Open this file: /data/data/com.android.providers.settings/databases/settings.db
Go to "global" subsection, then look for the following two entries
"sms_outgoing_check_max_count" and "sms_outgoing_check_interval_ms"
If they don't exist (by default they aren't there) then create them.
Set the first one to whatever you want (its the maximum number of texts you can send per timeframe (eg.1000)
Set the second one to whatever timeframe you are measuring in millisecond units (eg. 1800000)
My settings were
sms_outgoing_check_max_count 1000
sms_outgoing_check_interval_ms 1800000
This example limits my texts to 1000 messages every 30 minutes
Close file, making sure to save saving if requested to do so.
Reboot system. The new settings will override the Android internal ones.
Hacked "
However, I sent him a PM and he does not know how to make the change in the newer versions of Android. From research I did it appeared that Android moved this setting into the Framework under "Telephony" and you can see that in the structure here:
https://www.researchgate.net/figure...-Android-Telephony-system-architecture-from-6
I've been trying to look for the merge/change in the files here:
https://android.googlesource.com/platform/frameworks/opt/telephony/
I haven't found the specific change/code yet.
However, if you use Root Explorer in an installed ROM - you might find the relevant code by unpacking/searching here:
/system/framework/telephony-common.jar/classes.dex
/system/framework/telephony-ext.jar/classes.dex
I'll try to keep looking for the change in the source code - should have occurred during the transition from Android 5.0 to 6.0....
Click to expand...
Click to collapse
I found the files. It's SmsUsageMonitor.class in telephony-common.jar. It has the values:
Code:
this.mLimit.set(Settings.Global.getInt(this.mContext.getContentResolver(), "sms_outgoing_check_max_count", 30));
this.mPeriod.set(Settings.Global.getInt(this.mContext.getContentResolver(), "sms_outgoing_check_interval_ms", 60000));
Now the problem is recompiling and making it a jar again.
@shaneaus Dang dude, chill out...
Hungry hustler said:
@shaneaus Dang dude, chill out...
Click to expand...
Click to collapse
I am very "chill." Don't understand why you made the comment.
@Decimation001 That is awesome! It took me quite awhile to hunt down different forum threads to find out where the settings had been moved. I was all prepared to attempt to start learning how to compile/decompile those files! But, between working 70 hrs/wk, spending one night with my kids, one night with my girlfriend, and monitoring my home which is under construction - I just haven't had the time! My partner who shares responsibility for sending out the texts for the contract work we schedule is anxiously waiting on my finding a solution! I'm hoping you can re-compile the file!
I'm just concerned at this point that this would have to be done every single time a new version of a ROM is used... Wondering if it could be made into a flashable .zip file which would only change that line of code changing the 30 to 200 or 300....
In any case - is this something we could just extract the classes.dex file, use apktool to decompile, change "30" to "300", recompile, and push the altered .dex file back into place? I understand using "tools" isn't the best way to go - but, I won't have much time to devote to this for the next 4-6 months. So, if apktool will do the trick for now... I'm willing.
Decimation001 said:
I found the files. It's SmsUsageMonitor.class in telephony-common.jar. It has the values:
Code:
this.mLimit.set(Settings.Global.getInt(this.mContext.getContentResolver(), "sms_outgoing_check_max_count", 30));
this.mPeriod.set(Settings.Global.getInt(this.mContext.getContentResolver(), "sms_outgoing_check_interval_ms", 60000));
Now the problem is recompiling and making it a jar again.
Click to expand...
Click to collapse
Ok, I figured out how to decompile the "classes.dex" file using baksmali. However, I can't find the Telephony-common.jar file.
I have found similar code here: out/com/Android/internal/telephony/SmsUsageMonitor$SettingsObserver.smali
".line 248
const-string/jumbo v2, "sms_outgoing_check_max_count"
const/16 v3, 0x1e"
Also, in this file: SmsUsageMonitor$SettingsObserverHandler.smali
" .line 263
const-string/jumbo v1, "sms_outgoing_check_max_count""
But, I don't know how to modify it as it isn't in the format I'm accustomed to seeing... From what I read it is in a smali syntax and I don't know how to modify this code.
@Decimation001 - any ideas?
---------- Post added at 02:54 AM ---------- Previous post was at 02:17 AM ----------
Decimation001 said:
I found the files. It's SmsUsageMonitor.class in telephony-common.jar. It has the values:
Code:
this.mLimit.set(Settings.Global.getInt(this.mContext.getContentResolver(), "sms_outgoing_check_max_count", 30));
this.mPeriod.set(Settings.Global.getInt(this.mContext.getContentResolver(), "sms_outgoing_check_interval_ms", 60000));
Now the problem is recompiling and making it a jar again.
Click to expand...
Click to collapse
shaneaus said:
Ok, I figured out how to decompile the "classes.dex" file using baksmali. However, I can't find the Telephony-common.jar file.
I have found similar code here: out/com/Android/internal/telephony/SmsUsageMonitor$SettingsObserver.smali
".line 248
const-string/jumbo v2, "sms_outgoing_check_max_count"
const/16 v3, 0x1e"
Also, in this file: SmsUsageMonitor$SettingsObserverHandler.smali
" .line 263
const-string/jumbo v1, "sms_outgoing_check_max_count""
But, I don't know how to modify it as it isn't in the format I'm accustomed to seeing... From what I read it is in a smali syntax and I don't know how to modify this code.
@Decimation001 - any ideas?
Click to expand...
Click to collapse
Ok... Looks like if I change the hexadecimal "0x1e" (means 30) below to "0x12c" (means 300), save, recompile using baksmali, and re-insert into my ROM it should work?:
out/com/Android/internal/telephony/SmsUsageMonitor$SettingsObserver.smali
".line 248
const-string/jumbo v2, "sms_outgoing_check_max_count"
const/16 v3, 0x1e"
Ok. I think I did it. I extracted the "telephony-common.jar" file from system/framework. I used 7zip to open it and took the classes.dex file out. I placed the classes.dex file into my smali/baksmali folder, decomplied, changed the above line of code in the manner indicated, recompiled.... I opened telephony-common.jar back up (confirmed that classes.dex was not present), copied the newly updated classes.dex file into telephony-common.jar. I placed it into a folder on the device. Using the app Root Explorer I had two tabs open and deleted the original telephony-common.jar file and immediately copy/pasted the new one in it's place. Just to be sure it worked I extracted the classes.dex file again and decompiled it to confirm.
I'll test it out tomorrow with a mass text to all of my sub-contractors. If it works - I'll edit/post the detailed instructions on the first post in this thread.
I'm building a WearOS app and would want to utilize on device speech to text convertor. Is there an example or api documentation I can refer. My search ends up with Gboard, which is not what I am looking for.
The app is something like virtual assistant and listens to user's voice.
You can try mp3 to text converter. It is cheap, fast, and easy to use. Also, you can choose between Automatic and Manual Transcription Services. It depends on your needs, budget, and time.
I registered finally! been reading this site for years. (for like ten phones worth).
I just wanted to ask, if the app is/went well? You did not get good response to your question, and well, that bummed me out. (nice try McLellan, but too little too late, truly).
I would assume you would want to utilize Google's speech to text engine, to get the text, and then script out what to do with the input yourself. I AM look for an opensource solution to G-S-to-T right now, myself....
-JJ
Yeah OK, 2019 was a triumphant year for people that use their voice to a keyboard: https://venturebeat.com/2019/08/16/google-open-sources-live-transcribes-speech-engine/
now I just gotta figure out why AICP is not, using it.....
So, I fixed my problem. Gboard, for whatever reason, had rendered itself useless. So using Aurora, I uninstalled, re-installed , configured, and now i can talk out my SMS text messages in public to all-who-can-hear-me's annoyance. And, I can still talk to the voices in my head and look sane too (and my phone don't even need to be on! just in my hand.) I have never tried WearOS, but, I might need to look that up, cuz I keep hearing about it. Good luck to you and such.
-JJ