yashsingh1/xdaforums huggingface dataset:
[Android Software Development] deepayanneogi:
Not able to recompile a systemui apk from cyanogenmod 12.

error log :

invalid resource directory name: G:\Software\Advanced+ApkTool+v4.1.0+By+BDFreak\AdvancedApkTool\3-Out\SystemUI.apk\res values-?@-rES

Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [C:\Users\DIPAYAN\AppData\Local\Temp\brut_util_Jar_1707073968098537743.tmp, p, --forced-package-id, 127, --min-sdk-version, 21, --target-sdk-version, 21, --version-code, 21, --version-name, 5.0.2-4b8f0a0ae3, -F, C:\Users\DIPAYAN\AppData\Local\Temp\APKTOOL7255342311071060518.tmp, -0, arsc, -I, G:\Software\Advanced+ApkTool+v4.1.0+By+BDFreak\AdvancedApkTool\1-BDFreak\Frameworks\1.apk, -S, G:\Software\Advanced+ApkTool+v4.1.0+By+BDFreak\AdvancedApkTool\3-Out\SystemUI.apk\res, -M, G:\Software\Advanced+ApkTool+v4.1.0+By+BDFreak\AdvancedApkTool\3-Out\SystemUI.apk\AndroidManifest.xml]

at brut.androlib.Androlib.buildResourcesFull(Androlib.java:442)

at brut.androlib.Androlib.buildResources(Androlib.java:379)

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

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

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

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

Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [C:\Users\DIPAYAN\AppData\Local\Temp\brut_util_Jar_1707073968098537743.tmp, p, --forced-package-id, 127, --min-sdk-version, 21, --target-sdk-version, 21, --version-code, 21, --version-name, 5.0.2-4b8f0a0ae3, -F, C:\Users\DIPAYAN\AppData\Local\Temp\APKTOOL7255342311071060518.tmp, -0, arsc, -I, G:\Software\Advanced+ApkTool+v4.1.0+By+BDFreak\AdvancedApkTool\1-BDFreak\Frameworks\1.apk, -S, G:\Software\Advanced+ApkTool+v4.1.0+By+BDFreak\AdvancedApkTool\3-Out\SystemUI.apk\res, -M, G:\Software\Advanced+ApkTool+v4.1.0+By+BDFreak\AdvancedApkTool\3-Out\SystemUI.apk\AndroidManifest.xml]

at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:504)

at brut.androlib.Androlib.buildResourcesFull(Androlib.java:428)

... 5 more

Caused by: brut.common.BrutException: could not exec command: [C:\Users\DIPAYAN\AppData\Local\Temp\brut_util_Jar_1707073968098537743.tmp, p, --forced-package-id, 127, --min-sdk-version, 21, --target-sdk-version, 21, --version-code, 21, --version-name, 5.0.2-4b8f0a0ae3, -F, C:\Users\DIPAYAN\AppData\Local\Temp\APKTOOL7255342311071060518.tmp, -0, arsc, -I, G:\Software\Advanced+ApkTool+v4.1.0+By+BDFreak\AdvancedApkTool\1-BDFreak\Frameworks\1.apk, -S, G:\Software\Advanced+ApkTool+v4.1.0+By+BDFreak\AdvancedApkTool\3-Out\SystemUI.apk\res, -M, G:\Software\Advanced+ApkTool+v4.1.0+By+BDFreak\AdvancedApkTool\3-Out\SystemUI.apk\AndroidManifest.xml]

at brut.util.OS.exec(OS.java:89)

at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:498)

... 6 more

------------------------------------------------------
[Android Software Development] Thebear j koss:
[MENTION=4596352]deepayanneogi[/MENTION] did you use latest snapshot build of apktool posted here- http://xdaforums.com/showthread.php?p=59436776

Thebe@r'$ G@L@XY

De-materializing Android 1 app at a time...
[Android Software Development] deepayanneogi:
yes, the latest one.

btw i am on win 8.1 x64 and java 8
[Android Software Development] Ticklefish:
I seem to recall a post about this a few days ago. Apparently the CM team were doing something unusual with their folder names and it was being looked into.

I'm not sure the new snapshot has a fix for it. Although it's always worth a try..

---------------------------------

Sent from Tapatalk

------------------------------
[Android Software Development] Thebear j koss:
Nothing but issues everywhere on android 5.0. Such a headache...

Thebe@r'$ G@L@XY

De-materializing Android 1 app at a time...
[Android Software Development] Crussader:
It's in services.jar... look for:

