[HOWTO] enable on-screen buttons in ICS rom - Android Software Development

{
"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"
}
sorry for my poor english.. i write this guide by request.
this is pretty simple thing..
1. decompile framework-res.apk
- you need apktool.jar 1.4.3 version to decompile ics apk.
download 1.4.3 : http://code.google.com/p/android-apktool/downloads/list
download 1.4.2 : http://code.google.com/p/android-apktool/downloads/detail?name=apktool1.4.2.tar.bz2&can=1&q=
(if you have problems with 1.4.3, use 1.4.2 instead)
2. open /res/values/bools.xml with a text editor
3. find "config_showNavigationBar" and set to true
4. to turn off capacitive buttons backlight, maybe you need to edit arrays.xml
- it does not work on my nexus s but seem to be working well on some other devices..
-----------------------------------------------------------------------------
* 5 [WVGA devices only] it would be better to slightly resize navigation bar height to avoid keyboard overlapping problem (see this post).
(or you have to lower lcd density but that cause app compatibility issues)
: open dimens.xml and find the line "navigation_bar_height".
and you need one more step to compensate buttons sizes.
download : http://www.mediafire.com/?758mnayrlt3dee4
this zip include 4 png files. add those files to SystemUI.apk (/res/drawable-hdpi/) using 7-zip or other program. (replace original PNGs to these files).
-----------------------------------------------------------------------------
6. recompile
- you need new aapt.exe from latest platform-tools.
download : http://www.mediafire.com/?0q52u6v8vdkpq1i
7. done
*if you don't know how to modify apk file, read this post first.
-

Where did you get apktool 1.4.2?

How would I disable the onscrwen keys in twlauncher 4. 5? Cause we already configured the ics keys to be our softkeus?
Sent from my SCH-I400 using xda premium

KBanause said:
Where did you get apktool 1.4.2?
Click to expand...
Click to collapse
yes interesting question

KBanause said:
Where did you get apktool 1.4.2?
Click to expand...
Click to collapse
here it is : http://www.multiupload.com/YWJHOSZ7GJ
you can find it here
ciscogee said:
How would I disable the onscrwen keys in twlauncher 4. 5? Cause we already configured the ics keys to be our softkeus?
Sent from my SCH-I400 using xda premium
Click to expand...
Click to collapse
sorry but you'd better ask your rom dev to do it..

evilisto said:
here it is : http://www.multiupload.com/YWJHOSZ7GJ
you can find it here
Click to expand...
Click to collapse
Thanks. At least I was able to recompile the framework-res.apk wothout any errors. Now I have to check if I can use it without bootloops

evilisto said:
here it is : http://www.multiupload.com/YWJHOSZ7GJ
you can find it here
sorry but you'd better ask your rom dev to do it..
Click to expand...
Click to collapse
Worked for me with this apktool
Edit: decompile that is
THX!

Could you got a little more in-depth on step 5? Whats the correct way to recompile the apk with aapt?

pingpongboss said:
Could you got a little more in-depth on step 5? Whats the correct way to recompile the apk with aapt?
Click to expand...
Click to collapse
just put aapt.exe in the same folder as apktool.jar. that's all

can someone please help me with using apktool and decompiling my framework-res?

I'm not having any trouble with decompiling, but after making the necessary changes to bools and array, I can not get it to recompile.
What am I doing wrong here?
to decompile....
Code:
apktool d framework-res.apk
....make the changes, then...
Code:
apktool b framework-res
and i get this:
Code:
c:\apktool>apktool b framework-res.apk
Exception in thread "main" brut.androlib.AndrolibException: brut.directory.PathN
otExist: apktool.yml
at brut.androlib.Androlib.readMetaFile(Androlib.java:142)
at brut.androlib.Androlib.build(Androlib.java:159)
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.directory.PathNotExist: apktool.yml
at brut.directory.AbstractDirectory.getFileInput(AbstractDirectory.java:
103)
at brut.androlib.Androlib.readMetaFile(Androlib.java:138)
... 4 more
c:\apktool>
Any help would be much appreciated.
EDIT -
Just noticed that I typed....
Code:
apktool b framework-res.apk
...instead of...
Code:
apktool b framework-res
When I tried it without the .apk, I get this....
Code:
c:\apktool>apktool b framework-res
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
invalid resource directory name: c:\apktool\framework-res\res/drawable-sw600dp-h
dpi
invalid resource directory name: c:\apktool\framework-res\res/layout-sw600dp
invalid resource directory name: c:\apktool\framework-res\res/layout-w600dp
invalid resource directory name: c:\apktool\framework-res\res/values-h720dp
invalid resource directory name: c:\apktool\framework-res\res/values-sw600dp
invalid resource directory name: c:\apktool\framework-res\res/values-sw600dp-w10
24dp
invalid resource directory name: c:\apktool\framework-res\res/values-sw600dp-w12
80dp
invalid resource directory name: c:\apktool\framework-res\res/values-w360dp
invalid resource directory name: c:\apktool\framework-res\res/values-w480dp
invalid resource directory name: c:\apktool\framework-res\res/values-w500dp
invalid resource directory name: c:\apktool\framework-res\res/values-w600dp
invalid resource directory name: c:\apktool\framework-res\res/values-w720dp
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutExce
ption: could not exec command: [aapt, p, -F, C:\Users\BRANDO~1.AMY\AppData\Local
\Temp\APKTOOL5284591862303952400.tmp, -x, -S, c:\apktool\framework-res\res, -M,
c:\apktool\framework-res\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:193)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:301)
at brut.androlib.Androlib.buildResources(Androlib.java:248)
at brut.androlib.Androlib.build(Androlib.java:171)
at brut.androlib.Androlib.build(Androlib.java:154)
at brut.apktool.Main.cmdBuild(Main.java:182)
at brut.apktool.Main.main(Main.java:67)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\U
sers\BRANDO~1.AMY\AppData\Local\Temp\APKTOOL5284591862303952400.tmp, -x, -S, c:\
apktool\framework-res\res, -M, c:\apktool\framework-res\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:191)
... 6 more

sixfearstheseven said:
I'm not having any trouble with decompiling, but after making the necessary changes to bools and array, I can not get it to recompile.
What am I doing wrong here?
to decompile....
Code:
apktool d framework-res.apk
....make the changes, then...
Code:
apktool b framework-res
and i get this:
Code:
c:\apktool>apktool b framework-res.apk
Exception in thread "main" brut.androlib.AndrolibException: brut.directory.PathN
otExist: apktool.yml
at brut.androlib.Androlib.readMetaFile(Androlib.java:142)
at brut.androlib.Androlib.build(Androlib.java:159)
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.directory.PathNotExist: apktool.yml
at brut.directory.AbstractDirectory.getFileInput(AbstractDirectory.java:
103)
at brut.androlib.Androlib.readMetaFile(Androlib.java:138)
... 4 more
c:\apktool>
Any help would be much appreciated.
EDIT -
Just noticed that I typed....
Code:
apktool b framework-res.apk
...instead of...
Code:
apktool b framework-res
When I tried it without the .apk, I get this....
Code:
c:\apktool>apktool b framework-res
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
invalid resource directory name: c:\apktool\framework-res\res/drawable-sw600dp-h
dpi
invalid resource directory name: c:\apktool\framework-res\res/layout-sw600dp
invalid resource directory name: c:\apktool\framework-res\res/layout-w600dp
invalid resource directory name: c:\apktool\framework-res\res/values-h720dp
invalid resource directory name: c:\apktool\framework-res\res/values-sw600dp
invalid resource directory name: c:\apktool\framework-res\res/values-sw600dp-w10
24dp
invalid resource directory name: c:\apktool\framework-res\res/values-sw600dp-w12
80dp
invalid resource directory name: c:\apktool\framework-res\res/values-w360dp
invalid resource directory name: c:\apktool\framework-res\res/values-w480dp
invalid resource directory name: c:\apktool\framework-res\res/values-w500dp
invalid resource directory name: c:\apktool\framework-res\res/values-w600dp
invalid resource directory name: c:\apktool\framework-res\res/values-w720dp
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutExce
ption: could not exec command: [aapt, p, -F, C:\Users\BRANDO~1.AMY\AppData\Local
\Temp\APKTOOL5284591862303952400.tmp, -x, -S, c:\apktool\framework-res\res, -M,
c:\apktool\framework-res\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:193)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:301)
at brut.androlib.Androlib.buildResources(Androlib.java:248)
at brut.androlib.Androlib.build(Androlib.java:171)
at brut.androlib.Androlib.build(Androlib.java:154)
at brut.apktool.Main.cmdBuild(Main.java:182)
at brut.apktool.Main.main(Main.java:67)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\U
sers\BRANDO~1.AMY\AppData\Local\Temp\APKTOOL5284591862303952400.tmp, -x, -S, c:\
apktool\framework-res\res, -M, c:\apktool\framework-res\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:191)
... 6 more
Click to expand...
Click to collapse
Same here, getting the same error when recompiling it -_- 3 people have told me it's because aapt isn't the ICS version but I updated it 3 times and even asked someone to upload and I get that same error.

