├── ToDo ├── LibreView │ ├── README.txt │ ├── patch.sh │ ├── 0001-Add-forwarding-of-Bluetooth-readings-to-other-apps.patch │ └── 0002-Disable-uplink-features.patch └── Bluetooth │ ├── README.docx │ ├── logcat_06-06-2020_00-42-17.txt │ └── changes_compared_to_patched_app_with_patch_git_adcb537e603f943875b3b6a379da8463a031e38b.patch ├── APK ├── com.freestylelibre.app.de_2019-04-22.apk.md5 └── com.freestylelibre.app.de_2020-02-15.apk.md5 ├── graphics └── res │ ├── drawable-hdpi │ ├── logo_about.png │ ├── logo_action.png │ └── fsll_logo_vertical.png │ ├── drawable-mdpi │ ├── logo_about.png │ ├── logo_action.png │ └── fsll_logo_vertical.png │ ├── drawable-xhdpi │ ├── logo_about.png │ ├── logo_action.png │ └── fsll_logo_vertical.png │ ├── drawable-xxhdpi │ ├── logo_about.png │ ├── logo_action.png │ └── fsll_logo_vertical.png │ └── drawable-xxxhdpi │ └── fsll_logo_vertical.png ├── install-apt-dependencies.sh ├── download.sh ├── sources ├── APKExtractor.smali ├── CrashReportUtil.smali ├── ForegroundService.smali └── ThirdPartyIntegration.smali ├── patch.sh └── README.md /ToDo/LibreView/README.txt: -------------------------------------------------------------------------------- 1 | https://github.com/smos-gh/LibreLink-xDrip-Patch 2 | -------------------------------------------------------------------------------- /ToDo/Bluetooth/README.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TinoKossmann/LibreLink-xDrip-Patch/HEAD/ToDo/Bluetooth/README.docx -------------------------------------------------------------------------------- /APK/com.freestylelibre.app.de_2019-04-22.apk.md5: -------------------------------------------------------------------------------- 1 | 420735605bacf0e18d2570079ebaa238 APK/com.freestylelibre.app.de_2019-04-22.apk 2 | -------------------------------------------------------------------------------- /APK/com.freestylelibre.app.de_2020-02-15.apk.md5: -------------------------------------------------------------------------------- 1 | da50eb029158d81461cdf042a2490648 APK/com.freestylelibre.app.de_2020-02-15.apk 2 | -------------------------------------------------------------------------------- /graphics/res/drawable-hdpi/logo_about.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TinoKossmann/LibreLink-xDrip-Patch/HEAD/graphics/res/drawable-hdpi/logo_about.png -------------------------------------------------------------------------------- /graphics/res/drawable-mdpi/logo_about.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TinoKossmann/LibreLink-xDrip-Patch/HEAD/graphics/res/drawable-mdpi/logo_about.png -------------------------------------------------------------------------------- /graphics/res/drawable-hdpi/logo_action.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TinoKossmann/LibreLink-xDrip-Patch/HEAD/graphics/res/drawable-hdpi/logo_action.png -------------------------------------------------------------------------------- /graphics/res/drawable-mdpi/logo_action.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TinoKossmann/LibreLink-xDrip-Patch/HEAD/graphics/res/drawable-mdpi/logo_action.png -------------------------------------------------------------------------------- /graphics/res/drawable-xhdpi/logo_about.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TinoKossmann/LibreLink-xDrip-Patch/HEAD/graphics/res/drawable-xhdpi/logo_about.png -------------------------------------------------------------------------------- /graphics/res/drawable-xhdpi/logo_action.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TinoKossmann/LibreLink-xDrip-Patch/HEAD/graphics/res/drawable-xhdpi/logo_action.png -------------------------------------------------------------------------------- /graphics/res/drawable-xxhdpi/logo_about.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TinoKossmann/LibreLink-xDrip-Patch/HEAD/graphics/res/drawable-xxhdpi/logo_about.png -------------------------------------------------------------------------------- /graphics/res/drawable-xxhdpi/logo_action.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TinoKossmann/LibreLink-xDrip-Patch/HEAD/graphics/res/drawable-xxhdpi/logo_action.png -------------------------------------------------------------------------------- /graphics/res/drawable-hdpi/fsll_logo_vertical.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TinoKossmann/LibreLink-xDrip-Patch/HEAD/graphics/res/drawable-hdpi/fsll_logo_vertical.png -------------------------------------------------------------------------------- /graphics/res/drawable-mdpi/fsll_logo_vertical.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TinoKossmann/LibreLink-xDrip-Patch/HEAD/graphics/res/drawable-mdpi/fsll_logo_vertical.png -------------------------------------------------------------------------------- /graphics/res/drawable-xhdpi/fsll_logo_vertical.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TinoKossmann/LibreLink-xDrip-Patch/HEAD/graphics/res/drawable-xhdpi/fsll_logo_vertical.png -------------------------------------------------------------------------------- /graphics/res/drawable-xxhdpi/fsll_logo_vertical.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TinoKossmann/LibreLink-xDrip-Patch/HEAD/graphics/res/drawable-xxhdpi/fsll_logo_vertical.png -------------------------------------------------------------------------------- /graphics/res/drawable-xxxhdpi/fsll_logo_vertical.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TinoKossmann/LibreLink-xDrip-Patch/HEAD/graphics/res/drawable-xxxhdpi/fsll_logo_vertical.png -------------------------------------------------------------------------------- /install-apt-dependencies.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Color codes 4 | NORMAL='\033[0;39m' 5 | GREEN='\033[1;32m' 6 | RED='\033[1;31m' 7 | WHITE='\033[1;37m' 8 | YELLOW='\033[1;33m' 9 | 10 | WORKDIR=$(pwd) 11 | FILENAME='com.freestylelibre.app.de_2019-04-22' 12 | 13 | echo -e "${WHITE}Installiere benötigte Tools ...${NORMAL}" 14 | sudo apt-get install git wget apksigner zipalign android-framework-res 15 | if [ $? = 0 ]; then 16 | echo -e "${GREEN} okay.${NORMAL}" 17 | echo 18 | else 19 | echo -e "${RED} nicht okay.${NORMAL}" 20 | echo 21 | echo -e "${YELLOW}=> Bitte prüfen Sie o.a. Fehler.${NORMAL}" 22 | exit 1 23 | fi 24 | -------------------------------------------------------------------------------- /download.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Color codes 4 | NORMAL='\033[0;39m' 5 | GREEN='\033[1;32m' 6 | RED='\033[1;31m' 7 | WHITE='\033[1;37m' 8 | YELLOW='\033[1;33m' 9 | 10 | WORKDIR=$(pwd) 11 | FILENAME_230='com.freestylelibre.app.de_2019-04-22' 12 | FILENAME_240='com.freestylelibre.app.de_2020-02-15' 13 | 14 | # wget HSTS-bugfix for debian as subsystem in Windows 15 | touch ~/.wget-hsts 16 | chmod 644 ~/.wget-hsts 17 | 18 | # disable certificate check 19 | if [ ! -e ~/.wgetrc ] ; then 20 | echo "check_certificate = off" >> ~/.wgetrc 21 | fi 22 | 23 | echo -e "${WHITE}Lade original APK Version 2.3.0 herunter ...${NORMAL}" 24 | wget -O APK/apkpure.html --keep-session-cookies --save-cookies cookies.txt -U chrome https://apkpure.com/de/freestyle-librelink-de/com.freestylelibre.app.de/download/4751-APK 25 | URL=$(grep "hier klicken" APK/apkpure.html | sed 's#^.*https://##' | sed 's/">.*//') 26 | wget -O APK/${FILENAME_230}.apk --load-cookies cookies.txt -U chrome https://${URL} 27 | if [ $? = 0 ]; then 28 | echo -e "${GREEN} okay.${NORMAL}" 29 | echo 30 | else 31 | echo -e "${RED} nicht okay.${NORMAL}" 32 | echo 33 | echo -e "${YELLOW}=> Bitte prüfen Sie o.a. Fehler.${NORMAL}" 34 | exit 1 35 | fi 36 | rm cookies.txt 37 | rm APK/apkpure.html 38 | 39 | #echo -e "${WHITE}Lade original APK Version 2.4.0 herunter ...${NORMAL}" 40 | #wget -O APK/apkpure.html --keep-session-cookies --save-cookies cookies.txt https://apkpure.com/de/freestyle-librelink-de/com.freestylelibre.app.de/download/5417-APK 41 | #URL=$(grep "hier klicken" APK/apkpure.html | sed 's#^.*https://##' | sed 's/">.*//') 42 | #wget -O APK/${FILENAME_240}.apk --load-cookies cookies.txt https://${URL} 43 | #if [ $? = 0 ]; then 44 | # echo -e "${GREEN} okay.${NORMAL}" 45 | # echo 46 | #else 47 | # echo -e "${RED} nicht okay.${NORMAL}" 48 | # echo 49 | # echo -e "${YELLOW}=> Bitte prüfen Sie o.a. Fehler.${NORMAL}" 50 | # exit 1 51 | #fi 52 | #rm cookies.txt 53 | #rm APK/apkpure.html 54 | 55 | echo -e "${WHITE}Lade 'apktool' herunter ...${NORMAL}" 56 | echo "Info: Debian liefert eine nicht ohne weiteres funktionierende 'dirty'-Version mit. Daher der externe Download." 57 | mkdir -p tools 58 | wget -q -O tools/apktool https://raw.githubusercontent.com/iBotPeaches/Apktool/master/scripts/linux/apktool 59 | chmod 755 tools/apktool 60 | wget -q -O tools/apktool.jar https://bitbucket.org/iBotPeaches/apktool/downloads/apktool_2.4.0.jar 61 | if [ $? = 0 ]; then 62 | echo -e "${GREEN} okay.${NORMAL}" 63 | echo 64 | else 65 | echo -e "${RED} nicht okay.${NORMAL}" 66 | echo 67 | echo -e "${YELLOW}=> Bitte prüfen Sie o.a. Fehler.${NORMAL}" 68 | exit 1 69 | fi 70 | -------------------------------------------------------------------------------- /sources/APKExtractor.smali: -------------------------------------------------------------------------------- 1 | .class public Lcom/librelink/app/APKExtractor; 2 | .super Ljava/lang/Object; 3 | .source "APKExtractor.java" 4 | 5 | 6 | # direct methods 7 | .method public constructor ()V 8 | .registers 1 9 | 10 | .prologue 11 | .line 7 12 | invoke-direct {p0}, Ljava/lang/Object;->()V 13 | 14 | return-void 15 | .end method 16 | 17 | .method public static extractOriginalAPK(Landroid/app/Application;)V 18 | .registers 8 19 | .param p0, "application" # Landroid/app/Application; 20 | 21 | .prologue 22 | .line 10 23 | invoke-static {p0}, Lcom/librelink/app/APKExtractor;->getOriginalAPKFile(Landroid/app/Application;)Ljava/io/File; 24 | 25 | move-result-object v2 26 | 27 | .line 11 28 | .local v2, "file":Ljava/io/File; 29 | invoke-virtual {v2}, Ljava/io/File;->exists()Z 30 | 31 | move-result v5 32 | 33 | if-nez v5, :cond_2b 34 | 35 | .line 13 36 | :try_start_a 37 | invoke-virtual {p0}, Landroid/app/Application;->getAssets()Landroid/content/res/AssetManager; 38 | 39 | move-result-object v5 40 | 41 | const-string v6, "original.apk" 42 | 43 | invoke-virtual {v5, v6}, Landroid/content/res/AssetManager;->open(Ljava/lang/String;)Ljava/io/InputStream; 44 | 45 | move-result-object v3 46 | 47 | .line 14 48 | .local v3, "inputStream":Ljava/io/InputStream; 49 | invoke-virtual {v3}, Ljava/io/InputStream;->available()I 50 | 51 | move-result v5 52 | 53 | new-array v0, v5, [B 54 | 55 | .line 15 56 | .local v0, "bytes":[B 57 | invoke-virtual {v3, v0}, Ljava/io/InputStream;->read([B)I 58 | 59 | .line 16 60 | invoke-virtual {v3}, Ljava/io/InputStream;->close()V 61 | 62 | .line 17 63 | new-instance v4, Ljava/io/FileOutputStream; 64 | 65 | invoke-direct {v4, v2}, Ljava/io/FileOutputStream;->(Ljava/io/File;)V 66 | 67 | .line 18 68 | .local v4, "outputStream":Ljava/io/OutputStream; 69 | invoke-virtual {v4, v0}, Ljava/io/OutputStream;->write([B)V 70 | 71 | .line 19 72 | invoke-virtual {v4}, Ljava/io/OutputStream;->close()V 73 | :try_end_2b 74 | .catch Ljava/io/IOException; {:try_start_a .. :try_end_2b} :catch_2c 75 | 76 | .line 24 77 | .end local v0 # "bytes":[B 78 | .end local v3 # "inputStream":Ljava/io/InputStream; 79 | .end local v4 # "outputStream":Ljava/io/OutputStream; 80 | :cond_2b 81 | :goto_2b 82 | return-void 83 | 84 | .line 20 85 | :catch_2c 86 | move-exception v1 87 | 88 | .line 21 89 | .local v1, "e":Ljava/io/IOException; 90 | invoke-virtual {v1}, Ljava/io/IOException;->printStackTrace()V 91 | 92 | goto :goto_2b 93 | .end method 94 | 95 | .method public static getOriginalAPKFile(Landroid/app/Application;)Ljava/io/File; 96 | .registers 4 97 | .param p0, "application" # Landroid/app/Application; 98 | 99 | .prologue 100 | .line 27 101 | new-instance v0, Ljava/io/File; 102 | 103 | invoke-virtual {p0}, Landroid/app/Application;->getNoBackupFilesDir()Ljava/io/File; 104 | 105 | move-result-object v1 106 | 107 | const-string v2, "original.apk" 108 | 109 | invoke-direct {v0, v1, v2}, Ljava/io/File;->(Ljava/io/File;Ljava/lang/String;)V 110 | 111 | return-object v0 112 | .end method 113 | 114 | .method public static getOriginalAPKPath(Landroid/app/Application;)Ljava/lang/String; 115 | .registers 2 116 | .param p0, "application" # Landroid/app/Application; 117 | 118 | .prologue 119 | .line 31 120 | invoke-static {p0}, Lcom/librelink/app/APKExtractor;->getOriginalAPKFile(Landroid/app/Application;)Ljava/io/File; 121 | 122 | move-result-object v0 123 | 124 | invoke-virtual {v0}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String; 125 | 126 | move-result-object v0 127 | 128 | return-object v0 129 | .end method 130 | -------------------------------------------------------------------------------- /sources/CrashReportUtil.smali: -------------------------------------------------------------------------------- 1 | .class public Lcom/librelink/app/CrashReportUtil; 2 | .super Ljava/lang/Object; 3 | .source "CrashReportUtil.java" 4 | 5 | # interfaces 6 | .implements Ljava/lang/Thread$UncaughtExceptionHandler; 7 | 8 | 9 | # direct methods 10 | .method public constructor ()V 11 | .registers 1 12 | 13 | .prologue 14 | .line 8 15 | invoke-direct {p0}, Ljava/lang/Object;->()V 16 | 17 | return-void 18 | .end method 19 | 20 | .method public static setDefaultUncaughtExceptionHandler()V 21 | .registers 1 22 | 23 | .prologue 24 | .line 11 25 | new-instance v0, Lcom/librelink/app/CrashReportUtil; 26 | 27 | invoke-direct {v0}, Lcom/librelink/app/CrashReportUtil;->()V 28 | 29 | invoke-static {v0}, Ljava/lang/Thread;->setDefaultUncaughtExceptionHandler(Ljava/lang/Thread$UncaughtExceptionHandler;)V 30 | 31 | .line 12 32 | return-void 33 | .end method 34 | 35 | 36 | # virtual methods 37 | .method public uncaughtException(Ljava/lang/Thread;Ljava/lang/Throwable;)V 38 | .registers 13 39 | .param p1, "t" # Ljava/lang/Thread; 40 | .param p2, "e" # Ljava/lang/Throwable; 41 | 42 | .prologue 43 | .line 16 44 | new-instance v5, Ljava/io/StringWriter; 45 | 46 | invoke-direct {v5}, Ljava/io/StringWriter;->()V 47 | 48 | .line 17 49 | .local v5, "writer":Ljava/io/Writer; 50 | new-instance v6, Ljava/io/PrintWriter; 51 | 52 | invoke-direct {v6, v5}, Ljava/io/PrintWriter;->(Ljava/io/Writer;)V 53 | 54 | invoke-virtual {p2, v6}, Ljava/lang/Throwable;->printStackTrace(Ljava/io/PrintWriter;)V 55 | 56 | .line 18 57 | invoke-virtual {v5}, Ljava/lang/Object;->toString()Ljava/lang/String; 58 | 59 | move-result-object v0 60 | 61 | .line 19 62 | .local v0, "crashReport":Ljava/lang/String; 63 | new-instance v3, Ljava/io/File; 64 | 65 | const-string v6, "/mnt/sdcard/libreDebug" 66 | 67 | invoke-direct {v3, v6}, Ljava/io/File;->(Ljava/lang/String;)V 68 | 69 | .line 20 70 | .local v3, "logFolder":Ljava/io/File; 71 | invoke-virtual {v3}, Ljava/io/File;->mkdirs()Z 72 | 73 | .line 22 74 | :try_start_1b 75 | new-instance v2, Ljava/io/File; 76 | 77 | new-instance v6, Ljava/lang/StringBuilder; 78 | 79 | invoke-direct {v6}, Ljava/lang/StringBuilder;->()V 80 | 81 | invoke-static {}, Ljava/lang/System;->currentTimeMillis()J 82 | 83 | move-result-wide v8 84 | 85 | invoke-virtual {v6, v8, v9}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder; 86 | 87 | move-result-object v6 88 | 89 | const-string v7, ".crashreport" 90 | 91 | invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; 92 | 93 | move-result-object v6 94 | 95 | invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; 96 | 97 | move-result-object v6 98 | 99 | invoke-direct {v2, v3, v6}, Ljava/io/File;->(Ljava/io/File;Ljava/lang/String;)V 100 | 101 | .line 23 102 | .local v2, "file":Ljava/io/File; 103 | invoke-virtual {v2}, Ljava/io/File;->createNewFile()Z 104 | 105 | .line 24 106 | new-instance v4, Ljava/io/PrintWriter; 107 | 108 | invoke-direct {v4, v2}, Ljava/io/PrintWriter;->(Ljava/io/File;)V 109 | 110 | .line 25 111 | .local v4, "printWriter":Ljava/io/PrintWriter; 112 | invoke-virtual {v4, v0}, Ljava/io/PrintWriter;->println(Ljava/lang/String;)V 113 | 114 | .line 26 115 | invoke-virtual {v4}, Ljava/io/PrintWriter;->close()V 116 | :try_end_45 117 | .catch Ljava/io/FileNotFoundException; {:try_start_1b .. :try_end_45} :catch_46 118 | .catch Ljava/io/IOException; {:try_start_1b .. :try_end_45} :catch_4b 119 | 120 | .line 33 121 | .end local v2 # "file":Ljava/io/File; 122 | .end local v4 # "printWriter":Ljava/io/PrintWriter; 123 | :goto_45 124 | return-void 125 | 126 | .line 27 127 | :catch_46 128 | move-exception v1 129 | 130 | .line 28 131 | .local v1, "ex":Ljava/io/FileNotFoundException; 132 | invoke-virtual {v1}, Ljava/io/FileNotFoundException;->printStackTrace()V 133 | 134 | goto :goto_45 135 | 136 | .line 29 137 | .end local v1 # "ex":Ljava/io/FileNotFoundException; 138 | :catch_4b 139 | move-exception v1 140 | 141 | .line 30 142 | .local v1, "ex":Ljava/io/IOException; 143 | invoke-virtual {v1}, Ljava/io/IOException;->printStackTrace()V 144 | 145 | goto :goto_45 146 | .end method 147 | -------------------------------------------------------------------------------- /sources/ForegroundService.smali: -------------------------------------------------------------------------------- 1 | .class public Lcom/librelink/app/ForegroundService; 2 | .super Landroid/app/Service; 3 | .source "ForegroundService.java" 4 | 5 | 6 | # static fields 7 | .field public static final CHANNEL_ID:Ljava/lang/String; = "FOREGROUND_SERVICE" 8 | 9 | .field public static final CHANNEL_NAME:Ljava/lang/String; = "Foreground Service Notification" 10 | 11 | .field public static final DESCRIPTION:Ljava/lang/String; = "Prevents LibreLink from being stopped, you may hide this." 12 | 13 | .field public static final IMPORTANCE:I = 0x2 14 | 15 | .field public static final NOTIFICATION_ID:I = 0x2a 16 | 17 | 18 | # direct methods 19 | .method public constructor ()V 20 | .registers 1 21 | 22 | .prologue 23 | .line 12 24 | invoke-direct {p0}, Landroid/app/Service;->()V 25 | 26 | return-void 27 | .end method 28 | 29 | .method public static createNotificationChannel(Landroid/content/Context;)V 30 | .registers 5 31 | .param p0, "context" # Landroid/content/Context; 32 | 33 | .prologue 34 | .line 57 35 | new-instance v0, Landroid/app/NotificationChannel; 36 | 37 | const-string v1, "FOREGROUND_SERVICE" 38 | 39 | const-string v2, "Foreground Service Notification" 40 | 41 | const/4 v3, 0x2 42 | 43 | invoke-direct {v0, v1, v2, v3}, Landroid/app/NotificationChannel;->(Ljava/lang/String;Ljava/lang/CharSequence;I)V 44 | 45 | .line 58 46 | .local v0, "notificationChannel":Landroid/app/NotificationChannel; 47 | const-string v1, "Prevents LibreLink from being stopped, you may hide this." 48 | 49 | invoke-virtual {v0, v1}, Landroid/app/NotificationChannel;->setDescription(Ljava/lang/String;)V 50 | 51 | .line 59 52 | const/4 v1, 0x0 53 | 54 | invoke-virtual {v0, v1}, Landroid/app/NotificationChannel;->setShowBadge(Z)V 55 | 56 | .line 60 57 | const-class v1, Landroid/app/NotificationManager; 58 | 59 | invoke-virtual {p0, v1}, Landroid/content/Context;->getSystemService(Ljava/lang/Class;)Ljava/lang/Object; 60 | 61 | move-result-object v1 62 | 63 | check-cast v1, Landroid/app/NotificationManager; 64 | 65 | invoke-virtual {v1, v0}, Landroid/app/NotificationManager;->createNotificationChannel(Landroid/app/NotificationChannel;)V 66 | 67 | .line 61 68 | return-void 69 | .end method 70 | 71 | .method public static initialize(Landroid/content/Context;)V 72 | .registers 3 73 | .param p0, "context" # Landroid/content/Context; 74 | 75 | .prologue 76 | .line 50 77 | sget v0, Landroid/os/Build$VERSION;->SDK_INT:I 78 | 79 | const/16 v1, 0x1a 80 | 81 | if-lt v0, v1, :cond_13 82 | 83 | .line 51 84 | invoke-static {p0}, Lcom/librelink/app/ForegroundService;->createNotificationChannel(Landroid/content/Context;)V 85 | 86 | .line 52 87 | new-instance v0, Landroid/content/Intent; 88 | 89 | const-class v1, Lcom/librelink/app/ForegroundService; 90 | 91 | invoke-direct {v0, p0, v1}, Landroid/content/Intent;->(Landroid/content/Context;Ljava/lang/Class;)V 92 | 93 | invoke-virtual {p0, v0}, Landroid/content/Context;->startForegroundService(Landroid/content/Intent;)Landroid/content/ComponentName; 94 | 95 | .line 54 96 | :cond_13 97 | return-void 98 | .end method 99 | 100 | 101 | # virtual methods 102 | .method public onBind(Landroid/content/Intent;)Landroid/os/IBinder; 103 | .registers 3 104 | .param p1, "intent" # Landroid/content/Intent; 105 | 106 | .prologue 107 | .line 22 108 | const/4 v0, 0x0 109 | 110 | return-object v0 111 | .end method 112 | 113 | .method public onCreate()V 114 | .registers 5 115 | 116 | .prologue 117 | const/16 v3, 0x2a 118 | 119 | .line 27 120 | invoke-super {p0}, Landroid/app/Service;->onCreate()V 121 | 122 | .line 28 123 | new-instance v1, Landroid/app/Notification$Builder; 124 | 125 | const-string v2, "FOREGROUND_SERVICE" 126 | 127 | invoke-direct {v1, p0, v2}, Landroid/app/Notification$Builder;->(Landroid/content/Context;Ljava/lang/String;)V 128 | 129 | const v2, 0x7f0800f1 130 | 131 | .line 29 132 | invoke-virtual {v1, v2}, Landroid/app/Notification$Builder;->setSmallIcon(I)Landroid/app/Notification$Builder; 133 | 134 | move-result-object v1 135 | 136 | const-string v2, "Foreground Service Notification" 137 | 138 | .line 30 139 | invoke-virtual {v1, v2}, Landroid/app/Notification$Builder;->setContentTitle(Ljava/lang/CharSequence;)Landroid/app/Notification$Builder; 140 | 141 | move-result-object v1 142 | 143 | const-string v2, "Prevents LibreLink from being stopped, you may hide this." 144 | 145 | .line 31 146 | invoke-virtual {v1, v2}, Landroid/app/Notification$Builder;->setContentText(Ljava/lang/CharSequence;)Landroid/app/Notification$Builder; 147 | 148 | move-result-object v1 149 | 150 | const/4 v2, 0x1 151 | 152 | .line 32 153 | invoke-virtual {v1, v2}, Landroid/app/Notification$Builder;->setOngoing(Z)Landroid/app/Notification$Builder; 154 | 155 | move-result-object v1 156 | 157 | .line 33 158 | invoke-virtual {v1}, Landroid/app/Notification$Builder;->build()Landroid/app/Notification; 159 | 160 | move-result-object v0 161 | 162 | .line 34 163 | .local v0, "notification":Landroid/app/Notification; 164 | const-class v1, Landroid/app/NotificationManager; 165 | 166 | invoke-virtual {p0, v1}, Lcom/librelink/app/ForegroundService;->getSystemService(Ljava/lang/Class;)Ljava/lang/Object; 167 | 168 | move-result-object v1 169 | 170 | check-cast v1, Landroid/app/NotificationManager; 171 | 172 | invoke-virtual {v1, v3, v0}, Landroid/app/NotificationManager;->notify(ILandroid/app/Notification;)V 173 | 174 | .line 35 175 | invoke-virtual {p0, v3, v0}, Lcom/librelink/app/ForegroundService;->startForeground(ILandroid/app/Notification;)V 176 | 177 | .line 36 178 | return-void 179 | .end method 180 | 181 | .method public onDestroy()V 182 | .registers 2 183 | 184 | .prologue 185 | .line 45 186 | const/4 v0, 0x1 187 | 188 | invoke-virtual {p0, v0}, Lcom/librelink/app/ForegroundService;->stopForeground(Z)V 189 | 190 | .line 46 191 | invoke-super {p0}, Landroid/app/Service;->onDestroy()V 192 | 193 | .line 47 194 | return-void 195 | .end method 196 | 197 | .method public onStartCommand(Landroid/content/Intent;II)I 198 | .registers 5 199 | .param p1, "intent" # Landroid/content/Intent; 200 | .param p2, "flags" # I 201 | .param p3, "startId" # I 202 | 203 | .prologue 204 | .line 40 205 | const/4 v0, 0x1 206 | 207 | return v0 208 | .end method 209 | -------------------------------------------------------------------------------- /patch.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Color codes 4 | NORMAL='\033[0;39m' 5 | GREEN='\033[1;32m' 6 | RED='\033[1;31m' 7 | WHITE='\033[1;37m' 8 | YELLOW='\033[1;33m' 9 | 10 | WORKDIR=$(pwd) 11 | FILENAME='com.freestylelibre.app.de_2019-04-22' 12 | 13 | echo -e "${WHITE}Prüfe benötigte Tools ...${NORMAL}" 14 | MISSINGTOOL=0 15 | echo -en "${WHITE} apksigner ... ${NORMAL}" 16 | which apksigner > /dev/null 17 | if [ $? = 0 ]; then 18 | echo -e "${GREEN}gefunden.${NORMAL}" 19 | else 20 | echo -e "${RED}nicht gefunden.${NORMAL}" 21 | MISSINGTOOL=1 22 | fi 23 | echo -en "${WHITE} apktool ... ${NORMAL}" 24 | if [ -x tools/apktool ]; then 25 | echo -e "${GREEN}gefunden.${NORMAL}" 26 | APKTOOL=$(pwd)/tools/apktool 27 | else 28 | which apktool > /dev/null 29 | if [ $? = 0 ]; then 30 | echo -e "${GREEN}gefunden.${NORMAL} Herkunft und Kompatibilität allerdings unbekannt." 31 | APKTOOL=$(which apktool) 32 | else 33 | echo -e "${RED}nicht gefunden.${NORMAL}" 34 | MISSINGTOOL=1 35 | fi 36 | fi 37 | echo -en "${WHITE} git ... ${NORMAL}" 38 | which git > /dev/null 39 | if [ $? = 0 ]; then 40 | echo -e "${GREEN}gefunden.${NORMAL}" 41 | else 42 | echo -e "${RED}nicht gefunden.${NORMAL}" 43 | MISSINGTOOL=1 44 | fi 45 | echo -en "${WHITE} keytool ... ${NORMAL}" 46 | which keytool > /dev/null 47 | if [ $? = 0 ]; then 48 | echo -e "${GREEN}gefunden.${NORMAL}" 49 | else 50 | echo -e "${RED}nicht gefunden.${NORMAL}" 51 | MISSINGTOOL=1 52 | fi 53 | echo -en "${WHITE} zipalign ... ${NORMAL}" 54 | which zipalign > /dev/null 55 | if [ $? = 0 ]; then 56 | echo -e "${GREEN}gefunden.${NORMAL}" 57 | else 58 | echo -e "${RED}nicht gefunden.${NORMAL}" 59 | MISSINGTOOL=1 60 | fi 61 | echo 62 | if [ ${MISSINGTOOL} = 1 ]; then 63 | echo -e "${YELLOW}=> Bitte installieren Sie die benötigten Tools.${NORMAL}" 64 | exit 1 65 | fi 66 | 67 | echo -e "${WHITE}Suche APK Datei '${FILENAME}.apk' ...${NORMAL}" 68 | if [ -e APK/${FILENAME}.apk ]; then 69 | echo -e "${GREEN} gefunden.${NORMAL}" 70 | echo 71 | else 72 | echo -e "${RED} nicht gefunden.${NORMAL}" 73 | echo 74 | echo -e "${YELLOW}=> Bitte laden Sie die original APK Datei von https://www.apkmonk.com/download-app/com.freestylelibre.app.de/5_com.freestylelibre.app.de_2019-04-22.apk/ herunter und legen Sie sie im Verzeichnis APK/ ab.${NORMAL}" 75 | exit 1 76 | fi 77 | 78 | echo -e "${WHITE}Prüfe MD5 Summe der APK Datei ...${NORMAL}" 79 | md5sum -c APK/${FILENAME}.apk.md5 > /dev/null 2>&1 80 | if [ $? = 0 ]; then 81 | echo -e "${GREEN} okay.${NORMAL}" 82 | echo 83 | else 84 | echo -e "${RED} nicht okay.${NORMAL}" 85 | echo 86 | echo -e "${YELLOW}=> Bitte laden Sie die korrekte, unverfälschte original APK herunter.${NORMAL}" 87 | exit 1 88 | fi 89 | 90 | echo -e "${WHITE}Enpacke original APK Datei ...${NORMAL}" 91 | ${APKTOOL} d -o /tmp/librelink APK/${FILENAME}.apk 92 | if [ $? = 0 ]; then 93 | echo -e "${GREEN} okay.${NORMAL}" 94 | echo 95 | else 96 | echo -e "${RED} nicht okay.${NORMAL}" 97 | echo 98 | echo -e "${YELLOW}=> Bitte prüfen Sie o.a. Fehler.${NORMAL}" 99 | exit 1 100 | fi 101 | 102 | echo -e "${WHITE}Patche original App ...${NORMAL}" 103 | cd /tmp/librelink/ 104 | git apply --whitespace=nowarn --verbose ${WORKDIR}/xdrip2.git.patch 105 | if [ $? = 0 ]; then 106 | echo -e "${GREEN} okay.${NORMAL}" 107 | echo 108 | else 109 | echo -e "${RED} nicht okay.${NORMAL}" 110 | echo 111 | echo -e "${YELLOW}=> Bitte prüfen Sie o.a. Fehler.${NORMAL}" 112 | exit 1 113 | fi 114 | 115 | echo -e "${WHITE}Verwende neuen Sourcecode für gepatchte App ...${NORMAL}" 116 | cp -Rv ${WORKDIR}/sources/* /tmp/librelink/smali_classes2/com/librelink/app/ 117 | if [ $? = 0 ]; then 118 | echo -e "${GREEN} okay.${NORMAL}" 119 | echo 120 | else 121 | echo -e "${RED} nicht okay.${NORMAL}" 122 | echo 123 | echo -e "${YELLOW}=> Bitte prüfen Sie o.a. Fehler.${NORMAL}" 124 | exit 1 125 | fi 126 | chmod 644 /tmp/librelink/smali_classes2/com/librelink/app/*.smali 127 | 128 | echo -e "${WHITE}Verwende neue Grafiken für gepatchte App ...${NORMAL}" 129 | cp -Rv ${WORKDIR}/graphics/* /tmp/librelink/ 130 | if [ $? = 0 ]; then 131 | echo -e "${GREEN} okay.${NORMAL}" 132 | echo 133 | else 134 | echo -e "${RED} nicht okay.${NORMAL}" 135 | echo 136 | echo -e "${YELLOW}=> Bitte prüfen Sie o.a. Fehler.${NORMAL}" 137 | exit 1 138 | fi 139 | 140 | echo -e "${WHITE}Kopiere original APK Datei in gepatchte App ...${NORMAL}" 141 | cp ${WORKDIR}/APK/${FILENAME}.apk /tmp/librelink/assets/original.apk 142 | if [ $? = 0 ]; then 143 | echo -e "${GREEN} okay.${NORMAL}" 144 | echo 145 | else 146 | echo -e "${RED} nicht okay.${NORMAL}" 147 | echo 148 | echo -e "${YELLOW}=> Bitte prüfen Sie o.a. Fehler.${NORMAL}" 149 | exit 1 150 | fi 151 | 152 | echo -e "${WHITE}Baue gepatchte App zusammen ...${NORMAL}" 153 | ${APKTOOL} b -o ${WORKDIR}/APK/librelink_unaligned.apk 154 | if [ $? = 0 ]; then 155 | echo -e "${GREEN} okay.${NORMAL}" 156 | echo 157 | else 158 | echo -e "${RED} nicht okay.${NORMAL}" 159 | echo 160 | echo -e "${YELLOW}=> Bitte prüfen Sie o.a. Fehler.${NORMAL}" 161 | exit 1 162 | fi 163 | 164 | echo -e "${WHITE}Räume /tmp/ auf ...${NORMAL}" 165 | cd ${WORKDIR} 166 | rm -rf /tmp/librelink/ 167 | echo -e "${GREEN} okay." 168 | echo 169 | 170 | echo -e "${WHITE}Optimiere Ausrichtung der gepatchten APK Datei...${NORMAL}" 171 | zipalign -f -p 4 APK/librelink_unaligned.apk APK/${FILENAME}_patched.apk 172 | if [ $? = 0 ]; then 173 | echo -e "${GREEN} okay.${NORMAL}" 174 | echo 175 | rm APK/librelink_unaligned.apk 176 | else 177 | echo -e "${RED} nicht okay.${NORMAL}" 178 | echo 179 | echo -e "${YELLOW}=> Bitte prüfen Sie o.a. Fehler.${NORMAL}" 180 | exit 1 181 | fi 182 | 183 | if [ ! -f tools/libre-keystore.p12 ]; then 184 | echo -e "${WHITE}Erstelle Keystore zum Signieren der gepatchten APK Datei ...${NORMAL}" 185 | keytool -genkey -v -keystore tools/libre-keystore.p12 -storetype PKCS12 -alias "Libre Signer" -keyalg RSA -keysize 2048 --validity 10000 --storepass geheim --keypass geheim -dname "cn=Libre Signer, c=de" 186 | if [ $? = 0 ]; then 187 | echo -e "${GREEN} okay.${NORMAL}" 188 | echo 189 | else 190 | echo -e "${RED} nicht okay.${NORMAL}" 191 | echo 192 | echo -e "${YELLOW}=> Bitte prüfen Sie o.a. Fehler.${NORMAL}" 193 | exit 1 194 | fi 195 | else 196 | echo -e "${WHITE}Verwende existierenden Keystore zum Signieren der gepatchten APK Datei ...${NORMAL}" 197 | fi 198 | 199 | echo -e "${WHITE}Signiere gepatchte APK Datei ...${NORMAL}" 200 | if [ -x /usr/lib/android-sdk/build-tools/debian/apksigner.jar ]; then 201 | java -jar /usr/lib/android-sdk/build-tools/debian/apksigner.jar sign --ks-pass pass:geheim --ks tools/libre-keystore.p12 APK/${FILENAME}_patched.apk 202 | elif [ -x /usr/share/apksigner/apksigner.jar ]; then 203 | java -jar /usr/share/apksigner/apksigner.jar sign --ks-pass pass:geheim --ks tools/libre-keystore.p12 APK/${FILENAME}_patched.apk 204 | else 205 | apksigner sign --ks-pass pass:geheim --ks tools/libre-keystore.p12 APK/${FILENAME}_patched.apk 206 | fi 207 | if [ $? = 0 ]; then 208 | echo -e "${GREEN} okay.${NORMAL}" 209 | echo 210 | # rm /tmp/libre-keystore.p12 211 | else 212 | echo -e "${RED} nicht okay.${NORMAL}" 213 | echo 214 | echo -e "${YELLOW}=> Bitte prüfen Sie o.a. Fehler.${NORMAL}" 215 | exit 1 216 | fi 217 | 218 | if [ -d /mnt/c/ ]; then 219 | echo -e "${WHITE}Windows-System erkannt ...${NORMAL}" 220 | echo -e "${WHITE}Kopiere APK ...${NORMAL}" 221 | mkdir -p /mnt/c/APK 222 | cp APK/${FILENAME}_patched.apk /mnt/c/APK/ 223 | if [ $? = 0 ]; then 224 | echo -e "${GREEN} okay.${NORMAL}" 225 | echo 226 | echo -en "${YELLOW}Fertig! Die gepatchte und signierte APK Datei finden Sie unter C:\\APK" 227 | echo -en "\\" 228 | echo -e "${FILENAME}_patched.apk${NORMAL}" 229 | else 230 | echo -e "${RED} nicht okay.${NORMAL}" 231 | echo 232 | echo -e "${YELLOW}=> Bitte prüfen Sie o.a. Fehler.${NORMAL}" 233 | exit 1 234 | fi 235 | else 236 | echo -e "${YELLOW}Fertig! Die gepatchte und signierte APK Datei finden Sie unter APK/${FILENAME}_patched.apk${NORMAL}" 237 | fi 238 | -------------------------------------------------------------------------------- /ToDo/Bluetooth/logcat_06-06-2020_00-42-17.txt: -------------------------------------------------------------------------------- 1 | <<< log_count = 68 >>> 2 | [06-06 00:38:55.710 17396:29265 D/PLPatchedSASPInfo] 3 | 9D083001382B 4 | 5 | [06-06 00:38:55.717 17396:29265 D/PLPatchedSASPSupp] 6 | true 7 | 8 | [06-06 00:38:55.717 17396:29265 D/PLPatchedSASPUID] 9 | 1204CE0000A407E0 10 | 11 | [06-06 00:38:55.719 17396:29265 D/PLPatchedSASPFAM] 12 | 3 13 | 14 | [06-06 00:38:55.719 17396:29265 D/PatchedSASSer] 15 | 3MH001LHXXX 16 | 17 | [06-06 00:38:56.042 17396:29265 D/PLPatchedSASCont] 18 | 3476FFF867695A17CDFDF49797096F5D3C3A9C74EBFCA56284F85E0E25E5C1648DF8E4B787CB12CC5EA504F46F3EAC87E7977622ADCB366D234FC634FE202C7B5A3746C8603D22E494FA46C2245C6C77BEAD9C20345C7D905E3F335967B0979B800BAD1B99CB71321B57926C2FD2D8500491C2028F5FB46E362A1EE07D508A9DC6DB556D91ECF893AE8C4717BE88E0D3AB90F4F4A074DB8215D3999491A564EC1699F2C64FBEB66C7756F590B7DBBF0C1B0551761CA7E81F272A6DE75701F2D83016AEFEA3B11B23AA0A198C7CA4F30962CEC08BDC212934E3EEDA03593880D4B86B7B50E83BAFBCBA02D274E753AD788F5CFE0EDF31ABCCC3E172EA948AEBD72C22289C95B4B9C737F74F73BA4AC81602A7E31A8236CEA02B4D69CDC1D5EE1D3C19515198997379C7DAD6BC976F02BA72947A29AF21047AA10202B6D5FF830343A389C04F421ACC2FFCF4372D2BD471D85610540BB05A80 19 | 20 | [06-06 00:38:56.044 17396:29265 D/PLPatchedSASWUT] 21 | 60 22 | 23 | [06-06 00:38:56.044 17396:29265 D/PLPatchedSASWDur] 24 | 20160 25 | 26 | [06-06 00:38:56.044 17396:29265 D/PatchedSAS] 27 | entering processActivation() 28 | 29 | [06-06 00:38:56.046 17396:29265 D/PatchedSAS] 30 | processActivation: at :cond_0 31 | 32 | [06-06 00:38:56.051 17396:29265 D/PatchedSAS] 33 | processActivation: at :cond_1 34 | 35 | [06-06 00:38:56.095 17396:29265 D/PatchedSAS] 36 | processActivation: after if-nez v5, :cond_2 37 | 38 | [06-06 00:38:56.096 17396:29265 D/PLPatchedSASSAllJ] 39 | true 40 | 41 | [06-06 00:38:56.096 17396:29265 D/PatchedSAS] 42 | processActivation: at :cond_3 43 | 44 | [06-06 00:38:56.096 17396:29265 D/PatchedSAS] 45 | processActivation: at :cond_5 46 | 47 | [06-06 00:38:56.096 17396:29265 D/PatchedSAS] 48 | processActivation: after if-eqz v3, :cond_6 49 | 50 | [06-06 00:38:56.096 17396:29265 D/PatchedSAS] 51 | processActivation: after if-eqz v3, :cond_6 52 | 53 | [06-06 00:38:56.096 17396:29265 D/PatchedSAS] 54 | processActivation: at :cond_6 55 | 56 | [06-06 00:38:56.096 17396:29265 D/PatchedSAS] 57 | processActivation: at :cond_7 58 | 59 | [06-06 00:38:56.096 17396:29265 D/PatchedSAS] 60 | lambda$provideAllowEnablingStreamingPreviouslyStartedSensorPredicate$1$SensorModule: enable Streaming Workaround active -> enable streaming also if not allowed 61 | 62 | [06-06 00:38:56.096 17396:29265 D/PLPatchedSASSAEStre] 63 | true 64 | 65 | [06-06 00:38:56.096 17396:29265 D/PatchedSAS] 66 | processActivation: after if-nez v9, :cond_8 67 | 68 | [06-06 00:38:56.096 17396:29265 D/PatchedSAS] 69 | processActivation: after if-eqz v1, :cond_8 70 | 71 | [06-06 00:38:56.097 17396:29265 D/PLPatchedSASPersID] 72 | 0 73 | 74 | [06-06 00:38:56.098 17396:29265 D/PLPatchedSASStrePL] 75 | 1E808E9D13663D93F5 76 | 77 | [06-06 00:38:56.099 17396:29265 D/PatchedSAS] 78 | processActivation: at :cond_9 79 | 80 | [06-06 00:38:56.099 17396:29265 D/PatchedSAS] 81 | processActivation: after if-nez v9, :cond_b 82 | 83 | [06-06 00:38:56.099 17396:29265 D/PatchedSAS] 84 | processActivation: after if-eqz v4, :cond_a 85 | 86 | [06-06 00:38:56.136 17396:29265 D/PLPatchedSASESP1] 87 | 1E808E9D13663D93F5 88 | 89 | [06-06 00:38:56.136 17396:29265 D/PLPatchedSASESP2] 90 | 1E808E9D13663D93F5 91 | 92 | [06-06 00:38:56.162 17396:29265 D/PLPatchedSASEStre1] 93 | true 94 | 95 | [06-06 00:38:56.286 17396:29265 D/PatchedBleManager] 96 | setActiveDevice invoked with "3MH001LHXXX" 97 | 98 | [06-06 00:38:56.301 17396:17396 D/PatchedBleManager] 99 | SCAN: starting scan. looking for: 100 | 101 | [06-06 00:38:56.301 17396:17396 D/PatchedBleManager] 102 | SCAN: serial number: 3MH001LHXXX 103 | 104 | [06-06 00:39:49.745 17396:17396 D/PatchedBleManager] 105 | onScanResult called 106 | 107 | [06-06 00:39:49.746 17396:17396 D/PatchedBleManager] 108 | SCAN: processScanResult device found 109 | 110 | [06-06 00:39:49.746 17396:17396 D/PatchedBleManager] 111 | SCAN: address [90:1A:4F:XX:XX:XX] 112 | 113 | [06-06 00:39:49.747 17396:17396 D/PatchedBleManager] 114 | SCAN: rssi [-56] 115 | 116 | [06-06 00:39:49.747 17396:17396 D/PatchedBleManager] 117 | SCAN: local name [ABBOTT3MH001LHXXX] 118 | 119 | [06-06 00:39:49.751 17396:17396 D/PatchedBleManager] 120 | SCAN: stopping scan. 121 | 122 | [06-06 00:39:49.834 17396:17396 D/PatchedBleManager] 123 | initiating a connect attempt to 90:1A:4F:XX:XX:XX 124 | 125 | [06-06 00:39:50.232 17396:17439 D/PatchedBleManager] 126 | onConnectionStateChange called with status:0, state:CONNECTED 127 | 128 | [06-06 00:39:50.775 17396:17439 D/PatchedBleManager] 129 | onServicesDiscovered invoked, status: 0 130 | 131 | [06-06 00:39:50.775 17396:17439 D/PatchedBleManager] 132 | onServicesDiscovered: i == 0 133 | 134 | [06-06 00:39:50.775 17396:17439 D/PatchedBleManager] 135 | onServicesDiscovered: service != null 136 | 137 | [06-06 00:39:50.775 17396:17439 D/PatchedBleManager] 138 | onServicesDiscovered: characteristic != null 139 | 140 | [06-06 00:39:50.784 17396:17439 D/PatchedBleManager] 141 | onServicesDiscovered: sensors != null 142 | 143 | [06-06 00:39:50.785 17396:17439 D/PatchedBleManager] 144 | onServicesDiscovered: sensor.getSerialNumber().equals(BleManager.this.mActiveDeviceSerialNumber) 145 | 146 | [06-06 00:39:50.806 17396:17439 D/PatchedSAS] 147 | getStreamingUnlockPayload: before getStreamingUnlockPayload... 148 | 149 | [06-06 00:39:50.809 17396:17439 D/PatchedSAS] 150 | getStreamingUnlockPayload: after getStreamingUnlockPayload. 151 | 152 | [06-06 00:39:50.809 17396:17439 D/PatchedBleManager] 153 | onServicesDiscovered: bArr != null) 154 | 155 | [06-06 00:39:50.809 17396:17439 D/PLPatchedBleManager] 156 | 818E9D1352BEE03F8465703C 157 | 158 | [06-06 00:39:50.809 17396:17439 D/PatchedBleManager] 159 | invoking writeCharacteristic with login passcode of 12 bytes 160 | 161 | [06-06 00:39:50.829 17396:17439 D/PatchedBleManager] 162 | onCharacteristicWrite invoked, status:0 163 | 164 | [06-06 00:39:50.834 17396:17439 D/PatchedBleManager] 165 | onCharacteristicWrite: successfully set BLE passcode 166 | 167 | [06-06 00:39:50.852 17396:17439 D/PatchedBleManager] 168 | onCharacteristicChanged invoked: 0000f002-0000-1000-8000-00805f9b34fb 169 | 170 | [06-06 00:39:50.854 17396:17439 D/PatchedBleManager] 171 | onCharacteristicChanged invoked: 0000f002-0000-1000-8000-00805f9b34fb 172 | 173 | [06-06 00:39:50.855 17396:17396 D/PatchedBleManager] 174 | BLE Streaming packet received containing:[69, 24, 74, 42, -2, 31, 102, 23, 99, -8, 10, 54, -26, 38, -31, -96, -114, -39, -30, -42, 105, -21, 36, -124, 97, 31, 31, -72, 57, 110, -117, -30, 89, -108, 97, -24, -60, 16, 62, -91, -34, -59, 108, -118, -104, 118] 175 | 176 | [06-06 00:39:50.973 17396:17396 D/PatchedBleManager] 177 | BLE Streaming Data Result: 60.0 178 | 179 | [06-06 00:40:51.381 17396:25826 D/PatchedBleManager] 180 | onCharacteristicChanged invoked: 0000f002-0000-1000-8000-00805f9b34fb 181 | 182 | [06-06 00:40:51.382 17396:25826 D/PatchedBleManager] 183 | onCharacteristicChanged invoked: 0000f002-0000-1000-8000-00805f9b34fb 184 | 185 | [06-06 00:40:51.384 17396:25826 D/PatchedBleManager] 186 | onCharacteristicChanged invoked: 0000f002-0000-1000-8000-00805f9b34fb 187 | 188 | [06-06 00:40:51.385 17396:17396 D/PatchedBleManager] 189 | BLE Streaming packet received containing:[67, -111, 77, 103, 12, 118, 23, -6, -53, -31, 42, -104, 123, -2, 79, 86, -89, 97, 52, -76, 21, 105, 65, -116, -128, 82, 9, -74, -97, -92, 95, -87, -53, 92, -7, -61, 25, -76, -86, 122, -70, -92, 47, 26, 2, -30] 190 | 191 | [06-06 00:40:51.485 17396:17396 D/PatchedBleManager] 192 | BLE Streaming Data Result: 60.0 193 | 194 | [06-06 00:41:50.069 17396:25826 D/PatchedBleManager] 195 | onCharacteristicChanged invoked: 0000f002-0000-1000-8000-00805f9b34fb 196 | 197 | [06-06 00:41:50.072 17396:25826 D/PatchedBleManager] 198 | onCharacteristicChanged invoked: 0000f002-0000-1000-8000-00805f9b34fb 199 | 200 | [06-06 00:41:50.074 17396:17396 D/PatchedBleManager] 201 | BLE Streaming packet received containing:[10, -109, 62, -123, 67, 28, -1, -45, -36, -93, -96, -18, 45, -104, -85, 113, -1, -91, -108, 12, -11, -1, 40, -90, 116, -48, 64, 42, -77, -108, 55, -28, -77, 124, -125, 44, -59, -114, 99, -21, 90, 11, -100, 77, 35, -99] 202 | 203 | [06-06 00:41:50.192 17396:17396 D/PatchedBleManager] 204 | BLE Streaming Data Result: 60.0 205 | 206 | -------------------------------------------------------------------------------- /ToDo/LibreView/patch.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Color codes 4 | NORMAL='\033[0;39m' 5 | GREEN='\033[1;32m' 6 | RED='\033[1;31m' 7 | WHITE='\033[1;37m' 8 | YELLOW='\033[1;33m' 9 | 10 | WORKDIR=$(pwd) 11 | FILENAME='com.freestylelibre.app.de_2019-04-22' 12 | 13 | echo -e "${WHITE}Prüfe benötigte Tools ...${NORMAL}" 14 | MISSINGTOOL=0 15 | echo -en "${WHITE} apksigner ... ${NORMAL}" 16 | which apksigner > /dev/null 17 | if [ $? = 0 ]; then 18 | echo -e "${GREEN}gefunden.${NORMAL}" 19 | else 20 | echo -e "${RED}nicht gefunden.${NORMAL}" 21 | MISSINGTOOL=1 22 | fi 23 | echo -en "${WHITE} apktool ... ${NORMAL}" 24 | if [ -x tools/apktool ]; then 25 | echo -e "${GREEN}gefunden.${NORMAL}" 26 | APKTOOL=$(pwd)/tools/apktool 27 | else 28 | which apktool > /dev/null 29 | if [ $? = 0 ]; then 30 | echo -e "${GREEN}gefunden.${NORMAL} Herkunft und Kompatibilität allerdings unbekannt." 31 | APKTOOL=$(which apktool) 32 | else 33 | echo -e "${RED}nicht gefunden.${NORMAL}" 34 | MISSINGTOOL=1 35 | fi 36 | fi 37 | echo -en "${WHITE} git ... ${NORMAL}" 38 | which git > /dev/null 39 | if [ $? = 0 ]; then 40 | echo -e "${GREEN}gefunden.${NORMAL}" 41 | else 42 | echo -e "${RED}nicht gefunden.${NORMAL}" 43 | MISSINGTOOL=1 44 | fi 45 | echo -en "${WHITE} keytool ... ${NORMAL}" 46 | which keytool > /dev/null 47 | if [ $? = 0 ]; then 48 | echo -e "${GREEN}gefunden.${NORMAL}" 49 | else 50 | echo -e "${RED}nicht gefunden.${NORMAL}" 51 | MISSINGTOOL=1 52 | fi 53 | echo -en "${WHITE} zipalign ... ${NORMAL}" 54 | which zipalign > /dev/null 55 | if [ $? = 0 ]; then 56 | echo -e "${GREEN}gefunden.${NORMAL}" 57 | else 58 | echo -e "${RED}nicht gefunden.${NORMAL}" 59 | MISSINGTOOL=1 60 | fi 61 | echo 62 | if [ ${MISSINGTOOL} = 1 ]; then 63 | echo -e "${YELLOW}=> Bitte installieren Sie die benötigten Tools.${NORMAL}" 64 | exit 1 65 | fi 66 | 67 | echo -e "${WHITE}Suche APK Datei '${FILENAME}.apk' ...${NORMAL}" 68 | if [ -e APK/${FILENAME}.apk ]; then 69 | echo -e "${GREEN} gefunden.${NORMAL}" 70 | echo 71 | else 72 | echo -e "${RED} nicht gefunden.${NORMAL}" 73 | echo 74 | echo -e "${YELLOW}=> Bitte laden Sie die original APK Datei von https://www.apkmonk.com/download-app/com.freestylelibre.app.de/5_com.freestylelibre.app.de_2019-04-22.apk/ herunter und legen Sie sie im Verzeichnis APK/ ab.${NORMAL}" 75 | exit 1 76 | fi 77 | 78 | echo -e "${WHITE}Prüfe MD5 Summe der APK Datei ...${NORMAL}" 79 | md5sum -c APK/${FILENAME}.apk.md5 > /dev/null 2>&1 80 | if [ $? = 0 ]; then 81 | echo -e "${GREEN} okay.${NORMAL}" 82 | echo 83 | else 84 | echo -e "${RED} nicht okay.${NORMAL}" 85 | echo 86 | echo -e "${YELLOW}=> Bitte laden Sie die korrekte, unverfälschte original APK herunter.${NORMAL}" 87 | exit 1 88 | fi 89 | 90 | echo -e "${WHITE}Enpacke original APK Datei ...${NORMAL}" 91 | ${APKTOOL} d -o /tmp/librelink APK/${FILENAME}.apk 92 | if [ $? = 0 ]; then 93 | echo -e "${GREEN} okay.${NORMAL}" 94 | echo 95 | else 96 | echo -e "${RED} nicht okay.${NORMAL}" 97 | echo 98 | echo -e "${YELLOW}=> Bitte prüfen Sie o.a. Fehler.${NORMAL}" 99 | exit 1 100 | fi 101 | 102 | echo -e "${WHITE}Patche original App ...${NORMAL}" 103 | 104 | cat < Bitte prüfen Sie o.a. Fehler.${NORMAL}" 153 | exit 1 154 | fi 155 | done 156 | 157 | echo -e "${WHITE}Verwende neuen Sourcecode für gepatchte App ...${NORMAL}" 158 | cp -Rv ${WORKDIR}/sources/* /tmp/librelink/smali_classes2/com/librelink/app/ 159 | if [ $? = 0 ]; then 160 | echo -e "${GREEN} okay.${NORMAL}" 161 | echo 162 | else 163 | echo -e "${RED} nicht okay.${NORMAL}" 164 | echo 165 | echo -e "${YELLOW}=> Bitte prüfen Sie o.a. Fehler.${NORMAL}" 166 | exit 1 167 | fi 168 | chmod 644 /tmp/librelink/smali_classes2/com/librelink/app/*.smali 169 | 170 | echo -e "${WHITE}Verwende neue Grafiken für gepatchte App ...${NORMAL}" 171 | cp -Rv ${WORKDIR}/graphics/* /tmp/librelink/ 172 | if [ $? = 0 ]; then 173 | echo -e "${GREEN} okay.${NORMAL}" 174 | echo 175 | else 176 | echo -e "${RED} nicht okay.${NORMAL}" 177 | echo 178 | echo -e "${YELLOW}=> Bitte prüfen Sie o.a. Fehler.${NORMAL}" 179 | exit 1 180 | fi 181 | 182 | echo -e "${WHITE}Kopiere original APK Datei in gepatchte App ...${NORMAL}" 183 | cp ${WORKDIR}/APK/${FILENAME}.apk /tmp/librelink/assets/original.apk 184 | if [ $? = 0 ]; then 185 | echo -e "${GREEN} okay.${NORMAL}" 186 | echo 187 | else 188 | echo -e "${RED} nicht okay.${NORMAL}" 189 | echo 190 | echo -e "${YELLOW}=> Bitte prüfen Sie o.a. Fehler.${NORMAL}" 191 | exit 1 192 | fi 193 | 194 | echo -e "${WHITE}Baue gepatchte App zusammen ...${NORMAL}" 195 | ${APKTOOL} b -o ${WORKDIR}/APK/librelink_unaligned.apk 196 | if [ $? = 0 ]; then 197 | echo -e "${GREEN} okay.${NORMAL}" 198 | echo 199 | else 200 | echo -e "${RED} nicht okay.${NORMAL}" 201 | echo 202 | echo -e "${YELLOW}=> Bitte prüfen Sie o.a. Fehler.${NORMAL}" 203 | exit 1 204 | fi 205 | 206 | echo -e "${WHITE}Räume /tmp/ auf ...${NORMAL}" 207 | cd ${WORKDIR} 208 | rm -rf /tmp/librelink/ 209 | echo -e "${GREEN} okay." 210 | echo 211 | 212 | echo -e "${WHITE}Optimiere Ausrichtung der gepatchten APK Datei...${NORMAL}" 213 | zipalign -p 4 APK/librelink_unaligned.apk APK/${FILENAME}_patched.apk 214 | if [ $? = 0 ]; then 215 | echo -e "${GREEN} okay.${NORMAL}" 216 | echo 217 | rm APK/librelink_unaligned.apk 218 | else 219 | echo -e "${RED} nicht okay.${NORMAL}" 220 | echo 221 | echo -e "${YELLOW}=> Bitte prüfen Sie o.a. Fehler.${NORMAL}" 222 | exit 1 223 | fi 224 | 225 | echo -e "${WHITE}Erstelle Keystore zum Signieren der gepatchten APK Datei ...${NORMAL}" 226 | keytool -genkey -v -keystore /tmp/libre-keystore.p12 -storetype PKCS12 -alias "Libre Signer" -keyalg RSA -keysize 2048 --validity 10000 --storepass geheim --keypass geheim -dname "cn=Libre Signer, c=de" 227 | if [ $? = 0 ]; then 228 | echo -e "${GREEN} okay.${NORMAL}" 229 | echo 230 | else 231 | echo -e "${RED} nicht okay.${NORMAL}" 232 | echo 233 | echo -e "${YELLOW}=> Bitte prüfen Sie o.a. Fehler.${NORMAL}" 234 | exit 1 235 | fi 236 | 237 | echo -e "${WHITE}Signiere gepatchte APK Datei ...${NORMAL}" 238 | if [ -x /usr/lib/android-sdk/build-tools/debian/apksigner.jar ]; then 239 | java -jar /usr/lib/android-sdk/build-tools/debian/apksigner.jar sign --ks-pass pass:geheim --ks /tmp/libre-keystore.p12 APK/${FILENAME}_patched.apk 240 | elif [ -x /usr/share/apksigner/apksigner.jar ]; then 241 | java -jar /usr/share/apksigner/apksigner.jar sign --ks-pass pass:geheim --ks /tmp/libre-keystore.p12 APK/${FILENAME}_patched.apk 242 | else 243 | apksigner sign --ks-pass pass:geheim --ks /tmp/libre-keystore.p12 APK/${FILENAME}_patched.apk 244 | fi 245 | if [ $? = 0 ]; then 246 | echo -e "${GREEN} okay.${NORMAL}" 247 | echo 248 | rm /tmp/libre-keystore.p12 249 | else 250 | echo -e "${RED} nicht okay.${NORMAL}" 251 | echo 252 | echo -e "${YELLOW}=> Bitte prüfen Sie o.a. Fehler.${NORMAL}" 253 | exit 1 254 | fi 255 | 256 | if [ -d /mnt/c/ ]; then 257 | echo -e "${WHITE}Windows-System erkannt ...${NORMAL}" 258 | echo -e "${WHITE}Kopiere APK ...${NORMAL}" 259 | mkdir -p /mnt/c/APK 260 | cp APK/${FILENAME}_patched.apk /mnt/c/APK/ 261 | if [ $? = 0 ]; then 262 | echo -e "${GREEN} okay.${NORMAL}" 263 | echo 264 | echo -en "${YELLOW}Fertig! Die gepatchte und signierte APK Datei finden Sie unter C:\\APK" 265 | echo -en "\\" 266 | echo -e "${FILENAME}_patched.apk${NORMAL}" 267 | else 268 | echo -e "${RED} nicht okay.${NORMAL}" 269 | echo 270 | echo -e "${YELLOW}=> Bitte prüfen Sie o.a. Fehler.${NORMAL}" 271 | exit 1 272 | fi 273 | else 274 | echo -e "${YELLOW}Fertig! Die gepatchte und signierte APK Datei finden Sie unter APK/${FILENAME}_patched.apk${NORMAL}" 275 | fi 276 | 277 | echo -en "${GREEN}Die gepatchte App läuft im ${appmode}-Modus" 278 | if [[ ${appmode} == Online ]] ; then 279 | echo -e " (mit LibreView-Unterstützung)${NORMAL}" 280 | else 281 | echo -e " (ohne LibreView-Unterstützung)${NORMAL}" 282 | fi 283 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Anleitung zum Patchen der App "LibreLink" unter Windows # 2 | 3 | **Grundsätzliches:** 4 | 5 | Wenn LibreLink als erstes "Gerät" mit einem FreeStyle Libre 2 gekoppelt wird, empfängt es permanent Bluetooth-Daten, um den aktuellen Gewebezucker-Wert zu berechnen und ggf. Alarm zu geben. Angezeigt werden diese Daten jedoch nur, wenn "klassisch" gescannt (der Sensor per NFC ausgelesen) wird. Dieser Patch ermöglicht es, dass [xDrip+](https://github.com/jamorham/xDrip-plus) die errechneten Werte von LibreLink auslesen und permanent anzeigen kann - ein Scannen per NFC ist nicht mehr nötig. 6 | 7 | Um die gepatchte App auf einem Android Smartphone installieren zu können, muss auf selbigem in den Einstellungen das "Installieren aus unbekannten Quellen" erlaubt, bzw. unter neueren Android-Versionen eine entsprechende App berechtigt werden, "unbekannte Apps zu installieren". 8 | 9 | Die original LibreLink App muss vor der Installation deinstalliert werden. **Dabei geht die Bluetooth-Kopplung zum aktuell laufenden Sensor verloren!** Sinnvollerweise wird der Wechsel der App daher beim Wechsel eines Sensors durchgeführt (falls der Alarm bis dahin per LibreLink erfolgte). Sobald die gepatchte App installiert wurde, müssen ihr noch Rechte auf "Standort" (für Bluetooth-Nutzung) und "Speicher" gewährt werden (in neueren Android-Versionen unter "Einstellungen - Apps & Benachrichtigungen - LibreLink - Berechtigungen", ansonsten ggf. den Menüpunkt "Alarme" in der App öffnen und prüfen, ob man dort nach Rechten gefragt wird). Danach kann ein neuer Sensor gestartet/gekoppelt und die App wie gewohnt genutzt werden. 10 | 11 | In den neueren Versionen von xDrip+ (ab ["Nightly Build" vom 15. Juli 2019 oder später](https://github.com/NightscoutFoundation/xDrip/releases) (auf das obere "Assets" klicken und die APK Datei herunterladen)) gibt es in den Einstellungen die Datenquelle "Libre2 (patched App)". Diese ist auszuwählen, um die Werte ohne klassisches Scannen angezeigt zu bekommen. In xDrip+ selbst muss der Sensor ebenfalls gestartet werden, wobei dies kein "Starten" im klassischen (LibreLink) Sinn ist. Es kann etwas dauern, bis die ersten Werte in xDrip+ erscheinen. 12 | 13 | **Vorgehen:** 14 | 15 | Wer Linux nutzt, kann sich an die englische original Anleitung des [ursprünglichen Projekts](https://github.com/user987654321resu/Libre2-patched-App) halten oder die hier enthaltene `patch.sh` nutzen. Für Windows-Nutzer ist folgende Anleitung eventuell hilfreich, welche im Grunde ein Linux SubSystem in Windows installiert und den Patch innerhalb dieses Systems ausführt. 16 | 17 | * Installation des Linux SubSystems 18 | 19 | In der Windows Systemsteuerung den Punkt "Windows-Features aktivieren oder deaktivieren" wählen (oder dies einfach in der Cortana-Suchleiste eingeben), dort am Ende den Haken bei "Windows-Subsystem für Linux" auswählen und mittels Klick auf "OK" bestätigen. Den anschließend verlangten Neustart unbedingt durchführen. 20 | Im "Microsoft Store" die App "Debian" installieren bzw. in der [Microsoft Dokumentation](https://docs.microsoft.com/de-de/windows/wsl/install-win10) zu dem Thema den Link "Debian GNU/Linux" auswählen und durch den Store bis zur Installation führen lassen. Anschließend das SubSystem Debian starten. 21 | 22 | * Einrichtung des Linux SubSystems 23 | 24 | Beim ersten Start des SubSystems wird nach einem Benutzernamen gefragt, der frei wählbar ist (hier aber bitte nur Kleinbuchstaben verwenden, ggf. Ziffern dahinter - keine Großbuchstaben). Sinnvollerweise nutzt man hier seinen eigenen Windows-Benutzernamen. Ebenso muss ein Passwort für diesen Benutzer vergeben werden (nicht überspringen, sondern wirklich ein Passwort setzen - dieses sieht man während der Eingabe nicht, davon nicht irritieren lassen). Hier macht es ggf. auch Sinn, das eigene Windows-Passwort zu setzen (muss aber beides nicht zwingend sein). 25 | Das Grundsystem ist nun vorhanden und muss mit benötigten Werkzeugen (Tools) versorgt werden. Dazu wird mittels dem Befehl `sudo apt-get update` die Paketliste auf den neuen Stand gebracht. Das eben vergebene Passwort wird dabei einmal abgefragt und ist einzugeben. Anschließend wird der Git-Client mittels `sudo apt-get install git` installiert. Die Frage, ob alle aufgeführten Pakete installiert werden sollen, wird bestätigt (Enter/Return-Taste drücken reicht dazu aus). 26 | 27 | * Clone dieses Repositories 28 | 29 | Mittels `git clone https://github.com/TinoKossmann/LibreLink-xDrip-Patch` wird dieses Repository heruntergeladen und anschließend per `cd LibreLink-xDrip-Patch` in das neue Verzeichnis gewechselt (Tipp: `cd Li` eintippen und Tabulator-Taste drücken). Bei Bedarf kann nun mit `ls -l` der Inhalt geprüft werden. 30 | 31 | * Installation weiterer Tools 32 | 33 | Weitere, benötigte Tools werden nun mittels `./install-apt-dependencies.sh` (Tipp: auch hier, `./inst` eintippen und Tabulator-Taste drücken) installiert. Sollte auch hier wieder nach einem Passwort gefragt werden, handelt es sich um das vorhin vergebene (i.d.R. wird aber nicht mehr danach gefragt). Die Frage nach der Paketliste wird wieder bestätigt. 34 | 35 | * Laden der original LibreLink App 36 | 37 | Wer die original APK-Datei nicht selbst herunterladen möchte, kann diese mittels `./download.sh` herunterladen. Dabei wird auch das zusätzlich benötigte Tool apktool installiert, welches im Debian-Repository in einer hier nicht ohne weiteres funktionierenden Version enthalten ist. 38 | 39 | * Patchen und Signieren der App 40 | 41 | Mittels `./patch.sh` wird alles nötige erledigt. Dies nimmt einige Zeit in Anspruch. Normalerweise sollten alle Schritte mit grünem "okay" abgeschlossen werden und am Ende der Hinweis erscheinen, dass die gepatchte APK-Datei im Verzeichnis C:\APK\ zu finden ist. Per `exit` kann das Fenster nun geschlossen werden. 42 | 43 | **Video Walkthrough:** 44 | 45 | In [diesem Video](https://www.youtube.com/watch?v=ezpGM2jR89A) ist die Anleitung einmal durchgespielt worden. 46 | 47 | **Weitere Hinweise:** 48 | 49 | Sollten auf dem PC "Internet Sicherheitssoftware" installiert sein (v.a. "Kaspersky Internet Security 2019" o.ä.), kann es nötig sein, diese temporär zu deaktivieren, da das Linux-Subsystem ansonsten keine Verbindung zum Internet erhält. 50 | 51 | Die gepatchte App läuft als sog. "Vordergrunddienst". Es ist daher normal, dass oben in der Taskleiste eine "Foreground Service Notification" erscheint. 52 | 53 | Die Verbindung zu LibreView bzw. allen Onlinediensten von Abbott wurden entfernt. 54 | 55 | Weiterhin gilt die Einschränkung, dass ein per Smartphone gestarteter Sensor nicht mit dem Lesegerät ausgelesen werden kann. Die Nutzung der gepatchten App und ihrer Vorteile bedeutet zwangsweise, dass das Lesegerät nicht mehr für diesen Sensor genutzt werden kann. 56 | 57 | LibreLink 2.3.0 erfordert Android 5.0 oder höher. 58 | 59 | Eine gute Anleitung zum Umgang mit xDrip+ in Verbindung mit der gepatchten App findet man u.a. [hier](https://androidaps.readthedocs.io/en/latest/CROWDIN/de/Hardware/Libre2.html). 60 | 61 | **Grundsätzliches Vorgehen:** 62 | 63 | (nur rudimentär, dies soll nur die Anleitung zum Patchen der App sein) 64 | 65 | - original LibreLink deinstallieren 66 | - Installation von Anwendungen aus "unbekannten Quellen" auf dem Smartphone erlauben, ggf. sogar "Play Protect" im PlayStore deaktiviern 67 | - gepatchte LibreLink App installieren 68 | - die Rechte "Standort" und "Speicher" für LibreLink erteilen 69 | - Bluetooth und GPS einschalten und eingeschaltet lassen (im Flugmodus funktioniert das ganze nicht, teilweise auch nicht ohne GPS) 70 | - Mindestens einen Alarm in LibreLink aktivieren 71 | - xDrip in aktueller Version installieren 72 | - "Libre2 (patchted App)" in xDrip als Datenquelle auswählen 73 | - Libre2 Sensor mit gepatchter LibreLink App starten 74 | - in xDrip Sensor "starten" 75 | - eine Stunde warten 76 | - Ruhe- bzw. Stomsparmodus deaktivieren, falls die Werte nachts auch durchgängig erscheinen sollen 77 | - Sobald Werte erscheinen, kann der Alarm in LibreLink deaktiviert werden - sinnvoll, wenn xDrip mit (ggf. kalibrierten Werten) Alarm schlagen soll 78 | 79 | --- 80 | 81 | # Original Anleitung in Englisch # 82 | 83 | # How to patch the Librelink app to provide xDrip with Value received by bluetooth directly from sensor 84 | 85 | 86 | **IF YOU WANT TO USE THIS, YOU NEED TO ACTIVATE A NEW SENSOR AFTER THE INSTALLATION PROCEDURE IS COMPLETED, IT DOES NOT WORK WITH ALLREADY ACTIVATED SENSORS!!** 87 | 88 | **Already activated sensors will also stop sending alarms to the handset device if they had been activated with the unpatched phone app.** 89 | 90 | 91 | ## Get the APK and Tools 92 | 1. Load the Version 2.3.0 of the freestyle Libre App DE, for example from [here](https://apkpure.com/de/freestyle-librelink-de/com.freestylelibre.app.de) or [here](https://www.apkmonk.com/download-app/com.freestylelibre.app.de/5_com.freestylelibre.app.de_2019-04-22.apk/) 93 | (The German version does have english language, don't worry.) 94 | 95 | 2. [OPTIONAL] If you want to check if your Version is correct, check the MD5 (for windows you might need to get an App like: 96 | http://www.winmd5.com to perform md5 checksumming). The Checksum should be: `420735605bacf0e18d2570079ebaa238` 97 | 98 | 3. Load the [apkTool](https://ibotpeaches.github.io/Apktool/) and install it as described [here](https://ibotpeaches.github.io/Apktool/install/). It seems that the current 2.4 Version of Apktool has some problems on Windows, please download and install an older 2.3 Version if you are using Windows! 99 | 100 | 4. Open a CMD-Prompt (windows) or Shell (\*nix) where you downloaded the apk (e.g. your download folder) 101 | 102 | 5. Use the apktool: `apktool d -o librelink [FILENAME_OF_THE_DOWNLOADED_APK]` 103 | 104 | 6. You should now have a folder named `librelink` with all the extracted files of the application 105 | 7. Copy the patch Files from this repository to the same location as the `librelink` folder (you should now have a directory with at least the following files/folders: `librelink`, `xdrip2.git.patch`, `sources` and `xdrip2.patch`) 106 | 107 | ## Patch Application 108 | **Use either of the two methods:** 109 | 110 | ### OPTION 1: patch method 111 | 1. For Windows, get the patch tool from [here](http://gnuwin32.sourceforge.net/packages/patch.htm) and install it correctly. Mac, Linux and *nix should have patch onboard, if not install from your trusted repository. 112 | 2. Change in the prompt/shell into the `librelink` folder 113 | 3. Use the Patch tool with the patch: `patch -p1 --binary --merge < ../xdrip2.patch`. for Windows `patch -p1 --binary --merge < ..\xdrip2.patch`. Be sure to use CMD-Prompt and not PowerShell,a s PowerShell does not support < operation. 114 | 115 | ### OPTION 2: git apply method 116 | 1. Get your git client ready. For windows install something like [this](https://gitforwindows.org) 117 | 2. Change in the prompt/shell into the `librelink` folder 118 | 3. Use igt to apply the patch: `git apply ../xdrip2.git.patch`, for Windows `git apply ..\xdrip2.git.patch` 119 | 120 | ## Add Files 121 | 1. In your Filebrowser navigate within the librelink folder to the path `smali_classes2/com/librelink/app/` 122 | 2. Copy the following Files from the `sources` folder of this repository to this folder: 123 | 1. `ThirdPartyIntegration.smali` 124 | 2. `ForegroundService.smali` 125 | 3. `CrashReportUtil.smali` 126 | 4. `APKExtractor.smali` 127 | 3. Rename the Downloaded APK to `original.apk` 128 | 4. Copy the `original.apk` into the Folder `assets` in the `librelink` folder 129 | 130 | ## Rebuild the APK 131 | 132 | 1. In the Prompt/Shell move into the folder, which contains the `librelink` folder 133 | 2. Use apktool to rebuild the APK: `apktool b -o librelink.apk librelink` 134 | 3. Generate a Signing keystore: `keytool -genkey -v -keystore librelink.keystore -alias librelink -keyalg RSA -keysize 2048 -validity 10000` 135 | 1. Fill in the necessary informations. You must enter two passwords, one for the keystore, one for the key, you should note them down! I prefer to use rather simple passwords like both times `librelink` as this keystore is only for the resigned app 136 | 2. **If this fails, please install current java developer tools like [this](https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html)** 137 | 3. If you need to update the App later, omit this step, as the keystore is now available. 138 | 4. Sign the APK: `jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore librelink.keystore librelink.apk librelink`. If the jarsigner is not found in Windows, please check that your java variables are setup correctly, like described [here](https://stackoverflow.com/questions/1672281/environment-variables-for-java-installation) 139 | 140 | ## Install the new APK 141 | 5. Uninstall the current librelink app on the phone. 142 | 6. Copy the generated `librelink.apk` to your phone (USB, google drive, ... gmail will not work) and install it. 143 | 144 | ## Finished 145 | **Open the app, go to "Alarms" and give all necessary permissions that the app requests, or else the first sensor you will start with the app will not transmit any data via Bluetooth!!!** As an alternative, you can navigate to the app in your android-settings -> security and enbale there all permission (Location and Files) 146 | 147 | If all Steps where succesfully executed, you will have now a patched librelink app, capable of sending its data to [xDrip](https://github.com/jamorham/xDrip-plus). 148 | 149 | Wait for more informations about which Version/Patches you need for xDrip to get the Data to Display! 150 | -------------------------------------------------------------------------------- /ToDo/LibreView/0001-Add-forwarding-of-Bluetooth-readings-to-other-apps.patch: -------------------------------------------------------------------------------- 1 | From bc8da8cfbca2bb5c5ebc905eaf8a76b1fff95d5c Mon Sep 17 00:00:00 2001 2 | From: smos 3 | Date: Mon, 23 Sep 2019 13:48:11 +0200 4 | Subject: [PATCH 1/2] Add forwarding of Bluetooth readings to other apps 5 | 6 | --- 7 | AndroidManifest.xml | 4 +- 8 | .../com/librelink/app/core/App.smali | 20 ++++++ 9 | .../librelink/app/core/BleManager$3$2.smali | 4 ++ 10 | .../com/librelink/app/core/BleManager$3.smali | 7 ++ 11 | .../com/librelink/app/core/BleManager$5.smali | 2 +- 12 | .../com/librelink/app/core/BleManager.smali | 49 ++++++++++++- 13 | .../ApplicationConfigurationValues.smali | 69 +++++++++++++++++- 14 | .../app/ui/common/ScanSensorFragment.smali | 72 ++++++++++++++++++- 15 | 8 files changed, 222 insertions(+), 5 deletions(-) 16 | 17 | diff --git a/AndroidManifest.xml b/AndroidManifest.xml 18 | index 873d5569..4d1e9bfa 100644 19 | --- a/AndroidManifest.xml 20 | +++ b/AndroidManifest.xml 21 | @@ -15,9 +15,10 @@ 22 | 23 | 24 | 25 | + 26 | 27 | 28 | - 29 | + 30 | 31 | 32 | 33 | @@ -86,6 +87,7 @@ 34 | 35 | 36 | 37 | + 38 | 39 | 40 | 41 | diff --git a/smali_classes2/com/librelink/app/core/App.smali b/smali_classes2/com/librelink/app/core/App.smali 42 | index e4ae2a39..e058e618 100644 43 | --- a/smali_classes2/com/librelink/app/core/App.smali 44 | +++ b/smali_classes2/com/librelink/app/core/App.smali 45 | @@ -65,6 +65,18 @@ 46 | return-void 47 | .end method 48 | 49 | +.method public getPackageCodePath()Ljava/lang/String; 50 | + .registers 2 51 | + 52 | + .prologue 53 | + .line 13 54 | + invoke-static {p0}, Lcom/librelink/app/APKExtractor;->getOriginalAPKPath(Landroid/app/Application;)Ljava/lang/String; 55 | + 56 | + move-result-object v0 57 | + 58 | + return-object v0 59 | +.end method 60 | + 61 | .method public static get(Landroid/content/Context;)Lcom/librelink/app/core/App; 62 | .locals 0 63 | 64 | @@ -369,6 +381,14 @@ 65 | .line 83 66 | invoke-super {p0}, Landroid/app/Application;->onCreate()V 67 | 68 | + invoke-static {}, Lcom/librelink/app/CrashReportUtil;->setDefaultUncaughtExceptionHandler()V 69 | + 70 | + invoke-static {p0}, Lcom/librelink/app/ForegroundService;->initialize(Landroid/content/Context;)V 71 | + 72 | + invoke-static {p0}, Lcom/librelink/app/ThirdPartyIntegration;->injectContext(Landroid/content/Context;)V 73 | + 74 | + invoke-static {p0}, Lcom/librelink/app/APKExtractor;->extractOriginalAPK(Landroid/app/Application;)V 75 | + 76 | .line 85 77 | invoke-static {}, Lcom/librelink/app/core/components/DaggerAppComponent;->builder()Lcom/librelink/app/core/components/DaggerAppComponent$Builder; 78 | 79 | diff --git a/smali_classes2/com/librelink/app/core/BleManager$3$2.smali b/smali_classes2/com/librelink/app/core/BleManager$3$2.smali 80 | index ae28bf89..1844a0bb 100644 81 | --- a/smali_classes2/com/librelink/app/core/BleManager$3$2.smali 82 | +++ b/smali_classes2/com/librelink/app/core/BleManager$3$2.smali 83 | @@ -116,6 +116,8 @@ 84 | 85 | iget-object v1, v1, Lcom/librelink/app/core/BleManager$3;->this$0:Lcom/librelink/app/core/BleManager; 86 | 87 | + invoke-static {v1, v0}, Lcom/librelink/app/ThirdPartyIntegration;->sendGlucoseBroadcast(Lcom/librelink/app/core/BleManager;Lcom/abbottdiabetescare/flashglucose/sensorabstractionservice/CurrentGlucose;)V 88 | + 89 | new-instance v2, Ljava/lang/StringBuilder; 90 | 91 | invoke-direct {v2}, Ljava/lang/StringBuilder;->()V 92 | @@ -184,6 +186,8 @@ 93 | 94 | iget-object v1, v1, Lcom/librelink/app/core/BleManager$3;->this$0:Lcom/librelink/app/core/BleManager; 95 | 96 | + invoke-static {v1, v0}, Lcom/librelink/app/ThirdPartyIntegration;->sendSensorBLEExceptionBroadcast(Lcom/librelink/app/core/BleManager;Ljava/lang/Throwable;)V 97 | + 98 | new-instance v2, Ljava/lang/StringBuilder; 99 | 100 | invoke-direct {v2}, Ljava/lang/StringBuilder;->()V 101 | diff --git a/smali_classes2/com/librelink/app/core/BleManager$3.smali b/smali_classes2/com/librelink/app/core/BleManager$3.smali 102 | index d0442aab..e7d8f53d 100644 103 | --- a/smali_classes2/com/librelink/app/core/BleManager$3.smali 104 | +++ b/smali_classes2/com/librelink/app/core/BleManager$3.smali 105 | @@ -183,6 +183,9 @@ 106 | .line 363 107 | iget-object p2, p0, Lcom/librelink/app/core/BleManager$3;->this$0:Lcom/librelink/app/core/BleManager; 108 | 109 | + invoke-static {p2, p1}, Lcom/librelink/app/ThirdPartyIntegration;->sendCharacteristicValueBroadcast(Lcom/librelink/app/core/BleManager;[B)V 110 | + 111 | + 112 | new-instance v3, Ljava/lang/StringBuilder; 113 | 114 | invoke-direct {v3}, Ljava/lang/StringBuilder;->()V 115 | @@ -555,6 +558,8 @@ 116 | :goto_0 117 | iget-object v1, p0, Lcom/librelink/app/core/BleManager$3;->this$0:Lcom/librelink/app/core/BleManager; 118 | 119 | + invoke-static {v1, p3}, Lcom/librelink/app/ThirdPartyIntegration;->sendConnectionStateBroadcast(Lcom/librelink/app/core/BleManager;I)V 120 | + 121 | new-instance v2, Ljava/lang/StringBuilder; 122 | 123 | invoke-direct {v2}, Ljava/lang/StringBuilder;->()V 124 | @@ -635,6 +640,8 @@ 125 | :cond_0 126 | iget-object p1, p0, Lcom/librelink/app/core/BleManager$3;->this$0:Lcom/librelink/app/core/BleManager; 127 | 128 | + invoke-static {p1, p3}, Lcom/librelink/app/ThirdPartyIntegration;->sendRSSIBroadcast(Lcom/librelink/app/core/BleManager;I)V 129 | + 130 | new-instance p3, Ljava/lang/StringBuilder; 131 | 132 | invoke-direct {p3}, Ljava/lang/StringBuilder;->()V 133 | diff --git a/smali_classes2/com/librelink/app/core/BleManager$5.smali b/smali_classes2/com/librelink/app/core/BleManager$5.smali 134 | index 8daafb29..f09852ac 100644 135 | --- a/smali_classes2/com/librelink/app/core/BleManager$5.smali 136 | +++ b/smali_classes2/com/librelink/app/core/BleManager$5.smali 137 | @@ -186,7 +186,7 @@ 138 | const-wide/16 v2, 0x0 139 | 140 | invoke-static {p1, v2, v3}, Lcom/librelink/app/core/BleManager;->access$400(Lcom/librelink/app/core/BleManager;J)V 141 | - 142 | + invoke-static {p1}, Lcom/librelink/app/ThirdPartyIntegration;->sendFoundDeviceBroadcast(Lcom/librelink/app/core/BleManager;)V 143 | return v1 144 | 145 | .line 568 146 | diff --git a/smali_classes2/com/librelink/app/core/BleManager.smali b/smali_classes2/com/librelink/app/core/BleManager.smali 147 | index a8908eca..0f131005 100644 148 | --- a/smali_classes2/com/librelink/app/core/BleManager.smali 149 | +++ b/smali_classes2/com/librelink/app/core/BleManager.smali 150 | @@ -354,11 +354,56 @@ 151 | .end method 152 | 153 | .method private DEVLOG(Ljava/lang/String;)V 154 | - .locals 0 155 | + .registers 3 156 | + .param p1, "str" # Ljava/lang/String; 157 | + 158 | + .prologue 159 | + .line 28 160 | + const-string v0, "PatchedBleManager" 161 | + 162 | + invoke-static {v0, p1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I 163 | + 164 | + .line 29 165 | 166 | return-void 167 | .end method 168 | 169 | +.method public getSAS()Lcom/librelink/app/types/SAS; 170 | + .registers 2 171 | + 172 | + .prologue 173 | + .line 32 174 | + iget-object v0, p0, Lcom/librelink/app/core/BleManager;->mSAS:Ljavax/inject/Provider; 175 | + 176 | + invoke-interface {v0}, Ljavax/inject/Provider;->get()Ljava/lang/Object; 177 | + 178 | + move-result-object v0 179 | + 180 | + check-cast v0, Lcom/librelink/app/types/SAS; 181 | + 182 | + return-object v0 183 | +.end method 184 | + 185 | +.method public getSensorAddress()Ljava/lang/String; 186 | + .registers 2 187 | + 188 | + .prologue 189 | + .line 20 190 | + iget-object v0, p0, Lcom/librelink/app/core/BleManager;->mActiveDeviceAddress:Ljava/lang/String; 191 | + 192 | + return-object v0 193 | +.end method 194 | + 195 | +.method public getSensorSerial()Ljava/lang/String; 196 | + .registers 2 197 | + 198 | + .prologue 199 | + .line 24 200 | + iget-object v0, p0, Lcom/librelink/app/core/BleManager;->mActiveDeviceSerialNumber:Ljava/lang/String; 201 | + 202 | + return-object v0 203 | +.end method 204 | + 205 | .method static synthetic access$000(Lcom/librelink/app/core/BleManager;Z)V 206 | .locals 0 207 | 208 | @@ -1303,6 +1348,8 @@ 209 | :goto_1 210 | invoke-direct {p0}, Lcom/librelink/app/core/BleManager;->reportAvailabilityChange()V 211 | 212 | + invoke-static {p0}, Lcom/librelink/app/ThirdPartyIntegration;->sendInitializeBluetoothBroadcast(Lcom/librelink/app/core/BleManager;)V 213 | + 214 | return-void 215 | .end method 216 | 217 | diff --git a/smali_classes2/com/librelink/app/types/ApplicationConfigurationValues.smali b/smali_classes2/com/librelink/app/types/ApplicationConfigurationValues.smali 218 | index bef3d8f0..1fb63d71 100644 219 | --- a/smali_classes2/com/librelink/app/types/ApplicationConfigurationValues.smali 220 | +++ b/smali_classes2/com/librelink/app/types/ApplicationConfigurationValues.smali 221 | @@ -33,10 +33,77 @@ 222 | 223 | # direct methods 224 | .method public constructor ()V 225 | - .locals 0 226 | +.registers 2 227 | 228 | + .prologue 229 | .line 3 230 | invoke-direct {p0}, Ljava/lang/Object;->()V 231 | 232 | + .line 5 233 | + const/high16 v0, 0x41200000 # 10.0f 234 | + 235 | + iput v0, p0, Lcom/librelink/app/types/ApplicationConfigurationValues;->appDefaultServingSize:F 236 | + 237 | + .line 6 238 | + const/4 v0, 0x0 239 | + 240 | + iput v0, p0, Lcom/librelink/app/types/ApplicationConfigurationValues;->appMinimumAge:I 241 | + 242 | + .line 7 243 | + const-string v0, "" 244 | + 245 | + iput-object v0, p0, Lcom/librelink/app/types/ApplicationConfigurationValues;->appProductStandardNumber:Ljava/lang/String; 246 | + 247 | + .line 8 248 | + const-string v0, "" 249 | + 250 | + iput-object v0, p0, Lcom/librelink/app/types/ApplicationConfigurationValues;->appRegistrationNumber:Ljava/lang/String; 251 | + 252 | + .line 9 253 | + const-string v0, "" 254 | + 255 | + iput-object v0, p0, Lcom/librelink/app/types/ApplicationConfigurationValues;->newYuApiKey:Ljava/lang/String; 256 | + 257 | + .line 10 258 | + const-string v0, "" 259 | + 260 | + iput-object v0, p0, Lcom/librelink/app/types/ApplicationConfigurationValues;->newYuDomain:Ljava/lang/String; 261 | + 262 | + .line 11 263 | + const-string v0, "" 264 | + 265 | + iput-object v0, p0, Lcom/librelink/app/types/ApplicationConfigurationValues;->newYuGateway:Ljava/lang/String; 266 | + 267 | + .line 12 268 | + const-string v0, "" 269 | + 270 | + iput-object v0, p0, Lcom/librelink/app/types/ApplicationConfigurationValues;->newYuShareUrl:Ljava/lang/String; 271 | + 272 | + .line 13 273 | + const-string v0, "" 274 | + 275 | + iput-object v0, p0, Lcom/librelink/app/types/ApplicationConfigurationValues;->newYuUrl:Ljava/lang/String; 276 | + 277 | + .line 14 278 | + const-string v0, "" 279 | + 280 | + iput-object v0, p0, Lcom/librelink/app/types/ApplicationConfigurationValues;->oneStepAudience:Ljava/lang/String; 281 | + 282 | + .line 15 283 | + const-string v0, "" 284 | + 285 | + iput-object v0, p0, Lcom/librelink/app/types/ApplicationConfigurationValues;->oneStepBaseUrl:Ljava/lang/String; 286 | + 287 | + .line 16 288 | + const-string v0, "" 289 | + 290 | + iput-object v0, p0, Lcom/librelink/app/types/ApplicationConfigurationValues;->oneStepIssuer:Ljava/lang/String; 291 | + 292 | + .line 17 293 | + const-string v0, "" 294 | + 295 | + iput-object v0, p0, Lcom/librelink/app/types/ApplicationConfigurationValues;->oneStepSubject:Ljava/lang/String; 296 | + 297 | + 298 | return-void 299 | .end method 300 | diff --git a/smali_classes2/com/librelink/app/ui/common/ScanSensorFragment.smali b/smali_classes2/com/librelink/app/ui/common/ScanSensorFragment.smali 301 | index 0a79f1e1..7c60fb7f 100644 302 | --- a/smali_classes2/com/librelink/app/ui/common/ScanSensorFragment.smali 303 | +++ b/smali_classes2/com/librelink/app/ui/common/ScanSensorFragment.smali 304 | @@ -172,7 +172,6 @@ 305 | .end annotation 306 | .end field 307 | 308 | - 309 | # direct methods 310 | .method public constructor ()V 311 | .locals 1 312 | @@ -287,6 +286,7 @@ 313 | 314 | .line 487 315 | :cond_3 316 | + 317 | iget-object p4, p0, Lcom/librelink/app/ui/common/ScanSensorFragment;->previousSensor:Lcom/librelink/app/prefs/SharedPreference; 318 | 319 | const/4 v0, 0x0 320 | @@ -473,11 +473,16 @@ 321 | .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0 322 | 323 | :goto_3 324 | + 325 | + invoke-static {p0, p5}, Lcom/librelink/app/ThirdPartyIntegration;->sendSensorActivateBroadcast(Lcom/librelink/app/ui/common/ScanSensorFragment;Lcom/abbottdiabetescare/flashglucose/sensorabstractionservice/Sensor;)V 326 | + 327 | return-object p3 328 | 329 | :catch_0 330 | move-exception p1 331 | 332 | + invoke-static {p0, p1}, Lcom/librelink/app/ThirdPartyIntegration;->sendSensorNFCActivateExceptionBroadcast(Lcom/librelink/app/ui/common/ScanSensorFragment;Ljava/lang/Throwable;)V 333 | + 334 | .line 570 335 | new-instance p2, Lcom/librelink/app/core/AppError; 336 | 337 | @@ -490,12 +495,16 @@ 338 | :catch_1 339 | move-exception p1 340 | 341 | + invoke-static {p0, p1}, Lcom/librelink/app/ThirdPartyIntegration;->sendSensorNFCActivateExceptionBroadcast(Lcom/librelink/app/ui/common/ScanSensorFragment;Ljava/lang/Throwable;)V 342 | + 343 | .line 566 344 | throw p1 345 | 346 | :catch_2 347 | move-exception p3 348 | 349 | + invoke-static {p0, p3}, Lcom/librelink/app/ThirdPartyIntegration;->sendSensorNFCActivateExceptionBroadcast(Lcom/librelink/app/ui/common/ScanSensorFragment;Ljava/lang/Throwable;)V 350 | + 351 | .line 561 352 | invoke-direct {p0, p1, p2}, Lcom/librelink/app/ui/common/ScanSensorFragment;->debounceTagDetection(Landroid/content/Context;Landroid/nfc/Tag;)V 353 | 354 | @@ -511,6 +520,8 @@ 355 | :catch_3 356 | move-exception p3 357 | 358 | + invoke-static {p0, p3}, Lcom/librelink/app/ThirdPartyIntegration;->sendSensorNFCActivateExceptionBroadcast(Lcom/librelink/app/ui/common/ScanSensorFragment;Ljava/lang/Throwable;)V 359 | + 360 | .line 556 361 | invoke-direct {p0, p1, p2}, Lcom/librelink/app/ui/common/ScanSensorFragment;->debounceTagDetection(Landroid/content/Context;Landroid/nfc/Tag;)V 362 | 363 | @@ -526,6 +537,8 @@ 364 | :catch_4 365 | move-exception p3 366 | 367 | + invoke-static {p0, p3}, Lcom/librelink/app/ThirdPartyIntegration;->sendSensorNFCActivateExceptionBroadcast(Lcom/librelink/app/ui/common/ScanSensorFragment;Ljava/lang/Throwable;)V 368 | + 369 | .line 551 370 | invoke-direct {p0, p1, p2}, Lcom/librelink/app/ui/common/ScanSensorFragment;->debounceTagDetection(Landroid/content/Context;Landroid/nfc/Tag;)V 371 | 372 | @@ -541,6 +554,8 @@ 373 | :catch_5 374 | move-exception p3 375 | 376 | + invoke-static {p0, p3}, Lcom/librelink/app/ThirdPartyIntegration;->sendSensorNFCActivateExceptionBroadcast(Lcom/librelink/app/ui/common/ScanSensorFragment;Ljava/lang/Throwable;)V 377 | + 378 | .line 546 379 | invoke-direct {p0, p1, p2}, Lcom/librelink/app/ui/common/ScanSensorFragment;->debounceTagDetection(Landroid/content/Context;Landroid/nfc/Tag;)V 380 | 381 | @@ -556,6 +571,8 @@ 382 | :catch_6 383 | move-exception p3 384 | 385 | + invoke-static {p0, p3}, Lcom/librelink/app/ThirdPartyIntegration;->sendSensorNFCActivateExceptionBroadcast(Lcom/librelink/app/ui/common/ScanSensorFragment;Ljava/lang/Throwable;)V 386 | + 387 | .line 541 388 | invoke-direct {p0, p1, p2}, Lcom/librelink/app/ui/common/ScanSensorFragment;->debounceTagDetection(Landroid/content/Context;Landroid/nfc/Tag;)V 389 | 390 | @@ -571,6 +588,8 @@ 391 | :catch_7 392 | move-exception p3 393 | 394 | + invoke-static {p0, p3}, Lcom/librelink/app/ThirdPartyIntegration;->sendSensorNFCActivateExceptionBroadcast(Lcom/librelink/app/ui/common/ScanSensorFragment;Ljava/lang/Throwable;)V 395 | + 396 | .line 536 397 | invoke-direct {p0, p1, p2}, Lcom/librelink/app/ui/common/ScanSensorFragment;->debounceTagDetection(Landroid/content/Context;Landroid/nfc/Tag;)V 398 | 399 | @@ -586,6 +605,8 @@ 400 | :catch_8 401 | move-exception p1 402 | 403 | + invoke-static {p0, p1}, Lcom/librelink/app/ThirdPartyIntegration;->sendSensorNFCActivateExceptionBroadcast(Lcom/librelink/app/ui/common/ScanSensorFragment;Ljava/lang/Throwable;)V 404 | + 405 | .line 532 406 | new-instance p2, Lcom/librelink/app/core/AppError; 407 | 408 | @@ -1588,6 +1609,7 @@ 409 | 410 | .line 594 411 | :cond_0 412 | + 413 | invoke-interface {p3, v0}, Lcom/librelink/app/types/SAS;->getLatestRealTimeGlucoseReading(Lcom/abbottdiabetescare/flashglucose/sensorabstractionservice/Sensor;)Lcom/abbottdiabetescare/flashglucose/sensorabstractionservice/RealTimeGlucose; 414 | 415 | move-result-object v1 416 | @@ -1676,6 +1698,8 @@ 417 | 418 | move-result-object v1 419 | 420 | + invoke-static {p0, v0}, Lcom/librelink/app/ThirdPartyIntegration;->sendSensorScanBroadcast(Lcom/librelink/app/ui/common/ScanSensorFragment;Lcom/abbottdiabetescare/flashglucose/sensorabstractionservice/Sensor;)V 421 | + 422 | .line 607 423 | iget-object v2, p0, Lcom/librelink/app/ui/common/ScanSensorFragment;->mAnalytics:Lcom/librelink/app/types/Analytics; 424 | 425 | @@ -1731,6 +1755,8 @@ 426 | :catch_0 427 | move-exception p1 428 | 429 | + invoke-static {p0, p1}, Lcom/librelink/app/ThirdPartyIntegration;->sendSensorNFCScanExceptionBroadcast(Lcom/librelink/app/ui/common/ScanSensorFragment;Ljava/lang/Throwable;)V 430 | + 431 | .line 702 432 | new-instance p2, Lcom/librelink/app/core/AppError; 433 | 434 | @@ -1743,12 +1769,16 @@ 435 | :catch_1 436 | move-exception p1 437 | 438 | + invoke-static {p0, p1}, Lcom/librelink/app/ThirdPartyIntegration;->sendSensorNFCScanExceptionBroadcast(Lcom/librelink/app/ui/common/ScanSensorFragment;Ljava/lang/Throwable;)V 439 | + 440 | .line 698 441 | throw p1 442 | 443 | :catch_2 444 | move-exception p3 445 | 446 | + invoke-static {p0, p3}, Lcom/librelink/app/ThirdPartyIntegration;->sendSensorNFCScanExceptionBroadcast(Lcom/librelink/app/ui/common/ScanSensorFragment;Ljava/lang/Throwable;)V 447 | + 448 | .line 693 449 | invoke-direct {p0, p1, p2}, Lcom/librelink/app/ui/common/ScanSensorFragment;->debounceTagDetection(Landroid/content/Context;Landroid/nfc/Tag;)V 450 | 451 | @@ -1764,6 +1794,8 @@ 452 | :catch_3 453 | move-exception p3 454 | 455 | + invoke-static {p0, p3}, Lcom/librelink/app/ThirdPartyIntegration;->sendSensorNFCScanExceptionBroadcast(Lcom/librelink/app/ui/common/ScanSensorFragment;Ljava/lang/Throwable;)V 456 | + 457 | .line 688 458 | invoke-direct {p0, p1, p2}, Lcom/librelink/app/ui/common/ScanSensorFragment;->debounceTagDetection(Landroid/content/Context;Landroid/nfc/Tag;)V 459 | 460 | @@ -1779,6 +1811,8 @@ 461 | :catch_4 462 | move-exception p3 463 | 464 | + invoke-static {p0, p3}, Lcom/librelink/app/ThirdPartyIntegration;->sendSensorNFCScanExceptionBroadcast(Lcom/librelink/app/ui/common/ScanSensorFragment;Ljava/lang/Throwable;)V 465 | + 466 | .line 683 467 | invoke-direct {p0, p1, p2}, Lcom/librelink/app/ui/common/ScanSensorFragment;->debounceTagDetection(Landroid/content/Context;Landroid/nfc/Tag;)V 468 | 469 | @@ -1794,6 +1828,8 @@ 470 | :catch_5 471 | move-exception p3 472 | 473 | + invoke-static {p0, p3}, Lcom/librelink/app/ThirdPartyIntegration;->sendSensorNFCScanExceptionBroadcast(Lcom/librelink/app/ui/common/ScanSensorFragment;Ljava/lang/Throwable;)V 474 | + 475 | .line 678 476 | invoke-direct {p0, p1, p2}, Lcom/librelink/app/ui/common/ScanSensorFragment;->debounceTagDetection(Landroid/content/Context;Landroid/nfc/Tag;)V 477 | 478 | @@ -1809,6 +1845,8 @@ 479 | :catch_6 480 | move-exception p3 481 | 482 | + invoke-static {p0, p3}, Lcom/librelink/app/ThirdPartyIntegration;->sendSensorNFCScanExceptionBroadcast(Lcom/librelink/app/ui/common/ScanSensorFragment;Ljava/lang/Throwable;)V 483 | + 484 | .line 673 485 | invoke-direct {p0, p1, p2}, Lcom/librelink/app/ui/common/ScanSensorFragment;->debounceTagDetection(Landroid/content/Context;Landroid/nfc/Tag;)V 486 | 487 | @@ -1824,6 +1862,8 @@ 488 | :catch_7 489 | move-exception p3 490 | 491 | + invoke-static {p0, p3}, Lcom/librelink/app/ThirdPartyIntegration;->sendSensorNFCScanExceptionBroadcast(Lcom/librelink/app/ui/common/ScanSensorFragment;Ljava/lang/Throwable;)V 492 | + 493 | .line 668 494 | invoke-direct {p0, p1, p2}, Lcom/librelink/app/ui/common/ScanSensorFragment;->debounceTagDetection(Landroid/content/Context;Landroid/nfc/Tag;)V 495 | 496 | @@ -1839,6 +1879,8 @@ 497 | :catch_8 498 | move-exception p3 499 | 500 | + invoke-static {p0, p3}, Lcom/librelink/app/ThirdPartyIntegration;->sendSensorNFCScanExceptionBroadcast(Lcom/librelink/app/ui/common/ScanSensorFragment;Ljava/lang/Throwable;)V 501 | + 502 | .line 663 503 | invoke-direct {p0, p1, p2}, Lcom/librelink/app/ui/common/ScanSensorFragment;->debounceTagDetection(Landroid/content/Context;Landroid/nfc/Tag;)V 504 | 505 | @@ -1854,6 +1896,8 @@ 506 | :catch_9 507 | move-exception p3 508 | 509 | + invoke-static {p0, p3}, Lcom/librelink/app/ThirdPartyIntegration;->sendSensorNFCScanExceptionBroadcast(Lcom/librelink/app/ui/common/ScanSensorFragment;Ljava/lang/Throwable;)V 510 | + 511 | .line 654 512 | iget-object v0, p0, Lcom/librelink/app/ui/common/ScanSensorFragment;->mAnalytics:Lcom/librelink/app/types/Analytics; 513 | 514 | @@ -1898,6 +1942,8 @@ 515 | :catch_a 516 | move-exception v0 517 | 518 | + invoke-static {p0, v0}, Lcom/librelink/app/ThirdPartyIntegration;->sendSensorNFCScanExceptionBroadcast(Lcom/librelink/app/ui/common/ScanSensorFragment;Ljava/lang/Throwable;)V 519 | + 520 | .line 636 521 | invoke-direct {p0, p1, p2}, Lcom/librelink/app/ui/common/ScanSensorFragment;->debounceTagDetection(Landroid/content/Context;Landroid/nfc/Tag;)V 522 | 523 | @@ -1945,6 +1991,8 @@ 524 | :catch_b 525 | move-exception p3 526 | 527 | + invoke-static {p0, p3}, Lcom/librelink/app/ThirdPartyIntegration;->sendSensorNFCScanExceptionBroadcast(Lcom/librelink/app/ui/common/ScanSensorFragment;Ljava/lang/Throwable;)V 528 | + 529 | .line 631 530 | invoke-direct {p0, p1, p2}, Lcom/librelink/app/ui/common/ScanSensorFragment;->debounceTagDetection(Landroid/content/Context;Landroid/nfc/Tag;)V 531 | 532 | @@ -1960,6 +2008,8 @@ 533 | :catch_c 534 | move-exception p3 535 | 536 | + invoke-static {p0, p3}, Lcom/librelink/app/ThirdPartyIntegration;->sendSensorNFCScanExceptionBroadcast(Lcom/librelink/app/ui/common/ScanSensorFragment;Ljava/lang/Throwable;)V 537 | + 538 | .line 626 539 | invoke-direct {p0, p1, p2}, Lcom/librelink/app/ui/common/ScanSensorFragment;->debounceTagDetection(Landroid/content/Context;Landroid/nfc/Tag;)V 540 | 541 | @@ -1975,6 +2025,8 @@ 542 | :catch_d 543 | move-exception p1 544 | 545 | + invoke-static {p0, p1}, Lcom/librelink/app/ThirdPartyIntegration;->sendSensorNFCScanExceptionBroadcast(Lcom/librelink/app/ui/common/ScanSensorFragment;Ljava/lang/Throwable;)V 546 | + 547 | .line 622 548 | new-instance p2, Lcom/librelink/app/core/AppError; 549 | 550 | @@ -1987,6 +2039,8 @@ 551 | :catch_e 552 | move-exception p3 553 | 554 | + invoke-static {p0, p3}, Lcom/librelink/app/ThirdPartyIntegration;->sendSensorNFCScanExceptionBroadcast(Lcom/librelink/app/ui/common/ScanSensorFragment;Ljava/lang/Throwable;)V 555 | + 556 | .line 616 557 | invoke-direct {p0, p1, p2}, Lcom/librelink/app/ui/common/ScanSensorFragment;->debounceTagDetection(Landroid/content/Context;Landroid/nfc/Tag;)V 558 | 559 | @@ -2138,6 +2192,22 @@ 560 | return-void 561 | .end method 562 | 563 | +.method public getSAS()Lcom/librelink/app/types/SAS; 564 | + .registers 2 565 | + 566 | + .prologue 567 | + .line 32 568 | + iget-object v0, p0, Lcom/librelink/app/ui/common/ScanSensorFragment;->sasProvider:Ljavax/inject/Provider; 569 | + 570 | + invoke-interface {v0}, Ljavax/inject/Provider;->get()Ljava/lang/Object; 571 | + 572 | + move-result-object v0 573 | + 574 | + check-cast v0, Lcom/librelink/app/types/SAS; 575 | + 576 | + return-object v0 577 | +.end method 578 | + 579 | .method public injectWith(Lcom/librelink/app/core/components/AppComponent;)V 580 | .locals 0 581 | 582 | -- 583 | 2.23.0 584 | 585 | -------------------------------------------------------------------------------- /sources/ThirdPartyIntegration.smali: -------------------------------------------------------------------------------- 1 | .class public Lcom/librelink/app/ThirdPartyIntegration; 2 | .super Ljava/lang/Object; 3 | .source "ThirdPartyIntegration.java" 4 | 5 | 6 | # static fields 7 | .field private static context:Landroid/content/Context; 8 | 9 | 10 | # direct methods 11 | .method public constructor ()V 12 | .registers 1 13 | 14 | .prologue 15 | .line 16 16 | invoke-direct {p0}, Ljava/lang/Object;->()V 17 | 18 | return-void 19 | .end method 20 | 21 | .method private static sendIntent(Landroid/content/Intent;)V 22 | .registers 2 23 | .param p0, "intent" # Landroid/content/Intent; 24 | 25 | .prologue 26 | .line 25 27 | const-string v0, "com.eveningoutpost.dexdrip" 28 | 29 | invoke-virtual {p0, v0}, Landroid/content/Intent;->setPackage(Ljava/lang/String;)Landroid/content/Intent; 30 | 31 | .line 26 32 | sget-object v0, Lcom/librelink/app/ThirdPartyIntegration;->context:Landroid/content/Context; 33 | 34 | invoke-virtual {v0, p0}, Landroid/content/Context;->sendBroadcast(Landroid/content/Intent;)V 35 | 36 | .line 35 37 | return-void 38 | .end method 39 | 40 | .method private static getBLEManagerFields(Lcom/librelink/app/core/BleManager;)Landroid/os/Bundle; 41 | .registers 4 42 | .param p0, "bleManager" # Lcom/librelink/app/core/BleManager; 43 | 44 | .prologue 45 | .line 92 46 | new-instance v0, Landroid/os/Bundle; 47 | 48 | invoke-direct {v0}, Landroid/os/Bundle;->()V 49 | 50 | .line 93 51 | .local v0, "bundle":Landroid/os/Bundle; 52 | const-string v1, "sensorSerial" 53 | 54 | invoke-virtual {p0}, Lcom/librelink/app/core/BleManager;->getSensorSerial()Ljava/lang/String; 55 | 56 | move-result-object v2 57 | 58 | invoke-virtual {v0, v1, v2}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V 59 | 60 | .line 94 61 | const-string v1, "sensorAddress" 62 | 63 | invoke-virtual {p0}, Lcom/librelink/app/core/BleManager;->getSensorAddress()Ljava/lang/String; 64 | 65 | move-result-object v2 66 | 67 | invoke-virtual {v0, v1, v2}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V 68 | 69 | .line 95 70 | return-object v0 71 | .end method 72 | 73 | .method private static getSASFields(Lcom/librelink/app/types/SAS;)Landroid/os/Bundle; 74 | .registers 9 75 | .param p0, "sas" # Lcom/librelink/app/types/SAS; 76 | 77 | .prologue 78 | const v7, 0x7fffffff 79 | 80 | const/4 v6, 0x1 81 | 82 | .line 77 83 | new-instance v0, Landroid/os/Bundle; 84 | 85 | invoke-direct {v0}, Landroid/os/Bundle;->()V 86 | 87 | .line 78 88 | .local v0, "bundle":Landroid/os/Bundle; 89 | invoke-interface {p0}, Lcom/librelink/app/types/SAS;->getCurrentlySelectedSensor()Lcom/abbottdiabetescare/flashglucose/sensorabstractionservice/Sensor; 90 | 91 | move-result-object v1 92 | 93 | .line 79 94 | .local v1, "sensor":Lcom/abbottdiabetescare/flashglucose/sensorabstractionservice/Sensor;, "Lcom/abbottdiabetescare/flashglucose/sensorabstractionservice/Sensor;" 95 | if-eqz v1, :cond_21 96 | 97 | .line 80 98 | const-string v2, "currentSensor" 99 | 100 | invoke-static {v1}, Lcom/librelink/app/ThirdPartyIntegration;->getSensorFields(Lcom/abbottdiabetescare/flashglucose/sensorabstractionservice/Sensor;)Landroid/os/Bundle; 101 | 102 | move-result-object v3 103 | 104 | invoke-virtual {v0, v2, v3}, Landroid/os/Bundle;->putBundle(Ljava/lang/String;Landroid/os/Bundle;)V 105 | 106 | .line 81 107 | const-string v2, "sensorStatusCode" 108 | 109 | invoke-interface {p0, v1}, Lcom/librelink/app/types/SAS;->getSensorStatusCode(Lcom/abbottdiabetescare/flashglucose/sensorabstractionservice/Sensor;)Ljava/lang/String; 110 | 111 | move-result-object v3 112 | 113 | invoke-virtual {v0, v2, v3}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V 114 | 115 | .line 83 116 | :cond_21 117 | const-string v2, "version" 118 | 119 | invoke-interface {p0}, Lcom/librelink/app/types/SAS;->getVersion()Ljava/lang/String; 120 | 121 | move-result-object v3 122 | 123 | invoke-virtual {v0, v2, v3}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V 124 | 125 | .line 84 126 | const-string v2, "realTimeGlucoseReadings" 127 | 128 | sget-object v3, Lorg/joda/time/DateTimeZone;->UTC:Lorg/joda/time/DateTimeZone; 129 | 130 | invoke-static {v3}, Lorg/joda/time/DateTime;->now(Lorg/joda/time/DateTimeZone;)Lorg/joda/time/DateTime; 131 | 132 | move-result-object v3 133 | 134 | invoke-virtual {v3, v6}, Lorg/joda/time/DateTime;->minusDays(I)Lorg/joda/time/DateTime; 135 | 136 | move-result-object v3 137 | 138 | sget-object v4, Lcom/abbottdiabetescare/flashglucose/sensorabstractionservice/TimestampType;->UTC:Lcom/abbottdiabetescare/flashglucose/sensorabstractionservice/TimestampType; 139 | 140 | sget-object v5, Lcom/abbottdiabetescare/flashglucose/sensorabstractionservice/ResultFilter;->ALL:Lcom/abbottdiabetescare/flashglucose/sensorabstractionservice/ResultFilter; 141 | 142 | invoke-interface {p0, v3, v4, v7, v5}, Lcom/librelink/app/types/SAS;->getRealTimeGlucoseReadingsAfter(Lorg/joda/time/DateTime;Lcom/abbottdiabetescare/flashglucose/sensorabstractionservice/TimestampType;ILcom/abbottdiabetescare/flashglucose/sensorabstractionservice/ResultFilter;)Ljava/util/List; 143 | 144 | move-result-object v3 145 | 146 | invoke-static {v3}, Lcom/librelink/app/ThirdPartyIntegration;->packRealTimeGlucoseReadings(Ljava/util/List;)Landroid/os/Bundle; 147 | 148 | move-result-object v3 149 | 150 | invoke-virtual {v0, v2, v3}, Landroid/os/Bundle;->putBundle(Ljava/lang/String;Landroid/os/Bundle;)V 151 | 152 | .line 86 153 | const-string v2, "historicGlucoseReadings" 154 | 155 | sget-object v3, Lorg/joda/time/DateTimeZone;->UTC:Lorg/joda/time/DateTimeZone; 156 | 157 | invoke-static {v3}, Lorg/joda/time/DateTime;->now(Lorg/joda/time/DateTimeZone;)Lorg/joda/time/DateTime; 158 | 159 | move-result-object v3 160 | 161 | invoke-virtual {v3, v6}, Lorg/joda/time/DateTime;->minusDays(I)Lorg/joda/time/DateTime; 162 | 163 | move-result-object v3 164 | 165 | sget-object v4, Lcom/abbottdiabetescare/flashglucose/sensorabstractionservice/TimestampType;->UTC:Lcom/abbottdiabetescare/flashglucose/sensorabstractionservice/TimestampType; 166 | 167 | sget-object v5, Lcom/abbottdiabetescare/flashglucose/sensorabstractionservice/ResultFilter;->ALL:Lcom/abbottdiabetescare/flashglucose/sensorabstractionservice/ResultFilter; 168 | 169 | invoke-interface {p0, v3, v4, v7, v5}, Lcom/librelink/app/types/SAS;->getHistoricGlucoseReadingsAfter(Lorg/joda/time/DateTime;Lcom/abbottdiabetescare/flashglucose/sensorabstractionservice/TimestampType;ILcom/abbottdiabetescare/flashglucose/sensorabstractionservice/ResultFilter;)Ljava/util/List; 170 | 171 | move-result-object v3 172 | 173 | invoke-static {v3}, Lcom/librelink/app/ThirdPartyIntegration;->packHistoricGlucoseReadings(Ljava/util/List;)Landroid/os/Bundle; 174 | 175 | move-result-object v3 176 | 177 | invoke-virtual {v0, v2, v3}, Landroid/os/Bundle;->putBundle(Ljava/lang/String;Landroid/os/Bundle;)V 178 | 179 | .line 88 180 | return-object v0 181 | .end method 182 | 183 | .method private static getSensorFields(Lcom/abbottdiabetescare/flashglucose/sensorabstractionservice/Sensor;)Landroid/os/Bundle; 184 | .registers 5 185 | .param p0, "sensor" # Lcom/abbottdiabetescare/flashglucose/sensorabstractionservice/Sensor; 186 | 187 | .prologue 188 | .line 38 189 | new-instance v0, Landroid/os/Bundle; 190 | 191 | invoke-direct {v0}, Landroid/os/Bundle;->()V 192 | 193 | .line 39 194 | .local v0, "bundle":Landroid/os/Bundle; 195 | const-string v1, "recordNumber" 196 | 197 | invoke-virtual {p0}, Lcom/abbottdiabetescare/flashglucose/sensorabstractionservice/Sensor;->getRecordNumber()I 198 | 199 | move-result v2 200 | 201 | invoke-virtual {v0, v1, v2}, Landroid/os/Bundle;->putInt(Ljava/lang/String;I)V 202 | 203 | .line 40 204 | const-string v1, "serialNumber" 205 | 206 | invoke-virtual {p0}, Lcom/abbottdiabetescare/flashglucose/sensorabstractionservice/Sensor;->getSerialNumber()Ljava/lang/String; 207 | 208 | move-result-object v2 209 | 210 | invoke-virtual {v0, v1, v2}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V 211 | 212 | .line 41 213 | const-string v1, "sensorStartTime" 214 | 215 | invoke-virtual {p0}, Lcom/abbottdiabetescare/flashglucose/sensorabstractionservice/Sensor;->getSensorStartTime()Ljava/util/Date; 216 | 217 | move-result-object v2 218 | 219 | invoke-virtual {v2}, Ljava/util/Date;->getTime()J 220 | 221 | move-result-wide v2 222 | 223 | invoke-virtual {v0, v1, v2, v3}, Landroid/os/Bundle;->putLong(Ljava/lang/String;J)V 224 | 225 | .line 42 226 | const-string v1, "streamingAvailable" 227 | 228 | invoke-virtual {p0}, Lcom/abbottdiabetescare/flashglucose/sensorabstractionservice/Sensor;->getStreamingAvailable()Z 229 | 230 | move-result v2 231 | 232 | invoke-virtual {v0, v1, v2}, Landroid/os/Bundle;->putBoolean(Ljava/lang/String;Z)V 233 | 234 | .line 43 235 | const-string v1, "warmUpEndTime" 236 | 237 | invoke-virtual {p0}, Lcom/abbottdiabetescare/flashglucose/sensorabstractionservice/Sensor;->getWarmupEndTime()Ljava/util/Date; 238 | 239 | move-result-object v2 240 | 241 | invoke-virtual {v2}, Ljava/util/Date;->getTime()J 242 | 243 | move-result-wide v2 244 | 245 | invoke-virtual {v0, v1, v2, v3}, Landroid/os/Bundle;->putLong(Ljava/lang/String;J)V 246 | 247 | .line 44 248 | const-string v1, "expireTime" 249 | 250 | invoke-virtual {p0}, Lcom/abbottdiabetescare/flashglucose/sensorabstractionservice/Sensor;->getExpireTime()Ljava/util/Date; 251 | 252 | move-result-object v2 253 | 254 | invoke-virtual {v2}, Ljava/util/Date;->getTime()J 255 | 256 | move-result-wide v2 257 | 258 | invoke-virtual {v0, v1, v2, v3}, Landroid/os/Bundle;->putLong(Ljava/lang/String;J)V 259 | 260 | .line 45 261 | const-string v1, "endedEarly" 262 | 263 | invoke-virtual {p0}, Lcom/abbottdiabetescare/flashglucose/sensorabstractionservice/Sensor;->getEndedEarly()Z 264 | 265 | move-result v2 266 | 267 | invoke-virtual {v0, v1, v2}, Landroid/os/Bundle;->putBoolean(Ljava/lang/String;Z)V 268 | 269 | .line 46 270 | return-object v0 271 | .end method 272 | 273 | .method private static getSensorGlucoseFields(Lcom/abbottdiabetescare/flashglucose/sensorabstractionservice/SensorGlucose;)Landroid/os/Bundle; 274 | .registers 7 275 | .annotation system Ldalvik/annotation/Signature; 276 | value = { 277 | "(", 278 | "Lcom/abbottdiabetescare/flashglucose/sensorabstractionservice/SensorGlucose", 279 | "<", 280 | "Lorg/joda/time/DateTime;", 281 | ">;)", 282 | "Landroid/os/Bundle;" 283 | } 284 | .end annotation 285 | 286 | .prologue 287 | .line 50 288 | .local p0, "sensorGlucose":Lcom/abbottdiabetescare/flashglucose/sensorabstractionservice/SensorGlucose;, "Lcom/abbottdiabetescare/flashglucose/sensorabstractionservice/SensorGlucose;" 289 | new-instance v0, Landroid/os/Bundle; 290 | 291 | invoke-direct {v0}, Landroid/os/Bundle;->()V 292 | 293 | .line 51 294 | .local v0, "bundle":Landroid/os/Bundle; 295 | const-string v1, "glucoseValue" 296 | 297 | invoke-interface {p0}, Lcom/abbottdiabetescare/flashglucose/sensorabstractionservice/SensorGlucose;->getGlucoseValue()D 298 | 299 | move-result-wide v2 300 | 301 | invoke-virtual {v0, v1, v2, v3}, Landroid/os/Bundle;->putDouble(Ljava/lang/String;D)V 302 | 303 | .line 52 304 | const-string v1, "millisSincePrevious" 305 | 306 | invoke-interface {p0}, Lcom/abbottdiabetescare/flashglucose/sensorabstractionservice/SensorGlucose;->getMillisecondsTimeChangeSincePrevious()J 307 | 308 | move-result-wide v2 309 | 310 | invoke-virtual {v0, v1, v2, v3}, Landroid/os/Bundle;->putLong(Ljava/lang/String;J)V 311 | 312 | .line 53 313 | const-string v1, "recordNumber" 314 | 315 | invoke-interface {p0}, Lcom/abbottdiabetescare/flashglucose/sensorabstractionservice/SensorGlucose;->getRecordNumber()I 316 | 317 | move-result v2 318 | 319 | invoke-virtual {v0, v1, v2}, Landroid/os/Bundle;->putInt(Ljava/lang/String;I)V 320 | 321 | .line 54 322 | const-string v1, "sensorSerial" 323 | 324 | invoke-interface {p0}, Lcom/abbottdiabetescare/flashglucose/sensorabstractionservice/SensorGlucose;->getSensor()Lcom/abbottdiabetescare/flashglucose/sensorabstractionservice/Sensor; 325 | 326 | move-result-object v2 327 | 328 | invoke-virtual {v2}, Lcom/abbottdiabetescare/flashglucose/sensorabstractionservice/Sensor;->getSerialNumber()Ljava/lang/String; 329 | 330 | move-result-object v2 331 | 332 | invoke-virtual {v0, v1, v2}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V 333 | 334 | .line 55 335 | const-string v2, "timestamp" 336 | 337 | invoke-interface {p0}, Lcom/abbottdiabetescare/flashglucose/sensorabstractionservice/SensorGlucose;->getTimestampUTC()Ljava/lang/Object; 338 | 339 | move-result-object v1 340 | 341 | check-cast v1, Lorg/joda/time/DateTime; 342 | 343 | invoke-virtual {v1}, Lorg/joda/time/DateTime;->toDate()Ljava/util/Date; 344 | 345 | move-result-object v1 346 | 347 | invoke-virtual {v1}, Ljava/util/Date;->getTime()J 348 | 349 | move-result-wide v4 350 | 351 | invoke-virtual {v0, v2, v4, v5}, Landroid/os/Bundle;->putLong(Ljava/lang/String;J)V 352 | 353 | .line 56 354 | const-string v1, "fromSelectedSensor" 355 | 356 | invoke-interface {p0}, Lcom/abbottdiabetescare/flashglucose/sensorabstractionservice/SensorGlucose;->isFromSelectedSensor()Z 357 | 358 | move-result v2 359 | 360 | invoke-virtual {v0, v1, v2}, Landroid/os/Bundle;->putBoolean(Ljava/lang/String;Z)V 361 | 362 | .line 57 363 | return-object v0 364 | .end method 365 | 366 | .method public static injectContext(Landroid/content/Context;)V 367 | .registers 1 368 | .param p0, "context" # Landroid/content/Context; 369 | 370 | .prologue 371 | .line 21 372 | sput-object p0, Lcom/librelink/app/ThirdPartyIntegration;->context:Landroid/content/Context; 373 | 374 | .line 22 375 | return-void 376 | .end method 377 | 378 | .method private static packHistoricGlucoseReadings(Ljava/util/List;)Landroid/os/Bundle; 379 | .registers 5 380 | .annotation system Ldalvik/annotation/Signature; 381 | value = { 382 | "(", 383 | "Ljava/util/List", 384 | "<", 385 | "Lcom/abbottdiabetescare/flashglucose/sensorabstractionservice/HistoricGlucose", 386 | "<", 387 | "Lorg/joda/time/DateTime;", 388 | ">;>;)", 389 | "Landroid/os/Bundle;" 390 | } 391 | .end annotation 392 | 393 | .prologue 394 | .line 61 395 | .local p0, "readings":Ljava/util/List;, "Ljava/util/List;>;" 396 | new-instance v0, Landroid/os/Bundle; 397 | 398 | invoke-direct {v0}, Landroid/os/Bundle;->()V 399 | 400 | .line 62 401 | .local v0, "bundle":Landroid/os/Bundle; 402 | const/4 v1, 0x0 403 | 404 | .local v1, "i":I 405 | :goto_6 406 | invoke-interface {p0}, Ljava/util/List;->size()I 407 | 408 | move-result v2 409 | 410 | if-ge v1, v2, :cond_20 411 | 412 | .line 63 413 | invoke-static {v1}, Ljava/lang/Integer;->toString(I)Ljava/lang/String; 414 | 415 | move-result-object v3 416 | 417 | invoke-interface {p0, v1}, Ljava/util/List;->get(I)Ljava/lang/Object; 418 | 419 | move-result-object v2 420 | 421 | check-cast v2, Lcom/abbottdiabetescare/flashglucose/sensorabstractionservice/SensorGlucose; 422 | 423 | invoke-static {v2}, Lcom/librelink/app/ThirdPartyIntegration;->getSensorGlucoseFields(Lcom/abbottdiabetescare/flashglucose/sensorabstractionservice/SensorGlucose;)Landroid/os/Bundle; 424 | 425 | move-result-object v2 426 | 427 | invoke-virtual {v0, v3, v2}, Landroid/os/Bundle;->putBundle(Ljava/lang/String;Landroid/os/Bundle;)V 428 | 429 | .line 62 430 | add-int/lit8 v1, v1, 0x1 431 | 432 | goto :goto_6 433 | 434 | .line 65 435 | :cond_20 436 | return-object v0 437 | .end method 438 | 439 | .method private static packRealTimeGlucoseReadings(Ljava/util/List;)Landroid/os/Bundle; 440 | .registers 5 441 | .annotation system Ldalvik/annotation/Signature; 442 | value = { 443 | "(", 444 | "Ljava/util/List", 445 | "<", 446 | "Lcom/abbottdiabetescare/flashglucose/sensorabstractionservice/RealTimeGlucose", 447 | "<", 448 | "Lorg/joda/time/DateTime;", 449 | ">;>;)", 450 | "Landroid/os/Bundle;" 451 | } 452 | .end annotation 453 | 454 | .prologue 455 | .line 69 456 | .local p0, "readings":Ljava/util/List;, "Ljava/util/List;>;" 457 | new-instance v0, Landroid/os/Bundle; 458 | 459 | invoke-direct {v0}, Landroid/os/Bundle;->()V 460 | 461 | .line 70 462 | .local v0, "bundle":Landroid/os/Bundle; 463 | const/4 v1, 0x0 464 | 465 | .local v1, "i":I 466 | :goto_6 467 | invoke-interface {p0}, Ljava/util/List;->size()I 468 | 469 | move-result v2 470 | 471 | if-ge v1, v2, :cond_20 472 | 473 | .line 71 474 | invoke-static {v1}, Ljava/lang/Integer;->toString(I)Ljava/lang/String; 475 | 476 | move-result-object v3 477 | 478 | invoke-interface {p0, v1}, Ljava/util/List;->get(I)Ljava/lang/Object; 479 | 480 | move-result-object v2 481 | 482 | check-cast v2, Lcom/abbottdiabetescare/flashglucose/sensorabstractionservice/SensorGlucose; 483 | 484 | invoke-static {v2}, Lcom/librelink/app/ThirdPartyIntegration;->getSensorGlucoseFields(Lcom/abbottdiabetescare/flashglucose/sensorabstractionservice/SensorGlucose;)Landroid/os/Bundle; 485 | 486 | move-result-object v2 487 | 488 | invoke-virtual {v0, v3, v2}, Landroid/os/Bundle;->putBundle(Ljava/lang/String;Landroid/os/Bundle;)V 489 | 490 | .line 70 491 | add-int/lit8 v1, v1, 0x1 492 | 493 | goto :goto_6 494 | 495 | .line 73 496 | :cond_20 497 | return-object v0 498 | .end method 499 | 500 | .method public static sendCharacteristicValueBroadcast(Lcom/librelink/app/core/BleManager;[B)V 501 | .registers 5 502 | .param p0, "bleManager" # Lcom/librelink/app/core/BleManager; 503 | .param p1, "bytes" # [B 504 | 505 | .prologue 506 | .line 175 507 | new-instance v0, Landroid/content/Intent; 508 | 509 | const-string v1, "com.librelink.app.ThirdPartyIntegration.CHARACTERISTIC_VALUE" 510 | 511 | invoke-direct {v0, v1}, Landroid/content/Intent;->(Ljava/lang/String;)V 512 | 513 | .line 176 514 | .local v0, "intent":Landroid/content/Intent; 515 | const-string v1, "bytes" 516 | 517 | invoke-virtual {v0, v1, p1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;[B)Landroid/content/Intent; 518 | 519 | .line 177 520 | const-string v1, "bleManager" 521 | 522 | invoke-static {p0}, Lcom/librelink/app/ThirdPartyIntegration;->getBLEManagerFields(Lcom/librelink/app/core/BleManager;)Landroid/os/Bundle; 523 | 524 | move-result-object v2 525 | 526 | invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/Bundle;)Landroid/content/Intent; 527 | 528 | .line 178 529 | const-string v1, "sas" 530 | 531 | invoke-virtual {p0}, Lcom/librelink/app/core/BleManager;->getSAS()Lcom/librelink/app/types/SAS; 532 | 533 | move-result-object v2 534 | 535 | invoke-static {v2}, Lcom/librelink/app/ThirdPartyIntegration;->getSASFields(Lcom/librelink/app/types/SAS;)Landroid/os/Bundle; 536 | 537 | move-result-object v2 538 | 539 | invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/Bundle;)Landroid/content/Intent; 540 | 541 | .line 179 542 | invoke-static {v0}, Lcom/librelink/app/ThirdPartyIntegration;->sendIntent(Landroid/content/Intent;)V 543 | 544 | .line 180 545 | return-void 546 | .end method 547 | 548 | .method public static sendConnectionStateBroadcast(Lcom/librelink/app/core/BleManager;I)V 549 | .registers 6 550 | .param p0, "bleManager" # Lcom/librelink/app/core/BleManager; 551 | .param p1, "connectionState" # I 552 | 553 | .prologue 554 | .line 115 555 | new-instance v0, Landroid/content/Intent; 556 | 557 | const-string v2, "com.librelink.app.ThirdPartyIntegration.CONNECTION_STATE" 558 | 559 | invoke-direct {v0, v2}, Landroid/content/Intent;->(Ljava/lang/String;)V 560 | 561 | .line 116 562 | .local v0, "intent":Landroid/content/Intent; 563 | const/4 v1, 0x0 564 | 565 | .line 117 566 | .local v1, "state":Ljava/lang/String; 567 | packed-switch p1, :pswitch_data_36 568 | 569 | .line 131 570 | :goto_b 571 | const-string v2, "connectionState" 572 | 573 | invoke-virtual {v0, v2, v1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent; 574 | 575 | .line 132 576 | const-string v2, "bleManager" 577 | 578 | invoke-static {p0}, Lcom/librelink/app/ThirdPartyIntegration;->getBLEManagerFields(Lcom/librelink/app/core/BleManager;)Landroid/os/Bundle; 579 | 580 | move-result-object v3 581 | 582 | invoke-virtual {v0, v2, v3}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/Bundle;)Landroid/content/Intent; 583 | 584 | .line 133 585 | const-string v2, "sas" 586 | 587 | invoke-virtual {p0}, Lcom/librelink/app/core/BleManager;->getSAS()Lcom/librelink/app/types/SAS; 588 | 589 | move-result-object v3 590 | 591 | invoke-static {v3}, Lcom/librelink/app/ThirdPartyIntegration;->getSASFields(Lcom/librelink/app/types/SAS;)Landroid/os/Bundle; 592 | 593 | move-result-object v3 594 | 595 | invoke-virtual {v0, v2, v3}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/Bundle;)Landroid/content/Intent; 596 | 597 | .line 134 598 | invoke-static {v0}, Lcom/librelink/app/ThirdPartyIntegration;->sendIntent(Landroid/content/Intent;)V 599 | 600 | .line 135 601 | return-void 602 | 603 | .line 119 604 | :pswitch_2a 605 | const-string v1, "DISCONNECTED" 606 | 607 | .line 120 608 | goto :goto_b 609 | 610 | .line 122 611 | :pswitch_2d 612 | const-string v1, "DISCONNECTING" 613 | 614 | .line 123 615 | goto :goto_b 616 | 617 | .line 125 618 | :pswitch_30 619 | const-string v1, "CONNECTING" 620 | 621 | .line 126 622 | goto :goto_b 623 | 624 | .line 128 625 | :pswitch_33 626 | const-string v1, "CONNECTED" 627 | 628 | goto :goto_b 629 | 630 | .line 117 631 | :pswitch_data_36 632 | .packed-switch 0x0 633 | :pswitch_2a 634 | :pswitch_30 635 | :pswitch_33 636 | :pswitch_2d 637 | .end packed-switch 638 | .end method 639 | 640 | .method public static sendFoundDeviceBroadcast(Lcom/librelink/app/core/BleManager;)V 641 | .registers 4 642 | .param p0, "bleManager" # Lcom/librelink/app/core/BleManager; 643 | 644 | .prologue 645 | .line 108 646 | new-instance v0, Landroid/content/Intent; 647 | 648 | const-string v1, "com.librelink.app.ThirdPartyIntegration.FOUND_DEVICE" 649 | 650 | invoke-direct {v0, v1}, Landroid/content/Intent;->(Ljava/lang/String;)V 651 | 652 | .line 109 653 | .local v0, "intent":Landroid/content/Intent; 654 | const-string v1, "bleManager" 655 | 656 | invoke-static {p0}, Lcom/librelink/app/ThirdPartyIntegration;->getBLEManagerFields(Lcom/librelink/app/core/BleManager;)Landroid/os/Bundle; 657 | 658 | move-result-object v2 659 | 660 | invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/Bundle;)Landroid/content/Intent; 661 | 662 | .line 110 663 | const-string v1, "sas" 664 | 665 | invoke-virtual {p0}, Lcom/librelink/app/core/BleManager;->getSAS()Lcom/librelink/app/types/SAS; 666 | 667 | move-result-object v2 668 | 669 | invoke-static {v2}, Lcom/librelink/app/ThirdPartyIntegration;->getSASFields(Lcom/librelink/app/types/SAS;)Landroid/os/Bundle; 670 | 671 | move-result-object v2 672 | 673 | invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/Bundle;)Landroid/content/Intent; 674 | 675 | .line 111 676 | invoke-static {v0}, Lcom/librelink/app/ThirdPartyIntegration;->sendIntent(Landroid/content/Intent;)V 677 | 678 | .line 112 679 | return-void 680 | .end method 681 | 682 | .method public static sendGlucoseBroadcast(Lcom/librelink/app/core/BleManager;Lcom/abbottdiabetescare/flashglucose/sensorabstractionservice/CurrentGlucose;)V 683 | .registers 8 684 | .param p0, "bleManager" # Lcom/librelink/app/core/BleManager; 685 | .param p1, "currentGlucose" # Lcom/abbottdiabetescare/flashglucose/sensorabstractionservice/CurrentGlucose; 686 | 687 | .prologue 688 | .line 99 689 | new-instance v0, Landroid/content/Intent; 690 | 691 | const-string v1, "com.librelink.app.ThirdPartyIntegration.GLUCOSE_READING" 692 | 693 | invoke-direct {v0, v1}, Landroid/content/Intent;->(Ljava/lang/String;)V 694 | 695 | .line 100 696 | .local v0, "intent":Landroid/content/Intent; 697 | const-string v1, "glucose" 698 | 699 | invoke-virtual {p1}, Lcom/abbottdiabetescare/flashglucose/sensorabstractionservice/CurrentGlucose;->getGlucoseValue()D 700 | 701 | move-result-wide v2 702 | 703 | invoke-virtual {v0, v1, v2, v3}, Landroid/content/Intent;->putExtra(Ljava/lang/String;D)Landroid/content/Intent; 704 | 705 | .line 101 706 | const-string v2, "timestamp" 707 | 708 | invoke-virtual {p1}, Lcom/abbottdiabetescare/flashglucose/sensorabstractionservice/CurrentGlucose;->getTimestampUTC()Ljava/lang/Object; 709 | 710 | move-result-object v1 711 | 712 | check-cast v1, Lorg/joda/time/DateTime; 713 | 714 | invoke-virtual {v1}, Lorg/joda/time/DateTime;->toDate()Ljava/util/Date; 715 | 716 | move-result-object v1 717 | 718 | invoke-virtual {v1}, Ljava/util/Date;->getTime()J 719 | 720 | move-result-wide v4 721 | 722 | invoke-virtual {v0, v2, v4, v5}, Landroid/content/Intent;->putExtra(Ljava/lang/String;J)Landroid/content/Intent; 723 | 724 | .line 102 725 | const-string v1, "bleManager" 726 | 727 | invoke-static {p0}, Lcom/librelink/app/ThirdPartyIntegration;->getBLEManagerFields(Lcom/librelink/app/core/BleManager;)Landroid/os/Bundle; 728 | 729 | move-result-object v2 730 | 731 | invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/Bundle;)Landroid/content/Intent; 732 | 733 | .line 103 734 | const-string v1, "sas" 735 | 736 | invoke-virtual {p0}, Lcom/librelink/app/core/BleManager;->getSAS()Lcom/librelink/app/types/SAS; 737 | 738 | move-result-object v2 739 | 740 | invoke-static {v2}, Lcom/librelink/app/ThirdPartyIntegration;->getSASFields(Lcom/librelink/app/types/SAS;)Landroid/os/Bundle; 741 | 742 | move-result-object v2 743 | 744 | invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/Bundle;)Landroid/content/Intent; 745 | 746 | .line 104 747 | invoke-static {v0}, Lcom/librelink/app/ThirdPartyIntegration;->sendIntent(Landroid/content/Intent;)V 748 | 749 | .line 105 750 | return-void 751 | .end method 752 | 753 | .method public static sendInitializeBluetoothBroadcast(Lcom/librelink/app/core/BleManager;)V 754 | .registers 4 755 | .param p0, "bleManager" # Lcom/librelink/app/core/BleManager; 756 | 757 | .prologue 758 | .line 168 759 | new-instance v0, Landroid/content/Intent; 760 | 761 | const-string v1, "com.librelink.app.ThirdPartyIntegration.INITIALIZE_BLUETOOTH" 762 | 763 | invoke-direct {v0, v1}, Landroid/content/Intent;->(Ljava/lang/String;)V 764 | 765 | .line 169 766 | .local v0, "intent":Landroid/content/Intent; 767 | const-string v1, "bleManager" 768 | 769 | invoke-static {p0}, Lcom/librelink/app/ThirdPartyIntegration;->getBLEManagerFields(Lcom/librelink/app/core/BleManager;)Landroid/os/Bundle; 770 | 771 | move-result-object v2 772 | 773 | invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/Bundle;)Landroid/content/Intent; 774 | 775 | .line 170 776 | const-string v1, "sas" 777 | 778 | invoke-virtual {p0}, Lcom/librelink/app/core/BleManager;->getSAS()Lcom/librelink/app/types/SAS; 779 | 780 | move-result-object v2 781 | 782 | invoke-static {v2}, Lcom/librelink/app/ThirdPartyIntegration;->getSASFields(Lcom/librelink/app/types/SAS;)Landroid/os/Bundle; 783 | 784 | move-result-object v2 785 | 786 | invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/Bundle;)Landroid/content/Intent; 787 | 788 | .line 171 789 | invoke-static {v0}, Lcom/librelink/app/ThirdPartyIntegration;->sendIntent(Landroid/content/Intent;)V 790 | 791 | .line 172 792 | return-void 793 | .end method 794 | 795 | .method public static sendRSSIBroadcast(Lcom/librelink/app/core/BleManager;I)V 796 | .registers 5 797 | .param p0, "bleManager" # Lcom/librelink/app/core/BleManager; 798 | .param p1, "rssi" # I 799 | 800 | .prologue 801 | .line 138 802 | new-instance v0, Landroid/content/Intent; 803 | 804 | const-string v1, "com.librelink.app.ThirdPartyIntegration.RSSI" 805 | 806 | invoke-direct {v0, v1}, Landroid/content/Intent;->(Ljava/lang/String;)V 807 | 808 | .line 139 809 | .local v0, "intent":Landroid/content/Intent; 810 | const-string v1, "rssi" 811 | 812 | invoke-virtual {v0, v1, p1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;I)Landroid/content/Intent; 813 | 814 | .line 140 815 | const-string v1, "bleManager" 816 | 817 | invoke-static {p0}, Lcom/librelink/app/ThirdPartyIntegration;->getBLEManagerFields(Lcom/librelink/app/core/BleManager;)Landroid/os/Bundle; 818 | 819 | move-result-object v2 820 | 821 | invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/Bundle;)Landroid/content/Intent; 822 | 823 | .line 141 824 | const-string v1, "sas" 825 | 826 | invoke-virtual {p0}, Lcom/librelink/app/core/BleManager;->getSAS()Lcom/librelink/app/types/SAS; 827 | 828 | move-result-object v2 829 | 830 | invoke-static {v2}, Lcom/librelink/app/ThirdPartyIntegration;->getSASFields(Lcom/librelink/app/types/SAS;)Landroid/os/Bundle; 831 | 832 | move-result-object v2 833 | 834 | invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/Bundle;)Landroid/content/Intent; 835 | 836 | .line 142 837 | invoke-static {v0}, Lcom/librelink/app/ThirdPartyIntegration;->sendIntent(Landroid/content/Intent;)V 838 | 839 | .line 143 840 | return-void 841 | .end method 842 | 843 | .method public static sendSensorActivateBroadcast(Lcom/librelink/app/ui/common/ScanSensorFragment;Lcom/abbottdiabetescare/flashglucose/sensorabstractionservice/Sensor;)V 844 | .registers 5 845 | .param p0, "fragment" # Lcom/librelink/app/ui/common/ScanSensorFragment; 846 | .annotation system Ldalvik/annotation/Signature; 847 | value = { 848 | "(", 849 | "Lcom/librelink/app/ui/common/ScanSensorFragment;", 850 | "Lcom/abbottdiabetescare/flashglucose/sensorabstractionservice/Sensor", 851 | "<", 852 | "Lorg/joda/time/DateTime;", 853 | ">;)V" 854 | } 855 | .end annotation 856 | 857 | .prologue 858 | .line 190 859 | .local p1, "sensor":Lcom/abbottdiabetescare/flashglucose/sensorabstractionservice/Sensor;, "Lcom/abbottdiabetescare/flashglucose/sensorabstractionservice/Sensor;" 860 | new-instance v0, Landroid/content/Intent; 861 | 862 | const-string v1, "com.librelink.app.ThirdPartyIntegration.SENSOR_ACTIVATE" 863 | 864 | invoke-direct {v0, v1}, Landroid/content/Intent;->(Ljava/lang/String;)V 865 | 866 | .line 191 867 | .local v0, "intent":Landroid/content/Intent; 868 | const-string v1, "sensor" 869 | 870 | invoke-static {p1}, Lcom/librelink/app/ThirdPartyIntegration;->getSensorFields(Lcom/abbottdiabetescare/flashglucose/sensorabstractionservice/Sensor;)Landroid/os/Bundle; 871 | 872 | move-result-object v2 873 | 874 | invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/Bundle;)Landroid/content/Intent; 875 | 876 | .line 192 877 | const-string v1, "sas" 878 | 879 | invoke-virtual {p0}, Lcom/librelink/app/ui/common/ScanSensorFragment;->getSAS()Lcom/librelink/app/types/SAS; 880 | 881 | move-result-object v2 882 | 883 | invoke-static {v2}, Lcom/librelink/app/ThirdPartyIntegration;->getSASFields(Lcom/librelink/app/types/SAS;)Landroid/os/Bundle; 884 | 885 | move-result-object v2 886 | 887 | invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/Bundle;)Landroid/content/Intent; 888 | 889 | .line 193 890 | invoke-static {v0}, Lcom/librelink/app/ThirdPartyIntegration;->sendIntent(Landroid/content/Intent;)V 891 | 892 | .line 194 893 | return-void 894 | .end method 895 | 896 | .method public static sendSensorBLEExceptionBroadcast(Lcom/librelink/app/core/BleManager;Ljava/lang/Throwable;)V 897 | .registers 5 898 | .param p0, "bleManager" # Lcom/librelink/app/core/BleManager; 899 | .param p1, "exception" # Ljava/lang/Throwable; 900 | 901 | .prologue 902 | .line 146 903 | new-instance v0, Landroid/content/Intent; 904 | 905 | const-string v1, "com.librelink.app.ThirdPartyIntegration.SENSOR_BLE_EXCEPTION" 906 | 907 | invoke-direct {v0, v1}, Landroid/content/Intent;->(Ljava/lang/String;)V 908 | 909 | .line 147 910 | .local v0, "intent":Landroid/content/Intent; 911 | const-string v1, "exceptionType" 912 | 913 | invoke-virtual {p1}, Ljava/lang/Object;->getClass()Ljava/lang/Class; 914 | 915 | move-result-object v2 916 | 917 | invoke-virtual {v2}, Ljava/lang/Class;->getCanonicalName()Ljava/lang/String; 918 | 919 | move-result-object v2 920 | 921 | invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent; 922 | 923 | .line 148 924 | const-string v1, "bleManager" 925 | 926 | invoke-static {p0}, Lcom/librelink/app/ThirdPartyIntegration;->getBLEManagerFields(Lcom/librelink/app/core/BleManager;)Landroid/os/Bundle; 927 | 928 | move-result-object v2 929 | 930 | invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/Bundle;)Landroid/content/Intent; 931 | 932 | .line 149 933 | const-string v1, "sas" 934 | 935 | invoke-virtual {p0}, Lcom/librelink/app/core/BleManager;->getSAS()Lcom/librelink/app/types/SAS; 936 | 937 | move-result-object v2 938 | 939 | invoke-static {v2}, Lcom/librelink/app/ThirdPartyIntegration;->getSASFields(Lcom/librelink/app/types/SAS;)Landroid/os/Bundle; 940 | 941 | move-result-object v2 942 | 943 | invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/Bundle;)Landroid/content/Intent; 944 | 945 | .line 150 946 | invoke-static {v0}, Lcom/librelink/app/ThirdPartyIntegration;->sendIntent(Landroid/content/Intent;)V 947 | 948 | .line 151 949 | return-void 950 | .end method 951 | 952 | .method public static sendSensorNFCActivateExceptionBroadcast(Lcom/librelink/app/ui/common/ScanSensorFragment;Ljava/lang/Throwable;)V 953 | .registers 5 954 | .param p0, "fragment" # Lcom/librelink/app/ui/common/ScanSensorFragment; 955 | .param p1, "exception" # Ljava/lang/Throwable; 956 | 957 | .prologue 958 | .line 161 959 | new-instance v0, Landroid/content/Intent; 960 | 961 | const-string v1, "com.librelink.app.ThirdPartyIntegration.SENSOR_NFC_ACTIVATE_EXCEPTION" 962 | 963 | invoke-direct {v0, v1}, Landroid/content/Intent;->(Ljava/lang/String;)V 964 | 965 | .line 162 966 | .local v0, "intent":Landroid/content/Intent; 967 | const-string v1, "exceptionType" 968 | 969 | invoke-virtual {p1}, Ljava/lang/Object;->getClass()Ljava/lang/Class; 970 | 971 | move-result-object v2 972 | 973 | invoke-virtual {v2}, Ljava/lang/Class;->getCanonicalName()Ljava/lang/String; 974 | 975 | move-result-object v2 976 | 977 | invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent; 978 | 979 | .line 163 980 | const-string v1, "sas" 981 | 982 | invoke-virtual {p0}, Lcom/librelink/app/ui/common/ScanSensorFragment;->getSAS()Lcom/librelink/app/types/SAS; 983 | 984 | move-result-object v2 985 | 986 | invoke-static {v2}, Lcom/librelink/app/ThirdPartyIntegration;->getSASFields(Lcom/librelink/app/types/SAS;)Landroid/os/Bundle; 987 | 988 | move-result-object v2 989 | 990 | invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/Bundle;)Landroid/content/Intent; 991 | 992 | .line 164 993 | invoke-static {v0}, Lcom/librelink/app/ThirdPartyIntegration;->sendIntent(Landroid/content/Intent;)V 994 | 995 | .line 165 996 | return-void 997 | .end method 998 | 999 | .method public static sendSensorNFCScanExceptionBroadcast(Lcom/librelink/app/ui/common/ScanSensorFragment;Ljava/lang/Throwable;)V 1000 | .registers 5 1001 | .param p0, "fragment" # Lcom/librelink/app/ui/common/ScanSensorFragment; 1002 | .param p1, "exception" # Ljava/lang/Throwable; 1003 | 1004 | .prologue 1005 | .line 154 1006 | new-instance v0, Landroid/content/Intent; 1007 | 1008 | const-string v1, "com.librelink.app.ThirdPartyIntegration.SENSOR_NFC_SCAN_EXCEPTION" 1009 | 1010 | invoke-direct {v0, v1}, Landroid/content/Intent;->(Ljava/lang/String;)V 1011 | 1012 | .line 155 1013 | .local v0, "intent":Landroid/content/Intent; 1014 | const-string v1, "exceptionType" 1015 | 1016 | invoke-virtual {p1}, Ljava/lang/Object;->getClass()Ljava/lang/Class; 1017 | 1018 | move-result-object v2 1019 | 1020 | invoke-virtual {v2}, Ljava/lang/Class;->getCanonicalName()Ljava/lang/String; 1021 | 1022 | move-result-object v2 1023 | 1024 | invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent; 1025 | 1026 | .line 156 1027 | const-string v1, "sas" 1028 | 1029 | invoke-virtual {p0}, Lcom/librelink/app/ui/common/ScanSensorFragment;->getSAS()Lcom/librelink/app/types/SAS; 1030 | 1031 | move-result-object v2 1032 | 1033 | invoke-static {v2}, Lcom/librelink/app/ThirdPartyIntegration;->getSASFields(Lcom/librelink/app/types/SAS;)Landroid/os/Bundle; 1034 | 1035 | move-result-object v2 1036 | 1037 | invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/Bundle;)Landroid/content/Intent; 1038 | 1039 | .line 157 1040 | invoke-static {v0}, Lcom/librelink/app/ThirdPartyIntegration;->sendIntent(Landroid/content/Intent;)V 1041 | 1042 | .line 158 1043 | return-void 1044 | .end method 1045 | 1046 | .method public static sendSensorScanBroadcast(Lcom/librelink/app/ui/common/ScanSensorFragment;Lcom/abbottdiabetescare/flashglucose/sensorabstractionservice/Sensor;)V 1047 | .registers 5 1048 | .param p0, "fragment" # Lcom/librelink/app/ui/common/ScanSensorFragment; 1049 | .annotation system Ldalvik/annotation/Signature; 1050 | value = { 1051 | "(", 1052 | "Lcom/librelink/app/ui/common/ScanSensorFragment;", 1053 | "Lcom/abbottdiabetescare/flashglucose/sensorabstractionservice/Sensor", 1054 | "<", 1055 | "Lorg/joda/time/DateTime;", 1056 | ">;)V" 1057 | } 1058 | .end annotation 1059 | 1060 | .prologue 1061 | .line 183 1062 | .local p1, "sensor":Lcom/abbottdiabetescare/flashglucose/sensorabstractionservice/Sensor;, "Lcom/abbottdiabetescare/flashglucose/sensorabstractionservice/Sensor;" 1063 | new-instance v0, Landroid/content/Intent; 1064 | 1065 | const-string v1, "com.librelink.app.ThirdPartyIntegration.SENSOR_SCAN" 1066 | 1067 | invoke-direct {v0, v1}, Landroid/content/Intent;->(Ljava/lang/String;)V 1068 | 1069 | .line 184 1070 | .local v0, "intent":Landroid/content/Intent; 1071 | const-string v1, "sensor" 1072 | 1073 | invoke-static {p1}, Lcom/librelink/app/ThirdPartyIntegration;->getSensorFields(Lcom/abbottdiabetescare/flashglucose/sensorabstractionservice/Sensor;)Landroid/os/Bundle; 1074 | 1075 | move-result-object v2 1076 | 1077 | invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/Bundle;)Landroid/content/Intent; 1078 | 1079 | .line 185 1080 | const-string v1, "sas" 1081 | 1082 | invoke-virtual {p0}, Lcom/librelink/app/ui/common/ScanSensorFragment;->getSAS()Lcom/librelink/app/types/SAS; 1083 | 1084 | move-result-object v2 1085 | 1086 | invoke-static {v2}, Lcom/librelink/app/ThirdPartyIntegration;->getSASFields(Lcom/librelink/app/types/SAS;)Landroid/os/Bundle; 1087 | 1088 | move-result-object v2 1089 | 1090 | invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/Bundle;)Landroid/content/Intent; 1091 | 1092 | .line 186 1093 | invoke-static {v0}, Lcom/librelink/app/ThirdPartyIntegration;->sendIntent(Landroid/content/Intent;)V 1094 | 1095 | .line 187 1096 | return-void 1097 | .end method 1098 | -------------------------------------------------------------------------------- /ToDo/LibreView/0002-Disable-uplink-features.patch: -------------------------------------------------------------------------------- 1 | From 71814c02d7a3d27c62fe391f8579610841f39366 Mon Sep 17 00:00:00 2001 2 | From: smos 3 | Date: Mon, 23 Sep 2019 13:48:35 +0200 4 | Subject: [PATCH 2/2] Disable uplink features 5 | 6 | --- 7 | AndroidManifest.xml | 51 ------ 8 | res/layout/eventlog_activity.xml | 2 +- 9 | res/menu/default_menu.xml | 2 - 10 | res/menu/navdrawer.xml | 1 - 11 | .../com/librelink/app/core/App.smali | 35 ---- 12 | .../app/core/App_MembersInjector.smali | 33 ---- 13 | .../com/librelink/app/core/BleManager$3.smali | 1 - 14 | .../com/librelink/app/core/BleManager$5.smali | 2 + 15 | .../com/librelink/app/core/BleManager.smali | 1 - 16 | .../com/librelink/app/core/FirebaseTree.smali | 55 ------ 17 | .../app/core/PatchEventFirebaseUploader.smali | 54 +----- 18 | .../core/components/DaggerAppComponent.smali | 26 --- 19 | .../app/core/modules/AppModule$2$1.smali | 13 +- 20 | .../app/core/modules/AppModule$2.smali | 20 +- 21 | .../app/core/modules/AppModule.smali | 173 +----------------- 22 | .../ApplicationConfigurationValues.smali | 3 +- 23 | .../app/ui/common/ScanSensorActivity.smali | 86 --------- 24 | .../app/ui/help/EventLogActivity.smali | 7 - 25 | .../librelink/app/ui/help/HelpActivity.smali | 40 ---- 26 | 19 files changed, 16 insertions(+), 589 deletions(-) 27 | 28 | diff --git a/AndroidManifest.xml b/AndroidManifest.xml 29 | index 4d1e9bfa..d6902491 100644 30 | --- a/AndroidManifest.xml 31 | +++ b/AndroidManifest.xml 32 | @@ -3,9 +3,6 @@ 33 | 34 | 35 | 36 | - 37 | - 38 | - 39 | 40 | 41 | 42 | @@ -111,21 +108,6 @@ 43 | 44 | 45 | 46 | - 47 | - 48 | - 49 | - 50 | - 51 | - 52 | - 53 | - 54 | - 55 | - 56 | - 57 | - 58 | - 59 | - 60 | - 61 | 62 | 63 | 64 | @@ -134,33 +116,6 @@ 65 | 66 | 67 | 68 | - 69 | - 70 | - 71 | - 72 | - 73 | - 74 | - 75 | - 76 | - 77 | - 78 | - 79 | - 80 | - 81 | - 82 | - 83 | - 84 | - 85 | - 86 | - 87 | - 88 | - 89 | - 90 | - 91 | - 92 | - 93 | - 94 | - 95 | 96 | 97 | 98 | @@ -178,12 +133,6 @@ 99 | 100 | 101 | 102 | - 103 | - 104 | - 105 | - 106 | - 107 | 108 | - 109 | 110 | 111 | \ No newline at end of file 112 | diff --git a/res/layout/eventlog_activity.xml b/res/layout/eventlog_activity.xml 113 | index c2d29013..33d21c57 100644 114 | --- a/res/layout/eventlog_activity.xml 115 | +++ b/res/layout/eventlog_activity.xml 116 | @@ -4,7 +4,7 @@ 117 | 118 | 119 | 120 | - 121 | + 122 |