[HELP] Bind to com.android.music service from my app - Nexus One Android Development

Hello!
Like in title... I am developing my app which should to use Android Native Media Player (android.com.htc.music). I found information, how to do it: http://www.adityatalpade.com/2010/07/31/how-to-bind-to-services-from-the-android-source/. Everything is fine, because I can bind to service, but I can use it. Always I have exception: java.lang.RuntimeException: java.lang.SecurityException: Binder invocation to an incorrect interface.
Full exception is: http://android.pastebin.com/Xj7WpiJ3.
I will be appreciate for advice, how to resolve this problem.

gmadajczak said:
Hello!
Like in title... I am developing my app which should to use Android Native Media Player (android.com.htc.music). I found information, how to do it: http://www.adityatalpade.com/2010/07/31/how-to-bind-to-services-from-the-android-source/. Everything is fine, because I can bind to service, but I can use it. Always I have exception: java.lang.RuntimeException: java.lang.SecurityException: Binder invocation to an incorrect interface.
Full exception is: http://android.pastebin.com/Xj7WpiJ3.
I will be appreciate for advice, how to resolve this problem.
Click to expand...
Click to collapse
that is because it is com.android.music

Jr33 said:
that is because it is com.android.music
Click to expand...
Click to collapse
OK... Could you elaborate a little more on that, please?
I know that is from com.android.music package, but according to article, which I mentioned in previous message - it should work.

Related

Teamviewer Quicksupport not working

Teamviewer Quicksupport only gives me a screen with the notification could not load native libraries. please move to phone storage. as it is located there, i can't get this app to work. other people with same issue? and does someone have any info on this feature? will it become available on SGNII or is the compatibility in the play store wrong?
WendigoNL said:
Teamviewer Quicksupport only gives me a screen with the notification could not load native libraries. please move to phone storage. as it is located there, i can't get this app to work. other people with same issue? and does someone have any info on this feature? will it become available on SGNII or is the compatibility in the play store wrong?
Click to expand...
Click to collapse
I got the same issue so I digged deeper:
The problem seems to be a missing library, I get a handled exeption:
Code:
could not load application module:
Cannot load library:
link_image[1892]:
1936 could not load needed library 'libsurfaceflinger_client.so'
for 'libjniscreenshot23.so'
(load_library[1094]: Library 'libsurfaceflinger_client.so' not found)
So I managed to get a libsurfaceflinger_client.so by searching google. According to this XDA Post i tried to push the library to /system/lib/ and then chmod rw-r--r--
After launching the App I now get a Force Close due to an unhandled exception:
Code:
java.lang.NoClassDefFoundError in Class:
com.teamviewer.incomingremotecontrollib.activity.MainActivity in Method:
onCreate()
Any ideas? My guess is that the downloaded library is not for Jelly Bean.
underlines said:
I got the same issue so I digged deeper:
The problem seems to be a missing library, I get a handled exeption:
Code:
could not load application module:
Cannot load library:
link_image[1892]:
1936 could not load needed library 'libsurfaceflinger_client.so'
for 'libjniscreenshot23.so'
(load_library[1094]: Library 'libsurfaceflinger_client.so' not found)
So I managed to get a libsurfaceflinger_client.so by searching google. According to this XDA Post i tried to push the library to /system/lib/ and then chmod rw-r--r--
After launching the App I now get a Force Close due to an unhandled exception:
Code:
java.lang.NoClassDefFoundError in Class:
com.teamviewer.incomingremotecontrollib.activity.MainActivity in Method:
onCreate()
Any ideas? My guess is that the downloaded library is not for Jelly Bean.
Click to expand...
Click to collapse
i contacted Teamviewer with this problem. they are working on the issue, it is indeed a compatibility problem by a missing library in JB. they don't have an ETA on an update just yet.
Im using tm with jb working smootly
Sent from my ADR6300 using xda app-developers app

[DIY][CM 12][Android 5.0] Gear Fit on Non-Samsung Devices with Lollipop

