• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[ROM][AOSP] AICP [UNOFFICIAL][8.1][N960F][09.11.18]

Search This thread

that_same_guy

Member
Feb 26, 2012
46
34
landscape bug fixed

hello @s3xxt0y
the landscape bug was driving me crazy i finally found a simple solution to it.. :)

with the help of the AOSP documentation and some online threads that gave me the confidence, i found out that an idc file can be created, to add special options for the input device. it is so simple, in fact I am sure that probably we'll manage to add more features or bind the spen function using it.. will report if I figured something out.

to fix the landscape S-Pen bug:
so simply unzip the attached file then paste in /system/usr/idc/. the file has one line of command, i used root explorer to do it. rebooted and the s pen now works in landscape position..
please add it to your rom.. honestly this rom is now perfect..
thank you a lot.

I will also send it to @phhusson so the gsi roms have this issues fixed by default.
 

Attachments

  • unzipthis.zip
    168 bytes · Views: 26
Last edited:
  • Like
Reactions: CodeFox and Nasty_z

that_same_guy

Member
Feb 26, 2012
46
34
Btw today I found anther great app for the s pen called xposed edge. So good. You can create gestures and bind keys. Very customizable. Alot of other features like draw on screen with a pen. I am still exploring. I was able to program my bigsby button to control music
 
Last edited:

CodeFox

Senior Member
Sep 7, 2014
363
525
Manchester
hello @s3xxt0y
the landscape bug was driving me crazy i finally found a simple solution to it.. :)

with the help of the AOSP documentation and some online threads that gave me the confidence, i found out that an idc file can be created, to add special options for the input device. it is so simple, in fact I am sure that probably we'll manage to add more features or bind the spen function using it.. will report if I figured something out.

to fix the landscape S-Pen bug:
so simply unzip the attached file then paste in /system/usr/idc/. the file has one line of command, i used root explorer to do it. rebooted and the s pen now works in landscape position..
please add it to your rom.. honestly this rom is now perfect..
thank you a lot.

I will also send it to @phhusson so the gsi roms have this issues fixed by default.

Great find! I'll look to try and get this added at some point. I need to resync my sources first as I wiped my VM. Good work!

With regards to the GSIs I don't think phh will bother, I'm pretty sure he isn't looking to support it anymore from the conversation he had with someone in our team.
 
  • Like
Reactions: that_same_guy

CodeFox

Senior Member
Sep 7, 2014
363
525
Manchester
hello @s3xxt0y
the landscape bug was driving me crazy i finally found a simple solution to it.. :)

with the help of the AOSP documentation and some online threads that gave me the confidence, i found out that an idc file can be created, to add special options for the input device. it is so simple, in fact I am sure that probably we'll manage to add more features or bind the spen function using it.. will report if I figured something out.

to fix the landscape S-Pen bug:
so simply unzip the attached file then paste in /system/usr/idc/. the file has one line of command, i used root explorer to do it. rebooted and the s pen now works in landscape position..
please add it to your rom.. honestly this rom is now perfect..
thank you a lot.

I will also send it to @phhusson so the gsi roms have this issues fixed by default.

Going to do a new build now I've got my sources working again. Will sync latest AICP and put in the rotation fix. We found another solution that we implemented to our GSI's so will see how that works. Will probably be tomorrow that I post it.
 
  • Like
Reactions: that_same_guy

that_same_guy

Member
Feb 26, 2012
46
34
S pen progress

Hello @s3xxt0y
I am not sure where to post this(please let me know if I better post it somewhere else), but through some experimentation on the spen on the original and current rom, using getevent and logcats, I feel like I found some info, especially exciting regarding the bluetooth, I am not sure it is any useful but I am going to post them for reference, hopefully someone could use them or maybe develop an AOSP bluetooth spen remote app. I know I am going to pay/donate for it :)

now before I mention all this, there is a couple of apps SPenCommand or GMD Spen Gestures that do some of the non-bluetooth work. I am using the GMD app, using which you can create actions when the spen is attached or detached, with which I could simulate the Spen menu in Samsung roms, I bound it to a custom shortcut menu I made with Xposed Edge app that has all the features of the spen menu. and I even used tasker to detect if screen is off, to call a note taking app Squid instead of this menu when it wakes up, simulating the screen off memo.

