yashsingh1/xdaforums huggingface dataset:
[Android Software Development] DoR3M3:
You must be including the framework-res.apk and if I do that, yes it builds, so let me try it that way and the just copy out the resoruces.arsc into the untoched apk and see if it works, it will only take a second... ;)

apktool if framework-res.apk

apktool d Settings.apk

Edit the xml in res/values

apktool b Settings

Now I have this;

/Settings/build/apk

~ pts/0 foo ~/Build/Android/android build-tools/Settings/build/apk >ls

AndroidManifest.xml classes.dex classes2.dex classes3.dex res resources.arsc

SO looks like some level of success at least getting this built.

Going to drop in now the resources.arsc into untouched apk and push it and reboot the phone....

Oh here's to hoping! LOL

BRB ;)

P.S. [MENTION=2126467]djdarkknight96[/MENTION] ok back!

It booted, but the Settings icon I can't access it, so two things running through my mind, is using the framework-res.apk the problem, or my changes to my xml file? One way to find out, don't make any file changes and try again, so off for that and BRB again.

In the meantime, maybe I can ask if you could look at the Settings.apk res/values/strings.xml this line;

<string name="system_update_settings_list_item_title">System updates</string>

I'm making a microG rom from OOS, and I wanted to remove from the Settings section the "System Updates", hoping this line takes care of that, of course thinking, there might be more than just this line, and need to change some other xml files too...

I don't think this is a untouched apk, because the resources.arsc isn't going to match the original Signature, so I still have to sign it. Not sure there is a difference of using a GUI Zip archive like 7zip in Windows to do this.

In Linux I just run zip Settings.apk resources.arsc and it gets added;

updating: resources.arsc (deflated 74%)

Now I run; keytool -list -printcert -jarfile Settings.apk - last line of output;

keytool error: java.lang.SecurityException: SHA-256 digest error for resources.arsc

So I sign it; and it comes back good when I check it

./apksigner sign --ks keystore.jks Settings.apk

