yashsingh1/xdaforums huggingface dataset:
[Android Software Development] KP@2016:
So I don't know apparently latest apktool is not decompiling my non-system app (which used to before).

Actually some-how my old framework apk was deleted from the path (C:\users\%username%\apktool\framework) [It took my a while to notice that new framework install dir is now (%LocalAppData%\apktool\framework]

But since my old framework-res file was deleted, I installed a new from 6.0 ROM as the build SDK used to build this app was api 23. But still had no luck, seamlessly getting following error. (By the way, this the app I was decompiling. It's my app so nothing to worry as it is licensed under GNU Open Source. Can you try it and let me know.

Also since I am decoding non-system app I don't think it's problem of framework-res file. Anyway it would be good if you can figure this out. Also I am running java version 1.8.0_191.
[Android Software Development] kramer04:
I'm now on Pie 9 from Samsung and i can't recompile framework even if i just decompile/recompile without any changes.

See log
[Android Software Development] and2:
open "apktool.yml" and delete all with res/drawable-... behind "doNotCompress:"

save it

recompile
[Android Software Development] kramer04:
Thanks ; now it works but i've new issues with lines appear twice .

is it about wrong decompile with apktool ?

if i delete these lines i can recompile

I'm testing now with this new framework if it works on my phone

Edit: i can recompile but if i install it my device doesn't boot

Edit2: ok now i can use it if i don't sign apk
[Android Software Development] hossein_sys:
lost status bar and nav bar in ore - Samsung J7Core

Hello

I need to remove the access to status bar permanently in android Oreo with visible interface

I follow from this post and this one :

My steps is:

0- my test on (Samsung j7core - android 8)(Apktool 2.3.3)

1- adb pull /system/priv-app/SystemUI/SystemUI.apk

2- adb pull /system/framework/framework-res.apk

3- apktool if framework-res.apk

4- apktool if SystemUI.apk

5- apktool d SystemUI.apk

6- Open SystemUI\res\layout\status_bar.xml and add android:clickable="false" to the top most xml element

7- Open xhdpi folder and replace the corrupt pip_dismiss_scrim.9.png file with the file on the top of my post link

8- run apktool b SystemUI

9- Go to SystemUI\original and copy AndroidManifest.xml and META-INF to SystemUI\build\apk\

10- run apktool b SystemUI again

11- Go to SystemUI\dist\ and override the device's original SystemUI.apk with the one at SystemUI\dist\SystemUI.apk with adb push SystemUI\dist\SystemUI.apk /system/priv-app/SystemUI/SystemUI.apk

12- change the permissions of SystemUI.apk

13- reboot device

14- see result >>> failed > the status bar and nav bar are lost ! cant see both of them

I do this steps on android 6 and worked perfectly .

Which step is wrong or must be do ?

please help ...

Many thanks.
[Android Software Development] Thebear j koss:
Only move what you changed from new apk into original apk

Sent from my PH-1 using Thebear Blue XDA Labs
[Android Software Development] hossein_sys:
Excuses me sir, I just change status bar.xml and pip_dis_smiss.9.png icon, what file should I move?

Need to recompile the changes at first?

And after it Exactly moving which file?

Thank you...❤️

Plz help me at this problem..
[Android Software Development] hossein_sys:
Thanks for your description ...

At final when I copy the res, classes.dex, classes2.dex and resources.arsc in SystemUI_mod.apk , the size of SystemUI_mod0.apk changed from 34MB to 22MB ...

Whats the problem ?

---------- Post added at 10:31 PM ---------- Previous post was at 10:28 PM ----------

I get the apk size decrease , as I describe at up post .

have a problem ?
[Android Software Development] Eleo:
Don't repost same question on different threads. Wait for answer patiently. Here is the answer:

https://xdaforums.com/android/general/guides-android-8-0-oreo-mods-thread-t3772017/post78805879
[Android Software Development] Spannaa:
Like I said, make sure you check the compression.
[Android Software Development] hossein_sys:
Thanks, how to check the compression?

Im using the 7zip for the moving rest, classes.dex, etc...
[Android Software Development] Spannaa:
Really?

Open both the original and modified apks with 7-Zip and compare the compressed size of the files you've moved.
[Android Software Development] hossein_sys:
I used this post step by step, can you say what's wrong ?

It shows the file size is the same but the block size is different.
[Android Software Development] hossein_sys:
I take the Screenshot as you say from 7zip
[Android Software Development] Spannaa:
Not sure what you've done in the res folder but don't compress resources.arsc when you copy it over.

This isn't really an apktool issue.
[Android Software Development] hossein_sys:
I just copy the resources.arsc File from moded systemui to original with 7zip.

i think this problem for 7zip, can I use another app like winrar?
[Android Software Development] Spannaa:
You can use any zip app you like, but don't compress resources.arsc (or any pngs) when you copy them - use compression level: store for these files.

This isn't an apktool issue though, so this is the wrong place for your question.
[Android Software Development] thereassaad:
I do this way in oreo & pie now

Decompile your systemui.apk then recompile it again , now open decompiled systemui.apk with winrar & extract res / resources.arsc & classes , now again open stock systemui.apk & drag & drop the res folder & resources.arsc & classes to stock sysui with winrar store compresses way & u can u push it system/prev-app/systemui / or even u can tested in clean install to be sure everything is working fine , now u can decompile ur new systemui.apk & do ur edited anywhere there then drag & drop ur edited xml or resources.arsc or classes to ur new sysui & everything is will work just fine , this way i use it to be sure everything is work & also u can do this way with any apk that u gonna edited ..

Edit 1 = this way will fix all the issues that will happen in clean install roms , edited ur fram-res.apk , in normal way it will give u fc with direct lock or fingerprint issues, by this way no more any fc or issues with any apk edited like fram-res.apk or secsetting or systemui.apk ...
[Android Software Development] djdarkknight96:
Use the build folder files not ones in the build apk. You are moving compressed files to compressed. Not a great idea.
[Android Software Development] thereassaad:
For Samsung TouchWiz it's the best , as no any other workaround founded to fix no sysui in a clean install or fc in direct lock when u decompile recompile fram-res.apk or fp fc when u do decompile recompile SecSetting.apk , only by this way it's fixed whole issues for me on TW oreo & pie ..
[Android Software Development] djdarkknight96:
Well I wouldn't worry about the size of the build as much as finding why it's not working. The size isn't the issue. But since your method isn't working you could try using the build folder. Don't drop entire res just drop any files you edited inside. I've themed Samsung many times and never had to do anything like you said.
[Android Software Development] hossein_sys:
When I use the normal way of using the sysui apk was in the build folder, my status bar was lost.

As I put the meta, manifest for sign and permissions, I don't know why this issue shown?
[Android Software Development] djdarkknight96:
You don't need to move meta or manifest.

Take only edited files from build folder "the layouts only" if you only edited status bar layout only take it and drop it into untouched systemui apk. Do nothing else to it but place on your system just like that.
[Android Software Development] Carotix:
hi all ,

i'm working on s8+ with beta Pie ...

i can decompile/recompile every app , sysui included ... but i can't recompile the framework-res.apk .... i tried different apktool versions but no match.

can someone help me?

thanks in advance

log
[Android Software Development] thereassaad:
Fram-res.apk it's need old versions of apktool ( the version it's not in my mind right now ) & u need to delete some duplicates lines in style.xml & that's it ..
[Android Software Development] Carotix:
thanks my friend ,

i already tried 2.2.2 version and i deleted the duplicated lines but doesn't help :( .. there are other problems after ...

do you know which version of apktool i can use?
[Android Software Development] kramer04:
i'm using apktool.2.3.4

see this post

https://xdaforums.com/showpost.php?p=78786441&postcount=5678
[Android Software Development] and2:
Hi mate,

may be this will help. It's my way.
[Android Software Development] Azazel6002:
Trying compile systemui.apk getting this error

Exception in thread "main" org.jf.util.ExceptionWithContext: Exception occurred while writing code_item for method Landroid/support/graphics/drawable/AnimatedVectorDrawableCompat;->inflate(Landroid/content/res/Resources;Lorg/xmlpull/v1/XmlPullParser;Landroid/util/AttributeSet;Landroid/content/res/Resources$Theme;)V

at org.jf.dexlib2.writer.DexWriter.writeDebugAndCodeItems(DexWriter.java:825)

at org.jf.dexlib2.writer.DexWriter.writeTo(DexWriter.java:268)

at org.jf.dexlib2.writer.DexWriter.writeTo(DexWriter.java:246)

at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:61)