GazaIan said:
Same here, getting the same error when recompiling it -_- 3 people have told me it's because aapt isn't the ICS version but I updated it 3 times and even asked someone to upload and I get that same error.
Click to expand...
Click to collapse
Yep, i did the same thing with aapt. I triple and quadruple checked that it was the ICS compatible version, but still no dice.
I don't know. I'm still patiently waiting for a proper developer to throw together a version for the Incredible that has the on screen nav buttons since i know next to nothing about this stuff, but seriously, this process looks so simple yet I'm having so much trouble with it.
Even if i did get it to compile, I'd be stuck because adb never wants to push or pull files from my phone.
Sent from my Incredible using xda premium

sixfearstheseven said:
Yep, i did the same thing with aapt. I triple and quadruple checked that it was the ICS compatible version, but still no dice.
I don't know. I'm still patiently waiting for a proper developer to throw together a version for the Incredible that has the on screen nav buttons since i know next to nothing about this stuff, but seriously, this process looks so simple yet I'm having so much trouble with it.
Even if i did get it to compile, I'd be stuck because adb never wants to push or pull files from my phone.
Sent from my Incredible using xda premium
Click to expand...
Click to collapse
You can always copy it over and set permissions (although it usually crashes before you can), or put it in an update.zip. The update.zip method is my favorite.

GazaIan said:
You can always copy it over and set permissions (although it usually crashes before you can), or put it in an update.zip. The update.zip method is my favorite.
Click to expand...
Click to collapse
How does that work? Sorry, I'm pretty new to all of this. Do I just zip up the framework apk, name it update.zip, then flash it in CWM? Or is there more to it?
If it's that easy, that would be awesome, if only I could get the apk to compile.
I'm so frustrated with this that I'm about willing to offer a donation to someone who could do it for me, although it would be much more satisfying if I could get it done on my own. Maybe I could give a donation to someone who could successfully walk me through it. The offers out there of anyone wants to take it.
Sent from my Incredible using xda premium

sixfearstheseven said:
Yep, i did the same thing with aapt. I triple and quadruple checked that it was the ICS compatible version, but still no dice.
I don't know. I'm still patiently waiting for a proper developer to throw together a version for the Incredible that has the on screen nav buttons since i know next to nothing about this stuff, but seriously, this process looks so simple yet I'm having so much trouble with it.
Even if i did get it to compile, I'd be stuck because adb never wants to push or pull files from my phone.
Sent from my Incredible using xda premium
Click to expand...
Click to collapse
try again with this aapt... : http://www.mediafire.com/?0q52u6v8vdkpq1i

evilisto said:
try again with this aapt... : http://www.mediafire.com/?0q52u6v8vdkpq1i
Click to expand...
Click to collapse
Were you able to get it to work with that?
I found a work around two days ago. I took the customized XML files and put them in a Metamorph zip file. I ran it and it successfully changed framework-res.apk but the navigation buttons still wouldn't show. Now, I don't know much about this, so I'm not sure if doing it that way should have worked, but if it should have, it didn't, which would mean the instructions in the first post are incomplete.
I'm doing this on my Incredible, so maybe the ROM I'm using is missing something else. I have no idea. I've tried it on three different ICS ROMs and it didn't work on any of them.
When I get a chance, I'll try it with the new aapt.
Sent from my ADR6300 using xda premium

Thanks for that new aapt, it works. It recompiled everything, but the file size is 4mb smaller than the original framework-res.apk. I get nothing but bootloops now. I also compiled with APK Multi Tool which also worked, but with the same results - bootloops.

Would it be possible to enable the soft buttons on a gingerbread ROM?
~=[,,_,,]:3 <----nyancat

Futur Innovations said:
Would it be possible to enable the soft buttons on a gingerbread ROM?
~=[,,_,,]:3 <----nyancat
Click to expand...
Click to collapse
I highly doubt it, enough to confidently say no.
Sent from my GT-P7510 using xda premium

Related

[GUIDE][LINUX][MIUI] MIUI PatchROM -- BUILD YOUR OWN MIUI ROM