please forgive my brightscreen and bad video setup but I made a video showing this
Check SPen GMD.zip (attached) for the video

Now to the S Pen buttons, I am going to attach the actual file that has the stuff I captured (Buttons.zip), but here I am going to summarize what I think is happening
Code:
All from the same input device "sec_e-pen", using getevent and doing the following things I get:

[B]Spen Out     [/B]
EV_SW        0013                 00000001 

[B]Spen In    [/B]   
 EV_SW        0013                 00000000

_____________________________________


[B]Hover   [/B]        
EV_KEY       BTN_DIGI             DOWN                  digitizer starts sensing the spen
EV_ABS       ABS_DISTANCE         00000078           (reports spen distance from screen)
EV_ABS       ABS_X                000013a6                       (reports spen mouse coordinates)
EV_ABS       ABS_Y                00001544                      (reports spen mouse coordinates)
EV_KEY       BTN_DIGI             UP

[U][I][B]((ADDED Nov 10 not in txt file))
[/B][/I][/U][B]Hover and S  Button Click  [/B]        
EV_KEY       BTN_DIGI             DOWN                  digitizer starts sensing the spen
EV_ABS       ABS_DISTANCE         00000078           (reports spen distance from screen)
EV_ABS       ABS_X                000013a6                       (reports spen mouse coordinates)
EV_ABS       ABS_Y                00001544                      (reports spen mouse coordinates)
EV_KEY       BTN_STYLUS      DOWN                (spen button click regardless of it touching) 
EV_KEY       BTN_STYLUS       UP
EV_KEY       BTN_DIGI             UP


[B]Hover then Spen Touch Screen  [/B]
EV_KEY       BTN_DIGI             DOWN              (same as above)
EV_ABS       ABS_X                000013a6
EV_ABS       ABS_Y                00001544  
EV_ABS       ABS_DISTANCE         00000078     (distance start getting smaller)                                                     
EV_ABS       ABS_DISTANCE         0000000a
EV_KEY       BTN_TOUCH            DOWN            (spen touching screen)
EV_ABS       ABS_PRESSURE         00000a79            (pressure sensitivity)
EV_ABS       ABS_DISTANCE         00000000            
EV_ABS       ABS_TILT_X           00000002            
EV_ABS       ABS_TILT_Y           00000001
EV_KEY       BTN_TOUCH            UP                     (spen away from screen)
EV_ABS       ABS_DISTANCE         00000001
EV_ABS       ABS_DISTANCE         00000038            
EV_KEY       BTN_DIGI             UP   

Note: every now and then there is     EV_SYN       SYN_REPORT           00000000  (not sure what does it exactly means)

