yashsingh1/xdaforums huggingface dataset:
[Android Software Development] Raiz:
The framework-res.apk you need is the framework your ROM uses.

You can find it under /system/framework/

And under /system/priv-app search if there isn't an OEM framework-res.apk

Hope this helped
[Android Software Development] Athiril:
Yeah it did, I also found something called EasterEgg.apk
[Android Software Development] Athiril:
Okay so apktool d MiuiCamera.apk is now working and decompiles successfully

apktool b MiuiCamera however doesnt

it builds all the dex files no problem but gets to this (no changes were made I was just trying to recompile it)

---------- Post added at 09:04 AM ---------- Previous post was at 09:04 AM ----------

Okay so apktool d MiuiCamera.apk is now working and decompiles successfully

apktool b MiuiCamera however doesnt

it builds all the dex files no problem but gets to this (no changes were made I was just trying to recompile it)

apktool d -r MiuiCamera.apk

apktool b MiuiCamera

Seems to work, so there is a problem with the resources somehow
[Android Software Development] Thebear j koss:
Post the styles xml. Just need to delete that 1 error in line 1602.

Sent from my OnePlus 7T using Thebear Blue XDA Labs
[Android Software Development] Athiril:
Attached it. I can also get it to compile using apktool b --use-aapt2, but I run into issues changing the package name as then it cant find the classes based on my package name. I had to change most of the permission names to stop it from being owned by the existing app etc. I uploaded the original manifest, there isnt anyway to change the package name and not impact the classes? At this point Im search replacing all Lcom/android/camera strings in the folder

View attachment styles.xml

View attachment AndroidManifest.xml
[Android Software Development] Thebear j koss:
Sorry, I don't know about changing package name, that brings all sorts of ethical questions into the equation.

Thebear's 1+7T
[Android Software Development] Athiril:
My phone is not rooted so I cant replace the original Xiaomi camera app with a modified one
[Android Software Development] Thebear j koss:
I wouldn't know how you could replace the system app without rooting. Anyway to get the apk to build, just delete the entire 1602 line.

Thebear's 1+7T
[Android Software Development] Athiril:
Another issue, how do I include a lib/arm64 folder with .so files with apktool when building? Just include it in the root directory?

Ive got it built and can install it, but having NoSuchMethodError, I figured I need to include a local copy of referenced .so files.
[Android Software Development] djdarkknight96:
You need root to modify system apps.
[Android Software Development] Athiril:
I’ve already modified it, and installed it, without root. Under a different package name. The issue now is the NoSuchMethodError problem for a camera2 method which is odd. Ive included the .so libraries successfully.
[Android Software Development] djdarkknight96:
Camera needs to use other libs on system you made it a data apk not system.
[Android Software Development] whatpigs:
How do i explicitly add a new resource id? What are the rules? I'm trying to add an EditText in activity_main.xml to a decompiled android app. I will later manipulate it through smali code. But i'm having a problem

My best guess is its all about the id. I've tried to follow this https://stackoverflow.com/questions...ier-for-a-drawable-in-an-app-decompiled-by-ap but i'm confused and lost on how to do it. Any tips?
[Android Software Development] Thebear j koss:
Needs to call to a resource, I would not add a resource in, but use an already identified resource within the app. Would need to see what you are doing but it would most likely need a identity in a styles.xml where most text is identified thru a framework reference.

Sent from my OnePlus 7T using Thebear Blue XDA Labs
[Android Software Development] ezzony:
I am trying to make smali adjustments to telephony-common.jar located in /system/framework on a vendor rom on PIE.

There are 4 corresponding files in /system/framework/arm64 , namely

boot-telephony-common.vdex

boot-telephony-common.odex

boot-telephony-common.art.rel

boot-telephony-common.rel

The issue I've noticed is that in the smali code from the decompiled telephony-common.jar file I've spotted many lines like the following:

My guess to what is going on here is that this is what is know as 'hard coding' so telephony-common.jar expects to find code in the 4 files in the /system/framework/arm64 folder and won't work if those files are missing.

So is this assumption correct? If so, how do I recreate those 4 files because so far when I recompile all I get is one telephone-common.jar file. Is it even possible to recreate them. Or has it been coded this way so adjustments can't be made perhaps.

I realise I might be making a lot of assumptions here but I'm a noob at this. I'm using TickleMyAndorid to recompile if there is a solution to this. Tks.
[Android Software Development] Thebear j koss:
You are confusing, just pull those files and add them into that folder structure. If the arm 64 is a subset of the same path as the telephony-common.jar file, just add that subset and files into the zip you are flashing using 7zip or similar tool

Sent from my OnePlus 7T using Thebear Blue XDA Labs
[Android Software Development] ezzony:
Thanks but this didn't clarify anything for me at all.

Why would I pull the files only to put them back where they were when they would be the exact same.

I am making changes to telephony-common.jar so won't the 4 files in the arm64 folder need to change as well?

First I deoxed the Rom on my PC so all files in the framework/ arm and arm64 folders were deleted, leaving me with one telephony-common.jar file to edit it's smali and recompile. How then do I get the .odex .vdex etc files back since It looks like they need to be there because the path to them is hard coded into the smaili in the main .jar file.

It doesn't make sense to just put the original files back...because they have not been changed in any way, since the odex and vdex are created from the telephone-common.jar aren't then?
[Android Software Development] Thebear j koss:
If you deodexed your device, then there is no reason to worry or need those files. You never said that in your original post.

Thebear's 1+7T
[Android Software Development] djdarkknight96:
You aren't making sense, the files were debloated then you needed them black...He's saying put them back if that file needs them to function. It's not going to magically come back you need to do it since you removed them in the first place. Why did you debloat them in the first place if they were needed? Get the original files you need and flash them back is what Bear is saying.
[Android Software Development] ezzony:
edit: sorry please ignore, I've realized I've made a mistake in the relationship between the jar file and the other files i.e the are not related to each other. They just have similar names. Thanks.
[Android Software Development] Thebear j koss:
Those files have been moved within the jar if you deodexed. When you rebuild the smali folder is rebuilt into the jar. No need to create or use any other files, unless they are on your device, which would mean your device isn't deodexed.

