[Q] How to add data toggle in notification - Galaxy S II Q&A, Help & Troubleshooting

Hello Developers,
I want to know how to add the data toggle in notification.
I saw the need to change SystemUI.apk (xml and Smali) but this does not seem to be enough because I have the CF's.
Can you tell me more?
Thank you!

yes please
Yeah i was under the impression that it's Kernel/ROM dependent but its a massive feature im missing coming from a HTC desire running CM7 and im not up for testing the CM nightlies with a new baby to look after just in case my wife needs me asap lol

Please What do not say how to add the data toggle

cerede2000 said:
Hello Developers,
I want to know how to add the data toggle in notification.
I saw the need to change SystemUI.apk (xml and Smali) but this does not seem to be enough because I have the CF's.
Can you tell me more?
Thank you!
Click to expand...
Click to collapse
Wrong thread. You can find out more on " Samsung Galaxy S2 Q&A"

No one answers in Q & A as seems to be the case here.
Why no one wants to unravel the mystery

cerede2000 is right, this is a key feature, that I personally would love to see, on a stockish sgs2 rom.
I've recently noticed the appearance of the data toggle, which was promising, but no way to customise.
perhaps now that the devs are getting more stable roms they could delve further into this?
Ah one can dream.

Hold power button... Data off. hehe
Otherwise, I think Cognition ROM has it.

Yes Cognition have it
But i would add to my stock rom
Juste need answer at what files modified for add data toggle ?
Thanks!

cerede2000 said:
Yes Cognition have it
But i would add to my stock rom
Juste need answer at what files modified for add data toggle ?
Thanks!
Click to expand...
Click to collapse
Posted on your other thread in Q&A... It's in SystemUI.apk, can't say where though.

I try to modify SystemUI.apk in smali files but have FC's
Are you sure is just SystemUI.apk ?

I do not understand when I put directly SystemUI.apk of Cognition ROM it works well.
However when I change my ROM from my stock SystemUI.apk XXKG3 j'obtient one of FC's SystemUI.apk.
Please help me.
Here is my SystemUI.apk : http://www.multiupload.com/15QBK0IX9U
What is wrong with my SystemUI changed.
Thank you!

The reason is that your stock ROM is odexed and the other is deodexed.
This thread should be in the Q&A section.

Absolutely not! I deodex my rom...

Please look at my SystemUI.apk to tell me if something is wrong.
Thank you

cerede2000 said:
Please look at my SystemUI.apk to tell me if something is wrong.
Thank you
Click to expand...
Click to collapse
I didn't saw your nor cognition SystemUI.apk. but pushing the .png is not enough.
You should have to edit and modify .xml (baksmali) :
quickpanel_quick_settings.xml in /res/layout/
ids.xml and string.xml in res/values
don't touch to public.xml as it is auto generated when recompilation with APK_Manager
Not tested, but you should compare the files above

sicopat said:
I didn't saw your nor cognition SystemUI.apk. but pushing the .png is not enough.
You should have to edit and modify .xml (baksmali) :
quickpanel_quick_settings.xml in /res/layout/
ids.xml and string.xml in res/values
don't touch to public.xml as it is auto generated when recompilation with APK_Manager
Not tested, but you should compare the files above
Click to expand...
Click to collapse
I not only added the png. I changed the xml files and smali files.
I edit by hand public.xml.
I'll let ApkManager do I see if I have no FC's.

Great! It's work!
We had to do to just let ApkManager public.xml!

Related

[Q] How to modify notification toggle

Hello,
I would like know how to add a data toggle in notification widget in KG1 2.3.4 Rom.
Like in Cognition 1.15 Rom.
Which file must be modified to add a toggle ?
Thank you
I try to find in xml files in framework-res.apk and framework.jar but i don't know what to look for.
cerede2000 said:
I try to find in xml files in framework-res.apk and framework.jar but i don't know what to look for.
Click to expand...
Click to collapse
Look inside systemUI.apk, should be in there, not in framework-res.apk...

[Q] Status bar (Transparent)

