• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root APKTOOL and PATH NAME assistance??

qandres12

Android Expert
So i have ADB set up on my computer, something that i did a long time agoand ive used it several times so I know that works, i even set up the Path by adding to end of what it was.
Code:
;c:\android-sdk-windows\tools;c:\android-sdk-windows\platform-tools
so now my path in the environment variables is the follwoing
Code:
%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\QuickTime\QTSystem\;C:\android-sdk-windows\tools;c:\android-sdk-windows\platform-tools
all i did was add the line from earlier and which made it so i could use adb without having to do the change the directory within the cmd prompt using cd c:\android-sdk-windows\platform-tools

ADB works perfectly but for some reason why directory within the cm promt isnt automaticall set to platform tools.
i have to manually go in and change it by using cd c:\android-sdk-windows\platform-tools and then i can actually use apktool right
but that tedious to do. can someone help set up my directory right? I tried everything i could think off but nothing works so far.

here is the link i used to help me set up adb
What Is ADB And How To Install It With Android SDK
i dont usually use apktool, i use apk-multitool to decompile and recompiles but i was to be able to use apktool, ya know? its just tedious having to change the directory every time. i dont remember it so i always have to go and see what it is
 
I would have to say forget apktool in favor of apkmult, but thats just me. apkmult does so much more than apktool, why would you want to use it?

but if you're insistent, just add the executable to your variables path and you should be good to go.
 
I would have to say forget apktool in favor of apkmult, but thats just me. apkmult does so much more than apktool, why would you want to use it?

but if you're insistent, just add the executable to your variables path and you should be good to go.

i was kinda hoping to diversify lol im do prefer multitool though, its just that sometimes when i decompile system apps i get errors and im still at that point where i cant understand what any of them mean.

oohh spz, quick question with mutitool, after i compile the apk do i have to take the fapk and put it into the folder "place-apk-here-to-batch-optimize" and then run the script to zip it? whenver i made any change to an existing framework or systemUI of a theme zip and i put back the modified one to replace the existing one, it never flashes. it always aborts. im thinking that im to zp it?
 
Just create a shortcut to cmd in the sdk folder. In the target line put: C:\Windows\System32\cmd.exe
In the start in put: "path to apktool"
e.g. C:\android-sdk\platform-tools
 
so apk multitool is given all types of problems when i compile system apps -__- im really started to hate this... i havent done anything to it
 
i was kinda hoping to diversify lol im do prefer multitool though, its just that sometimes when i decompile system apps i get errors and im still at that point where i cant understand what any of them mean.

oohh spz, quick question with mutitool, after i compile the apk do i have to take the fapk and put it into the folder "place-apk-here-to-batch-optimize" and then run the script to zip it? whenver i made any change to an existing framework or systemUI of a theme zip and i put back the modified one to replace the existing one, it never flashes. it always aborts. im thinking that im to zp it?

No you dont.
Just decompile, make changes, recompile, sign if its _not_ a system apk, put back into your original zip then test.
 
No you dont.
Just decompile, make changes, recompile, sign if its a system apk, put back into your original zip then test.

sign a system apk?? i thought you werent supposed to sign them o.0
i do everything but sign the apk and it doesnt work
 
guahh. sorry, damn tapatalk. didnt insert the "not"
sign if its _not_ a system apk

btw, elaborate on aborts, and doesnt work, please. error msgs are good to know to help diagnose problems.
 
guahh. sorry, damn tapatalk. didnt insert the "not"


btw, elaborate on aborts, and doesnt work, please. error msgs are good to know to help diagnose problems.

i cant remember the exact line CWM gives me but it is along the lines of:
Installation has been aborted(bad)

as for the errors, if i would get some, that i would get from multitool, i cant even see them casue it tells me to see the log but when i put in the number for the log it says cannot find specified file. i wasnt like that with apk manager though, it makes me think that whoever mod manager to make it multitool, didnt configure it right
 
or you can use Easy apk works like a charm, and it also signs the apk after it finish compiling.
 
while im here, can anyone point me to a good smali/baksmali tutorial, ive seen one of youtube that is twopart video, with both vids around 6 minutes long. they thing is i cant really see they screen and input because its soo tiny
 
okay so im having a huge problem that is really bothering me. in my attempts to make extended powermenus for the stock roms, any xml files i edit seem to cause trouble when the apk is being compiled. i only edit the public and strings xmls. i add the extra lines needed and save. then i go to recompile but it always get messafe that something has occured and to see option 21 from multitool. option 21 is the compression level. its supposed to be option 23(ithink) for the error logs but even then no error logs seems to exist. its always the same thing if a get an error while recompiling a different apk.
 
okay so im having a huge problem that is really bothering me. in my attempts to make extended powermenus for the stock roms, any xml files i edit seem to cause trouble when the apk is being compiled. i only edit the public and strings xmls. i add the extra lines needed and save. then i go to recompile but it always get messafe that something has occured and to see option 21 from multitool. option 21 is the compression level. its supposed to be option 23(ithink) for the error logs but even then no error logs seems to exist. its always the same thing if a get an error while recompiling a different apk.

