[Help] Cannot Recompile 3rd Party App! - Java for Android App Development

Im new here... so sorry if this is posted in wrong thread.
So Im trying to change the name of an app (by editing AndroidManifest.xml)
But i cannot compile it... it gives me error! Even if i try to compile it without editing anything, i cant compile it. This does not happens with other apks. I tried downloading this apk from different sites but results are still the same
I installed 1) framework-res.apk 2) twframework-res.apk 3) systemui.apk.
The system cannot find message text for message number 0x40002712 in the message file for Application.
I: Baksmaling...
I: Loading resource table...
I: Loaded.
I: Loading resource table from file: C:\Users\geo\apktool\framework\1.apk
I: Loaded.
I: Decoding file-resources...
I: Decoding values*/* XMLs...
I: Done.
I: Copying assets and libs...
I: Checking whether sources has changed...
I: Smaling...
I: Checking whether resources has changed...
I: Building resources...
invalid resource directory name: C:\Users\geo\Desktop\APK MANAGER\other\..\projects\11.apk\res/layout-sw600dp
invalid resource directory name: C:\Users\geo\Desktop\APK MANAGER\other\..\projects\11.apk\res/values-sw600dp
invalid resource directory name: C:\Users\geo\Desktop\APK MANAGER\other\..\projects\11.apk\res/values-sw600dp-land
invalid resource directory name: C:\Users\geo\Desktop\APK MANAGER\other\..\projects\11.apk\res/values-sw600dp-port
invalid resource directory name: C:\Users\geo\Desktop\APK MANAGER\other\..\projects\11.apk\res/values-sw720dp-land
invalid resource directory name: C:\Users\geo\Desktop\APK MANAGER\other\..\projects\11.apk\res/values-sw720dp-port
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\PARVIN~1\AppData\Local\Temp\APKTOOL6448465993556670497.tmp, -I, C:\Users\geo\apktool\framework\1.apk, -S, C:\Users\geo\Desktop\APK MANAGER\other\..\projects\11.apk\res, -M, C:\Users\geo\Desktop\APK MANAGER\other\..\projects\11.apk\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java: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:\Users\PARVIN~1\AppData\Local\Temp\APKTOOL6448465993556670497.tmp, -I, C:\Users\geo\apktool\framework\1.apk, -S, C:\Users\geo\Desktop\APK MANAGER\other\..\projects\11.apk\res, -M, C:\Users\geo\Desktop\APK MANAGER\other\..\projects\11.apk\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:191)
... 6 more
Click to expand...
Click to collapse

why are you trying to do this.
what app is it

out of ideas said:
why are you trying to do this.
what app is it
Click to expand...
Click to collapse
Recompiling an app for just changing the name and the saying it was yours?! Do you really think that this is the right behaviour?

Renaming "Applocker"
nikwen said:
Recompiling an app for just changing the name and the saying it was yours?! Do you really think that this is the right behaviour?
Click to expand...
Click to collapse
out of ideas said:
why are you trying to do this.
what app is it
Click to expand...
Click to collapse
Sorry i didn't mention this before.
Im trying to change name of an AppLocker from "AppLock" to "Email"
I want to rename and change its icon (Default email icon)
Im just trying to hide applocker so no one finds it.
Please help!

are you making A rom or something? just take it out.
it seems you want to get the pro version of it
***Upgrade to App Locker PRO for the following premium features!***
1)Stealth operation mode. App Locker Pro's launch icon can be hidden from the app drawer. You access App Locker by calling a secret number or via an innocent looking calculator widget!
2)Disguised as a calculator app. App Locker Pro is disguised as a calculator app. Launch App Locker Pro by entering the PIN and tapping on the calculator number display.
3)No Ads!

I just wanted to change name of it... I can change names of other apk (by editing label: in AndroidManifest.xml)
But I can't recompile this one! (Even if I dont modify anything)
Help me with this.
Sent from my GT-I9300

No im not making any rom. Its for personal use only.
Btw im not using that app.
Sent from my GT-I9300

Seems as if it cannot compile resources in directories with the smallest width modifier: sw600dp
These were added in Android 3.0 (API 11). Do you use the newest SDK?
And I understand why you want to do it now.

try to just change the app name in strings

nikwen said:
Seems as if it cannot compile resources in directories with the smallest width modifier: sw600dp
These were added in Android 3.0 (API 11). Do you use the newest SDK?
And I understand why you want to do it now.
Click to expand...
Click to collapse
Im using r22.0.5. I just downloaded "installer_r22.0.5-windows.exe" and installed it to default location. Is this the way you do it?

out of ideas said:
try to just change the app name in strings
Click to expand...
Click to collapse
I would have done that, but the problem is.... its fails to recompile when i don't even modify anything!

Okay.. so i tried this on a friends computer...
Other apps recompile successfully but still cannot recompile this app. Im getting different error
Please check the pic attached.
Thanks...
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}

georgy95 said:
Okay.. so i tried this on a friends computer...
Other apps recompile successfully but still cannot recompile this app. Im getting different error
Please check the pic attached.
Thanks...
Click to expand...
Click to collapse
One thing I have noticed. In all paths it is drawable/... That's how it is done on linux, but on Windows it should be a backslash instead of a slash.

Why I cany recompile this apk but all others?
Its just few mins edit but the error is just crazy.. im searching from 2 days..
Sent from my GT-I9300

I use apk multi-tool on a windows when doing this sort of thing so its not exactly the same but similar.
try just decompiling resources(if thats an option on apktool). some apps wont go back if your decompile source and res. (phone.apk does this on some phones)
or it might just be obfuscated and protected against recompiling. (like i dont think lidroid-res can be recompiled unless you have the special apktool he made)
and maybe try deleting public.xml before you recompile, since it gets built on compile anyways.

out of ideas said:
I use apk multi-tool on a windows when doing this sort of thing so its not exactly the same but similar.
try just decompiling resources(if thats an option on apktool). some apps wont go back if your decompile source and res. (phone.apk does this on some phones)
or it might just be obfuscated and protected against recompiling. (like i dont think lidroid-res can be recompiled unless you have the special apktool he made)
and maybe try deleting public.xml before you recompile, since it gets built on compile anyways.
Click to expand...
Click to collapse
nikwen said:
One thing I have noticed. In all paths it is drawable/... That's how it is done on linux, but on Windows it should be a backslash instead of a slash.
Click to expand...
Click to collapse
Can you guys please try to do it? Rename the app to "Email"
Here its the apk..

bump

bump

The only way you're going to get this to recompile is to add fake files for every single one of the missing files showing in the error log.
You will need to use a legitimate xml file to replace any missing xml files and same goes for .png images if there are any.
For instance, take a very small DECOMPILED xml file and start making copies and renaming it to replace each missing file in the decompiled apk. I see a bunch of them are in res/drawables.
This may have been done on purpose to prevent users from editing the developers' work.

Try to delete this following folder.
res/layout-sw600dp
res/values-sw600dp
res/values-sw600dp-land
res/values-sw600dp-port
res/values-sw720dp-land
res/values-sw720dp-port
Click to expand...
Click to collapse

Related

[Tutorial]How to edit smali files // ZIP Kit prepared for you ^^

Tools needed :
My KIT for SMALI files (using options for each step )
Notepad++( Hexadecimal editor for *.xml )
This is an example of a smali file changed (in this case, Global.Actions.smali located in android.policy.jar)
_______________ Power Menu modded (smali changed) ______________
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Open my zip kit ( recomended in a Theming Folder for example with apkmanager and all files you would like to mod )
What you get :
Baksmali
Baksmali ( executable Jar File )
Command.exe ( Shell file )
Notepad text with the two commands for decompile and compile already made for you ( just copy and paste into command.exe )
Smali
Smali ( executable Jar File )
1. So the only thing you need is to place your apk in the smali kit folder
2. To Decompile :
Code:
java -jar baksmali.jar -x yourfile -o classout
(classout folder can be renamed to whatever you want, doesnt matter until you dont forget to change the name too in the second command)
3. Make the modifications you want for smali files
4. To Compile again :
Code:
java -Xmx512M -jar smali.jar classout -o classes.dex
5. Copy and paste the file classes.dex into your apk _ you will overwrite the old one.
Thanks to Rafalense
Enjoy it
Thanks mate, it might be useful for some trick i'm gonna test.
Hi,
thanks for the guide and the advice.
But does the apk manager the smali decompile and compile too?
Could you give some hints where you can change what in smali?
Apk manager 4.9 and Smali/Baksmali
affmalg said:
Hi,
thanks for the guide and the advice.
But does the apk manager the smali decompile and compile too?
Could you give some hints where you can change what in smali?
Click to expand...
Click to collapse
Sorry for the late answer, have been busy with the last release of my theme
Apk manager decompile/compile xml files for apk
Smali/Baksmali decompile/compile smali files for apk
I am preparing a Tuto for both but a good start will be to check here and here
Yorzua said:
Apk manager decompile/compile xml files for apk
Smali/Baksmali decompile/compile smali files for apk
Click to expand...
Click to collapse
Okay now i got that
I am preparing a Tuto for both but a good start will be to check here and here
Click to expand...
Click to collapse
I know them both and they have been very helpful
But i would like to know more about things like that you deleted the powermenus headline.
I you have time could you look a that.
I just can't compile the apks any more, so my theme can't get an update
Apk manager 4.9 on xp windows
affmalg said:
Okay now i got that
I know them both and they have been very helpful
But i would like to know more about things like that you deleted the powermenus headline.
I you have time could you look a that.
I just can't compile the apks any more, so my theme can't get an update
Click to expand...
Click to collapse
affmalg said:
Hi guys,
I am using Apk manager 5.0 with the latest updates and apk tool 1.3.1
I want to decompile, edit and recompile my SystemUI.apk.
My Roms framework-res is set as 1.apk
Decompiling of SystemUI.apk works (no errors)
To check that compiling works, i edit nothing, just removed the "-v4" from the drawable-hpdi folder.
I assume that the must be something wrong with the resource, the framework-res.apk which i placed as 1.apk
"Resource is not public" is the error.
Does anyone no how to solve this?
The curious thing is that with the previous version of the rom it worked when i was making my theme a week ago.
Now it doesn't work any more
Click to expand...
Click to collapse
If you follow my Tuto, you should always use apk manager 4.9 editing framework as you want to mod xml __ even better with XP rather than any windows else.
Apk manager is not needed to decompile/recompile png's
you just forget zip and use instead 7zip which allow you to directly drag any file you want to another zip without decompiling/compiling.
Another rule is that you cant drag a xml from a zip to your hdd folder.
you must decompile the apk first. if the xml is already modded, then you can drag it everywhere and re-drag it where you want.
Never set framework-res as 1.apk
apk manager does everything for you, you just need to decompile,
set always level of compression to 0 in order to avoid issues during compilation work on the framework folder decompiled and just compile.
If you proceed step by step, you should be fine.
Note that systemUI.apk gives a lot of issues during decompilation
Smali files are included in systemUI so better use my tool for smali's files
Last one, i will prepare a tuto to take out the title in Power menu soon
If it helps you, please hit the thanks button
Sorry, a little OT, what's the name of the font?
font in my screenshots
grotesque02 said:
Sorry, a little OT, what's the name of the font?
Click to expand...
Click to collapse
The font in the screenshots is : Veggie burger
Hope it helps you
Thanks, and sorry for OT
Thread closed upon OP request.

║GUIDE║ Transparent Sense 3 Rosie Navbar ║ m10 Image Editing

Please can a mod move this to the right place, i think its either android themes or android software development, thanks
Ok I've has quite a few people asking me how to make the Sense 3 navbar semi-transparent so here is a guide on how to do it...
btw, sorry for terrible paint skills
Firstly download the latest m10 tools from here, thanks to Diamondback and Flemmard
Then extract them to somewhere on your computer and open m10editor
Once that is done open up Rosie.apk in the editor by selecting load file and navigate to where its saved on your computer
Once its decompiled Rosie navigate to m10 Files and select Rosie_Workspace.m10 and decompile it.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Expand the lines like this,
look for btn.navbtn_side_anim-Centre, btn.navbtn_side_anim-Left and btn.navbtn_side_anim-Right
change these opacity values from 1 to 0.75
look for 2 navbar.png
and change them from 1 to 0.5
Navigate back to the Start and click save
Push it to your phone to see if it worked
Done! ​
Image editing
Ok, so I'm going to be editing the lockscreen ring as an example, you will need to edit the files in idlescreen_base.apk and fusion.apk in order to fully change it
Im only going to show the idlescreen_base.apk part because its really repetative
As always you are going to need the latest version of m10 tools
and don't resize images, you will break them!
Open up the m10 editor
Press load file and navigate to where idlescreen_base.apk (or whatever other .apk your editing) is
Once it's un-zipped navigate over to m10 files
Make sure 'decode images' is ticked
Then double click 'Lock_ring_motion.m10' and decomplie it
Now expand the bars until you get to 'Textures', this is where the images are
Click on each texture until you find the one you want (note images are upside down)
Right click on the image and press 'Show in Explorer'
Then right click on it in the explorer and press 'open with' and use the program of choice (I use photoshop) and edit it how you like
Then save it using the same name in the same place
Then navigate back to 'Start' and press 'Save file'
Push it and reboot to see if it worked
Done! ​
Reserved 2...
thanks for that
can we do the same with app drawer?
Nyto75 said:
thanks for that
can we do the same with app drawer?
Click to expand...
Click to collapse
app drawer is xml so i would say no
Works perfect thanks!!
As for app drawer though I dont seem to be able to get it to work, also rosie is acting weird, my original rosie is over 12mb and using m10 tool it stays that size, if i decompile and recompile with apktool it goes down to less than 2mb
Gonna try and work out this rosie app drawer.... lol
The load file button is matt, so I can't load rosie.apk
polimeno said:
The load file button is matt, so I can't load rosie.apk
Click to expand...
Click to collapse
you have to link to zipalign.exe and adb.exe
if you dont have these just make 2 text files and rename them to the above and link to them but then make sure you dont try and push directly to your phone and also untick the zipalign box when saving
Ok. With root explorer i navigate to /system/app/rosie.apk, then I copied it to sd card. I past rosie.apk to computer, but when M10 editor trying to unzip the apk, it says: unzipping failed
Thanks major damo.
I want to try this but got drunk last night and phone is completely dead! >.<
Unzipping failed
polimeno said:
Ok. With root explorer i navigate to /system/app/rosie.apk, then I copied it to sd card. I past rosie.apk to computer, but when M10 editor trying to unzip the apk, it says: unzipping failed
Click to expand...
Click to collapse
same problem...
i also linked ADB and Zipalign from android sdk folder and when i load the rosie.apk it says: Unzipping failed..
Here is the Log:
Loading file: C:\IncertCoin23+24\Rosie.apk
ZipTool: Deleting old Directory: C:\Users\Walid\AppData\Roaming\M10Editor\Rosie
ZipTool: Error: Assets directory not created!
ZipTool: Are you sure the selected APK does contain m10-files?
ZipTool: Ending
Unzipping failed
bytheway...i'm in windows 7 and as u can see i'm using Insertcoin v24(data ++) version..
_Burst_ said:
Thanks major damo.
I want to try this but got drunk last night and phone is completely dead! >.<
Click to expand...
Click to collapse
who got drunk you or your phone...
musvi said:
same problem...
i also linked ADB and Zipalign from android sdk folder and when i load the rosie.apk it says: Unzipping failed..
Here is the Log:
Loading file: C:\IncertCoin23+24\Rosie.apk
ZipTool: Deleting old Directory: C:\Users\Walid\AppData\Roaming\M10Editor\Rosie
ZipTool: Error: Assets directory not created!
ZipTool: Are you sure the selected APK does contain m10-files?
ZipTool: Ending
Unzipping failed
bytheway...i'm in windows 7 and as u can see i'm using Insertcoin v24(data ++) version..
Click to expand...
Click to collapse
I didn't know insertcoin was sense 3, this only works on rosie from sense 3, rosie from earlier versions of sense don't contain any m10 files so this method can't be used
HTC Swyped from my Sense 3 Desire using XDA Premium
*damo* said:
I didn't know insertcoin was sense 3, this only works on rosie from sense 3, rosie from earlier versions of sense don't contain any m10 files so this method can't be used
HTC Swyped from my Sense 3 Desire using XDA Premium
Click to expand...
Click to collapse
oh thanks for enlightening me....hey can i push the sense 3 rosie.apk in sense 2.1 rom and will that work....
thanks..
musvi said:
oh thanks for enlightening me....hey can i push the sense 3 rosie.apk in sense 2.1 rom and will that work....
thanks..
Click to expand...
Click to collapse
lol, no, it will just fc, you could probably do it by changing some framework but then you may as well just use a sense 3 rom
*damo* said:
lol, no, it will just fc, you could probably do it by changing some framework but then you may as well just use a sense 3 rom
Click to expand...
Click to collapse
okk...thanks for being nice to me.....i'm totally noob here...i had been following the sense 3 dev thread...but afraid of loooootz of bugz.is it stable enough to use in everyday basis?
so when i go to edit the m10 and find the btn.navbtn_side_anim-Center and the others when i click on them there is no opacity setting to edit....help?
musvi said:
okk...thanks for being nice to me.....i'm totally noob here...i had been following the sense 3 dev thread...but afraid of loooootz of bugz.is it stable enough to use in everyday basis?
Click to expand...
Click to collapse
Soon, we've got most things fixed now
HTC Swyped from my Sense 3 Desire using XDA Premium
parham1234 said:
so when i go to edit the m10 and find the btn.navbtn_side_anim-Center and the others when i click on them there is no opacity setting to edit....help?
Click to expand...
Click to collapse
No idea maybe your doing something wrong
HTC Swyped from my Sense 3 Desire using XDA Premium
delete
got sorted in next post

[UTILITY][Linux] APK Suite 0.2.1 Stable

Apk Suite Linux
This is a GUI interface designed to make (de) re-compiling android applications
exceptionally easy. This is the first Alpha so we need feedback on bugs and possible future features.
The reason the file size is so small is because it does not yet actually have the libraries downloaded, to do this simply:
Control Cenrtre => Download Required Files.
It needs to be ran as root for one time only to install aapt into the /bin/ dir. After that, root is no longer required.
You can also manually place aapt in /bin/ dir and chmod to 775 if you do not want to run the application as root.
You can find aapt HERE.
The requirements are:
Python (Version 2 or greater)
IF NEEDED: PyQt
JavaSE or OpenJDK any version.
Place APKs in 'apk' dir, run the program, it will detect them. Once decoded, refresh lists to recompile (editing the smali files, navigate to 'decoded' dir)
Once encoded from a decoded package, the file is then placed in 'encoded' dir.
Please do report any bugs.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
DOWNLOAD
APKSuite b0.1.1 - Download here
Fixed URLs to Scripthen
Fixed finding aapt as aapta
Brief overview of APK selected
MD-5 calculation, Permissions viewing, APK Signing on encode
Version 0.2.1
Screenshot:
Download:
Download here - APKS 0.2.1
Please report any bugs you encounter. Thanks.
APKS Linux 0.2.1
...
Very good work sir!:good::good: Can I request a feature? It would be even better if we could decompile it to java code over dex2jar and jd-gui.
thanks, i have an issue:
Code:
# ./start.sh
File "APKS", line 1
SyntaxError: Non-ASCII character '\xf3' in file APKS on line 1, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details
i do have java & python installed, i'm on debian 6 32bits.
[/code]
sevenup30 said:
thanks, i have an issue:
Code:
# ./start.sh
File "APKS", line 1
SyntaxError: Non-ASCII character '\xf3' in file APKS on line 1, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details
i do have java & python installed, i'm on debian 6 32bits.
[/code]
Click to expand...
Click to collapse
After a little google I found it's the character 'ó', are you running APKS with a directory (includes parent) with 'ó' in the path?
The APKS code contains no such character as 'ó' or any other with accents.
-T
---------- Post added at 04:36 PM ---------- Previous post was at 04:33 PM ----------
TearsDontFalls said:
Very good work sir!:good::good: Can I request a feature? It would be even better if we could decompile it to java code over dex2jar and jd-gui.
Click to expand...
Click to collapse
Thanks, TearsDontFallTheyCrashAroundMe, I will be working on that later, right now I am busy with another project. I will take a break from that and get it to decode to Java source.
No, but to be sure i moved to /home/APKS/
still have the same error.
My linux is in french but i dont use this kind of character
i tried in root and non root user and tried to fix permission just to be sure.
Still same issue
sevenup30 said:
No, but to be sure i moved to /home/APKS/
still have the same error.
My linux is in french but i dont use this kind of character
i tried in root and non root user and tried to fix permission just to be sure.
Still same issue
Click to expand...
Click to collapse
The application does check on start-up for permissions, and file installs, that shouldn't be a problem. Allow me to go overt the code and see if this is my mistake in the mean time, could you do the following?
Open terminal, CD to the directory and run:
python APKS
Edit:
Looks over the code and there's is no 'ó'
the first line is "#! /usr/bin/python"
I will remove this as it was only to make it with with source
Thanks,
T
still same error with 'python APKS'
thanks for following my issue
sevenup30 said:
still same error with 'python APKS'
thanks for following my issue
Click to expand...
Click to collapse
No problem at all
I have uploaded an updated version without specifing the "#! /usr/bin/python" this might fix your problem, as this is the only thing on line 1.
Also, ensure you have "python-qt4" - sudo apt-get -f install python-qt4
Same version, just uploaded without the tag,
http://scripthen.net/development/apksuite-linux/Deployed-APK_Suite0.2.1.tar.gz
damned, same error
i'll try at home on my laptop on debian wheezy , that's really weird
sevenup30 said:
damned, same error
i'll try at home on my laptop on debian wheezy , that's really weird
Click to expand...
Click to collapse
I'll get a VM running in French language and see what happens and get it fixed.
This was my first Python project
Cool thanks
Ok back to home on debian wheezy 64 bits, it works
it might be a random issue with debian squeeze 32 bits french .
Thanks for your work i'll try this more.
Slethen you might want to take a look at this http://forum.xda-developers.com/showthread.php?t=1491689
strawmetal said:
Slethen you might want to take a look at this http://forum.xda-developers.com/showthread.php?t=1491689
Click to expand...
Click to collapse
Perhaps we wanted to make our own thing...
strawmetal said:
Slethen you might want to take a look at this http://forum.xda-developers.com/showthread.php?t=1491689
Click to expand...
Click to collapse
That is cool, but I think there are different aims for the two projects as that seems a bit more general purpose as this is a lot more specific to apk decoding, singing ect...
Just downloaded, gonna switch over to my linux partition and try this out, thank you.
dex2jar
TearsDontFalls said:
Very good work sir!:good::good: Can I request a feature? It would be even better if we could decompile it to java code over dex2jar and jd-gui.
Click to expand...
Click to collapse
Implemented dex2jar will release soon first going to do some UI tweaks and maybe build in a java editors
(Buttons at the top are for experimenting there be moved)
Slethen said:
Implemented dex2jar will release soon first going to do some UI tweaks and maybe build in a java editors
(Buttons at the top are for experimenting there be moved)
Click to expand...
Click to collapse
Is that why the links are dead? I get a 404 error on every link. I only use linux so this would be super helpful!

[Guide] XML editing for framework(pictures included) Updated 240214

Hi all XDA members, today I am going to show you how to edit xml files in your framework-res.apk so you can edit auto - rotation on lockscreen or CRT - Animation. This does not apply to the Arc only, most Android phone's framework can be edited this way except maybe Samsung or HTC phones which have an extra resource file. This guide contains screenshots and is meant to be noob friendly so everything is self explanatory, you don't need a rocket scientist to explain everything.
What you need:
Framework-res.apk you want to edit
Apktool
Notepad++ is recommended for editing XMLs.
7-zip
So let's get started:
1. If you want to edit the framework file, naturally you should have extracted it from your phone. If you have not done so, the framework-res.apk can be found in system/framework/framework-res.apk(requires root access)
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
2. Place the file into apktool directory
4. Press shift and right click the directory(don't select any file, just press shift right click in the empty space of your apktool directory, you should see "Open command window here")
5. You should see a command window like this:
6. Type this command: apktool if framework-res.apk. You should get a response like this:
7. Now type this command:apktool d framework-res.apk. This will decompile your framework-res.apk so you can access the xml files.
8. Go back to your apktool file. You should see a new folder called framework-res(Yes, please take a good look. I circled it for your sake.)
9. Open the folder. go to res/values/bools.xml
10. Right click on file, select edit with Notepad++
11. Now open in Notepad++, you can edit and choose the functions you want to add just by editing the boolean with "true" or "false"
That's it, you are now ready to choose if you want auto rotation lockscreen or enable CRT animation.
Stay tuned to this thread, I will make a second thread about recompiling your framework and signing it for use on your phone.
If you have found any errors in this tutorial, please send me a PM and I shall rectify it.
At the request of some users, I have updated the thread with the compiling and signing steps as well, so please continue reading.
12. Firstly we need some files to sign the apks, so go to your original framework-res.apk, right click -> 7 zip -> Open Archive
13. Extract the folder "META-INF" and the file "AndroidManifest.xml" from the framework-res.apk
13a. Alternatively, you can find the files in <your framework-res folder> -> Original // No "<>" symbols, please see attached screenshot
14. Before we compile the framework, please rename the folder to avoid any conflicts with the existing framework-res.apk
15. Type this command: apktool b <your framework-res folder> and press Enter // No "<>" symbols, please see attached screenshot
16. You should get a response like this:
17. Go to <your framework-res folder> -> dist -> framework-res.apk // No "<>" symbols, please see attached screenshot
WARNING! DO NOT PUSH THIS FILE INTO YOUR PHONE YET. IT HAS NOT BEEN SIGNED AND WILL CAUSE A BOOTLOOP IF YOU PUSH IT TO /SYSTEM. PLEASE CHECK THAT THESE FEW STEPS HAVE BEEN COMPLETED BEFORE PUSHING IT TO /SYSTEM
18. Right click the file, go to 7-zip -> Open Archive
19. Select the files you extracted or received from step 10 or 10a
20. Drag and drop into 7-zip. You will get a warning message. Press "Yes".
21. You should have both files copied into the apk. You have signed the framework-res.apk and the file is OK for use.
22. Push the framework-res.apk into /system/framework, set RW-R--R-- permissions and reboot.
That's it. Your phone should be functioning normally and the changes you did internally should take effect.
If you have found any errors in this tutorial, please send me a PM and I shall rectify it.
Also, please PM me or comment if you have questions.
If the question has been asked before, please read the previous posts if there are any.
Repeat questions will not be entertained.
popthosegaskets said:
Stay tuned to this thread, I will make a second thread about recompiling your framework and signing it for use on your phone.
Click to expand...
Click to collapse
Would be better keeping it all in one thread.
Sent from Myushi
XperienceD said:
Would be better keeping it all in one thread.
Sent from Myushi
Click to expand...
Click to collapse
Ok, thanks for the feedback
僕のLT18iから送られてきた
did you ever manage to get round to posting a recompiling guide??
Inside 4ndroid said:
did you ever manage to get round to posting a recompiling guide??
Click to expand...
Click to collapse
I'm busy with other stuff, although if you want me to redo the guide I can do so.
僕のLT18iから送られてきた
popthosegaskets said:
I'm busy with other stuff, although if you want me to redo the guide I can do so.
僕のLT18iから送られてきた
Click to expand...
Click to collapse
that would be awsome if you could write up the recompile guide.. but no rush only when you get the time... thanks
Inside 4ndroid said:
that would be awsome if you could write up the recompile guide.. but no rush only when you get the time... thanks
Click to expand...
Click to collapse
Ok... I shall redo this guide.
僕のLT18iから送られてきた
Thread content updated per user request.

[Tutorial][VIDEO] Add/integrate apps into Settings app!

Hello!
I wanted to make this little tutorial since many people wounder how to add certain apps to settings app
On XDA Portal
Things you will need
Apktool: http://forum.xda-developers.com/showthread.php?t=1755243
Notepad++: http://notepad-plus-plus.org/download/v6.3.2.html
Video tutorial http://www.youtube.com/watch?v=75ZzDs3seqw
Check out my YouTube channel for more videos
The procedure
1: Download and extract apktool into a folder
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
2: Extract Settings.apk and framework-res.apk from your ROM to the apktool folder
3: Open up cmd and go to the APKtool folder
4: Install the framework
5: Put the app you want to add in the apktool folder then decompile Settings and the app
6: Open the settings folder and navigate to /res/values and open Strings.xml with notepad++
7: Add the name of the app furthest down
8: Navigate to /res/xml and open settings_headers.xml
9: Add this
Code:
<header android:icon="@drawable/..." android:title="@string/...">
<intent android:targetPackage="..." android:action="android.intent.action.MAIN" android:targetClass="..." />
</header>
10: navigate to the decompile app you want to add and open androidmanifest.xml
11: Copy the name at the top
12: Then paste here
13: Hold on your screen and select shortcuts
14: Choose activities
15: Scrool to the app and then press it
16: Enter what you found there here
18: Choose a name for the icon you will be using
19: Go to the app you will be adding and navigate to /res/drawable-****
20: Copy the icon to Settings/res/drawable-**** and rename it to what you put in the XML file
21: And now lets build it
22: When the building is done navigate to Settings/dist/ and there is you new Settings app
I will add a zip in the attachments, just put the Settings app in /system/app/ folder in the zip then move it to your phone and flash it
EDIT Another way to install the app (with adb):
Code:
adb remount
adb push Settings.apk /system/app/
adb shell chmod 644 /system/app/Settings.apk
adb reboot
EDIT 2: If you get any FCs or errors (app not showing up) after installing try to open up the original Settings.apk and copy AndroidManifest.xml and META-INF folder to /apktool/Settings/build/apk/ then build again (repeat every time you build)
very nice tutorial, for which roms will this work? stock, cmXX
i have a LG L9, with stock jelly bean rom. will this work for me?
mcmaster81 said:
very nice tutorial, for which roms will this work? stock, cmXX
i have a LG L9, with stock jelly bean rom. will this work for me?
Click to expand...
Click to collapse
Any rom above 4.0
cool tutorial... thanks, I appreciate it...
I think i will add a video tutorial soon
Tks 4 tuts useful.
Nice tutorial thanks
but i have a error when i complied settings.apk
C:\apktool>apktool b Settings.apk
Exception in thread "main" brut.androlib.AndrolibException: brut.directory.PathN
otExist: apktool.yml
at brut.androlib.Androlib.readMetaFile(Androlib.java:164)
at brut.androlib.Androlib.build(Androlib.java:183)
at brut.androlib.Androlib.build(Androlib.java:176)
at brut.apktool.Main.cmdBuild(Main.java:228)
at brut.apktool.Main.main(Main.java:79)
Caused by: brut.directory.PathNotExist: apktool.yml
at brut.directory.AbstractDirectory.getFileInput(AbstractDirectory.java:
103)
at brut.androlib.Androlib.readMetaFile(Androlib.java:160)
... 4 more
could you help me?
sorry for my english
thanks
hecvalve said:
Nice tutorial thanks
but i have a error when i complied settings.apk
C:\apktool>apktool b Settings.apk
Exception in thread "main" brut.androlib.AndrolibException: brut.directory.PathN
otExist: apktool.yml
at brut.androlib.Androlib.readMetaFile(Androlib.java:164)
at brut.androlib.Androlib.build(Androlib.java:183)
at brut.androlib.Androlib.build(Androlib.java:176)
at brut.apktool.Main.cmdBuild(Main.java:228)
at brut.apktool.Main.main(Main.java:79)
Caused by: brut.directory.PathNotExist: apktool.yml
at brut.directory.AbstractDirectory.getFileInput(AbstractDirectory.java:
103)
at brut.androlib.Androlib.readMetaFile(Androlib.java:160)
... 4 more
could you help me?
sorry for my english
thanks
Click to expand...
Click to collapse
Dont have the .apk extension when building. Should look like this apktool b Settings
I will try this later thanks for the guide,
I'm trying to add a TTS setting to a rom which doesn't have a TTS options in the Settings -> language & input. can you tell me what activity should I choose? I cannot open TTS settings from my phone.
alexforsale said:
I will try this later thanks for the guide,
I'm trying to add a TTS setting to a rom which doesn't have a TTS options in the Settings -> language & input. can you tell me what activity should I choose? I cannot open TTS settings from my phone.
Click to expand...
Click to collapse
Actually, i have never used TTS so i dont really know :/
Hey, as said a very good tutorial! Thanks :good:
I compiled the settings apk now and everything worked fine, but when i´m opening it in the Settings.apk, I only see this:
(Yes, I know.. strange name of the app )
Flextrick said:
Hey, as said a very good tutorial! Thanks :good:
I compiled the settings apk now and everything worked fine, but when i open it in the Settings.apk, I only see this:
(Yes, I know.. strange name of the app )
Click to expand...
Click to collapse
As i said, that is probably because of appinventor :/
Skickat från min GT-P1000 via Tapatalk 2
RomWiz said:
Dont have the .apk extension when building. Should look like this apktool b Settings
Click to expand...
Click to collapse
Upps i´m noob sorry.
now i compiled but when i flash my settings.apk ,and reboot i can´t see in my device the settings
thanks
hecvalve said:
Upps i´m noob sorry.
now i compiled but when i flash my settings.apk ,and reboot i can´t see in my device the settings
thanks
Click to expand...
Click to collapse
Send me your apk and i will see if there is something faulty.
Skickat från min GT-P1000 via Tapatalk 2
Do you think that in the future you might be able to create a program or a batch file/script that can automate this? Possibly with a GUI? That would be awesome. But thanks to this wonderful guide of yours! I'm still studying it. I would try it once I find the time.
les02jen17 said:
Do you think that in the future you might be able to create a program or a batch file/script that can automate this? Possibly with a GUI? That would be awesome. But thanks to this wonderful guide of yours! I'm still studying it. I would try it once I find the time.
Click to expand...
Click to collapse
Maby, but i'm not sure if it'll work.
Video is up
i am having troubles with hiding the app from app drawer...could you help?
i removed the intent.launcher line from android manifest but it still isnt working...i mean the app just doesnt get installed ...and if i put it in system/app/ and set perms to rwrr even then it acts as if its not installed...
hsay said:
i am having troubles with hiding the app from app drawer...could you help?
i removed the intent.launcher line from android manifest but it still isnt working...i mean the app just doesnt get installed ...and if i put it in system/app/ and set perms to rwrr even then it acts as if its not installed...
Click to expand...
Click to collapse
Did you sign it?
Skickat från min GT-P1000 via Tapatalk 2
@RomWiz There shouldn't be android:id to add an app... I tried but it's not showing up there Any help?

Categories

Resources