Related
Hello all,
I need some help signing my APK files. I have done everything correctly up to the point of signing the file.
I am running the command:
jarsigner -verbose -keystore -my-release-key.keystore oriental.apk alias_name
Jar signer then asks for my password I set up. i put in the password and get:
jarsigner: unable to sign jar: java.util.zip.ZipException: invalid entry compressed size (expected 1110 but got 1119 bytes)
I have scoured the web for hours and tried a few things. All lowercase name ofr the apk file as suggested somewhere. i am at a loss.
Anyone know how to fix this?
Need to do this on an unsigned apk file...
I ran into this same problem for an android apk using Eclipse. I don't know if your running into the exact same problem. But, I'm guessing the principles are similar.
To fix this I had to do the jarsigner on an unsigned apk file. If you are using Eclipse, the apk is signed with a temporary key (which I think the android market won't allow).
If your using something else, you can see if your apk is already signed using syntax like:
$ jarsigner -verify -verbose my_application.apk
To get an unsigned apk in Eclipse, right click on application name in the Package Explorer window and choose Android Tools, then choose "Export Unsigned Application Package...". Save the package to a new location.
Once you have an unsigned apk. Run the jarsigner command you were using on the unsigned apk file.
This is also possibly explained better (at least for an android user using Eclipse) at:
http://developer.android.com/guide/publishing/app-signing.html
Like I said earlier if your not using Eclipse to generate an apk, possibly the tool your using has similar options to create an unsigned apk file.
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?
I wanted to sign (using apksigner 1.1) my recently compiled .apk, but I have encountered this error
Signing - 1.apk
Error: opening registry key 'Software\JavaSoft\Java Runtime Environment'
Error: could not find java.dll
Error: Could not find Java SE Runtime Environment.
I'm running win 7 x64, jre 1,7 and jdk 1.7; jre and jdk variables added to PATH.
I had no problems with recompiling and compiling my .apk using APKTool.
Does anyone had an idea what's wrong?
Thanks!
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.
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.