Task Scheduler
keytool -list -v -keystore platform.keystore
jarsigner -verbose -keystore platform.keystore -signedjar app-debug-signed.apk app-debug.apk alias-name
./keytool-importkeypair -k ./oldplatform.keystore -p password -pk8 ../platform.pk8 -cert ../platform.x509.pem -alias alias-name
keytool -importkeystore -srckeystore platform.keystore -srcstoretype JKS -deststoretype PKCS12 -destkeystore platform.keystore.p12
keytool -v -importkeystore -srckeystore platform.keystore.p12 -srcstoretype PKCS12 -destkeystore platform.keystore.jks -deststoretype JKS
#include <X11/Xlib.h>
#include <X11/Xlocale.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
void
DrawCenteredMbString(Display* dpy, Window w, XFontSet fontset, GC gc, char* str, int num_bytes, int x, int y, int width,
int height) {
XRectangle boundingbox;
XRectangle dummy;
int originx, originy;
(void)XmbTextExtents(fontset, str, num_bytes, &dummy, &boundingbox);
originx = x + (width - boundingbox.width) / 2 - boundingbox.x;
originy = y + (height - boundingbox.height) / 2 - boundingbox.y;
XmbDrawString(dpy, w, fontset, gc, originx, originy, str, num_bytes);
}
int main(void) {
Display* d;
Window w;
GC gc;
XGCValues values;
XEvent e;
XFontStruct* fs, * fs16;
char** fonts;
int font_count;
XFontSet fontset;
char** missing_charsets;
int num_missing_charsets;
char* default_string;
char* msg = "Hello, World!";
char* msg2 = "啊,世界,啊啊啊";
int s;
if (setlocale(LC_ALL, "") == NULL) {
printf("cannot set locale \n");
exit(1);
}
if (!XSupportsLocale()) {
printf("X does not support locale %s\n", setlocale(LC_ALL, NULL));
exit(1);
}
if (XSetLocaleModifiers("") == NULL) {
printf("Warning: cannot set locale modifiers\n");
}
d = XOpenDisplay(NULL);
if (d == NULL) {
fprintf(stderr, "Cannot open display\n");
exit(1);
}
fonts = XListFonts(d, "*hanzi*", 10000, &font_count);
for (int i = 0; i < font_count; i++)
printf("%s\n", fonts[i]);
XFreeFontNames(fonts);
if ((fs16 = XLoadQueryFont(d, "hanzigb16st")) == NULL) {
printf("Cannot load font\n");
exit(1);
}
s = DefaultScreen(d);
w = XCreateSimpleWindow(d, RootWindow(d, s), 100, 100, 500, 500, 1,
777215, 111111);
printf("BlackPixel(d, s) is %d\n", (int)BlackPixel(d, s));
printf("WhitePixel(d, s) is %d\n", (int)WhitePixel(d, s));
fontset = XCreateFontSet(
d, "-*-*-*-*-*-*-16-*-*-*-*-*-*-*",
&missing_charsets, &num_missing_charsets,
&default_string);
if (num_missing_charsets > 0) {
printf("The following charsets are missing\n");
for (int i = 0; i < num_missing_charsets; i++) {
printf("%s \n", missing_charsets);
printf("The string is %s \n", default_string);
printf("of any characters from those sets\n");
}
XFreeStringList(missing_charsets);
}
XSetLineAttributes(d, gc, 5, LineSolid, CapRound, JoinRound);
XSelectInput(d, w, ExposureMask | KeyPressMask);
gc = XCreateGC(d, w, 0, &values);
XMapWindow(d, w);
int y = 50;
for (int i = 0; i < 10; i++) {
//XFillRectangle(d, w, DefaultGC(d, s), 20, 20, 10, 10);
XDrawString(d, w, DefaultGC(d, s), 10, y + i * 20, msg, strlen(msg));
//XSetFont(d, gc, fs16->fid);
//XDrawString16(d, w, gc, 100, y + i * 20, (XChar2b *) msg2, strlen(msg2) / 2);
int msg_len = strlen(msg2);
DrawCenteredMbString(
d, w, fontset, gc,
msg2,
msg_len, 50, y + i * 20, 100, 50);
XFlush(d);
sleep(1);
}
/*while(1) {
XNextEvent(d, &e);
if (e.type == KeyPress)
break;
}*/
XCloseDisplay(d);
return 0;
}
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
fsutil.exe file setCaseSensitiveInfo linux\netfilter_ipv4 enable
fsutil.exe file queryCaseCaseSensitiveInfo D:\linux-3.0.35\include\linux\netfilter
make -j8
make otapackage
./build/tools/releasetools/ota_from_target_files -i ./OTA/base.zip ./OTA/target_files.zip ./OTA/update.zip
>adb devices
List of devices attached
xxxxxxxxxx device
>adb forward tcp:10172 tcp:9999
>adb root
>adb remount
remount succeeded
>adb -s xxxxxxxxxx push term_emv_clc2 /system/tmp
>adb shell
Index: lmathlib.c
===================================================================
--- lmathlib.c (revision 4050)
+++ lmathlib.c (revision 4051)
@@ -183,10 +183,10 @@
res = l_mathop(log)(x);
else {
lua_Number base = luaL_checknumber(L, 2);
-#if !defined(LUA_USE_C89)
- if (base == l_mathop(2.0))
- res = l_mathop(log2)(x); else
-#endif
+//#if !defined(LUA_USE_C89)
+// if (base == l_mathop(2.0))
+// res = l_mathop(log2)(x); else
+//#endif
if (base == l_mathop(10.0))
res = l_mathop(log10)(x);
else
Index: luaconf.h
===================================================================
--- luaconf.h (revision 4050)
+++ luaconf.h (revision 4051)
@@ -677,7 +677,7 @@
** macro must include header 'locale.h'.)
*/
#if !defined(lua_getlocaledecpoint)
-#define lua_getlocaledecpoint() (localeconv()->decimal_point[0])
+#define lua_getlocaledecpoint() ('.')
#endif
/* }================================================================== */
#
# Android.mk
#
# Lua
#
LOCAL_PATH := $(call my-dir)/../src
include $(CLEAR_VARS)
LOCAL_MODULE := Lua
LOCAL_CPPFLAGS := -std=c++17
LOCAL_SRC_FILES := \
$(LOCAL_PATH)/lapi.c \
$(LOCAL_PATH)/lauxlib.c \
$(LOCAL_PATH)/lbaselib.c \
$(LOCAL_PATH)/lbitlib.c \
$(LOCAL_PATH)/lcode.c \
$(LOCAL_PATH)/lcorolib.c \
$(LOCAL_PATH)/lctype.c \
$(LOCAL_PATH)/ldblib.c \
$(LOCAL_PATH)/ldebug.c \
$(LOCAL_PATH)/ldo.c \
$(LOCAL_PATH)/ldump.c \
$(LOCAL_PATH)/lfunc.c \
$(LOCAL_PATH)/lgc.c \
$(LOCAL_PATH)/linit.c \
$(LOCAL_PATH)/liolib.c \
$(LOCAL_PATH)/llex.c \
$(LOCAL_PATH)/lmathlib.c \
$(LOCAL_PATH)/lmem.c \
$(LOCAL_PATH)/loadlib.c \
$(LOCAL_PATH)/lobject.c \
$(LOCAL_PATH)/lopcodes.c \
$(LOCAL_PATH)/loslib.c \
$(LOCAL_PATH)/lparser.c \
$(LOCAL_PATH)/lstate.c \
$(LOCAL_PATH)/lstring.c \
$(LOCAL_PATH)/lstrlib.c \
$(LOCAL_PATH)/ltable.c \
$(LOCAL_PATH)/ltablib.c \
$(LOCAL_PATH)/ltm.c \
$(LOCAL_PATH)/lua.c \
$(LOCAL_PATH)/luac.c \
$(LOCAL_PATH)/lundump.c \
$(LOCAL_PATH)/lutf8lib.c \
$(LOCAL_PATH)/lvm.c \
$(LOCAL_PATH)/lzio.c
include $(BUILD_STATIC_LIBRARY)