yashsingh1/xdaforums huggingface dataset:
[Android Software Development] einrae214:
@einrae214 Go to those lines in XML and add formatted="false" as attributes.[/QUOTE]

Ok will report back

---------- Post added at 08:52 PM ---------- Previous post was at 08:50 PM ----------

That was with the untouched secphone.apk still I should add to the lines.
[Android Software Development] DaOldMan:
Your wish is my command :) :

apk: https://dl.dropbox.com/u/15209525/ClockPackage.apk

framework-res: https://dl.dropbox.com/u/15209525/framework-res.apk

tw-framework: https://dl.dropbox.com/u/15209525/twframework-res.apk

If you need anything more, just ask. We want to translate this app, but it never compiles. It seems like on decompile some code is missing ...

Thanks beforehand,

Thomas
[Android Software Development] stanlin salu:
Brothers, wat r the framework files I will need for decompiling and recompiling 'android 4.2' keyboard, beoz I don't have any 4.2 framework files, so while recompiling I get error !

The keyboard is named 'latinimegoogle.apk'
[Android Software Development] ÜBER™:
Ive never been able to sucessfully recompile a keyboard for whatever reason. I just modify the images and compile them and replace them via 7zip but.
[Android Software Development] stanlin salu:
I tink its becoz of recources lacking?
[Android Software Development] iBotPeaches:
It has some attributes that not even my 4.2 framework from AOSP has.

