yashsingh1/xdaforums huggingface dataset:
[Sony Cross-Device Development Themes and Apps] dheeraj.radke:
Thanks mate for this awesome post. Can you please make some flashable zip or magisk module for the same for noobs like me?
[Sony Cross-Device Development Themes and Apps] alreadyregistered:
CPU usage?
[Sony Cross-Device Development Themes and Apps] Aarkay0804:
Hey man, the idea is awesome!!

Since you mentioned deodexed ROM is needed, I'm wondering whether Resurrection Remix Oreo(official build) lies in which category: odexed or deodexed??

Want to proceed with full knowledge, partial one is quite vulnerable...

Thanks buddy, for this amazing work!!
[Sony Cross-Device Development Themes and Apps] Ticklefish:
Looking into this, it seems you can't just take the code from the Pixel and put it into your rom as 7.0 doesn't have the required API's for this mod to work.

You could use the animated icon code from this thread but you will need to make the drawable images yourself. And work out how to edit the smali so the animation only starts when you press the icon.

Tricky but not impossible, I think.

Technically, yes. Having a moving icon will use more power than a stationary one.

It shouldn't consume much, though. The CPU isn't having to work very hard. But if you do find your battery going down too fast, just go back to your original SystemUI.apk.

Flashable ZIP's wouldn't really work, sadly. Because every rom has a different SystemUI.apk with different XML, I would have to make a ZIP for every single one..

And Magisk is a bit beyond me, right now.

Give the mod a try. It's relatively simple and I'm always happy to help if you have trouble.

And, if you've made a backup, you always have a way to fix things if it doesn't work.

A little, yes. Look at my reply a few lines up.
[Sony Cross-Device Development Themes and Apps] Ticklefish:
I don't know, sorry. But I'd assume that a third-party rom, especially one made by modders for modders, would be deodexed.

If you have a SystemUI.odex or SystemUI.vdex in your SystemUI folder or subfolders then your rom is odexed and you'll need to deodex it to do this mod.
[Sony Cross-Device Development Themes and Apps] jaspad1710:
Will there be any serious probs if i messed up at one step or other in this guide?
[Sony Cross-Device Development Themes and Apps] Ticklefish:
Nope. As long as you make a backup before putting your modified APK back on your phone, you'll be fine.
[Sony Cross-Device Development Themes and Apps] whalesplaho:
Thanks for tha clarification bro... I understand better now!
[Sony Cross-Device Development Themes and Apps] crossxx11:
[MENTION=4315551]Ticklefish[/MENTION] I have a bit of a change to the file / com / android / morningstar but I'm starting to look at the code as "com.android.systemui.morningstar" I'm constantly getting bugs trying to figure out how to get this bruised.
[Sony Cross-Device Development Themes and Apps] Albe96:
'com.android.systemui.morningstar' <-- this defines the path of the smali which is in smali/com/android/systemui/morningstar.So you'll obviously get bugs/fcs.Else maintain the path or if you want to put it in smali/com/android/morningstar,change the xml to 'com.android.morningstar'.But then you've to fix the paths in smalis too.So better to keep what it was. . .
[Sony Cross-Device Development Themes and Apps] Ticklefish:
Thanks for this. It seems I had a mistake in the tutorial and the XML was wrong. I've corrected the text. Sorry about that.

Interestingly nobody else had noticed, which means nobody else had tried..
[Sony Cross-Device Development Themes and Apps] Er. Aditya:
sir i am not able to compile with the home.xml edit can u please take a look where exactly to edit
[Sony Cross-Device Development Themes and Apps] Albe96:
Can't see.Attach as a zip
[Sony Cross-Device Development Themes and Apps] Er. Aditya:
here sir
[Sony Cross-Device Development Themes and Apps] Albe96:
Well.OP never said to copy the whole home.xml modifications.The guide implemented for Sony devices,and the values and ids stuffs are not same with your manufacturer(Samsung).He did say to modify as you own.Well the original home.xml in Samsung looks like this-->

<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/home" android:layout_width="@dimen/navigation_key_width" android:layout_height="fill_parent" android:scaleType="center" android:layout_weight="0.0" android:contentDescription="@string/sec_accessibility_home" android:paddingStart="@dimen/navigation_key_padding" android:paddingEnd="@dimen/navigation_key_padding" systemui:keyCode="3"
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:systemui="http://schemas.android.com/apk/res-auto" />

