[Q] i want to edit settings.apk - Android Q&A, Help & Troubleshooting

i have some reason to edit settings app
i want to edit settings-about phone-status
'network' and 'phone number'
i decompiled settings apk
and edit res/xml/device_info_status.xml
i tryed 3 kind
original:
PHP:
<Preference android:title="@string/status_operator" style="?android:attr/preferenceInformationStyle" android:summary="@string/device_info_not_available" android:key="operator_name" android:persistent="false"/>
1
PHP:
edit android:summary="XXXX"
fail
not applyed when i install
2
PHP:
eedit value/string.xml
add XXXX on that and edit @string/device_info_not_avalilable to @string/XXXX
fail
can't compile
3
PHP:
edit summary and key
fail
can't install
if you have any other idea or solutions
please help me
ps. im not good at programing because i did't learn about java
i just learn C for 3 month:silly:

Related

[Q]how to add lines to xml

in order to get a mod to work in my theme i need to add a couple strings to my public.xml thats found in my framework-res.apk. i used ultracompare to compare 2 different xml files and i know what needs to be added to my xml file. i use notepad ++ to edit values but never added strings.
1. can i use notepad++ to add the strings to my public.xml?
2. does it matter what line they end up on?
I use Open XML Editor, but I am sure you can use whatever works best for you. Notepad would hurt my brain though.
As far as the Public.XML, I don't think you can just remove and add lines to it...
The way it was explained to me was that any extra or new pngs added to a theme will be added into the Public.xml by way of "aapt". So there is no need to add. As far as removing items... well the entries are all coded a specific way so if you remove line 100... then everything from 101 to the end will be off by 1 and cause a lot of problems. An example...
<public type="attr" name="exported" id="0x01010010" />
<public type="attr" name="process" id="0x01010011" />
<public type="attr" name="taskAffinity" id="0x01010012" />
<public type="attr" name="multiprocess" id="0x01010013" />
<public type="attr" name="finishOnTaskLaunch" id="0x01010014" />
So as you can see the id used increases and then is associated with a specific item from within your apk. So as far as I know the best way to modify something (like a theme or etc) is to work with a Public.XML that has less in it so you can add to it... or just keep all those items in there (pngs, etc) and just make them a 1x1 image. Not the best way... but from what I have seen it has been done by many a theme maker and ROM builder.
Hope that answers your question.
** edit **
I just realized that I may had confused you (not knowing your knowledge level) so... The items are added to the Public.XML when you build the APK back together after editing it. This can be done with the apktool, which uses the aapt to do it's job. At least that is how it has all been explained to me so far. I also need to modify a Public.XML for my framework-res.apk and ran into problems here.
You don't need to worry about adding pngs to the public.xml. just put the pngs in place in the decompiled apk along with the xml that's using the pngs. You can't add pngs that aren't being used, which is the only requirement.
Run 'apktool b' to rebuild the apk and the pngs should be added to the public.xml. that data will be in the resources.arsc file in the new apk if you had no errors. Copy that to your original apk and you're set.
You can decompile your recompiled apk if you want to see the newly added entries to the public xml. But that's just for fun.
Note; I found in the framework 21 for backflip that there was no more room for draw9.png images, just regular pngs.
Also, if you copy any1 else draw9.pngs from their apk make sure you copy the png from an unzipped apk and not a decompiled apk. Decompiles adds the 1 pixel ring around the image that wont go away unless recompiled. And you can't replace draw9 images to recompile or apktool will try to add it as a new draw9.png to public xml and error out. Just insert to your original apk.
That should cover all bases.
Im sorry, the second post threw me off. You said strings specifically. I would think the rule should apply the same. Use the string in an xml and the string is declared in another xml in the values folder, I think its strings xml. The compiled string resources will be in the resources.arsc file in the new apk.
djstaid said:
I use Open XML Editor, but I am sure you can use whatever works best for you. Notepad would hurt my brain though.
As far as the Public.XML, I don't think you can just remove and add lines to it...
The way it was explained to me was that any extra or new pngs added to a theme will be added into the Public.xml by way of "aapt". So there is no need to add. As far as removing items... well the entries are all coded a specific way so if you remove line 100... then everything from 101 to the end will be off by 1 and cause a lot of problems. An example...
<public type="attr" name="exported" id="0x01010010" />
<public type="attr" name="process" id="0x01010011" />
<public type="attr" name="taskAffinity" id="0x01010012" />
<public type="attr" name="multiprocess" id="0x01010013" />
<public type="attr" name="finishOnTaskLaunch" id="0x01010014" />
So as you can see the id used increases and then is associated with a specific item from within your apk. So as far as I know the best way to modify something (like a theme or etc) is to work with a Public.XML that has less in it so you can add to it... or just keep all those items in there (pngs, etc) and just make them a 1x1 image. Not the best way... but from what I have seen it has been done by many a theme maker and ROM builder.
Hope that answers your question.
** edit **
I just realized that I may had confused you (not knowing your knowledge level) so... The items are added to the Public.XML when you build the APK back together after editing it. This can be done with the apktool, which uses the aapt to do it's job. At least that is how it has all been explained to me so far. I also need to modify a Public.XML for my framework-res.apk and ran into problems here.
Click to expand...
Click to collapse
I am getting same problem as OP. You said that new PNGs or something are automatically added in public.xml right? But I am not able to see them. Actually, i added 5 more indeterminate progress bars and edited the animator xml for it too. The app compiled with apkmanager, but after decompiling the same, I don't see the new indeterminate PNGs declared in the public.xml.!! Plz. help me! I can't just flash and test immediately!! cause i don't have that phone!!
No they are not added automatically you have to add it yourself.
Only add or change lines don't remove.
For public.xml
Everything is grouped
Each group has an order
Drawable will be
0x7......00
0x7......01
................
0x7......ff
Remember they use letters also
You can add a new item
0x7.......g0
They have to be in order by resource type
String would start with ex...
0x6......00
Find the last string id that was used and add the next id.
Remember they are not always in order so actually use the text search to be sure.
Not sure if you already added the string to the strings.xml
That has to be done also.
For that open strings.xml
Copy the last line
Paste it to next line
Change string name (must match public.xml) and than value (what text is displayed)
Let me know if you need more help.
Sent from my PG86100 using Tapatalk
Here is a write up i was planning on doing for my site
decided to start it now.
Add resources to an android apk
Its just a start but should be able to do it with out problems
wes342 said:
Here is a write up i was planning on doing for my site
decided to start it now.
Add resources to an android apk
Its just a start but should be able to do it with out problems
Click to expand...
Click to collapse
Oh mahhnn!! Thanks a lot for that!! Now I don't need to depend on crappy tools for adding resources any more!!!
Once again, thanks a lot for that!!
So when i understand it right i made it like that.
I wanna add "ab_bottom_solid_dark_holo.9.png" to mms.apk.
I copy it to "drawable-xhdpi". I open "public.xml" and scroll to the end of "<public type="drawable" ". Last string is:
"<public type="drawable" name="stat_notify_sms_9" id="0x7f020254" />"
Click to expand...
Click to collapse
So i make a line under that and that would be that:
<public type="drawable" name="ab_bottom_solid_dark_holo" id="0x7f020255" />
Click to expand...
Click to collapse
In the whole xml is no other "7f020255". So that would be all? No other changes to do?
Basian Mile said:
So when i understand it right i made it like that.
I wanna add "ab_bottom_solid_dark_holo.9.png" to mms.apk.
I copy it to "drawable-xhdpi". I open "public.xml" and scroll to the end of "<public type="drawable" ". Last string is:
So i make a line under that and that would be that:
In the whole xml is no other "7f020255". So that would be all? No other changes to do?
Click to expand...
Click to collapse
Everytime I've added a drawable, or a string, to my apps, I've never had to put them into public.xml
All I do is compile and they're added automatically. The only time I need to touch public.xml is if I want to remove something.
That would be nice. iam on JellyBean on my Galaxy Nexus and use apktool cmd. And it just gave me errors.
What do u use to compile. Maybe its a nice Tool with more Functions.