Now for the exciting part here is a logcat of bluetooth button press in original samsung rom
Code:
11-03 09:02:16.104  8083  8094 D [AirCmd]_BleSpenDriver: GattCallback : onCharacteristicChanged : 68:A8:E1:E3:0D:27 / UUID_BUTTON_EVENT, PERM=0, RAWDATA : [1]DESC_CNT=2 [ DESC : UUID_CHARACTERISTIC_CONFIG, [1 0]] [ DESC : UNDEFINED:00002901-0000-1000-8000-00805f9b34fb, [nodata]] 
11-03 09:02:16.104  8083  8094 D [AirCmd]_BleSpenDriver: GattCallback : Button:1
11-03 09:02:16.403  8083  8083 D [AirCmd]_BleSpenClickGestureDetector: sendBleSpenClickEvent : single clicked
11-03 09:02:16.403  8083  8083 D [AirCmd]_RemoteSpenMainController: SpenEventListener : button clicked
11-03 09:02:16.404  8083  8083 D [AirCmd]_ScreenOffAndLockStateActionInvoker: ScreenOffAndLockStateActionInvoker invokeAction : isInteractive is true
11-03 09:02:16.404  8083  8083 D [AirCmd]_ScreenOffAndLockStateActionInvoker: ScreenOffAndLockStateActionInvoker invokeAction : mIsSatisfySpenUnlockCondition is false
11-03 09:02:16.404  8083  8083 D [AirCmd]_ScreenOffAndLockStateActionInvoker: ScreenOffAndLockStateActionInvoker invokeAction : screenOffReason is 3
11-03 09:02:16.405  8083  8083 D [AirCmd]_ScreenOffAndLockStateActionInvoker: ScreenOffAndLockStateActionInvoker invokeAction : Single, double click case
11-03 09:02:16.406  8083  8083 D [AirCmd]_CameraAvailabilityMonitor: isCameraPreviewOn : mIsCameraPreviewOn is false
11-03 09:02:16.409  8083  8083 D [AirCmd]_CameraAvailabilityMonitor: isCameraPreviewOn : mIsCameraPreviewOn is false
11-03 09:02:16.414  8083  8083 D [AirCmd]_MediaControlStateMonitor: getActivePackageName : noti count=5, session count=0
11-03 09:02:16.414  8083  8083 D [AirCmd]_PenActionRule: getAction : get default action data from remote action because pen action data is null.
11-03 09:02:16.414  8083  8083 D [AirCmd]_RemoteSpenMainController: invokeAction : no action present
11-03 09:02:16.414  8083  8083 D AC:AirCommand: onBleFloatingIconAnimationStart hasAction : false, isShowGuidePanel false
11-03 09:02:16.414  8083  8083 I AC:AirCommand_SAUtils: insertEventLog... screenID:105, eventID:1052, detail:com.sec.android.app.launcher_com.android.launcher3.Launcher_none, value:null
11-03 09:02:16.415  8083  8083 D SamsungAnalytics111040: user do not agree
11-03 09:02:16.416  8083  8083 V AC:AirCommand: play : 0x11
11-03 09:02:16.416  8083  8083 D AC:AirCommand: showBleFbShakeAnimator

Long Press
Code:
11-03 10:53:06.258  8083 16804 D [AirCmd]_BleSpenDriver: GattCallback : onCharacteristicChanged : 68:A8:E1:E3:0D:27 / UUID_BUTTON_EVENT, PERM=0, RAWDATA : [2]DESC_CNT=2 [ DESC : UUID_CHARACTERISTIC_CONFIG, [1 0]] [ DESC : UNDEFINED:00002901-0000-1000-8000-00805f9b34fb, [nodata]] 
11-03 10:53:06.258  8083 16804 D [AirCmd]_BleSpenDriver: GattCallback : Button:2
11-03 10:53:06.259  8083  8083 D [AirCmd]_RemoteSpenMainController: SpenEventListener : button long clicked
11-03 10:53:06.316  4865  6567 W ActivityManager: Slow operation: 54ms so far, now at getContentProviderImpl: after updateOomAdj
11-03 10:53:06.316  4865  6567 W ActivityManager: Slow operation: 54ms so far, now at getContentProviderImpl: done!
11-03 10:53:06.323  8083  8083 D [AirCmd]_ScreenOffAndLockStateActionInvoker: ScreenOffAndLockStateActionInvoker invokeAction : isInteractive is true
11-03 10:53:06.324  8083  8083 D [AirCmd]_ScreenOffAndLockStateActionInvoker: ScreenOffAndLockStateActionInvoker invokeAction : mIsSatisfySpenUnlockCondition is false
11-03 10:53:06.324  8083  8083 D [AirCmd]_ScreenOffAndLockStateActionInvoker: ScreenOffAndLockStateActionInvoker invokeAction : screenOffReason is 3
11-03 10:53:06.325  8083  8083 D [AirCmd]_ScreenOffAndLockStateActionInvoker: ScreenOffAndLockStateActionInvoker invokeAction : Long click case
11-03 10:53:06.332  8083  8083 D [AirCmd]_CameraAvailabilityMonitor: isCameraPreviewOn : mIsCameraPreviewOn is false
11-03 10:53:06.337  8083  8083 D [AirCmd]_CameraAvailabilityMonitor: isCameraPreviewOn : mIsCameraPreviewOn is false
11-03 10:53:06.345  8083  8083 D [AirCmd]_MediaControlStateMonitor: getActivePackageName : noti count=3, session count=1
11-03 10:53:06.346  8083  8083 D [AirCmd]_RemoteSpenMainController: showGuidePanel : rule is not proper type. ruleType=BASE
11-03 10:53:06.346  8083  8083 D [AirCmd]_PenActionInvoker: invokeAction : AppLaunchActionData


