yashsingh1/xdaforums huggingface dataset:
[Android Software Development] Ambor:
Because you can not delete files from the framework

can only be added

ApkTool will not allow it to delete files

So it needs to be edited.

You do not remove it because the peaks then it becomes stable

short

There is a public.xml files which is a list of all files in the framework.

Imagine that

ApkTool- a prison guard

files- prisoners

public.xml- is a list of prisoners

Prison security guard finds out that he is missing is their prisoner.

because it has list:)
[Android Software Development] skyline_kid:
Awesome! ThankI you so much! So if I'm taking values from another theme I should just open the xml files in Notepad++ and copy and paste the values instead of taking the whole xml file (e.g. colors.xml) from other theme and overwriting the one in the base?
[Android Software Development] zelendel:
Would be smart. Also you will want to learn what your doing. Doing this could bloat the theme for no good reason if some of the stuff in the color xml isnt used in the theme your doing. Even better you could change your own colors xml and not copy paste anything.
[Android Software Development] devadip:
[MENTION=5717533]Ambor[/MENTION]

Great.... ahahah the prisoner
[Android Software Development] skyline_kid:
Ok thanks. I started out trying that originally but I'm lazy so I thought it'd be quicker and easier to just copy and paste but I guess that's what I get for being lazy lol. Thanks for the help guys!
[Android Software Development] zelendel:
Yeah you really can't be lazy doing this or you will be fighting errors all over the place. There is no fast way to do this until you learn what your doing. Then you will find ways to speed it up.
[Android Software Development] laura almeida:
Lazy people will learn this by the "hard" way

Like i did
[Android Software Development] Ambor:
:D:D:D:D

But He understand

Bro

mod theme for CM11 or Xperia 4.4.2 up,

simply delete the file pubilc

I do not know how it is with the CM12

Do you ever mod setting framework and other system applications

DO NOT DO THIS.
[Android Software Development] _alex74_:
SecContacts.apk is not google app so is not related

Ok logcat says

If i try to install it from privapp folder with root explorer

If i try to install it from stock filemanager

This one is not mentioned on my post

Which workaround? oh, you mean for google apps so?

Very nice i like it a lot, push that button, well done :D

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

On top of all, first time i decompile above apk, i get:

i never have the message bolded in 4 years of theming...... and if i recompile decompiled apk again, this message will not be displayed.

Hope Ibot now you have enough info to understand the issue, lot of us will be very grateful:good::good:
[Android Software Development] Carotix:
+1
[Android Software Development] skyline_kid:
I tried just editing the code in the base framework and I got framework-res to recompile so I'll just stick with that :) I'm trying to theme Cataclysm 5.1 and this is my first time attempting a theme so I've got a lot to learn. Thanks for the help though!
[Android Software Development] Ticklefish:
The trouble with deleting public.xml, as far as I understand it, is that you can't guarantee that the new one will have the same references in it for the items you're keeping.

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

Sent from Tapatalk

------------------------------
[Android Software Development] Thebear j koss:
Yeah, deleting public.xml is a no no. Unless following directions of a mod pertaining to your device and rom where the Dev is supplying a modified rom with the changed files already added. I've only seen this a few times, usually with a 1% battery mod of systemui. The public.xml is the index of every file used inside the APK, images, drawable xml's, themes, strings, bools, etc. Never delete the public xml. If you're doing your 1st attempt at a theme I suggest starting with some images and changes to colors.xml then move into styles and the layouts and drawable xml's then finally into smali.

Thebe@r'$ G@L@XY

De-materializing Android 1 app at a time...
[Android Software Development] prdog1:
^^^ What he said. :cool:
[Android Software Development] Crussader:
Wise words
[Android Software Development] Phone_Guru:
There is one
[Android Software Development] Ticklefish:
Exactly. Nicely said. :good:
[Android Software Development] djdarkknight96:
Oh my yes, here as well...Lol

Yes was very good way to explain

Work around is define it in the manifest but you'll have to use it in your final apk so you'll have to sign install if possible. Gmail, Google keyboard, Google plus are just a few with this issue I know of.
[Android Software Development] shrisangram:
getting error

I: Decoding AndroidManifest.xml with resources...

Exception in thread "main" brut.androlib.AndrolibException: Could not decode XML