Look at these --> android:contentDescription="@string/sec_accessibility_home" , android:id="@id/home".You've to modify seeing what values you have.

So the modification should be like this-->

<?xml version="1.0" encoding="utf-8"?>
<FrameLayout android:layout_width="@dimen/navigation_key_width" android:layout_height="fill_parent">
<com.android.systemui.statusbar.policy.KeyButtonView android:layout_gravity="center" android:layout_width="@dimen/navigation_key_width" android:layout_height="fill_parent" android:src="@drawable/transparent" android:scaleType="center" android:contentDescription="@string/sec_accessibility_home" systemui:keyCode="3" />
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/home" android:layout_width="@dimen/navigation_key_width" android:layout_height="fill_parent" android:scaleType="center" android:layout_weight="0.0" android:contentDescription="@string/sec_accessibility_home" android:paddingStart="@dimen/navigation_key_padding" android:paddingEnd="@dimen/navigation_key_padding" systemui:keyCode="3"
<com.android.morningstar.SelfAnimatingImageView android:layout_gravity="center" android:id="@+id/frame_animation" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/frame_anim" />
</FrameLayout>
<xmlns:android="http://schemas.android.com/apk/res/android" xmlns:systemui="http://schemas.android.com/apk/res-auto" />

Note: Don't copy my modification if the original xml doesn't look like what I showed.I didn't test it btw :fingers-crossed:
[Sony Cross-Device Development Themes and Apps] Er. Aditya:
i allready tried with an error

"W: D:\Apktools\TickleMyAndroid\_WorkArea1\_working\SystemUI.apk\res\layout\home.xml:2: error: Error parsing XML: unbound prefix"
[Sony Cross-Device Development Themes and Apps] Albe96:
Try now-->

<?xml version="1.0" encoding="utf-8"?>
<FrameLayout android:layout_width="@dimen/navigation_key_width" android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:systemui="http://schemas.android.com/apk/res-auto">
<com.android.systemui.statusbar.policy.KeyButtonView android:layout_gravity="center" android:layout_width="@dimen/navigation_key_width" android:layout_height="fill_parent" android:src="@drawable/transparent" android:scaleType="center" android:contentDescription="@string/sec_accessibility_home" systemui:keyCode="3" />
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/home" android:layout_width="@dimen/navigation_key_width" android:layout_height="fill_parent" android:scaleType="center" android:layout_weight="0.0" android:contentDescription="@string/sec_accessibility_home" android:paddingStart="@dimen/navigation_key_padding" android:paddingEnd="@dimen/navigation_key_padding" systemui:keyCode="3" />
<com.android.morningstar.SelfAnimatingImageView android:layout_gravity="center" android:id="@+id/frame_animation" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/frame_anim" />
</FrameLayout>
[Sony Cross-Device Development Themes and Apps] Er. Aditya:
W: D:\Apktools\TickleMyAndroid\_WorkArea1\_working\SystemUI.apk\res\layout\home.xml:2: error: Error parsing XML: XML or text declaration not at start of entity
[Sony Cross-Device Development Themes and Apps] Albe96:
compiled for me :eek:
[Sony Cross-Device Development Themes and Apps] Ticklefish:
I'm always happy to try to help a TMA user. They're special, beautiful people..;)

I think this problem is due to the XML namespaces in the code. The error says that "XML or text declaration not at start of entity".

Doing a bit of Googling shows people who've had this error because they either had blank space at the start of the XML, or because they had an issue with the namespaces.

If I copy and paste the code that [MENTION=7334959]Albe96[/MENTION] kindly came up with into Notepad++, I get this:

1. <?xml version="1.0" encoding="utf-8"?>
2. <FrameLayout android:layout_width="@dimen/navigation_key_width" android:layout_height="fill_parent"
3. xmlns:android="http://schemas.android.com/apk/res/android" xmlns:systemui="http://schemas.android.com/apk/res-auto">
4.	<com.android.systemui.statusbar.policy.KeyButtonView android:layout_gravity="center" android:layout_width="@dimen/navigation_key_width" android:layout_height="fill_parent" android:src="@drawable/transparent" android:scaleType="center" android:contentDescription="@string/sec_accessibility_home" systemui:keyCode="3" />
5.	<com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/home" android:layout_width="@dimen/navigation_key_width" android:layout_height="fill_parent" android:scaleType="center" android:layout_weight="0.0" android:contentDescription="@string/sec_accessibility_home" android:paddingStart="@dimen/navigation_key_padding" android:paddingEnd="@dimen/navigation_key_padding" systemui:keyCode="3" />
6.	<com.android.morningstar.SelfAnimatingImageView android:layout_gravity="center" android:id="@+id/frame_animation" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/frame_anim" />
7. </FrameLayout>