at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:36)

at brut.androlib.Androlib.buildSourcesSmali(Androlib.java:419)

at brut.androlib.Androlib.buildSources(Androlib.java:350)

at brut.androlib.Androlib.build(Androlib.java:302)

at brut.androlib.Androlib.build(Androlib.java:269)

at brut.apktool.Main.cmdBuild(Main.java:238)

at brut.apktool.Main.main(Main.java:76)

Caused by: org.jf.util.ExceptionWithContext: Error while writing instruction at code offset 0x60

at org.jf.dexlib2.writer.DexWriter.writeCodeItem(DexWriter.java:1098)

at org.jf.dexlib2.writer.DexWriter.writeDebugAndCodeItems(DexWriter.java:821)

... 10 more

Caused by: org.jf.util.ExceptionWithContext: Unsigned short value out of range: 65537

at org.jf.dexlib2.writer.DexDataWriter.writeUshort(DexDataWriter.java:116)

at org.jf.dexlib2.writer.InstructionWriter.write(InstructionWriter.java:348)

at org.jf.dexlib2.writer.DexWriter.writeCodeItem(DexWriter.java:1058)

... 11 more

How do I fix this?
[Android Software Development] bovirus:
[MENTION=3924617]iBotPeaches[/MENTION]

My OS is Windows 7 64bit and Java JDK is 1.8.0 build 202.

