Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,732,428 Members 47,164 Now Online
XDA Developers Android and Mobile Development Forum

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

Tip us?
 
Marvis21
Old
(Last edited by Marvis21; 23rd May 2014 at 10:14 PM.)
#1  
Marvis21's Avatar
Member - OP
Thanks Meter 35
Posts: 76
Join Date: Dec 2013
Talking [How-to][Mod][App][KK]SystemUI-S5-Mode without Build.prop

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:
 
The Following 8 Users Say Thank You to Marvis21 For This Useful Post: [ Click to Expand ]
 
Marvis21
Old
(Last edited by Marvis21; 23rd May 2014 at 10:21 PM.)
#2  
Marvis21's Avatar
Member - OP
Thanks Meter 35
Posts: 76
Join Date: Dec 2013
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, 134 views)
The Following User Says Thank You to Marvis21 For This Useful Post: [ Click to Expand ]
 
george stamatos
Old
#4  
george stamatos's Avatar
Senior Member
Thanks Meter 133
Posts: 282
Join Date: Aug 2013
Location: Athens
And a new Android developer was born...
Gongrats my friend, excellent work!!

Galaxy S3 : Multiboot with Arter97 kernel

efeXTREME S5 themed 4.3- CM11 latest nightly - SlimKat latest nightly - Carbon latest nightly

i Phone 4 (... for cracking nuts !)

Vido-Yuandao N80IPS: rooted... No available roms...

MK 809iii tv-dongle: rooted... Beyond XBMC 3.4
The Following 2 Users Say Thank You to george stamatos For This Useful Post: [ Click to Expand ]
 
cornelha
Old
(Last edited by cornelha; 24th May 2014 at 09:45 AM.)
#5  
cornelha's Avatar
Senior Member
Thanks Meter 547
Posts: 1,237
Join Date: Dec 2007
Location: Durban
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
Samsung Galaxy SIII
OmniRom 4.4.1 Nightly
 
xda_Noob.
Old
#6  
xda_Noob.'s Avatar
Senior Member
Thanks Meter 416
Posts: 916
Join Date: Apr 2013
Location: Berlin
Change build problem device name and product name to SM-G900 , kltexx, and klte you will get same results.
Proudly send From my Samsung Galaxy S3 running GlamourS5 ROM or may I call it Samsung Galaxy S5 Mini ?
 
Marvis21
Old
(Last edited by Marvis21; 24th May 2014 at 09:38 PM.) Reason: Found something more
#7  
Marvis21's Avatar
Member - OP
Thanks Meter 35
Posts: 76
Join Date: Dec 2013
Quote:
Originally Posted by xda_Noob. View Post
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.

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


XDA PORTAL POSTS

Run, Jump, and Shoot in Tales of Ciaxia

There are certain types of games that have become paramount of the portable gaming world. As we have … more

Samsung Gear Live Stock Firmware Image Pulled, Temp Root

Just yesterday,XDA Recognized Developer and TV ProducerAdamOutlertore apart … more

Draw a Line and Let Your Device Do the Rest with LineitApp

Over the years, since evenbefore Android entered the scene, we have striven to … more