Line 3 shouldn't be an individual line - it should be part of line 2. I'm guessing that apktool is reading line 2, without realising that line 3 is meant to be part of it, and complaining.

Try the code again but delete the line return and the end of line 2. Every individual line should only start with a "<" symbol.
[Sony Cross-Device Development Themes and Apps] Er. Aditya:
Thankyou both the great people here
[Sony Cross-Device Development Themes and Apps] Ticklefish:
Just to let everybody know, I've just added a few more icons to the second post. Nothing wildly exciting but hopefully somebody might enjoy them. :)

Looking good! :highfive:
[Sony Cross-Device Development Themes and Apps] Er. Aditya:
We always enjoy with TMA sir :D
[Sony Cross-Device Development Themes and Apps] Albe96:
Good to see you got success! ?

---------- Post added at 04:13 PM ---------- Previous post was at 04:07 PM ----------

Yeah.You are right!
[Sony Cross-Device Development Themes and Apps] crossxx11:
I tried my g4 stylus 5.0.2 too but I got the error, could you help me on fixing the xml?
[Sony Cross-Device Development Themes and Apps] Ticklefish:
What is the error that you got?
[Sony Cross-Device Development Themes and Apps] crossxx11:
Your send pm and codes and smali ok but gif don't see systemui
[Sony Cross-Device Development Themes and Apps] Ticklefish:
I'm sorry but I don't understand what you mean about the gif seeing the systemui.

What is the actual error that you're seeing on screen?
[Sony Cross-Device Development Themes and Apps] Gheartxz2017:
this is compatible with substratum themes?
[Sony Cross-Device Development Themes and Apps] Er. Aditya:
Sir is it possible to get the chabged with rc on fly ? :P
[Sony Cross-Device Development Themes and Apps] crossxx11:
I'm fail editing navigation_bar.xml and dont work
[Sony Cross-Device Development Themes and Apps] djfuego:
This thread is interesting me. Are other image formats supported eg: (WebP) has anyone tested this yet?
[Sony Cross-Device Development Themes and Apps] Ticklefish:
Unfortunately not, no. This is introducing an element of the UI that substratum doesn't know about.

In theory, you could change this with Rom Control on the fly. You would probably need to get the smali to point to different XML files (frame_anim1, frame_anim2, etc).

I'm not a smali expert though so I wouldn't know where to start.

Yes, but in what way didn't it work? Are you having trouble knowing what to change in the code? Are you getting an error when you try to recompile? Are you having trouble putting the new APK back on your phone?

If you're getting an error, what actually is the error?

Unless I know what the problem is, I won't be able to know how to fix it.

This hasn't been tested with WebP format files but, since Android supports them, there shouldn't be any trouble. Just be sure to use them on Android 4.3 or above. Anything older and the transparency won't work.

In fact anything older than Android 4.0 and they won't work at all.
[Sony Cross-Device Development Themes and Apps] crossxx11:
I'm fail navigation bar xml editing help me only no compile error and other errors only xml editing. You edit my xml and try again your send message
[Sony Cross-Device Development Themes and Apps] Ticklefish:
Show me the code that you've edited and I can take a look at it.

Again, what is the problem you're having with the code?
[Sony Cross-Device Development Themes and Apps] crossxx11:
Okey I'm again editing first don't work fail is picture send here
[Sony Cross-Device Development Themes and Apps] Aarkay0804:
Will have to check for this, will report back post trying!

Thanks!!
[Sony Cross-Device Development Themes and Apps] mirkolo:
Good day to All

Somebody help my .

how can find which is the right file files to the appropriate "drawable-?dp where i should add lw img, png.?

and also step number 5 I do not have much clear.

thank you in advance..

now i use HAVOC rom based in lineage 15.1
[Sony Cross-Device Development Themes and Apps] Ticklefish:
The folder depends on the DPI of your particular device. A good trick is just to look in each folder and see which one has most image files in it - that'll be the right folder to use.

If you use another one, it won't cause a problem but it might just mean that your image doesn't look quite right.

