Getting closer to installing Gear Manager on Nexus 7 - Samsung Galaxy Gear
For anyone who's trying, I've got closer to installing Galaxy Gear Manager on Nexus 7 (4.3 which has BLE). First, I just installed the app, but it would declare that it had to "Installing 0/19 ... 0%" and then just stop trying.
When I clicked "Connect Manually" it would pair and attempt, but I'd get the SsskUnsupportedException - Device Not Supported"
So I tried installing *all* the files here:
http://www.mediafire.com/folder/iej2xisyax63c/GearApp_GalaxyS4(Android43)_All
I tested as I installed more and more, and basically whittled it down to 0/10 and then 0/2 files now that need to be installed when I start up the Gear Manager.
Anyone know what might be missing on that list? I'm hoping that those 2 remaining APKs might make a difference. Hopefully this will open things up to installing on any Android device (that has Bluetooth LE)
I've also been playing around with the various services/and activities via the am start command to try to pair without resetting the device:
Code:
am start com.android.bluetooth/.common.BluetoothPairingDialog
am start com.android.bluetooth/.common.BluetoothConnectActivity
am start com.android.bluetooth/.common.BluetoothSyncingActivity
am startservice com.android.bluetooth/.common.BluetoothAutoConnectService
Bit of a chore, but I got these using smali / dex2jar / JD Gui
Code:
adb pull /system/app/Bluetooth.odex
adb pull /system/framework/ framework (grab all the frameworks for baksmali)
./baksmali -a 15 -x Bluetooth.odex -d framework -o Bluetoot
./smali Bluetoot
d2j-dex2jar.sh out.dex
And then run JD Gui on them to figure out what's going on. I'm not sure, but there is a VendorSpecificCommand in the odex which might be what's causing the reset. If there was a way to avoid that, it might help. Hard to say.
Another idea might be to use bluez or something and do a command line pairing.
Here's a list of things I'm going to try to see if I can get this to work. If anyone has time to try one of these and let us know how it goes, that'd be great.
1. Use bluez or similar utility to pair from the command line
2. See if I can block the VendorSpecific command in Bluetooth.apk from causing us to reset
3. Decompile code and grep for Connection Failed message is exactly appearing when trying to pair between Nexus 7 and Galaxy Gear
4. Compare LogCats from a success case with a failed case and find the diff
Cheers,
Blaze.
I pulled this list form the classes.dex in the gear.apk
com.android.calendar
com.android.email
com.android.incomingcall
com.android.mms
com.android.phone
com.android.settings
com.android.settings.ChooseLockGeneric
com.android.settings.REMOTE_NAME_CHANGED
com.facebook.katana
com.google.android.apps.plus
com.google.android.gm
com.google.android.googlequicksearchbox
com.google.android.talk
com.kddi.android.cmail
com.kddi.android.email
com.samsung.accessory
com.samsung.accessory.ContactsConsumerService.ui.contacts.AllContactsConsumerActivity
com.samsung.accessory.FindMyPhoneProviderService
com.samsung.accessory.ISAFTManager
com.samsung.accessory.action.DATA_RESTORE
com.samsung.accessory.action.FRAMEWORK_DIED2
com.samsung.accessory.adapter.action.STATE_CHANGED
com.samsung.accessory.adapter.extra.ERROR
com.samsung.accessory.adapter.extra.ERROR_ID
com.samsung.accessory.adapter.extra.READ_BYTES
com.samsung.accessory.adapter.extra.READ_LENGHT0
com.samsung.accessory.adapter.extra.SEND_TIMEOUT3
com.samsung.accessory.adapter.extra.SPACE_AVAILABLE
com.samsung.accessory.adapter.extra.STATE
com.samsung.accessory.api.DeathCallback
com.samsung.accessory.api.ISAFrameworkManager
com.samsung.accessory.clocksettingsprovider
com.samsung.accessory.ftconnection
com.samsung.accessory.saalarmprovider
com.samsung.accessory.sacalendarprovider
com.samsung.accessory.sacameratransferservice
com.samsung.accessory.sacontextprovider
com.samsung.accessory.safavsprovider
com.samsung.accessory.safiletransfer
com.samsung.accessory.safiletransfer.core.ISAFTManager
com.samsung.accessory.salogconsumer.ui.ConsumerActivity
com.samsung.accessory.salogprovider
com.samsung.accessory.samusicprovider
com.samsung.accessory.sanotiprovider
com.samsung.accessory.savmprovider
com.samsung.accessory.savmprovider.VRPolicyActivity
com.samsung.android.aidl.ICancelInstallCallback
com.samsung.android.aidl.ICheckAppInstallState
com.samsung.android.aidl.ICheckAppInstallStateCallback
com.samsung.android.app.watchmanager
com.samsung.android.app.watchmanager.BManagerActivity
com.samsung.android.app.watchmanager.PairedWatchActivity
com.samsung.android.app.watchmanager.UpdateAlertDialogActivityInstalled
com.samsung.android.app.watchmanager.UpdateAlertDialogActivityServerSide
com.samsung.android.app.watchmanager.findmywatch.fromfindmywatchwidget.STOP
com.samsung.android.app.watchmanager.setting.WatchSettingsActivity
com.samsung.android.app.watchmanager.setupwizard.SetupWizardConnectActivity
com.samsung.android.app.watchmanager.setupwizard.SetupWizardEULAActivity
com.samsung.android.app.watchmanager.setupwizard.SetupWizardRestoreWatchSettingsActivity
com.samsung.android.app.watchmanager.setupwizard.SetupWizardWelcomeActivity
com.samsung.android.app.watchmanager.widget.SAPDISCONNECT
com.samsung.android.app.watchmanager.widget.START
com.samsung.android.app.watchmanager.widget.STOP
com.samsung.android.app.watchmanager.widget.fromfindmywatchmenu.START
com.samsung.android.app.watchmanager.widget.fromfindmywatchmenu.STOP
com.samsung.android.permission.READ_FINDMYWATCHWIDGET
com.samsung.android.permission.installApp
com.samsung.android.watchsns.provider
com.samsung.appcessory.callhandlerprovider
com.samsung.appcessory.chatonw.provider
com.samsung.bvoice.BVoiceActivity
com.samsung.bvoice
com.samsung.bvoice.BVoiceActivity
com.samsung.notifications
com.samsung.notifications.NotificationsActivity
com.samsung.svoiceprovider
com.samsung.wmanager.APP
com.samsung.wmanager.ENABLE_NOTIFICATION
com.samsung.wmanager.SAP_CHANNEL_CONNECTED
com.sds.mobiledesk
com.sec.android.app.clockpackage
com.sec.android.app.safetyassurance
com.sec.android.app.safetyassurance.SafetyAssuranceGrantedReceiver
com.sec.android.app.safetyassurance.permission.PRIVATE_GRANTED
com.sec.android.app.safetyassurance.settings.SEND_B_OPTION_INFO
com.sec.android.app.safetyassurance.settings.SafetyAssuranceSetting
com.sec.android.app.samsungapps
com.sec.android.app.secwmanagersetupwizard.WSETUPWIZARD_COMPLETE
com.sec.android.app.shortcutclock.WATCH_SHORTCUT_SETTINGINFO
com.sec.android.daemonapp
com.sec.android.fotaprovider
com.sec.android.wallet
com.sec.android.weatherprovider
com.sec.android.widgetapp.ap.hero.accuweather
com.sec.android.widgetapp.watch.weatherclock
com.sec.chaton
com.sec.motions.MOTIONS_SETTINGS_CHANGED
com.twitter.android
Noone has posted 1.4 and it's not available in my store yet, but latest 1.2.131013 is here:
http://www.mediafire.com/folder/e7h23e12rzesi/Gear_Manager
Then to get the other apk files, open the apk in a zip program (ie WinRAR, 7zip) and go to folder \assets\preInstallApks\
Brendo said:
Noone has posted 1.4 and it's not available in my store yet, but latest 1.2.131013 is here:
http://www.mediafire.com/folder/e7h23e12rzesi/Gear_Manager
Then to get the other apk files, open the apk in a zip program (ie WinRAR, 7zip) and go to folder \assets\preInstallApks\
Click to expand...
Click to collapse
That helped. I've narrowed it down to these two suspects:
Code:
73 KB/s (104764 bytes in 0.132s)
pkg: /data/local/tmp/SAMusicProvider_signed.apk
Failure [INSTALL_FAILED_SHARED_USER_INCOMPATIBLE]
1281 KB/s (158158 bytes in 0.120s)
pkg: /data/local/tmp/SAWeatherProvider_signed.apk
Failure [INSTALL_FAILED_MISSING_SHARED_LIBRARY]
I believe SAWeatherProvider relies on TouchWiz. The shared user issue could probably be fixed easily enough. Not sure these libraries should be failing the connection.
Here's the logcat for the fail scenario after I click the paired device:
Code:
D/DeviceListActivity(19516): onItemClick()
D/DeviceListActivity(19516): onItemClick() address : D8:90:E8:A1:D1:8A
I/BluetoothAdapterProperties( 959): Callback:discoveryStateChangeCallback with state:0
W/DeviceListActivity(19516): pairing() address:D8:90:E8:A1:D1:8A device.getBondState():12
V/DD/SABtScan(17509): BluetoothAdapter.ACTION_DISCOVERY_FINISHED
V/BluetoothDiscoveryReceiver(19543): Received: android.bluetooth.adapter.action.DISCOVERY_FINISHED
D/DeviceListActivity(19516): pairing() state BOND_BONDED - mAddress is D8:90:E8:A1:D1:8A
D/DeviceListActivity(19516): onReceive() action:android.bluetooth.adapter.action.DISCOVERY_FINISHED
D/DeviceListActivity(19516): onReceive() ACTION_DISCOVERY_FINISHED count:1
V/SetupWizardConnectActivity(19516): onActivityResult()
V/SetupWizardConnectActivity(19516): onActivityResult() RESULT_OK
W/SetupWizardConnectActivity(19516): connectBTHeadset()[D8:90:E8:A1:D1:8A] mBluetoothHeadset = [email protected]
W/SetupWizardConnectActivity(19516): mBluetoothHeadset.connect(device)
D/BluetoothHeadset(19516): connect(D8:90:E8:A1:D1:8A)
W/SetupWizardConnectActivity(19516): SetupWizardConnectActivity onResume()
I/BluetoothHeadsetServiceJni( 959): connectHfpNative: sBluetoothHfpInterface: 0x69151868
D/BluetoothAdapterProperties( 959): CONNECTION_STATE_CHANGE: D8:90:E8:A1:D1:8A: 0 -> 1
D/BluetoothAdapterService(1114653040)( 959): Get Bonded Devices being called
D/BluetoothAdapterProperties( 959): getBondedDevices: length=2
W/ (19516): mBTReceiver action = android.bluetooth.headset.profile.action.CONNECTION_STATE_CHANGED
D/SetupWizardConnectActivity(19516): BT HFP_STATE_CHANGED_ICS / state = 1
D/DeviceListActivity(19516): onReceive() action:android.bluetooth.headset.profile.action.CONNECTION_STATE_CHANGED
D/WManagerReceiver(19516): BManagerConnectionReceiver:android.bluetooth.headset.profile.action.CONNECTION_STATE_CHANGED
D/WManagerReceiver(19516): Bluetooth HFP_STATE_CHANGED ++ State : 1
D/BTHeadSetReceiver(19202): Action = android.bluetooth.headset.profile.action.CONNECTION_STATE_CHANGED
D/BTHeadSetReceiver(19202): mBTConn data = 1
D/DeviceListActivity(19516): onReceive() action:android.bluetooth.adapter.action.CONNECTION_STATE_CHANGED
I/ActivityManager( 434): Displayed com.samsung.android.app.watchmanager/.setupwizard.SetupWizardConnectActivity: +10s714ms
D/DeviceListActivity(19516): onStop() mIsResultOk:true
D/DeviceListActivity(19516): onDestroy() mBtAdapter.isDiscovering():false
I/BluetoothAdapterProperties( 959): Callback:discoveryStateChangeCallback with state:0
V/DD/SABtScan(17509): BluetoothAdapter.ACTION_DISCOVERY_FINISHED
V/BluetoothDiscoveryReceiver(19543): Received: android.bluetooth.adapter.action.DISCOVERY_FINISHED
W/bt-btif ( 959): info:x10
D/ ( 959): remote version info [d8:90:e8:a1:d1:8a]: 6, f, 220e
D/btif_config_util( 959): btif_config_save_file(L153): in file name:/data/misc/bluedroid/bt_config.new
W/DD/SABtScan(17509): unknown event received : android.bluetooth.device.action.ACL_CONNECTED
D/CompanionService(10769): bluetoothStateChangeReceiver action = android.bluetooth.device.action.ACL_CONNECTED
D/CompanionService(10769): device GALAXY Gear (D18A) @ [D8:90:E8:A1:D1:8A] BONDED
D/CompanionService(10769): Bluetooth device GALAXY Gear (D18A) @ [D8:90:E8:A1:D1:8A] BONDED has HSP|HFP.
D/CompanionService(10769): Headset device GALAXY Gear (D18A) @ [D8:90:E8:A1:D1:8A] BONDED connected.
D/HeadsetConnector(10769): Successfully invoked the getConnectedDevices method.
W/bt-sdp ( 959): process_service_search_attr_rsp
I/BluetoothHeadsetServiceJni( 959): connection_state_callback
D/BluetoothAdapterProperties( 959): CONNECTION_STATE_CHANGE: D8:90:E8:A1:D1:8A: 1 -> 0
D/BluetoothAdapterService(1114653040)( 959): Get Bonded Devices being called
D/BluetoothAdapterProperties( 959): getBondedDevices: length=2
W/ (19516): mBTReceiver action = android.bluetooth.headset.profile.action.CONNECTION_STATE_CHANGED
D/SetupWizardConnectActivity(19516): BT HFP_STATE_CHANGED_ICS / state = 0
D/SetupWizardConnectActivity(19516): STATE_DISCONNECTED
D/SetupWizardConnectActivity(19516): HFP_STATE_CHANGED_ICS state : 0 device Addr : D8:90:E8:A1:D1:8A device Name : GALAXY Gear (D18A)
D/SetupWizardConnectActivity(19516): BluetoothHeadset.STATE_DISCONNECTED mBtAddress : D8:90:E8:A1:D1:8A
D/SetupWizardConnectActivity(19516): Send message show connection fail
Galaxy Gear paired with Nexus 4
Hi Blaze,
many thanks for you post!
I followed your steps and was able to manually pair the Gear with Nexus 4.
I've just installed all "com.samsung.accessory" APKs from your link and "com.sec.android.fotaprovider".
Both "music" and "weather" failed by me too but it doesn't matter (I don't think com.sec.android.fotaprovider is needed either).
After that I've just opened the Gear Manager for the second time (at first it said 0/19, second time it said 0/2), and chosen "Connect manually" to already paired device (I've done that earlier with some GearManager_1.2.apk) - and it worked!
Thanks once again,
Oleg
Would be handy to have an idea of which files are required. Am looking through all the files on my s4
Could I ask how you got it paired to nexus 4 is your phone rooted?? I keep getting connection failed. Unable to open gear manager installed all apk apart from 2 that won't install 0/2 but when I tried to connect manual gives me connection failed any help would be appreciated..
Sent from my Nexus 4 using xda app-developers app
Hi beagle,
my Nexus 4 was rooted, but after some Android update it has lost its "su", and I don't think that this could be somehow relevant for the Galaxy Gear.
In fact, with Gear Manager 1.2 simple bluetooth pairing between the watch and the phone was never a problem, the handshake could be made and the watch was added to the phones BT-devices list.
The problem was, that after the handshake Gear Manager has told me: "Device not supported", or "Unsupported Ssdk", or something like that. So I took a look at the "com.samsung.android.app.watchmanager.1.2.131013.apk" decompiled source code and found the following:
Code:
package com.samsung.android.sdk.accessory;
class SA implements SsdkInterface {
//...
public void initialize(Context paramContext) throws SsdkUnsupportedException {
if (!SsdkVendorCheck.isDeviceSupported(paramContext)) {
throw new SsdkUnsupportedException("Device not supported", 1);
}
Log.d("Samsung Accessory SDK", "Samsung Accessory SDK version: " + this.mVersionName);
this.mInitialized = true;
}
//...
}
and here is how the "supported device" was checked:
Code:
package com.samsung.android.sdk.accessory;
public class SsdkVendorCheck
{
private static String FRAMEWORK_PACKAGE_NAME = "com.samsung.accessory";
private static String TAG = "SsdkVendorCheck";
private static String strBrand = Build.BRAND;
private static String strManufacturer = Build.MANUFACTURER;
public static boolean isDeviceSupported(Context paramContext)
{
PackageManager localPackageManager = paramContext.getPackageManager();
try
{
localPackageManager.getPackageInfo(FRAMEWORK_PACKAGE_NAME, 0);
return true;
}
catch (PackageManager.NameNotFoundException localNameNotFoundException)
{
Log.e(TAG, "Samsung Accessory Framework not installed");
localNameNotFoundException.printStackTrace();
}
return false;
}
public static boolean isSamsungDevice()
{
if ((strBrand == null) || (strManufacturer == null));
while ((strBrand.compareToIgnoreCase("Samsung") != 0) && (strManufacturer.compareToIgnoreCase("Samsung") != 0))
return false;
return true;
}
}
So theoretically, in my case all I had to do - was to create my own app, with the package "com.samsung.accessory" - and it would be sufficient to unlock the watch through the Nexus 4.
But I have not tried that out, I have found this thread and decided to install all the "com.samsung.*" apks, just to be sure.
And also they have changed this security check in the version 1.4, at least the GearManager 1.4 won't event start on my Nexus 4, I assume they are also checking the "SsdkVendorCheck.isSamsungDevice()" now in the "SA.initialize()", but I have not looked further into it.
I have also a definitely unrooted Nexus 7, I'll try to connect it with the watch when I have the time.
And I will try to use at first my own app as described above, than just a subset of the SA-apps to find out which of them are really needed. But I probably won't have the time for that till next week.
P.S. could you please upload the screenshot of that "connection failed" message?
Hi mate thanks for the reply..complete novice here! Connection failed message shows up on nexus 4 gear manager screen the watch just says Bluetooth connected then did connected again...I've had the watch paired to a s3 so know it works any help would be appreciated don't want to change my nexus 4 to get gear to work.
Sent from my Nexus 4 using xda app-developers app
beagle1974 said:
Hi mate thanks for the reply..complete novice here! Connection failed message shows up on nexus 4 gear manager screen the watch just says Bluetooth connected then did connected again...I've had the watch paired to a s3 so know it works any help would be appreciated don't want to change my nexus 4 to get gear to work.
Sent from my Nexus 4 using xda app-developers app
Click to expand...
Click to collapse
Interesting, I couldn't find that error message exactly but I think com.samsung.android.sdk.accessory.SAAgent is possibly involved in producing the error state:
Code:
private boolean handleMakeServiceConnectionAtomic(SAPeerAgent paramSAPeerAgent)
throws SAException
{
Log.i(TAG, "handleMakeServiceConnection: Send connection request , Waiting to accept connection");
SAAdapter localSAAdapter = SAAdapterAccessor.getDefault().getDefaultAdapter(getApplicationContext());
SharedPreferences localSharedPreferences = getApplicationContext().getSharedPreferences("AccessoryPreferences", 0);
String str = localSharedPreferences.getString(getClass().getName(), null);
if (str == null)
{
handleReRegisterAfterClearData();
str = localSharedPreferences.getString(getClass().getName(), null);
if (str == null)
{
Log.i(TAG, "handleMakeServiceConnectionAtomic: Even after restoring from Framework registeredKey is null. Nothing can be done");
onServiceConnectionResponse(null, 2048);
}
}
SAServiceDescription localSAServiceDescription = SAConfigUtil.getDefultInstance(getApplicationContext()).fetchServicesDescription(getClass().getName());
try
{
Log.d(TAG, "Is Member class" + String.valueOf(this.mConnHandlerAsImplementedbyCaller.isMemberClass()));
SASocket localSASocket;
if ((this.mConnHandlerAsImplementedbyCaller.getEnclosingClass() != null) && (SAAgent.class.isAssignableFrom(this.mConnHandlerAsImplementedbyCaller.getEnclosingClass())))
{
Log.d(TAG, "Enclosing class for ConnectionHelper:" + this.mConnHandlerAsImplementedbyCaller.getEnclosingClass().getSimpleName());
Class localClass = this.mConnHandlerAsImplementedbyCaller;
Class[] arrayOfClass = new Class[1];
arrayOfClass[0] = this.mConnHandlerAsImplementedbyCaller.getEnclosingClass();
localSASocket = (SASocket)localClass.getDeclaredConstructor(arrayOfClass).newInstance(new Object[] { this });
}
for (boolean bool = localSASocket.setupInitiator(this, str, paramSAPeerAgent, localSAServiceDescription, localSAAdapter); bool == true; bool = localSASocket.setupInitiator(this, str, paramSAPeerAgent, localSAServiceDescription, localSAAdapter))
{
this.mServiceState = 1;
Log.i(TAG, "onServiceConnectionResponse: CONNECTION_SUCCESS for " + getClass().getSimpleName());
this.mSuccessfulConnections.add(localSASocket);
onServiceConnectionResponse(localSASocket, 0);
localSASocket.setReadyToReceive();
return true;
localSASocket = (SASocket)this.mConnHandlerAsImplementedbyCaller.getDeclaredConstructor(new Class[0]).newInstance(new Object[0]);
}
this.mServiceState = 0;
int i = resolveConnectionError(SAAdapterAccessor.getDefault().getLastErrorCode(localSAAdapter));
Log.i(TAG, "onServiceConnectionResponse: CONNECTION_FAIL for " + getClass().getSimpleName());
onServiceConnectionResponse(null, i);
return false;
}
catch (InstantiationException localInstantiationException)
{
Log.e(TAG, "Unable to create Connection helper instance", localInstantiationException);
Log.i(TAG, "onServiceConnectionResponse: CONNECTION_FAILED");
onServiceConnectionResponse(null, 1027);
return false;
}
catch (IllegalAccessException localIllegalAccessException)
{
while (true)
Log.e(TAG, "Unable to create Connection helper instance", localIllegalAccessException);
}
catch (IllegalArgumentException localIllegalArgumentException)
{
while (true)
Log.e(TAG, "Unable to create Connection helper instance", localIllegalArgumentException);
}
catch (InvocationTargetException localInvocationTargetException)
{
while (true)
Log.e(TAG, "Unable to create Connection helper instance", localInvocationTargetException);
}
catch (NoSuchMethodException localNoSuchMethodException)
{
while (true)
Log.e(TAG, "Unable to create Connection helper instance", localNoSuchMethodException);
}
}
Interesting, you have dug deeper than anyone has so far.
I would love to get my gear working with CM10.2, ill provide a logcat of the pair up sequence from my i9505.
Ive got the gear working with my Sprint LG G2.
Just the phone, camera, alarm, and find my gear.
Other than that.... No notifications...
But hey.... It works for the most part.
Im on stock rooted
Edit::::: camera transfer also works as well. Pedometer is working too.
Any suggestions to get anything else working
THE SPRINT LG G2
Services I got via the android.os.ServiceManager
Code:
com.orange.authentication.simcard, iphonesubinfo, simphonebook, isms,
sec_analytics, edmnativehelper, dreams, voip, motion_recognition,
commontime_management, samplingprofiler, AtCmdFwd, diskstats,
appwidget, backup, uimode, serial, usb, audio, dropbox, search,
country_detector, location, devicestoragemonitor, notification, updatelock,
throttle, servicediscovery, connectivity, wifi, wifip2p, netpolicy, netstats,
textservices, network_management, clipboardEx, clipboard, statusbar,
harmony_eas_service, enterprise_policy, phone_restriction_policy, wifi_policy,
application_policy, license_log_service, enterprise_license_policy,
log_manager_service, device_policy, lock_settings, mount, accessibility,
input_method, bluetooth_secure_mode_manager, bluetooth_manager, input,
window, scontext, context_aware, alarm, CustomFrequencyManagerService,
vibrator, battery, hardware, DirEncryptService, content, account, user,
permission, cpuinfo, dbinfo, gfxinfo, meminfo, activity, package,
container_service, scheduling_policy, display, usagestats, batteryinfo, power,
entropy, mdm.remotedesktop, sensorservice, media.audio_policy, media.camera,
media.player, media.audio_flinger, drm.drmManager, SurfaceFlinger,
Exynos.IPService, Exynos.HWCService, sensorhubservice
These are the two I'm working with: bluetooth_secure_mode_manager, bluetooth_manager
Inspired by these SO posts:
http://stackoverflow.com/questions/3462968/how-to-unpair-bluetooth-device-using-android-2-1-sdk
http://stackoverflow.com/questions/...s-bluetooth-pairing-notification-when-i-am-do
you can use Media Remote to control music.
it actually works better for me then stock media controller because stock would randomly connect to samsungs music player when i would try to pause google music. looks great and easier to change volume to.
So what else are we missing to get this working?
Looks to me like we could get v1.2 and earlier working if a few days of effort is put into it.
I feel like it'd be smarter to try and get v1.4 and newer working on any/every 4.3 ROM.
Interesting file, /data/misc/bluedroid/bt_config.xml
It seems to have entries for paired devices:
Code:
1|[email protected]:/data/misc/bluedroid # cat bt_config.xml
<Bluedroid>
<N1 Tag="Local">
<N1 Tag="Adapter">
<N1 Tag="BluezMigrationDone" Type="int">1</N1>
<N2 Tag="Address" Type="string">d8:90:e8:a1:d1:8a</N2>
<N3 Tag="LE_LOCAL_KEY_IR" Type="binary">cbecbe53c50e625e2dfae3d9c42ada8c</N3>
<N4 Tag="LE_LOCAL_KEY_IRK" Type="binary">8e440b86e530d829c6d342e4f74b4367</N4>
<N5 Tag="LE_LOCAL_KEY_DHK" Type="binary">96430ff5e6a12d7b384e13f4b66370a3</N5>
<N6 Tag="LE_LOCAL_KEY_ER" Type="binary">ecbe709bdc01402baf495173dcd38009</N6>
<N7 Tag="ScanMode" Type="int">1</N7>
<N8 Tag="DiscoveryTimeout" Type="int">0</N8>
<N9 Tag="Name" Type="string">GALAXY Gear (D18A)</N9>
</N1>
<N2 Tag="AutoPairBlacklist">
<N1 Tag="AddressBlacklist" Type="string">00:02:C7,00:16:FE,00:19:C1,00:1B:FB,00:1E:3D,00:21:4F,00:23:06,00:24:33,00:A0:79,00:0E:6D,00:13:E0,00:21:E8,00:60:57,00:0E:9F,00:12:1C,00:18:91,00:18:96,00:13:04,00:16:FD,00:22:A0,00:0B:4C,00:60:6F,00:23:3D,00:C0:59,00:0A:30,00:1E:AE,00:1C:D7,00:80:F0,00:12:8A,00:09:93,00:80:37,00:26:7E,08:76:95,00:1E:B2
</N1>
<N2 Tag="ExactNameBlacklist" Type="string">Motorola IHF1000,i.TechBlueBAND,X5 Stereo v1.3,KML_CAN
</N2>
<N3 Tag="PartialNameBlacklist" Type="string">BMW,Audi,Parrot,Car,CAR,
</N3>
<N4 Tag="FixedPinZerosKeyboardBlacklist" Type="string">00:0F:F6
</N4>
</N2>
</N1>
<N2 Tag="Remote">
<N1 Tag="d8:90:e8:e2:85:38">
<N1 Tag="Manufacturer" Type="int">15</N1>
<N2 Tag="LmpVer" Type="int">6</N2>
<N3 Tag="LmpSubVer" Type="int">24841</N3>
<N4 Tag="Name" Type="string">hugcdghTest1 hgsd (SM-</N4>
<N5 Tag="DevClass" Type="int">5898764</N5>
<N6 Tag="DevType" Type="int">1</N6>
<N7 Tag="LinkKeyType" Type="int">5</N7>
<N8 Tag="PinLength" Type="int">0</N8>
<N9 Tag="LinkKey" Type="binary">64a080f6e8a49e070cbf796a29273e12</N9>
<N10 Tag="Service" Type="string">0000110a-0000-1000-8000-00805f9b34fb 00001105-0000-1000-8000-00805f9b34fb 00001115-0000-1000-8000-00805f9b34fb 0000112f-0000-1000-8000-00805f9b34fb 00001112-0000-1000-8000-00805f9b34fb 0000111f-0000-1000-8000-00805f9b34fb 00001132-0000-1000-8000-00805f9b34fb a49eb41e-cb06-495c-9f4f-bb80a90cdf00 </N10>
</N1>
<N2 Tag="50:46:5d:7c:ab:58">
<N1 Tag="Name" Type="string">Nexus 7</N1>
<N2 Tag="Manufacturer" Type="int">15</N2>
<N3 Tag="LmpVer" Type="int">6</N3>
<N4 Tag="LmpSubVer" Type="int">16643</N4>
<N5 Tag="DevClass" Type="int">1704212</N5>
<N6 Tag="DevType" Type="int">1</N6>
</N2>
</N2>
</Bluedroid>
[email protected]:/data/misc/bluedroid #
Hi mate I ended up rooting my nexus got the gear manager to load up once but the watch never connected then haven't been able to run gear manager again , any suggestions
Sent from my Nexus 4 using xda app-developers app
beagle1974 said:
Hi mate I ended up rooting my nexus got the gear manager to load up once but the watch never connected then haven't been able to run gear manager again , any suggestions
Sent from my Nexus 4 using xda app-developers app
Click to expand...
Click to collapse
Which APKs did you sideload? All of the accessory ones?
I just got some success, I was able to pair my Nexus 7 with the smartwatch without having to reset. I am not entirely sure how I was able to do this, but I believe it might be by running this app here:
http://stackoverflow.com/questions/14228289/android-device-bluetooth-pairing
And then using that to unpair / removeBond the current device it was paired with. Then when I go to pair with the Nexus, I guess it figures something is better than nothing.
ANyways... progress.
I get to 0/2 but, when I try connecting via manually it fails...can some please explain how to connect manuallly
htc fan89 said:
I get to 0/2 but, when I try connecting via manually it fails...can some please explain how to connect manuallly
Click to expand...
Click to collapse
Try following the instructions here. Make sure you install the shared preferences.
let us know how it goes.
cheers
Related
TwoLineListItem with icon
Hello! I would like to ask you for help. I do not know how to create an custom adapter for TwoLineListItem with icon. I know how to set text using ListArray with HashMap. But how to add image (as @android:id/icon)? Code: String[][] ss = new String[][]{ {"string 1", "string 2"} {"string 3", "string 4"} {"string 5", "string 6"}}; List<HashMap<String,String>> list = new ArrayList<HashMap<String,String>>(); for(int i=0; i<ss.length;i++) { HashMap<String,String> item = new HashMap<String,String>(); item.put("text1", ss[i][0]); item.put("text2", ss[i][1]); list.add(item); } ListAdapter adapter = new SimpleAdapter(this, list, R.layout.list_position_layout, new String[] {"text1","text2"}, new int[] {android.R.id.text1, android.R.id.text2 }); setListAdapter(adapter); I suppose that solution is very easy... But I do not know how to do it.
Development team V2
Hello everyone, I want to start again with a development team. After miroslav decided to finish the project on his own, I want to try it again. But this time with a real team Only with people who want to participate, and not just type make. Who wants to join?
miroslav_mm said: So, I opened your eyes and showed real face our "superstar"!? Ok! Let's stop this stupid discussion and continuous develop ROM. At this moment I have main part: Torchscreen + BT (BT-calling) + WiFi (need to test) + Sensor + GSM (Waiting call) + Mobile Data + Audio + Vibrate + HW + 3D ??? (need new kernel or port new 3D kernel driver (kgsl) (in progress)) usb storage ??? (only with special app (native in progress)) Camera ??? (in progress) Video codec ??? (in progress) Anyone doing something? Maybe fix some stuff? Click to expand... Click to collapse He just want to clean his topic. Send him a PM.
I understand that but there is still no team. He just made his project open for patches. And I think, personally, a team could help the speed on development of a ROM So please join Sent from my GT540 using Tapatalk
So join his team , and start patching?
wwenigma said: So join his team , and start patching? Click to expand... Click to collapse Since when does he have a team? What I know about it, is that he just made some kind of open-source project where you can add your own updates and where he gets no credit. Sent from my GT540 using Tapatalk
I can help you with Java stuff!
I think miroslav_mm wants to release ICS under name of SWIFT-TEAM, with developer names in credits.... may you ask him about it? Do not split guys...
Miroslav said that it's only him on the team...so i don't see any team there..if we are more than 1 guy in a team we can get faster a daily ROM for our Phones
rexes13 said: Miroslav said that it's only him on the team Click to expand... Click to collapse Jep, because PCF+MGP join then leave and jasper580 cant make neccessary steps... ask him. All two, ask him about it.
wwenigma said: Jep, because PCF+MGP join then leave and jasper580 cant make neccessary steps... ask him. All two, ask him about it. Click to expand... Click to collapse I can make nesseccary steps if I want, but I don't want to. I want to start cleaned up. That's why I created this topic. So: If you want to join: welcome. If you don't want to: stop spamming @rexes13 Welcome to the team! Sent from my GT540 using Tapatalk
Good news. Yesterday I successfully ported 3d kernel driver (kgsl) from 35, so now we have full functionality kernel with OpenGL ES-CM 1.1. So HW, 3D and other stuff with support OpenGL working, not excellent but working, need improve source code Surfaceflinger and HardwareDisplay. Maybe next weak I will make new thread and publish first public test version, but all development moments we can discus here. Before I need redownload all sources CM9 again. Yesterday I had the same error like in wwenigma and aaa801 Code: target thumb C: libhardware_legacy <= hardware/libhardware_legacy/power/power.c arm-linux-androideabi-gcc: ": No such file or directory <command-line>: warning: missing terminating " character and I dont know WTF, so delete all source tree. Maybe today will try download again and build again.
hell yeah! im just another non-dev member LOL sry
Need help! Look on code: Code: //static int32_t msm_tscal_scaler = 65536; static int32_t msm_tscal_xscale = 70046; static int32_t msm_tscal_xoffset = -4191987; static int32_t msm_tscal_yscale = 71735; static int32_t msm_tscal_yoffset = -3004437; this pointers for torch 320*240. So when I using that I need tap on 2mm high on icon for open something. This pointer need for screen calibration. Need find right pointer. I can't find a logic in this numbers.
miroslav_mm said: Need help! Look on code: Code: //static int32_t msm_tscal_scaler = 65536; static int32_t msm_tscal_xscale = 70046; static int32_t msm_tscal_xoffset = -4191987; static int32_t msm_tscal_yscale = 71735; static int32_t msm_tscal_yoffset = -3004437; this pointers for torch 320*240. So when I using that I need tap on 2mm high on icon for open something. This pointer need for screen calibration. Need find right pointer. I can't find a logic in this numbers. Click to expand... Click to collapse The offsets appear to have a ~4:3 ratio. It doesn't make sense though why it's x:y=4:3, and not the other way around, since the screen is usually 3:4(e.g. 320x480 or 240x320). Also, considering our screen is 320x480, which is a ratio of 1,5 and not 1,(3), I think those would be totally wrong for our phone. Maybe try to modify one of the two to match 1,5 ratio. E.g. make xoffset=-4506655. I don't know. :/
Please discuss development on your page. I want to make a dev team here Sent from my GT540 using Tapatalk
deleted 10 character
This numbers working with this java code together: ] Code: public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // Read current values final int xoffset = (readValue("xoffset")*240+480)/960; final int yoffset = (readValue("yoffset")*320+460)/920; final int xscale = readValue("xscale"); final int yscale = readValue("yscale"); view = new View(this) { private int step = 1; private int rawx1; private int rawy1; private int rawx2; private int rawy2; private void writeValue(String parameter, int value) { try { FileOutputStream fos = new FileOutputStream(new File("/sys/module/msm_touch/parameters/tscal_" + parameter)); fos.write(String.valueOf(value).getBytes()); fos.flush(); fos.getFD().sync(); fos.close(); } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } } @Override public boolean onTouchEvent(MotionEvent ev) { if (ev.getAction() != MotionEvent.ACTION_UP) return true; if(step==1) { rawx1 = ((int)ev.getRawX()*65536-xoffset+32768)/xscale; rawy1 = ((int)ev.getRawY()*65536-yoffset+32768)/yscale; if(rawx1<100 && rawy1<100) step = 2; } else if(step==2) { rawx2 = ((int)ev.getRawX()*65536-xoffset+32768)/xscale; rawy2 = ((int)ev.getRawY()*65536-yoffset+32768)/yscale; if(rawx2>140 && rawy2>220) step = 3; } else { int distx = rawx2 - rawx1; int new_xscale = (140*65536 + distx/2)/distx; int disty = rawy2 - rawy1; int new_yscale = (220*65536 + disty/2)/disty; int new_xoffset = 1; new_xoffset += 50*65536-rawx1*new_xscale; new_xoffset += 190*65536-rawx2*new_xscale; new_xoffset /= 2; new_xoffset = (new_xoffset*960+120)/240; int new_yoffset = 1; new_yoffset += 50*65536-rawy1*new_yscale; new_yoffset += 270*65536-rawy2*new_yscale; new_yoffset /= 2; new_yoffset = (new_yoffset*920+160)/320; // Pass new calibration to kernel writeValue("xoffset", new_xoffset); writeValue("yoffset", new_yoffset); writeValue("xscale", new_xscale); writeValue("yscale", new_yscale); // Save calibraiton data to /data/system/pointercal StringBuilder sb = new StringBuilder(); sb.append(new_xscale); sb.append(" "); sb.append(0); sb.append(" "); sb.append(new_xoffset); sb.append(" "); sb.append(0); sb.append(" "); sb.append(new_yscale); sb.append(" "); sb.append(new_yoffset); sb.append(" "); sb.append(65536); App + ui input framework + kernel working together. App - creation poinercal ui input framework - reading pointercal send correct info to kernel kernel touch driver - doing move.
Öhm, the touchscreen driver use a virtual square (320*320) to detect touch, stretched to a rectangle(320*480)? mod: about calibration, http://code.google.com/p/openeve/issues/detail?id=91
jasper580 said: Please discuss development on your page. I want to make a dev team here Click to expand... Click to collapse I cant understand you! What do you mean? Do you wanna make new dev team? Working on my sources but without me?
I exactly want to ask that. Maybe he start from scratch, his github is near empty.
DeskCast + VB.NET Source
this is a little project I have been working on to cast videos from my desktop pc with hard drives mapped from my server it works much like fling did but built with vb.net not java you will need .Net Framework 4.6.1 installed to run or compile this application the VB source was built Visual Studio 2013 the C# source was built Visual Studio 2017 if you have multiple network adapters this might not work for you as it might not resolve your local ip address correctly ffmpeg is used to transcode videos that are not mp4, when transcoding you cannot seek/select play position when streaming from harddrive mp4 files should have the ability to seek/select play position you can drag and drop video files onto application to play them(like Fling) it also has the option to play files from urls it should be pretty simple to use for you just open the program and it should find chromecasts on the network then select the chromecast you want to cast to then click "Connect CC" then drag and drop video onto it and it should start playing it should work for rooted and non rooted chromecasts when using a rooted chromecast the receiver is hosted by DeskCast its self when using a non rooted chromecast the receiver is one of the apps in the google whitelist the receiver files deskcast sends to the rooted chromecast are in the "data" folder of the application, so you can edit these too I did play with the idea of the chromecast its self hosting the receiver files but the www folder in the chromecast is locked/read only so that might be something for team eureka to add to the webpanel they have this works for me very well, but I cant say that it will work for you at all im really only posting the source so other people can use it for information or ideas to make something better than I ever could I hope this is useful to someone VB .NET Source https://github.com/stooged/DeskCast C# Source https://github.com/stooged/DeskCastC
stooged said: this is a little project I have been working on to cast videos from my desktop pc with hard drives mapped from my server it works much like fling did but built with vb.net not java you will need .Net Framework 4.5 installed to run or compile this application it was built Visual Studio 2012 so you will need that to compile it if you have multiple network adapters this wont work for you as it wont resolve your local ip address ffmpeg is used to transcode videos that are not mp4, when transcoding you cannot seek/select play position when streaming from harddrive mp4 files should have the ability to seek/select play position you can drag and drop video files onto application to play them(like Fling) it also has the option to play files from urls it should be pretty simple to use for you just open the program and it should find chromecasts on the network then select the chromecast you want to cast to then click "Connect CC" then drag and drop video onto it and it should start playing it should work for rooted and non rooted chromecasts when using a rooted chromecast the receiver is hosted by DeskCast its self when using a non rooted chromecast the receiver is one of the apps in the google whitelist the receiver files deskcast sends to the rooted chromecast are in the "data" folder of the application, so you can edit these too I did play with the idea of the chromecast its self hosting the receiver files but the www folder in the chromecast is locked/read only so that might be something for team eureka to add to the webpanel they have this works for me very well, but I cant say that it will work for you at all im really only posting the source so other people can use it for information or ideas to make something better than I ever could I hope this is useful to someone Click to expand... Click to collapse You can start your own webserver if you like. You got one built into /bin/busybox in shell you can start it with: /bin/busybox httpd -p 8000 -h /data/www -c /data/httpd.conf httpd.conf contains: A:* /cgi-bin:a:a echo "It's working!" > /data/www/index.html open <chromecastip>:8000 and you got your self a webserver =) if it not working, try a newer busybox binary, the one in /bin is a bit old. I've been looking a way to use CC as a host for casting so this was fun to see =)
Mape0661 said: You can start your own webserver if you like. You got one built into /bin/busybox in shell you can start it with: /bin/busybox httpd -p 8000 -h /data/www -c /data/httpd.conf httpd.conf contains: A:* /cgi-bin:a:a echo "It's working!" > /data/www/index.html open <chromecastip>:8000 and you got your self a webserver =) if it not working, try a newer busybox binary, the one in /bin is a bit old. I've been looking a way to use CC as a host for casting so this was fun to see =) Click to expand... Click to collapse yeah I did try that with a new busybox binary installed to the chromecast the webserver worked and the receiver files were hosted by the chromecast in the /data/www folder but the receiver wouldn't allow a connection to the websocket I think it had issues with the domain/ip being the same as the chromecast it might be something that can be changed in the rom by team eureka. the idea of a whitelist and a receiver being on the chromecast its self might make it possible to use offline when streaming media from your pc or tablet, Netflix and hulu and apps like that we know wont work offline I guess I will just keep playing around with it to see if I can get it to work
stooged said: yeah I did try that with a new busybox binary installed to the chromecast the webserver worked and the receiver files were hosted by the chromecast in the /data/www folder but the receiver wouldn't allow a connection to the websocket I think it had issues with the domain/ip being the same as the chromecast it might be something that can be changed in the rom by team eureka. the idea of a whitelist and a receiver being on the chromecast its self might make it possible to use offline when streaming media from your pc or tablet, Netflix and hulu and apps like that we know wont work offline I guess I will just keep playing around with it to see if I can get it to work Click to expand... Click to collapse I was experimenting with this few weeks ago, I installed Google CastVideo from github https://github.com/googlecast/CastVideos-chrome Got a page working, hosted by chromecast, but I was never able to remove the DEMO text all over the videos. But it worked nicely to stream mp4 files from a samba share. I travel a lot and my plan was/is to use a travel router and mount a samba share to my linux server with ssh something like this on chromecast ssh -C -f -N -p 22 -L 440:127.0.0.1:445 <username>@<serveradress> sudo mount -t cifs //127.0.0.1/<share> <mountpoint> -o port=440,user="<user>",password="<password>" you need a new dropbearmulti, got a working one (armv61) from http://landley.net/aboriginal/downloads/binaries/extras/ Did you try with lighttpd? ----------------------------------- cp /system/etc/httpd.conf /data (change port and webroot in httpd.conf, 3000 and /data/www worked for me) mkdir /data/www lighttpd -m /system/usr/lib -f /data/httpd.conf
Mape0661 said: Did you try with lighttpd? ----------------------------------- cp /system/etc/httpd.conf /data (change port and webroot in httpd.conf, 3000 and /data/www worked for me) mkdir /data/www lighttpd -m /system/usr/lib -f /data/httpd.conf Click to expand... Click to collapse no I just tried busybox httpd but I will give lighttpd a go
I did find one way to make the chromecast host the receiver or any html content in the post to the chromecast to loadup the receiver if you use the data uri scheme for the post data you can make the chromecast launch html so as the url for the receiver you can use something like data:text/html;base64,html_encoded_in_base64 I did a test with the receiver.html file from the Fling source and it worked fine here is a php script that should allow you to play a mp4 file on the chromecast using this method with a single post Code: <?php $ChromeCastIP = "192.168.1.102"; $ChromeCastApp = "Fling"; $VideoURL = "://commondatastorage.googleapis.com/gtv-videos-bucket/big_buck_bunny_1080p.mp4"; $htmldata = base64_encode(" <html> <head> <title></title> </head> <body bgcolor=#000000 topmargin=0 leftmargin=0 bottommargin=0 rightmargin=0 marginwidth=0 marginheight=0> <video width='100%' height='100%' autoplay> <source src='http$VideoURL' type='video/mp4'> </video> </body> </html> "); $postdata = "data:text/html;base64,$htmldata"; $fp = fsockopen($ChromeCastIP, 8008, $errno, $errstr, 30); $out = "POST /apps/$ChromeCastApp/ HTTP/1.1\r\n"; $out .= "Accept-Language: en-us\r\n"; $out .= "Accept: */*\r\n"; $out .= "User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.71 Safari/537.36\r\n"; $out .= "Host: $ChromeCastIP:8008\r\n"; $out .= "Content-Type: application/x-www-form-urlencoded\r\n"; $out .= "Origin: chrome-extension://boadgeojelhgndaghljhdicfkmllpafd\r\n"; $out .= "Content-Length: ".strlen($postdata)."\r\n"; $out .= "Connection: Close\r\n\r\n$postdata"; fwrite($fp, $out); sleep(2); fclose($fp); ?>
stooged said: I did find one way to make the chromecast host the receiver or any html content in the post to the chromecast to loadup the receiver if you use the data uri scheme for the post data you can make the chromecast launch html so as the url for the receiver you can use something like data:text/html;base64,html_encoded_in_base64 I did a test with the receiver.html file from the Fling source and it worked fine here is a php script that should allow you to play a mp4 file on the chromecast using this method with a single post Code: <?php $ChromeCastIP = "192.168.1.102"; $ChromeCastApp = "Fling"; $VideoURL = "://commondatastorage.googleapis.com/gtv-videos-bucket/big_buck_bunny_1080p.mp4"; $htmldata = base64_encode(" <html> <head> <title></title> </head> <body bgcolor=#000000 topmargin=0 leftmargin=0 bottommargin=0 rightmargin=0 marginwidth=0 marginheight=0> <video width='100%' height='100%' autoplay> <source src='http$VideoURL' type='video/mp4'> </video> </body> </html> "); $postdata = "data:text/html;base64,$htmldata"; $fp = fsockopen($ChromeCastIP, 8008, $errno, $errstr, 30); $out = "POST /apps/$ChromeCastApp/ HTTP/1.1\r\n"; $out .= "Accept-Language: en-us\r\n"; $out .= "Accept: */*\r\n"; $out .= "User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.71 Safari/537.36\r\n"; $out .= "Host: $ChromeCastIP:8008\r\n"; $out .= "Content-Type: application/x-www-form-urlencoded\r\n"; $out .= "Origin: chrome-extension://boadgeojelhgndaghljhdicfkmllpafd\r\n"; $out .= "Content-Length: ".strlen($postdata)."\r\n"; $out .= "Connection: Close\r\n\r\n$postdata"; fwrite($fp, $out); sleep(2); fclose($fp); ?> Click to expand... Click to collapse Got it working =), Very cool. I tryed to make php work on Chromecast. At the moment I only got a test page working with some old php binaries. But the php-cli are working fine!
Can you host this in github? I'd like to contribute to this project
Giswald said: Can you host this in github? I'd like to contribute to this project Click to expand... Click to collapse I have never used github before but I think this worked https://github.com/stooged/DeskCast
What's the main difference between the chrome extension "VideoStream for Google Chromecast" ? Seems it can do the same job.
lancillotto said: What's the main difference between the chrome extension "VideoStream for Google Chromecast" ? Seems it can do the same job. Click to expand... Click to collapse you don't need the chrome browser which I don't use, its junk imo. no ads. its free. open source. the main point of this is to just encourage more people to develop more things for rooted chromecasts, not everyone codes in languages that make chrome browser extensions or android apps etc. if you look at fling its open source and is a good source of information for anyone that wants to develop standalone applications for the chromecast. I think things like videostream are great for people who just want something that will play a file, but charging money for things and closed source projects don't really help other developers. videostream is a good extension it has playlist support, a custom tv part, can be controlled from your phone etc. but its transcoding is done using ffmpeg and x264 projects which are opensource and free, without those people doing amazing work on those open source projects we wouldn't be able to transcode videos. without team eureka we wouldn't have rooted chromecasts and thats open source and free. I made this project for my own personal use to cast media to my projector and TV's around my house, I started using fling but that stopped working so I used the source as a guide to create deskcast in a language I could understand so I could maintain it and keep it working. I decided to share it here because this is where I found fling and the team eureka rom, its not intended to compete with other projects or extensions its more of a source code dump for anyone out there that uses vb.net.
This app Always crash no Windows 8.1 x64:crying: ---------- Post added at 07:05 AM ---------- Previous post was at 06:40 AM ---------- Play movie for 3 seconds and then crash. Always.
Crash solved mute_man said: This app Always crash no Windows 8.1 x64:crying: ---------- Post added at 07:05 AM ---------- Previous post was at 06:40 AM ---------- Play movie for 3 seconds and then crash. Always. Click to expand... Click to collapse Before i was on windows 8 64 bits she was crashing !! Now i am on windows 8.1 64 bits she's crashing again ! I have dl the src and debug and I found where search ask on the web and i solve.. The problème is with french pc, where locale Fr is used. Because the programme for show us the current_time and de total duration of the cast, receive data and parse them. The programe receive data in string like "0.145666" or "46.613333" . And later we try to convert this decimal number in string to double. But on US pc : (4.5).ToString() send "4.5" Convert.ToDouble("4.5") send 4.5 Convert.ToDouble("4,5") send an exception On FR pc : (4.5).ToString() send "4,5" Convert.ToDouble("4.5") send an exception Convert.ToDouble("4,5") send 4.5 I dont find this alone but i was searching help here http://openclassrooms.com/forum/sujet/la-conversion-de-la-chaine-46-6133-en-type-double and somebody send me here http://www.developpez.net/forums/d530200/dotnet/langages/csharp/convert-todouble-ne-gere-points/ Where i found the solution. So you can download the src http://forum.xda-developers.com/attachment.php?attachmentid=2958209&d=1412304466 open in visual studio go to Form1.vb At the beginning of the file under Code: Option Strict Off Option Explicit On Imports System.IO Imports System.Net Imports System.Threading add Code: Imports System.Globalization and search for Code: If Spl2(0) = "null" Then Spl2(0) = 0 You will find 3 occurance. But only 2 are interesting on line 288 and line 295. Add before these 2 lines Code: If CultureInfo.CurrentCulture.TwoLetterISOLanguageName = "fr" Then Spl2(0) = Spl2(0).Replace(".", ",") at final you will have Code: If InStr(StrMessage, Chr(34) & "duration" & Chr(34) & ":") <> 0 Then Spl1 = Split(StrMessage, Chr(34) & "duration" & Chr(34) & ":") Spl2 = Split(Spl1(1), ",") ' If Spl2(0).Contains(".") Then Spl2(0) = Spl2(0).Replace(".", ",") If CultureInfo.CurrentCulture.TwoLetterISOLanguageName = "fr" Then Spl2(0) = Spl2(0).Replace(".", ",") If Spl2(0) = "null" Then Spl2(0) = 0 pDuration = Fix(Spl2(0)) End If If InStr(StrMessage, Chr(34) & "current_time" & Chr(34) & ":") <> 0 Then Spl1 = Split(StrMessage, Chr(34) & "current_time" & Chr(34) & ":") Spl2 = Split(Spl1(1), ",") ' If Spl2(0).Contains(".") Then Spl2(0) = Spl2(0).Replace(".", ",") If CultureInfo.CurrentCulture.TwoLetterISOLanguageName = "fr" Then Spl2(0) = Spl2(0).Replace(".", ",") If Spl2(0) = "null" Then Spl2(0) = 0 pTime = Fix(Spl2(0)) TrackTime(pDuration, pTime) End If Instead of Code: If InStr(StrMessage, Chr(34) & "duration" & Chr(34) & ":") <> 0 Then Spl1 = Split(StrMessage, Chr(34) & "duration" & Chr(34) & ":") Spl2 = Split(Spl1(1), ",") If Spl2(0) = "null" Then Spl2(0) = 0 pDuration = Fix(Spl2(0)) End If If InStr(StrMessage, Chr(34) & "current_time" & Chr(34) & ":") <> 0 Then Spl1 = Split(StrMessage, Chr(34) & "current_time" & Chr(34) & ":") Spl2 = Split(Spl1(1), ",") If Spl2(0) = "null" Then Spl2(0) = 0 pTime = Fix(Spl2(0)) TrackTime(pDuration, pTime) End If well compile & run and enjoy !
Great, thanks ! But may I ask to publish somewhere the compiled version because I don't think that everybody has visual studio. Thanks in advance Inf3rnus187 said: Before i was on windows 8 64 bits she was crashing !! Now i am on windows 8.1 64 bits she's crashing again ! I have dl the src and debug and I found where search ask on the web and i solve.. The problème is with french pc, where locale Fr is used. Because the programme for show us the current_time and de total duration of the cast, receive data and parse them. The programe receive data in string like "0.145666" or "46.613333" . And later we try to convert this decimal number in string to double. But on US pc : (4.5).ToString() send "4.5" Convert.ToDouble("4.5") send 4.5 Convert.ToDouble("4,5") send an exception On FR pc : (4.5).ToString() send "4,5" Convert.ToDouble("4.5") send an exception Convert.ToDouble("4,5") send 4.5 I dont find this alone but i was searching help here http://openclassrooms.com/forum/sujet/la-conversion-de-la-chaine-46-6133-en-type-double and somebody send me here http://www.developpez.net/forums/d530200/dotnet/langages/csharp/convert-todouble-ne-gere-points/ Where i found the solution. So you can download the src http://forum.xda-developers.com/attachment.php?attachmentid=2958209&d=1412304466 open in visual studio go to Form1.vb At the beginning of the file under Code: Option Strict Off Option Explicit On Imports System.IO Imports System.Net Imports System.Threading add Code: Imports System.Globalization and search for Code: If Spl2(0) = "null" Then Spl2(0) = 0 You will find 3 occurance. But only 2 are interesting on line 288 and line 295. Add before these 2 lines Code: If CultureInfo.CurrentCulture.TwoLetterISOLanguageName = "fr" Then Spl2(0) = Spl2(0).Replace(".", ",") at final you will have Code: If InStr(StrMessage, Chr(34) & "duration" & Chr(34) & ":") <> 0 Then Spl1 = Split(StrMessage, Chr(34) & "duration" & Chr(34) & ":") Spl2 = Split(Spl1(1), ",") ' If Spl2(0).Contains(".") Then Spl2(0) = Spl2(0).Replace(".", ",") If CultureInfo.CurrentCulture.TwoLetterISOLanguageName = "fr" Then Spl2(0) = Spl2(0).Replace(".", ",") If Spl2(0) = "null" Then Spl2(0) = 0 pDuration = Fix(Spl2(0)) End If If InStr(StrMessage, Chr(34) & "current_time" & Chr(34) & ":") <> 0 Then Spl1 = Split(StrMessage, Chr(34) & "current_time" & Chr(34) & ":") Spl2 = Split(Spl1(1), ",") ' If Spl2(0).Contains(".") Then Spl2(0) = Spl2(0).Replace(".", ",") If CultureInfo.CurrentCulture.TwoLetterISOLanguageName = "fr" Then Spl2(0) = Spl2(0).Replace(".", ",") If Spl2(0) = "null" Then Spl2(0) = 0 pTime = Fix(Spl2(0)) TrackTime(pDuration, pTime) End If Instead of Code: If InStr(StrMessage, Chr(34) & "duration" & Chr(34) & ":") <> 0 Then Spl1 = Split(StrMessage, Chr(34) & "duration" & Chr(34) & ":") Spl2 = Split(Spl1(1), ",") If Spl2(0) = "null" Then Spl2(0) = 0 pDuration = Fix(Spl2(0)) End If If InStr(StrMessage, Chr(34) & "current_time" & Chr(34) & ":") <> 0 Then Spl1 = Split(StrMessage, Chr(34) & "current_time" & Chr(34) & ":") Spl2 = Split(Spl1(1), ",") If Spl2(0) = "null" Then Spl2(0) = 0 pTime = Fix(Spl2(0)) TrackTime(pDuration, pTime) End If well compile & run and enjoy ! Click to expand... Click to collapse
Windows 8.1 x64 NO CRASHES! Finally some good PC software for Chromecast, I don't like using Chrome to cast videos, and TorrentTV app stopped working for me. I'm downloading the source, can I compile using VS 2012? I'll be using it for studying purposes only. But I'll try to add subtitles option (perfect for offline movies). Absolutely amazing, thanks man!
I know this is an old thread, but I hope someone see's this. I want to make an app in VB.NET that will send one window to ChromCast and have another window on the desktop. Is this possible? Any guidance or starter tips on how to do it?
started tinkering with my chrome cast again and added C# source for deskcast as I have moved away from vb.net. https://github.com/stooged/DeskCastC Visual Studio 2017 RC Net Framework 4.6.1
Thank @stooged, both project VB and C# work on windows 10 64 bit, but only .mp4 files .
[Q] hooking RecentLocationApps.getAppList()
I am trying to hook this method, I want to filter out the "Google Play services" from there...(is under settings app) Code: /** * Fills a list of applications which queried location recently within * specified time. */ public List<Preference> getAppList() { // Retrieve a location usage list from AppOps AppOpsManager aoManager = (AppOpsManager) mActivity.getSystemService(Context.APP_OPS_SERVICE); List<AppOpsManager.PackageOps> appOps = aoManager.getPackagesForOps( new int[] { AppOpsManager.OP_MONITOR_LOCATION, AppOpsManager.OP_MONITOR_HIGH_POWER_LOCATION, }); // Process the AppOps list and generate a preference list. ArrayList<Preference> prefs = new ArrayList<Preference>(); long now = System.currentTimeMillis(); for (AppOpsManager.PackageOps ops : appOps) { // Don't show the Android System in the list - it's not actionable for the user. // Also don't show apps belonging to background users. int uid = ops.getUid(); boolean isAndroidOs = (uid == Process.SYSTEM_UID) && ANDROID_SYSTEM_PACKAGE_NAME.equals(ops.getPackageName()); if (!isAndroidOs && ActivityManager.getCurrentUser() == UserHandle.getUserId(uid)) { Preference pref = getPreferenceFromOps(now, ops); if (pref != null) { prefs.add(pref); } } } return prefs; } I can't hook this method, I'v tried something like : Code: if (lpparam.packageName.equals("com.android.settings")) { findAndHookMethod("com.android.settings.location.LocationSettings", lpparam.classLoader, "getAppList", new XC_MethodHook() { @Override protected void afterHookedMethod(MethodHookParam param) throws Throwable { XposedBridge.log("Called"); } what is the best approach to achieve this?
devtrop said: I can't hook this method Click to expand... Click to collapse Why not? Are there any errors in the Xposed log? If not, I'd make sure the package name is correct and that the method is actually called when you expect it to be.
Code: 09-29 11:06:53.600 5277 5277 I Xposed : java.lang.NoSuchMethodError: com.android.settings.location.RecentLocationApps#getAppList(java.util.List)#exact running on Samsumg Note 3.
devtrop said: Code: 09-29 11:06:53.600 5277 5277 I Xposed : java.lang.NoSuchMethodError: com.android.settings.location.RecentLocationApps#getAppList(java.util.List)#exact running on Samsumg Note 3. Click to expand... Click to collapse That error doesn't correspond to the code you've posted in the first post. Post the modified code and the error. Purely guessing, though: Samsung modified the code you're trying to hook. You're hooking the methods you're seeing in the AOSP code, but that's not the case on your device.
You are correct, sorry. I'm trying a lot of different stuff. this is the code: Code: try { findAndHookMethod("com.android.settings.location.RecentLocationApps", lpparam.classLoader, "getAppList", List.class, new XC_MethodHook() { @SuppressWarnings("unchecked") @Override protected void beforeHookedMethod(MethodHookParam param) throws Throwable { XposedBridge.log("RecentLocationApps.getAppList()"); } }); } catch(Throwable t) { XposedBridge.log(t); } the throwable is : Code: 09-29 11:56:08.559 5282 5282 I Xposed : java.lang.NoSuchMethodError: com.android.settings.location.RecentLocationApps#getAppList(java.util.List)#exact if tried to do that for every package, not just com.android.settings or com.android.settings.location and it doesn't seem to work. do you know what's the correct package? do I have to start dedexing Samsung's packages to get the answer?
devtrop said: do you know what's the correct package? Click to expand... Click to collapse com.android.settings should be the correct package, if I'm not mistaken. devtrop said: do I have to start dedexing Samsung's packages to get the answer? Click to expand... Click to collapse That'd be the best thing to do as it looks like Samsung has changed some things.
Json body with retrofit issues with format
As simple as this json looks I cannot get it formatted correctly to post in body. Code: { "requests": [ { "action": "reject", "justification": "admin reason", "requestId": "23423423refsdsdgdg" } ], "justification": "admin reason" } Here is what I have so far in Android studio using retrofit2 Code: Gson gson = new GsonBuilder() .setLenient() .create(); Retrofit.Builder builder = new Retrofit.Builder() .baseUrl("https://myurl.com/") .addConverterFactory(GsonConverterFactory.create(gson)); JsonObject jsonObject = new JsonObject(); JsonObject jsonObjectN = new JsonObject(); jsonObject.addProperty("action", action); jsonObject.addProperty("request_id", request_id); jsonObject.addProperty("justification", "blablabla"); jsonObjectN.add("requests", jsonObject); jsonObjectN.addProperty("justification", justification); Retrofit retrofit = builder.build(); Client client = retrofit.create(Client.class); Call<PostRequest> user = client.postRequests( jsonObjectN ); in client class I have Code: @Headers("Content-Type: application/json") @POST("/requests") Call<PostRequest> postRequests(@Body JsonObject body ); So the request is like this Code: Request{method=POST, url=https://myurl.com/requests, tags={class retrofit2.Invocation=com.login.Client.postRequests() [{"requests":{"action":"reject","request_id":"23423423refsdsdgdg","justification":"blablabla"},"justification":"Action done by Admin"}]}} Very close but I cant quite figure out how to make it in the exact array/json format as its expecting?? Hopefully someone knows Android and jsonObject well enough to help.