IBM MobileFirst. Cannot create .wlapp with extended authenticity enabled - ibm-mobilefirst

Im trying to configure extended authenticity for cordova-based hybrid app.
mfp version is 7.1.0.00.20151227-1730
Built signed release .apk
Built .wlapp
wladm> enable extended-authenticity r.wlapp r.apk > extended.wlapp
Output:
Analyzing executable file.
Generating new .wlapp file...
invalid entry compressed size (expected 11444 but got 11433 bytes)
Tried with unsigned .apk
The output was that unsigned .apk is unsupported.
How to properly create .wlapp with extended authenticity enabled?

The error message invalid entry compressed size (expected 11444 but got 11433 bytes) means that the wladm program could not find a valid ZIP file structure in one of the two files (the .wlapp or .apk file).
There are two possible causes of this error:
A transmission error from the machine on which the file was created to the machine where you run wladm. Examples of such transmission errors are a transfer with FTP in text mode, or a commit in text mode in a source code management system, but there may be more. You can determine whether there was a transmission error by taking a hash code (say, sha1sum) of the file where it was created and where it is being consumed by wladm, and comparing these hash codes. Do this for both the .wlapp and the .apk files.
It could also be that the file uses some extensions of the ZIP file format (such as ZIP64) that wladm does not understand. In this case, try to use wladm with a newer Java (that is, set the JAVA_HOME environment variable to point to a Java 7 or Java 8 implementation).
If neither of these hints helps, this is a case for the IBM MobileFirst support. Please open a ticket with them, and submit both of the files. They will treat both files confidentially.

The cause is that the original .wlapp file uses a slightly different compression algorithm than the new .wlapp file that the "enable extended-authenticity" command wants to create.
The workaround is to unzip and re-jar the .wlapp file before attempting the "enable extended-authenticity" operation:
$ mkdir tmpdir
$ cd tmpdir
$ unzip -x ../r.wlapp
$ rm -f ../r.wlapp
$ jar cf ../r.wlapp *
$ cd ..

Related

Howto control target directory for "native dependency" downloads for kotlinc-native?

I want to play with kotlin native on one of our linux server machines. Our HOME directories live on a network file system (AFS to be precise), and they have very restricted quota rules (I only have a 200 MB for my "home"). But the servers have a huge /data partition which we use to store all important stuff.
We also lack gradle on these servers, I decided to go all manual:
I downloaded kotlin-native-linux-1.3-eap-10240.tar.gz via the release page
Then I extracted that to /data/kotlin-native
Then I copied the simple hello.kt to that system, and tried to compile:
kotlinc-native -verbose hello.kt
logging: using Kotlin home directory /data/kotlin-native-linux-1.3-eap-10240/konan
Downloading native dependencies (LLVM, sysroot etc). This is a one-time action performed only on the first run of the compiler.
Downloading dependency: https://download.jetbrains.com/kotlin/native/clang-llvm-6.0.1-linux-x86-64.tar.gz (509.0 MiB/509.0 MiB). Cannot download a dependency: java.io.IOException: Disk quota exceeded
I saw that there is an option -kotlin-home, so I tried
kotlinc-native -kotlin-home /data/kotlin-native/home/ hello.kt
but that gives the same quota/IO error in the end.
So: is there a way to force kotlinc-native the files it downloads to a specific place?
Yes, you should just set environmental variable KONAN_DATA_DIR on your machine. kotlinc-native
checks it before dependencies download (according to this code).

How to install apktool on Win 10?

I have downloaded both apktool_2.1.1.jar & apktool_2.0.0rc4.jar from https://bitbucket.org/iBotPeaches/apktool/downloads and pasted it in C://Windows. Yet when I run apktool in cmd, it returns:
C:\Users\arpit>apktool
'apktool' is not recognized as an internal or external command,
operable program or batch file.
Any help will be appreciated.
->Download Windows wrapper script from here https://raw.githubusercontent.com/iBotPeaches/Apktool/master/scripts/windows/apktool.bat
(Right click, Save Link As apktool.bat)
->Download apktool-2 https://bitbucket.org/iBotPeaches/apktool/downloads
(find newest here)
->Rename downloaded jar to apktool.jar
->Move both files (apktool.jar & apktool.bat) to your System32 directory (Usually C:\Windows\system32)
If you do not have access to C:\Windows\system32, you may place the two files anywhere then add that directory to your Environment Variables System PATH variable.
->Try running apktool with admin previlages via command prompt
Apktool is a tool for reverse engineering 3rd party, closed, binary Android apps. It can decode resources to nearly original form and rebuild them after making some modifications. You will find apktool indispensible if you want to extract resources (i.e. images from an Android application. Actually, the tool has no competitors at all!)
An online version of the apktool is available here: www.javadecompilers.com/apktool

What is TCPMon and How to install it on linux?

I want to know about the TCPMon and how to install it on linux based distribution. Also what are the uses of the tool
TCPMon is a utility that allows the user to monitor the messages passed along in TCP based conversation. It is based on a swing UI and works on almost all platforms that Java supports.It has originally being part of Axis1 and now stands as an independent project.
Download and Install on Linux:
1.Download the zip package from Apache TCPMon release
2.Go to you download directory and copy the zip file to your preferred destination
3.Open terminal and navigate to the folder where you downloaded the zip file
4.Type in the terminal "unzip tcpmon-1.0-bin.zip" and unzip it
type "cd tcpmon-1.0-bin/build" and hit enter
type "chmod 777 tcpmon.sh" and hit enter
7.finally type ./tcpmon.sh
That's it