at brut.androlib.res.decoder.XmlPullStreamDecoder.decode(XmlPullStreamDecoder.java:147)

at brut.androlib.res.decoder.XmlPullStreamDecoder.decodeManifest(XmlPullStreamDecoder.java:153)

at brut.androlib.res.decoder.ResFileDecoder.decodeManifest(ResFileDecoder.java:134)

at brut.androlib.res.AndrolibResources.decodeManifestWithResources(AndrolibResources.java:294)

at brut.androlib.Androlib.decodeManifestWithResources(Androlib.java:138)

at brut.androlib.ApkDecoder.decode(ApkDecoder.java:102)

at brut.apktool.Main.cmdDecode(Main.java:165)

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

Caused by: java.io.IOException: Invalid chunk type (25165824).

at brut.androlib.res.decoder.AXmlResourceParser.doNext(AXmlResourceParser.java:887)

at brut.androlib.res.decoder.AXmlResourceParser.next(AXmlResourceParser.java:96)

at brut.androlib.res.decoder.AXmlResourceParser.nextToken(AXmlResourceParser.java:106)

at org.xmlpull.v1.wrapper.classic.XmlPullParserDelegate.nextToken(XmlPullParserDelegate.java:105)

at brut.androlib.res.decoder.XmlPullStreamDecoder.decode(XmlPullStreamDecoder.java:140)

... 7 more
[Android Software Development] Ticklefish:
This doesn't really say much. If you want help with a decompiling problem, you need to provide a lot more information.

All I can tell from here is that you might have an issue with some XML in whatever apk you're trying to decompile.
[Android Software Development] PerfectSlayer:
Great job!

Just one thing… May be the text in code tags could be more contrasted.

It's green on light green… may be a darker green will be more readable.

PS: I also just did the move to GitHub for an aged projet but I was lazy to make a dedicated site.. Just use internal wiki :mad:

PPS: Keep writing tech blog post ;)
[Android Software Development] it's:
Hi guys,

I was happily using APKtool a few years ago and now I wanted to decompile a new APK. I updated the apktool file, but it fails with decompiling the apk file. Other apks are being decompiled normally...

W: Could not decode attr value, using undecoded value instead: ns=android, name=touchscreenBlocksFocus, value=0xffffffff

Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec: 0x0101048f

at brut.androlib.res.data.ResPackage.getResSpec(ResPackage.java:59)

at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:57)

at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:53)

at brut.androlib.res.decoder.ResAttrDecoder.decode(ResAttrDecoder.java:36)

at brut.androlib.res.decoder.AXmlResourceParser.getAttributeValue(AXmlResourceParser.java:369)

at org.xmlpull.v1.wrapper.classic.XmlPullParserDelegate.getAttributeValue(XmlPullParserDelegate.java:69)

at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.writeStartTag(StaticXmlSerializerWrapper.java:267)

at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.event(StaticXmlSerializerWrapper.java:211)

at brut.androlib.res.decoder.XmlPullStreamDecoder$1.event(XmlPullStreamDecoder.java:83)

at brut.androlib.res.decoder.XmlPullStreamDecoder.decode(XmlPullStreamDecoder.java:141)

at brut.androlib.res.decoder.ResStreamDecoderContainer.decode(ResStreamDecoderContainer.java:33)

at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:114)

at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:99)

at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:339)

at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:133)

at brut.androlib.ApkDecoder.decode(ApkDecoder.java:104)

at brut.apktool.Main.cmdDecode(Main.java:165)

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

Anybody got an idea what might be the problem? Thanks for looking into it. :)
[Android Software Development] Thebear j koss:
Need more info. Looks like you need a different framework installed for that app

Thebe@r'$ G@L@XY

De-materializing Android 1 app at a time...
[Android Software Development] it's:
For example, I am trying to decompile UnionFSSettings.apk from here:

phhusson.free.fr/Archos-unified/update-ac50da-v074-fusion.zip

I am installing the framework-res.apk that's included in the package...
[Android Software Development] rootSU:
same error here as well. :confused:
[Android Software Development] uriel_zo:
help

same error here

any idea.
[Android Software Development] iBotPeaches:
Make sure you are using latest build (RC4) and delete the file at $HOME/apktool/framework/1.apk and try again.

To the three of you. Usually looking at the "most thanked" posts in the past 1-3 weeks will aide in questions. This bug is from Android 5.1. The most thanked most is the "snapshot" build of 5.1 support I posted.