Hello there! I'm new to these parts because I recently acquired a Gear Fit.
TL;DR: I took aooga's stuff (thanks!) and made it work on my CM 12 (5.0.2) phone. I hope it works for you. Get it here.
Anyway, I'm using a Galaxy Nexus running a cm 12 build from Ziyan, and I quickly realized that I needed to do some extra work. Unfortunately, zwegnet's patched Gear Fit Manager didn't work for me, and neither did aooga's very comprehensive guide, so I figured I'd try doing it myself. I see that some of you are interested in how this works, so I'm documenting my process for everyone's benefit (let's collaborate!).
You will learn the basics of:
how to debug using adb logcat
how to disassemble an app (specifically, a dex file) into smali
how to navigate and modify smali code
how to reassemble smali to dex and rebuild the app
how to sign an app for deployment
You will need:
adb
java runtime environment
smali/baksmali
signapk with test keys
I've collected some of the tools for you here; just add adb and java.
1. Debugging
So, we've got Gear Fit Manager and Gear Fitness installed... but Gear Fit Manager crashes! Darn it. How are we gonna connect a Gear Fit? Let's see.
First, let's pop open your favorite terminal (yes, we will be using the command line) and start streaming some logs:
Code:
adb logcat
There should be a bunch of text scrolling through the terminal. While that's going on, try to launch the offending app, and wait until it crashes. As soon as it crashes, hit Ctrl+C in the terminal to stop logging. Look, a fatal exception:
Code:
E/AndroidRuntime(32368): FATAL EXCEPTION: main
E/AndroidRuntime(32368): Process: com.samsung.android.wms, PID: 32368
E/AndroidRuntime(32368): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.samsung.android.wms/com.samsung.android.wms.app.base.ContentsActivity}: android.content.res.Resources$NotFoundException: Resource ID #0x0
E/AndroidRuntime(32368): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2298)
E/AndroidRuntime(32368): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2360)
E/AndroidRuntime(32368): at android.app.ActivityThread.access$800(ActivityThread.java:144)
E/AndroidRuntime(32368): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1278)
E/AndroidRuntime(32368): at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime(32368): at android.os.Looper.loop(Looper.java:135)
E/AndroidRuntime(32368): at android.app.ActivityThread.main(ActivityThread.java:5223)
E/AndroidRuntime(32368): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(32368): at java.lang.reflect.Method.invoke(Method.java:372)
E/AndroidRuntime(32368): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:898)
E/AndroidRuntime(32368): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:693)
E/AndroidRuntime(32368): Caused by: android.content.res.Resources$NotFoundException: Resource ID #0x0
E/AndroidRuntime(32368): at android.content.res.Resources.getValue(Resources.java:1233)
E/AndroidRuntime(32368): at android.content.res.Resources.getDrawable(Resources.java:756)
E/AndroidRuntime(32368): at android.content.res.Resources.getDrawable(Resources.java:724)
E/AndroidRuntime(32368): at com.samsung.android.wms.app.base.WingtipBaseActivity.brandGlowEffect(WingtipBaseActivity.java:136)
E/AndroidRuntime(32368): at com.samsung.android.wms.app.base.WingtipBaseActivity.onCreate(WingtipBaseActivity.java:94)
E/AndroidRuntime(32368): at com.samsung.android.wms.app.base.ContentsActivity.onCreate(ContentsActivity.java:139)
E/AndroidRuntime(32368): at android.app.Activity.performCreate(Activity.java:5933)
E/AndroidRuntime(32368): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1105)
E/AndroidRuntime(32368): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2251)
E/AndroidRuntime(32368): ... 10 more
When you've been bug-hunting for a while, you start to notice these stack traces quite readily, even in a sea of irrelevant output. This one tells us that:
the offending app is named com.samsung.android.wms
a Resources$NotFoundException occurred, likely because the app requested a resource that did not exist
... and so on
Note that the stack trace appears in reverse-chronological order; that is, what happens later appears first. I often like to read these things backwards. Now, have a look at these lines:
Code:
E/AndroidRuntime(32368): at android.content.res.Resources.getDrawable(Resources.java:724)
E/AndroidRuntime(32368): at com.samsung.android.wms.app.base.WingtipBaseActivity.brandGlowEffect(WingtipBaseActivity.java:136)
E/AndroidRuntime(32368): at com.samsung.android.wms.app.base.WingtipBaseActivity.onCreate(WingtipBaseActivity.java:94)
What happened?
a WingtipBaseActivity is created to display the app, and is being initialized in its onCreate method
... which calls brandGlowEffect
... which calls into the Android system
... which eventually leads to the crash
With the entire chain of events exposed to us, we could now look for the culprit! Why don't we examine WingtipBaseActivity.brandGlowEffect? It's the last thing the app does before passing control over to Android, and we're assuming that the app (not Android) is faulty.
2. Disassembly
To do this, we need to take a peek under Gear Fit Manager's hood. An apk file is just a zip file, so we already know how to unpack it. We're interested in the classes.dex within, which contains the executable code. dex is not a very human-readable format, so we need to disassemble it using baksmali.
Firstly, let's extract the classes.dex from the archive. Then, we could disassemble it by running:
Code:
java -jar baksmali.jar -o dexout classes.dex
3. Modification
This generates a folder full of disassembled code. Because we're interested in com.samsung.android.wms.app.base.WingtipBaseActivity, we'll look inside the file dexout/com/samsung/android/wms/app/base/WingtipBaseActivity.smali
There, on line 693, we see the method WingtipBaseActivity.brandGlowEffect getting called from WingtipBaseActivity.onCreate. This looks like some cosmetic fluff that we could dispense with, so let's just delete the line altogether and save the file. Sorry, Samsung, your brand's not gonna glow this time.
4. Reassembly
Now we could re-generate the classes.dex:
Code:
java -jar smali.jar -o classes.dex dexout
... and we'll drop the new classes.dex inside the apk.
5. Signing
But wait! We couldn't install this new apk yet — it needs to be signed. This is easy enough with signapk:
Code:
java -jar signapk.jar testkey.x509.pem testkey.pk8 GearFitManager.apk GearFitManager_signed.apk
6. Deploying
We need to uninstall the original app before we could install the new one, because they were signed using different keys (the original was signed using Samsung's keys). After that, we just need to install and test!
We've barely scratched the surface. I hope this helps someone, and I certainly hope we could team up to make something awesome. I've had a look at the more recent versions of Gear Fit Manager, and I have a feeling a lot more work would be required...
Just when I was about to give up , I found this thread . Thank you so much .
The app finally doesn't crash . But it doesn't seem to be connecting with the Fitness app .
Running Nexus 4 with CyanogenMod 12 , v5.0.2 .
[DIY][CM 12][Android 5.0] Gear Fit on Non-Samsung Devices with Lollipop
Hello there! I'm new to these parts because I recently acquired a Gear Fit.
TL;DR: I took aooga's stuff (thanks!) and made it work on my CM 12 (5.0.2) phone. I hope it works for you. Get it here.
Anyway, I'm using a Galaxy Nexus running a cm 12 build from Ziyan, and I quickly realized that I needed to do some extra work. Unfortunately, zwegnet's patched Gear Fit Manager didn't work for me, and neither did aooga's very comprehensive guide, so I figured I'd try doing it myself. I see that some of you are interested in how this works, so I'm documenting my process for everyone's benefit (let's collaborate!).
You will learn the basics of:
1.how to debug using adb logcat
2.how to disassemble an app (specifically, a dex file) into smali
3.how to navigate and modify smali code
4.how to reassemble smali to dex and rebuild the app
5.how to sign an app for deployment
You will need:
•adb
•java runtime environment
•smali/baksmali
•signapk with test keys
I've collected some of the tools for you here; just add adb and java.
1. Debugging
So, we've got Gear Fit Manager and Gear Fitness installed... but Gear Fit Manager crashes! Darn it. How are we gonna connect a Gear Fit? Let's see.
First, let's pop open your favorite terminal (yes, we will be using the command line) and start streaming some logs:
Code:
adb logcat
There should be a bunch of text scrolling through the terminal. While that's going on, try to launch the offending app, and wait until it crashes. As soon as it crashes, hit Ctrl+C in the terminal to stop logging. Look, a fatal exception:
Code:
E/AndroidRuntime(32368): FATAL EXCEPTION: main
E/AndroidRuntime(32368): Process: com.samsung.android.wms, PID: 32368
E/AndroidRuntime(32368): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.samsung.android.wms/com.samsung.android.wms.app.base.ContentsActivity}: android.content.res.Resources$NotFoundException: Resource ID #0x0
E/AndroidRuntime(32368): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2298)
E/AndroidRuntime(32368): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2360)
E/AndroidRuntime(32368): at android.app.ActivityThread.access$800(ActivityThread.java:144)
E/AndroidRuntime(32368): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1278)
E/AndroidRuntime(32368): at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime(32368): at android.os.Looper.loop(Looper.java:135)
E/AndroidRuntime(32368): at android.app.ActivityThread.main(ActivityThread.java:5223)
E/AndroidRuntime(32368): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(32368): at java.lang.reflect.Method.invoke(Method.java:372)
E/AndroidRuntime(32368): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:898)
E/AndroidRuntime(32368): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:693)
E/AndroidRuntime(32368): Caused by: android.content.res.Resources$NotFoundException: Resource ID #0x0
E/AndroidRuntime(32368): at android.content.res.Resources.getValue(Resources.java:1233)
E/AndroidRuntime(32368): at android.content.res.Resources.getDrawable(Resources.java:756)
E/AndroidRuntime(32368): at android.content.res.Resources.getDrawable(Resources.java:724)
E/AndroidRuntime(32368): at com.samsung.android.wms.app.base.WingtipBaseActivity.brandGlowEffect(WingtipBaseActivity.java:136)
E/AndroidRuntime(32368): at com.samsung.android.wms.app.base.WingtipBaseActivity.onCreate(WingtipBaseActivity.java:94)
E/AndroidRuntime(32368): at com.samsung.android.wms.app.base.ContentsActivity.onCreate(ContentsActivity.java:139)
E/AndroidRuntime(32368): at android.app.Activity.performCreate(Activity.java:5933)
E/AndroidRuntime(32368): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1105)
E/AndroidRuntime(32368): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2251)
E/AndroidRuntime(32368): ... 10 more
When you've been bug-hunting for a while, you start to notice these stack traces quite readily, even in a sea of irrelevant output. This one tells us that:
•the offending app is named com.samsung.android.wms
•a Resources$NotFoundException occurred, likely because the app requested a resource that did not exist
•... and so on
Note that the stack trace appears in reverse-chronological order; that is, what happens later appears first. I often like to read these things backwards. Now, have a look at these lines:
Code:
E/AndroidRuntime(32368): at android.content.res.Resources.getDrawable(Resources.java:724)
E/AndroidRuntime(32368): at com.samsung.android.wms.app.base.WingtipBaseActivity.brandGlowEffect(WingtipBaseActivity.java:136)
E/AndroidRuntime(32368): at com.samsung.android.wms.app.base.WingtipBaseActivity.onCreate(WingtipBaseActivity.java:94)
What happened?
1.a WingtipBaseActivity is created to display the app, and is being initialized in its onCreate method
2.... which calls brandGlowEffect
3.... which calls into the Android system
4.... which eventually leads to the crash
With the entire chain of events exposed to us, we could now look for the culprit! Why don't we examine WingtipBaseActivity.brandGlowEffect? It's the last thing the app does before passing control over to Android, and we're assuming that the app (not Android) is faulty.
2. Disassembly
To do this, we need to take a peek under Gear Fit Manager's hood. An apk file is just a zip file, so we already know how to unpack it. We're interested in the classes.dex within, which contains the executable code. dex is not a very human-readable format, so we need to disassemble it using baksmali.
Firstly, let's extract the classes.dex from the archive. Then, we could disassemble it by running:
Code:
java -jar baksmali.jar -o dexout classes.dex
3. Modification
This generates a folder full of disassembled code. Because we're interested in com.samsung.android.wms.app.base.WingtipBaseActivi ty, we'll look inside the file dexout/com/samsung/android/wms/app/base/WingtipBaseActivity.smali
There, on line 693, we see the method WingtipBaseActivity.brandGlowEffect getting called from WingtipBaseActivity.onCreate. This looks like some cosmetic fluff that we could dispense with, so let's just delete the line altogether and save the file. Sorry, Samsung, your brand's not gonna glow this time.
4. Reassembly
Now we could re-generate the classes.dex:
Code:
java -jar smali.jar -o classes.dex dexout
... and we'll drop the new classes.dex inside the apk.
5. Signing
But wait! We couldn't install this new apk yet — it needs to be signed. This is easy enough with signapk:
Code:
java -jar signapk.jar testkey.x509.pem testkey.pk8 GearFitManager.apk GearFitManager_signed.apk
6. Deploying
We need to uninstall the original app before we could install the new one, because they were signed using different keys (the original was signed using Samsung's keys). After that, we just need to install and test!
We've barely scratched the surface. I hope this helps someone, and I certainly hope we could team up to make something awesome. I've had a look at the more recent versions of Gear Fit Manager, and I have a feeling a lot more work would be required...
Click to expand...
Click to collapse
Very good explanation.
Thanks to you I was able to path version 1.98 and it works the media control, I can upload new watches styles using Watch Styler for Fit.
What doesn't work is the App connect. All applications say that I have to install Gear Manager Fit first.
It's working on my Nexus 4 with 5.0.1. I also updated the gear fit to the last firmware and it connects perfectly.
I attach it.
Help
bronxgsi said:
Very good explanation.
Thanks to you I was able to path version 1.98 and it works the media control, I can upload new watches styles using Watch Styler for Fit.
What doesn't work is the App connect. All applications say that I have to install Gear Manager Fit first.
It's working on my Nexus 4 with 5.0.1. I also updated the gear fit to the last firmware and it connects perfectly.
I attach it.
Click to expand...
Click to collapse
I installed the zip by renaming it as an apk but when I try to pair it give the same confirmation but doesn't finish pairing please help... I have Nexus 5 it has stock 5.0.1 rooted as well.
I haven't been able to sync the Fitness with Gear app either, even with Samsung Account installed per Virnik0's recommendation.
I believe this stack trace is relevant:
Code:
D/SessionInputStream(29439): move remain data to first index / mTotalDataLength : 83 mTotalReceivedLength : 88
W/SessionManager(29439): notifyDataReceived port : 2
I/SessionManager(29439): mBinderMap.get action:com.samsung.android.wms.communication.session_manager_for_interanalbinder:115174198
I/SessionManager(29439): listener.onDataReceived is called
V/DataExchangeManager(29439): SessionManagerEventListener onDataReceived
W/DataExchangeManager(29439): From : HEALTH, Attempt to invoke interface method 'void com.samsung.android.wms.service.communication.DataExchangeManager$OnDataReceivedListener.onDataReceived(com.samsung.android.wms.service.communication.WingtipApp, byte[])' on a null object reference
W/DataExchangeManager(29439): java.lang.NullPointerException: Attempt to invoke interface method 'void com.samsung.android.wms.service.communication.DataExchangeManager$OnDataReceivedListener.onDataReceived(com.samsung.android.wms.service.communication.WingtipApp, byte[])' on a null object reference
W/DataExchangeManager(29439): at com.samsung.android.wms.service.communication.DataExchangeManager$InternalHandler.handleMessage(DataExchangeManager.java:126)
W/DataExchangeManager(29439): at android.os.Handler.dispatchMessage(Handler.java:102)
W/DataExchangeManager(29439): at android.os.Looper.loop(Looper.java:135)
W/DataExchangeManager(29439): at android.app.ActivityThread.main(ActivityThread.java:5223)
W/DataExchangeManager(29439): at java.lang.reflect.Method.invoke(Native Method)
W/DataExchangeManager(29439): at java.lang.reflect.Method.invoke(Method.java:372)
W/DataExchangeManager(29439): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:898)
W/DataExchangeManager(29439): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:693)
It seems that it actually connected to Samsung's servers, but had some trouble handling the response. I'll investigate this sometime...
will1549 said:
I installed the zip by renaming it as an apk but when I try to pair it give the same confirmation but doesn't finish pairing please help... I have Nexus 5 it has stock 5.0.1 rooted as well.
Click to expand...
Click to collapse
Same here -- I'd blame the differences among ROMS
I actually haven't been able to get any recent versions working, myself...
inportb said:
I haven't been able to sync the Fitness with Gear app either, even with Samsung Account installed per Virnik0's recommendation.
I believe this stack trace is relevant:
Code:
D/SessionInputStream(29439): move remain data to first index / mTotalDataLength : 83 mTotalReceivedLength : 88
W/SessionManager(29439): notifyDataReceived port : 2
I/SessionManager(29439): mBinderMap.get action:com.samsung.android.wms.communication.session_manager_for_interanalbinder:115174198
I/SessionManager(29439): listener.onDataReceived is called
V/DataExchangeManager(29439): SessionManagerEventListener onDataReceived
W/DataExchangeManager(29439): From : HEALTH, Attempt to invoke interface method 'void com.samsung.android.wms.service.communication.DataExchangeManager$OnDataReceivedListener.onDataReceived(com.samsung.android.wms.service.communication.WingtipApp, byte[])' on a null object reference
W/DataExchangeManager(29439): java.lang.NullPointerException: Attempt to invoke interface method 'void com.samsung.android.wms.service.communication.DataExchangeManager$OnDataReceivedListener.onDataReceived(com.samsung.android.wms.service.communication.WingtipApp, byte[])' on a null object reference
W/DataExchangeManager(29439): at com.samsung.android.wms.service.communication.DataExchangeManager$InternalHandler.handleMessage(DataExchangeManager.java:126)
W/DataExchangeManager(29439): at android.os.Handler.dispatchMessage(Handler.java:102)
W/DataExchangeManager(29439): at android.os.Looper.loop(Looper.java:135)
W/DataExchangeManager(29439): at android.app.ActivityThread.main(ActivityThread.java:5223)
W/DataExchangeManager(29439): at java.lang.reflect.Method.invoke(Native Method)
W/DataExchangeManager(29439): at java.lang.reflect.Method.invoke(Method.java:372)
W/DataExchangeManager(29439): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:898)
W/DataExchangeManager(29439): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:693)
It seems that it actually connected to Samsung's servers, but had some trouble handling the response. I'll investigate this sometime...
Same here -- I'd blame the differences among ROMS
I actually haven't been able to get any recent versions working, myself...
Click to expand...
Click to collapse
My problem getting the Bluetooth pair to GFM. On version 1.49 for lollipop it was but not this zip
will1549 said:
My problem getting the Bluetooth pair to GFM. On version 1.49 for lollipop it was but not this zip
Click to expand...
Click to collapse
It works. Sort of. Basically it asks for update every time I connect to my Fit. That update then fail due to different signing keys, but then it works.
I have used the version from OP
Virnik0 said:
It works. Sort of. Basically it asks for update every time I connect to my Fit. That update then fail due to different signing keys, but then it works.
I have used the version from OP
Click to expand...
Click to collapse
My problem is it only pair Bluetooth but never connect gear fit manager to the gear fit it keeps send verification codes.
bronxgsi said:
Very good explanation.
Thanks to you I was able to path version 1.98 and it works the media control, I can upload new watches styles using Watch Styler for Fit.
What doesn't work is the App connect. All applications say that I have to install Gear Manager Fit first.
It's working on my Nexus 4 with 5.0.1. I also updated the gear fit to the last firmware and it connects perfectly.
I attach it.
Click to expand...
Click to collapse
This one works fine! Thanks for sharing!
---------- Post added at 10:43 PM ---------- Previous post was at 10:25 PM ----------
Virnik0 said:
This one works fine! Thanks for sharing!
Click to expand...
Click to collapse
BTW, we'll need version 1.102, and original genuine keys. so, once you'll compile/smali odex, just add it to original APK, that shall do it, otherwise we won't be able to use any gear app plugin
I don't know why it doesn't pair... Sorry I'm not an expert in this issue.
Virnik0 said:
This one works fine! Thanks for sharing!
---------- Post added at 10:43 PM ---------- Previous post was at 10:25 PM ----------
BTW, we'll need version 1.102, and original genuine keys. so, once you'll compile/smali odex, just add it to original APK, that shall do it, otherwise we won't be able to use any gear app plugin
Click to expand...
Click to collapse
I tried to patch the last versión (GearFitManager_NL1_1.111.1216_USER.apk) but it doesn't pair. The original one, in a G2 with KitKat doesn't pair neither.
I was able to use all the plugins from App connect patching the "dexout\com\samsung\android\sdk\cup\Scup.smali" file to not to check the keys. Just changing:
if-eq v1, v6, :cond_e2
to
if-ne v1, v6, :cond_e2
The problema is that I had to patch every App I want to use and it is a little tedious. Maybe we can make an script or a program to automatically doing it...
Dunno what will be best way to do this now. I have a very little time to do any coding nowadays. But at least version 1.98 works fine. Running RR 5.2.9 (CM12 - Android 5.0.2) on GT9300. Pairing works correctly
A script would be wonderful
pcp12 said:
A script would be wonderful
Click to expand...
Click to collapse
Of course!!!
Works on my Nexus 5 (the APK in the first post)
I'll try to patch the last release
Does this versions just work on cm12? I have GPE lollipop on my s4 and when I connect my phone to the gear fit, the gear fit manager crashes immediately.
poaudet said:
Of course!!!
Works on my Nexus 5 (the APK in the first post)
I'll try to patch the last release
Click to expand...
Click to collapse
Because you have to modify ro.product.manufacturer=samsung to something else (like ro.product.manufacturer=GPE) in /system/build.prop
Reboot after modification is done and you should be OK.
BTW, SGS5 does have LP available for download for more then month, but GFM is the same. Works there fine, because all classes are provided from TW framework.
Virnik0 said:
Because you have to modify ro.product.manufacturer=samsung to something else (like ro.product.manufacturer=GPE) in /system/build.prop
Reboot after modification is done and you should be OK.
BTW, SGS5 does have LP available for download for more then month, but GFM is the same. Works there fine, because all classes are provided from TW framework.
Click to expand...
Click to collapse
Thanks, got it working. Really nice work! [emoji1]
poaudet said:
Of course!!!
Works on my Nexus 5 (the APK in the first post)
I'll try to patch the last release
Click to expand...
Click to collapse
Poaudet do you have a stock rom or another rom? I have a stock nexus 5 with kitkat and i am not about to upgrade to lollipop until my gear fit doesnt have the functionalities that are now working with 4.4.4. Anyone is using a stock nexus 5 with lollipop?
alexxio said:
Poaudet do you have a stock rom or another rom? I have a stock nexus 5 with kitkat and i am not about to upgrade to lollipop until my gear fit doesnt have the functionalities that are now working with 4.4.4. Anyone is using a stock nexus 5 with lollipop?
Click to expand...
Click to collapse
Im using google play edition on my s4. Its like the lollipop on nexus 5 and everything for me is working.
alexxio said:
Poaudet do you have a stock rom or another rom? I have a stock nexus 5 with kitkat and i am not about to upgrade to lollipop until my gear fit doesnt have the functionalities that are now working with 4.4.4. Anyone is using a stock nexus 5 with lollipop?
Click to expand...
Click to collapse
I've stock lollipop rom.
Things that didn't work:
-music control
-everything that need Samsung Account
-Endomondo
-GPS (Gear Navigation, Weather, ...)
Everything else seems to work, with some edit it the apk of Connected App, see the other post in this thread.
I've attached those i've already edit.
Noob question: I flew over the tutorial and didn't really noticed any variable data. Is there something preventing someone from generating and sharing a patched apk of GFM that would work with basically any non-Samsung Lollipop phone ?

