Hello. I have the latest Android SDK and Eclipse w/ADT set up on my Ubuntu 10.10 box. I have tried many examples and wrote my own practice apps. Everything so far has worked well!
My goal is to modify the stock MMS app so that I can modify the Delete functionality to require a pin or password. This will help keep my 11 and 13 year old children's texting clean and under control. (yes, I understand that they could install another MMS app, but thats something I can watch for too)
I'm a well seasoned programmer (c/c++/php/bash) and I'm just learning java/Android API. I thought this project would be a great place to start...
My problem is, I can't build the mms app at all. I have used git to download the approriate sources:
Code:
[email protected]sktop:~/dev$ git clone git://android.git.kernel.org/platform/packages/apps/Mms.git
I then created a new workspace in Eclipse, and created a new Android project, where I imported from existing source. In the "problems" tab in Eclipse, I get:
Code:
1,464 errors, 112 warnings, 0 others (filter matched 200 of 1576 items)
Errors (100 of 1464 items)
Description Resource Path Location Type
AcknowledgeInd cannot be resolved to a type RetrieveTransaction.java /ConversationList/src/com/android/mms/transaction line 222 Java Problem
Description Resource Path Location Type
AcknowledgeInd cannot be resolved to a type RetrieveTransaction.java /ConversationList/src/com/android/mms/transaction line 222 Java Problem
...
...
Description Resource Path Location Type
Addr cannot be resolved AddressUtils.java /ConversationList/src/com/android/mms/util line 47 Java Problem
...
...
Description Resource Path Location Type
ArrayListCursor cannot be resolved to a type RecipientsAdapter.java /ConversationList/src/com/android/mms/ui line 208 Java Problem
...
...
etc
Basically tons of errors. Its almost like an include path isn't set properly somewhere.
Can anybody help me to get this to compile, then I can begin modifying and testing my changes!
thanks!
I think you'll need a good portion of the AOSP source tree to get all the base framework stuff needed to compile this.
Ok thanks, pulling down the AOSP tree now. I'll retry once its pulled down and report back here if I have more problems
Compile Mms Eclair AOSP using Eclipse
hello to all,
can anyone point me how to edit/compile a 'default/vanilla' mms app of AOSP using Eclipse?
I'm currently using ubuntu 10.04 with the with android sdk's for Eclair and Froyo and I was trying to compile the Eclair Mms
Hello! I can't write in Soft Development section, so I'm writing here.
I need to make a build of any Android-x86 with HCE ability. I tried to modify common Android-x86 and CM builds but did not succeed. Now I'm experimenting with Bliss-x86. The problem is that even when I define NFC service to be built into the image it doesn't appear in the OS.
So, what I have now:
- "external/libnfc-nci", "external/libnfc-nxp" and "packages/apps/Nfc" packages are defined as default in manifest.xml
- PRODUCT_PACKAGES parameter includes "Nfc" string in device/generic/common/device.mk and in packages.mk
- android.hardware.nfc.xml and android.hardware.nfc.hce.xml files are to be copied into the image
When I resync the android tree, I see that NFC related files are fetched from the server. But after the building I don't see /system/apps/Nfc.apk file and /data/data/com.android.nfc folder. NFC service is not starting on boot. I assume it's not compiled at all. Why that happens? The build process goes OK.
What exactly should I do to enable Nfcservice in my build?
Well, I solved the issue by defining "NfcNci" in device.mk (not "Nfc"). There also may be additional packets to include, e.g. "libnfc-nci", "libnfc-nxp", "libnfc_nci_jni", "Tag", "com.android.nfc_extras".
Custom Watchfaces for the Amazfit Pace/Stratos
Spun off from this thread New watchface for the Amazfit watch
So I wanted to fix the custom watchfaces that were looking really cool and don't work with the WFZ system so here is how to do it.
Disclaimers:
I am not an Android or Java developer, so expect some rookie mistakes (I usually do C#)
If you do this it is at your own risk!
I do not provide the original Huami APK/odex files. You will have to source them your self.
I also do not have a Pace, only a Stratos so this is not tested on the Pace.
Credit where credit is due
I did not come up with any of this, I just fixed it to work with the latest HuamiWatchFaces code.
Most of the credit goes to Manual Alvarez (manvel7650) whose code is here.
And the original thread at XDA Developers here
The other watchfaces come from Fabio Barbon(DrBourbon) whose code is here
Known Issues
Fixed for now!!!
Prerequisites
Currently you will need to be able to build this code and have the original Huami code to build against.
Android Studio
Android SDK version 21 (Android Studio should prompt you)
ADB (should come with Android Studio)
The HuamiWatchFaces.odex or HuamiWatchFaces2.odex from you watch (read below)
An older HuamiWatchFaces.odex (read below)
oat2dex (here)
dex2jar (here
This repo
Getting the HuamiWatchFaces files
To get the odex files needed for your watch, connect it via USB.
Then use a terminal/console to:
For Pace
adb pull /system/app/HuamiWatchFaces/mips/HuamiWatchFaces.odex
To streamline the instructions further rename the downloaded file to HuamiWatchFaces2.odex
For Statos
adb pull /system/app/HuamiWatchFaces/mips/HuamiWatchFaces2.odex
Then you will need an older one, i suggest downloading the APK from here. The link is below the image.
Converting the files to jars
You will need to convert the odex and dex files in to JAR files so the code can build against it.
java -jar oat2dex.jar -a 22 odex HuamiWatchFaces2.odex
d2j-dex2jar.sh HuamiWatchFaces2.dex
You should see some GLITCH: zero-width instruction messages
One of them is HardwareList, this is a problem and we will fix it.
Make sure the result is named HuamiWatchFaces2.jar (rename if not)
Now get the older HuamiWatchFaces file. Open the APK with something like 7Zip and extract the classes.dex and then:
d2j-dex2jar.sh classes.dex
Now you should have 2 jar files, the HuamiWatchFaces2.jar and probably classes-dex2jar.jar.
Open both of them with something like 7Zip again don’t extract them, just open and go to com\ingenic\iwds in both.
In your target jar (HuamiWatchFaces2) delete the HardwareList.class, and in your donor (classes-dex2jar) extract the HardwareList.class.
NEW In your target jar (HuamiWatchFaces2) also delete com\huami\watch\watchface\slpt\Lock\LowPowerClock.class
Now place the HardwareList.class in your target jar so it looks the same as before but now with the HardwareList.class from your donor.
Great! You should now have a working HuamiWatchFaces2.jar.
Building the repo
If you haven’t already, clone the repo to your PC.
Now take your HuamiWatchFaces2.jar and place it in app\src\main\java\es\malvarez\mywatchfaces\libs.
Open the project with Android Studio and build the project with gradle (click the hammer icon in the top left bar).
This should complete with no errors.
You should now have the APK in app\build\outputs\apk.
Installing the APK
adb install app/build/outputs/apk/debug/app-debug.apk
Or you can take the release one.
After installing you should have these watchfaces
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Reserved.
I don't mean to sound like a noob, but is there an easier method to doing this?
I have 0 knowledge of android studio and coding in general and I'm struggling with this a little bit. I got to converting the odex to dex file and gave up haha.
I really like your watchface though and I appreciate the effort
@x3malex
I completely understand and it is in the plans. The biggest issue is that I can only make it for Windows easily at the moment and it is a bit dependent on 7zip.
It would be a powershell script in the first version.
The reason it's not high on the priority list right now is the lockscreen issue. I want to fix that first.
Currently it is a bit one step forward, two steps backwards as it is a bit of a hassle to debug because the watch won't lock when connect via usb to logcat.
When that is fixed I will start working on a more automated solution.
So, I fixed the lockscreen issue finally (at least I think I did this time). It seems to work nicely now.
The bad news is I had to add a (slightly) modified file from the original assemblies, I don't like that and hopefully fix that soon. This also means you need to remove that from the JAR file, the same as with HardwareList.
The next step is automate most of the procedure, but the first version will be Windows only. Sorry about that.
Edit: My github readme.md is being difficult. The enters after most of the important text are not showing. Strange thing is that it works in my local text editors (including Android Studio) and dillinger.io... So if anyone knows how to fix that, please.
LOTG said:
So, I fixed the lockscreen issue finally (at least I think I did this time). It seems to work nicely now.
The bad news is I had to add a (slightly) modified file from the original assemblies, I don't like that and hopefully fix that soon. This also means you need to remove that from the JAR file, the same as with HardwareList.
The next step is automate most of the procedure, but the first version will be Windows only. Sorry about that.
Click to expand...
Click to collapse
Just to let you know, I've had no DMCA requests (or any complaints at all) for uploading reversed and repackaged JAR files for the launcher to create homescreen pages, so I doubt they'd do it for watchfaces either
You can also remove unused classes from the JAR file, which makes any watchfaces created with it smaller
And if you use powershell, it means you use dotnet.
Did you know that with dotnet core 2 you can write sw that runs on Windows,Linux and mac?
If you need help with that, just contact me
@Quinny899
I'l think about it, and I'll look into unneeded files. Any easy way to check? Android Studio was pretty sure that LowPowerClock was not needed, but it disagreed with that while trying to run it. The dependency chain is not great.
I think the best solution overall would be to ditch the whole Huami system and build a new watch face system on top of the low-level stuff. This also leaves the door open for a new XML based watch face system. However, that is quite time-consuming (and who has time nowadays) and to do that I would rather use a language and environment I'm more familiar with.
@fzelle
Yes, I've build some software in .net core 2.0, but the problem is you will need to install the runtime for it. Not a big issue for Windows (I think it get's pushed through Windows Update), but Mac/Linux users might not be as enthusiastic. So I'm thinking about trying to create a bash variant. I'll need to look into a test setup for that though.
@Quinny899
I'l think about it, and I'll look into unneeded files. Any easy way to check? Android Studio was pretty sure that LowPowerClock was not needed, but it disagreed with that while trying to run it. The dependency chain is not great.
I think the best solution overall would be to ditch the whole Huami system and build a new watch face system on top of the low-level stuff. This also leaves the door open for a new XML based watch face system. However, that is quite time-consuming (and who has time nowadays) and to do that I would rather use a language and environment I'm more familiar with.
@fzelle
Yes, I've build some software in .net core 2.0, but the problem is you will need to install the runtime for it. Not a big issue for Windows (I think it get's pushed through Windows Update), but Mac/Linux users might not be as enthusiastic. So I'm thinking about trying to create a bash variant. I'll need to look into a test setup for that though.
LOTG said:
@Quinny899
I'l think about it, and I'll look into unneeded files. Any easy way to check? Android Studio was pretty sure that LowPowerClock was not needed, but it disagreed with that while trying to run it. The dependency chain is not great.
I think the best solution overall would be to ditch the whole Huami system and build a new watch face system on top of the low-level stuff. This also leaves the door open for a new XML based watch face system. However, that is quite time-consuming (and who has time nowadays) and to do that I would rather use a language and environment I'm more familiar with.
@fzelle
Yes, I've build some software in .net core 2.0, but the problem is you will need to install the runtime for it. Not a big issue for Windows (I think it get's pushed through Windows Update), but Mac/Linux users might not be as enthusiastic. So I'm thinking about trying to create a bash variant. I'll need to look into a test setup for that though.
Click to expand...
Click to collapse
I checked manually but there aren't a huge amount of classes required for the pages. Use jd-gui to view the jar and note down which classes are used, delete those that aren't
@LOTG
I don't think that it's that hard to install on linux or mac, did the same for a modified AmazfitExporter ( the phone db, not the pace db ).
https://github.com/FZelle/Amazfit_CoreExporter
Could not find below step
unable to find the lowpowerclock.class in the step "NEW In your target jar (HuamiWatchFaces2) also delete com\huami\watch\watchface\slpt\Lock\LowPowerClock. class "
but i tried with the jar and the code base given. I am getting below error
Information:Gradle tasks [:app:assembleDebug]
Warning:The specified Android SDK Build Tools version (25.0.2) is ignored, as it is below the minimum supported version (26.0.2) for Android Gradle Plugin 3.0.1.
Android SDK Build Tools 26.0.2 will be used.
To suppress this warning, remove "buildToolsVersion '25.0.2'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.
C:\Users\DELL\Desktop\Build APK 15 march\amazfit-watchfaces-Development\app\src\main\java\com\ravenliquid\watchfaces\Utility.java
Error3, 39) error: package com.ingenic.iwds.slpt.view.core does not exist
Error4, 39) error: package com.ingenic.iwds.slpt.view.core does not exist
Error5, 39) error: package com.ingenic.iwds.slpt.view.core does not exist
Error6, 39) error: package com.ingenic.iwds.slpt.view.core does not exist
Error16, 52) error: cannot find symbol class SlptLayout
C:\Users\DELL\Desktop\Build APK 15 march\amazfit-watchfaces-Development\app\src\main\java\es\malvarez\mywatchfaces\widget\HasSlptViewComponent.java
C:\Users\DELL\Desktop\Build APK 15 march\amazfit-watchfaces-Development\app\src\main\java\es\malvarez\mywatchfaces\AbstractWatchFace.java
C:\Users\DELL\Desktop\Build APK 15 march\amazfit-watchfaces-Development\app\src\main\java\es\malvarez\mywatchfaces\AbstractWatchFaceSlpt.java
C:\Users\DELL\Desktop\Build APK 15 march\amazfit-watchfaces-Development\app\src\main\java\es\malvarez\mywatchfaces\data\MultipleWatchDataListenerAdapter.java
C:\Users\DELL\Desktop\Build APK 15 march\amazfit-watchfaces-Development\app\src\main\java\es\malvarez\mywatchfaces\MalvarezWatchFace.java
Error3, 33) error: package com.huami.watch.watchface does not exist
Error24, 31) error: cannot find symbol class AbstractSlptClock
C:\Users\DELL\Desktop\Build APK 15 march\amazfit-watchfaces-Development\app\src\main\java\es\malvarez\mywatchfaces\MalvarezWatchFaceSplt.java
Error3, 39) error: package com.ingenic.iwds.slpt.view.core does not exist
C:\Users\DELL\Desktop\Build APK 15 march\amazfit-watchfaces-Development\app\src\main\java\es\malvarez\mywatchfaces\widget\CirclesWidget.java
Error11, 38) error: package com.huami.watch.watchface.util does not exist
Error12, 38) error: package com.ingenic.iwds.slpt.view.arc does not exist
Error13, 38) error: package com.ingenic.iwds.slpt.view.arc does not exist
Error14, 38) error: package com.ingenic.iwds.slpt.view.arc does not exist
Error15, 39) error: package com.ingenic.iwds.slpt.view.core does not exist
Error16, 39) error: package com.ingenic.iwds.slpt.view.core does not exist
Error17, 40) error: package com.ingenic.iwds.slpt.view.sport does not exist
Error18, 40) error: package com.ingenic.iwds.slpt.view.sport does not exist
Error19, 40) error: package com.ingenic.iwds.slpt.view.sport does not exist
Error20, 40) error: package com.ingenic.iwds.slpt.view.utils does not exist
Error253, 17) error: cannot find symbol class SlptViewComponent
C:\Users\DELL\Desktop\Build APK 15 march\amazfit-watchfaces-Development\app\src\main\java\es\malvarez\mywatchfaces\widget\HeartRateWidget.java
Error9, 39) error: package com.ingenic.iwds.slpt.view.core does not exist
Error10, 39) error: package com.ingenic.iwds.slpt.view.core does not exist
Error11, 40) error: package com.ingenic.iwds.slpt.view.sport does not exist
Error67, 17) error: cannot find symbol class SlptViewComponent
C:\Users\DELL\Desktop\Build APK 15 march\amazfit-watchfaces-Development\app\src\main\java\es\malvarez\mywatchfaces\widget\MalvarezClock.java
Error9, 38) error: package com.huami.watch.watchface.util does not exist
Error10, 39) error: package com.ingenic.iwds.slpt.view.core does not exist
Error11, 39) error: package com.ingenic.iwds.slpt.view.core does not exist
Error12, 39) error: package com.ingenic.iwds.slpt.view.core does not exist
Error13, 39) error: package com.ingenic.iwds.slpt.view.core does not exist
Error14, 39) error: package com.ingenic.iwds.slpt.view.core does not exist
Error15, 39) error: package com.ingenic.iwds.slpt.view.core does not exist
Error16, 42) error: package com.ingenic.iwds.slpt.view.digital does not exist
Error17, 42) error: package com.ingenic.iwds.slpt.view.digital does not exist
Error18, 42) error: package com.ingenic.iwds.slpt.view.digital does not exist
Error19, 42) error: package com.ingenic.iwds.slpt.view.digital does not exist
Error20, 42) error: package com.ingenic.iwds.slpt.view.digital does not exist
Error21, 42) error: package com.ingenic.iwds.slpt.view.digital does not exist
Error22, 42) error: package com.ingenic.iwds.slpt.view.digital does not exist
Error23, 42) error: package com.ingenic.iwds.slpt.view.digital does not exist
Error24, 42) error: package com.ingenic.iwds.slpt.view.digital does not exist
Error25, 40) error: package com.ingenic.iwds.slpt.view.sport does not exist
Error26, 40) error: package com.ingenic.iwds.slpt.view.utils does not exist
Error109, 17) error: cannot find symbol class SlptViewComponent
........ deleted last few error lines .........
@suryateja8
Could you provide me with some info about the files you are using? ( Pace/Stratos, firmware version).
@LOTG to use both libraries is only for stratos? Or pace need too?
LOTG said:
@suryateja8
Could you provide me with some info about the files you are using? ( Pace/Stratos, firmware version).
Click to expand...
Click to collapse
@LOTG, Till the step of getting the Jar file i was able to do exactly as mentioned by you. But the step you mentioned to remove the com\huami\watch\watchface\slpt\Lock\LowPowerClock. class, i did not find the path.
So I ignored that and continued to build the APK file. Then i got the attached error.
I am using Pace with ROM Version 1.3.6d
@suryateja8 It seems like the later Pace versions are different from the one I have (I don't have a Pace watch, only a Stratos). I'll try to get the files and see what needs to change for the Pace.
You need the file huamiwatchfaces.odex for latest versions of pacefield versions. But stockfield remains in old file.
LOTG said:
@suryateja8 It seems like the later Pace versions are different from the one I have (I don't have a Pace watch, only a Stratos). I'll try to get the files and see what needs to change for the Pace.
Click to expand...
Click to collapse
I was able to manage the build and compiled the apk successfully( need to fix some errors in the code though).
I have also updated the Time Text watch face to display like how we read time.
suryateja8 said:
I was able to manage the build and compiled the apk successfully( need to fix some errors in the code though).
I have also updated the Time Text watch face to display like how we read time.
Click to expand...
Click to collapse
If you need me to include something just let me know.
I've had a shortage of free time this last week, and I found out that the CN files do not play nice with the US FW for Stratos.
I hope to get all that fixed this week.
suryateja8 said:
I was able to manage the build and compiled the apk successfully( need to fix some errors in the code though).
I have also updated the Time Text watch face to display like how we read time.
Click to expand...
Click to collapse
I've compiled my version of the APK a few days ago but there is a bug in the FuzzyText watchface. It displays the fuzzy text only when the watch is unlocked ("Four o'clock"), then reverts back to a Numbers Text ("Zero Four Zero Zero") when the watch is locked.
Did you fix this issue?