Well those logs are really helpful. The log should be called APK-Multi-Tool so just look for that
 
|Mon 10/08/2012 -- 16:06:11.32|
--------------------------------------------------------------------------
java version "1.7.0_07"
Java(TM) SE Runtime Environment (build 1.7.0_07-b10)
Java HotSpot(TM) Client VM (build 23.3-b01, mixed mode, sharing)
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
(skipping index file 'C:\Documents and Settings\Andres\Desktop\Modding\APK-Multi-Tool\other\..\projects\framework-res.apk\res\drawable-mdpi\Thumbs.db')
C:\Documents and Settings\Andres\Desktop\Modding\APK-Multi-Tool\other\..\projects\framework-res.apk\res\values\public.xml:2693: error: Public entry identifier 0x10404c0 entry index is larger than available symbols (index 1216, total symbols 1211).
C:\Documents and Settings\Andres\Desktop\Modding\APK-Multi-Tool\other\..\projects\framework-res.apk\res\values\public.xml:2693: error: Public symbol string/reboot_recovery declared here is not defined.
C:\Documents and Settings\Andres\Desktop\Modding\APK-Multi-Tool\other\..\projects\framework-res.apk\res\values\public.xml:3665: error: Public entry identifier 0x10804aa entry index is larger than available symbols (index 1194, total symbols 870).
C:\Documents and Settings\Andres\Desktop\Modding\APK-Multi-Tool\other\..\projects\framework-res.apk\res\values\public.xml:3665: error: Public symbol drawable/reboot declared here is not defined.
C:\Documents and Settings\Andres\Desktop\Modding\APK-Multi-Tool\other\..\projects\framework-res.apk\res\values\public.xml:3666: error: Public entry identifier 0x10804ab entry index is larger than available symbols (index 1195, total symbols 870).
C:\Documents and Settings\Andres\Desktop\Modding\APK-Multi-Tool\other\..\projects\framework-res.apk\res\values\public.xml:3666: error: Public symbol drawable/recovery declared here is not defined.
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\DOCUME~1\Andres\LOCALS~1\Temp\APKTOOL4639425196232796384.tmp, -x, -S, C:\Documents and Settings\Andres\Desktop\Modding\APK-Multi-Tool\other\..\projects\framework-res.apk\res, -M, C:\Documents and Settings\Andres\Desktop\Modding\APK-Multi-Tool\other\..\projects\framework-res.apk\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:251)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:324)
at brut.androlib.Androlib.buildResources(Androlib.java:269)
at brut.androlib.Androlib.build(Androlib.java:192)
at brut.androlib.Androlib.build(Androlib.java:174)
at brut.apktool.Main.cmdBuild(Main.java:185)
at brut.apktool.Main.main(Main.java:70)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\DOCUME~1\Andres\LOCALS~1\Temp\APKTOOL4639425196232796384.tmp, -x, -S, C:\Documents and Settings\Andres\Desktop\Modding\APK-Multi-Tool\other\..\projects\framework-res.apk\res, -M, C:\Documents and Settings\Andres\Desktop\Modding\APK-Multi-Tool\other\..\projects\framework-res.apk\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:249)
... 6 more

so thats my most recent error log from apk-multitool while trying to create extended power menu mods

also here is the thread on xda which i am following:
http://forum.xda-developers.com/showthread.php?t=811532

honestly i dont what im doing wrong o.O ive looked at other roms with extended powermenus already in theme and they have they in the same way as it says in the thread, except the images are in the drawable mdpi folder of course.... i feel that the problem comes from when i make the additions to the xml files. ive always been able to change pngs in the drawable mdpi and and easily recompile
 