All done, and trying it again copying the resources.arsc without making any changes does not work. So for now I don't see it can work using the framework-res.apk and if it does, well, I don't know, but according to [MENTION=3924617]iBotPeaches[/MENTION] this is a bug in apktool... :(
[Android Software Development] djdarkknight96:
Don't sign it, system will not recognize test keys. You'll need to keep it unsigned. Using 7zip will keep compression as well. No idea about what edits need to remove the update option.
[Android Software Development] DoR3M3:
Ok I won't sign and I'll try again...

BRB

[MENTION=2126467]djdarkknight96[/MENTION] I'm back and it booted and this time the Settings worked and "System Updates" was still listed in the Settings, but didn't do anything when I tapped on it, so I'm making progress! Looks like not signing it helped the trick here, I just assumed having it fail a signature check would be a problem, but I also disabled Sig Check in Oreo!

Thanks so much for your time help, looks like it's working, now I just have to play with the xml files to accomplish what I need.

THANKS
[Android Software Development] djdarkknight96:
Glad to help
[Android Software Development] DoR3M3:
Ahh got rid of the name, now still have a Bloody icon where it use to sit, below Advanced.

They sure don't make this easy do they... ;)

Time to go icon hunting...

Thanks again!

Cheers
[Android Software Development] djdarkknight96:
Look in res/xml/device Info settings xml

Delete the line for updates 7 and 8

Not sure will work but look in those xml
[Android Software Development] Thebear j koss:
That won't stop updates from coming, there is a lot more to that than just removing stuff from settings. Just an fyi

Sent from my PH-1 using Thebear Blue XDA Labs
[Android Software Development] djdarkknight96:
For sure.
[Android Software Development] DoR3M3:
Actually killing it from updating has been the easy part, getting rid of the icon and the space where the words System Update are, have been the hardest...

I did try that already, still have the bloody icon...

I thought I was actually looking for these types of lines related to icons?

android:icon="@drawable
[Android Software Development] djdarkknight96:
Well the dashboard has the icon id so you'll have to find the package hosting it
[Android Software Development] DoR3M3:
Well I'm digging and coming up empty...

When you say package hosting, I assumed these Settings icons are in the Settings.apk

The only thing making some sense is this, but not getting anywhere with it;

res/values/public.xml

<public type="drawable" name="ic_system_update" id="0x7f02026d" />

<public type="drawable" name="ic_system_update_vd_theme_24" id="0x7f02026e" />

strings.xml; - this gets rid of the name

<string name="system_update_settings_list_item_title">System updates</string>
[Android Software Development] Thebear j koss:
Look in the res folder--->drawable folder for whatever that icon name is. You can also do a global search of the res folder for that icon name. It is most likely a png file. You can also change where it says android icon=@drawable to android icon =@null

Sent from my PH-1 using Thebear Blue XDA Labs
[Android Software Development] djdarkknight96:
Use an app called "current activity" free on playstore. Use it to see what the package the updater holds. Might not be in settings.
[Android Software Development] DoR3M3:
I''ve been looking through the drawable folders and I don't see any icons that look the same and I have been looking at "android icon="

I just can't bloody find this thing and none of the dashboard/settings icons are in here too, which is what I'm trying to find, all of them... :eek: LOL

This is the Phone > Settings

So all I know is com.android.settings as far as package apk is concerned, still no idea, I just assumed it's in Settings.apk

"current activity" just shows "com.android.settings.Settings"
[Android Software Development] djdarkknight96:
Ok so when you go into the update screen it said settings?
[Android Software Development] DoR3M3:
com.android.settings.Settings is when sitting out in the Main Settings section.

com.oneplus.opbackup & com.oneplus.opbackup.CheckUpdateActivity is when I click on System Updates and go into that section. This is in the OPBackup.apk which is related to OnePlus's OTA Updates, and I looked through that, it has nothing related to the Android Phone Settings...

OnePlus sure made a mess out of all these APK, you should see all the rubbish left over in this thing, it's like they have files from years ago and never bothered to update them and crap I don't even know what it even relates to LOL.... :eek:

So I assumed these "Settings" are just the Android Settings in a typical Android package...

I attached a screen shot showing the Settings & Icons, and I assumed OnePlus just used Android icons? To be honest, I've never considered these Settings Icons, I've always assumed on Stock ROMs the manufacturer's typically used Android icons.

Thanks
[Android Software Development] djdarkknight96:
I think it's not png but vector. You check regular drawable folder? In both settings and OP backup?

Found it in settings
[Android Software Development] djdarkknight96:
It's a vector

One of those two in screenshot
[Android Software Development] DoR3M3:
Is that from my Settings.apk?

I thought you grabbed it before from the Github link I posted, but here it is, if you don't mind digging through it....

https://www84.zippyshare.com/v/fpri1xEl/file.html

I only see png in this thing, no vector, or I'm getting blind and old! LOL ;)

THANKS
[Android Software Development] djdarkknight96:
That's from your settings apk
[Android Software Development] DoR3M3:
Ok I see in draw/res/ic_system_update.xml but still not seeing any vector image, where did you locate that at?

Thanks
[Android Software Development] djdarkknight96:
Is from yours, drawable folder
[Android Software Development] djdarkknight96:
Directly from apk it's there also

See path at the top of window
[Android Software Development] DoR3M3:
I edited my post before, I found it my bad.

But where are you finding a vector image for this?

Thanks

P.S. I thought I was doing my grep/search before correct, guess I'm going to have to look into that, as to why it didn't show anything before.... :eek:
[Android Software Development] djdarkknight96:
The xml is the vector image. Look inside the decompiled one you'll see a path. That makes the image drawn in android.
[Android Software Development] DoR3M3:
Ahhh, I never got big into XML or Vector images...

So I played around with the XML, even went so far as deleting it and removing it from the manifest and it still appears in the settings, so I don't get this, if it's the image and I've deleted it, how it can still appear.

But the bigger issue is, I just want to remove the entire "System Updates Section" that appears in the Settings. I can remove the words "System Updates", or change it, but I can't remove this "space" that it sits in, not sure the name Android would call this, or by code... So I'm still trying to figure out how to remove this System Updates Section... hmm

Thanks
[Android Software Development] Thebear j koss:
It would be in layouts folder. There is a dip of android width and height in the xml that holds that space. Change them both to @ null. And i already told you how to get rid of that icon, just change where it calls for it in the xml from android drawable=@ic_system_update or whatever it is called to [MENTION=1685219]null.[/MENTION] You can also make it transparent by changing it's color to transparent. Change all color values in xml to #00000000

Sent from my PH-1 using Thebear Blue XDA Labs
[Android Software Development] DoR3M3:
Well I was hoping to find in the layout folders something related to the System Updates, where you can change individual sections of the dahsboard, but I don't see this, I only see an overall like layout scheme of the dashboard, so not sure on this.

Also the vector image in the drawable folder, ic_system_update.xml you mentioned before; change where it says android icon=@drawable to android icon =@null

But there is no android icon=

<?xml version="1.0" encoding="utf-8"?>
<vector android:height="24.0dip" android:width="24.0dip" android:viewportWidth="24.0" android:viewportHeight="24.0"
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto">
<path android:name="Shape" android:fillColor="?android:colorAccent" android:pathData="M17,1.01 L7,1 C5.9,1 5,1.9 5,3 L5,21 C5,22.1 5.9,23 7,23 L17,23 C18.1,23 19,22.1 19,21 L19,3 C19,1.9 18.1,1.01 17,1.01 L17,1.01 Z M17,19 L7,19 L7,5 L17,5 L17,19 L17,19 Z M16,13 L13,13 L13,8 L11,8 L11,13 L8,13 L12,17 L16,13 L16,13 Z" />
</vector>
[Android Software Development] Thebear j koss:
Change those height and width dip to 0.0 or [MENTION=1685219]null.[/MENTION] If you find the ic system update in any of the layout folders or in the xml folder perhaps, you can change it to [MENTION=1685219]null.[/MENTION]

Sent from my PH-1 using Thebear Blue XDA Labs
[Android Software Development] DoR3M3:
I understand what you're saying, the problem is I can't seem to find anything in the layout folder related to the "System Updates", this is as close as I've gotten;

Hmm

values/public.xml: <public type="drawable" name="ic_system_update" id="0x7f02026d" />
values/public.xml: <public type="drawable" name="ic_system_update_vd_theme_24" id="0x7f02026e" />
res/xml/storage_dashboard_fragment.xml: <com.android.settings.deviceinfo.StorageItemPreference android:icon="@drawable/ic_system_update_vd_theme_24" android:title="@string/storage_detail_system" android:key="pref_system" android:order="100" />
[Android Software Development] djdarkknight96:
Repost:

Look in res/xml/device Info settings xml

Delete the line for updates 7 and 8

Not sure will work but look in those xml
[Android Software Development] DoR3M3:
Man I've been looking for ages! LOL

I don't need to also hack this out of smali too?

smali/android/support/v17/preference/R$drawable.smali:.field public static final ic_system_update:I = 0x7f02026d

Thanks
[Android Software Development] djdarkknight96:
Don't think so.
[Android Software Development] DoR3M3:
I now have an empty space, trying to figure out how to delete that. I attached a screen shot, I put a black dot in the empty space.

This is what I've changed.

1. res/strings.xml

<string name="system_update_settings_list_item_title">System updates</string>

changed;

<string name="system_update_settings_list_item_title" />

2. res/public.xml - removed this line;

<public type="drawable" name="ic_system_update" id="0x7f02026d" />

3. res/drawable - deleted this file

ic_system_update.xml

4. Removed the entire "ic_system_udpate" string in the AndroidManifest.xml

Now to figure out this bloody empty space... LOL :eek:

P.S. I assume now next, somewhere in the /layout folder(s). Problem now, I don't see anything for this System Updates, if it's here, not sure what xml file it's a part of... hmm
[Android Software Development] Thebear j koss:
Look for the ID in the public.xml for that xml and do a global search for that ID.

Sent from my PH-1 using Thebear Blue XDA Labs
[Android Software Development] DoR3M3:
I'm a step ahead of you, I already ran an id search for these four and came up empty;

op_system_update_settings id="0x7f0f0573"

system_update_settings_list_item_title id="0x7f0f096a"

ic_system_update id="0x7f02026d"

ic_settings_system_update id="0x7f020252"

These are the only 4 I see that seem related in some manner to updates, that make any sense... hmm

I thought right now, all I needed to do was figure out in the /layout folder what is related to updates? Not sure how IDs would help, since there are none listed in the layouts xml

P.S. I truly don't see anything in the /layout folder that just simply states anywhere "updates" in some simple to understand fashion, so you look and go, HEY, there's the System Updates layout section, I simply see nothing like this...
[Android Software Development] Thebear j koss:
ID for device info settings.

Sent from my PH-1 using Thebear Blue XDA Labs
[Android Software Development] DoR3M3:
If you are talking about in res/xml/device_info_settings.xml in the public.xml this is the ID;

public.xml - device_info_settings id="0x7f08002b"

Then a search for "0x7f08002b" through the Settings.apk doesn't show anything other than smali;

res/values/public.xml: <public type="xml" name="device_info_settings" id="0x7f08002b" />

smali/android/support/v17/preference/R$xml.smali:.field public static final device_info_settings:I = 0x7f08002b

smali/android/support/v7/preference/R$xml.smali:.field public static final device_info_settings:I = 0x7f08002b

smali/android/support/v7/appcompat/R$xml.smali:.field public static final device_info_settings:I = 0x7f08002b

smali/android/support/v14/preference/R$xml.smali:.field public static final device_info_settings:I = 0x7f08002b

smali_classes2/com/airbnb/lottie/R$xml.smali:.field public static final device_info_settings:I = 0x7f08002b

smali_classes2/com/android/settings/R$xml.smali:.field public static final device_info_settings:I = 0x7f08002b

smali_classes2/com/android/settings/DeviceInfoSettings$2.smali: const v1, 0x7f08002b

smali_classes2/com/android/settings/DeviceInfoSettings.smali: const v18, 0x7f08002b

smali_classes2/com/android/settingslib/R$xml.smali:.field public static final device_info_settings:I = 0x7f08002b

smali_classes2/android/support/v7/recyclerview/R$xml.smali:.field public static final device_info_settings:I = 0x7f08002b

smali_classes3/com/android/setupwizardlib/R$xml.smali:.field public static final device_info_settings:I = 0x7f08002b

smali_classes3/com/oneplus/commonctrl/R$xml.smali:.field public static final device_info_settings:I = 0x7f08002b
[Android Software Development] starbucks2010:
Hello good people,

I need an advice from you related to the APKTOOLS_DUMMY_xxx. I get a lot of them in res/values/xxx.xml files and I don't know what can I do to lower their number.

For example, in Facebook app I get 7550 APKTOOLS_DUMMY_xxx lines out of 60.000 lines, so more than 12%. I also get 6.770 lines on them in strings.xml out of 20.700 lines which is more than 30% un-decoded lines. Some files are completely populated by APKTOOLS_DUMMY_xxx lines (i.e layouts.xml).

I tried different apktool versions (2.3.2, 2.3.3, 2.3.4) and different versions of Samsung frameworks (Oreo, Pie). Still same amount of dummy lines.

So, do you know a way of improving the decoding of these dummy lines?

I use a S9+ with a Pie ROM.

Thanks in advance.
[Android Software Development] Ticklefish:
I'm guessing that Facebook don't want people decompiling and modifying their app, so they've built it in a way that apktool can't cope with.
[Android Software Development] Ibuprophen:
I've seen allot of individuals ask/inquire about this for the Facebook app and that is one of a handful of commonly used apps that are a real pain in the Rump.

I stopped using the Official one a LONG time ago and went with one of the handful of very good "Facebook Wrapper Apps" that actually performs much better and doesn't require a separate Messenger app either. Also, unlike the Official Facebook app, the Wrapper Apps have the ability to be customized in various ways too.

~~~~~~~~~~~~~~~

UNLESS asked to do so, PLEASE don't PM me regarding support. Sent using The ClaRetoX Forum App on my Enigma Machine {aenigma = Latin for "Riddle"}.
[Android Software Development] DoR3M3:
I'm still going crazy here, trying to figure out how to take out the entire section "System Updates" from the Phone > Settings section, if anyone else has been following this, that might be able to lend a hand?

The Settings.apk is uploaded at the link below;

https://www84.zippyshare.com/v/fpri1xEl/file.html

As I continue looking, this is all that makes any sense to me.

1. res/values/strings.xml - <string name="system_update_settings_list_item_title">System Updates</string>

2. res/values/strings.xml - <string name="op_system_update_settings">@string/system_update_settings_list_item_title</string>

3. res/xml/device_info_settings.xml;

<PreferenceScreen android:title="@string/about_settings" xmlns:android="http://schemas.android.com/apk/res/android">

<com.oneplus.settings.ui.OPPreferenceHeaderMargin android:key="preference_divider_line" />

<PreferenceScreen android:title="@string/oneplus_mobile_device_name_title" android:key="mobile_device_name" android:fragment="com.oneplus.settings.OPDeviceName" />

<PreferenceScreen android:title="@string/oneplus_device_electronic_card" android:key="op_electronic_card" />

<PreferenceScreen android:title="@string/system_update_settings_list_item_title" android:key="system_update_settings" android:summary="@string/system_update_settings_list_item_summary">

<intent android:action="android.settings.SYSTEM_UPDATE_SETTINGS" />

</PreferenceScreen>

I was hoping the lines above in bold above, it would remove the section from the Phone Settings, seeing the section in it; android:title="@string/system_update_settings_list_item_title

Problem is, if I remove this section I get an error;

res/xml/device_info_settings.xml:8: error: Error parsing XML: junk after document element.

I then thought if android:title="@string/system_update_settings_list_item_title" is what makes it appear, then I tried it as @ null but it did nothing;

<PreferenceScreen android:title= [MENTION=283679]null[/MENTION]" android:key="system_update_settings"

I still do not see, or understand anything in the res/layout folder that would help.

Any help would be greatly appreciated to solve this...

Thanks
[Android Software Development] Thebear j koss:
Don't change the strings xml. Change it in the res/xml/device info settings xml. You are getting that error because the device settings xml is requesting that line from strings.xml

Sent from my PH-1 using Thebear Blue XDA Labs
[Android Software Development] whynot4444:
can i ask, im edit setting.apk on android 8.1, it ok but when im copy file .resource, and coppy to system, it not work, any idea ?
[Android Software Development] DoR3M3:
I've been working on the Settings.apk if you've been following the last posts I've made, and you're talking about the same? Phone > Settings

If you're talking about the Phone > Settings, you'll need the framework-res.apk from the ROM you are working on.

Try these steps; (Make sure where the frameworks are being stored that you've deleted previous frameworks)...

1. apktool if framework-res.apk

2. apktool d setting.apk

3. Make your changes

4. apktool b setting

5. Now copy "resources.arsc" from the "build" directory to the same folder as the setting.apk

6. Add the "resources.arsc" to the original setting.apk - If you are on Windows use either Winrar, 7zIp, etc... and add it in, overwritting the orignal

"resources.arsc" so it's replaced with the new one.

7. Do not sign the setting.apk keep the orignal signature.

8. Copy to phone and test!

Hopefully it works now...
[Android Software Development] whynot4444:
oh im try it, when i coppy resource, the file size reduced, and when i coppy it to system, it boot normal, but cannot enter setting, im using Android 8.1
[Android Software Development] DoR3M3:
So you are doing all the same steps I mentioned?

Now the phone boots and you tap on the Settings icon and nothing happens? If this is true, I can only assume some change you made is the problem, sorry I wouldn't know, maybe someone else has some ideas...

But what are you doing, the changes you are making to the setting.apk?
[Android Software Development] whynot4444:
im just translate it to another language, only text on icon have change, but when tap it, notthing happen, are you try to translate at android 8.1 ?
[Android Software Development] DoR3M3:
Try this as a test!

Make a copy of the setting folder, "setting.bak", also either move or make a backup of your framework.

Now start over and only make a small change as example in the res/values/strings.xml, just find some line that is explaining something and change the words in it is all. You understand?

The idea here is to make sure that even if you just change a few words in a description, the setting.apk is working in Android for it, and if not, then there is something else wrong, but if this test works, then it is probably the Translation work you are doing that is making the problem is all I can think of.
[Android Software Development] whynot4444:
yeah im try it too, but it not work, you can try it with the phone have android 8
[Android Software Development] DoR3M3:
I found my problem the device_info_settings.xml it reverts back to the original file, it won't keep the changes I make... :(

So I run these commands;

apktool if framework-res.apk

apktool d Settings.apk

Now I edit the res/xml/device_info_settings.xml

apktool b Settings

Now I add the resources.arsc to the orignal Settings.apk

Now I decompile this new Settings.apk and I look at and see that device_info_settings.xml has reverted back to the orignal.

How can I stop this and have it keep the changes I make?

Thanks

P.S. the Settings.apk created in the "dist" folder has the changes in it, but I can't seem to get it to work, I'm assuming because of the Signature, and it won't show up in the App Drawer. I thought I had the Signature Check disabled in Oreo, at least I do for the framework-res.apk. So if this is a signature problem with the Settings.apk, is there a way around this?
[Android Software Development] syntaxerror00100:
xamarin android app

Hi, can I use this tool to rebuild apk that was created using xamarin forms?

I tried the following steps but I encountered some errors / unable to install the modified app

1. Extracted the APK using 7zip

3. Decompiled the .dll modified some codes and replaced the original dlls

4. Signed using this apk tool
[Android Software Development] Vaibhav Puri:
Error on Pie

Hello sir, I used your pip_scrim.9 but it still didn't work on pie.
[Android Software Development] kramer04:
Someone has pip_scrim.9 fixed?. I can't fix it

Thanks
[Android Software Development] djdarkknight96:
Search thread