http://xdaforums.com/showpost.php?p=59436776&postcount=2812

That build won't have that error.
[Android Software Development] uriel_zo:
thanks

thanks.

works great
[Android Software Development] Lanchon:
we interrupt your scheduled programming to announce... DexPatcher

it might interest...

apktool / baksmali / smali users: like said tools it lets you patch APKs, but coding in java instead of smali.

Xposed developers: like Xposed it lets you mod APKs using java, but ahead of runtime and producing a standalone APK.

just published now, visit the project here...

[TOOL] DexPatcher: Modify Android DEX/APK files at source-level using Java

http://xdaforums.com/android/software/tool-dexpatcher-modify-android-dex-apk-t3060854

​

thanks for your time! ;)
[Android Software Development] bovirus:
Compiling teh source downlaoded by your Github repository I found several strings like

Note: Some input files use unchecked or unsafe operations.

Note: Recompile with -Xlint:unchecked for details.

And at the end

ProGuard, version 5.2

Reading program jar [D:\Apktool-iBotPeaches\brut.apktool.smali\baksmali\build\libs\baksmali-2.0.5-dev.jar]

Reading library jar [C:\Programmi\Java\jdk1.7.0_76\jre\lib\rt.jar]

Note: org.jf.dexlib2.analysis.reflection.ReflectionField calls 'Field.getType'

Note: there were 1 classes trying to access generic signatures using reflection.

You should consider keeping the signature attributes

(using '-keepattributes Signature').