|Mon 10/08/2012 -- 16:06:11.32|
--------------------------------------------------------------------------
java version "1.7.0_07"
Java(TM) SE Runtime Environment (build 1.7.0_07-b10)
Java HotSpot(TM) Client VM (build 23.3-b01, mixed mode, sharing)
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
(skipping index file 'C:\Documents and Settings\Andres\Desktop\Modding\APK-Multi-Tool\other\..\projects\framework-res.apk\res\drawable-mdpi\Thumbs.db')
C:\Documents and Settings\Andres\Desktop\Modding\APK-Multi-Tool\other\..\projects\framework-res.apk\res\values\public.xml:2693: error: Public entry identifier 0x10404c0 entry index is larger than available symbols (index 1216, total symbols 1211).
C:\Documents and Settings\Andres\Desktop\Modding\APK-Multi-Tool\other\..\projects\framework-res.apk\res\values\public.xml:2693: error: Public symbol string/reboot_recovery declared here is not defined.
C:\Documents and Settings\Andres\Desktop\Modding\APK-Multi-Tool\other\..\projects\framework-res.apk\res\values\public.xml:3665: error: Public entry identifier 0x10804aa entry index is larger than available symbols (index 1194, total symbols 870).
C:\Documents and Settings\Andres\Desktop\Modding\APK-Multi-Tool\other\..\projects\framework-res.apk\res\values\public.xml:3665: error: Public symbol drawable/reboot declared here is not defined.
C:\Documents and Settings\Andres\Desktop\Modding\APK-Multi-Tool\other\..\projects\framework-res.apk\res\values\public.xml:3666: error: Public entry identifier 0x10804ab entry index is larger than available symbols (index 1195, total symbols 870).
C:\Documents and Settings\Andres\Desktop\Modding\APK-Multi-Tool\other\..\projects\framework-res.apk\res\values\public.xml:3666: error: Public symbol drawable/recovery declared here is not defined.
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\DOCUME~1\Andres\LOCALS~1\Temp\APKTOOL4639425196232796384.tmp, -x, -S, C:\Documents and Settings\Andres\Desktop\Modding\APK-Multi-Tool\other\..\projects\framework-res.apk\res, -M, C:\Documents and Settings\Andres\Desktop\Modding\APK-Multi-Tool\other\..\projects\framework-res.apk\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:251)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:324)
at brut.androlib.Androlib.buildResources(Androlib.java:269)
at brut.androlib.Androlib.build(Androlib.java:192)
at brut.androlib.Androlib.build(Androlib.java:174)
at brut.apktool.Main.cmdBuild(Main.java:185)
at brut.apktool.Main.main(Main.java:70)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\DOCUME~1\Andres\LOCALS~1\Temp\APKTOOL4639425196232796384.tmp, -x, -S, C:\Documents and Settings\Andres\Desktop\Modding\APK-Multi-Tool\other\..\projects\framework-res.apk\res, -M, C:\Documents and Settings\Andres\Desktop\Modding\APK-Multi-Tool\other\..\projects\framework-res.apk\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:249)
... 6 more

so thats my most recent error log from apk-multitool while trying to create extended power menu mods

also here is the thread on xda which i am following:
http://forum.xda-developers.com/showthread.php?t=811532

honestly i dont what im doing wrong o.O ive looked at other roms with extended powermenus already in theme and they have they in the same way as it says in the thread, except the images are in the drawable mdpi folder of course.... i feel that the problem comes from when i make the additions to the xml files. ive always been able to change pngs in the drawable mdpi and and easily recompile

Yeah it's saying there's a problem with public.xml line 3666, 3665, 2693
 
Yeah it's saying there's a problem with public.xml line 3666, 3665, 2693

i guess the id's im setting for each line is too large or something like that?
these are the id im assigning:

<public type="string" name="reboot" id="0x010404b9" />
<public type="string" name="reboot_recovery" id="0x010404c0" />

<public type="drawable" name="reboot" id="0x010804aa" />
<public type="drawable" name="recovery" id="0x010804ab" />

they follow the series of id numbers so i dont understand why they are causing trouble

and i provided the frame im using if anyone wants to help me troubleshoot this in depth because i for the likes of me cant figure this out...
 
i guess the id's im setting for each line is too large or something like that?
these are the id im assigning:

<public type="string" name="reboot" id="0x010404b9" />
<public type="string" name="reboot_recovery" id="0x010404c0" />

<public type="drawable" name="reboot" id="0x010804aa" />
<public type="drawable" name="recovery" id="0x010804ab" />

they follow the series of id numbers so i dont understand why they are causing trouble

and i provided the frame im using if anyone wants to help me troubleshoot this in depth because i for the likes of me cant figure this out...

Look closely at your error.
What is the last hex ID in your public string? Are you incrementing the numbers correctly? Are you duplicating? Do you have a gap in your hex ID string?
If there is a duplicate or incorrect increment, the apk will not compile. If there is a gap (ie: missing ID) in the hex ID sequence (ie: 0x0108041a, 0x0108041b, 0x0108041d), it will not compile.
You need to search for incorrect increment, duplicates, then do a number by number search for your last ID sequence, starting with what you _think_ is the last hex ID, and searching upward from there til you find your true end hex ID.
 
Look closely at your error.
What is the last hex ID in your public string? Are you incrementing the numbers correctly? Are you duplicating? Do you have a gap in your hex ID string?
If there is a duplicate or incorrect increment, the apk will not compile. If there is a gap (ie: missing ID) in the hex ID sequence (ie: 0x0108041a, 0x0108041b, 0x0108041d), it will not compile.
You need to search for incorrect increment, duplicates, then do a number by number search for your last ID sequence, starting with what you _think_ is the last hex ID, and searching upward from there til you find your true end hex ID.

it know that the id i set arent duplicates i made sure to check for that, i only get 3 errors from the 4 added lines so ill use that one to check for the others. i thought i had them follow the sequence but it guess not :/ this will take a lot of trial and error
 
so i finally got the framework-res.apk for an odex 2.3.4 properly compiled but i cant figure out how to baksmali. ive read up a whole lot up on smali/baksmali but i cant figure it out. how am i supposed to baksmali a jar file. i use 7zip but i dont see any class.dex file.... *sigh* where's jesusfreke or raver when you need them

EDIT: never mind, i guess the class.dex file only exists in the deodex roms.
 
Back
Top Bottom