I tried to compile apktool downloading the code from github, but after some of the latest updates I got several errors during test.

52 tests passed 12 tests with error.

If I compiled using the same github code under Linux (VMWare machine) is working fine.

Thanks.
[Android Software Development] Phone_Guru:
It's a known issue with building in windows at the moment. Could you send me the latest compiled version? I don't have a Linux setup.
[Android Software Development] a.raul:
Good afternoon, I leave the styles.xml of origin and the modified eliminating the lines to be able to compile the framewor-res.apk in Samsung Beta Pie, decompiled and compiled with apktool 2.3.4

Regards
[Android Software Development] Lanchon:
i suggest you download the latest smali from JesusFreke's github, and try baksmali then smali your systemui.apk. it should reproduce the bug i guess. then try to repro using a single 'classes(#).dex' file from within systemui.apk (android APKs are zip files you can open with any zip tool). then create an issue in github with all the relevant data needed to repro (including the dex file, where the systemui.apk came from, etc), JF is very busy these days, but he'll look into well-reported bugs from time to time.
[Android Software Development] iBotPeaches:
A new version has been released!

v2.4.0 (Released March 3rd, 2019)

Download: https://bitbucket.org/iBotPeaches/apktool/downloads/apktool_2.4.0.jar

md5 - 327b9389153ea29509963878e69012e4

sha256 - a0f116e8916d6f21160e1559847bb8b8c32ee71900f321cafeadbe37b87ebcc1

Details of Release: https://connortumbleson.com/2019/03/03/apktool-v2-4-0-released/
[Android Software Development] lovekobeme:
can't compile framework-res.apk,([ROM][9.0] Android Open Source Illusion Project [OFFICIAL]--honor view 10)

apktool d framework-res.apk (successed)

apktool b framework-res(failed)

try many times, it's failed. even if I didn't change anything to back-compile

please rename framework-res.7z.apk to framework-res.7z and unzip it
[Android Software Development] Thebear j koss:
All the log says is failed. Lmao. Need a complete log with errors of why it failed.

Sent from my PH-1 using Thebear Blue XDA Labs
[Android Software Development] lovekobeme:
where could I get the error log?I can't find log in "D:\apktool\framework-res" or "C:\Users\Administrator\AppData\Local\apktool\framework" or "windows log" or "D:\Java\jdk1.8.0_201",

and try find 'whereis apktool log' or 'windows whereis apktool log' keyworlds on google search but not No harvest.

How can I do it right to find it?
[Android Software Development] levone1:
Hate to be a pest, but any input on above post? It's driving me crazy - nothing will build anymore, even the same folders with the same commands that worked fine before, it's always the same error. Is there some kind of Java cache or something I can clear? I've tried moving the apktool and app files to other directories, deleting and starting from scratch, etc, and nothing... Thanks
[Android Software Development] djdarkknight96:
No clue here, upload apk's so we can try building without edits. Have you installed pie framework to your pc? Only thing I can think of.
[Android Software Development] levone1:
Yes. I made 2 folders, one for the O files and 1 for the P files. I put the O framework-res and SystemUI in the O folder and the P in the P folder. I imported them using their respective folders as --frame-path, so each folder had framework installed for those files. I modified and recompiled the O framework-res twice, using --ftame-path for that folder, with no trouble, and signed and installed it, no problem. I modified and attempted to recompile the O SystemUI, and I got the above error. Ever since then, every time I attempt to rebuild any of the apks in either of the folders, now I get that error.

Why is the log referring to a file in /...Tmp? Do you think the error is because it's not finding the file there? I'll mess around some more and see what I can do. Thanks
[Android Software Development] djdarkknight96:
No no you have to install them to your pc using cmd:

apktool if framework-res.apk

So it will use it as a resource to decompile systemui. Install the pie one for both Oreo and Pie. Then try systemui again.
[Android Software Development] levone1:
Yes, I know about if. That's what did: 'apktool if --frame-path /Windows/.../O/ /Windows/..../O/framework-res.apk', etc.

Install success message, and '1.apk' appears..
[Android Software Development] djdarkknight96:
Oh I see ok I was confused sorry
[Android Software Development] levone1:
So, very strange. I just deleted every apk and apktool folder I know of, started totally from scratch, imported framework-res: success; decompile framework-res: success; immediately attempt to build, with no modification, (tried with and without --frame-path), and error. Somehow there's some cache glitch or something somewhere, and it won't build anything. I guess maybe I should uninstall and reinstall java, and delete apktool, and clean temp files and caches, and start all over as if I never used it or something... I've used apktool on this computer for the past 3 years or so, and never had any issue like this...
[Android Software Development] djdarkknight96:
Oh so this just started out of nowhere? Check your java path to see if something like a Windows update or java update reset it.
[Android Software Development] levone1:
Going to test it out more, but I think it might be a bug with latest version, (2.4). I started getting the same error on another computer, so I had the thought to test other versions, and it seems like it's not happening with 2.3. Anybody else having issues with 2.4 on Win 10?

Update - now I'm getting it on 2.3... Baffled
[Android Software Development] djdarkknight96:
Upload the apk that's failing to build. I haven't had issues with the new 2.4.
[Android Software Development] cge_95:
Hi there,

Just for your info since build 2.3.3 apktool fails to decompile/recompile waze.apk

I guess it's in relation with the do not compress list

https://www.apkmirror.com/wp-content/themes/APKMirror/download.php?id=641459
[Android Software Development] Eleo:
Some apps are protected by devs against people who would like to take/modify/crack or share their free/paid apks elsewhere. So, that is normal.
[Android Software Development] DallasCZ:
Hello i try to decompile Huawei Pie app "Hwcamera2.apk" I have all the files needed including framework-res.apk and framework-res-hw.apk, but still get error when decompiling.

Please help.

here are the files

---------- Post added at 10:45 PM ---------- Previous post was at 10:45 PM ----------

Hello i try to decompile Huawei Pie app "Hwcamera2.apk" I have all the files needed including framework-res.apk and framework-res-hw.apk, but still get error when decompiling.

Please help.

here are the files
[Android Software Development] Ticklefish:
What is the error you get when decompiling?
[Android Software Development] Danielhammons1:
I have a question.

Sorry if what I'm saying doesn't go here but this is literally the only thing I could find of something new that does this.

Okay I used to use ninjamorph, Metamorph to edit my frameworkresapk and systemui and was able to change... Well anything. I'm running Resurrection Remix 7.1.2 and realized how long it's been and how much I miss that but I couldn't find anything similar to ninja or meta and it's driving me crazy.

The main things I'd like to change and mess with are the settings wallpaper and the status bar/notification panel wallpaper.

The icons I can change in substratum but I like to make mine a lot of the time.

Any help would be appreciated and if there is a thread on here somewhere I'm gonna lose my mind because Google didn't help and the search here didn't either and I've worded it every way I could think of.

Anyway pm me, post here, I don't care I'd just be grateful for any help.

Thanks!
[Android Software Development] djdarkknight96:
Well we can achieve almost anything in substratum within res but no java. If you are trying to change let's say signal and battery in status bar they been hard coded since Oreo. The wallpaper in settings can be achieved with styles adding windowShowWallpaper attribute and using clear or tinted windowBackground. I used #80000000 on mine so text look good on light wallpapers. You can see in screenshots...this is all using substratum but see Samsung exposed signal icon so I can theme those. If you mean just replacing the bg you can use a png for windowBg or xml.

You might need to explain exactly what you are trying to achieve. I'm trying with info given.

Hope that helps

DJ
[Android Software Development] eelsid:
I'm not able to build the framework-res.apk from the Pixel 2XL Pie, April update. I am using Apktool 2.4.0. I can decompile it without issue but when I try to recompile it (without making any changes) I get a number of the following errors. I did run the "if" command to save the framework before I decompiled.

Using aapt2:

W: /Users/eelsid/Downloads/apk/framework-res/res/values/attrs.xml:2522: error: invalid value for type 'attr'. Expected a reference.

Not using aapt2:

W: /Users/eelsid/Downloads/apk/framework-res/res/values/styles.xml:1185: error: Resource entry Theme.Holo already has bag item textEditSuggestionItemLayout.

W: /Users/eelsid/Downloads/apk/framework-res/res/values/styles.xml:1184: Originally defined here.
[Android Software Development] Thebear j koss:
Fix that error in attributes.xml. Are there numerous errors? Post the entire log. And You installed the framework before decompiling?

Sent from my PH-1 using Thebear Blue XDA Labs
[Android Software Development] eelsid:
There are numerous errors. I have attached the log from the terminal itself. The attrs.xml errors are referring to these lines:

<item type="attr" name="APKTOOL_DUMMY_267">false</item>

<item type="attr" name="APKTOOL_DUMMY_3a8">false</item>

<item type="attr" name="APKTOOL_DUMMY_3c3">false</item>

<item type="attr" name="APKTOOL_DUMMY_40e">false</item>

<item type="attr" name="APKTOOL_DUMMY_40f">false</item>

<item type="attr" name="APKTOOL_DUMMY_410">false</item>

<item type="attr" name="APKTOOL_DUMMY_411">false</item>

<item type="attr" name="APKTOOL_DUMMY_412">false</item>

<item type="attr" name="APKTOOL_DUMMY_413">false</item>

<item type="attr" name="APKTOOL_DUMMY_414">false</item>

<item type="attr" name="APKTOOL_DUMMY_415">false</item>

<item type="attr" name="APKTOOL_DUMMY_416">false</item>

<item type="attr" name="APKTOOL_DUMMY_417">false</item>

<item type="attr" name="APKTOOL_DUMMY_418">false</item>

<item type="attr" name="APKTOOL_DUMMY_419">false</item>

<item type="attr" name="APKTOOL_DUMMY_41a">false</item>

<item type="attr" name="APKTOOL_DUMMY_41b">false</item>

<item type="attr" name="APKTOOL_DUMMY_41c">false</item>

<item type="attr" name="APKTOOL_DUMMY_41d">false</item>

<item type="attr" name="APKTOOL_DUMMY_41e">false</item>

<item type="attr" name="APKTOOL_DUMMY_41f">false</item>

<item type="attr" name="APKTOOL_DUMMY_420">false</item>

<item type="attr" name="APKTOOL_DUMMY_421">false</item>

<item type="attr" name="APKTOOL_DUMMY_422">false</item>

<item type="attr" name="APKTOOL_DUMMY_423">false</item>

<item type="attr" name="APKTOOL_DUMMY_424">false</item>

<item type="attr" name="APKTOOL_DUMMY_425">false</item>

<item type="attr" name="APKTOOL_DUMMY_426">false</item>

<item type="attr" name="APKTOOL_DUMMY_427">false</item>

<item type="attr" name="APKTOOL_DUMMY_428">false</item>

If I remove these lines and try again I just get the following:

I: Using Apktool 2.4.0

W: Could not find sources

I: Checking whether resources has changed...

I: Building resources...

W: error: invalid package ID 0x01. Must be in the range 0x7f-0xff..

brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [/var/folders/z0/plkbnb051_5_4y8_yydp6mk80000gp/T/brut_util_Jar_5899568983383135665.tmp, link,.......etc
[Android Software Development] Ticklefish:
The error displayed when you don't use aapt2 shows that you have duplicate styles defined in styles.xml.

Try deleting those and see if that helps your file to recompile.
[Android Software Development] joegege:
Great tool for developers! Thanks, Guys!

Marked!

This is a great tool for developer to study third party works and protect himself:)
[Android Software Development] cfli1688c1:
using the latest jar, please see error:

c:\apktool\fire>apktool b -o outdir -o outdir\fres.apk --use-aapt2 framework-res-changed

I: Using Apktool 2.4.0

W: Could not find sources

I: Checking whether resources has changed...

I: Building resources...

W: error: invalid package ID 0x01. Must be in the range 0x7f-0xff..

brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [C:\Users\kn22ccl\AppData\Local\Temp\brut_util_Jar_708138339947350572.tmp, link, -o, C:\Users\kn22ccl\AppData\Local\Temp\APKTOOL8615092174364694131.tmp, --package-id, 1, --min-sdk-version, 25, --target-sdk-version, 25, --version-code, 25, --version-name, 7.1.2, --no-auto-version, --no-version-vectors, --no-version-transitions, --no-resource-deduping, -x, -0, arsc, -0, arsc, --manifest, c:\apktool\fire\framework-res-changed\AndroidManifest.xml, c:\apktool\fire\framework-res-changed\build\resources.zip

---------- Post added at 08:44 PM ---------- Previous post was at 08:44 PM ----------
[Android Software Development] zerolam:
is this guideline right for modifying Systemui.apk for now?

https://xdaforums.com/showthread.php?t=2478761

I tried, but bootloop.........

OS : Custom AOSP ROM (Havoc Pie)
[Android Software Development] cfli1688c1:
I tried on windows and googled lots of sites, no good answer. ended up using zorin os and was able to get it build, without issues.
[Android Software Development] Thebear j koss:
That is old. What are you modifying in systemui?

Sent from my PH-1 using Thebear Blue XDA Labs