I'm getting sick of seeing all the HTC and LG guys having all the fun. Trying to do something about it. xboxmod posted this in another thread...
xboxmod said:
For now the only possible door is this registry key.
[HKEY_LOCAL_MACHINE\Software\Microsoft\FieldTest]
"ManufacturingProvXmlPath"="\\windows\\DiagnosisAp p_1.provxml"
if we can identify when it's called and by what.
possibly
FieldTestApp.exe
DiagnosisApp.xap
Click to expand...
Click to collapse
Sooo I've done some mucking around with this. Made a little progress but not much.
That provxml is executed every time you dial "##634#". It just installs the Diagnosis app. Whatever process is actually doing this then launches Diagnosis which is just a silverlight app.
I can write to that registry key and put in whatever path I want. The problem is, whenver I try to run it with a provxml that I've deployed to the rigtones folder or to the app's install folder it does nothing. I was able to get it to launch the provxml that installs the AT&T crapware so I know it is working after it's modified, I just can't convince it to run one that's not in \windows\. I tried emailing the file and saving the attachment (took some tricking) and that didn't work either.
Is there any way to write files to \windows\ on samsung devices? If I'm not mistaken we don't have permission to do that from SL and there's no "WriteFile" function thrown in the drivers that we know of.
Anyone have any ideas? Anything else I should try?
so...what you're saying...is that mfg is launched provxml is written...
is it possible to dump the samsung rom to pull the xap and sideload it that way...edit the xap with the new provxml so it installs on ##634# assuming mfg is an installable app
I know it is installable I have it on my phone I dunno where I got it though...if it works...
that just leaves dell being late to the party as usual...
I think you're confused. I don't think there is a XAP that installs the provxml. It's just sitting in \windows (which I don't think we have write access too) and the phone dialer or whatnot launches hte provxml which installs the xap. The XAP ships with the phone in the \windows\ folder but isn't "installed" until it's provisioned by running ##634#.
^
you're right thought you were asking something else
YAY! Progress!!! I figured out how to get better (full?) write access to the registry
Soo in the "Diagnosis" app they use an additional COM DLL which has a whole slew of interesting features. With this one, you can write to more of the registry. I was able to change my theme colors and some of the other fun mods The following code removes the app deployment limit and replaces magenta with gray. I've attached the DLL that you'll need to include in your project. It would be nice if those of you who have developed apps like registry editors could update your Samsung support.
Code:
private CHybridClass_FCRProxy HybridClass_FCRProxy;
private IHybridInterface_FCRProxy HybridInterface_FCRProxy;
public void DoHack()
{
this.HybridClass_FCRProxy = null;
this.HybridInterface_FCRProxy = null;
this.InitializeComponent();
ComBridge.RegisterComDll("FCRouterProxy.dll", new Guid("BE2E2E71-FC72-4507-B8AD-A2FED536AAB0"));
this.HybridClass_FCRProxy = new CHybridClass_FCRProxy();
this.HybridInterface_FCRProxy = (IHybridInterface_FCRProxy)this.HybridClass_FCRProxy;
bool success;
this.HybridInterface_FCRProxy.HKLM_RegistrySetDWORD(@"Software\Microsoft\DeviceReg\Install", "MaxUnsignedApp", 2147483647, out success);
if (!success)
{
string str;
this.HybridInterface_FCRProxy.Error_GetLastErrorMessage(out str);
MessageBox.Show(str);
}
this.HybridInterface_FCRProxy.RegistrySetString(0, @"ControlPanel\Themes\AccentsDisplayName\0409", "10", "Gray", out success);
if (!success)
{
string str;
this.HybridInterface_FCRProxy.Error_GetLastErrorMessage(out str);
MessageBox.Show(str);
}
this.HybridInterface_FCRProxy.HKLM_RegistrySetDWORD(@"ControlPanel\Themes\0\Accents", "10", (uint)0xFF1B1B1B, out success);
if (!success)
{
string str;
this.HybridInterface_FCRProxy.Error_GetLastErrorMessage(out str);
MessageBox.Show(str);
}
this.HybridInterface_FCRProxy.HKLM_RegistrySetDWORD(@"ControlPanel\Themes\1\Accents", "10", (uint)0xFF1B1B1B, out success);
if (!success)
{
string str;
this.HybridInterface_FCRProxy.Error_GetLastErrorMessage(out str);
MessageBox.Show(str);
}
}
[ComImport, ClassInterface(ClassInterfaceType.None), Guid("BE2E2E71-FC72-4507-B8AD-A2FED536AAB0")]
public class CHybridClass_FCRProxy
{
}
[ComImport, InterfaceType(ComInterfaceType.InterfaceIsIUnknown), Guid("5F471A84-8D09-46fe-94D6-AF856A7CF3C8")]
internal interface IHybridInterface_FCRProxy
{
void Error_GetLastErrorMessage(out string strErrorMessage);
void Sensor_GetProximityValue(out int pdwObjectDetected, out int pdwReturn);
void Sensor_GetAmbientLightValue(out int pdwMilliLux, out int pdwReturn);
void Sensor_GetCompassValue(out float fHRawX, out float fHRawY, out float fHRawZ, out int pdwReturn);
void Sensor_GetAccelerometerValue(out float pdwACCX, out float pdwACCY, out float pdwACCZ, out int pdwReturn);
void FactoryProcess_GetHistoryNV(out int stringtext, out int pdwReturn);
void FactoryProcess_GetResultNV(out int stringtext, out int pdwReturn);
void USBSwitch_GetFunctionDriver(out uint nPathType, out int pdwReturn);
void USBSwitch_SetFunctionDriver(uint nPathType, out int pdwReturn);
void KeyTest_Enable(out int pdwReturn);
void KeyTest_Disable(out int pdwReturn);
void SMD_GetInfo(out string strSMDInfo, out int pdwReturn);
void Camera_UpdateFirmwareVersion(out int pdwReturn);
void Camera_GetFirmwareVersion(out string strISPFWVersion, out string strISPPRAVersion, out string strBINFWVersion, out string strBINPRAVersion, out string strFWVendorVersion, out string strFWReleaseVersion, out string strFWWriteCount, out int pdwReturn);
void Camera_PerformFirmwareUpdate(int dwUpdateType, out int pdwReturn);
void Camera_IsFirmwareUpdateValid(out bool bValid, out int pdwReturn);
void Loopback_Test(int dwVoiceFlag, int dwLoopbackMode, int dwStartFlag, out int pdwReturn);
void FactoryProcess_SetResultNV(int dwID, int dwPASS, out int pdwReturn);
void HKLM_RegistryGetDWORD(string pszSubKey, string pszValueName, out int pdwData);
void GetSubSystemConfig(out int dwReg0, out int dwData0, out int dwReg1, out int dwData1, out int dwReg2, out int dwData2, out int dwReg3, out int dwData3, out int dwReg4, out int dwData4, out int dwReg5, out int dwData5, out int dwReg6, out int dwData6, out int dwReg7, out int dwData7);
void SetSubSystemConfig(int dwReg0, int dwData0, int dwReg1, int dwData1, int dwReg2, int dwData2, int dwReg3, int dwData3, int dwReg4, int dwData4, int dwReg5, int dwData5, int dwReg6, int dwData6, int dwReg7, int dwData7);
void GetSystemGain(int reg0, out int reg1, out int reg2);
void SetSystemGain(int reg0, int reg1, int reg2);
void GetClassGain(int reg0, int reg1, out int reg2);
void SetClassGain(int reg0, int reg1, int reg2);
void GetDeviceGain(int reg0, out int reg1, out int reg2);
void SetDeviceGain(int reg0, int reg1, int reg2);
void SetDualMicControl(bool bOnOff);
void Battery_GetLoggingStatus(out int pdwStatus, out int pdwReturn);
void Battery_SetLoggingStatus(int dwEnable, out int pdwReturn);
void FMRadio_Initialize(out bool bReturn);
void FMRadio_UnInitialize(out bool bReturn);
void FMRadio_GetStatusValues(out int nRSSI, out ushort unThreshold, out ushort unSNR, out ushort unStereoMode, out bool bReturn);
void FMRadio_SetTheradholdValue(ushort unType, ushort unValue, out bool bReturn);
void HKCU_RegistryGetDWORD(string pszSubKey, string pszValueName, out int pdwData, out int pdwReturn);
void FMRadio_SetFrequency(int unFrequency, out bool pbReturn);
void BT_GetMode(int dwGetFlag, int dwModeFlag, out int pdwStatus, out bool pbReturn);
void System_Reboot(out bool pbReturn);
void Sensor_GetProximityValue_Chip(out int pdwObjectDetected, out int pdwObjectValue, out int pdwReturn);
void FMRadio_SetRegion(int dwRegion, out bool pbReturn);
void Touch_RelianceTestEnable(out int pdwReturn);
void Touch_RelianceTestDisable(out int pdwReturn);
void Touch_GetDeltaValue(out int pdwXCoord, out int pdwYCoord, out int pdwDelta, out int pdwReference, out int pdwFirmwareVer, out int pdwReturn);
void SetBacklightLevel(int nLevel);
void GetFGInfo(out int Version, out int RCOMP, out int VCELL, out int rawSOC, out int adjSOC, out int pdwReturn);
void SetFGQuickStart(out int pdwReturn);
void SetLogEnable(out int pdwReturn);
void GetPowerStatus(out int ACLineStatus, out int BatteryFlag, out int BatteryLifePercent, out int Reserved1, out int BatteryLifeTime, out int BatteryFullLifeTime, out int Reserved2, out int BackupBatteryFlag, out int BackupBatteryLifePercent, out int Reserved3, out int BackupBatteryLifeTime, out int BackupBatteryFullLifeTime, out int BatteryChemistry, out int BatteryVoltage, out int BatteryCurrent, out int BatteryAverageCurrent, out int BatteryAverageInterval, out int BatterymAHourConsumed, out int BatteryTemperature, out int BackupBatteryVoltage, out int pdwReturn);
void GETADCInfo(out ushort VBATT, out ushort VCHG, out ushort INCHG, out ushort THERM, out bool TACABLE, out bool USBCABLE, out ushort BATT_ID, out int pdwReturn);
void GetMVInfo(out short VBATT_MV, out short VCHG_MV, out short INCHG_OUT_MV, out short DEG, out short BAT_PER, out int pdwReturn);
void SleepMode(out int pdwReturn);
void Camera_SetSimpleTest(uint nPathType, out int pdwReturn);
void SetPreventSleep(out int pdwReturn);
void ReleasePreventSleep(out int pdwReturn);
void FMRadio_ScanFrequency(out int nScanFrequnecy, out bool pbReturn);
void Camera_GetSimpleTest(out uint nPathType, out int pdwReturn);
void HKCU_RegistrySetDWORD(string pszSubKey, string pszValueName, uint dwData, out bool pbReturn);
void HKLM_RegistrySetDWORD(string pszSubKey, string pszValueName, uint dwData, out bool pbReturn);
void Touch_GetInfoValue(out int pdwFirmwareVer, out int pdwFirmwarebuild, out int pdwThreadHold, out int pdwXCoord, out int pdwYCoord, out int pdwReference1, out int pdwReference2, out int pdwReference3, out int pdwReference4, out int pdwReference5, out int pdwDelta1, out int pdwDelta2, out int pdwDelta3, out int pdwDelta4, out int pdwDelta5, out int pdwReturn);
void TouchKey_GetInfoValue(out string pbstrKeyVer, out int pdwReturn);
void FactoryProcess_GetDPPPVKKEY(out int pdwLength, out int stringtext, out int pdwReturn);
void FactoryProcess_GetDPPPVKFILENAME(out int pdwLength, out int stringtext, out int pdwReturn);
void RegistrySetString(int nKey, string pszSubKey, string pszValueName, string pszString, out bool pbReturn);
void RegistryGetString(int nKey, string pszSubKey, string pszValueName, out string strKeyMessage, out bool pbReturn);
void FMRadio_OutputSwitch(int OutputType, out bool pbReturn);
void Light_SetCalValue(int dwValue, out int pdwReturn);
void Accelerometer_SetCalValue(int dwValue, out int pdwReturn);
void Sensor_GetCompassBearing(out int pdwBearing, out int pdwHDST, out int pdwPASS, out int pdwReturn);
void FactoryProcess_SetDaylightTime(int dwTime, out int pdwReturn);
void VolumeControl_waveOutSetVolume(int dwVolume, out int pdwReturn);
void VolumeControl_waveOutGetVolume(out int dwVolume, out int pdwReturn);
void DualMic_Test(int dwStartFlag, out int pdwReturn);
}
RustyGrom said:
YAY! Progress!!! I figured out how to get better (full?) write access to the registry
Soo in the "Diagnosis" app they use an additional COM DLL which has a whole slew of interesting features. With this one, you can write to more of the registry. I was able to change my theme colors and some of the other fun mods The following code removes the app deployment limit and replaces magenta with gray. I've attached the DLL that you'll need to include in your project. It would be nice if those of you who have developed apps like registry editors could update your Samsung support.
Click to expand...
Click to collapse
I'm not able to add the COM DLL to my C# project. Am I missing something here? I'd like to test it out.
pixeltec said:
I'm not able to add the COM DLL to my C# project. Am I missing something here? I'd like to test it out.
Click to expand...
Click to collapse
There's a few things you gotta do to get native code working. Check out this thread (and my sample solution) for more info.
RustyGrom said:
YAY! Progress!!! I figured out how to get better (full?) write access to the registry
Soo in the "Diagnosis" app they use an additional COM DLL which has a whole slew of interesting features. With this one, you can write to more of the registry. I was able to change my theme colors and some of the other fun mods The following code removes the app deployment limit and replaces magenta with gray. I've attached the DLL that you'll need to include in your project. It would be nice if those of you who have developed apps like registry editors could update your Samsung support.
Code:
private CHybridClass_FCRProxy HybridClass_FCRProxy;
private IHybridInterface_FCRProxy HybridInterface_FCRProxy;
public void DoHack()
{
this.HybridClass_FCRProxy = null;
this.HybridInterface_FCRProxy = null;
this.InitializeComponent();
ComBridge.RegisterComDll("FCRouterProxy.dll", new Guid("BE2E2E71-FC72-4507-B8AD-A2FED536AAB0"));
this.HybridClass_FCRProxy = new CHybridClass_FCRProxy();
this.HybridInterface_FCRProxy = (IHybridInterface_FCRProxy)this.HybridClass_FCRProxy;
bool success;
this.HybridInterface_FCRProxy.HKLM_RegistrySetDWORD(@"Software\Microsoft\DeviceReg\Install", "MaxUnsignedApp", 2147483647, out success);
if (!success)
{
string str;
this.HybridInterface_FCRProxy.Error_GetLastErrorMessage(out str);
MessageBox.Show(str);
}
this.HybridInterface_FCRProxy.RegistrySetString(0, @"ControlPanel\Themes\AccentsDisplayName\0409", "10", "Gray", out success);
if (!success)
{
string str;
this.HybridInterface_FCRProxy.Error_GetLastErrorMessage(out str);
MessageBox.Show(str);
}
this.HybridInterface_FCRProxy.HKLM_RegistrySetDWORD(@"ControlPanel\Themes\0\Accents", "10", (uint)0xFF1B1B1B, out success);
if (!success)
{
string str;
this.HybridInterface_FCRProxy.Error_GetLastErrorMessage(out str);
MessageBox.Show(str);
}
this.HybridInterface_FCRProxy.HKLM_RegistrySetDWORD(@"ControlPanel\Themes\1\Accents", "10", (uint)0xFF1B1B1B, out success);
if (!success)
{
string str;
this.HybridInterface_FCRProxy.Error_GetLastErrorMessage(out str);
MessageBox.Show(str);
}
}
[ComImport, ClassInterface(ClassInterfaceType.None), Guid("BE2E2E71-FC72-4507-B8AD-A2FED536AAB0")]
public class CHybridClass_FCRProxy
{
}
[ComImport, InterfaceType(ComInterfaceType.InterfaceIsIUnknown), Guid("5F471A84-8D09-46fe-94D6-AF856A7CF3C8")]
internal interface IHybridInterface_FCRProxy
{
void Error_GetLastErrorMessage(out string strErrorMessage);
void Sensor_GetProximityValue(out int pdwObjectDetected, out int pdwReturn);
void Sensor_GetAmbientLightValue(out int pdwMilliLux, out int pdwReturn);
void Sensor_GetCompassValue(out float fHRawX, out float fHRawY, out float fHRawZ, out int pdwReturn);
void Sensor_GetAccelerometerValue(out float pdwACCX, out float pdwACCY, out float pdwACCZ, out int pdwReturn);
void FactoryProcess_GetHistoryNV(out int stringtext, out int pdwReturn);
void FactoryProcess_GetResultNV(out int stringtext, out int pdwReturn);
void USBSwitch_GetFunctionDriver(out uint nPathType, out int pdwReturn);
void USBSwitch_SetFunctionDriver(uint nPathType, out int pdwReturn);
void KeyTest_Enable(out int pdwReturn);
void KeyTest_Disable(out int pdwReturn);
void SMD_GetInfo(out string strSMDInfo, out int pdwReturn);
void Camera_UpdateFirmwareVersion(out int pdwReturn);
void Camera_GetFirmwareVersion(out string strISPFWVersion, out string strISPPRAVersion, out string strBINFWVersion, out string strBINPRAVersion, out string strFWVendorVersion, out string strFWReleaseVersion, out string strFWWriteCount, out int pdwReturn);
void Camera_PerformFirmwareUpdate(int dwUpdateType, out int pdwReturn);
void Camera_IsFirmwareUpdateValid(out bool bValid, out int pdwReturn);
void Loopback_Test(int dwVoiceFlag, int dwLoopbackMode, int dwStartFlag, out int pdwReturn);
void FactoryProcess_SetResultNV(int dwID, int dwPASS, out int pdwReturn);
void HKLM_RegistryGetDWORD(string pszSubKey, string pszValueName, out int pdwData);
void GetSubSystemConfig(out int dwReg0, out int dwData0, out int dwReg1, out int dwData1, out int dwReg2, out int dwData2, out int dwReg3, out int dwData3, out int dwReg4, out int dwData4, out int dwReg5, out int dwData5, out int dwReg6, out int dwData6, out int dwReg7, out int dwData7);
void SetSubSystemConfig(int dwReg0, int dwData0, int dwReg1, int dwData1, int dwReg2, int dwData2, int dwReg3, int dwData3, int dwReg4, int dwData4, int dwReg5, int dwData5, int dwReg6, int dwData6, int dwReg7, int dwData7);
void GetSystemGain(int reg0, out int reg1, out int reg2);
void SetSystemGain(int reg0, int reg1, int reg2);
void GetClassGain(int reg0, int reg1, out int reg2);
void SetClassGain(int reg0, int reg1, int reg2);
void GetDeviceGain(int reg0, out int reg1, out int reg2);
void SetDeviceGain(int reg0, int reg1, int reg2);
void SetDualMicControl(bool bOnOff);
void Battery_GetLoggingStatus(out int pdwStatus, out int pdwReturn);
void Battery_SetLoggingStatus(int dwEnable, out int pdwReturn);
void FMRadio_Initialize(out bool bReturn);
void FMRadio_UnInitialize(out bool bReturn);
void FMRadio_GetStatusValues(out int nRSSI, out ushort unThreshold, out ushort unSNR, out ushort unStereoMode, out bool bReturn);
void FMRadio_SetTheradholdValue(ushort unType, ushort unValue, out bool bReturn);
void HKCU_RegistryGetDWORD(string pszSubKey, string pszValueName, out int pdwData, out int pdwReturn);
void FMRadio_SetFrequency(int unFrequency, out bool pbReturn);
void BT_GetMode(int dwGetFlag, int dwModeFlag, out int pdwStatus, out bool pbReturn);
void System_Reboot(out bool pbReturn);
void Sensor_GetProximityValue_Chip(out int pdwObjectDetected, out int pdwObjectValue, out int pdwReturn);
void FMRadio_SetRegion(int dwRegion, out bool pbReturn);
void Touch_RelianceTestEnable(out int pdwReturn);
void Touch_RelianceTestDisable(out int pdwReturn);
void Touch_GetDeltaValue(out int pdwXCoord, out int pdwYCoord, out int pdwDelta, out int pdwReference, out int pdwFirmwareVer, out int pdwReturn);
void SetBacklightLevel(int nLevel);
void GetFGInfo(out int Version, out int RCOMP, out int VCELL, out int rawSOC, out int adjSOC, out int pdwReturn);
void SetFGQuickStart(out int pdwReturn);
void SetLogEnable(out int pdwReturn);
void GetPowerStatus(out int ACLineStatus, out int BatteryFlag, out int BatteryLifePercent, out int Reserved1, out int BatteryLifeTime, out int BatteryFullLifeTime, out int Reserved2, out int BackupBatteryFlag, out int BackupBatteryLifePercent, out int Reserved3, out int BackupBatteryLifeTime, out int BackupBatteryFullLifeTime, out int BatteryChemistry, out int BatteryVoltage, out int BatteryCurrent, out int BatteryAverageCurrent, out int BatteryAverageInterval, out int BatterymAHourConsumed, out int BatteryTemperature, out int BackupBatteryVoltage, out int pdwReturn);
void GETADCInfo(out ushort VBATT, out ushort VCHG, out ushort INCHG, out ushort THERM, out bool TACABLE, out bool USBCABLE, out ushort BATT_ID, out int pdwReturn);
void GetMVInfo(out short VBATT_MV, out short VCHG_MV, out short INCHG_OUT_MV, out short DEG, out short BAT_PER, out int pdwReturn);
void SleepMode(out int pdwReturn);
void Camera_SetSimpleTest(uint nPathType, out int pdwReturn);
void SetPreventSleep(out int pdwReturn);
void ReleasePreventSleep(out int pdwReturn);
void FMRadio_ScanFrequency(out int nScanFrequnecy, out bool pbReturn);
void Camera_GetSimpleTest(out uint nPathType, out int pdwReturn);
void HKCU_RegistrySetDWORD(string pszSubKey, string pszValueName, uint dwData, out bool pbReturn);
void HKLM_RegistrySetDWORD(string pszSubKey, string pszValueName, uint dwData, out bool pbReturn);
void Touch_GetInfoValue(out int pdwFirmwareVer, out int pdwFirmwarebuild, out int pdwThreadHold, out int pdwXCoord, out int pdwYCoord, out int pdwReference1, out int pdwReference2, out int pdwReference3, out int pdwReference4, out int pdwReference5, out int pdwDelta1, out int pdwDelta2, out int pdwDelta3, out int pdwDelta4, out int pdwDelta5, out int pdwReturn);
void TouchKey_GetInfoValue(out string pbstrKeyVer, out int pdwReturn);
void FactoryProcess_GetDPPPVKKEY(out int pdwLength, out int stringtext, out int pdwReturn);
void FactoryProcess_GetDPPPVKFILENAME(out int pdwLength, out int stringtext, out int pdwReturn);
void RegistrySetString(int nKey, string pszSubKey, string pszValueName, string pszString, out bool pbReturn);
void RegistryGetString(int nKey, string pszSubKey, string pszValueName, out string strKeyMessage, out bool pbReturn);
void FMRadio_OutputSwitch(int OutputType, out bool pbReturn);
void Light_SetCalValue(int dwValue, out int pdwReturn);
void Accelerometer_SetCalValue(int dwValue, out int pdwReturn);
void Sensor_GetCompassBearing(out int pdwBearing, out int pdwHDST, out int pdwPASS, out int pdwReturn);
void FactoryProcess_SetDaylightTime(int dwTime, out int pdwReturn);
void VolumeControl_waveOutSetVolume(int dwVolume, out int pdwReturn);
void VolumeControl_waveOutGetVolume(out int dwVolume, out int pdwReturn);
void DualMic_Test(int dwStartFlag, out int pdwReturn);
}
Click to expand...
Click to collapse
DUDE Thanks SO much for taking the initiative on this.. We're getting somewhere good on this! Let's get the Samsung community in the same lime light as HTC!
Cool beans dude!!! finally getting somewhere with the samsung...great job!!
How to use FCRouterProxy.dll? I cannot add it as reference. thank you.
varavut said:
How to use FCRouterProxy.dll? I cannot add it as reference. thank you.
Click to expand...
Click to collapse
RustyGrom said:
There's a few things you gotta do to get native code working. Check out this thread (and my sample solution) for more info.
Click to expand...
Click to collapse
It's a Native COM DLL, not a .net dll.
RustyGrom said:
It's a Native COM DLL, not a .net dll.
Click to expand...
Click to collapse
Do you think it'd be possible to write a managed wrapper DLL for the native calls? I think that'd make the whole process a lot less messy.
I took a look at your native calls project, and I must admit, I feel a bit silly. I'm not sure what to define ComBridge as. I can't compile without it.
RustyGrom said:
YAY! Progress!!! I figured out how to get better (full?) write access to the registry
Soo in the "Diagnosis" app they use an additional COM DLL which has a whole slew of interesting features. With this one, you can write to more of the registry. I was able to change my theme colors and some of the other fun mods The following code removes the app deployment limit and replaces magenta with gray. I've attached the DLL that you'll need to include in your project. It would be nice if those of you who have developed apps like registry editors could update your Samsung support.
Code:
private CHybridClass_FCRProxy HybridClass_FCRProxy;
private IHybridInterface_FCRProxy HybridInterface_FCRProxy;
public void DoHack()
{
this.HybridClass_FCRProxy = null;
this.HybridInterface_FCRProxy = null;
this.InitializeComponent();
ComBridge.RegisterComDll("FCRouterProxy.dll", new Guid("BE2E2E71-FC72-4507-B8AD-A2FED536AAB0"));
this.HybridClass_FCRProxy = new CHybridClass_FCRProxy();
this.HybridInterface_FCRProxy = (IHybridInterface_FCRProxy)this.HybridClass_FCRProxy;
bool success;
this.HybridInterface_FCRProxy.HKLM_RegistrySetDWORD(@"Software\Microsoft\DeviceReg\Install", "MaxUnsignedApp", 2147483647, out success);
if (!success)
{
string str;
this.HybridInterface_FCRProxy.Error_GetLastErrorMessage(out str);
MessageBox.Show(str);
}
this.HybridInterface_FCRProxy.RegistrySetString(0, @"ControlPanel\Themes\AccentsDisplayName\0409", "10", "Gray", out success);
if (!success)
{
string str;
this.HybridInterface_FCRProxy.Error_GetLastErrorMessage(out str);
MessageBox.Show(str);
}
this.HybridInterface_FCRProxy.HKLM_RegistrySetDWORD(@"ControlPanel\Themes\0\Accents", "10", (uint)0xFF1B1B1B, out success);
if (!success)
{
string str;
this.HybridInterface_FCRProxy.Error_GetLastErrorMessage(out str);
MessageBox.Show(str);
}
this.HybridInterface_FCRProxy.HKLM_RegistrySetDWORD(@"ControlPanel\Themes\1\Accents", "10", (uint)0xFF1B1B1B, out success);
if (!success)
{
string str;
this.HybridInterface_FCRProxy.Error_GetLastErrorMessage(out str);
MessageBox.Show(str);
}
}
[ComImport, ClassInterface(ClassInterfaceType.None), Guid("BE2E2E71-FC72-4507-B8AD-A2FED536AAB0")]
public class CHybridClass_FCRProxy
{
}
[ComImport, InterfaceType(ComInterfaceType.InterfaceIsIUnknown), Guid("5F471A84-8D09-46fe-94D6-AF856A7CF3C8")]
internal interface IHybridInterface_FCRProxy
{
void Error_GetLastErrorMessage(out string strErrorMessage);
void Sensor_GetProximityValue(out int pdwObjectDetected, out int pdwReturn);
void Sensor_GetAmbientLightValue(out int pdwMilliLux, out int pdwReturn);
void Sensor_GetCompassValue(out float fHRawX, out float fHRawY, out float fHRawZ, out int pdwReturn);
void Sensor_GetAccelerometerValue(out float pdwACCX, out float pdwACCY, out float pdwACCZ, out int pdwReturn);
void FactoryProcess_GetHistoryNV(out int stringtext, out int pdwReturn);
void FactoryProcess_GetResultNV(out int stringtext, out int pdwReturn);
void USBSwitch_GetFunctionDriver(out uint nPathType, out int pdwReturn);
void USBSwitch_SetFunctionDriver(uint nPathType, out int pdwReturn);
void KeyTest_Enable(out int pdwReturn);
void KeyTest_Disable(out int pdwReturn);
void SMD_GetInfo(out string strSMDInfo, out int pdwReturn);
void Camera_UpdateFirmwareVersion(out int pdwReturn);
void Camera_GetFirmwareVersion(out string strISPFWVersion, out string strISPPRAVersion, out string strBINFWVersion, out string strBINPRAVersion, out string strFWVendorVersion, out string strFWReleaseVersion, out string strFWWriteCount, out int pdwReturn);
void Camera_PerformFirmwareUpdate(int dwUpdateType, out int pdwReturn);
void Camera_IsFirmwareUpdateValid(out bool bValid, out int pdwReturn);
void Loopback_Test(int dwVoiceFlag, int dwLoopbackMode, int dwStartFlag, out int pdwReturn);
void FactoryProcess_SetResultNV(int dwID, int dwPASS, out int pdwReturn);
void HKLM_RegistryGetDWORD(string pszSubKey, string pszValueName, out int pdwData);
void GetSubSystemConfig(out int dwReg0, out int dwData0, out int dwReg1, out int dwData1, out int dwReg2, out int dwData2, out int dwReg3, out int dwData3, out int dwReg4, out int dwData4, out int dwReg5, out int dwData5, out int dwReg6, out int dwData6, out int dwReg7, out int dwData7);
void SetSubSystemConfig(int dwReg0, int dwData0, int dwReg1, int dwData1, int dwReg2, int dwData2, int dwReg3, int dwData3, int dwReg4, int dwData4, int dwReg5, int dwData5, int dwReg6, int dwData6, int dwReg7, int dwData7);
void GetSystemGain(int reg0, out int reg1, out int reg2);
void SetSystemGain(int reg0, int reg1, int reg2);
void GetClassGain(int reg0, int reg1, out int reg2);
void SetClassGain(int reg0, int reg1, int reg2);
void GetDeviceGain(int reg0, out int reg1, out int reg2);
void SetDeviceGain(int reg0, int reg1, int reg2);
void SetDualMicControl(bool bOnOff);
void Battery_GetLoggingStatus(out int pdwStatus, out int pdwReturn);
void Battery_SetLoggingStatus(int dwEnable, out int pdwReturn);
void FMRadio_Initialize(out bool bReturn);
void FMRadio_UnInitialize(out bool bReturn);
void FMRadio_GetStatusValues(out int nRSSI, out ushort unThreshold, out ushort unSNR, out ushort unStereoMode, out bool bReturn);
void FMRadio_SetTheradholdValue(ushort unType, ushort unValue, out bool bReturn);
void HKCU_RegistryGetDWORD(string pszSubKey, string pszValueName, out int pdwData, out int pdwReturn);
void FMRadio_SetFrequency(int unFrequency, out bool pbReturn);
void BT_GetMode(int dwGetFlag, int dwModeFlag, out int pdwStatus, out bool pbReturn);
void System_Reboot(out bool pbReturn);
void Sensor_GetProximityValue_Chip(out int pdwObjectDetected, out int pdwObjectValue, out int pdwReturn);
void FMRadio_SetRegion(int dwRegion, out bool pbReturn);
void Touch_RelianceTestEnable(out int pdwReturn);
void Touch_RelianceTestDisable(out int pdwReturn);
void Touch_GetDeltaValue(out int pdwXCoord, out int pdwYCoord, out int pdwDelta, out int pdwReference, out int pdwFirmwareVer, out int pdwReturn);
void SetBacklightLevel(int nLevel);
void GetFGInfo(out int Version, out int RCOMP, out int VCELL, out int rawSOC, out int adjSOC, out int pdwReturn);
void SetFGQuickStart(out int pdwReturn);
void SetLogEnable(out int pdwReturn);
void GetPowerStatus(out int ACLineStatus, out int BatteryFlag, out int BatteryLifePercent, out int Reserved1, out int BatteryLifeTime, out int BatteryFullLifeTime, out int Reserved2, out int BackupBatteryFlag, out int BackupBatteryLifePercent, out int Reserved3, out int BackupBatteryLifeTime, out int BackupBatteryFullLifeTime, out int BatteryChemistry, out int BatteryVoltage, out int BatteryCurrent, out int BatteryAverageCurrent, out int BatteryAverageInterval, out int BatterymAHourConsumed, out int BatteryTemperature, out int BackupBatteryVoltage, out int pdwReturn);
void GETADCInfo(out ushort VBATT, out ushort VCHG, out ushort INCHG, out ushort THERM, out bool TACABLE, out bool USBCABLE, out ushort BATT_ID, out int pdwReturn);
void GetMVInfo(out short VBATT_MV, out short VCHG_MV, out short INCHG_OUT_MV, out short DEG, out short BAT_PER, out int pdwReturn);
void SleepMode(out int pdwReturn);
void Camera_SetSimpleTest(uint nPathType, out int pdwReturn);
void SetPreventSleep(out int pdwReturn);
void ReleasePreventSleep(out int pdwReturn);
void FMRadio_ScanFrequency(out int nScanFrequnecy, out bool pbReturn);
void Camera_GetSimpleTest(out uint nPathType, out int pdwReturn);
void HKCU_RegistrySetDWORD(string pszSubKey, string pszValueName, uint dwData, out bool pbReturn);
void HKLM_RegistrySetDWORD(string pszSubKey, string pszValueName, uint dwData, out bool pbReturn);
void Touch_GetInfoValue(out int pdwFirmwareVer, out int pdwFirmwarebuild, out int pdwThreadHold, out int pdwXCoord, out int pdwYCoord, out int pdwReference1, out int pdwReference2, out int pdwReference3, out int pdwReference4, out int pdwReference5, out int pdwDelta1, out int pdwDelta2, out int pdwDelta3, out int pdwDelta4, out int pdwDelta5, out int pdwReturn);
void TouchKey_GetInfoValue(out string pbstrKeyVer, out int pdwReturn);
void FactoryProcess_GetDPPPVKKEY(out int pdwLength, out int stringtext, out int pdwReturn);
void FactoryProcess_GetDPPPVKFILENAME(out int pdwLength, out int stringtext, out int pdwReturn);
void RegistrySetString(int nKey, string pszSubKey, string pszValueName, string pszString, out bool pbReturn);
void RegistryGetString(int nKey, string pszSubKey, string pszValueName, out string strKeyMessage, out bool pbReturn);
void FMRadio_OutputSwitch(int OutputType, out bool pbReturn);
void Light_SetCalValue(int dwValue, out int pdwReturn);
void Accelerometer_SetCalValue(int dwValue, out int pdwReturn);
void Sensor_GetCompassBearing(out int pdwBearing, out int pdwHDST, out int pdwPASS, out int pdwReturn);
void FactoryProcess_SetDaylightTime(int dwTime, out int pdwReturn);
void VolumeControl_waveOutSetVolume(int dwVolume, out int pdwReturn);
void VolumeControl_waveOutGetVolume(out int dwVolume, out int pdwReturn);
void DualMic_Test(int dwStartFlag, out int pdwReturn);
}
Click to expand...
Click to collapse
You are the man! I've put together an accent changer w/source.
http://www.daveamenta.com/2011-01/change-accent-colors-on-windows-phone-7-samsung-devices/
pixeltec said:
Do you think it'd be possible to write a managed wrapper DLL for the native calls? I think that'd make the whole process a lot less messy.
I took a look at your native calls project, and I must admit, I feel a bit silly. I'm not sure what to define ComBridge as. I can't compile without it.
Click to expand...
Click to collapse
you must add Microsoft.Phone.InteropServices to reference.
varavut said:
you must add Microsoft.Phone.InteropServices to reference.
Click to expand...
Click to collapse
Gotcha. Thanks.
@davux: Freaking awesome. Works flawlessly on my Focus. Kudos.
Well, I spent a while hacking together my first ever C# program today. Though to call it mine is a bit of a stretch. What I've done is I've taken a Registry editor for the Samsung Focus (here), and modified it to use this DLL instead.
It successfully reads and writes to the hklm hive, but I have not tested it on hkcu. I've used it to keep my phone from relocking and manually editing the theme data. I haven't run into a registry key I can't read or write with it.
However, it still doesn't browse through the registry, only edits stuff you know the locations of.
Enjoy, either way. And ignore the silly splash screen I threw together in twenty seconds and forgot to remove. Source is included. xD
Edit: Found a minor bug, the default path that it starts on points to a key that doesn't exist. (Namely, the actual key is in hklm, not hkcu)
RustyGrom said:
I can write to that registry key and put in whatever path I want. The problem is, whenver I try to run it with a provxml that I've deployed to the rigtones folder or to the app's install folder it does nothing. I was able to get it to launch the provxml that installs the AT&T crapware so I know it is working after it's modified, I just can't convince it to run one that's not in \windows\. I tried emailing the file and saving the attachment (took some tricking) and that didn't work either.
Click to expand...
Click to collapse
Did you email the file in your \windows folder, or another one you created yourself?
ad what do you mean by "I just can't convince it to run one that's not in \windows\"?? it cannot run a program not in the \windows folder or cannot install a provxml that in not in the \windows folder?
thanx
pixeltec said:
Do you think it'd be possible to write a managed wrapper DLL for the native calls? I think that'd make the whole process a lot less messy.
I took a look at your native calls project, and I must admit, I feel a bit silly. I'm not sure what to define ComBridge as. I can't compile without it.
Click to expand...
Click to collapse
I think someone said they're working on one that will abstract all platforms. Hopefully they'll incorporate this.
martani said:
Did you email the file in your \windows folder, or another one you created yourself?
ad what do you mean by "I just can't convince it to run one that's not in \windows\"?? it cannot run a program not in the \windows folder or cannot install a provxml that in not in the \windows folder?
thanx
Click to expand...
Click to collapse
Saved email attachments go to "\Application Data\Volatile\EmailAttachments\AttachmentsXXXXXXXXXXX" where XXXXXXXXXXX is some random number it assigns. I don't know of a way to get the file from that folder to \windows.
It won't install a provxml that's not in the windows folder. I tried putting the same provxml that it normally uses in other folders and it won't run it.
Here is my registry app with cross device writing (at least HTC and Samsung, LG may work).
XAP: http://bit.ly/eEZ0Uf
It includes a lib that abstract registry API for each device.
(nico) said:
Here is my registry app with cross device writing (at least HTC and Samsung, LG may work).
XAP: http://bit.ly/eEZ0Uf
It includes a lib that abstract registry API for each device.
Click to expand...
Click to collapse
How do you detect the type of the device? or is it just a "try ... catch" and whatever works if the one to use?