For step 5 you have to edit your XML. This is going to be different for every rom so there's no point me saying exactly what code to write - you have to work it out yourself. You have to find the line of code that shows your HOME softkey and edit it.
[Sony Cross-Device Development Themes and Apps] Samrat Sengupta:
Hi Sir,

I found this very fascinating and admire the tickle and artistry. I am presently on resurrection remix. I found the keycode but please kindly help me out with the code below:

<?xml version="1.0" encoding="UTF-8"?>

<com.android.systemui.statusbar.policy.KeyButtonView xmlns:systemui="http://schemas.android.com/apk/res-auto" xmlns:android="http://schemas.android.com/apk/res/android" systemui:keyCode="3" android:paddingEnd="@dimen/navigation_key_padding" android:paddingStart="@dimen/navigation_key_padding" android:contentDescription="@string/accessibility_home" android:layout_weight="0.0" android:scaleType="center" android:src="@drawable/ic_sysbar_home" android:layout_height="fill_parent" android:layout_width="@dimen/navigation_key_width" android:id="@id/home"/>
[Sony Cross-Device Development Themes and Apps] Ticklefish:
The second line is the one that shows the actual softkey. You need to put that into a FrameLayout as I mention in the OP.

You might need to take out the 'xmlns' attributes and put them in the FrameLayout line though.
[Sony Cross-Device Development Themes and Apps] tanfidzularus:
Interesting. Is there any memory increase usage after we implement this mod?
[Sony Cross-Device Development Themes and Apps] Ticklefish:
Not really. This mod does make your phone work that little bit harder, but not a great deal. I had this on my last phone (I'm currently unrooted) and didn't notice any difference to the battery or performance.

But you're welcome to give it a try and see what you think. As long as you make a backup, you can easily get your phone back the way it was.
[Sony Cross-Device Development Themes and Apps] tanfidzularus:
Back in the days, boot animation is using jpg, png and gif file. But now using mp4. U think we can implement mp4 file as a replacement for gif?
[Sony Cross-Device Development Themes and Apps] Ticklefish:
For this mod? Possibly. But that could have a massive impact on the performance of the phone. A boot animation runs once - the animation in the nav bar is running the entire time the screen is on.

That's fine if Android is just cycling through a short selection of small images. But if it's displaying a video, I can see that using a lot of resources .
[Sony Cross-Device Development Themes and Apps] gcrutchr:
Any chance you can post an actual working home.xml?
[Sony Cross-Device Development Themes and Apps] Ticklefish:
If I post one from my rom, it won't work on yours. That's why you have to edit your own.
[Sony Cross-Device Development Themes and Apps] Ticklefish:
Sorry, I wasn't in a good mood yesterday and I didn't respond the way I should have. My home.xml won't work on your phone...but I'm more than happy to take a look at yours and show you what changes are needed.
[Sony Cross-Device Development Themes and Apps] gcrutchr:
No problem. I just wanted to look at it, read it, and understand what you did.. I did not want to use it in my rom. Thanks for the reply.
[Sony Cross-Device Development Themes and Apps] Ticklefish:
That makes sense. Let me see what I can come up with.
[Sony Cross-Device Development Themes and Apps] Ticklefish:
So this is a stock "home.xml":

<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.statusbar.policy.KeyButtonView
android:id="@id/home"
android:layout_width="@dimen/navigation_key_width"
android:layout_height="fill_parent"
android:src="@drawable/ic_sysbar_home"
android:scaleType="center"
android:layout_weight="0.0"
android:contentDescription="@string/accessibility_home"
android:paddingStart="@dimen/navigation_key_padding"
android:paddingEnd="@dimen/navigation_key_padding"
systemui:keyCode="3"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:systemui="http://schemas.android.com/apk/res-auto"
/>

(I've reformatted it to make it more readable)

This is the same file with the required changes in it:

<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
android:layout_width="@dimen/navigation_key_width"
android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:systemui="http://schemas.android.com/apk/res-auto"
>
<com.android.systemui.statusbar.policy.KeyButtonView
android:layout_gravity="center"
android:layout_width="@dimen/navigation_key_width"
android:layout_height="fill_parent"
android:src="@drawable/transparent"
android:scaleType="center"
android:contentDescription="@string/accessibility_home"
systemui:keyCode="3"
<!-- This is our new Home button. It's transparent so it's in the same place as our animation, can be tapped, but doesn't show -->
/>
<com.android.systemui.statusbar.policy.KeyButtonView
android:id="@id/home"
android:layout_width="0.0dip"
android:layout_height="0.0dip"
android:src="@drawable/ic_sysbar_home"
android:scaleType="center"
android:contentDescription="@string/accessibility_home"
systemui:keyCode="3"
<!-- This is our original Home button. We can't delete it as it'll stop the app from working, so we've reduced its size -->
/>
<com.android.morningstar.SelfAnimatingImageView
android:layout_gravity="center"
android:id="@+id/frame_animation"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/frame_anim"
<!-- This is our actual animation. -->
/>
</FrameLayout>

Looking at that code, I've realised you could just change the drawable file used by the original key to the transparent PNG. That would be a little simpler. But the above code works and it's possibly easier to understand for XML novices.

I hope this helps but let me know if you need any more information! :)
[Sony Cross-Device Development Themes and Apps] gcrutchr:
Thank you very, very much. This is exactly what I was looking for. I have a Note 10 I want to try this on.
[Sony Cross-Device Development Themes and Apps] rezt:
Im sorry before but i really can't edit the .xml file.

I didn't know which parts must be changed or replaced. can you help me please. Next I will attach my navigationbar.xml file.
[Sony Cross-Device Development Themes and Apps] jnappert:
Very nice. Is it possible to use this way to bring back NFC Symbol in the status bar on lineage os 17.1.?
[Sony Cross-Device Development Themes and Apps] rezt:
Thanks for your respon but images does'nt animated and the posisition not in center. It beside home button. Is im wrong when copas your code?
[Sony Cross-Device Development Themes and Apps] Ticklefish:
Interesting. Could you please share your SystemUI.apk and framework APK files? I'll try it on my setup and see what I can come up with.

Looking at your screenshot, I don't see any back icon or recent apps icon. Do you have those normally? Or do you have something different? It almost looks like you've got some form of gesture control. I haven't tried this mod on a phone with gesture control but, in theory at least, it should work.

In fact, if you could give me a screenshot of your normal home screen (without the mod) that'd be helpful as well.

I'll get this mod working for you somehow!!
[Sony Cross-Device Development Themes and Apps] rezt:
Thats cs im using this theme https://play.google.com/store/apps/details?id=com.yourcompanyname.xperia1 and thats normal. When im use another theme the image still beside home button. I take screnshoot there but thats after im restore original systemui. Btw im use z1c with lollipop rom deodex. Sorry for bad english
[Sony Cross-Device Development Themes and Apps] Ticklefish:
Your English is fine. :)

