[DEV][TOOL] EASYapkTOOLcompilerDECOMPILER v1.5 [2.1Beta 2012.09.05] - Android Software Development

UPDATED 2012.09.05!!! Hey guys, if you can do some testing with the new version and give me some feedback, I fixed some errors with the drag and drop code, and included apktool versions (1.2.0, 1.3.2, 1.4.0, 1.4.1, 1.4.2, 1.4.3, 1.4.5, 1.4.6, 1.4.7, 1.4.8, 1.4.9, 1.4.10, 1.5.0) you can add as many others as you like to the _bin folder, just create a separate folder with the version number and place it in there (make sure the file is named "apktool.jar" or the code won't work), if you want to set a default apktool version to use, so that you aren't prompted all the time, you can change the name of the "apktool.manual" file to (for example) "apktool.1.4.9" and from then on it will use that version instead of prompting... and you can always change it back, or change it to a newer/older version number as needed...
if this works well for you guys I will update the first post...
Code:
Beta Changelog
2.0 Initial Beta
2.1b
cleaned up some code issues (defualt file wasn't working properly)
added the newer unofficial apktool builds (1.4.5 -- 1.5.0)
here's the mediafire link: http://www.mediafire.com/?td20i8cv8lfq90l
First of all, I did not create apktool (DUH!) that credit goes to: Brut.alll what a wonderful tool. I have included version 1.3.1 because that is the version that seems to work best right now...
Note: Brut.alll, if you happen to read this and would like me to remove apktool from being included with my batch scripts, please contact me and I will happily do so.
Alright... the easyFLASHABLEzipBUILDER gave me the idea to do this... Basically it's a way to "automagically" compile/decompile (smali/baksmali via apktool) apk's and jar's for all you dev's or wannabe dev's who want an easier way about this... These are windows batch scripts and should work with anything win2k or newer.
how it works: said:
Extract to a directory, for simplicity we'll say "apktool"
Place whatever file/folder(s) you would like to compile/decompile in the root of "apktool"
The filenames are pretty self explanatory... the drag and drop options file will prompt for the options only, this way you can still have the ease of drag and drop, but only need to input the more specific options
The manual file will only ask for options and filename, if you decompile it will change the last "." before extension to a "_" so framework-res.apk would output to _out\framework-res_apk.
When you (re)build with ANY of the files if the given folder name is framework-res_apk then the output file will be framework-res_REBUILTsigned.apk
The manual and drag and drop files always preserve the extension, so if you modify the folder name before rebuilding leave the "_apk" or "_jar" alone.
I will add some error checking in later versions, but at the moment you'd probably have to be trying, to create an error, and it would only be an error with the batch, you wouldn't actually mess a file up or anything.
now outputs all files/folders to a subfolder "_out"
core files are now in "_bin" folder... batch files must be one level above this folder to work properly.
Drag and drop works from ANY folder, but always outputs to the "_out" folder.
rebuilt files are now signed with a test key, so shouldn't have any "unsigned" or "improperly signed" errors when trying to install after being rebuilt.
Click to expand...
Click to collapse
Let me know if you have any requests, or questions... happy to help in any way I can...
MEDIAFIRE [LATEST]: http://www.mediafire.com/?cablu617ijq22ac

benjamminzIS said:
Note: Brut.alll, if you happen to read this and would like me to remove apktool from being included with my batch scripts, please contact me and I will happily do so.
Click to expand...
Click to collapse
I'm always happy to see that someone uses and/or improves my tools

Brut.all said:
I'm always happy to see that someone uses and/or improves my tools
Click to expand...
Click to collapse
I know this will probably only appeal to the "newer" devs who are just getting started... but I'm a fan of less typing to accomplish the same goal, so I figured why not =)
thanks for your blessing, it's appreciated!

Linux compatable?

Daughain said:
Linux compatable?
Click to expand...
Click to collapse
not currently... but if linux supports drag and drop on scripts, I suppose I could look into porting it for linux... or if not I could just make a "manual" version for linux? (as in one that just prompts for for the options and filename and does the rest) I need to start familiarizing myself with linux anyways... so it would be a good learning experience for myself...

c'mon guys, over a hundred takers already and pretty much zero feedback! If there is anything functionality wise you looking for please let me know, I would like to be able to improve this for you guys, but if no one says anything, then I don't even know if it's working for you or not... 30seconds of your time to write a post isn't asking much =P

Great tool
2 of the 4 bat files worked great. The other 2 gave me the syntax usage be fore it said GOODBYE.
Working for me:
DRAGandDROPbuild.bat
DRAGandDROPdecompile.bat
Not working for me:
DRAGandDROPoptions.bat
APKtoolMANUAL.bat
Thank you. This would save sometime.

IamSonoma said:
Not working for me:
DRAGandDROPoptions.bat
APKtoolMANUAL.bat
Thank you. This would save sometime.
Click to expand...
Click to collapse
thanks for the feedback, I'll check it out... hopefully will have an update asap...

EDIT: main post updated, this patch is now obsolete...

nice, when i decompile a apk and change one string and then recompile it gives me application not installed (i am thinking its not signing the apk correctly)
for that matter if i dont change anything and decompile then recompile, same issue

benjamminzIS said:
can you try this out for me, and tell me if it solves your issue? if it does I will add to first post and update the main download...
Click to expand...
Click to collapse
Firmware: Froyo 2.2.1 KP5
Phone: Samsung Captivate
OS: Windows 7 and Windows XP
Code:
Batch File Tested: APKtoolMANUAL.bat
File Tested: Settings.apk
Decompile Errors: 0
Recompile Errors: 0
Folder Output: Settings_apk
Decompiled File Tested: Settings_apk\res\values\bools.xml
Edit made: <bool name="has_intrusive_led">false</bool> --> <bool name="has_intrusive_led">true</bool>
Changes took: Yes - <bool name="has_intrusive_led">true</bool>
Code:
Batch File Tested: DRAGandDROPoptions.bat
File Tested: Settings.apk
Decompile Errors: 1
Recompile Errors: N/A
Option chosen: d
Folder Output: Settings_apk.out
Result: Exception in thread "main" brut.androlib.AndrolibException: brut.directory.DirectoryException: java.io.FileNotFoundException: C:\EASYapkTO
OLcompilerDECOMPILER_patch_v1.1" C:\EASYapkTOOLcompilerDECOMPILER_patch_v1.1\C:\EASYapkTOOLcompilerDECOMPILER_patch_
v1.1\Settings_apk (The filename, directory name, or volume label syntax is incorrect)
at brut.androlib.ApkDecoder.hasSources(Unknown Source)
at brut.androlib.ApkDecoder.decode(Unknown Source)
at brut.apktool.Main.cmdDecode(Unknown Source)
at brut.apktool.Main.main(Unknown Source)
Caused by: brut.directory.DirectoryException: java.io.FileNotFoundException: C:\EASYapkTOOLcompilerDECOMPILER_patch_v1.1" C:\EASYapkTOOLcompilerDECOMPILER_patch_v1.1\C:\Downloads\EASYa
pkTOOLcompilerDECOMPILER_patch_v1.1\Settings_apk (The filename, directory name,
or volume label syntax is incorrect)
at brut.directory.ZipRODirectory.<init>(Unknown Source)
at brut.directory.ZipRODirectory.<init>(Unknown Source)
at brut.androlib.res.util.ExtFile.getDirectory(Unknown Source)
... 4 more
Caused by: java.io.FileNotFoundException: C:\EASYapkTOOLco
mpilerDECOMPILER_patch_v1.1" C:\EASYapkTOOLcompilerDECOMPI
LER_patch_v1.1\C:\EASYapkTOOLcompilerDECOMPILER_patch_v1.1
\Settings_apk (The filename, directory name, or volume label syntax is incorrect
)
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(Unknown Source)
at java.util.zip.ZipFile.<init>(Unknown Source)
... 7 more
Code:
More Testing
Batch File Tested: DRAGandDROPdecompile.bat
File Tested: Settings.apk
Decompile Errors: 0
Folder Output: Settings_apk
Decompiled File Tested: Settings_apk\res\values\bools.xml
Edit made: <bool name="has_intrusive_led">false</bool> --> <bool name="has_intrusive_led">true</bool>
Changes took: Yes - <bool name="has_intrusive_led">true</bool>
Batch File Tested: DRAGandDROPbuild.bat
File Tested: Settings.apk
Recompile Errors: 0
Folder Output: Settings_apk
Decompiled File Tested: Settings_apk\res\values\bools.xml
Edit made: <bool name="has_intrusive_led">false</bool> --> <bool name="has_intrusive_led">true</bool>
Changes took: Yes - <bool name="has_intrusive_led">true</bool>
Output File: Settings_REBUILT.apk

IamSonoma said:
Firmware: Froyo 2.2.1 KP5
Phone: Samsung Captivate
OS: Windows 7 and Windows XP
Click to expand...
Click to collapse
ok, will have to look into it... my apologies... looks like I'm handling the variables wrong...

No biggie. For the most part all is good. Plus I have been using cm7 and been busy.
Sent from my Captivate using XDA App

IamSonoma said:
No biggie. For the most part all is good. Plus I have been using cm7 and been busy.
Sent from my Captivate using XDA App
Click to expand...
Click to collapse
ok, looking at it a little closer, it looks as though you extracted the patch to a sub directory, if you ran the batch files from that subdirectory, then you will get errors as it is looking in that subdirectory for the _bin folder... try overwriting the original files, with the ones from the patch... then try again... let me know if you still get the error...

benjamminzIS said:
ok, looking at it a little closer, it looks as though you extracted the patch to a sub directory, if you ran the batch files from that subdirectory, then you will get errors as it is looking in that subdirectory for the _bin folder... try overwriting the original files, with the ones from the patch... then try again... let me know if you still get the error...
Click to expand...
Click to collapse
Ok. Thank you. Extracted the files again and moved folder to my e:\.
Working with contacts.apk it decompiled and recompiled fine. Contacts.apk did not work when I moved it to the system/app folder. I will test more later. the file was more compressed. I will recompile it later with winrar and the store command.

UPDATED!
fixed the syntax in DRAGandDROPoptions.bat and merged the fixes from the 1.1 patch...
also updated the thread name to be more proper... "compiler" instead of "builder" also updated the filename to match thread name... enjoy!

pyrator said:
nice, when i decompile a apk and change one string and then recompile it gives me application not installed (i am thinking its not signing the apk correctly)
for that matter if i dont change anything and decompile then recompile, same issue
Click to expand...
Click to collapse
I get the exact same problem no matter how I edit my apks and its confusing the hell out of me. Does anyone have any ideas on this? Happens with your tool here, and several others too.
Sent from my Nexus S

I have the same problem, and I think you are right about the signing.
I tried to resign the rebuilded file with autosign and I had the same resault. I mentioned that the file's size didn't change. I resigned again, using android commander' s sign option and at this time the file' s size incrased by 5K. The output file works without problems.
So, the problem seems to be with the apktoolj.

Thanks ill try that, it makes sense as I am trying to mod system apps such as camera and launcher2.
Thanks again! This could be what I'm looking for.
Sent from my Nexus S

strange, I thought apktool was supposed to sign as well? is it just not signing or is it improperly signing?
I am using the 1.3.1 version of apktool with this... I am using this version because 1.3.2 seems to have decompile/compile issues with many apk's...
I'm open to suggestions guys, please let me know if there is a "fix" I can implement and I will do so =)

Related

(Dev) Here goes nothing

This is my attempt to get some more creativity, innovation, and roms here on xda. alot of people here have incredible skills but they cant be harnessed because they dont know what to do. if you are an artist we need you make icon packs. you have made 30 roms but you cant sign them. blah blah.
so no one abuse this but i attached a toolkit to do anything and everything with android on windows. im pushing this to be used for creating themes. hopefully it can help. but i thought it would be nice if everyone had this and the opensource community could start to grow even more.
i like this idea because it can help fellow Devs and even the watchers. everyone can get involved and give something to the community.
And now i present the Avabox
Any questions post them up.
OUTLINE------------------------------------------------------------
unyaffs-you have the ability to take system.img and data.img from you nandroids and get specific items from them.
Autosign- sign anything and everything. name your zip update.zip and follow the readme. roms themes, apps, anything.
Baksmali- put in apk in the folder. read readme. edit any icons wallpapers, anything. close it up and enjoy.
Perlscripts- this opens the boot.img for you.
Read the readme on all of these programs.
So this is going to be a quick tutorial Im gonna put up a video soon on how i got this to work on my computer
First things first download Avabox and unzip it in your C folder (same place you put androidsdk).
then get the java runtime from here not to be confused with the java development kit but since your there might as well grab it as well.
Install the java runtime then reboot
then open up avabox and click on autosign and place the zip you want signed in that folder and name it update.zip (dont add the .zip part it should already be a zip file).
then open up command prompt and type:cd\
cd Avabox/auto-sign
java -jar signapk.jar testkey.x509.pem testkey.pk8 update.zip update_signed.zip
After that last enter give it a second and look in your avabox/update file and you'll notice a new file called update_signed.zip
I know that this is almost word for word from the read me but a few differences can go along way expect a video shortly..... well around wednesday or whenever i can get someone to help with this
porting
im interested in learning how to port and combine different aspects of themes and other mods. will this do it or is there other software i need. I can do the work if shown the way. I read all the post everday with peopl;e asking for this and that and i do it myself. If shown I would help with requests as much as possible. HELP PLEASE
Thank you Avalaunch!!
so with this software, can i take a signed theme mod (like launcher or taskbar) and it will grab the images for me to edit, and then repack and sign to a flashable zip?
Everyone that knows how to use bak/smali, I have a question.
The modifications I made to the extracted pngs aren't getting transferred back to the original apk when I close it back up. Any Ideas? I'm getting really close to a breakthrough for 2.1. Any help would be appreciated
regaw_leinad said:
Everyone that knows how to use bak/smali, I have a question.
The modifications I made to the extracted pngs aren't getting transferred back to the original apk when I close it back up. Any Ideas? I'm getting really close to a breakthrough for 2.1. Any help would be appreciated
Click to expand...
Click to collapse
hm ill have to check into it. it should be making a new classes.dex too. i never really used it on edits.
Avalaunchmods said:
hm ill have to check into it. it should be making a new classes.dex too. i never really used it on edits.
Click to expand...
Click to collapse
It changes the classes.dex and resigns it it looks like, but doesn't copy the mods of the pngs to the apk.
regaw_leinad said:
Everyone that knows how to use bak/smali, I have a question.
The modifications I made to the extracted pngs aren't getting transferred back to the original apk when I close it back up. Any Ideas? I'm getting really close to a breakthrough for 2.1. Any help would be appreciated
Click to expand...
Click to collapse
What do you mean? Baksmali and Smali are for decompiling classes.dex and opening it up for the .smali files that are inside. Smali takes that output and recompiles it back into classes.dex for your .apk or .jar file.
You need to update the baksmali and smali .jar's. You have older versions and that will cause issues with certain .jar and .apk's when decompiling. baksmali-1.2.1.jar and smali-1.2.1.jar are the latest versions and will not require the BOOTCLASS PATH to be included...
Does the autosign work windows 7 (64 bit)? I've heard issues with other autosigns on 7. If it doesn't, no biggie I got xp in a VM... lol
obannvi said:
What do you mean? Baksmali and Smali are for decompiling classes.dex and opening it up for the .smali files that are inside. Smali takes that output and recompiles it back into classes.dex for your .apk or .jar file.
Click to expand...
Click to collapse
Yeah I get it now, after playing with it for a while.
Avalaunch, you should change the first post.
Baksmali- put in apk in the folder. read readme. edit any icons wallpapers, anything. close it up and enjoy.
Click to expand...
Click to collapse
that description is a little confusing to a person that NEVER used smali/baksmali before. It makes it seem like after you edit the unzipped files, you could just run smali and it will put al the changes in the new apk. I figured out that's not how it works lol I feel pretty stupid now looking back at my last question haha
regaw_leinad said:
Yeah I get it now, after playing with it for a while.
Avalaunch, you should change the first post.
that description is a little confusing to a person that NEVER used smali/baksmali before. It makes it seem like after you edit the unzipped files, you could just run smali and it will put al the changes in the new apk. I figured out that's not how it works lol I feel pretty stupid now looking back at my last question haha
Click to expand...
Click to collapse
What im trying to figure out is why would you even need to use baksmali/smali to edit .png's inside an .apk. All that needs to be done is opening of the .apk with 7zip, modify whats in /res/drawable etc then close...No need to sign .apks or anything. If anything, the script needs to contain something to extract /res/ * from the .apk to edit.
obannvi said:
What im trying to figure out is why would you even need to use baksmali/smali to edit .png's inside an .apk. All that needs to be done is opening of the .apk with 7zip, modify whats in /res/drawable etc then close...No need to sign .apks or anything. If anything, the script needs to contain something to extract /res/ * from the .apk to edit.
Click to expand...
Click to collapse
I'm actually doing more than that. I am changing the code to look for instead of <name of file>.jpg to <name of file>.png
While also putting the new png in the apk. Think that's possible? I changed all of the locations where that file comes up in the smali code.
regaw_leinad said:
I'm actually doing more than that. I am changing the code to look for instead of <name of file>.jpg to <name of file>.png
While also putting the new png in the apk. Think that's possible? I changed all of the locations where that file comes up in the smali code.
Click to expand...
Click to collapse
I gotcha. So you're looking in blah.smali for any reference to .jpgs and changing that reference to look for .png instead??
obannvi said:
I gotcha. So you're looking in blah.smali for any reference to .jpgs and changing that reference to look for .png instead??
Click to expand...
Click to collapse
yeah, not working too well atm, but working on it.
I think this is what I've been looking for. Downloading now.
Just noticed that ActivePerl was for 64bit. I am downloading 32bit as I have only have 32bit Vista Pro installed and not the 64bit.
regaw_leinad said:
Yeah I get it now, after playing with it for a while.
Avalaunch, you should change the first post.
that description is a little confusing to a person that NEVER used smali/baksmali before. It makes it seem like after you edit the unzipped files, you could just run smali and it will put al the changes in the new apk. I figured out that's not how it works lol I feel pretty stupid now looking back at my last question haha
Click to expand...
Click to collapse
i guess i need to explain more. i use baksmali to make apks easier to search through. for me at least. instead of changing the type and everything i just put it in the folder and baksmali then do changes and create a new archive. sign and change .apk. if you smali it back to apk then it wont save edits. sorry about that anyways has this helped people so far? i love showing that windows can be a dev platform
&RoidRage said:
I think this is what I've been looking for. Downloading now.
Just noticed that ActivePerl was for 64bit. I am downloading 32bit as I have only have 32bit Vista Pro installed and not the 64bit.
Click to expand...
Click to collapse
yes just google active perl i use win 7 64bit and when this toolbox was made, it was only made for certain people who had 64bit.
Sorry for the n00b question, but I have searched and haven't had much luck. Hopefully, this is the best place for this question. I just started editing .png's and updating some apk's files to customize some things on my phone for looks. However, I am really interested in modifying the taskbar and notification screen, but I have no clue where to start. Is there a guide somewhere I could follow to learn how to change them? What programs, if any additional ones will I need etc..?
Thanks for your help!
Figured it out on my own. framework.apk and resources.apk

[Linux][UTILITY][TOOL] APK Multi-Tool

GgI am currently working on a major update to the apk manager application as well and changing the name to APK Multi-Tool with some new added features and also to fix some issues with some code errors.
I am also changing a lot of the features as well since a lot of the code has been outdated for a while.
I have updated all the files and modified Apk manager's Scripts to fix many user reported bugs from Daneshm90 apk manager which he had written a simple script to ease the process of editing apks. Got a lot of downloads so thought its in demand
Whether you're doing basic image editing or editing the smali or xml files, on average u have to use (Brut.all or JF's smali/baksmali) awesome tool to extract the apk, edit it, then sign the apk and then adb push/install it. This process is quite tiresome if you are testing a method that needs fine tweaking.
This script should make the process a LOT smoother.
Theres an option of compiling/signing/installing all in one step
Thanks:
Goes to Daneshm90 the Original Writer of APK Manager
Goes to Brut.all for his awesome tool.
Goes to JF for ofcourse, smali/baksmali
Features:
- Added framework dependent decompiling (For non propietary rom apks). (Option 10). Checks whether the dependee apk u selected is correct.
- Allows multiple projects to be modified, switch to and from.
- Allows to modify system apk's using apktool but ensures maximum compatibility in terms of signature / manifest.xml
- Batch optimize apk (Zipalign,optipng,or both)
- Batch Ogg optimization
- Batch install apk from script (option 19)
- Batch Theme Image Transfer TOOL
- Batch Theme optipng TOOL
- Batch Theme Zipalign APK TOOL
- Compression level selector (monitor status above menu)
- Error detection. Checks if error occurred anytime u perform a task, and reports it
- Extract, Zip apk's.
- Incorporates brut.all's apktool
- Improved syntax of questions/answers
- Logging on/off has been removed. Instead a log.txt is created which logs the activities of the script organized using time/date headers
- Optimize pngs (ignores .9.pngs)
- Pull apk from phone into modding environment.
- Push to specific location on phone
- Quick sign an apk (Batch mode supported)
- Read log (Option 24)
- Sign apks
- Supports batch installation, so if u drag multiple apks into the script (not while its running) it will install them all for u. U can ofcourse drag a single apk as well
- User can change the max java heap size (only use if certain large apks get stuck when decompiling/compiling apks) (Option 19)
- U can now set this script as ur default application for apks. When u do, if u double click any apk it will install it for u.
- Zipalign apks
- Much Much More
Instructions:
- Place apk in appropriate folder (Any filename will work, if running for first time folders will not be there, you must run and then the folders will be created)
- Run script
- Minimize the script
- Edit files inside the project folder
- Maximize the script
Requirements:
Java 1.7
Android SDK
FAQ
Resulting apk file is much smaller than original! Is there something missing?
First: compression of resources.arsc file. Sometimes this file is compressed in original apk, sometimes not and apktool always compress it. Second: lack of META-INF dir. Apktool builds unsigned apks, so they lack signatures stored in this dir. Third: apktool uses newest Android SDK, so it could optimize files better, especially if original app is old. So: unpack both original and resulting apk, remove META-INF from original and then compare sizes. If they're still much different, then you could report on XDA or somewhere.
There is no META-INF dir in resulting apk. Is this ok?
Yes. META-INF contains apk signatures mostly and after modifying apk in no longer signed, so there are no signatures in it. You have to sign resulting apk and then META-INF dir will be created.
What do you call "magic apks"?
Sometimes there are some apks which (for my current knowledge) are invalid, broken, theoretically they shouldn't exist. There may be many reasons of their existence: my lack of understanding of Android resources; some non-public, maybe future SDK tools or custom modifications of these; manual hacking of binaries, etc. Usually I can't do anything about it, but you could at least try to replace broken parts by something valid. Actually it's quite likely that they aren't even used, because if they would, then application would crash.
Got problems ?
1. Make sure your path has no spaces
2. Your filename has no wierd characters
3. Java/adb are in your path
4. It's not a proprietary rom's apk (aka Sense,Motorola,Samsung) (If u are, then use option 11 and drag the required framework, eg com.htc.resources, twframework-res...etc)
5. It's not a themed apk (if it is, expect .9 png errors, use as close to stock as possible)
6. Look at the log to know whats happening
7. If all else fails, post as much info as possible and we will try to assist you.
TO DO LIST
Add new feature to Randomly Generate a new Key File for signing the apk files after modifying and recompiling of the apk files this will also allow of uploading to the android market as this added feature will allow you to sign apk files that you may of compiled without signing beforehand.
Modify the Signapk script to be compatible with the Randomly Generation feature in the works
and a few other added features are in the works as I am redesigning the application and rewriting a lot of the code to fix issues as well as some of the new features have broken parts as some features have been moved and broken some command line prompts.
Installing APK Multi-Tool Itself
Instructions (Linux):
1-Download, create a folder in your sdk called "APK-Multi-Tool" and extract into it.
2-Goto the the "sdk/APK-Multi-Tool" folder and rename "Script.sh" to "script.sh".
3-Go into the "other" folder, right click on one file at a time, goto "permissions" in the new window and check the execute box.(do this with all the files)
4-To add the path to your folder open up a terminal and type in -
sudo su
PATH=$PATH:/THE PATH TO YOUR "SCRIPT.SH"
(for me this looks like the following)
PATH=$PATH:/sdk/APK-Multi-Tool/other/
5-export PATH
6-install "sox"
7-Type into the terminal "cd PATH TO YOUR SCRIPT.SH"
7.5 export PATH={PATH}:/PATH TO Your SDK/sdk/platform-tools/adb
8-Type "./script.sh"
9-You should have a running APK-Multi-Tool.
how to install sox:
Open the software center of the linux service and searched for sox. Installed it and it there you will have SOX working.
- Place apk in appropriate folder (Any filename will work, if running for first time folders will not be there, you must run and then the folders will be created)
- Open terminal and change-directory to APK-Multi-Tool(Easiest way is to type "cd ")
- Chmod 755 Script.sh
- Chmod 755 all files apps inside other folder
- Run script by typing ./Script.sh
- Minimize the script
- Edit files inside the out folder
- Maximize the script
Downloads:
https://github.com/APK-Multi-Tool/APK-Multi-Tool-Linux/archive/master.zip
Please check back daily or weekly as this project is under active Development and I am releasing Alpha releases on the website for Testing and bug reports.
Lol, why has nobody commented on this?
You're a savior. This is awesome. Can't wait for the rewrite.
AW: [Linux][UTILITY][TOOL] APK Multi-Tool
+1
Haven't seen this also available for Linux, so this is great.
Sent from my Galaxy Nexus using xda premium
Binary updates
UPDATED to apktool-cli-1.5.3-SNAPSHOT
-Updated to smali/baksmali to v1.4.2
-Fixed (issue #396) - Correctly handle android:debuggable while in debug
mode.
-Fixed (issue #340) - Fixed superclass errors on debug mode.
-Updated to Gradle 1.4
-Updated known bytes for configurations to 38 (from addition of layout
direction)
-Fixed NPE when handling odex apks even with --no-src specified. (Thanks
Rodrigo Chiossi)
-Fixed (issue #427) - Correctly handles `--frame-path` on uild
Error 404 on GitHub download page
xcly said:
Error 404 on GitHub download page
Click to expand...
Click to collapse
Fixed
Sent from my DROID RAZR CDMA XT912 using Tapatalk 2
I merged a few projects together instead of having multiple Android developer projects. I did some spring cleaning and deleted a few projects that was not useful and served no purposes. Also renamed the project organization which broke the link forgot to update lol.
Sent from my DROID RAZR CDMA XT912 using Tapatalk 2
I ran the script but I can't see any folders being created.. Trying to sign an apk. Looked up on google and all I can find is your instructions to put apk in appropriate folder (which I can't see..)
Thanks in advance
I will look into this ABCs see what's up
Sent from my DROID RAZR CDMA XT912 using Tapatalk 2
I ran the apksign tool separately using terminal for now
I got
The program sox is missing or is not in your PATH,
please install it or fix your PATH variable
If I go to the other folder there is no sox like in the windows version.
I will look into this asap once I get some free time
Sent from my DROID RAZR CDMA XT912 using Tapatalk 2
civato said:
I got
The program sox is missing or is not in your PATH,
please install it or fix your PATH variable
If I go to the other folder there is no sox like in the windows version.
Click to expand...
Click to collapse
I had the same problem but it was fixed once I installed sox. There was a tutorial on google search for setting up apk manager you might wanna have a look at.
Sent from my GT-I9300 using xda premium
raziel23x said:
I will look into this asap once I get some free time
Sent from my DROID RAZR CDMA XT912 using Tapatalk 2
Click to expand...
Click to collapse
xcly said:
I had the same problem but it was fixed once I installed sox. There was a tutorial on google search for setting up apk manager you might wanna have a look at.
Sent from my GT-I9300 using xda premium
Click to expand...
Click to collapse
I got it solved , I just entered the Ubuntu software center and searched for sox. Installed it and it works.
Maybe good to add this in OP when using linux. It is stupid of me thinking it was something harder so thank you for your help and fast response.
A other methode I found here
PS:
You don't need to type in ./Script.sh in teminal in linux , just clicking on it (Script.sh) and select "run in terminal" does the trick without typing anything.
updated the original post with detailed instructions
raziel23x said:
updated the original post with detailed instructions
Click to expand...
Click to collapse
Put updated info into the README file. Made a few corrections (hope you like).
AndyOpie150 said:
Put updated info into the README file. Made a few corrections (hope you like).
Click to expand...
Click to collapse
pushed your changed to github all code changes are welcome even forking the repo on github and making changes and doing pull request are welcome
raziel23x said:
pushed your changed to github all code changes are welcome even forking the repo on github and making changes and doing pull request are welcome
Click to expand...
Click to collapse
Just uploaded changed attachment. Fixed minor typos in Installation Instructions. Sorry I didn't get it straight before you pushed to github.
I deleted the info for Windows in previous attachments as well due to this being for the Linux version. Didn't know if you caught that.
PS: Thought I would let you decide if you liked my hair brained ideas first.
Is there any way to have a .jar file work without having to rename to .apk, or is that a mind bogling code rewrite. I'm all for learning.
Hey, I made some changes to the script to act more like the windows version of this tool. I added a setup.sh which will create all the folders and set permissions to everything. i also the ability to have multiple projects going at the same time, and also added a separate jar/dex folder so there is no need to rename the jar files to .apk to edit it. and other updates as well. its not 100% up to par with the windows one, but these few changes make a huge difference. Would you be interested in this?
---------- Post added at 11:38 AM ---------- Previous post was at 11:36 AM ----------
AndyOpie150 said:
Just uploaded changed attachment. Fixed minor typos in Installation Instructions. Sorry I didn't get it straight before you pushed to github.
I deleted the info for Windows in previous attachments as well due to this being for the Linux version. Didn't know if you caught that.
PS: Thought I would let you decide if you liked my hair brained ideas first.
Is there any way to have a .jar file work without having to rename to .apk, or is that a mind bogling code rewrite. I'm all for learning.
Click to expand...
Click to collapse
actually yes there is..i made an updated version of the script which has those features
clmowers said:
Hey, I made some changes to the script to act more like the windows version of this tool. I added a setup.sh which will create all the folders and set permissions to everything. i also the ability to have multiple projects going at the same time, and also added a separate jar/dex folder so there is no need to rename the jar files to .apk to edit it. and other updates as well. its not 100% up to par with the windows one, but these few changes make a huge difference. Would you be interested in this?
---------- Post added at 11:38 AM ---------- Previous post was at 11:36 AM ----------
actually yes there is..i made an updated version of the script which has those features
Click to expand...
Click to collapse
Make a pull request on github and in will merge it
Sent from my Xoom using Tapatalk HD

[Guide] How to enable multi-user?

hello friends, I have a nice question for you!
I state that this is google translation so it will be the best.
anyway back to us ....
you own a nice tablet?
and maybe you are engaged or married and you have photos of your woman on the device in question, and maybe you do not want others to see,
or simply your friends are never their own business, and then maybe you want to make private your tablet, maybe with a secondary account, but do not know how to do it because the tablet does not support multi-user ...
well do not give up, this guide will do for you ...
I do not take any responsibility for what might happen to your device
these are the requirements:
-root
-this app : https://www.dropbox.com/s/wmc4vg8n1lyv1o1/4_2_multiple_user_enabler_root_1.2.apk
-a file manager with root permissions as root browser or other
-user app share (which allows you to decide the content to display to other accounts) is on play store or in this link https://www.dropbox.com/s/nh3vaqetj9fogzs/MultiUserAppShare.apk
well, now first download the app before "4.2 multi user enabler"
copy it to the sd of your dear and beloved tablet.
after this app copied to the folder system of your tablet, change permissions (I usually do I enable them all)
after that install the app . from the app enable the multi-user, reboot your tablet and you're done!
multi user share app you need to decide what to use the other account
Now you might ask: why not just install the app?
Try it! it will seem to work but when you restart the account will vanish,
Intead with this guide it will be ever
if you have been useful on press thanks
By friends!
Simix93 said:
hello friends, I have a nice question for you!
I state that this is google translation so it will be the best.
anyway back to us ....
you own a nice tablet?
and maybe you are engaged or married and you have photos of your woman on the device in question, and maybe you do not want others to see,
or simply your friends are never their own business, and then maybe you want to make private your tablet, maybe with a secondary account, but do not know how to do it because the tablet does not support multi-user ...
well do not give up, this guide will do for you ...
I do not take any responsibility for what might happen to your device
these are the requirements:
-root
-this app : https://www.dropbox.com/s/wmc4vg8n1lyv1o1/4_2_multiple_user_enabler_root_1.2.apk
-a file manager with root permissions as root browser or other
-user app share (which allows you to decide the content to display to other accounts) is on play store or in this link https://www.dropbox.com/s/nh3vaqetj9fogzs/MultiUserAppShare.apk
well, now first download the app before "4.2 multi user enabler"
copy it to the sd of your dear and beloved tablet.
after this app copied to the folder system of your tablet, change permissions (I usually do I enable them all)
after that install the app . from the app enable the multi-user, reboot your tablet and you're done!
multi user share app you need to decide what to use the other account
Now you might ask: why not just install the app?
Try it! it will seem to work but when you restart the account will vanish,
Intead with this guide it will be ever
if you have been useful on press thanks
By friends!
Click to expand...
Click to collapse
The easiest way to enable multiuser support especially for our Galaxy Tab 3.0 is to edit the framework-res.apk with apktool and change the max user in there. The best thing with this way, your account will not vanish when you restart the device.. :laugh::laugh:
faruqmunshif said:
The easiest way to enable multiuser support especially for our Galaxy Tab 3.0 is to edit the framework-res.apk with apktool and change the max user in there. The best thing with this way, your account will not vanish when you restart the device.. :laugh::laugh:
Click to expand...
Click to collapse
ah I did not know .. you tell me how to do? maybe put to me now if there is. Anyway .. this is useful for anyone who is not practical to make changes to the framework
@Simix93
Here is the alternative, modifying framework-res.apk.
What I've done on my Galaxy Tab 3 10.1 (GT-P5210) :
- Modifying framework-res\res\values\integers.xml (locate the entry, and put X, where X <= 8 instead of 1, X = the number of allowed max users) :
Code:
<integer name="config_multiuserMaximumUsers">8</integer>
- Modifying framework-res\res\layout-port\keyguard_host_view.xml (to show user selector on lockscreen) :
>> Adding this after the second </FrameLayout>
Code:
<FrameLayout androidprv:paddingTop="@dimen/status_bar_height" androidprv:layout_width="fill_parent" androidprv:layout_height="wrap_content">
<include androidprv:layout_gravity="top|center" androidprv:layout_width="fill_parent" androidprv:layout_height="fill_parent" layout="@layout/keyguard_multi_user_selector" />
</FrameLayout>
- Adding framework-res\res\layout-port\keyguard_multi_user_selector.xml file
Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.internal.policy.impl.keyguard.KeyguardMultiUserSelectorView android:layout_gravity="bottom" android:orientation="horizontal" android:id="@id/keyguard_user_selector" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="wrap_content" android:contentDescription="@string/keyguard_accessibility_user_selector" android:layout_childType="userSwitcher"
xmlns:androidprv="http://schemas.android.com/apk/res/android"
xmlns:android="http://schemas.android.com/apk/res/android">
<com.android.internal.policy.impl.keyguard.KeyguardLinearLayout android:layout_gravity="bottom|center" android:orientation="horizontal" android:id="@id/keyguard_users_grid" android:layout_width="wrap_content" android:layout_height="@dimen/keyguard_avatar_size" android:layout_marginBottom="400.0dip" />
</com.android.internal.policy.impl.keyguard.KeyguardMultiUserSelectorView>
- After that, copied from the original framework-res.apk AndroidManifest.xml file and META-INF directory to your newly compiled one (using a zip file utility) so I can bypass the sign process (like you should do with auto sign tool - signapk.jar)
And voilĂ , after putting back my modified framework-res.apk to the device and rebooting, i'm able to add new users in settings
Regards
i have tried to modify my framework-res.apk, but it's not succesful.
I installed framework-res with this command:
java -jar apktool.jar if Framework-Res.apk
This installed a file named 1.apk in my users-directory.
After that i extract the framework-res.apk with this command:
java -jar apktool.jar d Framework-Res.apk
Everythings seems to be fine, a directory with the name Framework-Res is created.
I modified the 3 files "integers.xml", "keyguard_host_view.xml" and "keyguard_multi_user_selector.xml" as described.
Now i pack it together with this command:
java -jar apktool.jar b Framework-Res
Get 2 errors with PNG-Files "File is case-insensitive" and correct the filenames (uppercase .PNG to lowercase .png).
After that i found in the folder "dist" the framework-res.apk.
The filesize is less about 12mb then before, it's now round about 36mb.
I put this file in my /system/framework folder and reboot. But the system is still displaying the Samsung-Logo.
Replaceing the file with the original file and everything is ok.
What do i wrong?
with best regards,
Detlef
ok, now it works.
i have forgot to add the sign-process to the new .apk file.
now my tab 3 8.0 have the multi-user function, thank you!
Spatz said:
i have tried to modify my framework-res.apk, but it's not succesful.
I installed framework-res with this command:
java -jar apktool.jar if Framework-Res.apk
This installed a file named 1.apk in my users-directory.
After that i extract the framework-res.apk with this command:
java -jar apktool.jar d Framework-Res.apk
Everythings seems to be fine, a directory with the name Framework-Res is created.
I modified the 3 files "integers.xml", "keyguard_host_view.xml" and "keyguard_multi_user_selector.xml" as described.
Now i pack it together with this command:
java -jar apktool.jar b Framework-Res
Get 2 errors with PNG-Files "File is case-insensitive" and correct the filenames (uppercase .PNG to lowercase .png).
After that i found in the folder "dist" the framework-res.apk.
The filesize is less about 12mb then before, it's now round about 36mb.
I put this file in my /system/framework folder and reboot. But the system is still displaying the Samsung-Logo.
Replaceing the file with the original file and everything is ok.
What do i wrong?
with best regards,
Detlef
Click to expand...
Click to collapse
Before recompile your framework-res.apk, you should find the png files with uppercase (.PNG) from your decompiled framework-res.apk/res/ and rename them to lowercase (.png).
when finished, flash it using CWM or other recovery.
Does anyone have working framework-res.apk for T310 ? I've updated mine, but I do not see anything new. When I flash zip fro T311 from a different thread, I have this options, but some labels in the system are missing and messed up.
slobodan.bogdanovic said:
Does anyone have working framework-res.apk for T310 ? I've updated mine, but I do not see anything new. When I flash zip fro T311 from a different thread, I have this options, but some labels in the system are missing and messed up.
Click to expand...
Click to collapse
Just follow the guide in this thread to make your framework-res.apk working with multiuser. or if you have no time, just give me your framework-res.apk and i will try to decompile it for you,
Spatz said:
ok, now it works.
i have forgot to add the sign-process to the new .apk file.
now my tab 3 8.0 have the multi-user function, thank you!
Click to expand...
Click to collapse
You can also copy from your original framework-res.apk AndroidManifest.xml file and META-INF directory to your newly compiled one so you can bypass the sign process
I have an issue when having multiple users enabled.
When I am logged in as the owner (first user) I am able to connect device via usb and transfer files.
When I am logged in as the second user, and when I try to connect device vis usb, it is not recognized. MTP Driver installation fails in this case.
Anyone has the same issue?
Simix93 said:
hello friends, I have a nice question for you!
I state that this is google translation so it will be the best.
anyway back to us ....
you own a nice tablet?
and maybe you are engaged or married and you have photos of your woman on the device in question, and maybe you do not want others to see,
or simply your friends are never their own business, and then maybe you want to make private your tablet, maybe with a secondary account, but do not know how to do it because the tablet does not support multi-user ...
well do not give up, this guide will do for you ...
I do not take any responsibility for what might happen to your device
these are the requirements:
-root
-this app : https://www.dropbox.com/s/wmc4vg8n1lyv1o1/4_2_multiple_user_enabler_root_1.2.apk
-a file manager with root permissions as root browser or other
-user app share (which allows you to decide the content to display to other accounts) is on play store or in this link https://www.dropbox.com/s/nh3vaqetj9fogzs/MultiUserAppShare.apk
well, now first download the app before "4.2 multi user enabler"
copy it to the sd of your dear and beloved tablet.
after this app copied to the folder system of your tablet, change permissions (I usually do I enable them all)
after that install the app . from the app enable the multi-user, reboot your tablet and you're done!
multi user share app you need to decide what to use the other account
Now you might ask: why not just install the app?
Try it! it will seem to work but when you restart the account will vanish,
Intead with this guide it will be ever
if you have been useful on press thanks
By friends!
Click to expand...
Click to collapse
Working on Tab3 7" ?
Leehtaeyeon said:
Working on Tab3 7" ?
Click to expand...
Click to collapse
I do not know, I have not tried it, so you head to the end you just have to move an app
Leehtaeyeon said:
Working on Tab3 7" ?[/QUOT
Multiuser only supported by Android 4.2.2 or higher. As i know, the android version in Tab 3 7" is 4.1.2. If you want to use multiuser, wait until tab 3 7" recieved update for 4.2.2..
Click to expand...
Click to collapse
faruqmunshif said:
Leehtaeyeon said:
Working on Tab3 7" ?
Click to expand...
Click to collapse
Multiuser only supported by Android 4.2.2 or higher. As i know, the android version in Tab 3 7" is 4.1.2. If you want to use multiuser, wait until tab 3 7" recieved update for 4.2.2..
Click to expand...
Click to collapse
Don' work =/
I do not believe he will get more 4.2.2.
I think like other devices, it will jump to 4.4
Spatz said:
ok, now it works.
i have forgot to add the sign-process to the new .apk file.
now my tab 3 8.0 have the multi-user function, thank you!
Click to expand...
Click to collapse
Spatz-is there any chance you could post detailed instructions? Or can you post your framework res.apk file?
Sent from my SM-T310 using xda app-developers app
@chaz
I used your procedure to modify the framework-res.apk file and it doesn't work on my Galaxy Tab 3 10.1 (GT-P5210). It keeps boot-looping. I managed to put back the original framework-res.apk and it's working, so I didn't killed it completely!
I do it this way:
1. Use apktool to decompile the apk file (apktool.jar).
2. Modify the xml files with Notepad++.
3. Use apktool to recompile the apk file.
4. Sign the file with autosign tool found on XDA (signapk.jar).
5. Put the framework-res.apk file back using ADB in recovery mode and set the right permissions on the file.
What tools have you used? Did you do it differently than me?
Thank you.
i am curious about this, but i'd like to know how multi user works. How do I "log" in to the tab and use my gmail, etc? And then how would my wife log in and user her email and etc? Are there profiles or something similar?
thanks
EDIT
never mind
http://www.dummies.com/how-to/content/how-to-add-another-user-to-your-android-tablet.html
Hi. I see this method does not work very well. I recommend the app SwitchMe. It's much easier and just requires root permission which everyone should have. I can't post links because I'm a newbie, so just search for it on the Play Store. :good:
alfreddallaire said:
@chaz
I used your procedure to modify the framework-res.apk file and it doesn't work on my Galaxy Tab 3 10.1 (GT-P5210). It keeps boot-looping. I managed to put back the original framework-res.apk and it's working, so I didn't killed it completely!
I do it this way:
1. Use apktool to decompile the apk file (apktool.jar).
2. Modify the xml files with Notepad++.
3. Use apktool to recompile the apk file.
4. Sign the file with autosign tool found on XDA (signapk.jar).
5. Put the framework-res.apk file back using ADB in recovery mode and set the right permissions on the file.
What tools have you used? Did you do it differently than me?
Thank you.
Click to expand...
Click to collapse
As I mentionned some posts before, I did not use the signapk.jar but instead copied signed informations from my original framework-res.apk to the new one.
See my post http://forum.xda-developers.com/showpost.php?p=48429541&postcount=10 there.
I updated my tuto post to include this in the process (http://forum.xda-developers.com/showpost.php?p=48315919&postcount=4)
Regards,
Chaz

Prevent apps from building

Hello,
I'm building my own version for my hammerhead
I'm trying to figure out if it would be possible to prevent some apps to compile
For instance, MMS, email, and around 10 others apps I have to remove every time I flash
I also have a modified NFC apk (which allows tags while screen is off), can I also auto include this file in the build ? (instead of the "normal" one)
Thanks for any hint
bud77 said:
Hello,
I'm building my own version for my hammerhead
I'm trying to figure out if it would be possible to prevent some apps to compile
For instance, MMS, email, and around 10 others apps I have to remove every time I flash
I also have a modified NFC apk (which allows tags while screen is off), can I also auto include this file in the build ? (instead of the "normal" one)
Thanks for any hint
Click to expand...
Click to collapse
look in your android source tree: .repo/local_manifests/roomservice.xml
In this file you can add and remove projects, so if you want to remove Browser from the build, you add this line to the others:
Code:
<remove-project name="android_packages_apps_Browser" />
Langes said:
look in your android source tree: .repo/local_manifests/roomservice.xml
In this file you can add and remove projects, so if you want to remove Browser from the build, you add this line to the others:
Code:
<remove-project name="android_packages_apps_Browser" />
Click to expand...
Click to collapse
Awesome ! Thousands thanks !!!
Will try that as soon as the active display fixes are merged
One last question tho, the case is sensitive ? Sould I copy/paste the project names from the git to be more accurate ?
bud77 said:
Awesome ! Thousands thanks !!!
Will try that as soon as the active display fixes are merged
One last question tho, the case is sensitive ? Sould I copy/paste the project names from the git to be more accurate ?
Click to expand...
Click to collapse
Yes, you will get errors on incorrect case ... like most thing linux
Of course, that was a stupid question
First build try failed, as I removed the email app, but it seems to be needed by bluetooth (???)
After removing the project removal, it's now building
Thanks again !
And for added/replaced apk, is there any best practice ?
Sent from my Nexus 5
To remove packages from being built, just remove the corresponding line from the product packages in the vendor makefiles. Check you device/lge/hammerhead/cm.mk to see what makefiles it is referencing.
iurnait said:
To remove packages from being built, just remove the corresponding line from the product packages in the vendor makefiles. Check you device/lge/hammerhead/cm.mk to see what makefiles it is referencing.
Click to expand...
Click to collapse
Won't this file be overwritten on each repo sync ?
And FYI, I managed to replace the NFC apk, by my modified one. I just added it in the folder where the SuperUser.apk is, and it got included in the final zip (replacing the one which has been compiled)
bud77 said:
Won't this file be overwritten on each repo sync ?
Click to expand...
Click to collapse
As long as you do not commit the file, it will not get overwritten upon repo sync. How every, if cm decides to change something in that file, then you will have to stash your changes before syncing or it will give you a checkout error.
And FYI, I managed to replace the NFC apk, by my modified one. I just added it in the folder where the SuperUser.apk is, and it got included in the final zip (replacing the one which has been compiled)
Click to expand...
Click to collapse
You are talking about placing it in the output directory right? This is not a good idea generally as it will be deleted if you do a clean build. If you need a modified NFC app it as best to remove the current packages/apps/NFC directory vial the local manifest and add a repo that has whatever changes you need
Sent from my Nexus 7 using Tapatalk
iurnait said:
As long as you do not commit the file, it will not get overwritten upon repo sync. How every, if cm decides to change something in that file, then you will have to stash your changes before syncing or it will give you a checkout error.
Click to expand...
Click to collapse
Got it, thanks !
But the local manifest seems to be a more viable option (long term speaking)
You are talking about placing it in the output directory right? This is not a good idea generally as it will be deleted if you do a clean build. If you need a modified NFC app it as best to remove the current packages/apps/NFC directory vial the local manifest and add a repo that has whatever changes you need
Sent from my Nexus 7 using Tapatalk
Click to expand...
Click to collapse
Problem is, there is no repo for it. Someone posted the modified APK in the hammerhead forum
(He decompiled the app, modified a value, and recompiled it)
And I've done already 2 clean builds, and the modified APK is still there (weird right ?)
Edit : Misread 2nd post. No, not in output dir, but in "builddir"/vendor/pa/prebuilt/apk, and it stays after clean build
bud77 said:
Got it, thanks !
But the local manifest seems to be a more viable option (long term speaking)
Problem is, there is no repo for it. Someone posted the modified APK in the hammerhead forum
(He decompiled the app, modified a value, and recompiled it)
And I've done already 2 clean builds, and the modified APK is still there (weird right ?)
Edit : Misread 2nd post. No, not in output dir, but in "builddir"/vendor/pa/prebuilt/apk, and it stays after clean build
Click to expand...
Click to collapse
Well, since you placed it as a prebuilt, it gets copied over to your out directory when you build the rom, so you are fine.
I'm trying to remove email.apk and exchange2.apk, but I can't find their names
I tried to remove the email project (in the manifest), but this leads to compiling issues, as it is needed by bluetooth
Any idea how I can do that ?
What you could do is let those apps to compile but add them to the squisher.rm in the vendor/pac/tools. It will not include them in the zip.
Sent from my SGH-I337M using Tapatalk
Nick0703 said:
What you could do is let those apps to compile but add them to the squisher.rm in the vendor/pac/tools. It will not include them in the zip.
Sent from my SGH-I337M using Tapatalk
Click to expand...
Click to collapse
Enever heard of that one, but I will try this ASAP !
Shall I create a "pac_hammerhead.rm" or edit the squisher file directly ?
Also, does this get overwritten on repo sync ?
Edit : After some misclicks, I deleted the "tools" folder, and a repo sync didn't brought it back
So I took the git tarball, extracted it, and pasted the folder in it usual folder
So I got my answer : No, it doesn't get overwritten
bud77 said:
Enever heard of that one, but I will try this ASAP !
Shall I create a "pac_hammerhead.rm" or edit the squisher file directly ?
Also, does this get overwritten on repo sync ?
Edit : After some misclicks, I deleted the "tools" folder, and a repo sync didn't brought it back
So I took the git tarball, extracted it, and pasted the folder in it usual folder
So I got my answer : No, it doesn't get overwritten
Click to expand...
Click to collapse
If you delete a sub folder, repo sync will only restore it if you delete the entire project folder ... so you could have deleted vendor/pac and sync would have restored it
Thanks, I'm learning every day a new trick

Can't decompile SecSettings ApkTool

Hi
I try to decompile SecSettings by apktool and i get this:
Code:
C:\apktool>apktool d secsettings.apk SecSettings23
I: Baksmaling...
I: Loading resource table...
Exception in thread "main" brut.androlib.AndrolibException: Multiple resources:
spec=0x7f020052 drawable/avatar_default_6, config=-hdpi
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:10
5)
at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:82)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:48)
at brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibRes
ources.java:315)
at brut.androlib.res.AndrolibResources.loadMainPkg(AndrolibResources.jav
a:50)
at brut.androlib.res.AndrolibResources.getResTable(AndrolibResources.jav
a:43)
at brut.androlib.Androlib.getResTable(Androlib.java:44)
at brut.androlib.ApkDecoder.getResTable(ApkDecoder.java:148)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:98)
at brut.apktool.Main.cmdDecode(Main.java:128)
at brut.apktool.Main.main(Main.java:65)
What to do ??
Thanks
Please any help?
Same issue here
osherdadon said:
Please any help?
Click to expand...
Click to collapse
Using a Note 3 from T-Mobile, I pulled the file with the adb command, with root explorer, and extracted it from the stock ROM file all giving me the same error. For some reason I also don't get any smali files out of my SystemUI.apk which has been driving me crazy. I can't seem to find any working answers yet... Fail...
Basically bumping this thread a half a year later...
SOMEONE HELP US
You have the relevant frameworks installed and java in your path?
Learned a lot in 24 hours
DSA said:
You have the relevant frameworks installed and java in your path?
Click to expand...
Click to collapse
Summary/Lessons Learned in the last 24 hours:
I must have been too tired, went to sleep got up again and went at it. I realized a few things, main thing was deodexing, I learned all about that. Converting the .odex file to a class.dex file inside the SystemUI.apk and SecSettings.apk so decompiling would work properly (I was originally missing the smali folder without deodexing my app). Second I needed to pull all the framework files from my device instead of just the two I had, then I used "apktool if framework-res.apk" then "apktool if twframework-res.apk" then "apktool d SystemUI.apk" then "apktool d SecSettings.apk". This time it actually worked, I proceeded to try and re-compile them just to test. The SystemUI.apk worked flawlessly but the the SecSettings.apk had errors then I realized I needed to copy the AndroidManifest.xml and resources.arsc from the original app to the decompiled folder and the SecSettings.apk compiled with no issues. I had to get the original file out of the stock ROM, it had gotten damaged somehow with zipping/raring/7zipping so quicktip no one should be zipping the files you're about to work on get it fresh from the ROM.
Current Issue:
Now that all that's done I'm onto what I was trying to get at when I started this whole project. I need to modify both of these apps which are now perfectly deodexed and on my stock device. Every time I try to modify these files I lose my status bar and my settings stop working, I'm obviously breaking it, this is the XDA guide I was following.
Any help or redirection on where to post would be greatly appreciated, thanks
Easiest thing - put your mod back in and get the status bar to disappear/fc whatever
Then, pull a log (catalog from appstore works fine)
Post that log at pastebin and link it here
We won't be able to solve your issue without knowing what it is, in the first place
Like this?
This was before I restarted: Log 1
Then I recorded for a little after I restarted probably pointless but that's where the error would have been: Log 2
DSA said:
Easiest thing - put your mod back in and get the status bar to disappear/fc whatever
Then, pull a log (catalog from appstore works fine)
Post that log at pastebin and link it here
We won't be able to solve your issue without knowing what it is, in the first place
Click to expand...
Click to collapse
Not sure exactly how to record it and send it to you, I pressed record but when the phone finished rebooting CatLog was closed so I reopened it and it keeps scrolling endlessly.
Research progressed a little
I came across a post here in the Flashlight Mod development thread which made me realize I'm not getting the ID's correct. They suggest compiling the modded SystemUI.apk to get the ID's into the apk file under the /res/values/public.xml file, then decompiling it to read the ID values. I'm missing a step or doing something wrong, I can't replicate it to find the ID values I need so I can add them to the .smali file and recompile a final time. I'm sure this is the only reason for the missing status bar and the force closes. I guess I need help understanding, a different set of instructions or just more detailed?
I can't post in that thread yet so I'm getting my posts up over here, I already posted in the Q&A thread but no one has responded yet, any help is greatly appreciated!
I get this when decompiling the modded apk: Modded SystemUI ApkTool Decompile
All these errors look like the file is broken now or something, I'm just lost at this point. I tried ApkTool 1.5.2 and 2.0 as well.
EDIT:
Additional info below for troubleshooting purposes since it seems my issue recompiling at the end to get the values for my public.xml
STEPS:
1. deodex (universal deodexer v5)
2. decompile (apktool 1.5.2 & 2.0 separate tests)
3. modify (add flashlight .png's and .smali file from 4.4kk flashlight mod files)
4. recompile (apktool)
5. decompile (apktool)
=
Errors <<<<< These errors solved in edit below
EDIT:
I forgot to use "apktool if SystemUI.apk" when loading "framework-res.apk" & "twframework-res.apk" now I get through decompiling and recompiling like I thought I should be and I even located the values int he public.xml, replaced them in the .smali and everything went peachy. Only problem is I never get the status bar after I reboot, not really getting any FC's but the status bar, if my goal were to get it to be invisible I would be so happy omg lol If you're curious I've also tested by signing and even another test with zipalign, nothing zip/zero/zilch...
EDIT... Again I know still no sleep, durp durp:
So my main issue was not using apktool v1.5.2 to decompile and v2.0 to compile EVERY SINGLE TIME, NO EXCEPTIONS. When I followed that simple rule I get it onto my device and she has no status bar... Hmmmmm..... And a logcat for anyone smart enough to help me
EDIT:
Maybe I'm in the right direction with an error I saw in the log at this post? I thought it was so I installed the DisableSignatureVerification Mod from the Xposed Modules and still nothing.
Calling All Developers
It's been like 2 weeks just curious if anyone has even looked at this, I haven't been able to make any progress so I started learning how to develop apps. I made two small apps basic flashlight and a counter app but I really want to know why I'm totally unable to mod a file on my phone. I can't get the ink effect to work with finger input either I've been really trying to get this flashlight mod and the ink effect for months. If I could get pointed in the direction of a developer that can actually help me I don't see why I couldn't donate like $10 or $20 to the one who helps me. I'm on android 4.4.2 (NK3) on my Note 3 from T-Mobile.

Categories

Resources