apktool confusion

Well, I will just throw them out here, work of warning to everyone else. These DO NOT WORK as they are.

http://db.tt/fgnQd8M2
http://db.tt/jPLCMdpg

There are 2 zips here, both react the same way. They are packaged in the zip jstntp fashioned earlier in the thread to flash system files in. The framework-res.apk will flash by itself, but once I add the android.policy.jar it tries to boot but kicks me back to recovery.

According to jstntp, there must be something wrong with the changes I made to the jar file but I am at a loss as to what I am missing. The source files are from ginger rom 1.3 (figured if I could get it to boot, would do the same for the community build).
 
Sorry, wasn't ignoring you, just busy. Sure, if I get a few minutes tonight I will take a look. And yes, they will work with community if they are fixed.
 
Yes sorry my mind has been a bit scrambled recently. You can do it with either guide, meant to mention this before. I originally did it based on the first guide you used and it would only work as a mod add on. Drew did it based of the second guide with framework.jar and was able to include it in Hydro all in one on a fresh boot.

Second method is really the way to go, but WILL work either way.
 
Cool, I think I will take a look in hydro rom for what and where he added in framework.jar. That last guide I posted, the ShutdownThread.smali they used is WAY off from ours so I dont really know where and what to add. I am REALLY trying to keep the "download" option out of this mod, but seems as most guides include it.
 
Okay, update time.

I got the mod to completely power up and it works !! BUT when I open it up, the Reboot option has the recovery icon and goes to recovery, and the Recovery option has the reboot icon and reboots. So the icons are right but the label is wrong. Jstntp, any idea of where I made my mistake?
 
It completely works now. I had the hex numbers reversed. But I took the easy way out and just edited the string.xml to swap the labels on reboot recovery. Here is the mod, which I will also add to Ginger Rom thread.

This is a mod for Ginger Rom 1.3 that adds the extended power menu for rebooting and rebooting to recovery. Simply place on SD card, boot to recovery, wipe cache/dalvik cache, turn off signature verification, and flash PowerMod5. Enjoy.

http://db.tt/kpmWYBlI
 
It completely works now. I had the hex numbers reversed. But I took the easy way out and just edited the string.xml to swap the labels on reboot recovery. Here is the mod, which I will also add to Ginger Rom thread.

This is a mod for Ginger Rom 1.3 that adds the extended power menu for rebooting and rebooting to recovery. Simply place on SD card, boot to recovery, wipe cache/dalvik cache, turn off signature verification, and flash PowerMod5. Enjoy.

http://db.tt/kpmWYBlI

Sha-zam! Nice one hlxanthus!

Now see if you can port the notification dropdown widgets (including the brightness slider) from HydroROM :p

Of course I'm kidding about the above, it's a gigantic PITA to get working 100% correctly.

EDIT: Whoo that recovery icon is GIGANTIC! We'll get that fixed this evening LMAO it's just an image sizing issue (we had the same exact issue on HydroROM).
 
Last edited:
Old thread.. I know.. Dev's I need help.

Followed instructions to "install" apktool, did it. I extracted to C drive. I cd to C:/ and execute the command "apktool"...

I get the error...

Code:
Error.. Unable to access c:\\apktool.jar
What the? I followed the instructions by extracting, but there was not a file named "apktool.jar" in the tar.bz2 archive.

I am currently running..

Windows 8 Release Preview (yes, command prompt works.. I upgraded from Windows 7 Home Premium.. adb works too; all commands for the SDK work fine)

with.. 4GB RAM, TONS of disk space... and I have the latest platform-tools installed (including adb and fastboot)..

Any suggestions?

EDIT - had to download the jar file from apktool's google site. It was in all two seperate downloads.. one for aapt and apktool, and the second for apktool.jar
 
Last edited:
This time is serious.

I successfully decompiled an APK file and Command Prompt gives me an error when I try to compile the APK

Here is the log:

