Skip to content

Commit

Permalink
Bump up to v1.0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
wf9a5m75 committed Feb 22, 2018
1 parent 4b63c6b commit de74205
Show file tree
Hide file tree
Showing 31 changed files with 141 additions and 24 deletions.
6 changes: 6 additions & 0 deletions CHANGELOGS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
Redis on Android 1.0 release notes
====================================

================================================================================
Redis on Android 1.0.5 Released Feb/21/2018 17:47 PST
================================================================================

(fix) `redis-check-aof`, `redis-check-rdb` commands do not work

================================================================================
Redis on Android 1.0.4 Released Feb/13/2018 15:32 PST
================================================================================
Expand Down
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# RedisDB on Android (v1.0.4)
# RedisDB on Android (v1.0.5)

## Redis version

Feb/13/2018 Redis 4.0.8
Feb/21/2018 Redis 4.0.8

## Description

Expand Down Expand Up @@ -55,7 +55,7 @@ repositories {
}
dependencies {
compile 'io.wf9a5m75:redis-android:1.0.4'
compile 'io.wf9a5m75:redis-android:1.0.5'
}
```

Expand Down Expand Up @@ -113,9 +113,12 @@ You need to use redis client libraries.

https://redis.io/clients#java

## How to connect to the Redis DB from adb shell?
## redis-cli command

You need **ROOT** permission of your device.
You need to install the command by your hand.
You may need **ROOT** permission of your device.

(`redis-check-aof`, `redis-check-rdb` commands are also the same steps)

1. Download the pre-build-libs.zip file from here.

Expand Down
2 changes: 1 addition & 1 deletion redis-android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ uploadArchives {
repositories {
mavenDeployer {
repository url: "file://${repo.absolutePath}"
pom.version = "1.0.4"
pom.version = "1.0.5"
pom.groupId = "io.wf9a5m75"
pom.artifactId = "redis-android"
}
Expand Down
101 changes: 92 additions & 9 deletions redis-android/src/main/jni/redis-4.0.8/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ REDIS_ANDROID := redis-android
REDIS_DIR := redis-4.0.8

LOCAL_LDLIBS := -llog
LOCAL_CFLAGS := -O3 -D__ANDROID__
LOCAL_CFLAGS := -O3 -D__ANDROID__ -D__REDIS_ANDROID__

# Redis default settings
STD :=-std=c99 -pedantic -DREDIS_STATIC=''
Expand Down Expand Up @@ -85,6 +85,7 @@ include $(BUILD_SHARED_LIBRARY)
# redis-check-rdb
#------------------
include $(CLEAR_VARS)
LOCAL_PATH := $(ORG_LOCAL_PATH)
LOCAL_MODULE := redis-check-rdb

REDIS_ANDROID_DIR := redis-4.0.8
Expand All @@ -93,16 +94,57 @@ REDIS_DIR := redis-4.0.8
# Includes lua library
LOCAL_STATIC_LIBRARIES += lua

LOCAL_LDLIBS := -llog
LOCAL_CFLAGS := -O3 -D__ANDROID__
# Includes bthread library
LOCAL_STATIC_LIBRARIES += bthread

# Includes hiredis library
LOCAL_STATIC_LIBRARIES += hiredis

# Includes linenoise library
LOCAL_STATIC_LIBRARIES += linenoise

LOCAL_LDLIBS += -llog
LOCAL_CFLAGS += -O3 -D__ANDROID__

# Redis default settings
STD :=-std=c99 -pedantic -DREDIS_STATIC=''
WARN := -W -Wno-missing-field-initializers
LOCAL_CFLAGS += $(STD) $(WARN)

# To get ARM stack traces if Redis crashes we need a special C flag.
LOCAL_CFLAGS += -funwind-tables

LOCAL_C_INCLUDES += $(LOCAL_PATH)/../

ifeq ($(REDIS_DIR),redis-4.0.8)

LOCAL_SRC_FILES += \
$(SRC)/adlist.c $(SRC)/ae.c \
$(SRC)/anet.c $(SRC)/aof.c $(SRC)/bio.c \
$(SRC)/bitops.c $(SRC)/blocked.c $(SRC)/childinfo.c \
$(SRC)/cluster.c \
$(SRC)/config.c $(SRC)/crc16.c $(SRC)/crc64.c \
$(SRC)/db.c $(SRC)/debug.c $(SRC)/defrag.c \
$(SRC)/dict.c $(SRC)/endianconv.c $(SRC)/evict.c \
$(SRC)/expire.c $(SRC)/geo.c $(SRC)/geohash.c $(SRC)/geohash_helper.c \
$(SRC)/hyperloglog.c $(SRC)/intset.c $(SRC)/latency.c \
$(SRC)/lazyfree.c $(SRC)/lzf_c.c $(SRC)/lzf_d.c $(SRC)/memtest.c \
$(SRC)/module.c $(SRC)/multi.c $(SRC)/networking.c $(SRC)/notify.c \
$(SRC)/object.c $(SRC)/pqsort.c $(SRC)/pubsub.c \
$(SRC)/quicklist.c $(SRC)/rand.c $(SRC)/rax.c $(SRC)/rdb.c \
$(SRC)/release.c $(SRC)/replication.c $(SRC)/rio.c \
$(SRC)/scripting.c $(SRC)/sentinel.c \
$(SRC)/server.c $(SRC)/setproctitle.c $(SRC)/sha1.c \
$(SRC)/siphash.c $(SRC)/slowlog.c $(SRC)/sort.c $(SRC)/sparkline.c \
$(SRC)/syncio.c $(SRC)/t_hash.c $(SRC)/t_list.c \
$(SRC)/t_set.c $(SRC)/t_string.c $(SRC)/t_zset.c \
$(SRC)/util.c $(SRC)/wait3.c $(SRC)/ziplist.c \
$(SRC)/zipmap.c $(SRC)/zmalloc.c $(SRC)/redis-check-aof.c \
$(SRC)/redis-check-rdb.c

endif

#include $(BUILD_EXECUTABLE)
include $(BUILD_EXECUTABLE)

#------------------
# redis-check-aof
Expand All @@ -116,17 +158,58 @@ REDIS_DIR := redis-4.0.8
# Includes lua library
LOCAL_STATIC_LIBRARIES += lua

LOCAL_LDLIBS := -llog
LOCAL_CFLAGS := -O3 -D__ANDROID__
# Includes bthread library
LOCAL_STATIC_LIBRARIES += bthread

# Includes hiredis library
LOCAL_STATIC_LIBRARIES += hiredis

# Includes linenoise library
LOCAL_STATIC_LIBRARIES += linenoise

LOCAL_LDLIBS += -llog
LOCAL_CFLAGS += -O3 -D__ANDROID__

# Redis default settings
STD :=-std=c99 -pedantic -DREDIS_STATIC=''
WARN := -W -Wno-missing-field-initializers
LOCAL_CFLAGS += $(STD) $(WARN)

# To get ARM stack traces if Redis crashes we need a special C flag.
LOCAL_CFLAGS += -funwind-tables

LOCAL_C_INCLUDES += $(LOCAL_PATH)/../

ifeq ($(REDIS_DIR),redis-4.0.8)


LOCAL_SRC_FILES += \
$(SRC)/redis-check-aof.c $(SRC)/zmalloc.c $(SRC)/server.c \
$(SRC)/util.c $(SRC)/ae.c $(SRC)/sds.c $(SRC)/SHA1.c
$(SRC)/adlist.c $(SRC)/ae.c \
$(SRC)/anet.c $(SRC)/aof.c $(SRC)/bio.c \
$(SRC)/bitops.c $(SRC)/blocked.c $(SRC)/childinfo.c \
$(SRC)/cluster.c \
$(SRC)/config.c $(SRC)/crc16.c $(SRC)/crc64.c \
$(SRC)/db.c $(SRC)/debug.c $(SRC)/defrag.c \
$(SRC)/dict.c $(SRC)/endianconv.c $(SRC)/evict.c \
$(SRC)/expire.c $(SRC)/geo.c $(SRC)/geohash.c $(SRC)/geohash_helper.c \
$(SRC)/hyperloglog.c $(SRC)/intset.c $(SRC)/latency.c \
$(SRC)/lazyfree.c $(SRC)/lzf_c.c $(SRC)/lzf_d.c $(SRC)/memtest.c \
$(SRC)/module.c $(SRC)/multi.c $(SRC)/networking.c $(SRC)/notify.c \
$(SRC)/object.c $(SRC)/pqsort.c $(SRC)/pubsub.c \
$(SRC)/quicklist.c $(SRC)/rand.c $(SRC)/rax.c $(SRC)/rdb.c \
$(SRC)/release.c $(SRC)/replication.c $(SRC)/rio.c \
$(SRC)/scripting.c $(SRC)/sentinel.c \
$(SRC)/server.c $(SRC)/setproctitle.c $(SRC)/sha1.c \
$(SRC)/siphash.c $(SRC)/slowlog.c $(SRC)/sort.c $(SRC)/sparkline.c \
$(SRC)/syncio.c $(SRC)/t_hash.c $(SRC)/t_list.c \
$(SRC)/t_set.c $(SRC)/t_string.c $(SRC)/t_zset.c \
$(SRC)/util.c $(SRC)/wait3.c $(SRC)/ziplist.c \
$(SRC)/zipmap.c $(SRC)/zmalloc.c $(SRC)/redis-check-aof.c \
$(SRC)/redis-check-rdb.c

endif

#include $(BUILD_EXECUTABLE)
include $(BUILD_EXECUTABLE)

#------------------
# redis-cli
Expand Down
2 changes: 1 addition & 1 deletion redis-android/src/main/jni/redis-4.0.8/src/db.c
Original file line number Diff line number Diff line change
Expand Up @@ -837,7 +837,7 @@ void shutdownCommand(client *c) {
* Also when in Sentinel mode clear the SAVE flag and force NOSAVE. */
if (server.loading || server.sentinel_mode)
flags = (flags & ~SHUTDOWN_SAVE) | SHUTDOWN_NOSAVE;
#ifdef __ANDROID__
#ifdef __REDIS_ANDROID__
if (prepareForShutdown(flags) == C_OK) {
c->flags |= CLIENT_CLOSE_AFTER_REPLY;
addReply(c,shared.ok);
Expand Down
19 changes: 15 additions & 4 deletions redis-android/src/main/jni/redis-4.0.8/src/server.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,17 @@
#include "bio.h"
#include "latency.h"
#include "atomicvar.h"
#ifdef __ANDROID__
#ifdef __REDIS_ANDROID__
#include "../../redis-android.h"
#else
#ifdef __ANDROID__
#include <jni.h>
#include <stdio.h>
#include <string.h>
#include <malloc.h>
#include <android/log.h>
#endif

#endif

#include <time.h>
Expand Down Expand Up @@ -3702,7 +3711,7 @@ int redisIsSupervised(int mode) {
}


#ifdef __ANDROID__
#ifdef __REDIS_ANDROID__
int redis_start(JNIEnv * env, jobject this, jstring j_configs) {
int argc = 2;

Expand All @@ -3712,7 +3721,9 @@ int redis_start(JNIEnv * env, jobject this, jstring j_configs) {

char * argv[] = {"redis-server", "-\0"};
//mkdir("/sdcard/redis",777);
#else
#endif

#ifndef __REDIS_ANDROID__
int main(int argc, char **argv) {
#endif
struct timeval tv;
Expand Down Expand Up @@ -3848,7 +3859,7 @@ int main(int argc, char **argv) {
#endif
}
resetServerSaveParams();
#ifdef __ANDROID__
#ifdef __REDIS_ANDROID__
loadServerConfig(NULL, CONFIGS);
#else
loadServerConfig(configfile,options);
Expand Down
Binary file modified redis-android/src/main/libs/arm64-v8a/libredis.so
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified redis-android/src/main/libs/arm64-v8a/redis-cli
Binary file not shown.
Binary file modified redis-android/src/main/libs/armeabi-v7a/libredis.so
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified redis-android/src/main/libs/armeabi-v7a/redis-cli
Binary file not shown.
Binary file modified redis-android/src/main/libs/x86/libredis.so
Binary file not shown.
Binary file added redis-android/src/main/libs/x86/redis-check-aof
Binary file not shown.
Binary file added redis-android/src/main/libs/x86/redis-check-rdb
Binary file not shown.
Binary file modified redis-android/src/main/libs/x86/redis-cli
Binary file not shown.
Binary file modified redis-android/src/main/libs/x86_64/libredis.so
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified redis-android/src/main/libs/x86_64/redis-cli
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
c95a10f5f6aa0294924025a4c289dbad
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
9fa2f0ef3360355f3ea0396964fa9930cab066ba
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>io.wf9a5m75</groupId>
<artifactId>redis-android</artifactId>
<version>1.0.5</version>
<packaging>aar</packaging>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
b343557255e61710a661fedcc7510c0e
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bc02bd1a3c0f99ad22cf9844d94f41352600cba7
5 changes: 3 additions & 2 deletions repository/io/wf9a5m75/redis-android/maven-metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@
<groupId>io.wf9a5m75</groupId>
<artifactId>redis-android</artifactId>
<versioning>
<release>1.0.4</release>
<release>1.0.5</release>
<versions>
<version>1.0.0</version>
<version>1.0.1</version>
<version>1.0.2</version>
<version>1.0.3</version>
<version>1.0.4</version>
<version>1.0.5</version>
</versions>
<lastUpdated>20180213233554</lastUpdated>
<lastUpdated>20180222013933</lastUpdated>
</versioning>
</metadata>
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1b67ac864a66e4f889f6b3dcfbc51667
cf0dbc9759f0fa1d0262da776f8951a2
Original file line number Diff line number Diff line change
@@ -1 +1 @@
be676fcb0575a1f026028ca4fbb3cf09abe9971d
fcf31520ebeb39609ce9ccb6e4fea819be315c61

0 comments on commit de74205

Please sign in to comment.