[APKMULTITOOL] Error when signing (sign apk with android market 13 & 7 zip, sign, in) - Android Q&A, Help & Troubleshooting

[APKMULTITOOL] Error when signing (sign apk with android market 13 & 7 zip, sign, in)
Hello folks, I have stumbled upon a small problem using APKMultiTool ...
When I try to sign my apk (It's a unity apk meaning I only edited 1 of the dll files.) It fails.
The error it gives me, even in log (26) is useless.
Code:
--------------------------------------------------------------------------
|26-07-2018 -- 13:55:05,73|
--------------------------------------------------------------------------
java version "10.0.2" 2018-07-17
Java(TM) SE Runtime Environment 18.3 (build 10.0.2+13)
Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10.0.2+13, mixed mode)
Press any key to continue . . .
I do have the environment path for system, directed to my JDK java path.
The APKMultiTool is opened with Administrator and it's at root(c:\APKMultiTool) <
Heres the code it gives me at the end of option 7: (zip, sign & install)
Code:
Compressing res\layout\com_facebook_placepickerfragment_list_row.xml
Compressing res\layout\com_facebook_search_bar_layout.xml
Compressing res\layout\com_facebook_tooltip_bubble.xml
Compressing res\layout\com_facebook_usersettingsfragment.xml
Everything is Ok
Signing Apk
Usage: signapk [-w] publickey.x509[.pem] privatekey.pk8 input.jar output.jar
"An Error Occurred, Please Check The Log (option 26)"
The error afterwards in the log file and when using 26, is still the same.
Now I'm going to just try to sign the unsigned apk. First the one that was just zipped.
I do this with option 13: Sign apk with android market
Code:
Please make your decision:13
*Notice this option requires you to have the Java JDK installed before this option will function*
*Notice you need to go into your Environment Variables and set the path to your JAVA_HOME*
*For example define it as C:\Program Files\Java\jdk1.6.0_43 as a system variables slot not the User Variables*
Press any key to continue . . .
Signing Apk
Only one alias can be specified
Please type jarsigner -help for usage
"An Error Occurred, Please Check The Log (option 26)"
I am unable to type jarsigner -help, in CMD it does not exist as a command, and in APKMT it closes the prompt. The log file and 26 gives me the same error text so far, meaning it was not even updated.
(Note: I open ALL prompts as Administator, also APKMT)
I am at a complete loss...
Would be really grateful for input :3 thanks a lot.
-EDIT-
Am unable to install unsigned apk on rooted bluestacks 3n device. :3

... I found out that if I used the new tool
https://forum.xda-developers.com/an...tool-apk-easy-tool-v1-02-windows-gui-t3333960
APK Easy Tool, everything became more organized and much easier to work with. I got it working and are happy to say that my first mod was succesful, yay.
Happy modding everyone
For reference, the apk I modded was Galactic Rush for Android

Related

ffmpeg: Build failed in windows with cygwin for Android

0
down vote
favorite
I have trying building ffmpeg for android using windows 7 and Cygwin. I have android-ndk-r9d.
I have download the source code from here
I have already set NDK environment variable. And updated TOOLCHAIN line to: TOOLCHAIN=echo $NDK/toolchains/arm-linux-androideabi-4.8/prebuilt/windows-x86_64 because linux folder not present.
After running ./build.sh command. I got following error:
arm-linux-androideabi-gcc is unable to create an executable file.
C compiler test failed.
If you think configure made a mistake, make sure you are using the latest
version from SVN. If the latest version fails, report the problem to the
[email protected] mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "config.log" produced by configure as this will help
solving the problem.
Help me to find out what I did wrong?

VirtualBox and Genymotion issue

I have:
1. VirtualBox 4.3.15.r95713
2. Windows 7 64bit and
3. Genymotion 2.2.2
When I try to run genymoton I get following error:
Code:
Unable to load VirtualBox engine.
---------------------------
Unable to load VirtualBox engine.<br><br>Make sure that you have installed it correctly before starting Genymotion.<br><br>For more information, refer to <a href='https://cloud.genymotion.com/page/faq/#vbox'><font color='#FFF'>https://cloud.genymotion.com/page/faq/#vbox</font></a><br><br>Genymotion logs archive has been generated in: C:/Users/Jalle/genymotion-log.zip<br><a href='https://cloud.genymotion.com/page/support/'><font color='#FFF'>For more help, contact our customer service.</font></a>
and error log shows
Code:
kol 29 09:02:36 [Genymotion] [Error] "Fail to load vboxmanage plugin from C:/Program Files/Genymobile/Genymotion/plugins/"
kol 29 09:02:36 [Genymotion] [Error] VM Engine failed to load
kol 29 09:02:36 [Genymotion] [Error] Unable to find VM Engine. Plugin loading aborted.
kol 29 09:02:36 [Genymotion] [Debug] [LogCollector] VM engine not available
also I setup VBox - NEtwork - HostOnly adapter like this:
Code:
ipv4 address: 192.168.56.1
Net mask: 255.255.255.0
DHCP
192.168.56.100
255.255.255.0
192.168.56.101
192.168.56.254
but still having same error:
So, how do i make latest VBox and Ganymotion run together ?
Genymotion gave me same error when I re-installed VirtualBox.
Turns out that the 1st time VirtualBox was installed in: C:\Program Files\Oracle VM VirtualBox and this was in registry (for genymotion VBoxPath)
and 2nd time it was installed in "C:\Program Files\Oracle\VirtualBox".
So, to fix this I had to change the path in registry at path:
HKEY_CURRENT_USER\Software\Genymobile\Genymotion\ for value "VBoxPath" to: "C:\Program Files\Oracle\VirtualBox\VBoxManage.exe"
and
HKEY_LOCAL_MACHINE\SOFTWARE\Oracle\VirtualBox for value "InstallDir" to: "C:\Program Files\Oracle\VirtualBox"
Once I set the correct path and logged off and logged back on, it started working again.
Log off/log on or reboot is required to reload the registry.
apatsy said:
Genymotion gave me same error when I re-installed VirtualBox.
Turns out that the 1st time VirtualBox was installed in: C:\Program Files\Oracle VM VirtualBox and this was in registry (for genymotion VBoxPath)
and 2nd time it was installed in "C:\Program Files\Oracle\VirtualBox".
So, to fix this I had to change the path in registry at path:
HKEY_CURRENT_USER\Software\Genymobile\Genymotion\ for value "VBoxPath" to: "C:\Program Files\Oracle\VirtualBox\\VBoxManage.exe"
and
HKEY_LOCAL_MACHINE\SOFTWARE\Oracle\VirtualBox for value "InstallDir" to: "C:\Program Files\Oracle\VirtualBox"
Once I set the correct path and logged off and logged back on, it started working again.
Log off/log on or reboot is required to reload the registry.
Click to expand...
Click to collapse
Why the double backslash in front of VBoxManage.exe?
eazyigz said:
Why the double backslash in front of VBoxManage.exe?
Click to expand...
Click to collapse
Sorry it was a typo. I fixed it. Thanks for pointing it out.

