Replies: 2 comments
-
Framework.jarBasically the same as what onyx-sdk provides, but a level lower. 1.1. Style Configuration (Java Framework)Stylus configuration begins in:
This method extracts stroke properties from an
It then sends these values to the native layer through: ViewUpdateHelper.setStrokeColor(...)
ViewUpdateHelper.setStrokeStyle(...)
ViewUpdateHelper.setStrokeWidth(...)
ViewUpdateHelper.setStrokeParameters(styleId, extraArgs)Only configuration happens here; no actual drawing is performed at this point. 1.2. Stylus Data Transmission (Java → SurfaceFlinger)When the stylus moves, the app sends stroke data using: startStroke(...)
addStrokePoint(...)
finishStroke(...)All three call the same IPC bridge: transactData(int code, float baseWidth, float x, float y, float pressure, float size, float time)
|
Beta Was this translation helpful? Give feedback.
0 replies
-
EpdController - Electronic Paper Display ControllerWhat can be controlled by RK32XXDeviceHere’s a structured list of everything this method retrieves via reflection, grouped by the target class and call type. I’m listing the exact field and method names as used in the reflection calls.Classes loaded via ReflectUtil.classForName:
Static int fields retrieved (getStaticIntFieldSafely):From android.onyx.ViewUpdateHelper:
From android.onyx.optimization.Constant:
Reflected methods (getMethodSafely or getDeclaredMethodSafely), grouped by class:android.onyx.hardware.DeviceController:
android.view.View:
android.webkit.WebView:
android.os.Environment:
android.view.InputManager (SDK >= 16):
android.app.ActivityManager:
android.onyx.AndroidSettingsHelper:
android.onyx.utils.ApplicationFreezeHelper:
android.onyx.utils.ActivityManagerHelper:
android.onyx.utils.FontsUtils:
android.app.Activity:
android.app.ActivityManagerNative:
EACReflectUtils.EINK_HELPER_CLS_NAME (class name resolved elsewhere):
android.onyx.ViewUpdateHelper (method, static context):
Notes:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Neo Tools Drawing Process
This discussion is dedicated to discovering how the Onyx SDK works. These are just my notes; it might not make sense sometimes.
Neo Tools Drawing Process:
NeoFountainPen→drawStroke:Compute stroke appearance:
This is achieved using
computeStrokePoints:Render stroke:
Using the computed points, the rendering process proceeds with functions such as
drawStrokeByPointSize.nativeComputeRenderPoints:This is implemented in
libneo_pen.so(System.loadLibrary("neo_pen");) and relies on stylus eventsonPenDown,onPenMove, andonPenUpto determine the appearance of the stroke.Pen Down
neopen_onPenDownis invoked when the pen contacts the surface.Pen Move
neopen_onPenMoveprocesses intermediate pen positions while the pen moves.Pen Up
neopen_onPenUpis invoked when the pen lifts from the surface.NeoFountainPen Example Process
How
NeoFountainPenWorks:Initialization:
NeoFountainPenstarts with an initial configuration in its constructor.param_1: Stroke width or thickness (e.g.,param_1is modified as(param_1 + 3.0) * 0.5).Rendering Events:
onDown: Triggered when the stroke starts. Clears previous state and initializes buffers to track the stroke path. CallsBrushStrokeRenderer::addPointto register the first point.onMove: Triggered while the stroke is in progress. Dynamically adds intermediate points usingBrushStrokeRenderer::addPointto ensure smooth transitions.onUp: Triggered when the stroke ends. Finalizes the rendering path and invokesBrushStrokeRenderermethods to compute the output.Stroke Smoothing:
BrushStrokeRenderer::addPointfunction determines how each touchpoint contributes to the overall stroke.*(float *)(this + 0x40)and*(float *)(this + 0x44)(min and max width).Intermediate Point Generation:
strokeTofunction calculates intermediate points for smooth rendering between two points.PenHelper::generateStrokePointsto compute intermediate curves for fine-grained rendering.Key Features of
NeoFountainPen:How setting stroke style works?
touchHelper.setStrokeStyleultimately maps to a device-specific function. The device class (e.g.,SDMDeviceinheriting fromBaseDevice) hascreateDevice()which reflectively fetches hidden/vendor methods.The stroke style setter is looked up directly on the (vendor‑patched)
android.view.View:This confirms
setStrokeStyle(int)is a hidden Onyx-added method onandroid.view.View(not part of standard Android).Invocation uses:
Passing
nullas receiver implies the method is static (or treated as such in Onyx’s framework). If reflection fails, the call is a no-op.Separately,
android.onyx.ViewUpdateHelperis loaded via:This class provides Onyx E‑Ink constants and helper methods (UI modes, masks, etc.), but it is not where
setStrokeStyleresides. It’s used to fetch configuration values and other EPD-related helpers duringcreateDevice().--To know more I need to get root access to my device to fetch framework.jar or something similar.--
I managed to get the framework.jar:
adb shell cat /system/framework/framework.jar > framework.jarSee also: timschneeb/OnyxTweaks#11
Beta Was this translation helpful? Give feedback.
All reactions