EX No resource found that matches the given name: attr 'android:listItemLayout' (which I can't find in AOSP either). Its missing a framework or simply a magic "apk", an apk that had some non-standard method used against it. Theres not much I can do here.
[Android Software Development] ÜBER™:
Weird just decompiled and edited RBJ's keyboard.. worked like a charm. Guess its just CM's keyboard ive never been able to recompile.
[Android Software Development] brainmaster:
I'm using AutoAPKTool with iBotPeaches tools. Its also quait helpful for theming of the apk's.

What are you using?

Can also someone help me with my Phone.apk problem?
[Android Software Development] ÜBER™:
Just using the normal Platform-tools from the SDK with ibot's tools. Do all my commands via CMD prompt
[Android Software Development] brainmaster:
Well, I've downloaded the latest CM10.1 nightly for Nexus 4 and de- and recompiled LatinIME.apk without any problems.
[Android Software Development] ÜBER™:
Well i get it compiled.. but now it just Force closes -_-
[Android Software Development] brainmaster:
Have you also copied over the libjni_latinime.so from the CM10.1 to your ROM?
[Android Software Development] ÜBER™:
Well it was working just fine before i replaced it :S and the lib for the keyboard is already in my ROM. Dont get why its not working... maybe instead of putting the build components back into the original apk i should just use the dist apk?
[Android Software Development] brainmaster:
You're right, it's FC'ing also on my Nexus 4 - don't know why.
[Android Software Development] ÜBER™:
Super weird.. would have pulled a logcat but im fed up with it and just replaced it with the original apk.
[Android Software Development] PerfectSlayer:
I always succeed in decompile / recompile LatinIme apk (4.1.2 and 4.2.1).

Where did you fail more precisely ?

Perhaps I had to do some tricks : one or two jni lib and no compression of the zip to achieve to read internal resources.
[Android Software Development] PerfectSlayer:
I got this error when I have not upgraded the framework given with the new version of apktool (1.5.1).

See migration instructions to learn how to upgrade it.
[Android Software Development] ronak.super:
Hey thanks compiling worked!, But I'm sure it will fc as not all the resources have been compiled. Check the compiled apk size and original size.

Original size-32mb

compiled size-15mb

Any assistance!
[Android Software Development] PerfectSlayer:
I had to make apk (zip) with no compression otherwise app does not work (reader unable to read internal compress resources).

My apk is 14~15 mb. It's nearly the same size of the original apk.
[Android Software Development] ronak.super:
can you give me your original keyboard apk! please

thanks
[Android Software Development] PerfectSlayer:
Here you can find the resources (apk, odex and jni lib) I extract from the grouper (Nexus 7) system factory image. (I checked and it the same that the one on my N7) : http://bayfiles.com/file/y99z/3dJTIk/keyboard_jop40d.rar

Here you can find the smali deodexed from the odex : http://bayfiles.com/file/y9b9/7jDAJf/smali.rar
[Android Software Development] ronak.super:
Unable to download.

Thanks
[Android Software Development] PerfectSlayer:
Is it better ? http://dl.free.fr/ljF1NYkwf and http://dl.free.fr/lb8k958OW
[Android Software Development] ronak.super:
Unfortunately no it is not working!, thanks for helping.
[Android Software Development] Darkman:
Thanks for the Release!!!!!

EOS4 Android 4.2.x and CM10.1 works now very fine!!! :good:
[Android Software Development] iBotPeaches:
I've been tracing this down and after stepping through java lines forever, the problem actually seems to lie in aapt. It ignores pkg ids, it seems to use type id & something else to assign a package id which could be wrong.

I don't know how much I can do about this as it seems to be isolated to strictly HTC framework files, but I'll continue to dive into it more.

EDIT: aapt has a lot more features than it did 2 years ago. Will see if any of them help like that -x option.
[Android Software Development] biopsin:
v1.5.1

Hey,

hm, latest version is injecting a * on decompile

example, where ever textcolor is defined
[Android Software Development] raziel23x:
Try removing the white spaces in all the directory names
[Android Software Development] bgcngm:
I have noticed that as well. Don't know if that's a problem, tho.
[Android Software Development] antonio8297:
Great tool,but...when i recompile a file with or whitout mod the file is smaller than original....it's normal???
[Android Software Development] PerfectSlayer:
It depends of compression level. You may repack yourself if needed.
[Android Software Development] joeyfettucine:
Apktool has always had that effect.

Sent from my LTEVO running Frozen Jelly Belly
[Android Software Development] rlorange:
I'm curious I've never noticed ANY detriment using various APK tool compiled files which are half the size. Framework-res, systemUI etc...

So what if any is the downside of higher compression?... why doesn't Samsung shrink it's obscene 1gig+ Galaxy s3 ROMs to half that?
[Android Software Development] atl4ntis:
you don't need space in /system. You need faster resource access
[Android Software Development] CosmicDan:
QFT. Also, stock ROM's are odex'd for faster startup.

If you want best *safe* compression you can recompress using KZIP binary (best compressor in my tests) and then normal ZIP binary to give store-compression on already compressed assets like this:

cd newapk
kzip /r ../newapk.unaligned.apk "*"
zip -Ri *.dict *.m10 *.wav *.ogg *.mp4 *.jpl *.mp2 *.mp3 *.aac *.mpg *.mpeg *.mid *.midi *.smf *.jet *.rtttl *.imy *.xmf *.m4a *.m4v *.3gp *.3gpp *.3g2 *.3gpp2 *.amr *.awb *.wma *.wmv *.so *.dat *.bin AndroidManifest.xml -0 ../newapk.unaligned.apk "*"
cd ..
zipalign -v 4 newapk.unaligned.apk newapk.apk

Which is very useful for those in limited NAND size and a kernel with custom MTD partitions.
[Android Software Development] jarjar124:
i am having problems compiling system ui. i just simply decompiled it and then compiled it to see if it works and this is what comes up. i already installed framework-res

jarman@jarman-laptop:~$ apktool b systemui

Exception in thread "main" brut.androlib.AndrolibException: brut.directory.DirectoryException: java.util.zip.ZipException: error in opening zip file

at brut.androlib.Androlib.readMetaFile(Androlib.java:164)

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

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

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

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

Caused by: brut.directory.DirectoryException: java.util.zip.ZipException: error in opening zip file

at brut.directory.ZipRODirectory.<init>(ZipRODirectory.java:55)

at brut.directory.ZipRODirectory.<init>(ZipRODirectory.java:38)

at brut.androlib.res.util.ExtFile.getDirectory(ExtFile.java:55)

at brut.androlib.Androlib.readMetaFile(Androlib.java:160)

... 4 more

Caused by: java.util.zip.ZipException: error in opening zip file

at java.util.zip.ZipFile.open(Native Method)

at java.util.zip.ZipFile.<init>(ZipFile.java:127)

at java.util.zip.ZipFile.<init>(ZipFile.java:144)

at brut.directory.ZipRODirectory.<init>(ZipRODirectory.java:53)

... 7 more
[Android Software Development] Jamin13:
If you don't mind me asking, is there any way to really learn smali code?
[Android Software Development] marhensa:
the original apk has different compression level than apktool compiling process.

anyway thanks for the 4.2 support.

it works.

perfect.

Sent from Galaxy Nexus - Android Jelly Bean 4.2.1
[Android Software Development] CosmicDan:
Not unless you have an incredible memory, no. It's pretty easy to understand what each Dalvik opcode does, but putting into context and looking at methods from a glance is the difficult part. Three lines of Java can equate to 20-30 lines of smali (in some cases). Use Dex2Jar to get a better idea of what you're looking at and use Dalvik Opcodes as a reference.

If someone had enough time (hell, even I could do it) one could write an editor specific to smali files to make it more friendlier. But that'd take a very long time, you'd practically have to translate the entire API into smali in order to parse-and-display opcodes in a friendly manner.
[Android Software Development] varun.chitre15:
Do you even know about this? :p

http://xdaforums.com/showthread.php?t=1619473

Only for Windows though :p
[Android Software Development] PerfectSlayer:
awesome link ! Thanks !

(apktools is also a nice tool ;) )
[Android Software Development] CosmicDan:
Yes, but with enough skill/knowledge all you need is APKTool if you're building from sources and using your own patch engine.