Hey guys,
I am customizing ICS LP8 Rom. Any one know how what I need to edit in "framework-res.apk" to make the drop down notification background from status bar transparent??
Tks
I think you want twframework-res.apk, not framework-res.apk.
After decompiling, look in twframework-res.apk/res/drawable-hdpi for status_bar_item_background_normal.9.png.
Sorry, actually, I think it's in SystemUI.apk? I can't remember... but the file name is still status_bar_item_background_normal.9.png, I believe.
EDIT: Boy, I'm rusty.
Should be in framework-res.apk after all: /res/drawable-hdpi/status_bar_background.png.
ctomgee said:
EDIT: Boy, I'm rusty.
Should be in framework-res.apk after all: /res/drawable-hdpi/status_bar_background.png.
Click to expand...
Click to collapse
Thanks ctomgee,
Just toke a look but it does´t look like it, there is a png with that name but its not the background
Mad_Rick said:
Thanks ctomgee,
Just toke a look but it does´t look like it, there is a png with that name but its not the background
Click to expand...
Click to collapse
Ok, I was looking at an old project when I de-compiled framework-res.apk to mod my battery icon. Could be out-dated and wrong... give me a sec.
EDIT: hold on, actually. Are you on odexed stock? Because I am.... and it could be different for you if you are deodexed, or running a custom ROM.
EDIT 2: ok, I've downloaded my (stock, odexed) framework-res.apk, twframework-res.apk, and SystemUI.apk. I found my notification background in both framework-res.apk and SystemUI.apk, both in /res/drawable-hdpi, both named status_bar_background.png. I'm not sure which one it is though.
ctomgee said:
EDIT: hold on, actually. Are you on odexed stock?
EDIT 2: ok, I've downloaded my (stock, odexed) framework-res.apk, twframework-res.apk, and SystemUI.apk. I found my notification background in both framework-res.apk and SystemUI.apk, both in /res/drawable-hdpi, both named status_bar_background.png. I'm not sure which one it is though.
Click to expand...
Click to collapse
I am on "NEAT ROM LP8"(thanks Salesale) Fully Deodexed, Zipaligned.
Mad_Rick said:
I am on "NEAT ROM LP8"(thanks Salesale) Fully Deodexed, Zipaligned.
Click to expand...
Click to collapse
Hmm... then I'm guessing it would be in your SystemUI.apk. Check there. Decompile, look in /res/drawable-hdpi for all the images starting with "status_bar...".
If you don't find it there, look in the same location, same criteria, in framework-res.apk.

[Q] What is VRTHEME??

I saw lots of theme which has this in their title. but I can't find any guide or tutorial about this. So, what is this? how could I use it? has it any benefit over usual "decompile/theme/recompile/replace"ing an apk?Is there any script to implement it like apktool?
Its the universal theme flasher created by Villain ROM.
As for all your other questions I'm not sure.
Sent from my GT-I9100 using XDA
thanks,
correct me if I'm worng pls.
Universal theme flasher, is kind of template. and I should extract compiled PNGs and xmls from apk file and paste theme into that. and for editing theme, I need to paste and replace those files into the apk file and then decompile that apk.
then what should I do if I changed something in "values" folder? cause it just appears in decompiled apps and It can't be seen in a compiled app.
sam5154 said:
thanks,
correct me if I'm worng pls.
Universal theme flasher, is kind of template. and I should extract compiled PNGs and xmls from apk file and paste theme into that. and for editing theme, I need to paste and replace those files into the apk file and then decompile that apk.
then what should I do if I changed something in "values" folder? cause it just appears in decompiled apps and It can't be seen in a compiled app.
Click to expand...
Click to collapse
I think after compiling the apk, you should copy the "classes" and the other file *-) I can remember its name, and add them there.
Am not sure *-) I had this question too but I thought abt trying it first and if it doesnt work I wld ask. I have no time to try I have exams
Ba7rani123 said:
I think after compiling the apk, you should copy the "classes" and the other file *-) I can remember its name, and add them there.
Am not sure *-) I had this question too but I thought abt trying it first and if it doesnt work I wld ask. I have no time to try I have exams
Click to expand...
Click to collapse
classes.dex is for the smali that has been edited if there was any.
I assume that if the xmls were edited and they point to new PNG images/objects then the resources has been changed. I would say that in this case you would need to have an updated resources file for these adjustments? This could be pulled from your newly compiled .apk that you want to base your flashable theme off?
I am unsure if resources needs to be updated though for certain? I have flashed in the past new xmls and they worked fine, however these were not referencing any new sources or images...so my thoughts are that these mods I made didn't require this additional file?? I could be wrong. I really should read the thread about it here on XDA. I did a long time ago, but have come a long way since then.
I diverse. Try using it without new resources file and see what happens?
You may also like to looking into Morphing as well (very similar concept).
James
i would also like a explanation to what vrtheme is, all i know is that when i flash it IT NEVER WORKS!
xdarkmario said:
i would also like a explanation to what vrtheme is, all i know is that when i flash it IT NEVER WORKS!
Click to expand...
Click to collapse
is your ROM deodexede? It only works on deodexed Rom?
Sent from my GT-N7100 using Tapatalk 2
sam5154 said:
is your ROM deodexede? It only works on deodexed Rom?
Sent from my GT-N7100 using Tapatalk 2
Click to expand...
Click to collapse
yep, both my phones i tried them on are deodexed.

[Q] Help decompiling framework-res.apk