Publishing to AIR Captive Runtime ONLY creates .tmp folder

Having a recurring issue when trying to create an AIR Captive Runtime using the latest AIR 3.5 SDK.
Publishing in Windows 7 from Flash CS6.
Most of the time AIR will only create a .tmp folder and NOT an .app folder
And the .exe in the .tmp folder sometimes works, other times gives an error message on launch saying a wrong version of air exists.
At other times the .tmp folder is totally empty.
Anyone PLEASE with any ideas or suggestions greatly appreciated!
After running into this problem again, I found that the actual solution is:
1) EDIT the adobe air application descriptor xml file for the project, make sure the following tag is uncommented and includes the extendedDesktop profile:
<supportedProfiles>desktop extendedDesktop</supportedProfiles>
2) Clean your project
3) Then export release build from flexbuilder and select captive runtime option.
The solution listed below was misleading (I had actually included the step described above and not included it in my description below ). Command Line execution was a red herring.
I solved my problem by using a command line request and following the instructions at this website.
Executing the command line request from the bin-release temp folder on my machine I modified the following to my desktop settings:
c:\path\to\air3sdk\bin\adt.bat -package -storetype pkcs12 -keystore c:\path\to\certificate.p12 -target bundle myapp.exe myapp-app.xml -C . myapp.swf

SenchaSDKTools-2.0.0-beta3-windows Command not working

I have installed SenchaSDKTools-2.0.0-beta3-windows on my windows Xp 32-bit.
following is the command I am running on command prompt.
C:\Program Files\SenchaSDKTools-2.0.0-beta3>sencha app create MyApp c:\xampp\htdocs\sencha\myapp\
Giving following error
[ERROR] the current workind directory (C:\Program
Files\SenchaSDKTools-2.0.0-beta3>) is not valid SDK directory. Please
'cd' in to a SDK directory before executing this command.
environment variable has been set following way.
Variable name : Path
Value : C:\Program Files\SenchaSDKTools-2.0.0-beta3
can anyone figure out what exactly wrong in this process ?
*****Sencha Touch setup Guide steps(in Window)******
Download Sencha Touch SDK Tool. (http://www.sencha.com/products/touch/download/ -->SDK Tools Beta for Developers). Run .exe file. It will install tool to default path. (i.e. C:\Program Files\SenchaSDKTools-2.0.0-beta3)
Download Sencha Touch SDK. (Download openSource version file licensed under GPL.).
Extract SDK you just download in step 2.
Open Command line terminal (start->Run->type cmd). Change directory path to SDK path as you just extracted in step3.
Verify that Sencha Command is working properly on your machine. So Type Sencha.
E.g. sdkPath>sencha
you will see "Sencha Command v2.0.2" message with other sencha command detail.
Create app in your web directory by typing following.
E.g. sdkpath> sencha app create firstSenchaApp "path/ to/ www"
(If you have tomcat 7 installed in your computer, give path to \apache-tomcat-7.0.30-windows-x86\apache-tomcat-7.0.30\webapps)
Note: There must not be space in directory path name. _(underscore),- (desk) are allowed.
If app is not generated in step 6. There might be an error. There are as follow:
If error message appear is "sencha' is not recognized as an internal or external command, operable program or batch file.”, follow these steps to troubleshoot:
The path to SDK Tools directory is prepended to your system's PATH environment variable.
From the terminal, run
echo $PATH or echo %PATH% .
The SDK Tools directory should be displayed in part of the output. If this is not the case, add it to your PATH manually.
The environment variable SENCHA_SDK_TOOLS_{version} is set, with the value being the absolute path to the installation directory mentioned above.
For example: If the installed version is '2.0.0-beta2', a SENCHA_SDK_TOOLS_2_0_0_BETA2 must be set.
From the terminal, run
echo $SENCHA_SDK_TOOLS_2_0_0_BETA2 or echo %SENCHA_SDK_TOOLS_2_0_0_BETA2% on Windows.
If the output is empty, set the environment variable manually.
Wrong Current Working Directory
A common mistake is not running Sencha Command within either a valid SDK directory or an application directory. If the current directory is not a SDK or application directory, "sencha" command will fallback to backwards-compatible mode. As of SDK Tools release "2.0.0-beta2", you should see a clear warning in such case:
"The current working directory (...) is not a recognized Sencha SDK or application folder. Running in backwards compatible mode." So in this case follow proper step as mentioned above.
Reference:
http://www.sencha.com/forum/showthread.php?192169-Important-SDK-Tools-Sencha-Command-Update
There is an invisible file that you need to copy, called .senchasdk. Make sure it is in the folder.
I think you're having the same problem I had; I had attempted to run 'sencha app create...' from the folder containing sencha.bat. Instead, you need to run 'sencha app create...' from the sencha-touch-2.0.1.1 folder (which contains the .senchasdk file).
See this previous SO question!
Save my days.
By the way, if you can't extract the sencha-cmd to sdk tools, try to extract on other location and copy the folder [3.0.0.250] to your sdk tools > [bin] folder.
hope this helps.