Sent from Xperia Play (R800a) with Tapatalk
[Android Software Development] mpcdata:
iBotPeaches I'm trying to decompile nova to theme for a rom and this is what I get on decompile.

C:\Users\Administrator\Desktop\apktool>apktool d C:\Users\Administrator\Desktop\apktool\Nova_Launcher_2_0.apk

I: Baksmaling...

I: Loading resource table...

I: Loaded.

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:136)

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

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

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

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

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

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

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

Caused by: java.io.IOException: String data size is not multiple of 4 (7282).

at brut.androlib.res.decoder.StringBlock.read(StringBlock.java:65)

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

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

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

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

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

... 7 more

C:\Users\Administrator\Desktop\apktool>

Any suggestions would be appreciated.
[Android Software Development] DaOldMan:
Good you asked as I got stuck with the same problem with the Manifest of Nova :(. (Error with string data size) I hope this can be solved as I translate Nova for our Rom....

Thomas
[Android Software Development] Jamin13:
Currently, the new Nova Launcher can't be decompiled. I'd just wait until the next update for Nova.
[Android Software Development] raziel23x:
Could you just temp replace the manifest with one that can make the changes to the xml files then recompile then take the recompiled xml files and resource.dex and overwrite the original nova.apk files
[Android Software Development] DaOldMan:
Tried this in the morning but got tons of errors on xmls...

Used manifest from previous version, no go...

Thomas
[Android Software Development] zelendel:
Contact the dev. He could have added something that breaks the apk if decompiled

Batcom2
[Android Software Development] 1982Strand:
Does anyone have the latest aapt made for windows INCLUDING the MIUI patch??

Or just the last one iBot made, including the patches?

Thanks :)
[Android Software Development] ct_tec313:
sorry noob question trying to download v1.4.9 (Released July 28 – 2012) Codename: russia bu the url is bad.....
[Android Software Development] iBotPeaches:
Check here once I build it: http://miui.connortumbleson.com/other/aapt/win/

Pingdom shows no downtime for the past 72 hours. The link works fine for me: http://miui.connortumbleson.com/other/apktool/apktool_1.4.9.jar
[Android Software Development] 1982Strand:
Allrighty then! Thanks a lot! You're the man iBot :D
[Android Software Development] DaOldMan:
You must be joking :) I can wait till I die this way. Who said next version will be de-compilible ?

I got a e-mail from the dev, he seems not to understand that making the app to de-compile is in his best interest. He will sell more apps this way. In stead he wrote me he thinks this can call for more suport from him. I think he is very wrong. I hope he will change his mind and make a de-compilible version of the app.

Thomas
[Android Software Development] mpcdata:
Well at least you got a email. Crippling a app that was supposed to be designed under a operating system of open source as the whole linux platform was founded on just doesnt seem right. I wonder what Linus would think of this.

Update: Well Steve did get a reply from the dev.

To: "strongsteve @ xda-developers"

Cc:

I am the developer of Nova Launcher, not decompiler tools. I do not know why your decompiling tools are not working and do not have the resources to look into it.

-Kevin
[Android Software Development] 1982Strand:
Just noticed, the patched aapt for linux doesn't work, it says something in the lines of "Segment fault, core dumped" when running it..