so I on your the AOSP AICP ROM, I did install two apps, LightBlue and nRF Connect that utilize the same BLE technology as the S Pen, I was excited that it was that simple it connected to it, you can read different services, I could find one that said Button State, and it turns out that if subscribing to the service using GATT server, you can stay connected to the device and wait for the specific service changes. (not my level though)

I was able to pair the device, read some information below is a screenshot
bFIBdqil.png



and specifically this service that screenshoted below has the name Button State, if service is subscribed to, (clicking the button) when clicking the button will give 01, if click and hold gives 02. screenshot below
jaqWUy7l.png


I was sad to discover than neither of the apps does connect to tasker, nor easy to make them run & connect to spen by default on boot.

but nevertheless, I believe the info above is the key, a person that has some knowledge in Android app making and BLE libraries, has the will, and the time to invest can be a hero in this forum and maybe potential for some business, these would be the event triggers to create shortcuts, this will make the bluetooth in the spen functional in AOSP or maybe even allow to generalize it to any device e.g. people can hook up tasker to their smartwatches or so.

and I will go back to my daydreaming :)
 

Attachments

  • Screenshot_20181108-144115_LightBlue.jpg
    Screenshot_20181108-144115_LightBlue.jpg
    238.2 KB · Views: 195
  • Screenshot_20181108-144105_LightBlue.png
    Screenshot_20181108-144105_LightBlue.png
    244.4 KB · Views: 185
  • Buttons.zip
    4.9 KB · Views: 31
Last edited:

CodeFox

Senior Member
Sep 7, 2014
363
525
Manchester
Great stuff, I will flash it once its up. Thank you alot :)

OP Updated, new build here. Nice work on the post by the way and thanks for sharing the video. I'm surprised it works so well on an AOSP rom. Definitely a useful post, I definitely recommend maybe posting it in the guides forum and maybe title is as "SPen functionality on AOSP ROMs" maybe. It's something I'm sure a lot of people would love to know about! I've not gotten around to trying it out yet as I've been constantly wiping and flashing new test builds of pie based roms, but will definitely be downloading GMD Tonight.
 

that_same_guy

Member
Feb 26, 2012
46
34
Flashed it.. Works like a charm. Spen works straight out. Everything looks like working smooth. Thank you a lot. :D
 

nikhil34a

Member
Nov 19, 2014
47
5
Brightness control on my phone is not working, it's stuck on full brightness. Does anybody else facing the same issue?
 

that_same_guy

Member
Feb 26, 2012
46
34
Brightness control on my phone is not working, it's stuck on full brightness. Does anybody else facing the same issue?

Yes it is a known issue, in fact alot of other gsi roms have zero brightness control. Cuz how samsung probably implemented it. But This rom fixed the issue but it gets stuck on max until you reboot.

If you reboot it Should get back to normal. I just avoid setting brightness to max. Unless i need it. Not a deal breaker for me

---------- Post added at 12:09 PM ---------- Previous post was at 12:01 PM ----------

Will Dolby atmos work on this rom

I never installed it, found magisk modules non of them support oreo except one. It was built for oneplus X. Was able to install but no luck for me. (Disclaimer: i dont have gapps on)
Let me know if there is a special one i can test it for you.

But tried viper4android and was working fine. Could change equalizer settings, gain control.. Was working great

If you didnt try the rom, i would suggest backing up eith twrp and trying it. There is a ton of customizations. Out of all the AOSP roms I have tried nothing compares to this. And very smooth and stable.
Thanks to s3xxt0y
 
Last edited:
  • Like
Reactions: nikhil34a

Gabe2014

