Deodexing - 4 problem apks - anyone able to help? - Defy Q&A, Help & Troubleshooting

I'm in the process of deodexing the stock ROM (4.5.1-134_DFP-82) on my Defy+. I've tried a number of the deodexing tools posted around XDA and elsewhere but nothing would run anything like clean, so I've been building my own script to do it.
I've successfully deodexed everything in /system/framework/ and 151 out of 155 odexes in /system/app/. It has been quite interesting, tracking down the missing classes when something doesn't deodex clean first time with the default BOOTCLASSPATH files. Unfortunately, though, four of the .odexes in /system/app/ have got me beat.
The first one is Settings.odex. This is reporting:class Lcom/motorola/android/mirrorservice/IMirrorService; cannot be resolved.​I can't locate that class anywhere. I've tried disassembling everything in both directories and searching the results but it just doesn't seem to be there. Settings seems rather too important to just allow baksmali to ignore the error.
The other three - DLNA.odex, MediaGallery.odex and VideoPlayer.odex - all display the same symptom. Trying to deodex with just the standard BOOTCLASSPATH files gives the error:class Lcom/motorola/android/extdispservice/IExtDispService; cannot be resolved.​Adding /system/framework/com.motorola.blur.library.service.odex to the BOOTCLASSPATH files makes that go away, but instead gives the error:Could not find superclass Lcom/google/protobuf/GeneratedMessage$Builde​I've seen that one several times and the way to fix it has always been to add /system/framework/com.motorola.blur.library.utilities.odex to the BOOTCLASSPATH files. But in this case I end up with the error:class Lcom/motorola/android/extdispservice/IExtDispService; cannot be resolved.​again. It's taking me round in circles! I've tried reversing the order of utilities and service but that doesn't fix it either.
Anyone able to suggest how I might get rid of these errors? The second one in particular is doing my head in!

OK, so I've done a bit more digging around online and it seems that both those classes are to do with the HDMI interface, which of course the Defy doesn't have. baksmali continues anyway and creates the out folder, so I'm assuming that it should be OK to zip those back in to the relevant apks and try those. Does that sound right?

Hi ejstubbs
thanks for starting this thread...i was wanting to start deodexing roms on my own. can you please help me with the apps needed and/or some link where i can get a thorough knowhow about deodexing roms for my Defy?

Questions go in the Q&A section, not the Dev section.

Related

[think tank] disable increasing ringer (link to intl ver working)