(http://proguard.sourceforge.net/manual/troubleshooting.html#attributes)

Preparing output jar [D:\Apktool-iBotPeaches\brut.apktool.smali\baksmali\build\libs\baksmali-2.0.5-dev-small.jar]

Copying resources from program jar [D:\Apktool-iBotPeaches\brut.apktool.smali\baksmali\build\libs\baksmali-2.0.5-dev.jar]

:brut.apktool.smali:smali:proguard

ProGuard, version 5.2

Reading program jar [D:\Apktool-iBotPeaches\brut.apktool.smali\smali\build\libs\smali-2.0.5-dev.jar] (filtered)

Reading library jar [C:\Programmi\Java\jdk1.7.0_76\jre\lib\rt.jar]

Note: org.jf.dexlib2.analysis.reflection.ReflectionField calls 'Field.getType'

Note: there were 1 classes trying to access generic signatures using reflection.

You should consider keeping the signature attributes

(using '-keepattributes Signature').

(http://proguard.sourceforge.net/manual/troubleshooting.html#attributes)

Preparing output jar [D:\Apktool-iBotPeaches\brut.apktool.smali\smali\build\libs\smali-2.0.5-dev-small.jar]

Copying resources from program jar [D:\Apktool-iBotPeaches\brut.apktool.smali\smali\build\libs\smali-2.0.5-dev.jar] (filtered)

:brut.apktool:apktool-cli:cleanOutputDirectory UP-TO-DATE

:brut.apktool:apktool-cli:proguard

ProGuard, version 5.2

Reading program jar [D:\Apktool-iBotPeaches\brut.apktool\apktool-cli\build\libs\apktool-cli.jar] (filtered)

Reading library jar [C:\Programmi\Java\jdk1.7.0_76\jre\lib\rt.jar]

Preparing output jar [D:\Apktool-iBotPeaches\brut.apktool\apktool-cli\build\libs\apktool-2.0.0-1f530a-SNAPSHOT-small.jar]

Copying resources from program jar [D:\Apktool-iBotPeaches\brut.apktool\apktool-cli\build\libs\apktool-cli.jar] (filtered)

Is it important? How can fix them
[Android Software Development] iBotPeaches:
The first one is okay, we do some "unsafe" operations, but since apktool isn't a true API product we control what gets passed into these Duos, the warning code, thus we don't have to worry about it.

The other two are warnings as well, which will probably be fixed in smali 2.0.6. So in short, don't worry about em.
[Android Software Development] bovirus:
OK. Thanks for the info. Then I will use the lastes apktool.jar files.

If you want to avoid recompile warning where you should put Xlint:unchecked option (if you can..)?

Like as example in gradlew file

GRADLE_OPTS="$GRADLE_OPTS "-Xdock:name=$APP_NAME" "-Xdock:icon=$APP_HOME/media/gradle.icns" "-Xlint:unchecked""

About the second wanring I will check again when will be available smali 2.0.6.
[Android Software Development] mamdroid:
Hello, I have a samsung galaxy S5. I was wondering if there was a correct apktool.jar I am suppose to use for the galaxy S5, or is it okay to just use the newest version out which I believe it to be apktool V2.0.0 RC4? Thanks a bunch for the help, I greatly appreciate it!!!
[Android Software Development] bovirus:
It's available a specific update of apktool 2.0.0.RC4 for Android 5.0/5.1 in previous posts.
[Android Software Development] chandarakk:
it realy new update fr Rc4?
[Android Software Development] bovirus:
Yes. Please check in the specifc thread

http://xdaforums.com/showpost.php?p=59436776&postcount=2812
[Android Software Development] Matx13:
AndroidManifest.xml

Hello,

APKTool 2.0 changes the AndroidManifest.xml removing "android: versionName =" (...) and my rom it does not work if the first lines of the manifest are amended as APKTool with 2.0, how to get it no longer changes AndroidManifest.xml? Thank you :good:

Original :

<?xml version="1.0" encoding="utf-8"?>
<manifest android:sharedUserId="android.uid.system" android:versionCode="19" android:versionName="4.4.2-yang2.1411651819" package="com.android.settings" coreApp="true"
xmlns:android="http://schemas.android.com/apk/res/android">

Apk Tool 2.0 :

<?xml version="1.0" encoding="utf-8" standalone="no"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:sharedUserId="android.uid.system" coreApp="true" package="com.android.settings">
[Android Software Development] iBotPeaches:
It adds them back in via apktool.yml and aapt --version-code & --version-name parameters. This is not a bug nor problem.
[Android Software Development] Matx13:
If I did not slip my old Android Manifest with 7-Zip, my Rom do not recognize the apk :(

I would like to add a line in my androidmanifest, but I do not just because of that...

I had no problems with APKTool 1.5.

A tip? thank you
[Android Software Development] iBotPeaches:
I have no tip. I just tested it. Decompiled an apk. Rebuilt the apk. Decompiled the rebuilt apk. The manifest version & name were in the apktool.yml of the decoded rebuilt apk. This proves the version information was correctly inserted during build of the decoded apk into the rebuilt apk.

Basically. Decode. Rebuild. Decode the rebuilt apk. If your APK isn't working, then it has nothing to do with the version name or code.
[Android Software Development] Matx13:
If I try to install a system app, I get this error (even if normally you should not install them). We can not have behavior Apktool 1.5 for androidmanifest and apktool.yml?

Android 4.4.2, rom Mediatek Acer Liquid E3 base
[Android Software Development] iBotPeaches:
Thats the client facing error, which tells me absolutely nothing. You should get the real error via (adb logcat) during install. Secondly, no there is no way to revert to the 1.5 method of apktool.yml, this is a new limitation by aapt.
[Android Software Development] Thebear j koss:
I'm confused, why not just continue using apktool 1.5.2 if it worked? There is no reason to change apktool unless it doesn't work. Maybe I'm just misunderstanding, are you replacing or adding meta inf from original into new apk?

Edit- read your previous post. Most roms don't like or allow changes to the manifest of system apps. There are security features in place so that modified apks cannot run in system. Need to be careful when modding the manifest. You may have to disable signature check in your rom before modding the manifest then sign the APK with a private key.

Thebe@r'$ G@L@XY

De-materializing Android 1 app at a time...
[Android Software Development] _alex74_:
Hello mate,

any news about SecContacts.apk not appearing in system as logcat provided few days ago?

not a hurry, just to know you have a clue and issue can be solved;););)

Take ur time, as i will be in England for 10 days:D:D:D:D

Thanks x ur time
[Android Software Development] Ticklefish:
So the logcat is saying that:

[b]Caused by: java.lang.SecurityException: META-INF/MANIFEST.MF has invalid digest for AndroidManifest.xml in /storage/sdcard0/Android/data/com.android.mixplorer/temp/ASettings.apk[/b]

This does suggest that something has gone wrong with the Manifest..

[MENTION=4916750]Thebear j koss[/MENTION] is right. Changing a Manifest will mean that you need to disable signature checking. If you use the original key, Android will FC the app.

I'm not sure if you actually need to sign an APK if you have signature checking disabled, but I could be wrong. Signing with a different key won't hurt, that's for sure.

---------- Post added at 02:27 PM ---------- Previous post was at 02:24 PM ----------

Best country to be in.... ;) Just bring some nice weather with you!

I'll stop being OT now..lol
[Android Software Development] Matx13:
Thank you :)

Now I signed Settings.apk, the installation window opens (it was to test because it takes place in system/priv-app), but it does not start :crying:

From what I understand it is a problem of signature? I usually gives the old signatures(+manifest) with 7-zip, otherwise it does not work, how to remove this security? thank you
[Android Software Development] Ticklefish:
Have you tried putting your apk into a flashable zip? Or copying it to system/priv-app?

Since this is a system app, I don't think you can install it like a normal app.
[Android Software Development] prdog1:
+1

^^^^^^^^^What he said. :cool:
[Android Software Development] Thebear j koss:
+2. System apps cannot be installed like a regular data/app. Needs to be pushed or flashed into wherever it was pulled from.

Thebe@r'$ G@L@XY

De-materializing Android 1 app at a time...
[Android Software Development] Matx13:
I know it is in system / app-private, but it was to test because in system / app-private it does not start ....

I dev rom custom : http://forum.frandroid.com/topic/216820-rom-kk-androium-50/ (smali, xml and more...),
[Android Software Development] prdog1:
APK installer won't install system app. Has to be pushed with adb, flashed as zip from recovery or manually moved with file explorer and permissions set to 644 or whatever the original app permissions are. Settings.apk will only run from system and the apk installer wont run in system anywhere. :cool:
[Android Software Development] zelendel:
Then you will need to pull a logcat and find out why. You will never get it to install that way. It has to be flashed. And just a heads up. The days of editing the manifest are over. Your best bet is to leave it alone unless you want to add security issues to the list of features.
[Android Software Development] Matx13:
Settings does not appear at all in the launcher and nothing happens when I want to launch Settings (notification) here

[MENTION=4538493]prdog1[/MENTION]; I'm not a beginner :rolleyes:

CatLog gives nothing because Settings.apk acts as if he is not present at all! If I slide shows / META-INF with 7-zip it works, but I can not edit androidmanifest I'm stuck! ...
[Android Software Development] zelendel:
Well if it is not showing up then you are doing something wrong. Make your edits without touching the manifest and see if it works. Also only a beginner would try to install a system app. Now Ibot has helped you all he can. The rest is up to you.
[Android Software Development] Matx13:
Justement j'ai testé sans modifier le androidmanifest...

Ensuite j'ai voulu installer l'apk pour voir si cette erreur apparaissais "Erreur analyse kit" et bien elle n'apparais plus et je sais qu'il faut pas installer une apk système, mais c'était pour voir si androidmanifest était correctement lu, je l'ai dit plusieurs fois.

I just tested without changing the androidmanifest ...

Then I wanted to install the apk to see if this apparaissais error "Error analysis kit", well she did not Appear and I know I need to install a system apk,

but it was to see if androidmanifest was correctly rea

d, I said several times.
[Android Software Development] Thebear j koss:
Only way I know of being able to change the manifest is if you can sign the app with a private key after. You would need to disable signature verification usually found in 1 of the jar files in framework. Probably Android policy jar if I'm not mistaken. This is no guarantee either, as most system apps will break when touching the manifest. Sometimes you just have to use what is given to you. Modding the manifest these days is breaking a major security function in android therefore blocking the app at startup so you will not be able to use it.

Thebe@r'$ G@L@XY

De-materializing Android 1 app at a time...
[Android Software Development] Matx13:
Work with http://repo.xposed.info/module/com.pyler.disablesignaturecheck :good: but I'll get to edit it natively on my rom, I do not use Xposed module.

I disturb you anymore :cool:
[Android Software Development] Thebear j koss:
No disturbance. Everyone needs some help from time to time. There's many ways to go about disabling signature check. Xposed can do it, there are apps available that do it, the correct way is to mod the android policy jar. It's rather easy mod, it's just changing 1 line or integer inside. There are tutorials available on xda. Just search disabling signature verification.

Edit- signature check is in services jar. Not Android policy jar.

Thebe@r'$ G@L@XY

De-materializing Android 1 app at a time...