Try the attached APK file and let me know what happens.
[Sony Cross-Device Development Themes and Apps] rezt:
Thanks before n appreciated that. Hehe but image still not animated and besides home menu. First time when u give code its appears image frame.0 and now with your systemui.apk its appears frame.1
[Sony Cross-Device Development Themes and Apps] Ticklefish:
I'm not sure why the image isn't animated but I think I know why it wasn't in the right place. Try the attached and let me know what happens.

About the animation...are you wiping your Dalvik cache when you're putting the new APK onto your phone? If not, that would stop the animation from working.
[Sony Cross-Device Development Themes and Apps] rezt:
Yes i wipe cache n dalvik chache in recovery.

Mmm is it flashable file?

It still not animated but the position is fix now. Maybe my rom have problem. Is your file universal? I will try on my other device. Yeah still sony but on Z2
[Sony Cross-Device Development Themes and Apps] Ticklefish:
I've just had a thought about this. Is your rom deodexed?
[Sony Cross-Device Development Themes and Apps] rezt:
Yes. I use stock rom with deodex n superusermod also.
[Sony Cross-Device Development Themes and Apps] Ticklefish:
Odd. Then I'm not sure what's going wrong here. The smali works on Lollipop and you're doing the right things to load the new code so it can run. I really don't know why it isn't.

It might be worth getting a logcat and seeing if that helps solve this puzzle.
[Sony Cross-Device Development Themes and Apps] levone1:
Hi. quick question - I don't see any transparent png in your post or in custom_views zip. I don't mind making or finding my own, but you seemed to indicated that there was one already, so just double checking that there's not a certain size or something I need to use.

Thanks

Edit - nevermind, I figured it out... It's in the image zips. I didn't even look at those, since I was planning on doing my own. Thanks
[Sony Cross-Device Development Themes and Apps] Ticklefish:
I do like to make things challenging for people...:D

So you're using your own images? I'm intrigued - I'd love to see the result if you're happy to share!