Hi
Im trying to make a new app with RootTools SDK.
I have to change dwoard (and some others) values in registry. I have rgu file, which I can import from PC. But I want to make an app. So, here what written in rgu file and I have to transform this to commands:
Code:
[HKEY_LOCAL_MACHINE\ControlPanel\Themes\0\Accents]
"11"=dword:FF008287
[HKEY_LOCAL_MACHINE\ControlPanel\Themes\1\Accents]
"11"=dword:FF008287
[HKEY_LOCAL_MACHINE\ControlPanel\Themes\AccentsDisplayName]
"11"="Color 11"
I cant even make the first step.
tried this command:
Code:
UInt32 writevalue = 74;
WP7RootToolsSDK.Registry.SetDWordValue(WP7RootToolsSDK.RegistryHyve.LocalMachine, @"ControlPanel\Themes\0\Accents\11", "FF008287", writevalue);
UInt32 readvalue = WP7RootToolsSDK.Registry.GetDWordValue(WP7RootToolsSDK.RegistryHyve.LocalMachine, @"ControlPanel\Themes\0\Accents\11", "FF008287");
System.Diagnostics.Debug.Assert(readvalue == writevalue);
When i start debugging sending project to the phone, visual studia reports error "The system cannot find the file specified."
Any solution, please?
No, you can't install to emulator .
use RootTools SDK develope app,
you must install to device test!
The default number of accent is from 0 to 10, if you want add one accent you must create the new value and, but i'm not sure, of that add new xaml for this
No,friend,he want to change the DWordValue ,not add the DWordValue!
his way is right!but he don't install to the emulator!!!
坏天使 said:
No, you can't install to emulator .
use RootTools SDK develope app,
you must install to device test!
Click to expand...
Click to collapse
I know that I can't install it to the emulator. I installed it to the phone via visual studio pointing the device. (in visual studio we can choose where to test the app)
probably I have find the error
with this you get the value but you have just write the value!
UInt32 readvalue = WP7RootToolsSDK.Registry.GetDWordValue(WP7RootToolsSDK.RegistryHyve.LocalMachine, @"ControlPanel\Themes\0\Accents\11", "FF008287");
you must write this
UInt32 readvalue = WP7RootToolsSDK.Registry.GetDWordValue(WP7RootToolsSDK.RegistryHyve.LocalMachine, @"ControlPanel\Themes\0\Accents", "11");
xorizont said:
I know that I can't install it to the emulator. I installed it to the phone via visual studio pointing the device. (in visual studio we can choose where to test the app)
Click to expand...
Click to collapse
xorizont said:
And then emulator reports an error "no such file or directory"
Click to expand...
Click to collapse
So who is wrong?
И, пожалуйста, переводите хотя бы в Google Translate, ваш англо-новгородский понять очень сложно, даже мне.
Useless guy said:
So who is wrong?
И, пожалуйста, переводите хотя бы в Google Translate, ваш англо-новгородский понять очень сложно, даже мне.
Click to expand...
Click to collapse
ok, corrected the first post. Now it's ok.
and please, obey the forum rules. Use English. If you are so keen on it, why don't you show us your talent?
Are so sure that my English is so bad for understanding?
Your use of the SetDwordValue (and such) functions is incorrect. You're treating the registry value as though it's part of the registry key. It's not.
WP7RootToolsSDK.Registry.SetDWordValue(
WP7RootToolsSDK.RegistryHyve.LocalMachine,
@"ControlPanel\Themes\0\Accents\11",
"FF008287",
writevalue);
/* This is wrong, because the 11 is not part of the registry key,
* the "FF008287" is the data, not the registry value,
* and where did that "74" that you are specifying as the write value come from?*/
WP7RootToolsSDK.Registry.SetDWordValue(
WP7RootToolsSDK.RegistryHyve.LocalMachine,
@"ControlPanel\Themes\0\Accents",
"11",
0xFF008287);
// This is the correct way to represent the first two lines of your RGU file using Heathcliff74's SDK.
GoodDayToDie said:
Your use of the SetDwordValue (and such) functions is incorrect. You're treating the registry value as though it's part of the registry key. It's not.
WP7RootToolsSDK.Registry.SetDWordValue(
WP7RootToolsSDK.RegistryHyve.LocalMachine,
@"ControlPanel\Themes\0\Accents\11",
"FF008287",
writevalue);
/* This is wrong, because the 11 is not part of the registry key,
* the "FF008287" is the data, not the registry value,
* and where did that "74" that you are specifying as the write value come from?*/
WP7RootToolsSDK.Registry.SetDWordValue(
WP7RootToolsSDK.RegistryHyve.LocalMachine,
@"ControlPanel\Themes\0\Accents",
"11",
0xFF008287);
// This is the correct way to represent the first two lines of your RGU file using Heathcliff74's SDK.
Click to expand...
Click to collapse
yep. already did this. but thanks you too.
Related
Hi
i try to compile a simple jni sample and get:
Please define SDL_JAVA_PACKAGE_PATH to the path of your Java package with dots replaced with underscores, for example "com_example_SanAngeles"
How should i do what?
Many thanks
Michael
Assuming you are doing all this stuff from a command prompt, enter:
C:\>SET SDL_JAVA_PACKAGE_PATH = "com_examples_SanAngeles"
C:\>
Note that this environment variable will only last for the life of the command window, if you start up a second one, you will have to type it in there, as well.
To set the value permanently, use Control Panel -> System.
Click the Advanced Tab, then the Environment Variables button, and add the value.
Hi
thanks for the reply but I get:
[email protected]:~/Android-cpp/projects/test$ SET SDL_JAVA_PACKAGE_PATH = "com_examples_SanAngeles"
SET: command not found
I saw some other alike below but still don't know how/where:
# Set environment to CrystaX NDK with RTTI and exceptions instead of original NDK
# export PATH=$PATH:~/src/endless_space/android-ndk-r4-crystax/ndk-build
Regards Michael
Post #2 above will not work, as it is for a Windows command prompt. You failed to mention the fact that you are running under Linux. Also from a command prompt, Linux is case sensitive, Windows isn't.
Under Windows 'SET' and 'set', even 'sEt' are the same thing, under linux they are all different.
For a crash course on Linux environment variables try the links below:-
http://www.codecoffee.com/tipsforlinux/articles/030.html
or
http://lowfatlinux.com/linux-environment-variables.html
Yes i might figure the syntax but how should i know the path?
I've installed android sdk and ndk both the latest.
Again thanks
Michael
I would suggest posting this in the Android Development section, but unfortunately, you need 10 posts to be able to do it.
I'm really a Windows/WinMo developer, with only a passing knowledge of Linux/Android.
You could PM the moderator of this forum, madnish30 and request to have it moved over, but you still will not able to reply until you have clocked up 10 posts.
ahso said:
Yes i might figure the syntax but how should i know the path?
Click to expand...
Click to collapse
It's not a filesystem path - it is a Java namespace path. As it is package-specific there's no way to say on given information what the corresponding path should be.
I have an HTC Status (U.S. AT&T version of Chacha) and, like some other users on this forum, have had some issues with the keyboard mappings changing after rooting the phone. After spending a lot of time browsing/searching these (and other) forums as well as Google, I've concluded a few things about this:
1) The files responsible for the keyboard mappings are chacha-keypad.kcm.bin and chacha-keypad.kl.
2) Changing chacha-keypad.kl will help with the main keys but can't be used to fix mappings of alt+
3) The completely correct chacha-keypad.kcm.bin doesn't seem to be posted anywhere (for U.S. English keyboard). I got one that is almost right, but mappings for alt+V, alt+B, alt+N, alt+M, alt+?, alt+camera, and alt+.com are still off.
Therefore, I will need to edit the chacha-keypad.kcm.bin file myself. I have no problem doing this, as the format of the kcm files seems pretty straight-forward, but I can't figure out how to open the bin file, which cannot be opened directly since it is binary.
I need to convert the kcm.bin to kcm, make the changes that are needed, and then recompile to bin. I found info on doing this here:
http://forum.xda-developers.com/showthread.php?t=837002&page=4
The above link includes a zip that has a Python script to decompile the bin and then an exe to compile kcm to bin. I'm stuck at the decompiling part. I tried running the unkcm Python script included in the kcm_utils.zip (from the post above), however I get an error message:
Code:
C:\Users\Maya\Downloads\HTC\kcm_utils>python unkcm.py chacha-keypad.kcm.bin chacha-keypad.kcm
Traceback (most recent call last):
File "unkcm.py", line 179, in <module>
decompileKCM(f, output)
File "unkcm.py", line 162, in decompileKCM
Out.write(kr.printKR()+"\n")
File "unkcm.py", line 143, in printKR
fmt = (rkeycodes[self.keycode],)
KeyError: 116
I'm attaching the kcm.py and chacha-keypad.kcm.bin files for reference. Can someone please help? Or does anyone know of another way of converting the .kcm.bin files to .kcm files? Or can someone that knows how to do it please provide me with the .kcm version of the attached .kcm.bin file?
Thank you so much in advance!
Hi,
You must add keycodes 116, 117 and 124 (QUECHAR) in unkcm, and also in the .h file used by kcm.
SuperOSR and my latest CM7 build don't use these keycodes but instead are based on the same keycodes as the vision/latte boards.
Code:
"USER1": 97, "USER2": 98, "USER3": 99, "FUNC_1": 116,
"HTC_SHARE": 117, "FUNC_2": 118, "QUECHAR": 124}
You may also need: http://forum.xda-developers.com/attachment.php?attachmentid=441092&d=1289759467
xdbg said:
Hi,
You must add keycodes 116, 117 and 124 (QUECHAR) in unkcm, and also in the .h file used by kcm.
SuperOSR and my latest CM7 build don't use these keycodes but instead are based on the same keycodes as the vision/latte boards.
Code:
"USER1": 97, "USER2": 98, "USER3": 99, "FUNC_1": 116,
"HTC_SHARE": 117, "FUNC_2": 118, "QUECHAR": 124}
You may also need: http://forum.xda-developers.com/attachment.php?attachmentid=441092&d=1289759467
Click to expand...
Click to collapse
Thank you so much for your help! Once I added those codes to the unkcm.py file, I was able to decompile the kcm.bin file and made the changes I needed (sure enough, as I'd expected, the ALT and ALT+SHIFT column had some incorrect values for some of the keys).
I also added the key codes that you mentioned to the kcm source code (KeycodeLabels.h file in the src folder of kcm_utils), and re-compiled the kcm.exe without errors. However, when I tried to run it, I got an error:
Code:
C:\Users\Maya\Downloads\HTC\kcm_utils>kcm chacha-keypad.kcm chacha-keypad.kcm.bin
chacha-keypad.kcm:60: not enough on this line: '?' 0x0 '?' '?'
'#' '#'
Line 60 is the last line in my chacha-keypad.kcm file and is exactly the same format as the other lines, so I'm not sure why I'm getting the above error. Looking at kcm.cpp, I see that the "not enough on this line: ..." message only appears when there is a '\0' (end of line) before it's expected, but I don't understand why that is happening, since the format is the same for all the lines and it only seems to have a problem with the last line.
I'm attaching my chacha-keypad.kcm file, as well as my modified kcm.exe along with the modified source of this kcm app (where I just added the key codes you mentioned in your post to the .h file). Any idea what could be wrong? Thanks again!
thanks
I am just looking for tools to change the "pound" into "~"...because i never use "pound"
Try this util:
http://wiki.androidteam.ru/tools
http://dl.dropbox.com/u/1134234/AndroidTeam/utils/kcmdecoder.jar
How to use:
java -jar kcmdecoder.jar chacha-keypad.kcm.bin chacha-keypad.kcm
vovkab said:
How to use:
java -jar kcmdecoder.jar chacha-keypad.kcm.bin chacha-keypad.kcm
Click to expand...
Click to collapse
Ermm please i am new to Htc and and Android (beginner). i have the same problem with my Htc (status) where alt keys don't work correctly. can u please give me a detailed instruction on how to install the java program.
anyway i ddnt find any java emulator for Htc (status)/chacha. thanks in advance
hello,
can we use this for the FB button?
Here's a basic guide on how to port, since some people were asking:
Prerequisites:
Windows 8 (non-RT) development machine
Visual Studio 2012 (Don't know if express will work, but evaluation editions exist here: http://www.microsoft.com/visualstudio/eng/downloads)
dll-to-lib tool (http://forum.xda-developers.com/showthread.php?p=36597774)
Part 1: Getting necessary libs:
(1) On your Windows RT device, copy the .dll files in C:\Windows\System32 to some directory on your development machine (We'll call it C:\rtdev\dlls).
(2) Create a directory on your development machine for the libs (we'll call it C:\rtdev\libs)
(3) Extract the dll-to-lib to your lib directory
(4) Open powershell (run powershell.exe) and navigate to the libs directory
(5) run the lib script against the dlls ("./dll-to-lib.ps1 C:\rtdev\dlls).
(6) If you've never run a powershell script before, you might get a signing error. You can type "Set-ExecutionPolicy Unrestricted" to run the script. Please be aware of the security implications if you choose to do this.
(7) You now have a bunch of libs that tell the linker what functions are available in the DLLs on the Windows RT device. Copy the libs that you need to "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\lib\arm". DO NOT OVERWRITE ANY EXISITNG LIBS (repeat: DO NOT OVERWRITE ANY EXISITNG LIBS OR YOU MAY HAVE TO REPAIR/REINSTALL VS) You'll probably have to change the security permissions if you want to copy to this directory, or copy as an administrator.
Part 2: Fixing the compiler.
The compiler won't let you build desktop apps due to a configuration setting. Fortunately, some people at stack overflow figured this out:
http://stackoverflow.com/questions/11151474/can-arm-desktop-programs-be-built-using-visual-studio-2012
Basically, edit:
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Platforms\ARM\Microsoft.Cpp.ARM.Common.props
to include:
<WindowsSDKDesktopARMSupport>true</WindowsSDKDesktopARMSupport>
before </PropertyGroup>
Part 3: Building a Win32 Hello World app.
Now that we have the libs out of the way, lets build a basic hello world app.
(1) Start Visual Studio 2012.
(2) Create a new project, select Visual C++ (might be under other languages) and pick Win32 Project.
(3) In the wizard, select "Console Application", and press "Finish".
(4) Replace the program body with some text that prints hello world:
#include "stdafx.h"
#include <stdio.h>
int _tmain(int argc, _TCHAR* argv[])
{
printf("Hello World!");
return 0;
}
(5) Add the ARM configuration settings in configuration manager. Goto Build>Configuration Manager, and under "Active Solution Platform" click on Win32 and click New. Select "ARM" under "Type or select the new platform", and press "OK".
(6) Select the "Release" configuration and build the solution (F6). With some luck, some win32 ARM binaries should appear in the ARM subdirectory of your project.
Part 4: Porting Apps
Now that your compiler works, you can port apps over. Most apps that have a VC++ project should port fine just by adding the ARM configuration.
Some apps will have manually set \MACHINE:x86, in which case you will have to change that in the linker options. Also, ARM doesn't support no dynamic rebase, so if you get that error, turn of \DYNAMICBASE:NO in the linker options.
A lot of cross-platform apps will use 'nmake' or the like. For the most part, these apps can be cross compiled using the VS 2012 ARM Cross Tools - you can find that in your start menu- In Windows 8 just type "ARM" and it should show up.
Also some interesting issues might experience:
You might encounter missing symbols from __imp_XXXX or the like from the linker. If it looks like a Win32 function, you just need to explicitly add the .lib (in project properties under Linker->Input->Additional Dependencies, type the name of the lib, which you need to also copy to the VC\lib\arm directory as above. Some common libs include "gdi32.lib" "shell32.lib" and "ole32.lib". You can usually find the .lib under the msdn references: for example this entry for GetUserName http://msdn.microsoft.com/en-us/library/windows/desktop/ms724432(v=vs.85).aspx tells us we can find GetUserName in Advapi32.lib. Also the A and W suffixes just represent the ANSI and unicode version of these functions.
When compiling big libraries like Qt, you might run into some problem about BLX fixups, since relative jumps on arm are limited (23 bits?) I guess they didn't create fixup islands in the MSVC compiler, but I found if you set \INCREMENTAL:NO, that should fix the problem most of the time. Otherwise you might have to add an \ORDER file and manually order things. See stack overflow topic for more details: http://stackoverflow.com/questions/11478055/lnk2013-error-fixup-overflow
Another serious pitfall.. no in-line assembly support in the MS ARM compiler. So you'll have to write in your assembly in a .S file and link to it.
...hopefully this helps someone - happy coding!
no2chem said:
A lot of cross-platform apps will use 'nmake' or the like. For the most part, these apps can be cross compiled using the VS 2012 ARM Cross Tools - you can find that in your start menu- In Windows 8 just type "ARM" and it should show up.
Click to expand...
Click to collapse
I have found with some nmake projects you need to add
Code:
/D _ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE
to your CFLAGS otherwise cl complains about not being able to build desktop arm executables even with the change made to visual studio
& : The term 'dumpbin.exe' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
included, verify that the path is correct and try again.
At C:\rtdev\libs\dll-to-lib.ps1:62 char:25
+ $unprocesseddef = &$dumpbin /exports $dllfullpath
+ ~~~~~~~~
+ CategoryInfo : ObjectNotFound: (dumpbin.exe:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Exception calling "Matches" with "1" argument(s): "Value cannot be null.
Parameter name: input"
At C:\rtdev\libs\dll-to-lib.ps1:65 char:5
+ $matches = [System.Text.RegularExpressions.MatchCollection] $regex.Matches($ ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: ) [], MethodInvocationException
+ FullyQualifiedErrorId : ArgumentNullException
Click to expand...
Click to collapse
Thank you for the tutorial, i currently facing issues on step 5, it seems the script can't access the dumpbin.exe, any suggestion ?
rheza02 said:
Thank you for the tutorial, i currently facing issues on step 5, it seems the script can't access the dumpbin.exe, any suggestion ?
Click to expand...
Click to collapse
You should be running the script on your development machine with visual studio installed
lilstevie said:
You should be running the script on your development machine with visual studio installed
Click to expand...
Click to collapse
i'm running it in my development machine with visual studio 2012 installed, Any idea ?
rheza02 said:
i'm running it in my development machine with visual studio 2012 installed, Any idea ?[/QUOTE
Do you have VS2012 express? Possibly the script will not work if you don't have vs2012 express. Also you need to have $VS110COMNTOOLS set, but VS2012 install should set that for you.
Click to expand...
Click to collapse
To be more clear, you may want to try running the tool from the Visual Studio command line, not just bog-standard CMD (unless you want to set a bunch of environment variable sand such by hand). You should be able to invoke the script by typing powershell <scriptname>
cmd.exe : The system cannot find the path specified.
Click to expand...
Click to collapse
This is the first error when i'm trying to run the script.
rheza02 said:
This is the first error when i'm trying to run the script.
Click to expand...
Click to collapse
looks like you don't have powershell installed. are you running an older version of windows? You can download it here http://www.microsoft.com/en-us/download/details.aspx?id=34595
I'm running windows 8, i can't see any value inside path in my environment variable, do you think it gonna be problem ?
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
rheza02 said:
I'm running windows 8, i can't see any value inside path in my environment variable, do you think it gonna be problem ?
Click to expand...
Click to collapse
PATH is under system variables not user variables, have you tried opening powershell from the start screen, and executing the script from within powershell directly?
lilstevie said:
PATH is under system variables not user variables, have you tried opening powershell from the start screen, and executing the script from within powershell directly?
Click to expand...
Click to collapse
same error.
GoodDayToDie said:
To be more clear, you may want to try running the tool from the Visual Studio command line, not just bog-standard CMD (unless you want to set a bunch of environment variable sand such by hand). You should be able to invoke the script by typing powershell <scriptname>
Click to expand...
Click to collapse
it's the same thing, i only have a lot of 1kb files with different name in my libs folder. any suggestion guys ?
Thanks
----------------------------
nvm, I thinks it's working now.
no2chem said:
(6) Select the "Release" configuration and build the solution (F6). With some luck, some win32 ARM binaries should appear in the ARM subdirectory of your project.
Click to expand...
Click to collapse
I keep getting these 3 errors. What's happening?
Thanks...
Edit - the ARM subfolder of the project is empty, which I'm guessing it shouldn't be. How do we fix that?
How do i compile my visual studio project for arm ?, there is no arm option in my build configuration.
Read the OP. You have to select "New" from the "Active solution platform" dropdown and ARM should appear...
Sent from my SCH-I535 using xda app-developers app
jtg007 said:
I keep getting these 3 errors. What's happening?
Thanks...
Edit - the ARM subfolder of the project is empty, which I'm guessing it shouldn't be. How do we fix that?
Click to expand...
Click to collapse
Hm, did you overwrite any of the libs in your VS folder? That might be a problem.. hopefully you have a backup...
jtg007 said:
Read the OP. You have to select "New" from the "Active solution platform" dropdown and ARM should appear...
Sent from my SCH-I535 using xda app-developers app
Click to expand...
Click to collapse
As i said earlier, there is no Arm option under Active Solution Platform > new. any idea ?
no2chem said:
Hm, did you overwrite any of the libs in your VS folder? That might be a problem.. hopefully you have a backup...
Click to expand...
Click to collapse
Yes, I did. Several files had the same name and I replaced them all...
Argh.
Sent from my SCH-I535 using xda app-developers app
jtg007 said:
Yes, I did. Several files had the same name and I replaced them all...
Argh.
Sent from my SCH-I535 using xda app-developers app
Click to expand...
Click to collapse
Yikes. I added some instructions warning people not to overwrite.
What is DeltaJen?
DeltaJen is a tool for quickly making an incremental update based on two update zips. It is simple to use, and easy to extend for devices that don't use a straight up method of flashing a rom.
Click to expand...
Click to collapse
Why should I use it?
Have you ever hated having to download a full rom just to do a simple update? This tool can take a 200mb rom, take out all the changes, and squish the final package to less than 10mb.
Click to expand...
Click to collapse
But what if I use CWM instead of TWRP?
No issues here. DeltaJen produces updates that even your stock recovery can apply.
Click to expand...
Click to collapse
The Geeky parts
The script uses two binaries to efficiently build an update zip. bsdiff and imgdiff. bsdiff can also be replaced by the python module bsdiff4.
No threading or multiprocessing is used currently. as it stands, barely any cpu is used, so threading will be a huge bonus.
Hooks have been added to allow you to easily change how the script adds files, or to add extra lines in the updater-script
Click to expand...
Click to collapse
How do I use this?
For a straight update zip, which has no extra files or scripts other than what is in /system and boot.img, you run this.
Note that this will change when I update the cli function.
Code:
python DeltaJen.py -b <base_zip> -i <new_zip> -o <output_zip>
# Or from python
from DeltaJen import DeltaJen
dj = DeltaJen("<old_zip.zip>", "<new_zip.zip>", "<output_zip.zip>")
dj.generate()
Click to expand...
Click to collapse
I want to include this in the build steps of a custom rom
I'm working on it for a team already
Click to expand...
Click to collapse
Requirements
Linux (untested on OSX but should work)
python 2.7 or python 3.2+ (all other versions are untested and may not work)
imgdiff (supplied below or build from source)
bsdiff (sudo apt-get install bsdiff) or python module bsdiff4 (sudo pip install bsdiff4)
at least 500mb free ram (sorry, it dumps the files to ram. sorting it out soon).
Click to expand...
Click to collapse
It does NOT fully support windows yet, due imgdiff not supporting it. You can still run it, but it will only use bsdiff
More detailed instructions will be included soon, and the docs will be improved.
If you want direct help/to contribute/generally chat, come on down to the freenode channel #CyboLabs
last but not leased.
The source
XDA:DevDB Information
DeltaJen, Tool/Utility for all devices (see above for details)
Contributors
cybojenix, @GermainZ
Version Information
Status: Alpha
Created 2014-08-06
Last Updated 2014-08-09
Reserved
Dependencies
Linux
Python
bsdiff or bsdiff4
imgdiff
DeltaJen
Windows
Python
bsdiff or bsdiff4
imgdiff
DeltaJen
System Requirements
A supported OS
Enough ram to hold both zips (two 100mb zips would need 200+mb ram)
Enough storage to hold both zips
Amazing work mate!
I guess that ROM is SlimRoms. Would be glad to see this kinda awesomeness in Slim.
OMG, another @cybojenix project!!! :victory:
Have become your fan lately...
updates
automatic system and boot info detection has been added, the script is less verbose, and you can execute it directly now.
Documentation still to come
Superb Work Cybojenix
You Rock sir
kudos to @GermainZ for the massive help with cleaning up documentation.
wiki on github is in progress to aid you all.
Woow, nice work man
Any chance this project can be combined with CyanDelta for CM or OpenDelta in OmniROM?
It would be really nice if Cyan/OpenDelta downloads the differential update but creates a small update.zip only containing changed files instead of creating the latest complete ROM zip file.
klenamenis said:
Any chance this project can be combined with CyanDelta for CM or OpenDelta in OmniROM?
It would be really nice if Cyan/OpenDelta downloads the differential update but creates a small update.zip only containing changed files instead of creating the latest complete ROM zip file.
Click to expand...
Click to collapse
CyanDelta: I can't comment on because I've seen no documentation from them, nor can I get access to one of their final delta's.
OpenDelta: basically, DeltaJen and OpenDelta have two entirely different methods of working. Omni is wanting a system that will ensure the output is exactly the same every time, and not fail if the system has been modified (a zip is built and the system is flattened before applying)
This looks great.
I did a quick test using my windows system, running the script gave me the following output.
Code:
C:\Download\DeltaJen>python DeltaJen.py -b SlimSaberKat-jflte-4.4.4-2
-i SlimSaberKat-jflte-4.4.4-20140807.zip -o update_zip
WARNING: boot information not supplied.
MTD boot info found
patching system/priv-app/BackupRestoreConfirmation.apk: 1 of 95
Traceback (most recent call last):
File "DeltaJen.py", line 716, in <module>
cli()
File "DeltaJen.py", line 702, in cli
dj.generate()
File "DeltaJen.py", line 469, in generate
self.create_patches(to_diff)
File "DeltaJen.py", line 378, in create_patches
p_data = self.compute_diff(b_file, n_file)
File "DeltaJen.py", line 584, in compute_diff
if not bs_diff:
NameError: global name 'bs_diff' is not defined
Any tips on what I did wrong
kantjer said:
This looks great.
I did a quick test using my windows system, abd have the following output.
Code:
C:\Download\DeltaJen>python DeltaJen.py -b SlimSaberKat-jflte-4.4.4-2
-i SlimSaberKat-jflte-4.4.4-20140807.zip -o updte_zip
WARNING: boot information not supplied.
MTD boot info found
patching system/priv-app/BackupRestoreConfirmation.apk: 1 of 95
Traceback (most recent call last):
File "DeltaJen.py", line 716, in <module>
cli()
File "DeltaJen.py", line 702, in cli
dj.generate()
File "DeltaJen.py", line 469, in generate
self.create_patches(to_diff)
File "DeltaJen.py", line 378, in create_patches
p_data = self.compute_diff(b_file, n_file)
File "DeltaJen.py", line 584, in compute_diff
if not bs_diff:
NameError: global name 'bs_diff' is not defined
Any tips on what I did wrong
Click to expand...
Click to collapse
Ah, line 44 should be 'bs_diff = None'
On windows, you must have the python bsdiff4 installed btw
cybojenix said:
Ah, line 44 should be 'bs_diff = None'
On windows, you must have the python bsdiff4 installed btw
Click to expand...
Click to collapse
I have bsdiff4-1.1.4.tar.gz extracted to the folder containing the script and python but that clearly isn't the way to go.
Code:
ERROR: python bsdiff4 is required for windows
kantjer said:
I have bsdiff4-1.1.4.tar.gz extracted to the folder containing the script and python but that clearly isn't the way to go.
Code:
ERROR: python bsdiff4 is required for windows
Click to expand...
Click to collapse
you need to compile it as it has c parts.
try this http://www.lfd.uci.edu/~gohlke/pythonlibs/#bsdiff4
@cybojenix
A good piece of code & nice idea! Just one suggestion - can you please try xdelta (based on VCDIFF) instead of bsdiff?? In MDL, we have a very good result by using it, both in terms of memory & speed. AFAIK, CyanDelta also uses it. If you want a Python wrapper, then see here.
Best of luck!!
Titokhan said:
@cybojenix
A good piece of code & nice idea! Just one thought - can you please try xdelta (based on VCDIFF) instead of bsdiff?? In MDL, we have a very good result by using it, both in terms of memory & speed. AFAIK, CyanDelta also uses it. If you want a Python wrapper, then see here.
Best of luck!!
Click to expand...
Click to collapse
the issue with xdelta is it won't support recovery out the box. I've considered running a script to apply them manually (obviously only to replace bsdiff for now), but I won't be doing it at this stage.
cybojenix said:
you need to compile it as it has c parts.
try this http://www.lfd.uci.edu/~gohlke/pythonlibs/#bsdiff4
Click to expand...
Click to collapse
Thanks, but the installer is complaining python 3.4.1 needs to be installed but can't be found in the registry.
I have reinstalled python 3.4.1 using the.msi but still the same error.
kantjer said:
Thanks, but the installer is complaining python 3.4.1 needs to be installed but can't be found in the registry.
I have reinstalled python 3.4.1 using the.msi but still the same error.
Click to expand...
Click to collapse
what can I say, windows sucks
cybojenix said:
what can you say, windows sucks
Click to expand...
Click to collapse
I will try it tomorrow on my linux build machine.
That's where I want to have it running eventually.
Great work :good:
Congratulations my friend.
Microsoft's October 2015 Windows Update set contains a fix for my jailbreak exploit:
https://support.microsoft.com/en-us/kb/3096447
https://technet.microsoft.com/library/security/MS15-111
Specifically, the "Trusted Boot Security Feature Bypass Vulnerability – CVE-2015-2552" is my jailbreak exploit =( This is sooner than I would like, since it may hurt Windows Mobile 10 jailbreaking. I've decided to release the exploit details. Note that it's not very user-friendly at all right now.
The exploit itself is simple. Run an administrator PowerShell (can't be cmd), and execute the following command, then reboot:
bcdedit /set '{current}' loadoptions '/TŅSTSIGNING'
(The Ņ character is Unicode character U+0145, which you can find in Character Map if you need it.)
Your system will come up in "test signing" mode, along with a watermark on the desktop indicating this. While in test-signing mode, applications still have to be signed, but they can be signed by anyone, including your own self-signed certificates.
How to sign executables for this is mostly beyond the scope of what I'm posting. Use makecert and signtool. Your certificate must be at least 2048-bit RSA. When using signtool, be sure to timestamp your executable (/t option), use page hashing mode (/ph) and SHA-256 (/fd SHA256).
Someone I've been working with made a full jailbreak based upon this that doesn't require signing anything, like the RT 8.0 jailbreak was able to do. Stay tuned.
Details of why this works: http://pastebin.com/w5U2qTR0
Excellent. My surface 2 is going to have more fun.
Myriachan said:
How to sign executables for this is mostly beyond the scope of what I'm posting. Use makecert and signtool. Your certificate must be at least 2048-bit RSA. When using signtool, be sure to timestamp your executable (/t option), use page hashing mode (/ph) and SHA-256 (/fd SHA256).
Someone I've been working with made a full jailbreak based upon this that doesn't require signing anything, like the RT 8.0 jailbreak was able to do. Stay tuned.
Details of why this works: http://pastebin.com/w5U2qTR0
Click to expand...
Click to collapse
Myria, I have ported much software for jailbroken RT, and I am wondering if I should sign the executables myself and the release signed binaries, or is this something that each individual RT user needs to do themselves?
Are both options available? I could sign the binaries that I have ported and self-sign the ones that other folks have ported?
Hopefully this update (KB3096447 I assume based on the link) can be uninstalled (if accidentally installed) and blocked like usual. And I also hope those of us that are still on RT 8.0 and upgrade will also be able to remove and block it... would it be automatically installed on an 8.1 upgrade at this point?
This is both exciting and annoying at the same time... exciting that the 8.1 jailbreak is finally being release, and annoying that the exploit is already being fixed. Once in test mode, if this update is then installed will it continue to run in test mode? Or is it possible for an update to put it back in normal (locked down) mode?
Edit:
My Surface running RT 8.0 just install KB3088195 that seems to refer to the same security bulletin MS15-111.
https://support.microsoft.com/en-us/kb/3088195
I see in the KB3096447 from the first post that it lists KB3088195 as the actual update. So if I understand this correctly then KB3088195 is the one that needs to be uninstalled and blocked...
About "latin_capital_letter_n_with_cedilla" char:
http://www.fileformat.info/info/unicode/char/0145/latin_capital_letter_n_with_cedilla.png
http://www.fileformat.info/info/unicode/char/0145/index.htm
You can enter it with this small tool:
http://www.fileformat.info/tool/unicodeinput/index.htm
I didn't succeded with entering to PowerShell:
bcdedit /set '{current}' loadoptions '/TŅSTSIGNING'
1. but I was successful, when I added [SPACE] here:
' /TŅSTSIGNING' like '[SPACE]/TŅSTSIGNING'
So this works:
bcdedit /set '{current}' loadoptions ' /TŅSTSIGNING'
It seems, that '/ can't be next to each other.
2. TWO updates will break that on WRT8-1 (and no others):
kb3088195 AND kb3084905-v2 (anything, what updates winload.efi to v6-3-9600-180066 or higher [-67 in 2nd case])
3. Instead kb3084905-v2 on WRT8-1, you can install v1 to be protected, if you don't have it (if you installed right v2 in past):
http://download.windowsupdate.com/d..._f44f1307b9a5448a87823796a6ad2bf3d93dfef0.msu
Now I had to make certificate thingies...
MakeCert is for making certificate and SignTool is for signing:
MakeCert -r -pe -sr localmachine -ss Root -n "CN=WRTJBCert" C:\Decomp\WRTJBCert.cer
signtool sign /v /sm /s Root /n WRTJBCert /tr http://www.startssl.com/timestamp /ph /fd sha256 C:\Decomp\notepad++.exe
signtool sign /v /sm /s Root /n WRTJBCert /tr http://www.startssl.com/timestamp /ph /fd sha256 C:\Decomp\boost_regex-mt.dll
signtool sign /v /sm /s Root /n WRTJBCert /tr http://www.startssl.com/timestamp /ph /fd sha256 C:\Decomp\ComparePlugin.dll
signtool sign /v /sm /s Root /n WRTJBCert /tr http://www.startssl.com/timestamp /ph /fd sha256 C:\Decomp\SciLexer.dll
signtool sign /v /sm /s Root /n WRTJBCert /tr http://www.startssl.com/timestamp /ph /fd sha256 C:\Decomp\Scintilla.dll
4. If time stamp server fails, just repeat the command.
Now it works and watermark tells "TestMode":
http://www.technique.cz/storage/jailbreak.jpg
My post at MDL:
http://forums.mydigitallife.info/th...0-ARM/page26?p=1163347&viewfull=1#post1163347
It's a start Thank You!
Guys, who will compile C++ equivalent for this for ARM.
Ready to donate. )
It is Lazarus PAS thingie for Shutdown menu:
program Shutdown;
{$apptype GUI}
{$mode objfpc}{$H+}
uses
{$IFDEF UNIX}{$IFDEF UseCThreads}
cthreads,
{$ENDIF}{$ENDIF}
ComObj
{ you can add units after this };
var
shell: Variant;
{$R *.res}
begin
shell := CreateOleObject('Shell.Application');
shell.ShutdownWindows;
end.
mbjun said:
Guys, who will compile C++ equivalent for this for ARM.
Ready to donate. )
It is Lazarus PAS thingie for Shutdown menu:
program Shutdown;
{$apptype GUI}
{$mode objfpc}{$H+}
uses
{$IFDEF UNIX}{$IFDEF UseCThreads}
cthreads,
{$ENDIF}{$ENDIF}
ComObj
{ you can add units after this };
var
shell: Variant;
{$R *.res}
begin
shell := CreateOleObject('Shell.Application');
shell.ShutdownWindows;
end.
Click to expand...
Click to collapse
Why do you not use the build-in command line tool? Simply execute "shutdown -t 0 -s"
EDIT: Ah, it displays the menu thats reachable via alt+f4 on the taskbar. I'm not on my surface yet and never tried it: do vbs scripts work?
acrossland said:
Myria, I have ported much software for jailbroken RT, and I am wondering if I should sign the executables myself and the release signed binaries, or is this something that each individual RT user needs to do themselves?
Are both options available? I could sign the binaries that I have ported and self-sign the ones that other folks have ported?
Click to expand...
Click to collapse
You can sign the binary and share the signed one, it will work Tested.
jesuslg123 said:
You can sign the binary and share the signed one, it will work Tested.
Click to expand...
Click to collapse
Yep, but you have to share your certificate too (with pub and priv key), so user could add it to trusted root certificates inside his certificate storage.
acrossland said:
Myria, I have ported much software for jailbroken RT, and I am wondering if I should sign the executables myself and the release signed binaries, or is this something that each individual RT user needs to do themselves?
Are both options available? I could sign the binaries that I have ported and self-sign the ones that other folks have ported?
Click to expand...
Click to collapse
IMHO you should just tell the users the list of files, which need to be signed.
mbjun said:
Yep, but you have to share your certificate too (with pub and priv key), so user could add it to trusted root certificates inside his certificate storage.
Click to expand...
Click to collapse
I'm not sure about that, yesterday I got few signed games, shared by other person, and they work perfectly without his certificate.
Nice. Although I was expecting the rumoured 'powershell exploit' to be more powershelly than that
Thanks Myriachan! It was fun playing Quake 2 on my Surface 2
Interesting...
...while all GUI win32 apps from WRT8-0 work (after signing), the text mode's ones (like FAR or OpenTTD installer) crash with ntdll.dll error.
[Removed]
OnbekendV said:
Hi,
First really thanks for sharing this. I found out that if you remove KB3088195, Windows Update will install it automatically. So I decided to block Windows Update. I don't know how you guys are going to solve that, but permanently blocking Windows Update might be a good idea. So far I know, Windows RT 8.1 is very safe, so Windows Update isn't important (This is what I think). I posted some signed apps on XDA (accidentally in the wrong section), but I only want to know: Is that a smart thing to do? Or else, I will remove everything and wait for the jailbreak. Thanks in advance.
Regards,
OnbekendV
Click to expand...
Click to collapse
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update]
"AUOptions"=dword:00000001
[Removed]
Sorry for the noob question but does the signing process needs to be done in a X86 Windows or it can be done directly in the Win RT? I didn't managed to find MakeCert and signtool executables in my win rt (Lumia 2520).
Is there anything I need to install?
Thanks
[Removed]
Thank you OnbekendV !