Odexing problem - need technical help!!! - Desire Q&A, Help & Troubleshooting

Hi all
Just need a little technical help here
I am making a script to odex a ROM
Currently the only way of odexing a ROM is by doing it on the phone (pushing the files to the phone and executing them there)
I have made a script which will extract a ROM to a folder, odex it, and let you compress/sign/flash it.
The problem :
It seems that deoxpt-wrapper (the module which odexes the files) is a binary file and therefore can not be executed. I assume only the Android OS can use this module which is why it can not be done on computer? Does this mean that odexing can only be done on a phone?
This is the code I am having trouble with:
Code:
~/resources/dexopt-wrapper $filename `echo $filename | sed 's/\(.*\.\)apk/\1odex/'`
Any advice would be greatly appreciated.
Regards

polite bump

no-one can help?

Related

Ubuntu / Linux auto sign tool?

I have been toying with the idea of making a theme. Sounds like fun and the How To's here are really thorough (by the way, I appreciate that, those things must have been quite the labors of love).
As you can tell from the thread title, my OS of choice is obviously Ubuntu. The autosign tool sounds pretty convenient, but I notice it is for Windows. I've searched a bit, but honestly I am getting tired of thumbing through thread after thread looking for the answer and was hoping for a friendly nudge in the right direction.
Anyway, long way around to these questions:
1, when I re-sign an apk, do I use test-keys, do I create my own key, or do is that something JDK will create for me to use?
2, I don't want to create a theme that makes people need to wipe before switching, the template is up to date on the How To thread? Are there templates for JF ADP1.1, and maybe even RC8 as well? Or was there a thread I could read about taking the necessary parts of JF's update and building a template of mine own from that?
3, To actually resign an apk, you have to edit some hex code right? If there truly is NO tool for Linux, I could use some directions on where to find how to manually sign a file. Then hopefully I can find / convert / create a tool in Linux to handle the dirty work for me.
I guess this is what I get for coming in so late into the game.
Also, I am curious if anyone else creates themes in anything other than Windows... any *nix creators out there?
ok, first off to resign an apk or a zip you dont have to do any hex editing at all, in fact, to make a theme you dont have to do any hex editng.
2nd, use my default themes as in the stickies as a template to build your theme, it will not wipe.
3rd to resign in linux, which I haven't done, you will probably need the original signing tool which can be found in jf's recovery.img .zip[ he provided a while ago. I believe it is stickied on android development.
This is the command to resign them
java -jar testsign.jar >inputfile> <outputfile>
Hope this helps
Stericson
Thanks for the super quick reply
Ok, I'll give a search for "testsign.jar", that should get me in the right direction. Once I have that I guess it is time for some experimenting. It shouldn't be hard to develop a shell script that takes every file of xxx type, from a directory and then pass them as values to the testsign.jar app one by one. I had a shell script do something like this to rename all of my photos.
I resign the apk and zip files then.
Thanks Stericson, now I am off to find that testsign.jar, make sure I have the up-to-date default themes, and play around a bit.
EDIT:
SignApk.jar is a tool included with the Android platform source bundle.
testkey.pk8 is the private key that is compatible with the recovery image included in this zip file
testkey.x509.pem is the corresponding certificate/public key
Usage:
java -jar signapk.jar testkey.x509.pem testkey.pk8 <update.zip> <update_signed.zip>
Click to expand...
Click to collapse
This is what I need isn't it? I thought that sounded familiar, I had this downloaded from the whole "let's explore how to root my phone" process.
oh yea, ooops, that is right...sorry I have a custom version of the tool I use. Sowwy.
But that is right.
that cmd line will sign both apks and zips
Stericson

How to make my own rootfs.img

Enlighten me please... I want to edit the keymappings and define my own symbols and whatnot. I already found the init.etc/keymaps but how would i go about rebuilding the rootfs.img?
Thx.
How are you accessing rootfs.img? If you simply mount it as a loopback device in Linux, I don't think you have to rebuild it. Thor_Asgard listed the necessary commands needed to mount rootfs.img, if you don't know how to mount it.
How did I get into it? WinImg, or something like that. Looks like I gotta boot up some linux. HMM I could just use Rhobuntu to do it couldnt i?
Thanks for the link
andershizzle said:
How did I get into it? WinImg, or something like that. Looks like I gotta boot up some linux. HMM I could just use Rhobuntu to do it couldnt i?
Thanks for the link
Click to expand...
Click to collapse
Is it an "official" keymap update? Is it more complete or better than what is currently being used? Or even maybe a keyboard that has not been mapped at all yet? Would you like to put it in the main build, so that everyone else can use it? Contact babijoee or phhusson, they have access to update the main rootfs git!
Oh no I'd be doing this because my T Mobile TP2's ALT key doesn't work so I'd be swapping shift + letters for symbols instead of capital letters as well as including my own custom symbols like a < and > so i can text <3's to my girlfriend HAHA.
But yeah. It wouldn't be like an official thing, just tinker with which extra symbols i want on the keyboard such as < > { } [ ] | \
Hi!
I would like to make keymap for Finnish layout (only difference are FN-key combinations really). I already found the mentioned files from rootfs.img, but have a few questions:
What's the difference between rhod100* and rhod210* files?
Only place I found relevant things to change, is rhod210_microp-keypad.kcm file; what do I have to do to get the changes in use when I put the modified file back in place and into my Touch Pro 2?
Do I need to name it something different after modifications?
I'd like to submit it to general use when I'm done, so if you could just help me with these, I'd really appreciate it!
EDIT:
andershizzle said:
Oh no I'd be doing this because my T Mobile TP2's ALT key doesn't work so I'd be swapping shift + letters for symbols instead of capital letters as well as including my own custom symbols like a < and > so i can text <3's to my girlfriend HAHA.
But yeah. It wouldn't be like an official thing, just tinker with which extra symbols i want on the keyboard such as < > { } [ ] | \
Click to expand...
Click to collapse
Did you manage to create or modify files in the img file? If so, could you advise me how to do it?
"What's the difference between rhod100* and rhod210* files?"
They're just different layouts for different models. Rhod210 is based on one of the North American models, I forget which; Sprint or T-Mobile I think. The rhod100 layouts are the European ones.
"Only place I found relevant things to change, is rhod210_microp-keypad.kcm file; what do I have to do to get the changes in use when I put the modified file back in place and into my Touch Pro 2?"
You have to compile it to produce rhod210_microp-keypad.kcm.bin and put that into the rootfs. The tool to do this is only available inside the Android source. I have a compiled version of it here for Linux 32-bit, I can send you the tool or you can send me the .kcm and I can compile it for you, up to you.
"Do I need to name it something different after modifications?
I'd like to submit it to general use when I'm done, so if you could just help me with these, I'd really appreciate it!"
If you want to submit it for general use, yes, you have to name it something else. You should also submit it with a patch for the file 'init' in the rootfs.img image; look down the bottom and you can see how the keymap stuff actually works. The files are not actually used under their 'rhod*' names, if you specify in the kernel command line that you want a particular Rhodium keymap, it is copied to the filenames which are actually used. So add a little bit for your layout that corresponds to the others in there.
"Did you manage to create or modify files in the img file? If so, could you advise me how to do it?"
On Linux, you can just mount the rootfs.img file:
mount -o loop rootfs.img /mnt/some_mount_point
then edit stuff, then umount it. Dunno how to do it on Windows.
AdamWill said:
"What's the difference between rhod100* and rhod210* files?"
They're just different layouts for different models. Rhod210 is based on one of the North American models, I forget which; Sprint or T-Mobile I think. The rhod100 layouts are the European ones.
"Only place I found relevant things to change, is rhod210_microp-keypad.kcm file; what do I have to do to get the changes in use when I put the modified file back in place and into my Touch Pro 2?"
You have to compile it to produce rhod210_microp-keypad.kcm.bin and put that into the rootfs. The tool to do this is only available inside the Android source. I have a compiled version of it here for Linux 32-bit, I can send you the tool or you can send me the .kcm and I can compile it for you, up to you.
"Do I need to name it something different after modifications?
I'd like to submit it to general use when I'm done, so if you could just help me with these, I'd really appreciate it!"
If you want to submit it for general use, yes, you have to name it something else. You should also submit it with a patch for the file 'init' in the rootfs.img image; look down the bottom and you can see how the keymap stuff actually works. The files are not actually used under their 'rhod*' names, if you specify in the kernel command line that you want a particular Rhodium keymap, it is copied to the filenames which are actually used. So add a little bit for your layout that corresponds to the others in there.
Click to expand...
Click to collapse
Ok, I made some changes and renamed my new files. If you could do the compiling, I'd be very happy. I renamed them after rhod100, if that's the european model then. The attached zip contains the kcm and kl files.
Here are the rows to put in init:
Code:
elif /bin/grep -c 'physkeyboard=rhod100_fi' /proc/cmdline >/dev/null ; then
echo "USING EXPERIMENTAL RHOD100 FI LAYOUT"
cp -f /init.etc/keymaps/rhod100_fi_microp-keypad.kl /etc/keymaps/microp-keypad.kl
cp -f /init.etc/keymaps/rhod100_fi_microp-keypad.kcm.bin /etc/keymaps/microp-keypad.kcm.bin
cp -f /init.etc/keymaps/rhod100_uk_navi_pad.kl /etc/keymaps/raph_navi_pad.kl
If you could add these changes to the rootfs.img, I'd be very grateful!
hey good work guys! us CDMA guys have been desperatley seeking a verizon tp2 keyboard port. The symbols are way unmapped.... i only have windows. If someone could give me some instrucitons i'd happily try and help
Matt
Jekku said:
Ok, I made some changes and renamed my new files. If you could do the compiling, I'd be very happy. I renamed them after rhod100, if that's the european model then. The attached zip contains the kcm and kl files.
Here are the rows to put in init:
Code:
elif /bin/grep -c 'physkeyboard=rhod100_fi' /proc/cmdline >/dev/null ; then
echo "USING EXPERIMENTAL RHOD100 FI LAYOUT"
cp -f /init.etc/keymaps/rhod100_fi_microp-keypad.kl /etc/keymaps/microp-keypad.kl
cp -f /init.etc/keymaps/rhod100_fi_microp-keypad.kcm.bin /etc/keymaps/microp-keypad.kcm.bin
cp -f /init.etc/keymaps/rhod100_uk_navi_pad.kl /etc/keymaps/raph_navi_pad.kl
If you could add these changes to the rootfs.img, I'd be very grateful!
Click to expand...
Click to collapse
How did it go? Did you get a cool rootfs.img? I need a swedish keyboard layout..

[REF] Porting 2.1 (JM8) Samsung Keyboard to 2.2 (JPK)

Tools needed: smali, baksmali (google them), a JDK, and an extracted factoryfs.rfs from an éclair ROM.
(If you don't have a linux machine to mount an .rfs file to a directory never forget that your device has linux on it, so it can actually mount the .rfs file to a directory)
First collect the files you need from factoryfs.rfs:
/app/AxT9IME.apk
/app/AxT9IME.odex
/lib/libXt9core.so (this is actually the same file that's inside the apk)
/lib/libDHWR.so
/framework/android.policy.odex
/framework/core.odex
/framework/ext.odex
/framework/framework.odex
/framework/services.odex
Copy all the odex files into the same directory as baksmali is. Disassemble it with:
java -jar baksmali.jar -x AxT9IME.odex
This should create an out directory, with the disassembled, and deoptimized files. Now reassemble them, with smali:
java -jar out
This should create an out.dex file. Rename it to classes.dex, and put it into the AxT9IME.apk (don't be fooled by the extension, it's a simple zip file)
Now copy the following files to your phone:
AxT9IME.apk --> /system/app
libXt9core.so --> /system/lib
libDHWR.so --> /system/lib
Remove the following files:
/system/app/AxT9IME.odex
/system/lib/libdhwr.so (this is lowercase. The above was uppercase. Case does matter!)
Now try to enable the samsung keyboard. If everything goes well then you can now use the old keyboard.
-----
Alternatively if you needed the keyboard from the XWJM8 version, you can download the result files from here: http://android.sztupy.hu/dl/SamsungKeyboardFroyo.zip
Thank you
can I use this method in order to replace framework.jar/framework.odex from another build?
JHJP4 support proper BIDI (for Hebrew/Arabic and other RTL languages)
And how do we do the opposite? Want 2.44 on eclair =)
Should work the same
omrij said:
Thank you
can I use this method in order to replace framework.jar/framework.odex from another build?
JHJP4 support proper BIDI (for Hebrew/Arabic and other RTL languages)
Click to expand...
Click to collapse
No, framework.jar is too much different between eclair and froyo. You can only port simple applications (in /system/app) this way.
dupel said:
And how do we do the opposite? Want 2.44 on eclair =)
Click to expand...
Click to collapse
It would only work if the new keyboard doesn't use anything FroYo specific (like gesture support, or enhanced multitouch support). If it does use froyo specific api functions it will break under eclair.
sztupy said:
No, framework.jar is too much different between eclair and froyo. You can only port simple applications (in /system/app) this way.
Click to expand...
Click to collapse
Both frameworks are from Froyo
just different version
JP4 framework has proper BIDI support
omrij said:
Both frameworks are from Froyo
just different version
JP4 framework has proper BIDI support
Click to expand...
Click to collapse
If framework.jar changes then all pre-optimized files (odex) have to be reoptimized (the same way as the tutorial above shows), and even after that it might not work...
hi can I ask a few questions. I don't know much about these complicated things, but I will try my best.
can we collect files you asked us from factoryfs, through root explorer.
you asked to copy file with capital letters to phone and then asked to remove same file name with small letters. can one directory have two files with same name?
and finally how would we copy files to the phone?
thanks.
Sent from my Nexus One using Tapatalk
pitsyapa said:
hi can I ask a few questions. I don't know much about these complicated things, but I will try my best.
can we collect files you asked us from factoryfs, through root explorer.
you asked to copy file with capital letters to phone and then asked to remove same file name with small letters. can one directory have two files with same name?
and finally how would we copy files to the phone?
thanks.
Sent from my Nexus One using Tapatalk
Click to expand...
Click to collapse
You can use rootexplorer to transfer the files to /sdcard modify them on the PC, tran transfer them back from /sdcard to their location.
thanks I really appreciate your help can I ask you another simple question. I have downloaded jdk.
and installed it. how do I use these commands to disessemble, java jar. is there any special java prograame. thanks.
thanks v much. problem solved. ported urdu keyboard from eclair to jpk. thanks again.
How do I know which files from /lib do I need to replace?
I'm trying to use contacts apk from other froyo rom
So, I tried the above instructions, and all I get is errors with bksmali, but i get the out directory, then when I run smali, it get another bunch of errors, but no out.dex. Any help would be amazing.
I haven't tried any of this other than trying to just install the AxT9IME.apk which obviously didn't work. I can enable it but trying to switch to it or access its settings instantly resorts in a force closure.
What I don't think I've seen mentioned is whether or not the end result of this allows you to have both the 2.2 and the 2.1 keyboards. Could anyone clarify for me if you get both or just the 2.1 keyboard in the end?
Lastly, would it be possible for someone to write an app (downloadable via market) for this keyboard for any android version? Because that'd be pretty awesome.
It'd be nice if it didnt create an app-drawer icon, but I wouldn't mind as Go Launcher allows me to hide unwanted apps.
I honestly like the 2.2 keyboard, but the 2.1 one (with its 4 pages) has symbols in on it that I have seen no where else, which is pretty cool and why I'm wanting it.

[Q] Prerooting guide - tutorial ?

There is any user which could share knowledge how to make pre-rooted ROM ?
I have enough time to prepare it for all regions. But haven't knowledge at the moment.
Waiting for some help and information
Thx
przem00 said:
There is any user which could share knowledge how to make pre-rooted ROM ?
I have enough time to prepare it for all regions. But haven't knowledge at the moment.
Waiting for some help and information
Thx
Click to expand...
Click to collapse
Ok I need only one information.
I going to create repack of system image by command :
./make_ext4fs -s -l need correct size -a system newsystem.img folder where mounted system image
Someone could tell me this image size ? 1500M or 1572864000B which are correct ?
After this answer, I will prepare full pre-rooting guide.
Thanks for taking time off to do this.
You should ask the OP of this thread: http://forum.xda-developers.com/showthread.php?t=2375527 for some help, or you could examine his pre-rooted ROMs to get an idea of what size you need

[Q] Updater-script can fix setting permission ?

Hello everybody
I've made a ROM kitkat based on a the stock one ( yes, i'm very proud of it ^^), but when I go to Setting>Sécurity, setting stop immediatly... i've read somewhere that I should whrite in a terminal "su"," mount blablabla... "," chwod 0644 blablabla... " but it didn't work, it say that there is no directory...
I've try to fix this whis the updater script and the command "set recursive perm" but it didn't work too...
There are another solution ?

Categories

Resources