[APP] Reset Wear Client - Switch phones without factory reset

Android Wear allows pairing to a new/second phone only after you perform factory reset of Android Wear: "You can switch which phone or tablet your watch is paired with, but you need to reset your watch to factory settings first. Then you can pair your watch to the new phone or tablet." Google Support
It's ok for most people but some just have more devices and want to switch them from time to time. Performing factory reset means compiling apps to aot, retransferring all apps the need to reconfigure all apps (Wear Mini Launcher, anyone?).
There used to be an app BeeLink but it stopped working and was removed.
There's actually way faster way how to set up connection with a new phone - in a minute. Just delete application data of "Google Play Services Wearable" app and reboot. All the 3rd party apps with their configurations, all watch faces with configurations, Google Fit data, and basically everything else will be kept.
Step by step
Wear is connected with phone A so turn off Bluetooth on this phone.
Execute following command on Wear (with ADB enabled - doesn't require root) or run attached app (root on watch required).
Code:
adb shell "pm clear com.google.android.gms && reboot"
Power on Bluetooth on phone B.
Depending whatever devices were paired previously, confirm pairing code or initiate new pairing using following command (thanks @matejdro) or also use the wear app for that
Code:
adb shell "am start -a android.bluetooth.adapter.action.REQUEST_DISCOVERABLE"
Finish setup, let it work for some time and restart both phone B and your watch to properly apply all changes. Done.
Attached apk is for installation on mobile phone (it contains and installs the actual Wear app). It's not on Play Store yet. Let's try it and get some feedback first.
Hi,
Thanks for making this for those of us who know nothing about adb. Unfortunately, I could not get this to work, but I'm certain the error is at my end. I downloaded and installed your apk, but I can't get it to open or find it in the app drawer. Excuse my ignorance. Could you please inform me as to how I can run the apk after installation? I downloaded it on to phone B, which does not have android wear installed, as per your instructions. However, I never got passed step 2 of your guide for the above mentioned reason.
Thank you kindly
moneytoo said:
Android Wear allows pairing to a new/second phone only after you perform factory reset of Android Wear: "You can switch which phone or tablet your watch is paired with, but you need to reset your watch to factory settings first. Then you can pair your watch to the new phone or tablet." Google Support
It's ok for most people but some just have more devices and want to switch them from time to time. Performing factory reset means compiling apps to aot, retransferring all apps the need to reconfigure all apps (Wear Mini Launcher, anyone?).
There used to be an app BeeLink but it stopped working and was removed.
There's actually way faster way how to set up connection with a new phone - in a minute. Just delete application data of "Google Play Services Wearable" app and reboot. All the 3rd party apps with their configurations, all watch faces with configurations, Google Fit data, and basically everything else will be kept.
Run the following command on your pc (with Wear connected and ADB enabled - this doesn't require root) or use my app for switching on-the-go (it requires root on Wear).
Code:
adb shell "pm clear com.google.android.gms && reboot"
Step by step
Wear is connected with phone A so turn off Bluetooth on this phone.
Execute above command or run attached app (root required).
Power on Bluetooth on phone B.
Depending whatever devices were paired previously, confirm pairing code or initiate new pairing.
Done.
Attached apk is for installation on mobile phone (it contains and installs the actual Wear app). It's not on Play Store yet. Let's try it and get some feedback first.
Click to expand...
Click to collapse
rekil goth said:
Hi,
Thanks for making this for those of us who know nothing about adb. Unfortunately, I could not get this to work, but I'm certain the error is at my end. I downloaded and installed your apk, but I can't get it to open or find it in the app drawer. Excuse my ignorance. Could you please inform me as to how I can run the apk after installation? I downloaded it on to phone B, which does not have android wear installed, as per your instructions. However, I never got passed step 2 of your guide for the above mentioned reason.
Thank you kindly
Click to expand...
Click to collapse
this App needs to be Sync'd to the watch so download it to Phone A, which is already paired.
wait until it syncs or manually sync Apps in Wear App on phone A.
when it's availalbe on your watch, then start this procedure.
hmm, just tried this (both ADB command and App installed on watch) with a new phone and I couldn't get it to pair. had to do the watch reset
Not working for me either. Will try the adb route when I can and report back
Finally a solution to my problem.
When i flash a new ROM i have to pair my moto 360 again... And to do this i allways do a reset on my watch...
Next time i will try it and give a feedback.
Not working on moto 360 5.0.2, rooted?
I was trying to figure out this one, but could not found proper app to clear. I cleared GMS, Wear launcher, settings etc. and nothing helped. In the end I found this solution which is even better IMO:
Code:
adb shell am start -a android.bluetooth.adapter.action.REQUEST_DISCOVERABLE
After executing above code via ADB, dialog will pop up on wear asking if you want to make watch discoverable. Then you can find and pair it to any phone.
matejdro said:
I was trying to figure out this one, but could not found proper app to clear. I cleared GMS, Wear launcher, settings etc. and nothing helped. In the end I found this solution which is even better IMO:
Code:
adb shell am start -a android.bluetooth.adapter.action.REQUEST_DISCOVERABLE
After executing above code via ADB, dialog will pop up on wear asking if you want to make watch discoverable. Then you can find and pair it to any phone.
Click to expand...
Click to collapse
Hi, my SW3 was connected to my Mi 4, setup done and working fine. I used Titanium Backup to backup Android Wear and all the watch faces apps.
After I flashed a new custom ROM, used Titanium Backup to restore Android Wear and watch face apps, and also Bluetooth connections on my Mi 4. When SW 3 is connected to my computer, in Adb, it says unauthorised.
Since it is unauthorized, I can't run the ADB command.
Any suggestions?
I don't think there is anything you can do at this point. You should have authorized your PC when you still had working watch connection.
any plans to update it
matejdro said:
I was trying to figure out this one, but could not found proper app to clear. I cleared GMS, Wear launcher, settings etc. and nothing helped. In the end I found this solution which is even better IMO:
Code:
adb shell am start -a android.bluetooth.adapter.action.REQUEST_DISCOVERABLE
After executing above code via ADB, dialog will pop up on wear asking if you want to make watch discoverable. Then you can find and pair it to any phone.
Click to expand...
Click to collapse
Using Minimal ADB, I had to run as admin to make this work, but then it worked perfectly. Thanks very much!
nothing. doesn't work with 5.1.1 g watch rooted, the app gives me black screen (dismissable with swipe)
Just using app from OP is apparently not enough anymore on 5.1.1.
I just made tutorial on reddit on how to reset 5.1.1 watch: https://www.reddit.com/r/AndroidWear/comments/3c4qf8/tip_how_to_switch_phones_without_hard_reset/
I updated the Wear app (v0.2) with support for requesting Bluetooth discoverable mode as well.
Did you guys see this: https://developer.android.com/training/wearables/apps/bt-debugging.html
Yes! I'm so glad something like this has been developed! Worst part about switching ROMs is resetting android wear now. Thanks so much!
Performed the clean in the watch.
It works, and is possible to link the watch with another phone without perform a data wipe.
Then only problem that I've encontered is that the installed watchfaces aren't visible in the Android wear app (in the phone), and I can't set from the phone or hide some.
Thanks
EDIT: Sometimes, due to the watchfaces issue, Android wear app UI generates a FC
Code:
E/AndroidRuntime( 6255): FATAL EXCEPTION: main
E/AndroidRuntime( 6255): Process: com.google.android.wearable.app, PID: 6255
E/AndroidRuntime( 6255): java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.content.ComponentName.equals(java.lang.Object)' on a null object reference
E/AndroidRuntime( 6255): at com.google.android.clockwork.companion.WatchFacePreviewFragment.loadWatchFaces(WatchFacePreviewFragment.java:261)
E/AndroidRuntime( 6255): at com.google.android.clockwork.companion.WatchFacePreviewFragment.onWatchFacesLoaded(WatchFacePreviewFragment.java:209)
E/AndroidRuntime( 6255): at com.google.android.clockwork.companion.watchfaces.WatchFaceLoadTask.onPostExecute(WatchFaceLoadTask.java:198)
E/AndroidRuntime( 6255): at com.google.android.clockwork.companion.watchfaces.WatchFaceLoadTask.onPostExecute(WatchFaceLoadTask.java:33)
E/AndroidRuntime( 6255): at android.os.AsyncTask.finish(AsyncTask.java:636)
E/AndroidRuntime( 6255): at android.os.AsyncTask.access$500(AsyncTask.java:177)
E/AndroidRuntime( 6255): at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:653)
E/AndroidRuntime( 6255): at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime( 6255): at android.os.Looper.loop(Looper.java:135)
E/AndroidRuntime( 6255): at android.app.ActivityThread.main(ActivityThread.java:5293)
E/AndroidRuntime( 6255): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime( 6255): at java.lang.reflect.Method.invoke(Method.java:372)
E/AndroidRuntime( 6255): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)
E/AndroidRuntime( 6255): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:699)
W/ActivityManager( 829): Force finishing activity 1 com.google.android.wearable.app/com.google.android.clockwork.companion.StatusActivity
bartito said:
Performed the clean in the watch.
It works, and is possible to link the watch with another phone without perform a data wipe.
Then only problem that I've encontered is that the installed watchfaces aren't visible in the Android wear app (in the phone), and I can't set from the phone or hide some.
Thanks
EDIT: Sometimes, due to the watchfaces issue, Android wear app UI generates a FC
Code:
E/AndroidRuntime( 6255): FATAL EXCEPTION: main
E/AndroidRuntime( 6255): Process: com.google.android.wearable.app, PID: 6255
E/AndroidRuntime( 6255): java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.content.ComponentName.equals(java.lang.Object)' on a null object reference
E/AndroidRuntime( 6255): at com.google.android.clockwork.companion.WatchFacePreviewFragment.loadWatchFaces(WatchFacePreviewFragment.java:261)
E/AndroidRuntime( 6255): at com.google.android.clockwork.companion.WatchFacePreviewFragment.onWatchFacesLoaded(WatchFacePreviewFragment.java:209)
E/AndroidRuntime( 6255): at com.google.android.clockwork.companion.watchfaces.WatchFaceLoadTask.onPostExecute(WatchFaceLoadTask.java:198)
E/AndroidRuntime( 6255): at com.google.android.clockwork.companion.watchfaces.WatchFaceLoadTask.onPostExecute(WatchFaceLoadTask.java:33)
E/AndroidRuntime( 6255): at android.os.AsyncTask.finish(AsyncTask.java:636)
E/AndroidRuntime( 6255): at android.os.AsyncTask.access$500(AsyncTask.java:177)
E/AndroidRuntime( 6255): at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:653)
E/AndroidRuntime( 6255): at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime( 6255): at android.os.Looper.loop(Looper.java:135)
E/AndroidRuntime( 6255): at android.app.ActivityThread.main(ActivityThread.java:5293)
E/AndroidRuntime( 6255): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime( 6255): at java.lang.reflect.Method.invoke(Method.java:372)
E/AndroidRuntime( 6255): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)
E/AndroidRuntime( 6255): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:699)
W/ActivityManager( 829): Force finishing activity 1 com.google.android.wearable.app/com.google.android.clockwork.companion.StatusActivity
Click to expand...
Click to collapse
Did you also try reseting app data of both Android Wear and Google Play on the phone (& restart)?
moneytoo said:
Did you also try reseting app data of both Android Wear and Google Play on the phone (& restart)?
Click to expand...
Click to collapse
yes, performed a reboot in the wear and also a wipe in the phone