Senior Member
Jan 19, 2014
440
197
hello @s3xxt0y , problem here after the last bulid on my N9 the phone dont recognize my simcard and now if i install a stock rom i still have the problem
 
hello @s3xxt0y , problem here after the last bulid on my N9 the phone dont recognize my simcard and now if i install a stock rom i still have the problem
Sounds like your efs is corrupted. You need to install the stock firmware using Odin. And make sure you backup your efs right after rooting the phone using Dr.ketans root guide in the guides section.

P.s this isn't a rom specific issue. I've had this happen to me on Samsung ROMs too. By backing up the efs partition, you can restore it at anytime when your efs gets corrupted (this way, you don't have to flash stock using Odin every time this happens)
 
  • Like
Reactions: andropest

Gabe2014

Senior Member
Jan 19, 2014
440
197
Sounds like your efs is corrupted. You need to install the stock firmware using Odin. And make sure you backup your efs right after rooting the phone using Dr.ketans root guide in the guides section.

P.s this isn't a rom specific issue. I've had this happen to me on Samsung ROMs too. By backing up the efs partition, you can restore it at anytime when your efs gets corrupted (this way, you don't have to flash stock using Odin every time this happens)

can you help me , can i PM you ?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 11
    qbsjGIH.png
    Android Ice Cold Project
    Unoffical Note 9 by OpenSauce9810

    k3DRk3b.jpg


    What is this?
    This is the Android Ice Cold Project compiled for the Exynos Note 9. This is my daily driver as it's probably the smoothest oreo AOSP rom so far. I recommend enabling the android P animations in the settings.,

    What's working?
    Mostly everything, including dual speaker, home button, MTP.

    What's not working?
    Powering off - if you power off your phone completely the rom won't boot. You need to go to trwp and reboot to system to get back in. (I think)
    Padding on status bar may be a bit close to the edges.
    Let me know of any other issues.

    Instructions:
    Make sure TWRP has been installed and functional.
    Download the latest build linked below
    Reboot to recovery
    Wipe data and cache (required if you switch from other ROMs). Even better if you have nothing to loose and wipe system,data,cache,storage etc
    Flash the latest build (and gapps). GAPPS ARE NOT INCLUDED use opengapps 8.1.
    Reboot and enjoy

    Changelog:
    • 25.10.2018 Initial Release
    • 26.10.2018: Status bar padding fixed. Latest sources synced. General smoothness / performance improved (butter smooth now).
    • 29.10.2018: High Touch Sensitivity Added, Adaptive Backlight Improvements, Sunlight Enhancement, Vibrator HW Improvement, Display Mode Control added to Display Settings.
    • 08.11.2018: Synced to latest sources, S-Pen "rotation aware" fixed. Fixed an issue that was causing the phone to reboot 4 times before starting the ROM when flashing. (Unfortunately I forgot to fix the status bar padding so this is close to the edges again, will patch ASAP)
    • 09.11.2018: Tweaked some default settings to improve experience, custom winter edition wallpaper, new boot logo. Status Bar padding won't seem to fix and idk why now. But it's not too bad on the note 9 anyway.

    Downloads:

    Galaxy Note 9 Exynos:
    09.11.2018 Build
    ARH6 Vendor

    Providing feedback:
    Feedback is welcome, happy to try and iron out any bugs.

    Join our Telegram Group for the latest updates / support.
    https://t.me/joinchat/E_rQyU__5M_5wph6FrnpKA

    Credits:
    AICP Project.
    Opensauce9810
    Rainbow_Dash & malinathani: For the help building + implementing fixes.
    Vaughnnn: For his Device Trees in GitHub
    Ivan: Sealing the Deal.

    Screenshots
    GRDwPEp.jpg

    3qt0a6C.jpg

    cFpLScJ.jpg

    GGNDCNP.jpg

    kkAqXOS.jpg


    XDA:DevDB Information
    [ROM][AOSP] AICP [UNOFFICIAL][8.1][N960F][09.11.18], ROM for the Samsung Galaxy Note 9

    Contributors
    s3xxt0y, Rainbow_Dash, malinathani, Vaughnn, Jesec, Favoritus, Saxmydix
    Source Code: https://github.com/AICP/platform_manifest

    ROM OS Version: 8.x Oreo
    ROM Kernel: Linux 4.x
    ROM Firmware Required: Vendor ARH6
    Based On: AICP

    Version Information
    Status: Stable
    Current Stable Version: 1

    Created 2018-10-25
    Last Updated 2018-12-29
    4
    S pen progress

    Hello @s3xxt0y
    I am not sure where to post this(please let me know if I better post it somewhere else), but through some experimentation on the spen on the original and current rom, using getevent and logcats, I feel like I found some info, especially exciting regarding the bluetooth, I am not sure it is any useful but I am going to post them for reference, hopefully someone could use them or maybe develop an AOSP bluetooth spen remote app. I know I am going to pay/donate for it :)

    now before I mention all this, there is a couple of apps SPenCommand or GMD Spen Gestures that do some of the non-bluetooth work. I am using the GMD app, using which you can create actions when the spen is attached or detached, with which I could simulate the Spen menu in Samsung roms, I bound it to a custom shortcut menu I made with Xposed Edge app that has all the features of the spen menu. and I even used tasker to detect if screen is off, to call a note taking app Squid instead of this menu when it wakes up, simulating the screen off memo.

    please forgive my brightscreen and bad video setup but I made a video showing this
    Check SPen GMD.zip (attached) for the video

    Now to the S Pen buttons, I am going to attach the actual file that has the stuff I captured (Buttons.zip), but here I am going to summarize what I think is happening
    Code:
    All from the same input device "sec_e-pen", using getevent and doing the following things I get:
    
    [B]Spen Out     [/B]
    EV_SW        0013                 00000001 
    
    [B]Spen In    [/B]   
     EV_SW        0013                 00000000
    
    _____________________________________
    
    
    [B]Hover   [/B]        
    EV_KEY       BTN_DIGI             DOWN                  digitizer starts sensing the spen
    EV_ABS       ABS_DISTANCE         00000078           (reports spen distance from screen)
    EV_ABS       ABS_X                000013a6                       (reports spen mouse coordinates)
    EV_ABS       ABS_Y                00001544                      (reports spen mouse coordinates)
    EV_KEY       BTN_DIGI             UP
    
    [U][I][B]((ADDED Nov 10 not in txt file))
    [/B][/I][/U][B]Hover and S  Button Click  [/B]        
    EV_KEY       BTN_DIGI             DOWN                  digitizer starts sensing the spen
    EV_ABS       ABS_DISTANCE         00000078           (reports spen distance from screen)
    EV_ABS       ABS_X                000013a6                       (reports spen mouse coordinates)
    EV_ABS       ABS_Y                00001544                      (reports spen mouse coordinates)
    EV_KEY       BTN_STYLUS      DOWN                (spen button click regardless of it touching) 
    EV_KEY       BTN_STYLUS       UP
    EV_KEY       BTN_DIGI             UP
    
    
    [B]Hover then Spen Touch Screen  [/B]
    EV_KEY       BTN_DIGI             DOWN              (same as above)
    EV_ABS       ABS_X                000013a6
    EV_ABS       ABS_Y                00001544  
    EV_ABS       ABS_DISTANCE         00000078     (distance start getting smaller)                                                     
    EV_ABS       ABS_DISTANCE         0000000a
    EV_KEY       BTN_TOUCH            DOWN            (spen touching screen)
    EV_ABS       ABS_PRESSURE         00000a79            (pressure sensitivity)
    EV_ABS       ABS_DISTANCE         00000000            
    EV_ABS       ABS_TILT_X           00000002            
    EV_ABS       ABS_TILT_Y           00000001
    EV_KEY       BTN_TOUCH            UP                     (spen away from screen)
    EV_ABS       ABS_DISTANCE         00000001
    EV_ABS       ABS_DISTANCE         00000038            
    EV_KEY       BTN_DIGI             UP   
    
    Note: every now and then there is     EV_SYN       SYN_REPORT           00000000  (not sure what does it exactly means)

    Now for the exciting part here is a logcat of bluetooth button press in original samsung rom
    Code:
    11-03 09:02:16.104  8083  8094 D [AirCmd]_BleSpenDriver: GattCallback : onCharacteristicChanged : 68:A8:E1:E3:0D:27 / UUID_BUTTON_EVENT, PERM=0, RAWDATA : [1]DESC_CNT=2 [ DESC : UUID_CHARACTERISTIC_CONFIG, [1 0]] [ DESC : UNDEFINED:00002901-0000-1000-8000-00805f9b34fb, [nodata]] 
    11-03 09:02:16.104  8083  8094 D [AirCmd]_BleSpenDriver: GattCallback : Button:1
    11-03 09:02:16.403  8083  8083 D [AirCmd]_BleSpenClickGestureDetector: sendBleSpenClickEvent : single clicked
    11-03 09:02:16.403  8083  8083 D [AirCmd]_RemoteSpenMainController: SpenEventListener : button clicked
    11-03 09:02:16.404  8083  8083 D [AirCmd]_ScreenOffAndLockStateActionInvoker: ScreenOffAndLockStateActionInvoker invokeAction : isInteractive is true
    11-03 09:02:16.404  8083  8083 D [AirCmd]_ScreenOffAndLockStateActionInvoker: ScreenOffAndLockStateActionInvoker invokeAction : mIsSatisfySpenUnlockCondition is false
    11-03 09:02:16.404  8083  8083 D [AirCmd]_ScreenOffAndLockStateActionInvoker: ScreenOffAndLockStateActionInvoker invokeAction : screenOffReason is 3
    11-03 09:02:16.405  8083  8083 D [AirCmd]_ScreenOffAndLockStateActionInvoker: ScreenOffAndLockStateActionInvoker invokeAction : Single, double click case
    11-03 09:02:16.406  8083  8083 D [AirCmd]_CameraAvailabilityMonitor: isCameraPreviewOn : mIsCameraPreviewOn is false
    11-03 09:02:16.409  8083  8083 D [AirCmd]_CameraAvailabilityMonitor: isCameraPreviewOn : mIsCameraPreviewOn is false
    11-03 09:02:16.414  8083  8083 D [AirCmd]_MediaControlStateMonitor: getActivePackageName : noti count=5, session count=0
    11-03 09:02:16.414  8083  8083 D [AirCmd]_PenActionRule: getAction : get default action data from remote action because pen action data is null.
    11-03 09:02:16.414  8083  8083 D [AirCmd]_RemoteSpenMainController: invokeAction : no action present
    11-03 09:02:16.414  8083  8083 D AC:AirCommand: onBleFloatingIconAnimationStart hasAction : false, isShowGuidePanel false
    11-03 09:02:16.414  8083  8083 I AC:AirCommand_SAUtils: insertEventLog... screenID:105, eventID:1052, detail:com.sec.android.app.launcher_com.android.launcher3.Launcher_none, value:null
    11-03 09:02:16.415  8083  8083 D SamsungAnalytics111040: user do not agree
    11-03 09:02:16.416  8083  8083 V AC:AirCommand: play : 0x11
    11-03 09:02:16.416  8083  8083 D AC:AirCommand: showBleFbShakeAnimator

    Long Press
    Code:
    11-03 10:53:06.258  8083 16804 D [AirCmd]_BleSpenDriver: GattCallback : onCharacteristicChanged : 68:A8:E1:E3:0D:27 / UUID_BUTTON_EVENT, PERM=0, RAWDATA : [2]DESC_CNT=2 [ DESC : UUID_CHARACTERISTIC_CONFIG, [1 0]] [ DESC : UNDEFINED:00002901-0000-1000-8000-00805f9b34fb, [nodata]] 
    11-03 10:53:06.258  8083 16804 D [AirCmd]_BleSpenDriver: GattCallback : Button:2
    11-03 10:53:06.259  8083  8083 D [AirCmd]_RemoteSpenMainController: SpenEventListener : button long clicked
    11-03 10:53:06.316  4865  6567 W ActivityManager: Slow operation: 54ms so far, now at getContentProviderImpl: after updateOomAdj
    11-03 10:53:06.316  4865  6567 W ActivityManager: Slow operation: 54ms so far, now at getContentProviderImpl: done!
    11-03 10:53:06.323  8083  8083 D [AirCmd]_ScreenOffAndLockStateActionInvoker: ScreenOffAndLockStateActionInvoker invokeAction : isInteractive is true
    11-03 10:53:06.324  8083  8083 D [AirCmd]_ScreenOffAndLockStateActionInvoker: ScreenOffAndLockStateActionInvoker invokeAction : mIsSatisfySpenUnlockCondition is false
    11-03 10:53:06.324  8083  8083 D [AirCmd]_ScreenOffAndLockStateActionInvoker: ScreenOffAndLockStateActionInvoker invokeAction : screenOffReason is 3
    11-03 10:53:06.325  8083  8083 D [AirCmd]_ScreenOffAndLockStateActionInvoker: ScreenOffAndLockStateActionInvoker invokeAction : Long click case
    11-03 10:53:06.332  8083  8083 D [AirCmd]_CameraAvailabilityMonitor: isCameraPreviewOn : mIsCameraPreviewOn is false
    11-03 10:53:06.337  8083  8083 D [AirCmd]_CameraAvailabilityMonitor: isCameraPreviewOn : mIsCameraPreviewOn is false
    11-03 10:53:06.345  8083  8083 D [AirCmd]_MediaControlStateMonitor: getActivePackageName : noti count=3, session count=1
    11-03 10:53:06.346  8083  8083 D [AirCmd]_RemoteSpenMainController: showGuidePanel : rule is not proper type. ruleType=BASE
    11-03 10:53:06.346  8083  8083 D [AirCmd]_PenActionInvoker: invokeAction : AppLaunchActionData


    so I on your the AOSP AICP ROM, I did install two apps, LightBlue and nRF Connect that utilize the same BLE technology as the S Pen, I was excited that it was that simple it connected to it, you can read different services, I could find one that said Button State, and it turns out that if subscribing to the service using GATT server, you can stay connected to the device and wait for the specific service changes. (not my level though)

    I was able to pair the device, read some information below is a screenshot
    bFIBdqil.png



    and specifically this service that screenshoted below has the name Button State, if service is subscribed to, (clicking the button) when clicking the button will give 01, if click and hold gives 02. screenshot below
    jaqWUy7l.png


    I was sad to discover than neither of the apps does connect to tasker, nor easy to make them run & connect to spen by default on boot.

    but nevertheless, I believe the info above is the key, a person that has some knowledge in Android app making and BLE libraries, has the will, and the time to invest can be a hero in this forum and maybe potential for some business, these would be the event triggers to create shortcuts, this will make the bluetooth in the spen functional in AOSP or maybe even allow to generalize it to any device e.g. people can hook up tasker to their smartwatches or so.

    and I will go back to my daydreaming :)
    4
    @CodeFox

    I've noticed that there are no updates being made to aosp roms towards android 9. If you don't mind, could you please explain the reason? Just curious, don't mean to be rude. :)

    We've built pie based AOSP roms however samsung has done something odd with their vendor partition with their upgrade to pie which renders the hardware composer broken. With HWC broken the roms have broken white balance and aren't smooth along with added battery drain as the roms will use GPU to render UI elements.

    A couple of these builds were released on our telegram channel but they suck.

    Due to this issue I have actually sold my Note 9 and switched to a Pixel 3 XL in January. There's no hope for pie based AOSP Roms I'm afraid, unless you want a buggy experience.
    3
    Great stuff, I will flash it once its up. Thank you alot :)

    OP Updated, new build here. Nice work on the post by the way and thanks for sharing the video. I'm surprised it works so well on an AOSP rom. Definitely a useful post, I definitely recommend maybe posting it in the guides forum and maybe title is as "SPen functionality on AOSP ROMs" maybe. It's something I'm sure a lot of people would love to know about! I've not gotten around to trying it out yet as I've been constantly wiping and flashing new test builds of pie based roms, but will definitely be downloading GMD Tonight.
    3
    New build uploaded. Runs a lot smoother now and the status bar padding has been fixed.