• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root {guide} how to port ink effect the easy way

what would you all like to see next?

  • multwindow

    Votes: 0 0.0%
  • aosp lockscreen

    Votes: 0 0.0%
  • sense task swticher

    Votes: 1 50.0%
  • what ever i can think of

    Votes: 1 50.0%

  • Total voters
    2
this is a step by step on the brain fart it took me to get this working in less then maybe 5 or 10 mins. this will not make you a full fledge dev but it will give you the understanding of whats going on here.

(before we start i want you to decompile your secsettings and navigate to values/public.xml search for ink_effect
if you found it then we can move on if not the follow the below link to the guide how to add this feature on your rom/files this guide just enables the default colors)

you should know how to use apktool,baksmali,smali,adb and notepad+
(the last one you better know or this is going to be a long day :p )


=======================================================================================================
(STEP 1)
3 files in order

framework-res.apk
secsettings.apk
android.policy.jar

and we need the source for all of this so go here (and thank this guy a million times) download his ink source
[RUDE GUIDE][XXLSJ] How to add Ink Effect on… | Galaxy S II | XDA Forum



make a folder or if you are organized, use your working folder for this we want to keep all files in there rightful place.
i did this c:\project\(device_name_rom)\system\ink_effect

its easier for me to do it like this as all files are kept in order.

========================================================================================================

(step 2)
inside your framework-res you will naviagte to bools which is in here
C:\project\exhibit-gturn\org_framework-res\res\values-hdpi << this is the one you want.

<?xml version="1.0" encoding="utf-8"?>
<resources>
<bool name="config_isWaterRippleEnabled">false</bool>
</resources>
change the false to true to enable ripple effect

and now just recompile it and sigh with the orginal meta/AndroidManifest
you should know how to do this. test your device
(please note you need the libwaterripple.so for this to work)
which is in the inksource that you downloaded.
adb push the libwaterripple.so 1 & 2 both of them to /system/lib

wasn't that easy and fun :) ok now on to the next

===========================================================================================================
(STEP 3)(get some coffee you will need it)
so i kept researching and asking for help never got it. finally i got mad threw a baby fit and took a break.

(new thing called shut down pc for awhile, my wife told me about it. :thinking: i know i was to. )

i was rubbing her preggy tummy, she told me how maybe i did not need to do all that. of what the guides said
what if i just to enable them. and then the wood plank slapped me. how right she was. (thanks to my wife :D )

as it turns out a lot of guides are based on a few years ago vs today.
but the oems left the code in there software for us to use.
{this is just a theory}

when i decompiled my secsettings .apk the ink effect was already there in the string files and in public along with the smali files. i spent 4 days redoing theses files as the guide said to. so one day late at night i said beep it
i stopped my compiler and just edited one line shown here

inside your decompiled sec settings navagte to lcokscreensettings.smali
C:\project\(device_name_rom)\ink_effect\SecSettings\smali\com\android\settings

lockscreensettings.smail .line 264 <<<< i removed the below line

invoke-virtual {v5, v9}, Landroid/preference/PreferenceScreen;->removePreference(Landroid/preference/Preference;)Z

as it showed in the above code this line hides/ or removed the ink effect from settings. (clever oems :rolleyes: ) so following the above code remove the line from your file

(note that the vaules and lines on your rom/files could be different and that is why we needed the guides)

by following this guide tdunham
[GUIDE][How-to] Ink Effect Mod 18 Colors for JB - XDA Forum
i noticed how he said to add the # sign in front of the string
as i did this i kept getting compile errors.

.line 262
.local v5, ps:Landroid/preference/PreferenceScreen;
iget-object v9, p0, Lcom/android/settings/LockScreenSettings;->mInkEffect:Landroid/preference/PreferenceScreen;

# invoke-virtual {v5, v9}, Landroid/preference/PreferenceScreen;->removePreference(Landroid/preference/Preference;)Z

so i then went to this guy jarari2
[RUDE GUIDE][XXLSJ] How to add Ink Effect on… | Galaxy S II | XDA Forum

and noticed that this was a mess to deal with but he did help out really well
instead of adding the # sign to the above code from tundam he removed it which showed the ink effect settings :p
(you shouldn't have any compile errors at this point)

so recompile your secsettings as we are done with this, and dont forget to sign with your secsetting keys as this is a system app then test it by adb pushing to your device.
it should come up with no boot loops and then on your phone, go to lock screen lock screen settings and you will see ink effect.
:yay: but you are not done yet buddy this just enabled it for you. but the thing about inkeffect is we need a spen,
and we couldn't use spen on our device if we wanted. so now on to the next step.
this is a look over as to what we did step by step
1, we decompiled secsettings.apk
2, we opened lockscreensettings.smali in notepad+
3,we removed the line that was hiding our ink effect .line 262
4,we recompiled and pushed to our device for testing

so go ahead and pat your self on the back for this. done? okay good.

=========================================================================================
(STEP 4) (android.policy.jar)
this was the easiest of them all.
jarari2 said in his guide that he had to remove this check com.sec.feature.spen_usp
and hard code our fingers to be used as the spen. (go and thank this man a million times)

decompile your jar file we will be just copying and pasting some files.
navigate to android.policy\com\android\internal\policy\impl\sec

copy and paste all the
cicrlerendering.smali,JniWaterRippleRender.smali and inkeffect to the folder. overwrite them.

recompile your classes-out folder and add it back to your android.policy push to your device and wait for it to come back up you should see ink_effect as you touch your lock screen.

that is all enjoy ink.
==========================================================================================
if i helped/taught you. please give thanks for the guide.

all links/files are by there respective owners.
i do not take credit for making them but only for making this guide
do not ask me to post there files as "straight download links" it would not be fair
for me to clam there work as mine.

credits
jarari2: for his awesome code,files,guide. (really go and thank this guy)
my wife for nagging me and telling me i didn't need to work so hard for something fun.
 
  • Like
Reactions: scary alien
inkeffect allo2s your spen on the note 2 to be used as a pen a real pen hince the ink part my guide follows on how you can add it into most 4.1.2 roms this guide wont add new colors or the color picker but instead allow default colors which are already there in the smali files. im looking into the color picker part but to be honest i just had a new born and i got an s3 that i am romming and theming i have this phone but it doesnt response to touchscreen inputs. anyway you should probably ask google about inkeffect or another effect.
 
Upvote 0
sorry its taken me way longer than needed to for a reply just had quite a bit of a shambol.
this guide only shows how to enable it on this device running this version of android which is probably ****ing ancient at this point in time. i didn't follow most of the guides i used cause they stated to add this and that. i found an easier way to make i guess yoy can call it a default happen. this was allowed to happen cause i followed only parts of each guide listed and used my brain to figure out other problems and such. if anyone still has this phone and would like some help plz do ask i haven't forgotten about it just i no longer have it and the s5 isn't that easy to root anymore. and again its a struggle between life and love haha
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones