Post Reply

[How-to][Mod][App][KK]SystemUI-S5-Mode without Build.prop

23rd May 2014, 10:10 PM   |  #1  
Marvis21's Avatar
OP Member
Thanks Meter: 39
 
86 posts
Join Date:Joined: Dec 2013
More
Hi XDA,

finally I can give something back, after reading and learning so much in the last 5 month.

Watching @JustArchi @Kryten2k35 and all the others who are bringing in there 2 cents, bringing Kitkat to our beloved S3, i've started looking for some S5 Apps, Mods and Ports.
After finding the S5 Status bar, I have tested many different SystemUI.apk and at every time i had to modify the build.prop to SM-G900.

But Stock Quick Panel didn't make me happy. Even with Wanam Xposed.
 


Till now I have searched over 7 days in the .xml and .smali code from diffent apk for this one line that makes the difference. I found the background .png from the new Quick Panel in SystemUI leading to status_bar_expanded.xml, so i though SystemUI is the right place to search.
But there was nothing to find. Next step... Reading about smali.... Start to read smali...

The first i found was in SystemUI.apk\smali\com\android\systemui\Feature.sm ali

Code:
    .line 94 
# enables Stock Statusbar (jellybean)
    sget-object v0, Lcom/android/systemui/statusbar/Feature;->mProductName:Ljava/lang/String;

    const-string v3, "m0"

    invoke-virtual {v0, v3}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v0

    if-nez v0, :cond_d
our device GT-I9300 (m0xx, m0). But it takes 5 more days to understand what it does.

Next i found was:

Code:
   .line 90
    sget-object v0, Lcom/android/systemui/statusbar/Feature;->mProductName:Ljava/lang/String;

    const-string v3, "klte"

    invoke-virtual {v0, v3}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v0

    if-nez v0, :cond_a
but nowhere in the code i found SM-G900. So i searched witch values for ro.product.name and ro.product.device are working for the new S5 Quick Panel. Testing with many devices mentioned in this part i figured out with line are doing what i want. Yesterday evening I do a mistake and wrote "klet" in build.prop. And it shows also the S5 Quick Panel.

So the next thing i've tried was:

Code:
   .line 90
# adding 
    sget-object v0, Lcom/android/systemui/statusbar/Feature;->mProductName:Ljava/lang/String;

    const-string v3, "m0"

    invoke-virtual {v0, v3}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v0

    if-nez v0, :cond_a
# will enable S Finder and Quick Connect (but without function)
and this happens:
 
wtf!

So the last step:
Code:
    .line 94 
#  enables Stock Statusbar
    sget-object v0, Lcom/android/systemui/statusbar/Feature;->mProductName:Ljava/lang/String;

    const-string v3, "m0"

    invoke-virtual {v0, v3}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v0

    if-nez v0, :cond_d
# deleting this disables Stock Quick Panel overlay


 


So simpel, just removing 4 lines of code and adding 4 lines of code.

I hope someone can take use of this!

BTW:

If you delete this in /res/layout/status_bar_expanded.xml
PHP Code:
                   <LinearLayout android:orientation="vertical" android:id="@id/sfinder_qconnect_layout" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="wrap_content">
                        <
LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:paddingLeft="@dimen/finder_connect_button_padding_right" android:paddingTop="@dimen/finder_connect_button_padding_top" android:paddingRight="@dimen/finder_connect_button_padding_left" android:paddingBottom="@dimen/finder_connect_button_padding_bottom" android:layout_width="fill_parent" android:layout_height="wrap_content">
                            <
Button android:textSize="@dimen/tw_quick_panel_sfinder_qconnect_button_text_size" android:textColor="@drawable/tw_quick_panel_sfinder_qconnect_button_text_color" android:id="@id/sfinder_button_big" android:background="@drawable/tw_quick_panel_sfinder_qconnect_button" android:layout_width="0.0dip" android:layout_height="@dimen/finder_connect_button_height" android:layout_marginRight="10.0dip" android:text="@string/accessibility_sfinder_button" android:layout_weight="0.5" android:fontFamily="sec-roboto-light" />
                            <