[Q] edit sms background

how to edit sms background..i use elelinux floyo 2.2..
you download handcent or GoSms XD
i dont like use handcent..how about edit framwork?do you know?
I think that you can't edit background just for sms...it will be global...that happened when I changed background picture in framework.res...
its in the framework-res.apk...
in the folders...
drawable-mdpi
drawable-land-mdpi
just search for the default background... and change that... and all the backgrounds will be change in your phone....
in the land-mdpi, is the same thing... just whit the landscape mode....
grettings...
i can't find default background in the folders
drawable-mdpi and
drawable-land-mdpi
for change background pic can use go sms pro
search for....
semc_bg.png
grettings....
but its more easy and cool if you use
handcent SMS
its verry customizable... colors, backgrounds... etc.
No. Use Go SMS pro. Better and much more simple than handcant
Sent from my X8 using Tapatalk
i use elelinux floyo 2.2 cannot found semc_bg.png
that file not exist
my friend said i must edit the .xml file to edit the background..anyone can edit .xml file?
within AndroidManifest.xml in MIUI and eclairs are the following string
Code:
<activity android:theme="@style/NameTheme" .................
and in string /res/values​​/sytels.xml
Code:
<style name="NameTheme" parent="@android:style/Theme">
<item name="android:windowBackground">@drawable/name_background</item>
</style>
background size 320x480
I've added the script, but still FC, ​​in the chat log there is a warning:
Binary XML file line # 4: You must supply a layout_height attribute
Binary XML file line # 4: You must supply a layout_weight attribute
sorry for bad language