I saw this thread and it made me gain interest in this again. I know many do not like three ringtone volume increasing.
If this is possible on the international version, we should be able to do the same right?
http://forum.xda-developers.com/showthread.php?t=759537
This would be great i hate that volume increase in ringtones. Any dev plz port this for Vibrant.
The meat of it
The meat of what they are doing appears to be in >> THIS << post, which I will quote below. If any developer that knows what they are doing wants to attempt this for the Vibrant the quoted post should give them an quick idea of its feasibility. If it looks like it is doable there is more info in the original I9000 thread that is linked in the OP.
the_ozyrys said:
Hello,
I've just found a (not easy) way to disable increasing ring.
This involves using Apk Manager to backsmali Phone.apk,
which then have to be replaced by patched version, either by root access or creation of update.zip.
Procedure:
1. Get your Phone.apk (\system\app\Phone.apk) and copy it to computer.
2. Use Apk Manager to decompile it.
3. Open folder with Phone source (<Apk Manager folder>\projects\Phone.apk\smali\com\android\phone).
4. Open file Ringer$1.smali with your favourite text editor.
5. Find line that reads:
Code:
invoke-virtual {v1, v5, v4, v3}, Landroid/media/AudioManager;->setStreamVolume(III)V
6. Delete this line, save the file.
7. Compile Phone.apk, put it back to phone.
8. Enjoy constant-volume ringtones.
Side effects:
- currently not known
- if you have problem decompiling Phone.apk, >here< is the solution
Maybe somebody will make pre-patched packages, I'm currently using JM5
so I can only provide one for this firmware.
Click to expand...
Click to collapse
are you guys talking about when someone calls you and the ringtone is like quiet almost, and then goes super loud? if so, i want that too, its annoying as hell.
xriderx66 said:
are you guys talking about when someone calls you and the ringtone is like quiet almost, and then goes super loud? if so, i want that too, its annoying as hell.
Click to expand...
Click to collapse
Yes
4 5 6 7 8 9
I will work on this tomorrow after I get off work unless someone beats me to it. This ringer volume issue has been bothering me a lot with this phone.
That would be amazing man. It would have to be incorporated into every rom (as an option)!
This thread should be en dev section.
pretty sure that is where I posted this initially..... must have been a mod moving it.
OK so this fix rrequires that use the .apk's from a deodexed rom which I don't have on hand so I will down download a few and edit the .apk's. Gonna take a bit more time than previously thought but I will get it done soon.
YetisAreReal said:
OK so this fix rrequires that use the .apk's from a deodexed rom which I don't have on hand so I will down download a few and edit the .apk's. Gonna take a bit more time than previously thought but I will get it done soon.
Click to expand...
Click to collapse
Thank you for this. Please log your work. With a good writeup and good understanding of what is going on it would be nice to see devs put this in as a option on all the deodexed ROMs.
Some good news and some bad for now. I have successfully decompiled and recompile the APK as told but no luck so far in fixing the ringtone. Ran into a similar issue that the i9000 users were with each build being different. I am testing on JL4 first with other builds to follow once I am successful. In my Phone.apk I found two lines similar to the line mentioned in the OP for the i9000 but removing either one or both has has no effect for me so I am digging deeper and trying test builds. Java isn't exactly my thing so if anyone with java know how would like to look at the decompiled script I can forward it to them.
EDIT: added the file for peer review just remove the .txt and open with any text editor.
After reading this last night, seemed easy enough, I was determined to try this. Dl'd the apkmanager, extracted my phone.apk, and began playing. Apparently, this is listed in the About/Tips/Debug (menu selection 23) inside of apk manager, you cannot decompile themed apk's, which is exactly what i was trying to do with my Ginger Clone phone.apk. Oh well, back to the drawing board, or at least something with a stock phone.apk i can play around with. Anyone have one, unthemed, from froyo (preferrably jl4 as thats the basis for the current rom I'm running) they want to post?
Br1cK'd said:
After reading this last night, seemed easy enough, I was determined to try this. Dl'd the apkmanager, extracted my phone.apk, and began playing. Apparently, this is listed in the About/Tips/Debug (menu selection 23) inside of apk manager, you cannot decompile themed apk's, which is exactly what i was trying to do with my Ginger Clone phone.apk. Oh well, back to the drawing board, or at least something with a stock phone.apk i can play around with. Anyone have one, unthemed, from froyo (preferrably jl4 as thats the basis for the current rom I'm running) they want to post?
Click to expand...
Click to collapse
Here you go stock JL4 Phone.apk, please let me know if you get this working I had no luck.
YetisAreReal said:
Here you go stock JL4 Phone.apk, please let me know if you get this working I had no luck.
Click to expand...
Click to collapse
Thx! I'll be giving it a go in the morning when I get to my pc.
Ginger Clone's of the World Unite! Via the XDA App
Epic Fail. I successfully decompiled, edited, and recompiled the APK. The exact line in the script that was linked instructions from T313C0mun1s7 was removed, script file saved, apk recompiled properly, and pushed to the phone. Rebooted phone, the stock jl4 i just edited actually works and doesn't fc on Ginger Clone R2 Final, but the ascending ringtone is still there. I'll post the edited apk if anyone is interested, but it seems to not work. I see, more research in my near future.
Edited - spoke too soon, fc's on outbound calls. Gonna try again granted I have the time this morning, if not, I might have to wait until I get back in town after the holidays to play around with this.
Edit 2 - No more fc's on outbound calls with the newly edited phone.apk, but also, still having the ascending ringer. I removed both lines in the script that echoed the linked post on page 1, tried with removing one or the other first, then both, and still the ascending ringer persists through all attempts. Hrm.
I see you ran into the exact same problems I did using JL4 stock. I am on JL5 now so I am going to test a few things on this build now in the hopes I can fix this.
YetisAreReal said:
I see you ran into the exact same problems I did using JL4 stock. I am on JL5 now so I am going to test a few things on this build now in the hopes I can fix this.
Click to expand...
Click to collapse
First of all I have no idea what I am doing. Second I am not sure of all the issues you guys are having. I am just trying to think outside the box. I found this not sure if it applies or not.
apks can be re-edited a few different ways. The easiest example is by replacing the individual files within the apk by dragging and dropping the files in a program such as 7zip or winrar. In this manner the signature of the apk isnt broken. If you must unpack the apk file then when you pack it back up you must resign the app to have in install successfully. Do a google search for Stericson's apk sign application (its over on xda forums). I usually prefer the first way, but have also done the second method and it works as well.
yetis - yeah, same place you were getting stuck. let me know what your results are for the jl5 attempt. i tried with both the jl4 stock and ginger clone apk's this morning, all with the same results.
nomad - thx for the heads up, i am admittedly a novice in the android world, but have been in IT for years and am a self professed computer geek. With the apkmanager posted earlier in this thread, it will do all of the uncompiling and decompiling for you, as well as signing and a ton of other things written into the script, all based on user choices. it does warn about signing system apps after recompile, unless you want to resign all of the other system apps. Never had a problem with the installing of the modded phone.apk, just push it to the system/app folder and reboot, and the last one i did worked flawlessly without and fc's, but did not fix the problem of the ascending ringer.
Yetis, I was over reading through the thread on this in the i9000 forums, and I dug up some information that might help us here. I'm away from my pc so can't verify any of this right now.
-Make sure the rom is deodexed.
-Delete the line that matches what was posted earlier, I think it was the first one in that script, not the one way down at the bottom, leave that one be.
-When recompiling, set the compression in apk manager to 0 (not sure how to do that without the program in front of me)
When you go to push the file, put your phone in airplane mode first, push, then reboot.
Let me know if any of this helps, good luck.
Ginger Clone's of the World Unite! Via the XDA App

[Q] Help Me Modify Some Framework Files Please

I definitely wouldn't call my self a noob but also would never call myself a programmer or a pro by any means. I can change the framework-res.apk with out any problems and am getting the hang of different theming from messing around with that. I have read just about every tutorial that I can get my hands on too but haven't found anything regarding com.htc.resources.apk. The are files in that apk that I want to change but every time I even change the smallest png in there when I push with adb or droid explorer or simply copy and paste with root exp I get bootloops no matter what. I've tried signed unsigned nothing seems to work. If it matters Im running CMYLXGO's HD build on NAND. And I've been told that com.htc.resources.apk is a "sensitive" file but based on others themes and build I imagine that there has to be a way to modify it. So please any advice or ideas are very welcome...thanks so much in advance.
+1
I can replace com.htc.resources, BUT millions of FCs
Even if I replace it with the original file!!
Can somebody help us?
I think you need to set permissions

[DEV][20.11.2011] Android Gingerbread SIP over 3g for (probably) every GB based rom

Here is a bit of why I wrote this manual:
Back at December 2010 Paul from modaco found how to enable sip over 3g for the gingerbread native client, his original thread is here:
http://android.modaco.com/topic/327770-using-gingerbread-internet-calling-sip-without-wifi/
For chefs it is probably straight forward how to use this tip, but for me I always begged for cookers to include this in their roms usually they didn't even replay to my request, so I investigated this, and here is very easy way to enable this feature.
This guide assumes you are a little familiar with changing files on your ROM.
*I take no responsibility for this guide, use it at your own risk
So, what we are doing is modifying the framework-res.apk from from our framework directory.
We need:
apktools from here: http://code.google.com/p/android-apktool/
Two files are needed, this: http://code.google.com/p/android-apktool/downloads/detail?name=apktool1.4.1.tar.bz2&can=2&q=
And this: http://code.google.com/p/android-apktool/downloads/detail?name=apktool-install-windows-r04-brut1.tar.bz2&can=2&q=
(You can also do this for Linux and Mac, this guide will use windows)
Take the framework-res.apk from your ROMS zip file inside /system/framework directory.
How its done:
Extract both files that you downloaded to c:\apktools (can be any dir...)
You should have 3 files.
Copy the framework-res.apk to the same directory: c:\apktools
start --> run --> cmd
c:
cd \apktools
apktools d framework-res.apk temp
Now a folder named temp will appear named temp
inside temp, edit the file: C:\apktools\temp\res\values\bools.xml
I use notepad++, search for a line:
<bool name="config_sip_wifi_only">true</bool>th
change in the line the "true" into "false"
save the file.
go back to cmd
c:
cd \apktools
apktools b temp temp.apk
Now rename your original framework-res.apk to framework-res.apk.zip
open it with winrar/winzip/7zip it will open like regular archive.
take the file that was created by the build process:
C:\apktools\temp\build\apk\resources.arsc
Use this file to replace the file inside the archive of framerwork-res.apk.zip (overwriting the original, inside the zip)
rename the file back to framework-res.apk
And now you have a sip over 3g enabled framework-res.apk.
There are few options to push this file, easiest is just replace it in your ROM zip and flush the ROM, you need to wipe cache and dalvik cache.
There are other ways to push this to your rom but I won't discuss them here.
I used this on stock roms, AOSP roms, MIUI roms and Sense roms, worked for me on all, if you find a roms it doesn't work on please report.
Thats it, its actually quite easy.
You are Awesome! Thank you for posting this. I just setup my phone with this and it works great.
Great Process, a few little remarks
Shalom,
This is a great process tutorial and within 15 minutes I flashed my HTC Sensation to support Internet calls on 3G/4G, while before it was WiFi ONLY.
So now, no need to have any cellular minutes purchased, have DATA have LIFE.
Remarks:
1. Have only 2 files. You mentioned 1 download and then 2 more. The 1st is duplicated withing the 2.
2. The BAT file is apktool.bat and not apktools.bat.
Other then that, SWEEET.
Toda Raba.
Easy
---------- Post added at 04:29 AM ---------- Previous post was at 04:11 AM ----------
HTC Sensation T-Mobile.
Forgot to mention earlier.
Thanks.
HI
tryed not working stoped at temp file cretion is showing an eror cant go further plz help
Does this change your phone to use 3g to make calls? If so that is excellent.
Sent from my Sabotaged Droid Incredible 2.
Thanks, but why don't we use SIP third-party such as Sipdroid, 3CXPhone...? I think they are easy to use.
Nice work , What about Xperia Lines, will there appear 3G video calling button ?
I tried on Wet Dreams 1.3.0 for Atrig 4G and didn't works (Didn't show SIP Calling option)... maybe my mistake or isn't working with Moto's 2.3.6 build. But I asked to be added by the chef! Thanks for this tip!
If SIP options are not present in your Settings.APK it may have been disabled by the carrier.
The solution is to place the proper permissions file into /system/etc/permissions/ which will enable SIP overall on your device, then of course to this fix as well.
Solution found in various other places, just thought I'd add it to this thread since the thread is linked from the homepage.
Nice, surprisingly easy, almost to much so lol
lotherius said:
If SIP options are not present in your Settings.APK it may have been disabled by the carrier.
The solution is to place the proper permissions file into /system/etc/permissions/ which will enable SIP overall on your device, then of course to this fix as well.
Solution found in various other places, just thought I'd add it to this thread since the thread is linked from the homepage.
Click to expand...
Click to collapse
Thanx.
But it didnt work for me, and still not seeing sip settings.
I plased the attached file in system/etc/permissions, rebooted.
Also tried to fix permissions, and still didnt work.
Please Help
Verizon Motorola Droid 3
Stock deodexed Rom, Android 2.3.4
BTLINU said:
Thanx.
But it didnt work for me, and still not seeing sip settings.
I plased the attached file in system/etc/permissions, rebooted.
Also tried to fix permissions, and still didnt work.
Please Help
Verizon Motorola Droid 3
Stock deodexed Rom, Android 2.3.4
Click to expand...
Click to collapse
Then the options probably just aren't there in your carrier's Rom. They were present in my LG Rom, after I pushed the permissions file. However, when I tried to use SIP, it would force close as soon as the call connected... something else missing.
In my case and yours, the answer is to use SipDroid from the market.
Pls any guide on how to do this in ICC ROMs

[GUIDE]How to make a custom rom?Custom ROMs explained[UPDATE:20-3-2012]

Hey Guys,
I am going to explain some of the files in a custom rom,the small and easy to mod files because the aim is to educate newbies and NOT advanced devs.
Ok,So,I have seen a lot of questions being asked nowadays about making custom roms.This guide is NOT about building a custom rom but about editing and modding it.I am doing this guide taking CM7 as base,not stock,so there might be differences between the roms you choose to mod.Also,I am prone to mistakes here and there.If i made any,please comment about it and i will remove it.Also,please feel free to give your suggestions about making this guide better
What you would need:
Notepad++
WinRar or any other zip/rar manager like 7zip or WinZip
If you want go advanced,you would also need these things
Cygwin
Smali/Baksmali
APK Multi tool or anything like that,i dont care
And most importantly,a brain and eyes(So,Dont ask me stupid questions like,how de fuk du i xtarct? and then in brackets,sorry for my english)
GUIDE:
So,first up,download a rom of your choice(Dont forget to get the permissions for modding from the developer) and extract it.When you extract it,you will see 2 folders and 1 file,it varies.It depends on the contents of the rom.
The folders are:
1.META-INF
2.system
The file:
1.boot.img
So,
Open up system and the first folder you are going to see is 'apps'.
As you already see,this is the place where all the apps go,for the history.You might also see some .odex files below the apps.So,if you remove an app,you should delete the odex file too.If you want to add an app,just drag and drop Take care not to delete each and every app you find,because each of them has their own functions.Also,if you delete contact.apk and replace it with a better dialer like Exdialer,you wont be able to add or delete contacts.So,there are some files better left alone.
If you want to know how to merge them,then use google,there are a lot of tutorials on deodexing.If you want to edit an app,then use APK multi tool,again please use google,lots of tuts on this one too.
Also,you will find an app here and its a main one,systemui.apk By editing systemui.apk,you can get transparent status bars,transparent notification bars,centre the clock.Things like that.The idea with which you edit Systemui.apk and framework-res.apk,thats how your rom is going to look like.These files handle the visual things and they are awesome too.For some systemui mods,refer HERE
Now,some apk files are lib-dependent,meaning,they need certain lib files to work,a few examples are,Swype keyboard,now,swype wouldnt work if this lib file is not included in the rom,libswypecore.so,so if you remove swype,remove this lib file also,because its just a wastage of space and it doesnt do anything.Another example is DSP Manager in Froyo,in GB,it works native,no need to add any applications,but in Froyo,if you add DSP Manager,there are a few lib files that you should add to get them to work.
Next,the 'bin' folder,this guide is aimed at the noobs,so nothing about this,this is a bit advanced stuff,so sorry.
Next up,the 'etc' folder.There are a lot of things that go here.I wont be going to full details for the moment because i am having exams,so no time.However,i will be explaining the easy to explain files.
One thing you will notice is the 'init.d' folder.If you want to add any script like LagFree v2,just put the files of the init.d folder in the script's folder here,nothing else.You dont need to copy any other files like META-INF.
Another file,is CHANGELOG-CM,just as the name suggests its a file giving you changelogs
Another file is NOTICE.html..Its just a file showing copyrights and all that stuff.You wouldnt need to edit that,would you?
Will add more about the other files soon
Next,the 'fonts' folder..You guys need an explanation for that??
Next,'framework' folder.Here you will find framework-res.apk(Obviously,duh...).I wont tell about any other file because this is aimed at new users,not advanced guys.Framework-res is where all the icons in notification bar are.The battery icons,they are all in framework.Also,lockscreen icons
go here..Most of the icons.If i have to start on anything.It would take me weeks,theres so much to write about framework.Also take care not to mess up the framework.Because its like the skeleton(thats what i know ) of a rom.If a framework is incorrectly configured,the rom wont boot.So,keep that in your mind always when you edit framework.
Next,the 'libs' folder,This guide is aimed at newbies,so not touching this part.
And comes 'media'..Most probably you will find 2-3 folders here.Audio,bootanimation.zip and wallpapers.
If you want to change the default,its in build.prop,not here,i will explain that later.If you need to add some audio,its just drag and drop,nothing much,just put them in the right folders,like alarms,ringtones and notifications
If you need to add wallpapers,reszie the pictures to 640x480,thats the resolution that works for ace.Also resize it to 107x80 and save it as another pic with a _small at the end.For eg,the default file is defaultwallpaper.jpg,you make another pic with 107x80 called defaultwallper_small.jpg.
Then,theres the bootanimation.zip..However way you change this thing.Always name it bootanimation.If you want to know how to make a boot animation,then refer freeyourandroid.com
Next up is 'tts' folder..Sorry but i dont know much about this folder.I think this folder contains the languages for the tts app but i am not sure about it.Same goes for 'usr' and 'wifi' folders.But since this thread is aimed at newbies,i dont think there wouldnt a point in writing them up anyway
Next up is build.prop file.Open it with notepad++...build.prop file is pretty self explanatory.
Here you can change the most basic things like the android version that setting shows..Wondered how people are making 2.3.4 look like 4.0.3 in settings??Its build.prop.Also,you can change what 'About phone' shows here.
Other things,you can change things like,how long your wifi scans,how much battery your phone saves while in sleep,Dalvik VM heapsize and default ringtones.If you are wondering what # stands for,it signifies that,that particular tweak is not running,so you can take out the # if its a tweak you like.You could also use it say things like,Additional build properties.You could make it #AdditionalBuildProperties and go to the next line and give your tweaks there.Some build.prop tweaks can be found in slaid480's thread in Galaxy Ace S5830 titled "[MOD]Build.prop tweaks for SGA" or you can go to freeyourandroid.com and find some tweaks there,however the tweaks listed there are universal,so practise caution when playing with build.prop
Now to boot.img..Theres an awesome guide about this in freeyourandroid.com Please have a look at it,because there are lots to write about this one.This is where Cygwin comes in,for instructions on unpacking and repacking and commands and info about boot.img,referHERE and HERE.My summarized version,boot.img is where you can replace kernels.This is where you can make those low-level changes
Then,to META-INF folder.You would find lots of folders here but the file that you would edit consistently is update script.Find it and open it with Notepad++..Unless you edited xbin and bin files,this is not hard to do..Just change around ui_print to what you like.Dont touch anything else if you dont know what you are doing.If you DID edit xbin or bin files,you would need to touch advanced things like symlink tagged ones(I had to give them some sort of a tag)
Updater-Script References and notes:
Now,the updater-script is not something that you should mess around with,a single line of error in the script could get you in trouble.You might also have heard these words,Amend and Edify and wondered what they are,well Edify is the language with which Updater-script is written,while Amend is the language with which Update-Script is written.Now,As far as i know,Ace does NOT support Update script,it just supports Updater-script,so if you are working with kitchen,dont forget to swap the files in META-INF with the the updater-script provided by ketut.kumajaya in Blackhawk thread.So,you should learn to study updater-script of roms and patches before you mess around with them,especially patches here...Now,for example,I made a GPS patch that replaces hw folder in CyanogenMod with my patch.Now,i tell the updater script to delete the hw folder in lib and make another one and put my files in there,you,a normal user will flash it and it would work,but a rom maker without seeing that i have told the updater script to delete hw folder,adds my lib files to the existing lib files,which causes the rom not to boot.So,study the updater-script of patches and see what they do before you jump in and start doing things your own way and mess things up.I will write down a few updater-script commands here and what they do for your convenience now.Here you guys go with it:
mount-mounts a filesystem
is_mounted-checks if a filesystem is mounted
unmount-Unmounts a filesystem
format-format a filesystem (duh..)
delete-Deletes a single file
delete_recursive-Deletes a folder and all of its contents
show_progress-Display flash progress
package_extract_dir-Extract all the files present in a directory to a specified directory
package_extract_file-Extract single file from directory to specified target
file_getprop-dont know much about this one
symlink-Unlinks any existing symbolic links before creating the new symbolic links.
set_perm-Sets permissions for a file,note you dont write rw-r-r here.Its the numbers,for example,for root access,you write 777(right?),not anything else
set_perm_recursive-Sets permissions for a full directory,for example,if you specified a folder,permissions for the folder and all files in it will be set.
getprop-This function returns the value of the property specified. This is used to query platform information from the build.props file.
write_raw_image-Writes a raw image into a partition
apply_patch-Applies patches to a directory -_- (dont you guys understand it just by reading that? )
apply_patch_check-Checks if a file can be patched or if they have been patched
apply_patch_space-Checks if there is enough space to apply a patch
read_file-Reads contents of a file
sha1check-If only data is specified, then the function returns the sha1_hex string of the data. The optional parameters are used if you want to verify that the file you are checking for is one of a list of hashes. It reutrns the hash it matches, or returns nothing if it doesn't match any of the mentioned hashses.
ui_print-It outputs a message to the users while flashing.So,if you see something like 'This is so awesome',know that its not such a big deal and that its just a line of editing here
run_program-Runs a program
ifelse-This is the if-then construct of the Edify scripting language. The truecondition or falsecondition arguments can be a single edify command or a script block. Script blocks can be formed by enclosing the parameter with parenthesis, and seperating the commands with semicolons
abort-duh..it aborts script execution
assert-If condition evaluates to false, stops script execution, otherwise continues processing.
Thats it,dont worry after seeing all these commands.You wont see them all in most of the roms.Here is a list of commands that you usually see in a updater-script.
ui_print
mount
unmount
delete
delete_recursive
package_extract_directory
symlink
show_progress
set_perm
set_progress
set_perm_recursive
getprop
run_program
assert
Now on making it a flashable zip,archive them to a zip file.Get a signer here: http://forum.xda-developers.com/showpost.php?p=6050996&postcount=2
NOTE:Signing is not necessary
The instructions on using that are given with it.Just rename it back to the name you like after signing it.
Thanks to everyone.Especially,freeyourandroid,XDA and TeamCooper and all members of XDA developers and to me (well,you are the one who does that,remember that button Jk )
Hope this helped you guys..Again,this is a thread aimed at educating the new members,not advanced guys.Sorry if i missed anything or made a mistake..Please give me suggestions on this too.Will add more info to this thread when i have the time[/SIZE]
good guide
Looks good
Very helpful.
Fix those grammatical errors !
*grammar nazi alert*
Herpderp Adreno + Tegra.
gOOD guide overall but you shiould make it more advanced
EmoBoiix3 said:
Fix those grammatical errors !
*grammar nazi alert*
Herpderp Adreno + Tegra.
Click to expand...
Click to collapse
Aah....grammar hitler
slaid480 said:
gOOD guide overall but you shiould make it more advanced
Click to expand...
Click to collapse
Yep..I know that..I will work on it but i dont have much time now
This is a great guide , it'll help me a lot ^_^ thanks.
Great tut dude
Is an update needed??I dont think so because it didnt even stay on the front page for a day
Awesome guid please add some more advanced features and custom rom building guide also if u can. :thumbup:
Sent from my GT-S5830 using Tapatalk
The bad effect will be more and more new custom firmware which is actually just a re-branding
ketut.kumajaya said:
The bad effect will be more and more new custom firmware which is actually just a re-branding
Click to expand...
Click to collapse
What???I dont get you
mor_1228 said:
Awesome guid please add some more advanced features and custom rom building guide also if u can. :thumbup:
Sent from my GT-S5830 using Tapatalk
Click to expand...
Click to collapse
I will add them by tonight or something like that when i have time..Not much time now,stupid exams Oh,i hate them
Originally Posted by ketut.kumajaya
The bad effect will be more and more new custom firmware which is actually just a re-branding
Prawesome said:
What???I dont get you
Click to expand...
Click to collapse
Click to expand...
Click to collapse
i got what he is trying to say.
he is saying that due to rom building guides noobs will also learn how to build custom rom but they may not have that knowledge skills to make a distinguished ROMS they will be building common roms with little or no difference, difference will be only that different people will release rest things will be kind of same only no drastic changes.
hope i am right
mor_1228 said:
i got what he is trying to say.
he is saying that due to rom building guides noobs will also learn how to build custom rom but they may not have that knowledge skills to make a distinguished ROMS they will be building common roms with little or no difference, difference will be only that different people will release rest things will be kind of same only no drastic changes.
hope i am right
Click to expand...
Click to collapse
Maybe..But i am tired of questions on building custom roms..Recently,there were a lot of questions on building custom roms
Yeah.. i'm a newby become smarter... thx for share...
Sent from my GT-S5830 using xda premium
I will add more info about the boot.img and framework-res.apk tonight
Nice work, thank you
If you have time, can you please post a guide on how to sign APK files?
For example, if i want to edit an icon of an app, i change the icon in the .apk but then i have to sign it, how can i do it?
On the net i found lots of guides and programs but none of them worked for me...
Anyway good work

Can't decompile SecSettings ApkTool

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

Categories

Resources