Thebear's 1+7T
[Android Software Development] onoakino:
Hi! I am using EnRadius. Its an app that can be used to draw circles on a map (google's standard view, not the satellite view). Basically, you give it the diameter you want drawn over a specific point in the map and it will draw a circle around it. Very useful for triangulation. But the app only has the standard google map view. I want to add another button to view the map in satellite view and be able to switch between the two. Is this possible?
[Android Software Development] djdarkknight96:
I would ask the dev why it's not added and request it, if its possible it will be much easier in source code vs decompiled code which isn't the same.
[Android Software Development] onoakino:
Tried contacting the developer a long time ago but got no response. The app has not been updated for quite a long time, i think its already abandonware. I've no idea about android app programming and I thought the feature I'm asking can just be done via reverse engineering, but apparently not. Thanks for the reply. Its a shame really, I haven't found anything quite like it on google playstore. I wonder why no one has ported/created anything like it.
[Android Software Development] David Stone:
systemui.apk not working

i want to modify systemui.apk

but after successfully done it's not working

with new signature

with old signature

both are not working

but if i replace it with original apk

it's working

can anybody help me please?
[Android Software Development] Thebear j koss:
Need more info. Take only what you modified from new apk and using 7zip move them into original apk.

Sent from my OnePlus 7T using Thebear Blue XDA Labs
[Android Software Development] David Stone:
will it work,

it never worked in my case

i tried systemui.apk with decompile -r

and compile it with -c (original signature)

system will boot and black everything

looks like system knows that i did something to systemui

but when i put real one it will work
[Android Software Development] Thebear j koss:
Yes only move what you have changed. So if you edited some xmls in layouts, just open both apks and move those xmls into original apk overwriting the original files. Always keep a backup spare of original apk somewhere just in case. Everything else will be kept original.

Thebear's 1+7T
[Android Software Development] David Stone:
no chance sir,

not working
[Android Software Development] Thebear j koss:
Again, I need more info. What device are you using? Android build? Stock or custom ROM? Are you flashing the apk or using a file manager or adb to overwrite the apk? Can you grab and post logs? Too many variables to just say it's not working...

Thebear's 1+7T
[Android Software Development] djdarkknight96:
This is the only method to mod systemui like Thebear j koss explained. In compiled edited files drop them in untouched systemui.apk DO NOT SIGN IT. Just drop the compiled edited files and flash to system in recovery or use recovery file manager to replace. If you get bootloops then log it to see why. Could be your edit is bad. We are only guessing you did it right.
[Android Software Development] David Stone:
Ok fine.

System is realme ui android 10 latest security patch

Stock ROM realme Mobile

I used TWRP for replacing systemui.apk and assigned permission 0644, i know these things I'm doing it for 5 years

What i tried?

I decompiled apk and did not edit anything and recompiled apk with

New signature

Same signature ( with command -c in recompiling or by coping original folder content android manifest and meta inf)

What happening?

No bootloops in any methods

System boots successfully even if i delete systemui.apk

So

If i put new signature apk

System boots and no systemui things displayed. Like wallpaper and launcher working, no status bar , can't launch apps etc. ( Like systemui deleted acts)

If i put same signature apk

System boots and nothing

Black everything

I can see power menu by pressing power button for some time

Other things are black screen

So system is knowing somehow that i did something

And your method of putting directly things into apk is as same as same signature apk act( black everything)

And i also have root and tried disabling signature verification. And this also acts like black everything

And i want to tell you one more thing that 3 days ago my method of compiling apk with same signature (-c command), worked for 3 times editing, and then 4th time black everything and then i restored twrp backup and then i retried that method and black everything. So

When i remove system ui and boot

Then i replace with modified apk (no matter new or same sign)

And then i replace original apk. Then original also NOT WORKING.black everything ?

So get original apk worked i had to wipe data or restore data. Then original works

So system is knowing somehow. I don't know how

Tell me if i missed something ?

That's the whole thing i tried

Thank you both guys for showing interest in my query.
[Android Software Development] djdarkknight96:
Keeping original signature is key, but also making good edits. I've added custom analog clock on lockscreen and edited framework using that method without issues. Get a log of the loops to see why.
[Android Software Development] David Stone:
sir i already told that i didn't edited anything

i'm talking about original and recompiled apk replacement

did you tried it in realmeui, that you're talking about your lockscreen clock mod?
[Android Software Development] djdarkknight96:
It shouldn't matter what OS or whatever unless they are using another systemui which I doubt very much. You have to replace the files you edited after compile into untouched apk. You have to edit the file and only move it not the entire res because some thing you cannot just drop in the all since folder names changes thus why we say just move edited files only to replace untouched non edited files directly.

My mod worked on everything Q since the files I used are universal.

I also use the files in my synergy theme. I just test the all changes directly sometimes. Overlay is better to mod IMO until R then we can't use overlays to mod. ?
[Android Software Development] iBotPeaches:
Sorry for mega delay. I'm preparing v2.5.0 for release before Christmas of this year. I'm running through nearly 200 bug reports on GitHub and trying to catch up. I'll save the excuses. Catching back up.
[Android Software Development] iBotPeaches:
A new version has been released!

v2.5.0 (Released December 2nd, 2020)

Apktool 2.5.0

md5 4958ad93cba461f084a47d5626e2d486

sha256 b392d7cb99b592e9c5acc3c06f1b0f180edde96c66b86b3d6932b7c0c4079fe4

Details of Release: https://connortumbleson.com/2020/12/02/apktool-v2-5-0-released/
[Android Software Development] dianoandr:
I report force close building the framework-res.apk oneplus android 11
[Android Software Development] starbucks2010:
Unfortunately, it gives bootloop on S20 Android 11 just decompiling/recompiling SecSettings using TMA tool . Putting back apktool 2.4.1 produces a valid and bootable SecSettings apk.
[Android Software Development] soilentgreen:
Hello to all.

I need help with apktools for android.

I downloaded apltools+x 7.2.2a Armu7.apk

Give it root, choose apk and decompile it.

Get message that the apk is decompile for a few minutes and than the message dissapear. Nothing heppened.

Somene can help me? What I did wrong?

Thanks.
[Android Software Development] Spannaa:
This is the apktool thread

for apltools+x 7.2.2a Armu7.apk support, you need to ask the developer of that app.
[Android Software Development] soilentgreen:
Deleted
[Android Software Development] Slowdeath:
Hi,

I'm trying to solve the issue in translation of the Nubia calender app on my phone.

I successfully decompile the apk, but when I try to compile it back it fails. :(

Anyone can help me finding source of this issue?

The compile process gives the following output:

C:\_Mod>apktool b Calendar --output Calendar_m.apk

I: Using Apktool 2.5.0

I: Checking whether sources has changed...

I: Smaling smali folder into classes.dex...

I: Checking whether resources has changed...

I: Building resources...

W: warning: string 'cts_warning_text' has no default translation.

W: warning: string 'data_usage_multi_sim_warning_body' has no default translation.

W: warning: string 'nubia_activity_resolver_use_always' has no default translation.

W: warning: string 'nubia_activity_resolver_use_once' has no default translation.

W: warning: string 'nubia_service_name' has no default translation.

W: C:\_Mod\Calendar\res\layout\calendar_alert_dialog_holo.xml:6: error: Error: Resource is not public. (at 'id' with value '@android:id/integer').

W:

W: C:\_Mod\Calendar\res\layout\calendar_alert_dialog_holo.xml:7: error: Error: Resource is not public. (at 'id' with value '@android:id/inter_word').

W:

W: C:\_Mod\Calendar\res\layout\calendar_alert_dialog_holo.xml:9: error: Error: Resource is not public. (at 'id' with value '@android:id/internalEmpty').

W:

W: C:\_Mod\Calendar\res\layout\calendar_alert_dialog_holo.xml:13: error: Error: Resource is not public. (at 'id' with value '@android:id/issued_on_header').

W:

W: C:\_Mod\Calendar\res\layout\calendar_alert_dialog_holo.xml:14: error: Error: Resource is not public. (at 'id' with value '@android:id/issued_to_header').

W:

W: C:\_Mod\Calendar\res\layout\calendar_alert_dialog_holo.xml:18: error: Error: Resource is not public. (at 'id' with value '@android:id/italic').

W:

W: C:\_Mod\Calendar\res\layout\calendar_alert_dialog_holo.xml:22: error: Error: Resource is not public. (at 'id' with value '@android:id/intoExisting').

W:

brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [C:\Users\zix\AppData\Local\Temp\brut_util_Jar_84195193200637122644810854839795458292.tmp, p, --forced-package-id, 127, --min-sdk-version, 22, --target-sdk-version, 26, --version-code, 651, --version-name, V6.0.59.1015, --no-version-vectors, -F, C:\Users\zix\AppData\Local\Temp\APKTOOL7012349679512107553.tmp, -e, C:\Users\zix\AppData\Local\Temp\APKTOOL14712269749481122894.tmp, -0, arsc, -I, C:\Users\zix\AppData\Local\apktool\framework\1.apk, -S, C:\_Mod\Calendar\res, -M, C:\_Mod\Calendar\AndroidManifest.xml]

C:\_Mod>
[Android Software Development] soilentgreen:
Helo to all. I have root note 8 run pie and I tried to color the lock icon on my lock screen. After decompile and recompile systemui with apktool, I ended with no lock screen, no statuse bar, no nav bar, no reboot menu.

I like to know if it can happen becuse the way I move the recompile systemui.apk (copy past it from phone and reboot)or it something with the codes and changes I made?

I dont know if this is the place so I ask can I post here what I did and the codes I add, so maybe someone can help me to figureout what went wrong?

Thanks.
[Android Software Development] asustitan:
Anyone able to repackage a Samsung app using apktool on Android 11?

I used to recompile then just replace classes.dex in the original apk and it used to work. Now the apk looks to be rejected.
[Android Software Development] asustitan:
Does recompile on System Apps still work with Android 11 using latest apktool? If I modify some smali code then copy only the classes.dex files to original apk using 7zip, its not working like before Android 10.

Anyone tried recompiling on Android 11?
[Android Software Development] arf8:
It is somewhat futile to do just the basic. decompile, recompile, no changes made and installing the app does not operate.

Maybe it works on some basic apps, opened ticket on github
[Android Software Development] Thebear j koss:
Are you deodexed? If not it won't work.
[Android Software Development] asustitan:
Sorted it.

With Android 11, I had to specifically use apktool 2.4.1.

Recompiled.

Using 7zip, on the original APK, delete example classes.dex or whichever file had changed then replace it using 7zip with the classes.dex from the modified APK.
[Android Software Development] Vgraev:
hello, dear friends. please, help me. apk tool 2.4.1 installed on linux, i want to do wifi fix on my sony, i decompile framework.jar, change parameters what i need, complied , no errors , but when i push framework.jar in /system/framework i have permanent boot, i have to recover old framework.jar and then everything ok

i found that patched framework.jar doesn't have meta inf.

please , help me
[Android Software Development] DragonFire1024:
Well here in lies the problem with this. It needs to be signed and you can use SignApk straight from the AOSP source, along with the keys you need, but the problem is whether or not the system will accept those new keys. Without root access they almost certainly will not accept them. With root access, Sometimes they do sometimes they don't, but if you don't have custom recovery then you're talking about several hours of recovery time if you're lucky.you can sign an APK or a jar file with any old key you want to using any old key store.it's just whether or not you will be able to use those applications or files once you have signed keep your backup files very handy because it sounds like you will be needing them. If you are talking about the framework APK this would be a little different. The trick you have to learn when working with an APK with such a high system level is not to decompile it in any form. Use 7zip or another extractor like that and open the jar files like you would an archive. Then take the information or files do you need from the newly compiled jar file, also opened as an archive and move the files over to the original jar file. it doesn't matter how many times you decompile or recompile the newly created APK/JAR because you're never actually going to use the whole thing. At least that's my two cents.
[Android Software Development] Vgraev:
thank you very much for your answer. of course i have root and custom recovery. the method with archive doesn.t work. Because when i open framework.jar with archive it shows meta inf and classes.dex , but i need to change file in classe2.dex and i can view and edit this file classes2.dex/android/net/wifi/wifimanager.smali only when i use apktool d . as far as i understand the only way - is to sigh patched framework.jar. may i use the key from original framework.jar and how can i do it? thank you very much
[Android Software Development] DragonFire1024:
Technically you can't once the signature changes in any form. That file will know right away. The only other thing I can suggest would be to gather what you can of the files main resources and try to recompile using something like aapt (Android asset packaging tool). With that said try to refresh any of the files you're working with from their direct sources and start over making sure only to make edits to the newly compiled or decompiled jar or APK file. then just drag your required files from the newly created file over to the original one. Just click and drag.

Edit: you can only use the same signature over if you know what keys were used to sign those specific files. If we're talking a carrier file from a phone provider or something to that effect that's not directly from the Android source you probably will never find the original keys to work with so you're going to have to resign the files with your own created keys or with keys from whatever Android Branch you're working with.
[Android Software Development] hieu291:
Google is about to stop releasing apps using apk anymore. Maybe it's about time to end the modding app. So sad
[Android Software Development] Raiz:
Sauce?

I didn't read that anywhere
[Android Software Development] Ticklefish:
Nothing's impossible but I find this unlikely. There's always the possibility that Google are looking into alternatives to the APK and APKS formats but stopping their use altogether would be a logistical nightmare. Every single developer would have to recompile their apps for the new format and many would find that a huge burden of there wasn't a significant advantage to doing so.

The modding scene is only a small thorn in Google's side, after all.
[Android Software Development] Raiz:
I agree, and on our side, modders always find ways to mod so I'm not very concerned.
[Android Software Development] gcrutchr:
So, trying to add 3Minit Battery to latest N9750 ROM (ZSU4FUC3). Keep getting compile errors as Samsung has added capital letters to 4 resource files Flash_on.webp, Flash_off.webp, Flash_on_black.webp & Flash_off_black.webp. I cannot just change to lower case. These files are used in a lot of files. Also, recompiling smali_classes_2 and copying it to the original SystemUI.apk does not work. ROM fails to load SystemUI.apk (even if I make no changes to smali_classes2). The latest apktool.jar uses smali 2.4.1, but the most recent is 2.5.1. The smali.jar is embedded in the apktool.jar file. Anyone have any ideas?

WARNING: D:\Note10+\work2\SystemUI\res\drawable-xxhdpi\Flash_off.webp: error: File is case-insensitive equivalent to: D:\Note10+\work2\SystemUI\res\drawable\flash_off.webp