Button android:textSize="@dimen/tw_quick_panel_sfinder_qconnect_button_text_size" android:textColor="@drawable/tw_quick_panel_sfinder_qconnect_button_text_color" android:id="@id/qconnect_button_big" android:background="@drawable/tw_quick_panel_sfinder_qconnect_button" android:layout_width="0.0dip" android:layout_height="@dimen/finder_connect_button_height" android:layout_marginLeft="10.0dip" android:text="@string/accessibility_qconnect_button" android:layout_weight="0.5" android:fontFamily="sec-roboto-light" />
                        </
LinearLayout>
                        <
View android:id="@id/sfinder_qconnect_divider" android:background="@drawable/notification_bottom_line" android:layout_width="fill_parent" android:layout_height="1.0dip" />
                    </
LinearLayout
then you will get this:
 
Last edited by Marvis21; 23rd May 2014 at 10:14 PM.
The Following 8 Users Say Thank You to Marvis21 For This Useful Post: [ View ]
23rd May 2014, 10:11 PM   |  #2  
Marvis21's Avatar
OP Member
Thanks Meter: 39
 
86 posts
Join Date:Joined: Dec 2013
More
I have tested it for 4 hours now and here it is.
My way of changing the SystemUI.apk is:
Place new SystemUI in /System/
Set right permissions (rw/r/r)
Make a copy of your old SystemUI.apk in /system/priv-app, for example rename the copy to SystemUI.apkold. If something goes wrong reboot your phone and rename it back.
Copy the modded SystemUI.apk from /system/ to /system/priv-app/ so it replaces stock.

The SystemUI.apk attached is without Quick Connect and S Finder, because for me it's ugly and for the moment i don't use it!
Feel free to use this in your Mods. (Would be nice if you just give a credit )
Attached Files
File Type: apk SystemUI.apk - [Click for QR Code] (3.80 MB, 171 views)
Last edited by Marvis21; 23rd May 2014 at 10:21 PM.
The Following User Says Thank You to Marvis21 For This Useful Post: [ View ]
24th May 2014, 02:09 AM   |  #4  
george stamatos's Avatar
Senior Member
Flag Athens
Thanks Meter: 162
 
338 posts
Join Date:Joined: Aug 2013
More
And a new Android developer was born...
Gongrats my friend, excellent work!!
The Following 2 Users Say Thank You to george stamatos For This Useful Post: [ View ]
24th May 2014, 09:13 AM   |  #5  
cornelha's Avatar
Senior Member
Flag Durban
Thanks Meter: 577
 
1,283 posts
Join Date:Joined: Dec 2007
More
I used the build.prop method and found the S Finder and Quick connect buttons also just ruins the look, thank you so much. Saved me some headaches.

Now if you could be so kind and get us a working S5 settings with search capability, you would be the man
Edit: it breaks the S4 theme, but still looks better than having those useless buttons
Last edited by cornelha; 24th May 2014 at 09:45 AM.
24th May 2014, 03:30 PM   |  #6  
xda_Noob.'s Avatar
Senior Member
Berlin
Thanks Meter: 556
 
1,128 posts
Join Date:Joined: Apr 2013
More
Change build problem device name and product name to SM-G900 , kltexx, and klte you will get same results.
24th May 2014, 08:27 PM   |  #7  
Marvis21's Avatar
OP Member
Thanks Meter: 39
 
86 posts
Join Date:Joined: Dec 2013
More
Quote:
Originally Posted by xda_Noob.

Change build problem device name and product name to SM-G900 , kltexx, and klte you will get same results.

I'am not sure if I understood what you meant?

That's what I was writing in the OP.
Quote:

So i searched witch values for ro.product.name and ro.product.device are working for the new S5 Quick Panel.

These should be: klte, k3g, kwifi, kmini, kactive, kqlte, SC-04F, SCL23, lentislte, trlte

Interessing is the fact that SM-G900 is not listet there... This could mean that adding code to the smali maybe is not needed. It could be enough to remove the "m0" part in line 94.

I will check this...

BTW:
Thanks to @BDFreak for his awesome Advanced Apktool. It's working so good!

Edit:

So it is. Just deleting the 4 lines in line 94 in smali is enough to enable the new kitkat quicksettings. This is the reason why setting ro.product.name and device to SM-G900 (which doesn't makes sence because SM-G900 is the ro.product.model value) works.
Last edited by Marvis21; 24th May 2014 at 09:38 PM. Reason: Found something more

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Top Threads in Galaxy S III Themes and Apps by ThreadRank