compareSignatures([Landroid/content/pm/Signature;[Landroid/content/pm/Signature;)I

it's usually in ( com\android\server\pm\PackageManagerService.smali )... set it to:

.method static compareSignatures([Landroid/content/pm/Signature;[Landroid/content/pm/Signature;)I
.locals 11

const/4 v0, 0x0

return v0
.end method

so it never compares ;)
[Android Software Development] Thebear j koss:
Thanks. I corrected it in my next post. Always good to get a exact reference point. [emoji106]

Thebe@r'$ G@L@XY

De-materializing Android 1 app at a time...
[Android Software Development] Ticklefish:
Ah, but that's half the fun! Google wouldn't be happy unless they change everything whenever they release a new version..

---------------------------------

Sent from Tapatalk

------------------------------
[Android Software Development] pwelyn:
Hi [MENTION=3924617]iBotPeaches[/MENTION] Whether to consider adding features to uninstall Framework?
[Android Software Development] Morningstar:
Hey everyone, HERE is how to recompile SecContacts without errors....Brought to you exclusively by Alliance.
[Android Software Development] Tired Storeman:
[MENTION=293887]Morningstar[/MENTION] thanks heaps for this, couldnt have done it without ya:good:
[Android Software Development] iBotPeaches:
This error means it couldn't properly decode the folder name "values-ast-rES". This was definitely fixed in the snapshot build. You'll have to re-decode the file with the new version though in order to fix the broken directories. The snapshot version can be found here - http://xdaforums.com/showthread.php?p=59436776

I have thought about a way to automate the frameworks, because of the common problem of those forgetting to update/remove the 1.apk during new apktool versions. However, I haven't spent time on a feature in months. All my work has been cat and mouse fixing problems that arise. Since the framework files live on the file system and you can manage them however you want, it currently isn't high priority to have anything automated/uninstall with the framework files.
[Android Software Development] bhavstech:
Need working apktool for android 5.1 ?rc4 doesnt work!
[Android Software Development] Vivek_Neel:
You need This
[Android Software Development] bhavstech:
tried that too but it doesnt work for systemui.apk it worked for framework-res.apk
[Android Software Development] Ticklefish:
Why didn't it work for SystemUI.apk? What are the errors you got?
[Android Software Development] Vivek_Neel:
That log says you need to install framework first.

apktool if framework-res.apk
[Android Software Development] bhavstech:
lol never thought of it (because it worked always without that command)! thanks!
[Android Software Development] xenius9:
Can`t build new apktool

52 tests completed, 1 failed

:brut.apktool:apktool-lib:test FAILED

FAILURE: Build failed with an exception.

* What went wrong:

Execution failed for task ':brut.apktool:apktool-lib:test'.

******************************

Failed tests

isAaptInstalledTest

java.lang.AssertionError: expected:<true> but was:<false>

at org.junit.Assert.fail(Assert.java:93)

at org.junit.Assert.failNotEquals(Assert.java:647)
[Android Software Development] Morningstar:
I've had that happen a few times on earlier versions. Try again...

I'll try building the latest when I get home just to make sure there's nothing wrong with it...
[Android Software Development] iBotPeaches:
That failure has really nothing to do with Apktool itself. It is just a unit test checking if you can execute "aapt" on command line. The check isn't really needed any more, so I guess I could remove it.
[Android Software Development] Morningstar:
Ah. I was curious as to what it actually was. Thanks for the clarification.

[emoji106]

Edit: Just finished building, and all went as smooth as ever. Excellent work as always, [MENTION=3924617]iBotPeaches[/MENTION].
[Android Software Development] Phone_Guru:
Could you please be more specific? There are lots of entries with that text. I changed the one that I thought it might be but still have no contacts app after flashing my recompiled file.
[Android Software Development] Thebear j koss:
This most likely will not help with tw contacts issue. This is for people modifying the manifest, I believe the contacts is a completely separate issue being worked on.

Thebe@r'$ G@L@XY

De-materializing Android 1 app at a time...
[Android Software Development] Phone_Guru:
People have successfully modded the contacts app be disabling signature verification in combination with modifying the manifest.
[Android Software Development] Thebear j koss:
http://xdaforums.com/showthread.php?t=2725233. May have to try different methods, or Google disable signature verification check in android.

Thebe@r'$ G@L@XY

De-materializing Android 1 app at a time...
[Android Software Development] Crussader:
exactly
[Android Software Development] Morningstar:
Well, you're both absolutely incorrect. The only issue with Contacts stems from the android:authorities entry in the Manifest. The only reason signature verification needs to be disabled, is, well, because you're changing the manifest.

See HERE.
[Android Software Development] Thebear j koss:
I wouldn't know, I am not on tw 5.0. I only read the issue was being looked into. As far as modifying the manifest and disabling signature check which I posted a link for, there still is no guarantee that it will work as no one has posted a workaround for this issue in this thread.

Thebe@r'$ G@L@XY

De-materializing Android 1 app at a time...
[Android Software Development] Morningstar:
What's the issue?
[Android Software Development] mamdroid:
Please someone help me out please

Hey guys I am having a problem I am really hoping someone can help me out with. I am at whits end here as I can figure out what it is I am doing wrong. I am making a 5.0 T.W rom for a galaxy S5 and using a base to build off of. So I took out the secsettings.apk, and decompile it, make my edits, and then recompile secsettings and zipalign it, stuck back in the rom zip, and flashed the rom. Everything went fine the rom installed successfully, So I reboot into system. This is where I start having problems. Once booted into system the touch screen does not work, so I can even leave the first set up page because the phone screen does not respond to touch and I get 2 toasted messages, one of them stating context services has stopped and the other is my t-mobile app states that it has stopped as well. So I figured I would try with out making any edits to decompile and then recompile again with out edits and I get the same out come. Here is the kicker though if I put the original secsettings.apk back in the rom zip it runs fine.

I have spent days trying to figure this out with zero success . I would greatly appreciate any help that I could get :cowboy:

I am using apktool 2.0.0 RC4
[Android Software Development] Morningstar:
I have no clue...SecSettings shouldn't have any influence at all over whether or not the touchscreen functions...
[Android Software Development] mamdroid:
Its cool Bro I really appreciate the reply though. I did try to decompile and recompile secsettings out of a different rom and had the same out come. I have also tried other apktools but the same thing. So I am now thinking I should probably try and decompile and recomiple a different system apk like systemui or anyone of them and see what happens then. Thanks again bud:cowboy:
[Android Software Development] Morningstar:
Make sure that you've installed the same framework files into apktool that you're running on your phone....
[Android Software Development] Thebear j koss:
Initial setup on touchwiz is controlled by settings, so if it is not properly installed it would freeze or f/c. My advice is to setup everything, then flash your modded secsettings to see if you are actually able to get into your settings. Maybe pull a log. Other than that, not sure how you are doing apk. Did you use original files from the original apk? Did you sign it? Not sure what you modded either, too much can be causing this without knowing everything.

Thebe@r'$ G@L@XY

De-materializing Android 1 app at a time...
[Android Software Development] Morningstar:
Yes, initial device setup is part of settings, but the touchscreen controllers/drivers are not. If you're able to get any part of setup to boot and appear on screen, it should respond to touch....
[Android Software Development] Thebear j koss:
Not necessarily true. If secsettings is broken it can cause the screen to freeze resulting in touchscreen not responding. I'm guessing this is what he means. If settings is muffed on initial boot your phone would basically be unusable.

Thebe@r'$ G@L@XY

De-materializing Android 1 app at a time...
[Android Software Development] Crussader:
I thought that was correct because I tried to mod stock TW Contacts and it wouldn't work even though I had the signature comparison disabled. Anyways that was before RC4 and Alliance manifest mod that got the stock TW Contacts working ;).

I'm still trying to get AOSP Contacts + dialer working in TW...so far... so close :P.
[Android Software Development] mamdroid:
Here are the answers to your questions. No I did not move over the orig files meta-inf or the android manifest as I did not think I needed to with this tool? No I did sign the apk as it is a system apk. And I also tried it both ways I decompile and recompile with out any edits or modding done to the apk and I also decompiled, made my edits/modds, recompiled and zipalign the apk the out come was the same.
[Android Software Development] Thebear j koss:
Can you modify tw contacts after the alliance manifest is applied, and have it work? Just curious as what needs to be done so others with the same problem can maybe use this method. And aosp contacts and phone on TW? Are you replacing the TW contacts with the aosp ones? TW is very finicky, I know if you delete the stock incoming email sound or modify it, it breaks a bunch of other stuff. TW has a lot of stuff that is cross referenced all over the place, so if 1 little thing is different or off, it will break something somewhere. Lol

Thebe@r'$ G@L@XY

De-materializing Android 1 app at a time...
[Android Software Development] Crussader:
You betcha... is a major PITA.

With the help of [MENTION=3443334]Kryten2k35[/MENTION] I've managed to do it in KitKat.... Lollipop, on the other hand, has everything mixed ( Contacts + LegacyIncallUI + Telecom + Teleservice )... I'm getting sick just thinking all the headaches this has given me.... but I've already have Contacts ( CM because it has the "Groups" tab ) + Google Dialer somehow working... need to clean up the whole hybrid.

and yes... if you get something working everything else goes berserk... I had no SMS for a month without even noticing it... I don't really use it xD
[Android Software Development] Thebear j koss:
If someone can figure it out, Mr. Kryten will get it. He is a top notch dev who does great roms, themes, themed apps. But yeah tw is a nightmare with everything cross referenced everywhere. Lol. Also need to wait for the updates to slow down, Google is still rolling out 5.1 or whatever they are up to now. But yeah at some point, someone waaay smarter than me will figure out how to inject more aosp into tw. It always comes around.

Thebe@r'$ G@L@XY

De-materializing Android 1 app at a time...
[Android Software Development] pwelyn:
rover12421 has added to function code

https://github.com/rover12421/ShakaApktool/commit/341c583788916c3a6f4cd794e30d6ee580b1ca62
[Android Software Development] iBotPeaches:
While that would indeed fix the problem, think of the long term with this change. Soon tutorials and everything would say "use -df" so you can have an updated framework. I would envision users becoming dependent on this change, in order to simply always use the internal framework. This would effectively destroy the purpose of storing the frameworks on file system, since apktool users from novice to advanced might default to using this.

I'm leaning more to an option like "update-framework or u". This would be a top level argument like "[d]ecode and uild". At this stage the user has to explicitly say "I want to update my internal framework via

pdate-framework". This would check $HOME/apktool/framework/1.apk against a list of MD5 hashes of all previous internal frameworks. If the framework matches one of those hashes, we would update it.
[Android Software Development] Morningstar:
Yes, but unless you're running an Alliance ROM that has contacts with the modified manifest built-in, you'll still need signature verification disabled.
[Android Software Development] pwelyn:
Nice! I believe that many people look forward to this feature. :good:
[Android Software Development] biopsin:
It does remove the space when recompile, you can check this with root explorer and view the app.
[Android Software Development] Pneuma1985:
k thanks was just wondering... I still use 1.4.7 for somethings seems to work fine 1.4.9 makes it quite hard to search through the xml for inversion purposes... I like the code looking nice myself so its easy to look through... Spaced code makes that almost impossible without grep or notepad++ using the right keywords... And that doesnt solve the problem for the stuff thats hard to find...
[Android Software Development] freidel1:
Hi i have a bug :(

i want decompile and recompile my SystemUI.apk(ics 4.0.4) i was decompile succesfully SystemUI.apk and edited but i cant recompile apk :( i tried recompile without any change but i cant. after I tried random apk and succesfully edit apk and recompile.

Here is my bug report, SystemUI.apk and framework-res.apk (I'm using Windows 7 ultimate x64 , installed jdk-7u4-windows-x64, device: Huawei ideos x5(u8800) )

thanks...
[Android Software Development] grayn0de:
It compiled (after deleting the public.xml)! Thanks. I don't kknow why that never donned on me, lol. Much appreciated! :victory:
[Android Software Development] :
Seems you made some smali changes and ****ed a few variables up? (=

Can you show the smali files + changes you made?
[Android Software Development] biopsin:
I do agree:)

Any comments regarding this space disadvantage?

---------- Post added at 09:01 PM ---------- Previous post was at 08:55 PM ----------

couldn't this also mean wrong/missmatched 1.apk, replacing it with a fresh framework-res.apk and try again?
[Android Software Development] freidel1:
ahaha i m not ****ed variables bro :D i decompiled SystemUI.apk and only change statusbar_xml for center clock(this guide http://xdaforums.com/showthread.php?p=19760562#post19760562) and tried recompile :) after i tried recompile without any changes but same error error :D its stop at Smaling... :) can you try decompile and recompile my apk's :D i tried all the apktool's but it didnt recompilee :D

@biopsin

i noticed and replaced but same error :(
[Android Software Development] iBotPeaches:
Space was fixed in v1.4.10. Its on github. Haven't built that version yet, because still waiting on building in some more fixes. Suppose to get my phone back tomorrow.
[Android Software Development] :
try decompiling without sources:

apktool d -s SystemUI.apk and then try to recompile.
[Android Software Development] freidel1:
Yesssss. i'm recompile succesfullyy ! :D Very thank you mann :D
[Android Software Development] :
Glad that I was able to help (-;
[Android Software Development] blackhand1001:
I am trying to remove the softkey glow animation in systemui.apk. I am successfully able to decompile the apk, edit the smali file, and recompile it. However, the glow animation is still normal. What smali file should I be editing. I am currently editing

SystemUI.apk\smali\com\android\systemui\statusbar\policy\KeyButtonView.smali

It didn't change in the tablet ui or the phone UI. What file and what line do I need to change to make this happen.
[Android Software Development] Ticklefish:
Have you tried looking at xml instead? This is on a softkey in my status_bar_expanded.xml and all I have to do is delete the parameter.

Apologies if this is no help. :)
[Android Software Development] blackhand1001:
I don't think we're talking about the same thing. I want to remove the fade out animation on the nexus/honeycomb software buttons. They usually refer to this as the fastglow mod. Pretty much instead of it fading it just shows when you have it held in and when you let go it immediately disappears.
[Android Software Development] Ticklefish:
I think this is the same thing. I'm not near a computer right now but I'll have to see if I can show you what I mean.

I'm not saying I have the solution but if I can help..
[Android Software Development] blackhand1001:
What do I change in that xml file to do this then?
[Android Software Development] mattmanwrx:
SYystemUI /res/layout (maybe layout-600/720 depending on device)/navigation_bar.xml is where the glow parameter is.. try deleting that?

edit: from android source..

<com.android.systemui.statusbar.policy.KeyButtonView android:id="@+id/back"
android:layout_width="@dimen/navigation_key_width"
android:layout_height="match_parent"
android:src="@drawable/ic_sysbar_back"
systemui:keyCode="4"
android:layout_weight="0"
android:scaleType="center"
systemui:glowBackground="@drawable/ic_sysbar_highlight"
android:contentDescription="@string/accessibility_back"
/>

So,

systemui:glowBackground="@drawable/ic_sysbar_highlight"

Maybe just change ic_sysbar_highlighr.png to a transparent image?
[Android Software Development] blackhand1001:
I want the glow. I want to make it not animated. I want to change the duration.
[Android Software Development] gcrutchr:
@iBotPeaches

Great work!

I am trying to decompile/compile SystemUI.apk on an ASUS Transformer infinity (ICS 4.0.3). The file decompiles ok, but does not compile. When I turned on java -verbose, I noticied apktool could not find some .pngs. The are in the drawable-hdpi folder and defined in the values/public.xml file.

Example: in /drawable/status_bar_expand.xml there is a line:

<item android:drawable="@drawable/status_bar_expand_default" />

It cannot find status_bar_expand_default.png. It is defined in public.xml and is a .png in the drawable-hdpi folder.

Attached are the SystemUI.apk and framework-res.apk for this device.

I hope someone can help as I want to make mods to this ROM.
[Android Software Development] iBotPeaches:
Yes there is a problem with SystemUI and ICS/JB.

I'm still looking into it. Just got my phone back a couple days ago and had some MIUI stuff to attend to. Should have a nice block of time tomorrow to work on this.
[Android Software Development] mamdroid:
Yes bud I made sure that I had framework-res and twframework installed, that was the very first thing I did lol. I wanted to thank you again for helping me I really do appreciate it Bro!! Also I finally figured out what I was doing wrong. I had to move the META_INF and ANDROID MANIFEST files from the original apk to the my modded apk. For some reason I was thinking that was a apk-manager thing. Anyway I am up and running. Finally able to start back on my build. Thanks again bud:cowboy:
[Android Software Development] fhem:
apktool b -c <app-path>
[Android Software Development] mamdroid:
Good morning to ya, hey I am still kinda a noob. Would you please be willing to explain your post to me?

I would very much appreciate it!!

I do understand apktool b , just not -c<app-path>
[Android Software Development] fhem:
the -c simply copies the orig Met-Inf and manifest to your modded apk: <app-path> = the folder you are building.

Look under Options at bottom ------> http://ibotpeaches.github.io/Apktool/documentation/
[Android Software Development] infamous111:
I have a problem Recompiling SystemUI.apk here is the code. Any hellp?
[Android Software Development] Crussader:
Dunno if this solution is crazy but it works for me... get framework-res.apk... decompile it... compile it... then use it as 1.apk (if framework)... it should work.
[Android Software Development] infamous111:
Thanks it works :)
[Android Software Development] mamdroid:
Ha I see bud. Hey thanks a lot man I really appreciate you explaining that for me. Also for the very informative link!!! It is going to make modding apk's a lot easier for me.:highfive:
[Android Software Development] WINMACK.COM:
I tried many times for compile framwork-res.apk for SHV-E330L Lollipop 5.0.1 and show me like this, please help: