How to calculate NVM size of a java card applet CAP file - applet

Is there any one know how to get NVM (non-volatile memory) of java card applet file?
After researched on the Internet I can't find any tool or guide for this.

You can send GET DATA APDU command with P1=FF and P2=21, please refer to ETSI 102.226
APDU Command:
try this
80 CA FF 21 10
thanks

send GET DATA command with Tag DF55 to the card manager (not to applet)

Related

Uploading code from platform IO to esp32

I'm sorry for that stupid question but I really can't find what I need.
I made a code to use a ESP Wrover 32 with PlatformIO/VScode and I need to upload the code to the ESP32 (connected to the computer using USB) but I can't find how to select the right USB port to upload the code.
The error is :
Please specify 'upload_port' for environment or use global
'--upload-port' option.
I tried to use the command lines but nothing works.
How can I upload my code ?
Thanks
To find the USB port: Hit WindowsKey-X, select Device Manager, plug in the device and observe what's listed under Ports (COM & LPT) - the one that just appeared has the port in brackets (COMn).
Then in platformio.ini in your PlatformIo initialised project folder, you specify the port as a line under the platform section (env: square brackets line): upload_port = com9 or whatever you got from Device Manager.
I hope this helps.

Raspberry Pi 3 OpenWrt

I have a trouble build OpenWrt with SD card.
I download the source, git://github.openwrt.org/openwrt.git and run "make menuconfig", set target "brcm27xx", "brcm2710", "Raspberry Pi 3 Model B".
And finish the configuration, build success.
Using "sudo dd if=openwrt....img of=/dev/sdb bs=2M", I create SD card.
When I boot Raspberry Pi 3 with creating SD card, the Kernel message with error.
run "mount"
/dev/root/ type ext4 ro(read-only) file system.
What is the problem!! Because of this I can not do anything...
Please Help me...
I have been using dd for a while now and it is both very powerful and very unforgiving, in the sense that your console will suggest the writing of the image is concluded but in actuality it has not. My images constantly failed for much the same reason as yours so now use my alternative command line, see below....
sudo dd if=openwrt....img of=/dev/sdb bs=2M
Here is my suggestion
sudo dd if=openwrt....img of=/dev/sdb bs=4096 conv=sync,notrunc status=progress; sudo sync
the last command may be unnecessary as sync is defined within dd command line. remember all of the above is one a line command not two wrap is ok I hope this helps you
This question is almost a year old and people might come across this in the future.
To run OpenWRT/LEDE on Raspberry Pi, you need to flash an image on a microSD. You may download the images through this link(Just search for the particular RPi Model): https://openwrt.org/toh/views/toh_fwdownload
Then from personal experience, I use Etcher to flash the image on the microSD. You may download it through this link: https://etcher.io/
Hope this helps someone out there. :)

OpenOCD debugging multiple devices at once

I am trying to debug multiple devices at once with openocd on eclipse. I have 2x STM32F303 discovery borards, I have set the hla_serial flag to a proper board, but still no luck.
Separate boards are doing ok, but when trying to debug it's Eclipse saying it'came to error in last sequence.
So if anyone had experience with that. Thanks
We can use hla_serial option within openocd 0.9+ ONLY. I'd recommend to download from
GNU ARM Eclipse project or compile yourself.
To obtain hla_serial, the easiest way found after reading the patch that included this option (http://openocd.zylin.com/#/c/2198/), more specific function "string_descriptor_equal", was to provide a wrong serial, so it would print the correct one.
The command below will create file log_with_correct_serial.txt. Switch board config file for the one currently being used.
openocd.exe -d3 -f board/stm32f4discovery.cfg -c "hla_serial wrong_serial" 2>log_with_correct_serial.txt
Opening log_with_correct_serial.txt you will find correct serial in line containing something like
Debug: 229 23 libusb1_common.c:67 string_descriptor_equal(): Device serial number 'xxxxxxxxxxx' doesn't match requested serial 'wrong_serial'
So create a derived config (for example stm32f4discovery-mydevice1.cfg, assuming stm32f4discovery is used) inside folder board on openocd root directory. Use something like Notepad++ to copy serial as it is hex numbers.
# This is an STM32F4 discovery board with a single STM32F407VGT6 chip.
# http://www.st.com/internet/evalboard/product/252419.jsp
# hla_serial thanks to http://wunderkis.de/stlink-serialno/index.html
source [find board/stm32f4discovery.cfg]
hla_serial V?nIpSU)?
Now to open your device you can use the command below to start debugging using ST-Link adapter.
openocd.exe -f board/stm32f4discovery-mydevice1.cfg
In each eclipse project provides a different board config for each project and you are good to go.

Launching Xendesktop ICA session programmatically

I want to programmatically launch xendesktop and see whether it is launched or not for monitoring purposes.I understand that if somehow I can get the ica file then passing that ica file to ica client can solve my problem.
I read that citrix has ICO API but I am not able to use it to launch my desktop.
Can someone pls throw some light on this?
Thanks in advance
ICO API in real-world scenarios is not enough.
You need to get your VDI address from StoreFront API https://github.com/citrix/storefront-sdk. Here you can download the whole ICA file and just launch it. I'm downloading it, modifying to run windowed and then just run ICA. Windows do the rest. The other possibility is to download ICA using StoreFront API, get Address from there and connect to the machine using this Address. It's actually IP and port for your VDI desktop.

how to read cout/debug traces on a jailbreak iphone , while testing on the device

What's the proper way to read console logs (messages generated from std::cout) while running your app on an iphone ?
Are there some commands enabling this, when you ssh on the phone ?
update #tanvir:
are you sure of the file? can't find a syslog file there.
Install syslogd from Cydia. Once you install it and some SSH client, you should be able to run:
tail -f /var/log/syslog
Use a software Log Police. This will show system log directly and its free.