[Q] Edit Strings.xml without forcing closure

Hello to all developers that I work with a Samsung Galaxy Ace M and I'm creating a new rom but e had this problem and could not solve and comment that use Multi-Tool Apk-this is my problem to modify a strings of route:
C: \ APK-Multi-Tool \ projects \ lidroid-res.apk \ res \ values
Modify the Strings.xml with Notepad + in my case the lines 3 and 63 the modified and recompiled back, the way to my rom but the rom started as me'' start'' Force Quit the application tells me SystemUI was arrested and all that, my question is that if you have to change something more than just the String.xml? Porquesi'm editing the lidroid-res.apk tells me the SystemUI process was stopped and I get force close?
If anyone I know say to do or whether to modify a file more than just the Strings.xml please be grateful for their help
PS: Sorry for my English

Remove the sim card / duel sim icon on the status bar for Samsung galaxy win /Quattro

Remove the sim card / duel sim icon on the status bar for Samsung galaxy win /Quattro (i8552/8552B)
Sometimes the sim icon on the status bar is so annoying for someone who loves their phone to be clean ,simple and well organized.
Here is a simple Mod for removing the status bar sim icon
Remember as always “I WILL NOT BE RESPOSIBLE FOR YOUR DEVICE..DO IT ON YOUR OWN RISK”[/SIZE]
Tools required
1.A computer ofcourse
2.Apktool or AdvancedApkTool
I prefer AdvancedApkTool by BDFreak for its ease of use.
Before using the above mentioned tools You should be having a good knowledge about the procedure and how to decompile , recompile and signing apk files
U can check it from here if u never heard about the apktools
http://forum.xda-developers.com/showthread.php?t=1755243
For Step to step procedure
http://forum.xda-developers.com/showthread.php?t=1989533
For Advanced ApkTool http://forum.xda-developers.com/showthread.php?t=2639400
2.SystemUI.apk
You can can pull it out from your phone using any root enabled file mangers like root explorer or ES file manager
3.An XML editing tool
Preferably Notepad++
You can Install it on your PC from https://notepad-plus-plus.org/download/v6.7.9.2.html
4.Lots of patience and craving for learning
BEFORE DOING THIS ALWAYS TAKE A BACKUP OF YOUR ROM USING NANDROID OR TWRP I WLL NOT BE RESPONSIBLE FOR BRICKED PHONE
Now the Procedure :- How to remove the sim icon from status bar
1. Decompile the SystemUI.apk file using the apktool or advancedapktool
2. Open the folder and go to \res\layout
3. Find the file “ tw_signal_cluster_view.xml”
4.Open it using Notepad++ or any xml editing tool
5.Find the this Line
HTML:
android:id="@id/sim_icon" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginRight="4.0dip"
And replace with this
HTML:
android:id="@id/sim_icon" android:layout_width="0.0dip" android:layout_height="0.0dip"
6. Now Find the file “tw_status_bar_expanded_dual.xml
7.Open it and find the line
HTML:
android:id="@id/quickpanel_dualsim_layout" android:layout_width="fill_parent" android:layout_height="4.0dip"
Replace it with
HTML:
android:id="@id/quickpanel_dualsim_layout" android:layout_width="fill_parent" android:layout_height="0.0dip"
8. save Both the files
9. Recompile the apk..and don’t forget to sign or else u will end up in Bootloop
10 Now push back your New SystemUI.apk to your Phone
ie. Root\System\app\
11. Paste it and set persimmons as rw-r-r (assuming you know the drill )
ReBoot
Hope This Will Be Helpful

