Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

apk request to try to get this working on full android smartwatches (amazfit pace) #8

Open
caoHenriques opened this issue Jul 19, 2018 · 7 comments

Comments

@caoHenriques
Copy link

Hi,

first of all, congratulations for this amazing project.

it is possible to sideload many standalone Wear OS apps for smartwatches running android
some of them need the android wear framework, but then they work properly

I would like to try to get this working on my amazing pace, and if I'm succeed I will share with others, many people could benefit of your software.

could you please provide the apk? I cannot do it through the google play

thank you very much

@caoHenriques
Copy link
Author

sorry my question was noob, the apk was in the realise folder.

I cannot install the app, it says INSTALL_FAILED_OLDER_SDK
I guess your app was compiled for a newer version of android

The amazfit pace, and other Chinese smartwatches run android 5.1
do you think we could get your app running after compile the project for a older version of the android?

thank you

@caoHenriques
Copy link
Author

so I figured out how to install,

I use apk easy tool to change the min sdk version down to 7 and target version to 24
I removed this line

I could install the app on my watch, but it crashed when start

Can you modify slightly the app in order to work in our watches?

I guess it will be simple, this is like a regular smartphone, with gyro and accelerometer, the difference is the screen size

other sleep track apps work here, but it is impossible to use them due to the small screen

cheers

@fridgecow
Copy link
Owner

I have actually previously looked into this - doing exactly the same as you, reducing the min SDK version for someone else.

The issue is that I am using the Google Wear SDK, which includes a set of libraries only available on Wear OS devices. It's possible to re-write the app without using these, but it's a bigger job than I'm willing to take on.

These libraries provide a lot of conveniences, such as UI elements designed specifically for watches, ambient display functionality, and the like.

@caoHenriques
Copy link
Author

Hi,

thank you very much for the reply.
will this method provide the libraries for your app to work on the amazfit?
https://forum.xda-developers.com/smartwatch/amazfit/dev-android-wear-framework-t3781906

I tried it, but the app still crashes on startup, is there something I'm missing?

cheers

@fridgecow
Copy link
Owner

fridgecow commented Jul 27, 2018 via email

@caoHenriques
Copy link
Author

hi,

thank you for the reply, I did not release how to get the debug log from wear app, but I got it with the logcat.

I hope this may help:
--------- beginning of crash

E/AndroidRuntime( 2036): FATAL EXCEPTION: main

E/AndroidRuntime( 2036): Process: com.fridgecow.smartalarm, PID: 2036

E/AndroidRuntime( 2036): java.lang.NoClassDefFoundError: Failed resolution of: Lcom/fridgecow/smartalarm/TrackerService;

E/AndroidRuntime( 2036): at com.fridgecow.smartalarm.MainActivity.onCreate(MainActivity.java:109)

E/AndroidRuntime( 2036): at android.app.Activity.performCreate(Activity.java:5990)

E/AndroidRuntime( 2036): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)

E/AndroidRuntime( 2036): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2278)

E/AndroidRuntime( 2036): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387)

E/AndroidRuntime( 2036): at android.app.ActivityThread.access$800(ActivityThread.java:151)

E/AndroidRuntime( 2036): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)

E/AndroidRuntime( 2036): at android.os.Handler.dispatchMessage(Handler.java:102)

E/AndroidRuntime( 2036): at android.os.Looper.loop(Looper.java:135)

E/AndroidRuntime( 2036): at android.app.ActivityThread.main(ActivityThread.java:5254)

E/AndroidRuntime( 2036): at java.lang.reflect.Method.invoke(Native Method)

E/AndroidRuntime( 2036): at java.lang.reflect.Method.invoke(Method.java:372)

E/AndroidRuntime( 2036): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)

E/AndroidRuntime( 2036): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)

E/AndroidRuntime( 2036): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.fridgecow.smartalarm.TrackerService" on path: DexPathList[[zip file "/system/framework/com.google.android.wearable.jar", zip file "/data/app/com.fridgecow.smartalarm-1/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]

E/AndroidRuntime( 2036): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)

E/AndroidRuntime( 2036): at java.lang.ClassLoader.loadClass(ClassLoader.java:511)

E/AndroidRuntime( 2036): at java.lang.ClassLoader.loadClass(ClassLoader.java:469)

E/AndroidRuntime( 2036): ... 14 more

E/AndroidRuntime( 2036): Suppressed: java.lang.NoClassDefFoundError: com.fridgecow.smartalarm.TrackerService

E/AndroidRuntime( 2036): at dalvik.system.DexFile.defineClassNative(Native Method)

E/AndroidRuntime( 2036): at dalvik.system.DexFile.defineClass(DexFile.java:226)

E/AndroidRuntime( 2036): at dalvik.system.DexFile.loadClassBinaryName(DexFile.java:219)

E/AndroidRuntime( 2036): at dalvik.system.DexPathList.findClass(DexPathList.java:321)

E/AndroidRuntime( 2036): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:54)

E/AndroidRuntime( 2036): ... 16 more

E/AndroidRuntime( 2036): Suppressed: java.lang.ClassNotFoundException: com.fridgecow.smartalarm.TrackerService

E/AndroidRuntime( 2036): at java.lang.Class.classForName(Native Method)

E/AndroidRuntime( 2036): at java.lang.BootClassLoader.findClass(ClassLoader.java:781)

E/AndroidRuntime( 2036): at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)

E/AndroidRuntime( 2036): at java.lang.ClassLoader.loadClass(ClassLoader.java:504)

E/AndroidRuntime( 2036): ... 15 more

E/AndroidRuntime( 2036): Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available

@fridgecow
Copy link
Owner

Sorry for the late reply - it's a strange issue, potentially relating to the way the APK was built (?). I'm not sure how to proceed, but will keep this in mind as something to work on in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants