[GUIDE] How To Add Contacts, Tasks, And Apps Edge Panel | Galaxy Note 5 | Marshmallow

Search This thread

zfk110

Senior Member
  • Jan 11, 2014
    996
    199
    Atlanta
    Did you already refer to my post about access$xxxx a few posts back?
    I will add what our access$3400 looks like to that post so you can compare to yours and get yours to call the proper access$xxxx.

    Edit:
    And I don't see any fatal errors in your log. I see other errors related to edge but not sure if you got the fatal one.

    Hi, @tdunham

    I got question, I was able to load this to my Tab A running MM it went all the way it said its loading android apps from 1 to 196 after finishing 196 then it said starting apps, after that it restart the tab and now its sitting on Samsung logo, from two hours, I dont know how to pull log.xml for error, could you please tell me so I can post the log so you can look into it.

    I didn't have any recompiling errors
     

    Top Liked Posts

    • There are no posts matching your filters.
    • 47
      Hello to all Developers and XDA members! I have come here to give you a guide on how to add contacts, tasks, and apps edge panel on your Galaxy Note 5 device and maybe some other devices as well so here is how you can do it!

      What Is Required...
      ★ First you need to have experience and know how to decompile/recompile apks with Apktools, apkmanager, smali, and baksmali
      ★ Have 7-zip installed onto your computer/laptop
      ★ Make sure you have Notepad++ also installed!

      ★HOW TO ADD CONTACTS, TASKS, AND APPS EDGE PANEL★

      WHAT DOES THIS MOD DO: This mod will let you add contacts, tasks, and apps edge panel on your non edge/edge+ Samsung device. (On Marshmallow Firmware).

      ★ First go into your system/etc folder and find the "floating_feature.xml"

      Now open up "floating_feature.xml" with notepad++ for editing.

      SEARCH FOR:

      Code:
          <SEC_FLOATING_FEATURE_COMMON_CONFIG_EDGE></SEC_FLOATING_FEATURE_COMMON_CONFIG_EDGE>
          <SEC_FLOATING_FEATURE_COMMON_CONFIG_EDGE_STRIPE></SEC_FLOATING_FEATURE_COMMON_CONFIG_EDGE_STRIPE>

      NOW CHANGE THEM TO:

      Code:
          <SEC_FLOATING_FEATURE_COMMON_CONFIG_EDGE>people,task,circle,panel</SEC_FLOATING_FEATURE_COMMON_CONFIG_EDGE>
          <SEC_FLOATING_FEATURE_COMMON_CONFIG_EDGE_STRIPE>-1</SEC_FLOATING_FEATURE_COMMON_CONFIG_EDGE_STRIPE>

      ★ Now go into your system/framework folder and take out your "services.jar"
      ★ Now decompile/baksmali services.jar, then navigate to:

      smali/com/android/server/SystemServer.smali

      Now open up "SystemServer.smali" with notepad++ for editing.

      Now for this part of this guide what I have highlighted in "GREEN" text is what you have to find using Notepad++, And what you see in "BLUE" are the line(s) you have to make changes to:

      SEARCH FOR:

      Code:
      [COLOR="Green"]    const-string/jumbo v6, "spengestureservice"[/COLOR]

      YOU SHOULD SEE SOMETHING LIKE THIS:

      Code:
          const-string/jumbo v6, "spengestureservice"
      
          new-instance v7, Lcom/android/server/smartclip/SpenGestureManagerService;
      
          move-object/from16 v0, v206
      
          invoke-direct {v7, v5, v0}, Lcom/android/server/smartclip/SpenGestureManagerService;-><init>(Landroid/content/Context;Lcom/android/server/wm/WindowManagerService;)V
      
          invoke-static {v6, v7}, Landroid/os/ServiceManager;->addService(Ljava/lang/String;Landroid/os/IBinder;)V
          :try_end_d83
          .catch Ljava/lang/Throwable; {:try_start_d6f .. :try_end_d83} :catch_1747
      
          .line 2033
          :goto_d83
          :try_start_d83
          const-string v6, "SystemServer"
      
          const-string v7, "SamplingProfiler Service"
      
          invoke-static {v6, v7}, Landroid/util/Slog;->i(Ljava/lang/String;Ljava/lang/String;)I

      NOW ADD NEW LINES IN BLUE, MAKE SURE YOU PUT THEM IN THE RIGHT PLACE IN BETWEEN :GOTO AND :TRY_START:

      Code:
          const-string/jumbo v6, "spengestureservice"
      
          new-instance v7, Lcom/android/server/smartclip/SpenGestureManagerService;
      
          move-object/from16 v0, v206
      
          invoke-direct {v7, v5, v0}, Lcom/android/server/smartclip/SpenGestureManagerService;-><init>(Landroid/content/Context;Lcom/android/server/wm/WindowManagerService;)V
      
          invoke-static {v6, v7}, Landroid/os/ServiceManager;->addService(Ljava/lang/String;Landroid/os/IBinder;)V
          :try_end_d83
          .catch Ljava/lang/Throwable; {:try_start_d6f .. :try_end_d83} :catch_1747
      
          .line 2033
          :goto_d83
      [COLOR="Blue"]    move-object/from16 v0, p0
      
          iget-object v6, v0, Lcom/android/server/SystemServer;->mSystemServiceManager:Lcom/android/server/SystemServiceManager;
      
          const-string v7, "com.android.server.cocktailbar.CocktailBarManagerService"
      
          invoke-virtual {v6, v7}, Lcom/android/server/SystemServiceManager;->startService(Ljava/lang/String;)Lcom/android/server/SystemService;[/COLOR]
      
          :try_start_d83
          const-string v6, "SystemServer"
      
          const-string v7, "SamplingProfiler Service"
      
          invoke-static {v6, v7}, Landroid/util/Slog;->i(Ljava/lang/String;Ljava/lang/String;)I

      Now navigate to:

      smali/com/android/server/power/PowerManagerService.smali

      SEARCH FOR:

      Code:
      [COLOR="Green"]    const-string v8, "SEC_PRODUCT_FEATURE_COMMON_SUPPORT_COCKTAIL_FW: false"[/COLOR]

      NOW MAKE CHANGES THAT YOU SEE IN BLUE:

      Code:
      [COLOR="Green"]    const-string v8, "SEC_PRODUCT_FEATURE_COMMON_SUPPORT_COCKTAIL_FW: [COLOR="Blue"]true[/COLOR]"[/COLOR]

      Now navigate to:

      smali/com/android/server/notification/NotificationManagerService$6.smali

      SEARCH FOR:

      Code:
      [COLOR="Green"].method public enqueueEdgeNotification(Ljava/lang/String;Ljava/lang/String;ILandroid/os/Bundle;I)V[/COLOR]

      IT SHOULD LOOK SOMETHING LIKE THIS:

      Code:
      .method public enqueueEdgeNotification(Ljava/lang/String;Ljava/lang/String;ILandroid/os/Bundle;I)V
          .registers 6
          .param p1, "pkg"    # Ljava/lang/String;
          .param p2, "opPkg"    # Ljava/lang/String;
          .param p3, "id"    # I
          .param p4, "extra"    # Landroid/os/Bundle;
          .param p5, "userId"    # I
      
          .prologue
          .line 2023
          return-void
      .end method

      NOW REMOVE THAT WHOLE METHOD AND ADD NEW METHOD THAT YOU SEE BELOW IN BLUE:

      Code:
      [COLOR="Blue"].method public enqueueEdgeNotification(Ljava/lang/String;Ljava/lang/String;ILandroid/os/Bundle;I)V
          .registers 14
          .param p1, "pkg"    # Ljava/lang/String;
          .param p2, "opPkg"    # Ljava/lang/String;
          .param p3, "id"    # I
          .param p4, "extra"    # Landroid/os/Bundle;
          .param p5, "userId"    # I
      
          .prologue
          .line 2020
          # invokes: Lcom/android/server/notification/NotificationManagerService;->checkCallerIsSystemOrSameApp(Ljava/lang/String;)V
          invoke-static {p1}, Lcom/android/server/notification/NotificationManagerService;->access$3400(Ljava/lang/String;)V
      
          .line 2021
          iget-object v0, p0, Lcom/android/server/notification/NotificationManagerService$6;->this$0:Lcom/android/server/notification/NotificationManagerService;
      
          invoke-static {}, Landroid/os/Binder;->getCallingUid()I
      
          move-result v3
      
          invoke-static {}, Landroid/os/Binder;->getCallingPid()I
      
          move-result v4
      
          move-object v1, p1
      
          move-object v2, p2
      
          move v5, p3
      
          move-object v6, p4
      
          move v7, p5
      
          invoke-virtual/range {v0 .. v7}, Lcom/android/server/notification/NotificationManagerService;->enqueueEdgeNotificationInternal(Ljava/lang/String;Ljava/lang/String;IIILandroid/os/Bundle;I)V
      
          .line 2023
          return-void
      .end method[/COLOR]

      NOW SEARCH FOR:

      Code:
      [COLOR="Green"].method public removeEdgeNotification(Ljava/lang/String;ILandroid/os/Bundle;I)V[/COLOR]

      IT SHOULD LOOK SOMETHING LIKE THIS:

      Code:
      .method public removeEdgeNotification(Ljava/lang/String;ILandroid/os/Bundle;I)V
          .registers 5
          .param p1, "pkg"    # Ljava/lang/String;
          .param p2, "id"    # I
          .param p3, "extra"    # Landroid/os/Bundle;
          .param p4, "userId"    # I
      
          .prologue
          .line 2034
          return-void
      .end method

      NOW REMOVE THAT WHOLE METHOD AND ADD NEW METHOD THAT YOU SEE BELOW IN BLUE:

      Code:
      [COLOR="Blue"].method public removeEdgeNotification(Ljava/lang/String;ILandroid/os/Bundle;I)V
          .registers 12
          .param p1, "pkg"    # Ljava/lang/String;
          .param p2, "id"    # I
          .param p3, "extra"    # Landroid/os/Bundle;
          .param p4, "userId"    # I
      
          .prologue
          .line 2028
          # invokes: Lcom/android/server/notification/NotificationManagerService;->checkCallerIsSystemOrSameApp(Ljava/lang/String;)V
          invoke-static {p1}, Lcom/android/server/notification/NotificationManagerService;->access$3400(Ljava/lang/String;)V
      
          .line 2029
          invoke-static {}, Landroid/os/Binder;->getCallingPid()I
      
          move-result v0
      
          invoke-static {}, Landroid/os/Binder;->getCallingUid()I
      
          move-result v1
      
          const/4 v3, 0x1
      
          const/4 v4, 0x0
      
          const-string v5, "cancelNotificationWithTag"
      
          move v2, p4
      
          move-object v6, p1
      
          invoke-static/range {v0 .. v6}, Landroid/app/ActivityManager;->handleIncomingUser(IIIZZLjava/lang/String;Ljava/lang/String;)I
      
          move-result p4
      
          .line 2032
          iget-object v0, p0, Lcom/android/server/notification/NotificationManagerService$6;->this$0:Lcom/android/server/notification/NotificationManagerService;
      
          invoke-static {}, Landroid/os/Binder;->getCallingUid()I
      
          move-result v1
      
          invoke-static {}, Landroid/os/Binder;->getCallingPid()I
      
          move-result v2
      
          move-object v3, p1
      
          move v4, p2
      
          move-object v5, p3
      
          move v6, p4
      
          invoke-virtual/range {v0 .. v6}, Lcom/android/server/notification/NotificationManagerService;->removeEdgeNotificationInternal(IILjava/lang/String;ILandroid/os/Bundle;I)V
      
          .line 2034
          return-void
      .end method[/COLOR]

      Once done now smali/recompile your services.jar and your done with that part!

      ★ Now go into your system/framework folder and take out your "framework.jar"
      ★ Now decompile/baksmali framework.jar, then navigate to:

      smali/android/app/NotificationManager.smali

      SEARCH FOR:

      Code:
      [COLOR="Green"].method constructor <init>(Landroid/content/Context;Landroid/os/Handler;)V[/COLOR]

      IT SHOULD LOOK SOMETHING LIKE THIS:

      Code:
      .method constructor <init>(Landroid/content/Context;Landroid/os/Handler;)V
          .registers 3
          .param p1, "context"    # Landroid/content/Context;
          .param p2, "handler"    # Landroid/os/Handler;
      
          .prologue
          .line 184
          invoke-direct {p0}, Ljava/lang/Object;-><init>()V
      
          .line 185
          iput-object p1, p0, Landroid/app/NotificationManager;->mContext:Landroid/content/Context;
      
          .line 192
          return-void
      .end method

      NOW ADD NEW LINES AND MAKE CHANGES IN BLUE, MAKE SURE YOU PUT THEM IN THE RIGHT PLACE:

      Code:
      .method constructor <init>(Landroid/content/Context;Landroid/os/Handler;)V
          [COLOR="Blue"].registers 4[/COLOR]
          .param p1, "context"    # Landroid/content/Context;
          .param p2, "handler"    # Landroid/os/Handler;
      
          .prologue
          .line 184
          invoke-direct {p0}, Ljava/lang/Object;-><init>()V
      
          .line 185
          iput-object p1, p0, Landroid/app/NotificationManager;->mContext:Landroid/content/Context;
      
      [COLOR="Blue"]    new-instance v0, Landroid/app/NotificationManager$EdgeNotificationManager;
      
          invoke-direct {v0, p1}, Landroid/app/NotificationManager$EdgeNotificationManager;-><init>(Landroid/content/Context;)V
      
          iput-object v0, p0, Landroid/app/NotificationManager;->mEdgeNotificationManager:Landroid/app/NotificationManager$EdgeNotificationManager;[/COLOR]
      
          .line 192
          return-void
      .end method

      Now navigate to:

      smali/android/app/SystemServiceRegistry.smali

      SEARCH FOR:

      Code:
      [COLOR="Green"]    const-string/jumbo v0, "multiwindow_facade"[/COLOR]

      IT SHOULD LOOK SOMETHING LIKE THIS:

      Code:
          .line 1011
          const-string/jumbo v0, "multiwindow_facade"
      
          const-class v1, Lcom/samsung/android/multiwindow/MultiWindowFacade;
      
          new-instance v2, Landroid/app/SystemServiceRegistry$83;
      
          invoke-direct {v2}, Landroid/app/SystemServiceRegistry$83;-><init>()V
      
          invoke-static {v0, v1, v2}, Landroid/app/SystemServiceRegistry;->registerService(Ljava/lang/String;Ljava/lang/Class;Landroid/app/SystemServiceRegistry$ServiceFetcher;)V
      
          .line 1046
          const-string/jumbo v0, "spengestureservice"

      NOW ADD NEW LINES IN BLUE, MAKE SURE YOU PUT THEM IN THE RIGHT PLACE:

      Code:
          .line 1011
          const-string/jumbo v0, "multiwindow_facade"
      
          const-class v1, Lcom/samsung/android/multiwindow/MultiWindowFacade;
      
          new-instance v2, Landroid/app/SystemServiceRegistry$83;
      
          invoke-direct {v2}, Landroid/app/SystemServiceRegistry$83;-><init>()V
      
          invoke-static {v0, v1, v2}, Landroid/app/SystemServiceRegistry;->registerService(Ljava/lang/String;Ljava/lang/Class;Landroid/app/SystemServiceRegistry$ServiceFetcher;)V
      
      [COLOR="Blue"]    const-string v0, "CocktailBarService"
      
          const-class v1, Lcom/samsung/android/cocktailbar/CocktailBarManager;
      
          new-instance v2, Landroid/app/SystemServiceRegistry$85;
      
          invoke-direct {v2}, Landroid/app/SystemServiceRegistry$85;-><init>()V
      
          invoke-static {v0, v1, v2}, Landroid/app/SystemServiceRegistry;->registerService(Ljava/lang/String;Ljava/lang/Class;Landroid/app/SystemServiceRegistry$ServiceFetcher;)V[/COLOR]
      
          .line 1046
          const-string/jumbo v0, "spengestureservice"

      Now you will need to do is add the SystemServiceRegistry$85.smali file from the attachment below called "framework.jar Contacts, Tasks, And Apps Edge Panel Smali Files.rar" and add it into smali/android/app/. Once done now smali/recompile your framework.jar and your DONE! The last thing you will need to do is add the contacts, tasks, and apps edge panel system files with the apks and also the system/etc/permissions xml files that you will be needing to add into your rom so download link will be below as well.

      CONTACTS, TASKS, AND APPS EDGE PANEL SYSTEM FILES DOWNLOAD LINK - https://www.androidfilehost.com/?fid=24545070682210404

      ONLY BUGS ARE NONE EDGE/EDGE+ USERS WONT BE ABLE TO SEE EDGE FEEDS, EDGE LIGHTNING, AND OTHER EDGE/EDGE+ FEATURES DUE TO THE DEVICE HAVING A DIFFERENT DISPLAY. IF EDGE/EDGE+ USERS ARE FLASHING/INSTALLING A NON EDGE/EDGE+ CUSTOM ROM YOU WILL NOT BE ABLE TO HAVE THOSE FEATURES ALSO BECAUSE THIS MOD ONLY ADDS CONTACTS, TASKS, AND APPS EDGE PANEL TO THE ROM OTHER DISPLAY FEATURES ARE STILL A WORK IN PROGRESS AND A LITTLE BIT HARDER TO DO BECAUSE THERE ARE MANY COCKTAILBAR CODE IN THE EDGE/EDGE+ STOCK FRAMEWORKS THAT THE NON EDGE/EDGE+ SAMSUNG DEVICES DO NOT HAVE.
      8
      Ok everyone the guide based in the OP section is how to add the Contacts, Tasks, And Apps Edge Panel mod on your none edge/edge+ samsung device. The thing im trying to get working is the edge feeds feature. That option will only work for the edge/edge+ samsung device users and not for the note 5 users because of different displays and kernel. So when a user who owns a edge device flashes a note 5 custom rom they will not have that feature (edge feeds). In order for note 5 developers to get it to work i have found all the differential smali files that hopefully will get every edge/edge+ feature fully working for those specific device users while on a note 5 custom rom who have the changes in them. I have placed an attachment below with stock note 5 smali files (that doesn't have cocktailbar code) then the stock edge+ smali files (that have cocktailbar code) placed in it so you will have to implement the cocktailbar code to the note 5 smalis by comparing one file with the other based from both devices together and see what changes were made. Hopefully we can all get this fully working together.

      NOTE #1 - The changes are only in the framework.jar and services.jar framework files so we will have to work with both of those frameworks in order to get all edge features working.
      NOTE #2 - In some of the note 5 smalis there is methods with "vrflinger" in them that the edge+ doesn't have. So just copy and pasting some of the files won't work. The locations with the vrflinger code in them are listed below and are only in services.jar:

      services.jar
      smali/com/android/server/am/ActivityManagerService.smali
      smali/com/android/server/am/ActivityRecord.smali
      smali/com/android/server/policy/PhoneWindowManager.smali
      smali/com/android/server/wm/WindowManagerService.smali
      smali/com/android/server/wm/WindowStateAnimator.smali
      6
      Here is a modified apk with the Edge Lighting feature hidden in the menu.
      I chose to take the easy way out, modifying layout for the menu.
      It doesn't work for us anyway.
      I think the other choices do work but don't have the time to check it all out so if something else needs to go, just let me know.
      4
      Bootlooping here, found a real typo this time.

      @jovy23
      smali\com\android\server\notification\NotificationManagerService$6.smali
      Please change new method. Correction is in RED
      Code:
      .method public removeEdgeNotification(Ljava/lang/String;ILandroid/os/Bundle;I)V
      .
      .
      .
          # invokes: Lcom/android/server/notification/NotificationManagerService;->checkCallerIsSystemOrSameApp(Ljava/lang/String;)V
          invoke-static {p1}, Lcom/android/server/notification/NotificationManagerService;->[COLOR="Red"]access$3400[/COLOR](Ljava/lang/String;)V
      original was access$3000 which does NOT call checkCallerIsSystemOrSameApp(Ljava/lang/String;)V

      Edit:


      NOTE:
      This access$xxxx may cause issues for some smali trying to port this feature.
      You may want to post our access$3400 as example and state that is must match THEIR parent smali.

      Addendum:
      This is what access$3400 looks like in our NotificationManagerService.smali. The call in $6 needs to match.

      Code:
      .method static synthetic access$3400(Ljava/lang/String;)V
          .locals 0
      
          invoke-static {p0}, Lcom/android/server/notification/NotificationManagerService;->checkCallerIsSystemOrSameApp(Ljava/lang/String;)V
      
          return-void
      .end method