[MOD]LolliPop Navigation bar / navigation keys for galaxy quattro/win i8552

Lolipop Styled navigation bar for samsung galaxy quattro / win
for those who loves the lollipop styled naviation bar and keys for samsung quattro
Remember as always “I WILL NOT BE RESPOSIBLE FOR YOUR DEVICE..DO IT ON YOUR OWN RISK”
Tools required
1.A computer ofcourse
2.Apktool or AdvancedApkTool
I prefer AdvancedApkTool by BDFreak for its ease of use.
Before using the above mentioned tools You should be having a good knowledge about the procedure and how to decompile , recompile and signing apk files
U can check it from here if u never heard about the apktools
http://forum.xda-developers.com/show....php?t=1755243
For Step to step procedure
http://forum.xda-developers.com/show....php?t=1989533
For Advanced ApkTool http://forum.xda-developers.com/show....php?t=2639400
2.SystemUI.apk
You can can pull it out from your phone using any root enabled file mangers like root explorer or ES file manager
3.An XML editing tool
Preferably Notepad++
You can Install it on your PC from https://notepad-plus-plus.org/download/v6.7.9.2.html
BEFORE DOING THIS ALWAYS TAKE A BACKUP OF YOUR ROM USING NANDROID OR TWRP I WLL NOT BE RESPONSIBLE FOR BRICKED PHONE
STEP 1 --- ACTIVATING THE NAVIGATION BAR
1. using root explorer or ES file manager open build.prop as editable text or use any buil.prop editor
2. go to the bottom and add this line
HTML:
qemu.hw.mainkeys=0
3. Save the file and reboot
now you will ab able to see the jelly bean themed navigation bar
STEP 2.------ Lollipop soft keys
download the attached file , unzip it and push the files inside lollipopkeys folder to SystemUI.apk\res\drawable-hdpi using 7zip or you can add it after decompiling the SystemUI.apk and recompille and sign it back
STEP 3.------ Now push back your SystemUI.apk to your Phone
ie. Root\System\app\
Paste it and set persimmons as rw-r-r (assuming you know the drill )
ReBoot
IF YOU WANT TO DISABLE THE PHONE RECENT AND BACK BUTTON
OPEN Root Explorer, navigate to System > usr > keylayout, and open Generic.kl in Text Editor
navigate to key 139 MENU and key 158 BACK, and put a "#" sign in front of each line. Save the file.
For disabling backlight on your capacitive keys go to phone Settings > Device > Display > Touch key light duration, and switch the setting to Always off
TO REARRANGE THE BACK AND RECENT TAB BUTTON
if you want the back button on the left and recent on the other side
follow the steps
. Decompile the SystemUI.apk file using the apktool or advancedapktool
2. Open the folder and go to \res\layout
3. Find the file “ tw_navi_bar.xml”
4.Open it using Notepad++ or any xml editing tool
find
HTML:
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/recent_apps" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/tw_navigationbar_recent" android:layout_weight="1.0" android:contentDescription="@string/accessibility_recent" systemui:glowBackground="@drawable/tw_sysbar_highlight" />
and
HTML:
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/back" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/tw_navigationbar_back" android:layout_weight="1.0" android:contentDescription="@string/accessibility_back" systemui:keyCode="4" systemui:glowBackground="@drawable/tw_sysbar_highlight" />
Now replace the first with the second one and second with the first one
its just shifting each code position on the top and bottom side of the home button
save it
. Recompile the apk..and don’t forget to sign or else u will end up in Bootloop
Now push back your New SystemUI.apk to your Phone
ie. Root\System\app\
Paste it and set persimmons as rw-r-r
ReBoot
IF YOU WANT TO CHANGE THE HEIGHT AND WIDTH OF NAVIGATION BAR
for this you need to decompile framework-res.apk
If u knw how to decompile and recompile framework apk then only you proceed or else u wll end up in bootloop
decompile framework-res.apk
Go to /res/values
open dimens.xml
find "navigation_bar_height" , "navigation_bar_height_landscape" and "navigation_bar_width"
change the dpi values ....better not to change it below 22 dpi
save it
recompile the apk and push it back to framework folder
reboot
can u please make flashable zip......please ....thakns in advance
Yes can u give atleast the systemui. Apk

Categories

Resources