Maybe a build error? :)
[Android Software Development] jrod091:
Works for me on Ubuntu
[Android Software Development] 1982Strand:
Hmm, tried re-downloading the linux aapt several times now, but still the same. I'm guessing you're also using apktool 1.5.1 and the linux aapt posted a few posts back? Maybe you could post a link to yours, so i can check that?

Thanks

EDIT:

(Built aapt from source and manually applied MIUI patch)

Long story short: I figured it out. One thing though. It's the aapt from /out/host/linux-x86/bin i should use, right?
[Android Software Development] iBotPeaches:
Yeah if Linux is your OS. All the binaries go there built from that build.
[Android Software Development] 1982Strand:
Ok, thanks..

Now that we're at the building-from-source thing, for building it for windows, i'm using this command:

make PRODUCT-sdk-win_sdk

But it builds the entire sdk and it takes a very long time. Is there a shortcut to only build the aapt for windows? (Like "make aapt" for linux..) And where does it put the windows output file?
[Android Software Development] Gigatopiloto:
i am getting an error while recompiling SystemUI.apk

Microsoft Windows [Version 6.2.9200]

(c) 2012 Microsoft Corporation. All rights reserved.

F:\Development\apktool-install-windows-r05-ibot>apktool d SystemUI.apk

I: Baksmaling...

I: Loading resource table...

I: Loaded.

I: Decoding AndroidManifest.xml with resources...

I: Loading resource table from file: C:\Users\Fired-UP\apktool\framework\1.apk

I: Loaded.

I: Regular manifest package...

I: Decoding file-resources...