Hey, i am a bit noob here decompiling, and compiling system apks, so now im trying to decompile framework-res.apk from my CM7 rom, and i get a 9.png errors when decompiling and another strange one when compiling.
The whole CMD window is attached.
I hope get some help with this, i also got it with CM9 framework.
bump
Sent from my SG Ace
That means the .9 pangs were made wrong. This happens when some tries to take the easy way to theme things. You will not be able to compile it until you fix them
zelendel said:
That means the .9 pangs were made wrong. This happens when some tries to take the easy way to theme things. You will not be able to compile it until you fix them
Click to expand...
Click to collapse
Its because of the theme?
How can i fix it?
Sent from my SG Ace
Adgoosuc said:
Its because of the theme?
How can i fix it?
Sent from my SG Ace
Click to expand...
Click to collapse
Yes its because of the theme. If yo look at each file it says is broken you will have to remake all those .9.pngs properly. A search will teach you how to do it. You will need the android SDK installed for sure for the .9.png tool.
Adgoosuc said:
Its because of the theme?
How can i fix it?
Sent from my SG Ace
Click to expand...
Click to collapse
You either have to edit the .9.png files with the draw9patch.bat file located in \android-sdk\tools.. and copy basically the pixel borders - put up two windows side by side - one stock and the one you are editing. And make sure you only have one new copy of that file in your drawable folder when done.. no normal .png's of the same name.
Or you could just "borrow" those .9.png files from another rom and use GIMP to basically edit the color only and save... just don't decompile them - use 7zip instead.
alteredlikeness said:
You either have to edit the .9.png files with the draw9patch.bat file located in \android-sdk\tools.. and copy basically the pixel borders - put up two windows side by side - one stock and the one you are editing. And make sure you only have one new copy of that file in your drawable folder when done.. no normal .png's of the same name.
Or you could just "borrow" those .9.png files from another rom and use GIMP to basically edit the color only and save... just don't decompile them - use 7zip instead.
Click to expand...
Click to collapse
Editing a .9 png like that is not the prper way to do it. He will just have issues if he tries to decompile it again. This is why alot o themes break when people try to decompile them to learn.
Take some time out OP and learn how to do it properly. The easy way is never right.
zelendel said:
Editing a .9 png like that is not the prper way to do it. He will just have issues if he tries to decompile it again. This is why alot o themes break when people try to decompile them to learn.
Take some time out OP and learn how to do it properly. The easy way is never right.
Click to expand...
Click to collapse
Which way is not proper? The 2nd suggestion was not intended to be a proper way, but it can work.. and the first way I suggested is what I would consider a good way to learn how to draw the patches - by comparison with known working ones..
EDIT - please elaborate on the not being able to decompile it again later though - I was aware of this issue and had come across it - but never new the cause.
EDIT 2 - I just noticed your stats - please share your seasoned wisdom... I have got a lot to learn yet...
Ok, i have a better way to do what i want, i jzut want to edif bools.xml inside values folder, so ill apply default theme, decompile and edit, and then i replace it.
Thanks to all who helped me!
Sent from my SG Ace
Adgoosuc said:
Ok, i have a better way to do what i want, i jzut want to edif bools.xml inside values folder, so ill apply default theme, decompile and edit, and then i replace it.
Thanks to all who helped me!
Sent from my SG Ace
Click to expand...
Click to collapse
The bools XML will be over writted when you flash the theme.
alteredlikeness said:
Which way is not proper? The 2nd suggestion was not intended to be a proper way, but it can work.. and the first way I suggested is what I would consider a good way to learn how to draw the patches - by comparison with known working ones..
EDIT - please elaborate on the not being able to decompile it again later though - I was aware of this issue and had come across it - but never new the cause.
EDIT 2 - I just noticed your stats - please share your seasoned wisdom... I have got a lot to learn yet...
Click to expand...
Click to collapse
Ok the 1 px boarder around the image has to be the last thing applied to an image. You can edit it with gimp and 7zip but that breaks the border settings. This is the reason most .9.pngs break when decompiled.

Removing entries from Settings.apk

Hi!
Can anyone here help me out in decompiling the Settings.apk for the custom ROM (CyanogenMod) I'm making?
It has a lot of useless entries (my phone doesn't have them), like auto brightness, capacitive buttons backlight, performance, etc.
I'm new to this but I have already read threads about decompiling apks.
I'm really eager to this since this is my first custom ROM.
Thanks to all who will help!
Decompile the Settings.apk then go to /res/xml/ and find the file named settings_headers.xml, it should containt the entries.
Cozzmy13 said:
Decompile the Settings.apk then go to /res/xml/ and find the file named settings_headers.xml, it should containt the entries.
Click to expand...
Click to collapse
Yes I already removed some but the auto-brightness feature doesn't seem to be located in the settings.apk. I can enable/disable it even without going into settings. Do you know where it is? Must be in SystemUI.apk, framework-res.apk or framework.jar,
Man, what happened to searching the forums?
http://forum.xda-developers.com/showthread.php?t=2184207
[GUIDE][4.0+] Add items to Settings.apk / Change Layout
You need WinRar, or 7zip, Notepad++ or Sublime or Atom, and yeah. Maybe an apk signer.
berryman13 said:
Man, what happened to searching the forums?
http://forum.xda-developers.com/showthread.php?t=2184207
[GUIDE][4.0+] Add items to Settings.apk / Change Layout
You need WinRar, or 7zip, Notepad++ or Sublime or Atom, and yeah. Maybe an apk signer.
Click to expand...
Click to collapse
Read my above reply, i already found out how to do it. But do you know where the code for auto-brightness is located? I'm pretty sure it isn't in settings.apk. I'd like to remove it since my phone doesn't have an ambient light sensor. Thanks!

Categories

Resources