[Ruby] Installing gems on android.

Hello friends!
I am using Termux in order to run ruby.
I installed ruby successfully with "apt" command, and it functions fine.
Current ruby version:
Code:
$ ruby -v
ruby 2.3.3p222 (2016-11-21 revision 56859) [arm-linux-androideabi]
The problem is, I can't really install gems. I tried to install bettercap for the experiment, but it failed. This is what I get:
Code:
$ gem install bettercap
Fetching: colorize-0.8.1.gem (100%)
Successfully installed colorize-0.8.1
Fetching: network_interface-0.0.1.gem (100%)
Building native extensions. This could take a while...
ERROR: Error installing bettercap:
ERROR: Failed to build gem native extension.
current directory: /data/data/com.termux/files/usr/lib/ruby/gems/2.3.0/gems/network_interface-0.0.1/ext/network_interface_ext
/data/data/com.termux/files/usr/bin/ruby -r ./siteconf20161129-14856-1cclchu.rb extconf.rb
mkmf.rb can't find header files for ruby at /data/data/com.termux/files/usr/lib/ruby/include/ruby.h
extconf failed, exit code 1
Gem files will remain installed in /data/data/com.termux/files/usr/lib/ruby/gems/2.3.0/gems/network_interface-0.0.1 for inspection.
Results logged to /data/data/com.termux/files/usr/lib/ruby/gems/2.3.0/extensions/arm-linux/2.3.0/network_interface-0.0.1/gem_make.out
I found some instructions if I ran "gem help install" but I couldn't really understand what to do in order to fix that.
Can anyone help me to solve this? BTW I have a rooted device so I can use "su" and "sudo" and all that stuff...
Thanks for people who answer~
FurySh0ck said:
Code:
mkmf.rb can't find header files for ruby at /data/data/com.termux/files/usr/lib/ruby/include/ruby.h
Click to expand...
Click to collapse
You can install ruby.h with:
Code:
apt install ruby-dev
.
fornwall said:
You can install ruby.h with: .
Click to expand...
Click to collapse
I installed ruby-dev but it still won't work. It tells me it saved a log file which contains the explanation to the failure. I'll post the whole code, but please pay attention to the last part of it:
Code:
apt install bettercap
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package bettercap
$ gem install bettercap
Building native extensions. This could take a while...
ERROR: Error installing bettercap:
ERROR: Failed to build gem native extension.
current directory: /data/data/com.termux/files/usr/lib/ruby/gems/2.3.0/gems/network_interface-0.0.1/ext/network_interface_ext
/data/data/com.termux/files/usr/bin/ruby -r ./siteconf20161206-31345-1xerjr9.rb extconf.rb
[*] Running checks for netifaces code...
[*] Warning : this platform as not been tested
checking for getifaddrs()... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/data/data/com.termux/files/usr/bin/$(RUBY_BASE_NAME)
/data/data/com.termux/files/usr/lib/ruby/2.3.0/mkmf.rb:456:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /data/data/com.termux/files/usr/lib/ruby/2.3.0/mkmf.rb:541:in `try_link0'
from /data/data/com.termux/files/usr/lib/ruby/2.3.0/mkmf.rb:556:in `try_link'
from /data/data/com.termux/files/usr/lib/ruby/2.3.0/mkmf.rb:765:in `try_func'
from /data/data/com.termux/files/usr/lib/ruby/2.3.0/mkmf.rb:1051:in `block in have_func'
from /data/data/com.termux/files/usr/lib/ruby/2.3.0/mkmf.rb:942:in `block in checking_for'
from /data/data/com.termux/files/usr/lib/ruby/2.3.0/mkmf.rb:350:in `block (2 levels) in postpone'
from /data/data/com.termux/files/usr/lib/ruby/2.3.0/mkmf.rb:320:in `open'
from /data/data/com.termux/files/usr/lib/ruby/2.3.0/mkmf.rb:350:in `block in postpone'
from /data/data/com.termux/files/usr/lib/ruby/2.3.0/mkmf.rb:320:in `open'
from /data/data/com.termux/files/usr/lib/ruby/2.3.0/mkmf.rb:346:in `postpone'
from /data/data/com.termux/files/usr/lib/ruby/2.3.0/mkmf.rb:941:in `checking_for'
from /data/data/com.termux/files/usr/lib/ruby/2.3.0/mkmf.rb:1050:in `have_func'
from extconf.rb:43:in `<main>'
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/data/data/com.termux/files/usr/lib/ruby/gems/2.3.0/extensions/arm-linux/2.3.0/network_interface-0.0.1/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /data/data/com.termux/files/usr/lib/ruby/gems/2.3.0/gems/network_interface-0.0.1 for inspection.
Results logged to /data/data/com.termux/files/usr/lib/ruby/gems/2.3.0/extensions/arm-linux/2.3.0/network_interface-0.0.1/gem_make.out
Any solutions in mind?
BTW Thanks for your time, I appreciate anyone who tries to help.

[HOWTO] Sign and sideload Tizen applications to the Gear Fit2 (from Windows)

Intro
This howto will explain how to sideload *.tpk and *.wgt applications on your Gear Fit2. It'll also cover how to re-sign the application with your own certificates. This can be required if the application does not include a signature that's valid for your particular Gear Fit2. For example, this would be the case for applications that haven't been accepted to the Galaxy Apps store.
Warning
Unless we get people to develop and share their applications for the Gear Fit2, essentially all applications will have been developed for a different device. This means you'll run into varying degrees of incompatibility. Even if the application installs, there's no guarantee it will run. And even if it does run, it may be a terrible experience. And please show some caution regarding what you attempt to install, I don't take responsibility if you break anything following the guide.
Getting your own author and distributor certificates for your Gear Fit2
In order to sign applications, you need an author and distributor certificate for our Gear Fit2 device. For applications on the Galaxy Apps store, Samsung would be the one who signs applications with a distributor certificate. Since you will be sideloading applications, there's no guarantee they contain a valid signature from Samsung. You there need your own distributor certificate. This certificate will only be valid for signing applications for your particular Gear Fit2, which is why I can't make one for you. However you'll only have to do this once and can uninstall Tizen Studio after you're done. Unless you want to develop applications for the Gear Fit2, of course.
Things to download
Java SE Development Kit 8
Tizen Studio 1.2 with IDE installer
Tizen Studio setup
To install, simply accept the software licence agreement and install both the Tizen SDK and data in their default locations.
After installation, Tizen Studio Package Manager should automatically launch. If not, launch Tizen Studio and choose Tools->Package Manager. In the Package Manager you choose the Extension SDK tab and install Samsung Certificate Extension. When it has been installed, close the window and launch Tizen Studio. Press OK for default workspace location.
Connect Gear Fit2 to Tizen Studio
On your Gear Fit2: Got to Settings->Gear info and turn on Debugging. Then go to Settings->Connections. Here you make sure Wi-Fi is turned on and logged on to the same Wi-Fi network as your Windows computer and that Bluetooth is turned off. The Gear Fit2 tend to automatically log off Wi-Fi networks if its connected through Bluetooth. While you can have both on if you're quick, simply turning off Bluetooth leads to much less frustration. You may have to restart your Gear Fit2 at this point to get everything working.
In Tizen Studio, you should see a drop-down list in the tool bar saying No Target. Open the drop-down list and choose Launch remote device manager. Here you press Scan and wait for your device's IP address to appear. You'll only see Tizen devices, so unless you have multiple, there will only be one result. If it doesn't appear, repeat the process above. On the toggle under Connect, turn it from off to on. On your Gear Fit2 it should say RSA key fingerprint: .... You accept on the device and should now be connected. Close down the Remote Device Manager window. The drop-down list should now say SM-R360 ....
Now you choose the menu item Tools->Certificate Manager. Add a new certificate profile by pressing the "+" sign up to the right and then select SAMSUNG as the type for your certificate profile. Go through the 4 tabs as follows
Device Type
Choose Mobile/Wearable and press next.
Certificate Profile
Choose Create a new certificate profile and type any name you want. Press next.
Author Certificate
Choose Create a new author certificate and press next.
Type in an author name and password. Make sure you remember the password as it will be needed for signing applications later on.
You'll now be asked to sign in to your Samsung account. If you don't have one, choose Create new account and follow instructions.
After you've signed in you should get a Congratulations! notice. Take note of the location of the author certificate and press next
Distributor Certificate
Choose Create new distributor certificate and press next.
For Privilege choose Partner. This defines how much of the Tizen API the applications you'll be signing are allowed to access. The three levels are Public, Partner and Platform with Platform being the highest level of access. Unfortunately that's not available to us, so we choose Partner.
IMPORTANT: Leave the password as it is.
Under the section Add individual DUIDs you should find the first entry contains something that starts with 2.0#.... That's your Gear Fit2's DUID. If you don't see it, press cancel (sorry) and go back to the Connect Gear Fit2 to Tizen Studio section above. If you do see, it press next. Make a note of the location of the distributor certificate. This should be the same as the author certificate from above. Then press Finish and you're done.
Signing and installing applications on your Gear Fit2
Things to download (See attachments to the post)
Fit2Installer
PacMan
We'll use PacMan as an example. It's a modified version of the PacMan application found in this xda post. Some of the other applications in that link work on the Gear Fit2, some don't.
Using Fit2Installer
Download and extract the Fit2Installer. The folder contains the following.
sdb.exe: Smart Development Bridge for Tizen devices. This allows us to connect to the device and install applications. See tizen.developer.org's sdb section for more information on what you can do with it.
7zipcli: The open source a command-line archiver from 7-zip. Used to package applications.
tizen: A very stripped down version of Tizen Studio that only contains the required files for signing and packaging applications.
cert: Empty folder where you're supposed to place your own certificates.
sign_me: Empty folder where you place applications you want to be signed.
install_me: Empty folder where you place applications you want to be installed on your device.
sign.bat: Batch script that will sign the applications put in sign_me
sign.bat: Batch script that will connect your Gear Fit2 to your computer, allowing you to install applications.
install.bat: Batch script that will install the applications put in install_me
connect.bat: Batch script that will connect to your Gear Fit2.
disconnect.bat: Batch script that will disconnect from your Gear Fit2.
Setting up your certificates
Go to the location of the certificates you generated with the Certificate Manager. The standard location is in your user folder under ~\SamsungCertificate\<name of cert profile>. The folder should contain 9 files. Copy all those directly into the .\Fit2Installer\cert\ folder. Eg, distributor.p12 should be placed as .\Fit2Installer\cert\distributor.p12.
Signing applications
There are two ways of using the sign.bat script.
Place a *.tpk or *.wgt file directly in the sign_me folder. Run the sign.bat script and type in the password you chose for your certificate earlier. If successful, this will produce a *.tpk or *.wgt file in the install_me folder.
If you don't have the package file, but rather just a folder containing the files for the application you'll have to place that folder in sign_me. For *.tpk files, this means the path will be .\Fit2Installer\sign_me\<application_folder>\tizen-manifest.xml. For *wgt files it will be .\Fit2Installer\sign_me\<application_folder>\config.xml. Now, run the sign.bat script and type in your certificate password.
As an example, I've attached PacMan. PacMan is a web-app that was packaged for the Gear S2. In order to get it to fit the Gear Fit2 screen, I had to extract the PacMan.wgt file and make a few changes to the code. Changes to the files invalidates the signature, so I had to resign it using my own certificates. If you've everything set up correctly, this should be fairly simple for you to do too.
Extract the PacMan.zip archive and place the content in the folder .\Fit2Installer\sign_me\PacMan\ and run the sign.bat script. Look in the install_me folder to check there's a *.wgt file for PacMan.
Installing applications
As in the earlier section Connect Gear Fit2 to Tizen Studio, make sure you're on Wi-Fi, bluetooth is off and debugging in turned on. Also, make sure you only have one Tizen device connected to your computer (this includes Tizen emulators).
Run the connect.bat script and type in the IP address of your Gear Fit2. If you do not know the IP address, you can find it on the device under Settings->Connections->Wi-Fi->Wi-Fi networks-><wifi_name> and at the bottom of the list. Make sure you allow sdb.exe through your firewall.
Important responses are:
error: failed to connect to remote target <ip address>
Make sure you've set up your device correctly. Try turning Wi-Fi off and on. Or even a reboot of the device.
device unauthorized. Please approve on your device.
This may mean you have to accept the RSA key fingerprint on your Gear Fit2. However, there appears to be a bug in the sdb that causes this to happen regardless. Try to run the script twice and see if you get the message below:
<ip address>:26101 is already connected
Now you know for sure your device is connected.
After you've connected, you can safely turn Bluetooth back on. Remember to run disconnect.bat when you're done installing applications. Your Gear Fit2 will otherwise stay connected and drain a lot of battery.
Similarly to using the sign.bat script, there are two ways of using the install.bat script. Both of them require the application to already have a valid signature.
Place a *.tpk or *.wgt file directly in the install_me folder. Run the install.bat script.
If you don't have the package file, but rather just a folder containing the application you'll have to place that folder in install_me. For *.tpk files, this means the path will be .\Fit2Installer\install_me\<application_folder>\tizen-manifest.xml. For *wgt files it will be .\Fit2Installer\install_me\<application_folder>\config.xml.. Run the install.bat script.
Since PacMan should already be signed and placed correctly in the install_me folder, you can now run the install.bat script to install it on your Gear Fit2.
LeJay said:
Intro
This howto will explain how to sideload *.tpk and *.wgt applications on your Gear Fit2. It'll also cover how to re-sign the application with your own certificates. This can be required if the application does not include a signature that's valid for your particular Gear Fit2. For example, this would be the case for applications that haven't been accepted to the Galaxy Apps store.
Warning
Unless we get people to develop and share their applications for the Gear Fit2, essentially all applications will have been developed for a different device. This means you'll run into varying degrees of incompatibility. Even if the application installs, there's no guarantee it will run. And even if it does run, it may be a terrible experience. And please show some caution regarding what you attempt to install, I don't take responsibility if you break anything following the guide.
Getting your own author and distributor certificates for your Gear Fit2
In order to sign applications, you need an author and distributor certificate for our Gear Fit2 device. For applications on the Galaxy Apps store, Samsung would be the one who signs applications with a distributor certificate. Since you will be sideloading applications, there's no guarantee they contain a valid signature from Samsung. You there need your own distributor certificate. This certificate will only be valid for signing applications for your particular Gear Fit2, which is why I can't make one for you. However you'll only have to do this once and can uninstall Tizen Studio after you're done. Unless you want to develop applications for the Gear Fit2, of course.
Things to download
Java SE Development Kit 8
Tizen Studio 1.2 with IDE installer
Tizen Studio setup
To install, simply accept the software licence agreement and install both the Tizen SDK and data in their default locations.
After installation, Tizen Studio Package Manager should automatically launch. If not, launch Tizen Studio and choose Tools->Package Manager. In the Package Manager you choose the Extension SDK tab and install Samsung Certificate Extension. When it has been installed, close the window and launch Tizen Studio. Press OK for default workspace location.
Connect Gear Fit2 to Tizen Studio
On your Gear Fit2: Got to Settings->Gear info and turn on Debugging. Then go to Settings->Connections. Here you make sure Wi-Fi is turned on and logged on to the same Wi-Fi network as your Windows computer and that Bluetooth is turned off. The Gear Fit2 tend to automatically log off Wi-Fi networks if its connected through Bluetooth. While you can have both on if you're quick, simply turning off Bluetooth leads to much less frustration. You may have to restart your Gear Fit2 at this point to get everything working.
In Tizen Studio, you should see a drop-down list in the tool bar saying No Target. Open the drop-down list and choose Launch remote device manager. Here you press Scan and wait for your device's IP address to appear. You'll only see Tizen devices, so unless you have multiple, there will only be one result. If it doesn't appear, repeat the process above. On the toggle under Connect, turn it from off to on. On your Gear Fit2 it should say RSA key fingerprint: .... You accept on the device and should now be connected. Close down the Remote Device Manager window. The drop-down list should now say SM-R360 ....
Now you choose the menu item Tools->Certificate Manager. Add a new certificate profile by pressing the "+" sign up to the right and then select SAMSUNG as the type for your certificate profile. Go through the 4 tabs as follows
Device Type
Choose Mobile/Wearable and press next.
Certificate Profile
Choose Create a new certificate profile and type any name you want. Press next.
Author Certificate
Choose Create a new author certificate and press next.
Type in an author name and password. Make sure you remember the password as it will be needed for signing applications later on.
You'll now be asked to sign in to your Samsung account. If you don't have one, choose Create new account and follow instructions.
After you've signed in you should get a Congratulations! notice. Take note of the location of the author certificate and press next
Distributor Certificate
Choose Create new distributor certificate and press next.
For Privilege choose Partner. This defines how much of the Tizen API the applications you'll be signing are allowed to access. The three levels are Public, Partner and Platform with Platform being the highest level of access. Unfortunately that's not available to us, so we choose Partner.
IMPORTANT: Leave the password as it is.
Under the section Add individual DUIDs you should find the first entry contains something that starts with 2.0#.... That's your Gear Fit2's DUID. If you don't see it, press cancel (sorry) and go back to the Connect Gear Fit2 to Tizen Studio section above. If you do see, it press next. Make a note of the location of the distributor certificate. This should be the same as the author certificate from above. Then press Finish and you're done.
Signing and installing applications on your Gear Fit2
Things to download (See attachments to the post)
Fit2Installer
PacMan
We'll use PacMan as an example. It's a modified version of the PacMan application found in this xda post. Some of the other applications in that link work on the Gear Fit2, some don't.
Using Fit2Installer
Download and extract the Fit2Installer. The folder contains the following.
sdb.exe: Smart Development Bridge for Tizen devices. This allows us to connect to the device and install applications. See tizen.developer.org's sdb section for more information on what you can do with it.
7zipcli: The open source a command-line archiver from 7-zip. Used to package applications.
tizen: A very stripped down version of Tizen Studio that only contains the required files for signing and packaging applications.
cert: Empty folder where you're supposed to place your own certificates.
sign_me: Empty folder where you place applications you want to be signed.
install_me: Empty folder where you place applications you want to be installed on your device.
sign.bat: Batch script that will sign the applications put in sign_me
sign.bat: Batch script that will connect your Gear Fit2 to your computer, allowing you to install applications.
install.bat: Batch script that will install the applications put in install_me
connect.bat: Batch script that will connect to your Gear Fit2.
disconnect.bat: Batch script that will disconnect from your Gear Fit2.
Setting up your certificates
Go to the location of the certificates you generated with the Certificate Manager. The standard location is in your user folder under ~\SamsungCertificate\<name of cert profile>. The folder should contain 9 files. Copy all those directly into the .\Fit2Installer\cert\ folder. Eg, distributor.p12 should be placed as .\Fit2Installer\cert\distributor.p12.
Signing applications
There are two ways of using the sign.bat script.
Place a *.tpk or *.wgt file directly in the sign_me folder. Run the sign.bat script and type in the password you chose for your certificate earlier. If successful, this will produce a *.tpk or *.wgt file in the install_me folder.
If you don't have the package file, but rather just a folder containing the files for the application you'll have to place that folder in sign_me. For *.tpk files, this means the path will be .\Fit2Installer\sign_me\<application_folder>\tizen-manifest.xml. For *wgt files it will be .\Fit2Installer\sign_me\<application_folder>\config.xml. Now, run the sign.bat script and type in your certificate password.
As an example, I've attached PacMan. PacMan is a web-app that was packaged for the Gear S2. In order to get it to fit the Gear Fit2 screen, I had to extract the PacMan.wgt file and make a few changes to the code. Changes to the files invalidates the signature, so I had to resign it using my own certificates. If you've everything set up correctly, this should be fairly simple for you to do too.
Extract the PacMan.zip archive and place the content in the folder .\Fit2Installer\sign_me\PacMan\ and run the sign.bat script. Look in the install_me folder to check there's a *.wgt file for PacMan.
Installing applications
As in the earlier section Connect Gear Fit2 to Tizen Studio, make sure you're on Wi-Fi, bluetooth is off and debugging in turned on. Also, make sure you only have one Tizen device connected to your computer (this includes Tizen emulators).
Run the connect.bat script and type in the IP address of your Gear Fit2. If you do not know the IP address, you can find it on the device under Settings->Connections->Wi-Fi->Wi-Fi networks-><wifi_name> and at the bottom of the list. Make sure you allow sdb.exe through your firewall.
Important responses are:
error: failed to connect to remote target <ip address>
Make sure you've set up your device correctly. Try turning Wi-Fi off and on. Or even a reboot of the device.
device unauthorized. Please approve on your device.
This may mean you have to accept the RSA key fingerprint on your Gear Fit2. However, there appears to be a bug in the sdb that causes this to happen regardless. Try to run the script twice and see if you get the message below:
<ip address>:26101 is already connected
Now you know for sure your device is connected.
After you've connected, you can safely turn Bluetooth back on. Remember to run disconnect.bat when you're done installing applications. Your Gear Fit2 will otherwise stay connected and drain a lot of battery.
Similarly to using the sign.bat script, there are two ways of using the install.bat script. Both of them require the application to already have a valid signature.
Place a *.tpk or *.wgt file directly in the install_me folder. Run the install.bat script.
If you don't have the package file, but rather just a folder containing the application you'll have to place that folder in install_me. For *.tpk files, this means the path will be .\Fit2Installer\install_me\<application_folder>\tizen-manifest.xml. For *wgt files it will be .\Fit2Installer\install_me\<application_folder>\config.xml.. Run the install.bat script.
Since PacMan should already be signed and placed correctly in the install_me folder, you can now run the install.bat script to install it on your Gear Fit2.
Click to expand...
Click to collapse
It may work on gear s? Tizen is linux kernel isn't it? I starting my little steps on code thanks for your explanetion...
Sent from my SM-G955F using Tapatalk
Few months tooo late...
Somebody tested this solution successfully?
I wish to insert the Certs for Public, Partner and Platform...
https://forum.xda-developers.com/showpost.php?p=76472787&postcount=509
:angel:
I am using since years my SM-Z130H, RD-PQ and now SM-Z300H for signing easily...
But as Windows Fan Boy maybe Windows solution would be nice. :angel:
I will later add info where I have problems... maybe only path wrong...
Best Regards
Code:
D:\Fit2Installer>sign.bat
Enter certificate password: test
Setting configuration is succeeded....
No exist the default path of security profiles.
[COLOR="Red"][B]Specified file not found: ..\..\..\..\..\cert\author.p12[/B][/COLOR]
7-Zip (A) 9.20 Copyright (c) 1999-2010 Igor Pavlov 2010-11-18
Scanning
Creating archive ..\PacMan_zip.zip
Compressing audio\die.mp3
Compressing audio\die.ogg
Compressing audio\eatghost.mp3
Compressing audio\eatghost.ogg
Compressing audio\eating.mp3
Compressing audio\eating.ogg
Compressing audio\eating.short.mp3
Compressing audio\eating.short.ogg
Compressing audio\eatpill.mp3
Compressing audio\eatpill.ogg
Compressing audio\extra lives.mp3
Compressing audio\extra lives.ogg
Compressing audio\intermission.mp3
Compressing audio\intermission.ogg
Compressing audio\opening_song.mp3
Compressing audio\opening_song.ogg
Compressing audio\siren.mp3
Compressing audio\siren.ogg
Compressing audio\vcs_90.mp3
Compressing audio\vcs_90.ogg
Compressing BD_Cartoon_Shout-webfont.ttf
Compressing config.xml
Compressing icon.png
Compressing index.html
Compressing jquery-1.9.1.js
Compressing LICENSE
Compressing modernizr-1.5.min.js
Compressing pacman.js
Compressing screenshots\pacman1.png
Compressing screenshots\pacman2.png
Compressing screenshots\pacman3.png
Compressing screenshots\pacman4.png
Everything is Ok
1 Datei(en) verschoben.
Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/osgi/util/NLS
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.tizen.ncli.subcommands.sign.SignCLICommand.validateProfilesPath(SignCLICommand.java:120)
at org.tizen.ncli.subcommands.sign.SignCLICommand.call(SignCLICommand.java:63)
at org.tizen.ncli.subcommands.sign.SignCLICommand.call(SignCLICommand.java:48)
at org.tizen.ncli.subcommands.AbstractSubCommand.runCommand(AbstractSubCommand.java:85)
at org.tizen.ncli.ide.shell.PackageCLI.doRepackageForWgt(PackageCLI.java:470)
at org.tizen.ncli.ide.shell.PackageCLI.doPackageForWgt(PackageCLI.java:715)
at org.tizen.ncli.ide.shell.PackageCLI.execute(PackageCLI.java:1056)
at org.tizen.ncli.ide.shell.AbstractCLI.execute(AbstractCLI.java:92)
at org.tizen.ncli.ide.shell.Main.run(Main.java:144)
at org.tizen.ncli.ide.shell.Main.main(Main.java:78)
Caused by: java.lang.ClassNotFoundException: org.eclipse.osgi.util.NLS
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 22 more
Drücken Sie eine beliebige Taste . . .
Will try to set Path manually...
Maybe my fault...
Best Regards
adfree said:
Code:
D:\Fit2Installer>sign.bat
Enter certificate password: test
Setting configuration is succeeded....
No exist the default path of security profiles.
[COLOR="Red"][B]Specified file not found: ..\..\..\..\..\cert\author.p12[/B][/COLOR]
7-Zip (A) 9.20 Copyright (c) 1999-2010 Igor Pavlov 2010-11-18
Scanning
Creating archive ..\PacMan_zip.zip
Compressing audio\die.mp3
Compressing audio\die.ogg
Compressing audio\eatghost.mp3
Compressing audio\eatghost.ogg
Compressing audio\eating.mp3
Compressing audio\eating.ogg
Compressing audio\eating.short.mp3
Compressing audio\eating.short.ogg
Compressing audio\eatpill.mp3
Compressing audio\eatpill.ogg
Compressing audio\extra lives.mp3
Compressing audio\extra lives.ogg
Compressing audio\intermission.mp3
Compressing audio\intermission.ogg
Compressing audio\opening_song.mp3
Compressing audio\opening_song.ogg
Compressing audio\siren.mp3
Compressing audio\siren.ogg
Compressing audio\vcs_90.mp3
Compressing audio\vcs_90.ogg
Compressing BD_Cartoon_Shout-webfont.ttf
Compressing config.xml
Compressing icon.png
Compressing index.html
Compressing jquery-1.9.1.js
Compressing LICENSE
Compressing modernizr-1.5.min.js
Compressing pacman.js
Compressing screenshots\pacman1.png
Compressing screenshots\pacman2.png
Compressing screenshots\pacman3.png
Compressing screenshots\pacman4.png
Everything is Ok
1 Datei(en) verschoben.
Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/osgi/util/NLS
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.tizen.ncli.subcommands.sign.SignCLICommand.validateProfilesPath(SignCLICommand.java:120)
at org.tizen.ncli.subcommands.sign.SignCLICommand.call(SignCLICommand.java:63)
at org.tizen.ncli.subcommands.sign.SignCLICommand.call(SignCLICommand.java:48)
at org.tizen.ncli.subcommands.AbstractSubCommand.runCommand(AbstractSubCommand.java:85)
at org.tizen.ncli.ide.shell.PackageCLI.doRepackageForWgt(PackageCLI.java:470)
at org.tizen.ncli.ide.shell.PackageCLI.doPackageForWgt(PackageCLI.java:715)
at org.tizen.ncli.ide.shell.PackageCLI.execute(PackageCLI.java:1056)
at org.tizen.ncli.ide.shell.AbstractCLI.execute(AbstractCLI.java:92)
at org.tizen.ncli.ide.shell.Main.run(Main.java:144)
at org.tizen.ncli.ide.shell.Main.main(Main.java:78)
Caused by: java.lang.ClassNotFoundException: org.eclipse.osgi.util.NLS
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 22 more
Drücken Sie eine beliebige Taste . . .
Will try to set Path manually...
Maybe my fault...
Best Regards
Click to expand...
Click to collapse
yes, i also had to change the paths manually in the sign.bat file; and then it works - on gear s3, tizen 3.0.0.2
@stakoz
Please, can you post your changes?
Thanx in advance.
Best Regards
Hi adfree
I have placed the unzipped "Fit2Installer" folder in the main tree C:\Fit2Installer
(this is Windows 10 on a Virtual Machine on a Mac)
As per the instructions have already copy pasted the certificates made with Tizen Studio in C:\Fit2Installer\cert
Below is the contents of my "sign.bat" file relating to above path
And further below is also the output window of cmd.exe having run the "sign.bat" file for "waldo_transl.wgt" that was placed in the "sign_me" subfolder
There is something about security profile.xml path, which i also tried to address by editing the default profile path in the "tizen cli-config" file, but it always comes back as before, so left it as it was, as it still works.
Finally I also shared with all my PC users the read/write rights for the "Fit2Installer" folder just in case, as described in the instructions for the "Tizen Studio" folder too
Hope this helps
+++
contents of my modified "sign.bat" :
+++
@Echo off
set /p pass="Enter certificate password: "
call C:\Fit2Installer\tizen\tizen-studio\tools\ide\bin\tizen.bat cli-config -- .\tizen "default.profiles.path=..\..\..\..\profiles.xml"
call C:\Fit2Installer\tizen\tizen-studio\tools\ide\bin\tizen.bat security-profiles add -- .\tizen -f -n MyProfile -a C:\Fit2Installer\cert\author.p12 -p %pass% -d C:\Fit2Installer\cert\distributor.p12 -dp %pass%
for %%f in (.\sign_me\*.tpk) do (
call C:\Fit2Installer\tizen\tizen-studio\tools\ide\bin\tizen.bat package -t tpk -s MyProfile -- "%%f" -o C:\Fit2Installer\install_me\
)
for %%f in (.\sign_me\*.wgt) do (
call C:\Fit2Installer\tizen\tizen-studio\tools\ide\bin\tizen.bat package -t wgt -s MyProfile -- "%%f" -o C:\Fit2Installer\install_me\
)
for /D %%d in (.\sign_me\*) do (
IF EXIST %%d\config.xml (
cd %%d
call "C:\Fit2Installer\7zipcli\7za.exe" a "..\%%~nd_zip.zip" *
cd ..
move "%%~nd_zip.zip" "%%~nd_wgt.wgt"
cd ..
call C:\Fit2Installer\tizen\tizen-studio\tools\ide\bin\tizen.bat package -t wgt -s MyProfile -- ".\sign_me\%%~nd_wgt.wgt" -o C:\Fit2Installer\install_me\
del ".\sign_me\%%~nd_wgt.wgt"
) ELSE (
IF EXIST %%d\tizen-manifest.xml (
cd %%d
call "C:\Fit2Installer\7zipcli\7za.exe" a "..\%%~nd_zip.zip" *
cd ..
move "%%~nd_zip.zip" "%%~nd_tpk.tpk"
cd ..
call C:\Fit2Installer\tizen\tizen-studio\tools\ide\bin\tizen.bat package -t tpk -s MyProfile -- ".\sign_me\%%~nd_tpk.tpk" -o C:\Fit2Installer\install_me\
del ".\sign_me\%%~nd_tpk.tpk"
)
)
)
pause
+++
contents of the output window of cmd.exe having run above sign.bat file :
+++
Enter certificate password: password
Setting configuration is succeeded....
Loaded in 'C:\Fit2Installer\tizen\profiles.xml'.
Security profiles have a specified profile. Will be overwritten.
author path: C:\Fit2Installer\cert\author.p12
author password: *********
distributor1 path: C:\Fit2Installer\cert\distributor.p12
distributor1 password: *********
Wrote to 'C:\Fit2Installer\tizen\profiles.xml'.
Succeed to add 'MyProfile' profile.
If want to sign by this, add the file of security profiles in CLI configuration
like 'tizen cli-config "profiles.path=C:\Fit2Installer\tizen\profiles.xml"'.
Author certficate: C:\Fit2Installer\cert\author.p12
Distributor1 certificate : C:\Fit2Installer\cert\distributor.p12
Package( C:\Fit2Installer\install_me\waldo_transl.wgt ) is created successfully.
Press any key to continue . . .
+++
The query I had is resolved after going through the complete thread, so this post is irrelevant. However, I might as well use this opportunity to thank those who have contributed to this as the guide works fine.
Hey, i would like to take this opportunity and thank you for this really useful guide. Everything works fine, but I would like to ask you about the changes you did to the .wgt in order to get the screen shape right, because most of the apps are either cut in half or really small.
I cant generate distributors certificate!
davesidd said:
I cant generate distributors certificate!
Click to expand...
Click to collapse
You need to download the wearable extension in the package manager.
Namenlos55555 said:
You need to download the wearable extension in the package manager.
Click to expand...
Click to collapse
the distribution certificate gets generated automatically and it is password protected, so cant use it
working great!
Games
Are there any more games for the gear fit 2 i can download. Any help would be appreciated
Unable to open Certificate Manager
Never mind got it fixed.
Browser possible?
Have you found a way to make a browser possible using this method?
Code:
Enter certificate password: topsecret
Setting configuration is succeeded....
Loaded in 'C:\Fit2Installer\tizen\profiles.xml'.
Security profiles have a specified profile. Will be overwritten.
author path: C:\Fit2Installer\tizen\tizen-studio\tools\ide\bin\..\..\..\..\..\cert\author.p12
author password: ****
distributor1 path: C:\Fit2Installer\tizen\tizen-studio\tools\ide\bin\..\..\..\..\..\cert\distributor.p12
distributor1 password: ****
Wrote to 'C:\Fit2Installer\tizen\profiles.xml'.
Succeed to add 'MyProfile' profile.
If want to sign by this, add the file of security profiles in CLI configuration
like 'tizen cli-config "profiles.path=C:\Fit2Installer\tizen\profiles.xml"'.
Author certficate: C:\Fit2Installer\tizen\tizen-studio\tools\ide\bin\..\..\..\..\..\cert\author.p12
Distributor1 certificate : C:\Fit2Installer\tizen\tizen-studio\tools\ide\bin\..\..\..\..\..\cert\distributor.p12
Package( C:\Fit2Installer\install_me\publicTEST_fake_v12.tpk ) is created successfully.
Drücken Sie eine beliebige Taste . . .
I am using this solution since few days... without Modification. :good: :good:
With Tizen 4 Firmware on SM-R760... and Certs from Tizen Studio 3.1.
Windows 7
Thank you very much. :good: :good:
Best Regards
Hello,
I cannot sign anything, I get errors in cli.log.
Could you help me fixing these?
Cli.log:
2019-02-24 10:56:51,523 [TRACE] Main.java(90) - Start running Tizen CLI Main class...
2019-02-24 10:56:51,526 [TRACE] Main.java(91) - Argument count:6
2019-02-24 10:56:51,533 [TRACE] ConfigCLI.java(52) - setConfigProperty default.profiles.path=..\..\..\..\profiles.xml
2019-02-24 10:56:51,533 [TRACE] ConfigCLI.java(78) - Execute configCLI...
2019-02-24 10:56:52,034 [TRACE] Main.java(90) - Start running Tizen CLI Main class...
2019-02-24 10:56:52,037 [TRACE] Main.java(91) - Argument count:17
2019-02-24 10:56:52,049 [TRACE] SecurityProfilesCLI.java(56) - Begin SecuriyProfilesCLI...
2019-02-24 10:56:52,741 [TRACE] SecurityProfilesCLI.java(66) - Finish SecuriyProfilesCLI...
2019-02-24 10:56:53,196 [TRACE] Main.java(90) - Start running Tizen CLI Main class...
2019-02-24 10:56:53,198 [TRACE] Main.java(91) - Argument count:11
2019-02-24 10:56:53,209 [TRACE] PackageCLI.java(981) - Execute PackageCLI...
2019-02-24 10:56:53,212 [TRACE] PackageCLI.java(983) - getRealWorkingPath: C:\Users\Hex\Desktop\S3Watchfaces\appswgt\Fit2Installer_freedials\sign_me\pilot.wgt
2019-02-24 10:56:53,213 [TRACE] PackageCLI.java(452) - Re-packaging wgt file C:\Users\Hex\Desktop\S3Watchfaces\appswgt\Fit2Installer_freedials\sign_me\pilot.wgt
2019-02-24 10:56:53,530 [ERROR] AbstractCLI.java(94) - java.util.zip.ZipException: invalid entry size (expected 61948 but got 61958 bytes)
java.lang.IllegalStateException: java.util.zip.ZipException: invalid entry size (expected 61948 but got 61958 bytes)
at org.tizen.common.core.command.policy.UncaughtExceptionHandlingPolicy.uncaughtException(UncaughtExceptionHandlingPolicy.java:84)
at org.tizen.common.core.command.Executor.execute(Executor.java:179)
at org.tizen.common.core.command.Executor.execute(Executor.java:150)
at org.tizen.ncli.ide.shell.PackageCLI.doRepackageForWgt(PackageCLI.java:463)
at org.tizen.ncli.ide.shell.PackageCLI.doPackageForWgt(PackageCLI.java:715)
at org.tizen.ncli.ide.shell.PackageCLI.execute(PackageCLI.java:1056)
at org.tizen.ncli.ide.shell.AbstractCLI.execute(AbstractCLI.java:92)
at org.tizen.ncli.ide.shell.Main.run(Main.java:144)
at org.tizen.ncli.ide.shell.Main.main(Main.java:78)
Caused by: java.util.zip.ZipException: invalid entry size (expected 61948 but got 61958 bytes)
at java.util.zip.ZipInputStream.readEnd(Unknown Source)
at java.util.zip.ZipInputStream.read(Unknown Source)
at java.io.FilterInputStream.read(Unknown Source)
at org.tizen.common.util.IOUtil.redirect(IOUtil.java:149)
at org.tizen.common.file.StandardFileHandler.write(StandardFileHandler.java:283)
at org.tizen.common.core.command.zip.ZipExtrCommand.run(ZipExtrCommand.java:116)
at org.tizen.common.core.command.Executor.execute(Executor.java:164)
... 7 more
2019-02-24 10:56:53,532 [ERROR] Main.java(152) - java.util.zip.ZipException: invalid entry size (expected 61948 but got 61958 bytes)
Click to expand...
Click to collapse
Need solution to create Distributor Cert with Platform Privilege...
Tizen Studio only shows:
Code:
Public
Partner
Maybe via Command Line?
My old trick at the moment not work anymore in Tizen 3... 4...
Because DUID required to be written into Cert...
Please help. :angel:
Best Regards
I am using Platform Cert"s" from Hash-Signer... so at the moment only usefull in Combination Firmware... for me...
https://forum.xda-developers.com/showpost.php?p=79416572&postcount=751
But I made 2 new edited Batch Files for me...
1 can handle 2 different Passwords... for athor and Distributor Cert... the second Batch contains the Passwords...
Code:
@echo off
set /p pass="Enter Author certificate password: "
set /p pass2="Enter Distributor certificate password: "
call tizen\tizen-studio\tools\ide\bin\tizen.bat cli-config -- .\tizen "default.profiles.path=..\..\..\..\profiles.xml"
call tizen\tizen-studio\tools\ide\bin\tizen.bat security-profiles add -- .\tizen -f -n MyProfile -a ..\..\..\..\..\cert\author.p12 -p %pass% -d ..\..\..\..\..\cert\distributor.p12 -dp %pass2%
for %%f in (.\sign_me\*.tpk) do (
call tizen\tizen-studio\tools\ide\bin\tizen.bat package -t tpk -s MyProfile -- "%%f" -o .\install_me\
)
for %%f in (.\sign_me\*.wgt) do (
call tizen\tizen-studio\tools\ide\bin\tizen.bat package -t wgt -s MyProfile -- "%%f" -o .\install_me\
)
for /D %%d in (.\sign_me\*) do (
IF EXIST %%d\config.xml (
cd %%d
call "..\..\7zipcli\7za.exe" a "..\%%~nd_zip.zip" *
cd ..
move "%%~nd_zip.zip" "%%~nd_wgt.wgt"
cd ..
call tizen\tizen-studio\tools\ide\bin\tizen.bat package -t wgt -s MyProfile -- ".\sign_me\%%~nd_wgt.wgt" -o .\install_me\
del ".\sign_me\%%~nd_wgt.wgt"
) ELSE (
IF EXIST %%d\tizen-manifest.xml (
cd %%d
call "..\..\7zipcli\7za.exe" a "..\%%~nd_zip.zip" *
cd ..
move "%%~nd_zip.zip" "%%~nd_tpk.tpk"
cd ..
call tizen\tizen-studio\tools\ide\bin\tizen.bat package -t tpk -s MyProfile -- ".\sign_me\%%~nd_tpk.tpk" -o .\install_me\
del ".\sign_me\%%~nd_tpk.tpk"
)
)
)
pause
and
Code:
@echo off
call tizen\tizen-studio\tools\ide\bin\tizen.bat cli-config -- .\tizen "default.profiles.path=..\..\..\..\profiles.xml"
call tizen\tizen-studio\tools\ide\bin\tizen.bat security-profiles add -- .\tizen -f -n MyProfile -a ..\..\..\..\..\cert\author.p12 -p tizenauthor -d ..\..\..\..\..\cert\distributor.p12 -dp tizenpkcs12passfordsigner
for %%f in (.\sign_me\*.tpk) do (
call tizen\tizen-studio\tools\ide\bin\tizen.bat package -t tpk -s MyProfile -- "%%f" -o .\install_me\
)
for %%f in (.\sign_me\*.wgt) do (
call tizen\tizen-studio\tools\ide\bin\tizen.bat package -t wgt -s MyProfile -- "%%f" -o .\install_me\
)
for /D %%d in (.\sign_me\*) do (
IF EXIST %%d\config.xml (
cd %%d
call "..\..\7zipcli\7za.exe" a "..\%%~nd_zip.zip" *
cd ..
move "%%~nd_zip.zip" "%%~nd_wgt.wgt"
cd ..
call tizen\tizen-studio\tools\ide\bin\tizen.bat package -t wgt -s MyProfile -- ".\sign_me\%%~nd_wgt.wgt" -o .\install_me\
del ".\sign_me\%%~nd_wgt.wgt"
) ELSE (
IF EXIST %%d\tizen-manifest.xml (
cd %%d
call "..\..\7zipcli\7za.exe" a "..\%%~nd_zip.zip" *
cd ..
move "%%~nd_zip.zip" "%%~nd_tpk.tpk"
cd ..
call tizen\tizen-studio\tools\ide\bin\tizen.bat package -t tpk -s MyProfile -- ".\sign_me\%%~nd_tpk.tpk" -o .\install_me\
del ".\sign_me\%%~nd_tpk.tpk"
)
)
)
pause
Now I still need way to create Platform Cert with f%&ing DUID for Stock Firmware...
Best Regards

What should I do if the tool package fails to run when I integrate the HUAWEI AppGallery Connect SDK to Eclipse?

Background​I had recently planned on integrating the Crash SDK to my app. However, my app was developed through Eclipse and the integration process was different from that in Android Studio.
By referring to the official materials, I downloaded the tool package and used it to generate an Eclipse project package.
However, when the build.bat file in the aar2eclipse/aar directory was executed according to the procedures in the document, an error was reported in the command line. The error information was as follows:
FAILURE: Build failed with an exception.
* What went wrong:
Task ' assembleRelease ' not found in root project ' aar '.
Problem Reoccurring​1. I first thought that the problem might be caused by my company's intranet. But when I connected to the Internet, the problem remained unsolved.
2. Then I guessed that it might have something to do with the Android development environment.
I borrowed a colleague's PC to execute the build.bat file, and it that did the trick. Therefore, I was able to conclude that the problem was caused by incorrect configurations in the Android development environment. I compared the configurations on the two PCs and found that the environment variables were different. ANDROID_HOME was missing from the environment variables on my PC.
Cause​Huawei's Eclipse tool package is unable to run properly and reports an error without the ANDROID_HOME variable.
Solution: Right-click This PC and choose Properties from the shortcut menu. In the displayed dialog box, click the Advanced System Settings tab and then click Environment Variables. In the System Variables dialog box, create a new ANDROID_HOME parameter.
Set the value to the installation path of the local Android SDK, and the problem will be resolved, as shown below.
Reference:
https://developer.huawei.com/consumer/en/doc/development/AppGallery-connect-Guides/agc-get-started#h2-1587519820720

Categories

Resources