Dolby_Atmos®_(BQ_Aquaris)

Hello! First of all I want to thank the people who make it possible to update Unity for the modules. I am trying to update this audio module is the first time I do this and I want to learn to make contributions. The application starts well but, it seems that there are problems with the libraries and audio server that do not allow me to run the application and the tutorial that is hard for me to understand. How is a large community maybe someone can help me in published oh private.
If you need the project to review it let me know and upload it to the forum.
java.lang.RuntimeException: Exception: unknown problem.
at com.dolby.api.DsBase.convertErrorCodeToException(DsBase.java:114)
at com.dolby.api.DsFocus.getState(DsFocus.java:267)
at com.dolby.dax2appUI.MainActivity.onClick(MainActivity.java:330)
at android.view.View.performClick(View.java:5619)
at android.view.View$PerformClick.run(View.java:22298)
at android.os.Handler.handleCallback(Handler.java:754)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:165)
at android.app.ActivityThread.main(ActivityThread.java:6375)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:912)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:802)

Bug: Problem with Android 13 / GrapheneOS

When I would add an app and select the add button it crashes with the following error.
```
type: crash
osVersion: google/sunfish/sunfish:13/TP1A.220905.004/2022091400:user/release-keys
package: com.oasisfeng.greenify:47500
process: com.oasisfeng.greenify
java.lang.RuntimeException: An error occurred while executing doInBackground()
at android.os.AsyncTask$4.done(AsyncTask.java:415)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:381)
at java.util.concurrent.FutureTask.setException(FutureTask.java:250)
at java.util.concurrent.FutureTask.run(FutureTask.java:269)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:305)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
at java.lang.Thread.run(Thread.java:1012)
Caused by: java.lang.SecurityException: Permission Denial: getUidProcessState from com.oasisfeng.greenify asks to run as user 11 but is calling from uid u0a242; this requires android.permission.INTERACT_ACROSS_USERS_FULL
at android.os.Parcel.createExceptionOrNull(Parcel.java:3012)
at android.os.Parcel.createException(Parcel.java:2996)
at android.os.Parcel.readException(Parcel.java:2979)
at android.os.Parcel.readException(Parcel.java:2921)
at android.app.IActivityManager$Stub$Proxy.getUidProcessState(IActivityManager.java:4838)
at android.app.ActivityManager.getUidImportance(ActivityManager.java:3792)
at java.lang.reflect.Method.invoke(Native Method)
at lq1$c0.a(SourceFile:1)
at lq1$e0.a(SourceFile:3)
at lq1$k.a(SourceFile:2)
at df1.a(SourceFile:164)
at df1.a(SourceFile:113)
at na1.a(SourceFile:5)
at oa1$e.doInBackground(SourceFile:2)
at android.os.AsyncTask$3.call(AsyncTask.java:394)
at java.util.concurrent.FutureTask.run(FutureTask.java:264)
... 4 more
Caused by: android.os.RemoteException: Remote stack trace:
at com.android.server.am.UserController.handleIncomingUser(UserController.java:2243)
at com.android.server.am.ActivityManagerService.getUidProcessState(ActivityManagerService.java:7340)
at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:2060)
at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:2641)
at android.os.Binder.execTransactInternal(Binder.java:1302)
```
I think you'll find active support on the GrapheneOS Element chat. The people there have been very helpful for me in the past.
GrapheneOS contact information
Contact information for GrapheneOS.
grapheneos.org
hopeless.unknown said:
Caused by: java.lang.SecurityException: Permission Denial: getUidProcessState from com.oasisfeng.greenify asks to run as user 11 but is calling from uid u0a242; this requires android.permission.INTERACT_ACROSS_USERS_FULL
Click to expand...
Click to collapse
User 11 is related to your work profile. You may be using Island/Insular and Greenify tries to access the state of a process belonging to that work profile user. But it lacks the necessary permission INTERACT_ACROSS_USERS_FULL.
You can try to grant it via ADB:
Code:
pm grant om.oasisfeng.greenify android.permission.INTERACT_ACROSS_USERS_FULL
4ndr0x said:
User 11 is related to your work profile. You may be using Island/Insular and Greenify tries to access the state of a process belonging to that work profile user. But it lacks the necessary permission INTERACT_ACROSS_USERS_FULL.
You can try to grant it via ADB:
Code:
pm grant om.oasisfeng.greenify android.permission.INTERACT_ACROSS_USERS_FULL
Click to expand...
Click to collapse
Thanks @4ndr0x for your answer. I tried the adb command, but I got only the following message:
Exception occurred while executing 'grant':
java.lang.SecurityException: Permission android.permission.INTERACT_ACROSS_USERS_FULL is managed by role
at com.android.server.pm.permission.PermissionManagerServiceImpl.grantRuntimePermissionInternal(PermissionManagerServiceImpl.java:1390)
at com.android.server.pm.permission.PermissionManagerServiceImpl.grantRuntimePermission(PermissionManagerServiceImpl.java:1321)
at com.android.server.pm.permission.PermissionManagerService.grantRuntimePermission(PermissionManagerService.java:547)
at android.permission.PermissionManager.grantRuntimePermission(PermissionManager.java:602)
at com.android.server.pm.PackageManagerShellCommand.runGrantRevokePermission(PackageManagerShellCommand.java:2546)
at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:292)
at com.android.modules.utils.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:97)
at android.os.ShellCommand.exec(ShellCommand.java:38)
at com.android.server.pm.PackageManagerService$IPackageManagerImpl.onShellCommand(PackageManagerService.java:5959)
at android.os.Binder.shellCommand(Binder.java:1058)
at android.os.Binder.onTransact(Binder.java:886)
at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:4397)
at com.android.server.pm.PackageManagerService$IPackageManagerImpl.onTransact(PackageManagerService.java:5943)
at android.os.Binder.execTransactInternal(Binder.java:1307)
at android.os.Binder.execTransact(Binder.java:1265)
Click to expand...
Click to collapse

Categories

Resources