Hello everybody,
Recently, the MIUI team has opened up its source on GitHub. This makes it now possible for everybody to compile MIUI roms. However, the guide they've provided is completely in Chinese. Credits go to ThePCGuy for finding out how it works (original topic) I wrote this guide according to his findings and added complementary items that I found out during my attempts.
Step 1: Preparing your computer
Building your own MIUI rom can only be done on Linux-systems (or *nix, not sure). In this guide I'll be using Ubuntu 11.10.
1. First of all, download a zipball from here. Extract it and place it in a directory (I extracted it in /home/MisterGT/MiCode. From now on, I'll call this the MiCode root directory.
2. Now, it is required to get the android-sdk tools on your computer. You can find those here. Again, extract them somewhere (I put them in /home/MisterGT/Micode/android-sdk-linux).
3. Update your PATH to include the android tools. In a terminal write:
Code:
export PATH=/location/to/android-sdk-linux/platform-tools:/location/to/android-sdk-linux/tools:$PATH
And change the paths accordingly. In my case this would mean
Code:
export PATH=/home/MisterGT/MiCode/android-sdk-linux/platform-tools:/home/MisterGT/MiCode/android-sdk-linux/tools:$PATH
4. On x64 systems you are required to install some 32-bit libraries or the android toolkit will not work. In a terminal write:
Code:
sudo apt-get install ia32-libs
Step 2: Find an appropriate source rom
The package will convert a standard rom to a MIUI rom, so you'll have to choose a ROM you want to use as base. According to the manual, there are two requirements:
Android 2.3.3 - 2.3.7 supported
ROM with root abilities
Only HDPI devices are supported!
So after you've picked one, download it. In your MiCode root dir, create a new map and give it some name (I chose p990 as name). In that folder, put the ROM.zip and do not unzip it.
Step 3: Setting up the makefile
Firstly, copy the makefile from the i9100 directory which is an example. This is how it looks like:
Code:
#
# Makefile for i9100
#
# The original zip file, MUST be specified by each product
local-zip-file := I9100ZCKJ1.zip
# The output zip file of MIUI rom, the default is porting_miui.zip if not specified
local-out-zip-file := MIUI_9100.zip
# All apps from original ZIP, but has smali files chanded
local-modified-apps := LogsProvider Phone MediaProvider Settings
# All apks from MIUI execept MIUISystemUI and framework-miui-res.apk
local-miui-apps := Contacts ContactsProvider Mms TelephonyProvider ThemeManager Launcher2 \
DownloadProvider TelocationProvider Notes Music Torch DownloadProviderUi Updater
# All apps need to be removed from original ZIP file
local-remove-apps := AlipayGphone AmsComposer AndroidQQ_Samsung_Seine BuddiesNow cooldict glyder2 \
ImgoTV iReader kaixin001 Memo MiniDiary MinimalHome mreader PressReader ReadersHub Renren \
Sinamicroblog SinaNews SinaStock SinaWeather SocialHub Tencentmicroblog \
TomEbook Tonghuashun TouchWiz30Launcher Youku_Samsung_seine MusicPlayer \
MediaHub PhotoRetouching VideoEditor thinkdroid QYVideoClient \
Days DigitalClock Dlna DualClock Email EmailWidget FTC FTM FTS Kobo \
Microbesgl Navigator PostIt Protips QuickSearchBox SamsungApps SamsungAppsUNA3 \
SamsungIM SamsungWidget_ProgramMonitor SecretWallpaper1 SecretWallpaper2 \
SevenEngine SnsAccountKx SnsAccountRr SnsDisclaimer SnsImageCache SnsProvider \
Tasks TasksProvider Term TrimApp TwCalendarAppWidget Zinio \
samsungappswidget syncmldm viva_tts
# To include the local targets before and after zip the final ZIP file,
# and the local-targets should:
# (1) be defined after including porting.mk if using any global variable(see porting.mk)
# (2) the name should be leaded with local- to prevent any conflict with global targets
local-pre-zip := local-zip-misc
local-after-zip:= local-test
# The local targets after the zip file is generated, could include 'zip2sd' to
# deliver the zip file to phone, or to customize other actions
include $(PORT_BUILD)/porting.mk
# To define any local-target
local-zip-misc:
cp misc/com.google.android.maps.jar $(ZIP_DIR)/system/framework/
@echo Add google apks
cp misc/apk/* $(ZIP_DIR)/system/app/
@echo Replace build.prop
cp misc/build.prop $(ZIP_DIR)/system/build.prop
local-test:
echo "an example action"
Explanations:
'local-zip-file' = Name of your original ROM zip that you just downloaded
'local-out-zip-file' = Name for your finished MIUI rom
'local-modified-apps' = Apps that will be modified to fit in with the framework. They need to be modified because they contact with the system
'local-miui-apps' = MIUI Apps that will be integrated into the zip
'local-remove-apps' = Apps that will be removed from the original ROM
'local-pre-zip' = Refers to codeblock that should be executed before the zip is done.
'local-after-zip' = Refers to codeblock executed after the zip is completed
'local-zip-misc' = The codeblock just described at 'local-pre-zip'. It adds some Google Apps and a buid.prop
'local-test' = Another codeblock
Step 4: Decompiling apps
Before we can build the new rom, we must decompile some apps and put them in the device folder (so in my case that would be the p990 folder).
/system/framework/android.policy.jar
/system/framework/framework.jar
/system/framework/framework-res.apk
/system/framework/services.jar
/system/app/SystemUI.apk
and all apps that you defined at 'local-modified-apps' in the makefile
Update: as it seems now you need to copy the systemui folder from the i9100 folder. This fixes issues related to systemui.apk not building.
Step 5: Building the rom
Now we're done and we can start building the rom. Open up a terminal and go to the MiCode root dir. Then type:
Code:
source build/envsetup.sh
cd p990 #Or whatever you called your device folder
make zipfile
It will now do a lot of things to build the ROM. Unfortunately, I'm getting a lot of errors when it tries to modify the apps from 'local-modified-apps'. And I don't have any clue to fix it, don't know anything about that..
Nice to see a X8 thread come here...
Sent from my W8 using Tapatalk
Does the base rom need to be in ext4 fotmat and does this work with ldpi devices like Samsung galaxy fit
Sent from my GT-S5670 using xda premium
Nice Informative Thread.
Gonna try it for Samsung Galaxy Fit.
Nice tutorial. I am trying it now on SGS4G.
---------- Post added at 11:39 AM ---------- Previous post was at 11:28 AM ----------
It works pretty slick. I et as far as making the zip and it does it's thing but stops at the SystemUi rebuilding. will have to figure out and will post progress...
so does anybody try this out for the Zte Blade/Skat?
It will only work for HDPI devices, as those are the only ones that are supported by the MIUI team. I'm still getting errors when trying to build SystemUI.apk, I've filed a issue for that though.
Code:
build .build/services.jar...
--------------------------------------------
cp -r services.jar.out/ .build/services
/home/lomash/MiCode/tools/add_miui_smail.sh .build/services_miui .build/services
/home/lomash/MiCode/tools/apktool b .build/services .build/services.jar
I: Checking whether sources has changed...
W: Could not find resources
I: Building apk file...
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, /home/lomash/MiCode/s5670/.build/services.jar, /home/lomash/MiCode/s5670/.build/services/build/apk]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:193)
at brut.androlib.Androlib.buildApk(Androlib.java:355)
at brut.androlib.Androlib.build(Androlib.java:174)
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, /home/lomash/MiCode/s5670/.build/services.jar, /home/lomash/MiCode/s5670/.build/services/build/apk]
at brut.util.OS.exec(OS.java:87)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:191)
... 5 more
Caused by: java.io.IOException: Cannot run program "aapt": java.io.IOException: error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:475)
at java.lang.Runtime.exec(Runtime.java:610)
at java.lang.Runtime.exec(Runtime.java:483)
at brut.util.OS.exec(OS.java:78)
... 6 more
Caused by: java.io.IOException: java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.<init>(UNIXProcess.java:164)
at java.lang.ProcessImpl.start(ProcessImpl.java:81)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:468)
... 9 more
make: *** [.build/services.jar] Error 1
Can anyone help me a little?
---------- Post added at 11:28 PM ---------- Previous post was at 11:27 PM ----------
aapt is there in the android-sdk-linux/tools folder.
MisterGT said:
It will only work for HDPI devices, as those are the only ones that are supported by the MIUI team. I'm still getting errors when trying to build SystemUI.apk, I've filed a issue for that though.
Click to expand...
Click to collapse
I am having the same issue. I get as far as SystemUI and get errors. LMK if you find an answer!
Thanks
Will this work on the exhibit II
Sent from my SGH-T679 using xda premium
People you need to read the OP. It tells you what it will work on.
The package will convert a standard rom to a MIUI rom, so you'll have to choose a ROM you want to use as base. According to the manual, there are two requirements:
Android 2.3.3 - 2.3.7 supported
ROM with root abilities
lomash said:
aapt is there in the android-sdk-linux/tools folder.
Click to expand...
Click to collapse
You didn't add the folder to your PATH.
Ppl are saying this is only ics compatible is this true
Sent from my SGH-T679 using xda premium
dswaggz said:
Ppl are saying this is only ics compatible is this true
Sent from my SGH-T679 using xda premium
Click to expand...
Click to collapse
No, that's not true.
~ Gingerbread
The opposite is true. It is only compatible with gingerbread roms.
Sent from my Optimus 2X using XDA App
Does the original ROM we use need to be AOSP-based ?
Now I see why Developers keep Leaving. Everyone keeps asking the same question that has the answer in the original POST!!!!!!!People you need to read the OP. It tells you what it will work on.
The package will convert a standard rom to a MIUI rom, so you'll have to choose a ROM you want to use as base. According to the manual, there are two requirements:
Android 2.3.3 - 2.3.7 supported
ROM with root abilities
Im having issues too can't seems to get pass that error TT im working on galaxy w btw , anyone has sucessfully create a muiu rom? Thx in advance
i'm on 64bit ubuntu and can't install 32bit libraries for some unknown reason.
DarthJonathan said:
Im having issues too can't seems to get pass that error TT im working on galaxy w btw , anyone has sucessfully create a muiu rom? Thx in advance
Click to expand...
Click to collapse
Yeah literally everyone is stuck on the SystemUI.apk building. I'll post the error log from the terminal.
Code:
cp -r SystemUI .build
/home/kemikal/MiCode/tools/apktool b .build/SystemUI .build/MIUISystemUI.apk
I: Checking whether sources has changed...
I: Smaling...
I: Checking whether resources has changed...
I: Building resources...
res/drawable-hdpi/status_bar_background.png:0: error: Resource entry status_bar_background is already defined.
res/drawable-hdpi/status_bar_background.9.png:0: Originally defined here.
/home/kemikal/MiCode/ancora/.build/SystemUI/res/values/styles.xml:3: error: Error retrieving parent for item: No resource found that matches the given name '@android:style/Theme.Holo.Light.Panel'.
/home/kemikal/MiCode/ancora/.build/SystemUI/res/values/styles.xml:8: error: Error retrieving parent for item: No resource found that matches the given name '@android:style/Theme.Holo.Light.Panel'.
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, /tmp/APKTOOL5695998133584055968.tmp, -I, /home/kemikal/apktool/framework/1.apk, -S, /home/kemikal/MiCode/ancora/.build/SystemUI/res, -M, /home/kemikal/MiCode/ancora/.build/SystemUI/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, /tmp/APKTOOL5695998133584055968.tmp, -I, /home/kemikal/apktool/framework/1.apk, -S, /home/kemikal/MiCode/ancora/.build/SystemUI/res, -M, /home/kemikal/MiCode/ancora/.build/SystemUI/AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:191)
... 6 more
make: *** [.build/MIUISystemUI.apk] Error 1
'@android:style/Theme.Holo.Light.Panel'.
http://pastebin.com/3bWugdSc
'@android:style/Theme.Holo.Light.Panel'.
That Holo style resource can't be found. That seems to be causing the problem. Maybe there is a way to omit or fix that code and continue building?
Sent from my SGH-T679 using Tapatalk

[HOW TO] Compile/Decompile ICS Apk easily|100% working

We are all here to learn, take from community and give back to community!!!
@Lord ClockaN
Hya guys, after A LOT of requests, I decided to share with the community something that I found really REALLY useful for Dev's but also for other users too that want to mess up with compiling and decompiling process. Usually, non problems at all with that, but since ICS come out, many dev\users are not able to decompile\compile properly many ics apk (not all). This guide will ensure you a good result, 100% working, easy, and fastest way to mess up with ics for theming and resizing purposes, or whatever you want
BIG THX to my friend and Dev teammate @Bichon for this
Credits
@Beachon (yes, again)
@Xavierjohn22, the amazing author of AutoApktool! Visit his thread HERE, click his thanks button, and support his work with donations, and my personal thanks to author for this tool which is the most powerful and easiest tool ever.
@Brut_all for Apktool
@XDA Community
@Google
About Apktooll
Please consider to visit the original thread about this tool, because what I'm explaining here is just 1\10 of the real skill of this tool. You can do basically whatever you want with AutoApktool, themers will love it, Dev's will appreciate it a lot, I'm sure.
Why can't we use Apktool???
Well, you can, but it's more difficult, that's it.
Why do you say "must use 1.4.1 apktool version"??
The reason why is that since 1.4.2 version, apktool generate java code while recompiling process is going on, and this lead to errors that 9/10 makes decompile process fail.
Requirements (Windows environment, mine is Seven 64 bit)
Java (last version)
JDK (last version)
JDR (last version, usually included in JDK or Java)
SDK (last 3.0 version for ICS source code)
Auto_Apktool 2.0.0 (DOWNLOAD THIS ONE NOT OTHERS!!!)
HOW-TO (NOTE: before start, select Apktool version with option 21, YOU MUST CHOOSE 1.4.1 version!!)
1) Download and simply unpack Auto_ApkTool 2.0.0
2)Click on "autoapktoolmain.bat", prompt will open
{
"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"
}
3)put the apk you want to mess up with in "_INPUT_APK"
4) you can chose more than one option to decompile (option 6 is strongly recommended)
5) when option 6 is being selected, drag the apk from _INPUT_APK folder into the windows prompt and click enter
6) A Note window will appear, and will show IF the decompiling process has been done properly. Once you close that window, you will see the decompiled folder in _INPUT_APK folder
7) do your edits (xml, snali, or png, doesn't matter)
8) recompile with option 7 (NOTE: this time you MUST drag all the FOLDER, NOT the apk)
9) Once recompiling finished, open the decompiled folder, go to "dist" folder, and here you got your edited apk
10) you MUST sign the apk with option 10 (NOTE: drag the apk from dist folder to the prompt, then press enter, and in the SAME folder, a signedxxx.apk will appear)
11) Rename the apk, and push it |NOTE: you can push the apk with 62 option or with sdk typing:
Code:
adb remount
adb push xxx.apk system/app
adb reboot
That's it
Exactly what I was looking for. Thanks a milli.
Dosnt work with stock deodexed SGS2 LPH rom. Log:
[*] C:\Users\Sale\Desktop\AutoAPKTool2.0.0\_INPUT_APK\SystemUI.apk
decompiling C:\Users\Sale\Desktop\AutoAPKTool2.0.0\_INPUT_APK\SystemUI.apk...
I: Baksmaling...
Exception in thread "main" java.lang.RuntimeException: bad magic value: 64 65 78 0a 30 33 36 00
at org.jf.dexlib.DexFile.<init>(DexFile.java:377)
at org.jf.dexlib.DexFile.<init>(DexFile.java:274)
at brut.androlib.src.SmaliDecoder.decode(SmaliDecoder.java:44)
at brut.androlib.src.SmaliDecoder.decode(SmaliDecoder.java:33)
at brut.androlib.Androlib.decodeSourcesSmali(Androlib.java:68)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:85)
at brut.apktool.Main.cmdDecode(Main.java:128)
at brut.apktool.Main.main(Main.java:65)
salesale said:
Dosnt work with stock deodexed SGS2 LPH rom. Log:
[*] C:\Users\Sale\Desktop\AutoAPKTool2.0.0\_INPUT_APK\SystemUI.apk
decompiling C:\Users\Sale\Desktop\AutoAPKTool2.0.0\_INPUT_APK\SystemUI.apk...
I: Baksmaling...
Exception in thread "main" java.lang.RuntimeException: bad magic value: 64 65 78 0a 30 33 36 00
at org.jf.dexlib.DexFile.<init>(DexFile.java:377)
at org.jf.dexlib.DexFile.<init>(DexFile.java:274)
at brut.androlib.src.SmaliDecoder.decode(SmaliDecoder.java:44)
at brut.androlib.src.SmaliDecoder.decode(SmaliDecoder.java:33)
at brut.androlib.Androlib.decodeSourcesSmali(Androlib.java:68)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:85)
at brut.apktool.Main.cmdDecode(Main.java:128)
at brut.apktool.Main.main(Main.java:65)
Click to expand...
Click to collapse
Just saw this exact issue, and I don't think it's a tool fault..what U edited before recompiling?
Inviato dal mio HTC Desire HD with Beats Audio usando Tapatalk
Nothing, just decompile and always the fault
salesale said:
Nothing, just decompile and always the fault
Click to expand...
Click to collapse
First you must install framework-res.apk first then choose default option to select ur SystemUI.apk.
Then should be work fine....
If still cannot mean that apk files has been edited before !!!!!
Looks like 9png. files was edited...
Is it true that you edit any png files in res/drawable-* folder ?????
I have installed framework-res. I am not edit any file.
Here is CM9, stock LPB and stock LPH
CM9 http://dl.dropbox.com/u/28679276/CM9.7z
LPB http://www.mediafire.com/?yk9p9rezuv5r4bv
LPH http://dl.dropbox.com/u/28679276/XXLPH.7z
Can you try to decompile? Thanks
salesale said:
Nothing, just decompile and always the fault
Click to expand...
Click to collapse
R U ok with java and jdk? The fault is when U decompile or after edit and recompiling?
Inviato dal mio HTC Desire HD with Beats Audio usando Tapatalk
Java is OK. Works with nexus, SGS1, GNex files. The fault is when decompile
salesale said:
Java is OK. Works with nexus, SGS1, GNex files. The fault is when decompile
Click to expand...
Click to collapse
Something wrong with that apk, which ics version is? Are you able to decompile some apk of the same base?
Inviato dal mio HTC Desire HD with Beats Audio usando Tapatalk
Man, when i try to recompile the program give me the next error:
[*] "C:\Users\Kai5ser Z\Downloads\Auto_ApkTool_2.0.0\AutoAPKTool2.0.0\_INPUT_APK\SystemUI"
recompiling "C:\Users\Kai5ser Z\Downloads\Auto_ApkTool_2.0.0\AutoAPKTool2.0.0\_INPUT_APK\SystemUI"...
I: Smaling...
I: Building resources...
libpng error: Read Error
ERROR: Failure processing PNG image C:\Users\Kai5ser Z\Downloads\Auto_ApkTool_2.0.0\AutoAPKTool2.0.0\_INPUT_APK\SystemUI\res\drawable-hdpi\alert_bar_background_normal.9.png
libpng error: Read Error
ERROR: Failure processing PNG image C:\Users\Kai5ser Z\Downloads\Auto_ApkTool_2.0.0\AutoAPKTool2.0.0\_INPUT_APK\SystemUI\res\drawable-hdpi\compat_mode_help_divider_bottom.9.png
libpng error: Read Error
ERROR: Failure processing PNG image C:\Users\Kai5ser Z\Downloads\Auto_ApkTool_2.0.0\AutoAPKTool2.0.0\_INPUT_APK\SystemUI\res\drawable-hdpi\status_bar_call_ongoing_background.9.png
libpng error: Read Error
ERROR: Failure processing PNG image C:\Users\Kai5ser Z\Downloads\Auto_ApkTool_2.0.0\AutoAPKTool2.0.0\_INPUT_APK\SystemUI\res\drawable-hdpi\tw_plmn_bg.9.png
libpng error: Read Error
ERROR: Failure processing PNG image C:\Users\Kai5ser Z\Downloads\Auto_ApkTool_2.0.0\AutoAPKTool2.0.0\_INPUT_APK\SystemUI\res\drawable-hdpi\tw_quicksetting_divider_line.9.png
C:\Users\Kai5ser Z\Downloads\Auto_ApkTool_2.0.0\AutoAPKTool2.0.0\_INPUT_APK\SystemUI\res\values\public.xml:69: error: Public entry identifier 0x7f0200d0 entry index is larger than available symbols (index 208, total symbols 44).
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\KAI5SE~1\AppData\Local\Temp\APKTOOL8579198258812201192.tmp, -I, C:\Users\Kai5ser Z\apktool\framework\1.apk, -S, C:\Users\Kai5ser Z\Downloads\Auto_ApkTool_2.0.0\AutoAPKTool2.0.0\_INPUT_APK\SystemUI\res, -M, C:\Users\Kai5ser Z\Downloads\Auto_ApkTool_2.0.0\AutoAPKTool2.0.0\_INPUT_APK\SystemUI\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\KAI5SE~1\AppData\Local\Temp\APKTOOL8579198258812201192.tmp, -I, C:\Users\Kai5ser Z\apktool\framework\1.apk, -S, C:\Users\Kai5ser Z\Downloads\Auto_ApkTool_2.0.0\AutoAPKTool2.0.0\_INPUT_APK\SystemUI\res, -M, C:\Users\Kai5ser Z\Downloads\Auto_ApkTool_2.0.0\AutoAPKTool2.0.0\_INPUT_APK\SystemUI\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:191)
... 6 more
Sorry for put it all. maybe you can help me, when i try it to compilate, allways give me that error.
Kaiser Z
Pl. Explain what is the possible reason for showing PARSE error ( not installed) and installed but force close error ( not even start ).
KaiserZ said:
Man, when i try to recompile the program give me the next error:
[*] "C:\Users\Kai5ser Z\Downloads\Auto_ApkTool_2.0.0\AutoAPKTool2.0.0\_INPUT_APK\SystemUI"
recompiling "C:\Users\Kai5ser Z\Downloads\Auto_ApkTool_2.0.0\AutoAPKTool2.0.0\_INPUT_APK\SystemUI"...
I: Smaling...
I: Building resources...
libpng error: Read Error
ERROR: Failure processing PNG image C:\Users\Kai5ser Z\Downloads\Auto_ApkTool_2.0.0\AutoAPKTool2.0.0\_INPUT_APK\SystemUI\res\drawable-hdpi\alert_bar_background_normal.9.png
libpng error: Read Error
ERROR: Failure processing PNG image C:\Users\Kai5ser Z\Downloads\Auto_ApkTool_2.0.0\AutoAPKTool2.0.0\_INPUT_APK\SystemUI\res\drawable-hdpi\compat_mode_help_divider_bottom.9.png
libpng error: Read Error
ERROR: Failure processing PNG image C:\Users\Kai5ser Z\Downloads\Auto_ApkTool_2.0.0\AutoAPKTool2.0.0\_INPUT_APK\SystemUI\res\drawable-hdpi\status_bar_call_ongoing_background.9.png
libpng error: Read Error
ERROR: Failure processing PNG image C:\Users\Kai5ser Z\Downloads\Auto_ApkTool_2.0.0\AutoAPKTool2.0.0\_INPUT_APK\SystemUI\res\drawable-hdpi\tw_plmn_bg.9.png
libpng error: Read Error
ERROR: Failure processing PNG image C:\Users\Kai5ser Z\Downloads\Auto_ApkTool_2.0.0\AutoAPKTool2.0.0\_INPUT_APK\SystemUI\res\drawable-hdpi\tw_quicksetting_divider_line.9.png
C:\Users\Kai5ser Z\Downloads\Auto_ApkTool_2.0.0\AutoAPKTool2.0.0\_INPUT_APK\SystemUI\res\values\public.xml:69: error: Public entry identifier 0x7f0200d0 entry index is larger than available symbols (index 208, total symbols 44).
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\KAI5SE~1\AppData\Local\Temp\APKTOOL8579198258812201192.tmp, -I, C:\Users\Kai5ser Z\apktool\framework\1.apk, -S, C:\Users\Kai5ser Z\Downloads\Auto_ApkTool_2.0.0\AutoAPKTool2.0.0\_INPUT_APK\SystemUI\res, -M, C:\Users\Kai5ser Z\Downloads\Auto_ApkTool_2.0.0\AutoAPKTool2.0.0\_INPUT_APK\SystemUI\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\KAI5SE~1\AppData\Local\Temp\APKTOOL8579198258812201192.tmp, -I, C:\Users\Kai5ser Z\apktool\framework\1.apk, -S, C:\Users\Kai5ser Z\Downloads\Auto_ApkTool_2.0.0\AutoAPKTool2.0.0\_INPUT_APK\SystemUI\res, -M, C:\Users\Kai5ser Z\Downloads\Auto_ApkTool_2.0.0\AutoAPKTool2.0.0\_INPUT_APK\SystemUI\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:191)
... 6 more
Sorry for put it all. maybe you can help me, when i try it to compilate, allways give me that error.
Kaiser Z
Click to expand...
Click to collapse
U are messin up with 9png mate, as themer who I am, I remember you that those png MUST be fixed with 9png patch...also remember that guys, messing up with png is always safer and cleaner when it's done on the stock apk, which means no xml edits, no smali, whatever! First of all, custom png, second recompile, third smali/xml edits, recompile again, that's the way..
Inviato dal mio HTC Desire HD with Beats Audio usando Tapatalk
memnoc said:
U are messin up with 9png mate, as themer who I am, I remember you that those png MUST be fixed with 9png patch...also remember that guys, messing up with png is always safer and cleaner when it's done on the stock apk, which means no xml edits, no smali, whatever! First of all, custom png, second recompile, third smali/xml edits, recompile again, that's the way..
Inviato dal mio HTC Desire HD with Beats Audio usando Tapatalk
Click to expand...
Click to collapse
Man you gonna hate, but im so noob, can you explain me more easily every spet that you sed.....? please, i really wanna do that, i mean, i wanna to custom the apk, i hope you can help me, and if you do that, i gonna give mi gratitud . greetings. I hope you can understan what i sad, my english is not good XD
Kaiser Z
memnoc: can u make a mirror download. I can't download from https://rapidshare.com/files/1410893164/Auto_ApkTool_2.0.0.zip please i recomend u uplad from mediafire.com
Great guide... However, I am running into the same wall that I always to when I try and re-compile the ICS Systemui.apk from my Asus Transformer Prime. I get a aapt.exe crash, followed by the following error:
Code:
C:\Users\Troy\Desktop\AutoAPKTool2.0.0\_INPUT_APK\SystemUI
recompiling C:\Users\Troy\Desktop\AutoAPKTool2.0.0\_INPUT_APK\SystemUI...
I: Smaling...
I: Building resources...
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\Troy\AppData\Local\Temp\APKTOOL2330637792693006158.tmp, -I, C:\Users\Troy\apktool\framework\1.apk, -S, C:\Users\Troy\Desktop\AutoAPKTool2.0.0\_INPUT_APK\SystemUI\res, -M, C:\Users\Troy\Desktop\AutoAPKTool2.0.0\_INPUT_APK\SystemUI\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\Troy\AppData\Local\Temp\APKTOOL2330637792693006158.tmp, -I, C:\Users\Troy\apktool\framework\1.apk, -S, C:\Users\Troy\Desktop\AutoAPKTool2.0.0\_INPUT_APK\SystemUI\res, -M, C:\Users\Troy\Desktop\AutoAPKTool2.0.0\_INPUT_APK\SystemUI\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:191)
... 6 more
I made no changes to the systemui, I simply decompiled it (which worked fine) and then recompiled it.
Yes, I did apktool install the framework from the same system, before hand.
I have gotten this error everytime on the systemui, no matter which guide or apktool version I use. The framework-res works without a hitch, but the damn systemui is a ***** that has no mercy!
Thank you for any help you can throw my way. Me and a few others on the Prime thread are trying to get a % battery mod done for the Prime, but we need to be able to recompile the SystemUI.apk first.
- Thanks

[GUIDE] enable native VOIP in ICS ROMS

Hello,
Wanted to enable VOIP on ICS, but couldn't find the info. After bricking my phone twice and fixing it again
I succeeded.
problems i encountered so far:
Fragmented info in the numerous treads that are around over voip
Incomplete manuals
People giving advice without trying it on their own phone first
Bugs
So this is what i did:
On the PC
Install latest Java Runtime Environment (current version 6 Update 31)
Install latest Java SE Development Kit (current version 7u3)
Install latest Android SDK then run SDK manager and install the suggested packages
Download latest APKtool (http://code.google.com/p/android-apktool/ version 1.4.3)
Install samsung USB drivers (available on sammobile.com)
Add the \bin, \tools and \platform-tools directory to the PATH variable
in windows 7, right click computer in start menu->properties->click advanced system properties->hit the button system variables and add them to the path variable.
In my case:
c:\Program Files\Java\jdk1.7.0_03\bin;c:\Program Files\Java\jre7\bin;c:\Program Files\Android\android-sdk\platform-tools;c:\Program Files\Android\android-sdk\tools
Reboot PC (just to be sure, its windows)
On the Phone
Rooted phone
Install rootexplorer (market)
Install clockworkmod recovery (download rommanager in market)
Install busybox (Market, Stephen Erickson)
CWM and Busybox needed in case you mess up
With Rootexplorer
goto /system/framework/ and make the directory R/W
copy /system/framework/framework-res.apk to /system/framework/framework-res.apk.bak
Copy /system/framework/framework-res.apk to PC
Back to PC
Make directory
c:\APKTool
unpack downloaded APKTool to this folder
copy framework-res.apk to this folder
this folder should now contain:
framework-res.apk
apktool.jar
The following info is from http://www.miui-au.com/add-ons/apktool/
open a command prompt in the APKTool directory and run the following command:
Code:
java -jar apktool.jar if framework-res.apk
Code:
java -jar apktool.jar d framework-res.apk
this should decompile framework-res.apk to a folder named framework-res
goto the following folder
c:\apktool\framework-res\res\values
edit (notepad) the following lines in the file bools.xml to
Code:
<bool name="config_sip_wifi_only">false</bool>
<bool name="config_built_in_sip_phone">true</bool>
Now we are going to compile framework-res.apk again
Code:
java -jar apktool.jar b framework-res
Due to a bug in either APKTool.jar or aapt.exe you will probable run into a number of errors that need to be fixed
Code:
apktool\framework-res\res\values\plurals.xml:79: error
: Multiple substitutions specified in non-positional format; did you mean to add
the formatted="false" attribute?
A fix is explained at the following site:
http://www.miui.nl/?page_id=2216
in every plurals.xml file that generates an error find the following section and change it to:
Code:
<plurals name="matches_found">
<item quantity="other">%d of %d</item>
<item quantity="one">1 match</item>
</plurals>
to
Code:
<plurals name="matches_found">
<item quantity="other">%1$d of %2$d</item>
<item quantity="one">1 match</item>
</plurals>
After fixing this (could be up to 80 files, depending on ROM)
we can successfully compile framework-res.apk
Code:
java -jar apktool.jar b framework-res
We should have one warning
Code:
W: Could not find sources
This is normal for framework-res.apk
After compilation we should have the following two new folders
Code:
c:\temp\apktool\framework-res\build\
c:\temp\apktool\framework-res\dist\
in the directory dist there is a newly created framework-res.apk
DO NOT USE THIS FILE, IT WILL BRICK YOUR PHONE
instead go to the directory
Code:
framework-res\build\apk\
there should be a file resources.arsc. This file contains all our modifications and is all we need.
Framework-res.apk is a compressed file. We can open it with a zip program. I used Total Commander for this (www.ghisler.com)
now open the original Framework-res.apk and copy (pack) our modified resources.arsc (overwrite the original)
Now we have a modified framework-res.apk with voip enabled
Next we have to make the following two files:
android.software.sip.xml
Code:
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2009 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- This is the standard set of features for devices that support SIP API. -->
<permissions>
<feature name="android.software.sip" />
</permissions>
android.software.sip.voip.xml
Code:
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2009 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- This is the standard set of features for devices that support SIP-based VoIP. -->
<permissions>
<feature name="android.software.sip" />
<feature name="android.software.sip.voip" />
</permissions>
Copy the three files back to the Phone
Back to Phone again
UNSUCCESSFUL COMPILING, WRONG COPYING OR PURE BAD LUCK CAN BRICK YOUR PHONE. BACKUP YOUR PHONE BEFORE PROCEEDING!
CONTINUE AT YOUR OWN RISK
FORGET ADB PUSH, BE SURE TO HAVE ROOTEXPORER
Everyone saying otherwise is:
a)lying
b)not running stock rom
c)lucky
d)laisy for not writing a decent HOWTO ADB PUSH
So go ahead with root explorer
Copy android.software.sip.xml and android.software.sip.voip.xml to /system/etc/permissions
Set the persissions to rw-r--r--
Change owner to user 0-Root, group 0-root
copy framework-res.apk to /system
Set the persissions to rw-r--r--
Change owner to user 0-Root, group 0-root
Move /system/framework-res.apk to /system/framework (be sure to make backup the original file)
After reboot VOIP is enabled
What if something goes wrong:
If all else fails flash your original rom
or (works only if you followed everything in this manual)
Reboot your Phone in recovery mode (press&hold home, volume-up, power button)
In recovery mode mount /system and /SDCARD
Connect your Phone (still in recovery mode) to the PC
on the PC open a command prompt
Type the following (sgs2)
adb shell
su
mount -o remount,rw /dev/block/mmcblk0p9 /system
cp /system/framework/framework-res.apk.bak /system/framework/framework-res.apk.bak
reboot
this should copy the backup file back.
good luck
Hi. VOIP doesn't work in my country due to restrictions but you can try this.
1. Download anycut from the market.
2. Long hold desktop > add shortcut.
{
"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"
}
3. Click on Activity.
4. Click on SIP Settings.
5. An icon will appear on the desktop.
6. Click on icon and set it up as you wish.
I think this is a much simpler approach and just works without root or any modification.
Sent from my GT-I9100
If you wish then you can uninstall anycut after you finish. In its defense it is a 32kb program made by a Googler.
Sent from my GT-I9100
akbarhash said:
I think this is a much simpler approach and just works without root or any modification.
Click to expand...
Click to collapse
Nice try, but this will only work if voip is enabled first. basically this program only adds a shortcut to voip settings, but if the voip interface is disabled, this doesn't work.
nice effort but didn't work for me..
This is ok, but...
akbarhash said:
Hi. VOIP doesn't work in my country due to restrictions but you can try this.
1. Download anycut from the market.
2. Long hold desktop > add shortcut.
3. Click on Activity.
4. Click on SIP Settings.
5. An icon will appear on the desktop.
6. Click on icon and set it up as you wish.
I think this is a much simpler approach and just works without root or any modification.
Sent from my GT-I9100
Click to expand...
Click to collapse
This is ok for me, but don´t save the account, and checkit status forever. Any solution?
Thank.
im using bria
hi
its too long procedure. i m using bria on SGS rooted phone. and its work great.
adejager1 said:
UNSUCCESSFUL COMPILING, WRONG COPYING OR PURE BAD LUCK CAN BRICK YOUR PHONE.
Click to expand...
Click to collapse
Damn, which I have a lot
Dears,
I'm following this guide but I have a problem recompiling.
This is the log:
c:\APKtool>java -jar apktool.jar b framework-res
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
invalid resource directory name: c:\APKtool\framework-res\res/drawable-sw600dp-h
dpi
invalid resource directory name: c:\APKtool\framework-res\res/layout-sw400dp
invalid resource directory name: c:\APKtool\framework-res\res/layout-sw600dp
invalid resource directory name: c:\APKtool\framework-res\res/layout-w600dp
invalid resource directory name: c:\APKtool\framework-res\res/values-h720dp
invalid resource directory name: c:\APKtool\framework-res\res/values-sw360dp
invalid resource directory name: c:\APKtool\framework-res\res/values-sw400dp
invalid resource directory name: c:\APKtool\framework-res\res/values-sw600dp
invalid resource directory name: c:\APKtool\framework-res\res/values-sw600dp-lan
d
invalid resource directory name: c:\APKtool\framework-res\res/values-sw600dp-w10
24dp
invalid resource directory name: c:\APKtool\framework-res\res/values-sw600dp-w12
80dp
invalid resource directory name: c:\APKtool\framework-res\res/values-w360dp
invalid resource directory name: c:\APKtool\framework-res\res/values-w480dp
invalid resource directory name: c:\APKtool\framework-res\res/values-w500dp
invalid resource directory name: c:\APKtool\framework-res\res/values-w600dp
invalid resource directory name: c:\APKtool\framework-res\res/values-w720dp
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutExce
ption: could not exec command: [aapt, p, -F, C:\Users\FEDERI~1.RAM\AppData\Local
\Temp\APKTOOL1708831992001626862.tmp, -x, -S, c:\APKtool\framework-res\res, -M,
c:\APKtool\framework-res\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:193)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:301)
at brut.androlib.Androlib.buildResources(Androlib.java:248)
at brut.androlib.Androlib.build(Androlib.java:171)
at brut.androlib.Androlib.build(Androlib.java:154)
at brut.apktool.Main.cmdBuild(Main.java:182)
at brut.apktool.Main.main(Main.java:67)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\U
sers\FEDERI~1.RAM\AppData\Local\Temp\APKTOOL1708831992001626862.tmp, -x, -S, c:\
APKtool\framework-res\res, -M, c:\APKtool\framework-res\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:191)
... 6 more
c:\APKtool>​
I'm on Windows, so I think the problem is the / in the paths, but I don't know the cause of this.
I'm not a programmer.
Original framework-res.apk, APKtool and the framework-res folder with the already modified file are attached.
Can anybody gently help me?
Thank you so much.
I can get to the sip settings and add an account, but as this poster says, the account says "Checking status" forever. Also every now and then, the account simply disappears. There's no save button either.
Anyone with the same problems? Any ideas?

Help for re-compiling ics framework-res.apk

I can decompile the apk but i cant recompile it. I tried apktool,apk-multi tool and apk manager. Anyone help me please.
bogac94 said:
I can decompile the apk but i cant recompile it. I tried apktool,apk-multi tool and apk manager. Anyone help me please.
Click to expand...
Click to collapse
great error description.
what's the error msg?
Did you use the search function? Other users had similiar problems before. So try this e.g.
Have a look here:
http://forum.xda-developers.com/showthread.php?t=1427959
It seems that apktool 1.4.3 has problems with the ics framework. So use 1.4.2 instead.
EDIT: Same Link
apk manager works fine,
you have to replace "AndroidManifest.xml" and the folder "META-INF" in recompiled unsigned apk with the files of the original one
edit: if you have error messages while recompile, just look in the log.txt
F:\Program Files\apkmanager>apktool b framework-res
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
invalid resource directory name: F:\Program Files\apkmanager\framework-res\res/d
rawable-sw600dp-hdpi
invalid resource directory name: F:\Program Files\apkmanager\framework-res\res/l
ayout-sw600dp
invalid resource directory name: F:\Program Files\apkmanager\framework-res\res/l
ayout-w600dp
invalid resource directory name: F:\Program Files\apkmanager\framework-res\res/v
alues-h720dp
invalid resource directory name: F:\Program Files\apkmanager\framework-res\res/v
alues-sw600dp
invalid resource directory name: F:\Program Files\apkmanager\framework-res\res/v
alues-sw600dp-land
invalid resource directory name: F:\Program Files\apkmanager\framework-res\res/v
alues-sw600dp-w1024dp
invalid resource directory name: F:\Program Files\apkmanager\framework-res\res/v
alues-sw600dp-w1280dp
invalid resource directory name: F:\Program Files\apkmanager\framework-res\res/v
alues-w360dp
invalid resource directory name: F:\Program Files\apkmanager\framework-res\res/v
alues-w480dp
invalid resource directory name: F:\Program Files\apkmanager\framework-res\res/v
alues-w500dp
invalid resource directory name: F:\Program Files\apkmanager\framework-res\res/v
alues-w600dp
invalid resource directory name: F:\Program Files\apkmanager\framework-res\res/v
alues-w720dp
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutExce
ption: could not exec command: [aapt, p, -F, C:\Users\Kemirgen\AppData\Local\Tem
p\APKTOOL5781810947305035951.tmp, -x, -S, F:\Program Files\apkmanager\framework-
res\res, -M, F:\Program Files\apkmanager\framework-res\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:193)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:301)
at brut.androlib.Androlib.buildResources(Androlib.java:248)
at brut.androlib.Androlib.build(Androlib.java:171)
at brut.androlib.Androlib.build(Androlib.java:154)
at brut.apktool.Main.cmdBuild(Main.java:182)
at brut.apktool.Main.main(Main.java:67)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\U
sers\Kemirgen\AppData\Local\Temp\APKTOOL5781810947305035951.tmp, -x, -S, F:\Prog
ram Files\apkmanager\framework-res\res, -M, F:\Program Files\apkmanager\framewor
k-res\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:191)
... 6 more
F:\Program Files\apkmanager>
It is the error log. Im using apktool v 1.4.2
Did you decompile the file freshly after installing 1.4.2? Otherwise the error may still be existent.
wintel_mac said:
Did you decompile the file freshly after installing 1.4.2? Otherwise the error may still be existent.
Click to expand...
Click to collapse
I installed 1.4.2 and then i did apktool if framework-res.apk and then decompiled
Sent from my I9001 using awesome CM9 by arco68
How about aapt? According to this issue thread, there may be problems with old versions http://code.google.com/p/android-apktool/issues/detail?id=282
wintel_mac said:
How about aapt? According to this issue thread, there may be problems with old versions http://code.google.com/p/android-apktool/issues/detail?id=282
Click to expand...
Click to collapse
I have the newest aapt.
Sent from my I9001 using awesome CM9 by arco68
Then I'm out of ideas
Hae you tryied to install/move the apktool to root of your HDD partition? Spaces in the names of directories can mess up your tool put it in like C:/apktool or somethin` like that
maybe run as root will help
chasemyass said:
Hae you tryied to install/move the apktool to root of your HDD partition? Spaces in the names of directories can mess up your tool put it in like C:/apktool or somethin` like that
Click to expand...
Click to collapse
I'll try this.
texten said:
maybe run as root will help
Click to expand...
Click to collapse
You mean "run as administrator" ?
Sent from my I9001 using awesome CM9 by arco68
bogac94 said:
You mean "run as administrator" ?
Click to expand...
Click to collapse
yes
wintel_mac said:
Did you decompile the file freshly after installing 1.4.2? Otherwise the error may still be existent.
Click to expand...
Click to collapse
Using auto apk (4.0.2) and used the 1.4.2 you're my hero for this evening sir!
Then this thread was not just done in vain

[Q] apktool recompilation error!

While using apktool to recompile the contacts apk, SecContacts_OSup.apk, I am getting the following error in cmd. This is unedited folder, and trying to compile it right after de-compilation. But still getting error.
I have tried different aapt, different apktool.jar, both java 6 and 7 and such but to no avail.
D:\apktool\112233>apktool b 11 wert.apk
I: Using Apktool 2.0.0-Beta9 on 11
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
D:\apktool\112233\11\res\layout\photo_selector_view_popup.xml:9: error: Error: No resource found tha
t matches the given name (at 'layout' with value '@layout/photo_updates_header').
aapt: warning: string 'remove_from_namecard_list_popup_title' has no default translation in D:\apkto
ol\112233\11\res; found: zh_SG
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.co
mmon.BrutException: could not exec command: [C:\Users\Keshav\AppData\Local\Temp\brut_util_Jar_7378085
831899028208.tmp, p, --forced-package-id, 127, --min-sdk-version, 19, --target-sdk-version, 19, --ve
rsion-code, 19, --version-name, 4.4.2-I9505XXUFNB8, -F, C:\Users\Keshav\AppData\Local\Temp\APKTOOL365
2482745200459136.tmp, -0, arsc, -I, C:\Users\Keshav\apktool\framework\1.apk, -I, C:\Users\Keshav\apkto
ol\framework\2.apk, -S, D:\apktool\112233\11\res, -M, D:\apktool\112233\11\AndroidManifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:435)
at brut.androlib.Androlib.buildResources(Androlib.java:363)
at brut.androlib.Androlib.build(Androlib.java:286)
at brut.androlib.Androlib.build(Androlib.java:258)
at brut.apktool.Main.cmdBuild(Main.java:236)
at brut.apktool.Main.main(Main.java:88)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [C:\U
sers\Keshav\AppData\Local\Temp\brut_util_Jar_7378085831899028208.tmp, p, --forced-package-id, 127, --
min-sdk-version, 19, --target-sdk-version, 19, --version-code, 19, --version-name, 4.4.2-I9505XXUFNB
8, -F, C:\Users\Keshav\AppData\Local\Temp\APKTOOL3652482745200459136.tmp, -0, arsc, -I, C:\Users\Kesh
av\apktool\framework\1.apk, -I, C:\Users\Keshav\apktool\framework\2.apk, -S, D:\apktool\112233\11\res
,-M, D:\apktool\112233\11\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:470)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:416)
... 5 more
Caused by: brut.common.BrutException: could not exec command: [C:\Users\Keshav\AppData\Local\Temp\bru
t_util_Jar_7378085831899028208.tmp, p, --forced-package-id, 127, --min-sdk-version, 19, --target-sdk
-version, 19, --version-code, 19, --version-name, 4.4.2-I9505XXUFNB8, -F, C:\Users\Keshav\AppData\Loc
al\Temp\APKTOOL3652482745200459136.tmp, -0, arsc, -I, C:\Users\Keshav\apktool\framework\1.apk, -I, C:
\Users\Keshav\apktool\framework\2.apk, -S, D:\apktool\112233\11\res, -M, D:\apktool\112233\11\Android
Manifest.xml]
at brut.util.OS.exec(OS.java:89)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:464)
... 6 more
Click to expand...
Click to collapse
If I import this raw project into Eclipse I get these 5 errors:
Description Resource Path Location Type
error: Error: No resource found that matches the given name: attr 'android:actionBarNonEmbeded'. styles.xml /DialtactsActivity/res/values-sw360dp-xxhdpi line 10 Android AAPT Problem
error: Error: No resource found that matches the given name: attr 'android:actionBarNonEmbeded'. styles.xml /DialtactsActivity/res/values line 10 Android AAPT Problem
error: Error: No resource found that matches the given name: attr 'android:searchViewTextField'. styles.xml /DialtactsActivity/res/values line 95 Android AAPT Problem
error: Error: No resource found that matches the given name: attr 'android:actionBarNonEmbeded'. styles.xml /DialtactsActivity/res/values line 661 Android AAPT Problem
error: Error: No resource found that matches the given name: attr 'android:searchViewTextField'. styles.xml /DialtactsActivity/res/values-sw360dp-xxhdpi line 63 Android AAPT Problem
Click to expand...
Click to collapse
Although not the right thing to do, I can remove the line with 'android:actionBarNonEmbeded' in them in Eclipse and there is no problem after deleting those 3 lines. But can't simply delete lines with 'android:searchViewTextField' as it throws up too many other errors, mostly same for other attrs.
I have surfed tons of pages at stackoverflow, xda and some other sites... but couldn't crack a solution. Can't add a simple + to @drawable either, obviously.
Reply by connor.tumbleson here on code.google.com might be answer but I couldn't figure out what to do.
url - code.google.com/p/android-apktool/issues/detail?id=441#c20
So, uh, pls help!
Note: Of course, I'm installing the framreworks first (framework-res.apk, twframework-res.apk and systemUI.apk). And have tried apkMultiTool v3.4 and some other apktool based solutions too. Nothing helped.
keshav13 said:
While using apktool to recompile the contacts apk, SecContacts_OSup.apk, I am getting the following error in cmd
Click to expand...
Click to collapse
look in \res\layout\photo_selector_vie w_popup.xml line 9, u must remove all references to photo_updates_header, common problem, sometimes system apk have been done badly ha ha ha
try this and report
worked but didn't work!
_alex74_ said:
look in \res\layout\photo_selector_vie w_popup.xml line 9, u must remove all references to photo_updates_header, common problem, sometimes system apk have been done badly ha ha ha
try this and report
Click to expand...
Click to collapse
First of all, thansk for the tip!
I removed the layout portion of that line that actually made reference to photo_updates_header file. So, that actually didn't got me those error, but it didn;t build an APK file despite showing exactly that in cmd. Here's what cmd says:
D:\apktool>apktool b c1 111.apk
I: Using Apktool 2.0.0-Beta9 on c1
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
aapt: warning: string 'remove_from_namecard_list_popup_title' has no default translation in D:\apkto
ol\c1\res; found: zh_SG
I: Building apk file...
I: Copying unknown files/dir...
There is no APK file built, tho. Which is bad, and surprising. What do you suggest?
[I'm using apktool 2.0 beta9, and have Java 7 installed on Win8.1.]
Edit:
Is there a way how I should remove the reference to photo_updates_header file? Should I just delete the whole of line 9 that is making the reference?
keshav13 said:
First of all, thansk for the tip!
Is there a way how I should remove the reference to photo_updates_header file? Should I just delete the whole of line 9 that is making the reference?
Click to expand...
Click to collapse
as posted apk must be builded in dist folder of your decompiled apk , no errors that says different.
that reference is about missing traslation, just warning u can keep it(no harm in apk compiling) or add a line like this:
<string name="photo_updates_header">photo updates header</string>
Click to expand...
Click to collapse
in res/values/strings.xml on bottom of all strings
lemme know
Nope :/
_alex74_ said:
as posted apk must be builded in dist folder of your decompiled apk , no errors that says different.
that reference is about missing traslation, just warning u can keep it(no harm in apk compiling) or add a line like this:
in res/values/strings.xml on bottom of all strings
lemme know
Click to expand...
Click to collapse
Hi _alex74_,
Adding the line <string name="photo_updates_header">photo updates header</string> didn't work. Very sad.
Please suggest something else.
Can you reproduce the problem at your end? Can you recompile it or not even when it's untouched?
Here's the link to contacts APK that's been torturing me: __www24.zippyshare.com/v/59685951/file.html__
Thanks a lot!

Categories

Resources