Code:
C:\Users\Patrick Akridge\Desktop\JOYSettings\res\values\strings.xml:1403: error:
 Apostrophe not preceded by \ (in Back Up Application Data, Wi-Fi Passwords, and
 Other Settings to Google's Servers)
C:\Users\Patrick Akridge\Desktop\JOYSettings\res\values\public.xml:306: error: P
ublic symbol layout/master_clear_final declared here is not defined.
C:\Users\Patrick Akridge\Desktop\JOYSettings\res\values\public.xml:307: error: P
ublic symbol layout/master_clear_primary declared here is not defined.
C:\Users\Patrick Akridge\Desktop\JOYSettings\res\values\public.xml:320: error: P
ublic symbol layout/security_sim_lock declared here is not defined.
C:\Users\Patrick Akridge\Desktop\JOYSettings\res\values\public.xml:359: error: P
ublic entry identifier 0x7f030079 entry index is larger than available symbols (
index 121, total symbols 121).
C:\Users\Patrick Akridge\Desktop\JOYSettings\res\values\public.xml:359: error: P
ublic symbol layout/wifi_item_password declared here is not defined.
C:\Users\Patrick Akridge\Desktop\JOYSettings\res\values\public.xml:360: error: P
ublic entry identifier 0x7f03007a entry index is larger than available symbols (
index 122, total symbols 121).
C:\Users\Patrick Akridge\Desktop\JOYSettings\res\values\public.xml:360: error: P
ublic symbol layout/wifi_new_item declared here is not defined.
C:\Users\Patrick Akridge\Desktop\JOYSettings\res\values\public.xml:361: error: P
ublic entry identifier 0x7f03007b entry index is larger than available symbols (
index 123, total symbols 121).
C:\Users\Patrick Akridge\Desktop\JOYSettings\res\values\public.xml:361: error: P
ublic symbol layout/wifi_soft_ap_settings declared here is not defined.
C:\Users\Patrick Akridge\Desktop\JOYSettings\res\values\public.xml:430: error: P
ublic symbol xml/sim_lock_settings declared here is not defined.
C:\Users\Patrick Akridge\Desktop\JOYSettings\res\values\public.xml:416: error: P
ublic entry identifier 0x7f05001e entry index is larger than available symbols (
index 30, total symbols 30).
C:\Users\Patrick Akridge\Desktop\JOYSettings\res\values\public.xml:416: error: P
ublic symbol xml/wifi_advanced_settings declared here is not defined.
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutExce
ption: could not exec command: [aapt, p, -F, C:\Users\PATRIC~1\AppData\Local\Tem
p\APKTOOL3506570045860171424.tmp, -I, C:\Users\Patrick Akridge\apktool\framework
\1.apk, -S, C:\Users\Patrick Akridge\Desktop\JOYSettings\res, -M, C:\Users\Patri
ck Akridge\Desktop\JOYSettings\AndroidManifest.xml]
        at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:193)
        at brut.androlib.Androlib.buildResourcesFull(Androlib.java:301)
        at brut.androlib.Androlib.buildResources(Androlib.java:248)
        at brut.androlib.Androlib.build(Androlib.java:171)
        at brut.androlib.Androlib.build(Androlib.java:154)
        at brut.apktool.Main.cmdBuild(Main.java:182)
        at brut.apktool.Main.main(Main.java:67)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\U
sers\PATRIC~1\AppData\Local\Temp\APKTOOL3506570045860171424.tmp, -I, C:\Users\Pa
trick Akridge\apktool\framework\1.apk, -S, C:\Users\Patrick Akridge\Desktop\JOYS
ettings\res, -M, C:\Users\Patrick Akridge\Desktop\JOYSettings\AndroidManifest.xm
l]
        at brut.util.OS.exec(OS.java:83)
        at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:191)
        ... 6 more
Here's what I did to the APK

Removed 3 XML files - master_clear_primary, master_clear_final, and security_sim_lock
Edited 1 XML file - strings.xml

Same system specs as last post..

Please help me and thanks for the help in advance..
 
APKTool Tutorial - YouTube

That is the apktool version I use, download link is there. Simply extact the contents (I keep the zip handy so when starting a new project I can simply reextract for a clean slate). Open the folder "PlaceApksHere" and place your apk or jar files to edit within. From within that folder, hold shift then right click and click on "Open command prompt window here" for simplicity. Make sure you place framework-res.apk in there first and "apktool if framework-res.apk" first and go from there.

Havent used this but a new version [HOW TO] Compile/Decompile ICS Apk easily|100% working - xda-developers
 
I suggest the other way.


Apktool d framework-res.apk Frame

That will decompile it.

Mess with whatever's in the folder and what not.

To compile

Apktool b frame Framework2.apk

Sent from my LG-VM670 using Tapatalk 2
 
My guess is in the 3 xmls you removed. Why remove them? I don't know what it is you are trying to do, but alot of those files are interconnected and rely on each other.

Try placing them back in and see if it will compile

Sent from my Nexus S 4G using Tapatalk 2
 
My guess is in the 3 xmls you removed. Why remove them? I don't know what it is you are trying to do, but alot of those files are interconnected and rely on each other.

Try placing them back in and see if it will compile

Sent from my Nexus S 4G using Tapatalk 2

It compiles. I edited strings.xml to fix JoySettings spelling errors. I then edited settings_about_phone.xml to remove JoyUpdate and Factory Reset menus. Compiled the APK (not XMLs) and made it flashable, then I placed on SD, flashed it and fixed permissions via ADB Shell (yes, I am su), then rebooted.

The SETTINGS haven't changed?! Did I do something wrong?
 
Hmmmm. . . I am at a loss. I have never tried edit ting settings. I will look into it. I am far from good at XML edits though

Sent from my Crespo4G using Tapatalk 2
 
  • Like
Reactions: PatrickAkridge

Trending Posts

Forum statistics

Threads
954,904
Messages
6,963,139
Members
3,163,152
Latest member
Kane2000