I: Decoding values */* XMLs...

I: Done.

I: Copying assets and libs...

F:\Development\apktool-install-windows-r05-ibot>apktool b SystemUI.apk

Exception in thread "main" brut.androlib.AndrolibException: brut.directory.PathNotExist: apktool.yml

at brut.androlib.Androlib.readMetaFile(Androlib.java:164)

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

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

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

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

Caused by: brut.directory.PathNotExist: apktool.yml

at brut.directory.AbstractDirectory.getFileInput(AbstractDirectory.java:103)

at brut.androlib.Androlib.readMetaFile(Androlib.java:160)

... 4 more

F:\Development\apktool-install-windows-r05-ibot>

can anyone help please?
[Android Software Development] plegdroid:
its not decompiled correctly and generated the yml file (check if you have one in your systemui folder ), has your systemui already been modded before you decompiled it. if yes use an unmodified systemui apk.

ⓐⓝⓓⓡⓞⓢⓘⓓⓔ ⓘⓢ ⓝⓞⓣ ⓐ ⓢⓘⓝ
[Android Software Development] iBotPeaches:
Run apktool b SystemUI
[Android Software Development] DualJoe:
Never mind... After deleting framework files it works fine.
[Android Software Development] Samer Diab:
Need help

guys when i try decompiliong systemui.apk <tried like a 100 program> i always get this

C:\kitchen>apktool d systemui.apk
I: Baksmaling...
Exception in thread "main" java.lang.RuntimeException: bad magic value: 64 65 78
0a 30 33 36 00
at org.jf.dexlib.DexFile.<init>(DexFile.java:377)
at org.jf.dexlib.DexFile.<init>(DexFile.java:274)
at brut.androlib.src.SmaliDecoder.decode(SmaliDecoder.java:44)
at brut.androlib.src.SmaliDecoder.decode(SmaliDecoder.java:33)
at brut.androlib.Androlib.decodeSourcesSmali(Androlib.java:68)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:85)
at brut.apktool.Main.cmdDecode(Main.java:128)
at brut.apktool.Main.main(Main.java:65)

plz need help fast
[Android Software Development] iBotPeaches:
Your not using the new apktool. That was fixed around v1.4.7
[Android Software Development] DaOldMan:
Hi, what about my new question a page back? Three replies on systemui and nothing for me :(

Thanks, Thomas
[Android Software Development] iBotPeaches:
Your missing frameworks. http://code.google.com/p/android-apktool/wiki/FrameworkFiles
[Android Software Development] bgcngm:
iBot, can you please take a look into this post? I'm sure you missed it or else you would have replied. ;)
[Android Software Development] iBotPeaches:
The first thing is about package ids changing when rebuilding. This is because aapt for some reason doesn't look at the package ID when looking at the public.xml, it only looks at entry id and type id, which poses problems if you have frameworks over 0x02. I don't know exactly how I will tackle that problem, but it at least has been identified.

As for com.htc.resources. The header of each configFlag had been 36 bytes, which you could read easily. However, the htc framework comes around with a 40 byte header which makes no sense. It means they use a modified aapt for their builds, as stock aapt stays in tune w/ the standards. Once 4.2 came out, the new max was 38 bytes, since they added layout Direction (rtl , ltr) which was an additional 2 bytes at the end of all the other data. So one can simply read the size and sdk value to see if they need to read that layout direction.

The problem with com.htc is that out of all of its entrys in its apk, some are 40 bytes and the rest are the regular 36 byte structs. I've used aapt and done a "aapt dump badging" of htc framework and I don't see anything out of the ordinary, which kinda makes sense since I don't have the aapt that HTC used.

The next step is to pop a stock framework and htc into a hex editor, roll around to the offset that the config reading begins and try and identify what the extra bytes are for.
[Android Software Development] DaOldMan:
Nope, I know how to install frameworks. I am a small rom dev. And the file is not framework dependent...

Try to decompile it:

http://teslacoilsw.com/tesladirect/download.pl?packageName=com.teslacoilsw.launcher&betaType=public

Thanks,

Thomas
[Android Software Development] iBotPeaches:
The problem that existed in Nova Launcher 2.0 was abusing a bug in reading the AndroidManifest, well hardly abusing since Apktool decompiles APKs and I respect app developers. Though, more and more apps are inserting a bogus element into the Manifest knowing my reader will crash out on it. I need to read the file to pull data from it, but otherwise then that I don't need to read the manifest line by line.

As for the new version of Nova Launcher, that bogus element in the Manifest is gone but then I did see some other problems but haven't had time to look into them.
[Android Software Development] Samer Diab:
any idea about my problem ?? i am trying to decompile system ui
[Android Software Development] DaOldMan:
Yes, the manifest decompiles now. Of course if you can fix the reader for bogus data that would be great.

Will you please find out or direct me how to decompile the app?

Thanks, Thomas

IceBullet Rom
[Android Software Development] iBotPeaches:
You forgot a Framework. Install ALL frameworks in /system/framework/*.apk

Which there is obviously one you forgot.
[Android Software Development] CosmicDan:
You're still missing a framework file. You need to install *every* APK found in your ROM's /framework/ folder. Most stock-based ROM's have at least one more APK after framework-res.apk.
[Android Software Development] Schoat333:
Has anyone been able to get framework to install using apktool 1.5.1 on osx 10.8? Ive tried the aapt that comes with the download, and the one from the android sdk, and I still get this error.

Exception in thread "main" brut.androlib.AndrolibException: Multiple resources: spec=0x01080293 drawable/ic_ab_back_holo_dark, config=-xhdpi
at brut.androlib.res.data.ResConfig.addResource(ResConfig.java:65)
at brut.androlib.res.data.ResConfig.addResource(ResConfig.java:58)
at brut.androlib.res.decoder.ARSCDecoder.readEntry(ARSCDecoder.java:196)
at brut.androlib.res.decoder.ARSCDecoder.readConfig(ARSCDecoder.java:165)
at brut.androlib.res.decoder.ARSCDecoder.readType(ARSCDecoder.java:130)
at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:105)
at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:82)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:48)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:39)
at brut.androlib.res.AndrolibResources.installFramework(AndrolibResources.java:384)
at brut.androlib.Androlib.installFramework(Androlib.java:365)
at brut.apktool.Main.cmdInstallFramework(Main.java:193)
at brut.apktool.Main.main(Main.java:69)
[Android Software Development] westcrip:
thanks for update ! cheers
[Android Software Development] macs18max:
4.2 Gallery compiling issue

Can someone help me... I'm trying to decompile 4.2camera\gallery apk... I have executed apktool if framework-res.apk and systemui.apk.

And sucessfully decompiled Gallery2.apk... But when I compile back I get Style.xml error and something about no resource found at TextAppearance. I am on windows, and I'm 80% sure it is not the tool.... as I can decompile and compile back every other apk...

I also tried extracting Gallery2.apk from 3 different 4.2 Cm10 ROM and tried compiling it and all of them failed....

I have attached files...Can some experts try to decompile andcompile figure out whats the issue?

Is it tool or the apk or me?
[Android Software Development] Bubba:
Subscribed :D
[Android Software Development] einrae214:
Try installing twframework-res.apk

apktool if twframework-res.apk

See if that works because it might be depending on that framework