[Q] How to create odex from apk? - Nexus 5 Q&A, Help & Troubleshooting

I've done a lot of searching for how to odex an apk and the only way I could find involves downloading a binary called "dexopt-wrapper" from a file host or attachment. I don't think it's a really good idea to run unverified binaries downloaded from the internet as root ...
Does anyone know where this program comes from, if the source code is available or how to build it?
Is there any way to create an odex using AOSP tools? I know there is a file in AOSP called /system/bin/dexopt but I can't figure out how to use it.

Related

Modifying a ROM

Hi guys, I was wondering how you would go about personalizing ROMs for your own use. Nothing code-wise, but installed programs and such. Opening up the zip files of downloaded ROMs I see the apk files and the system apk files - is it really as easy as just removing those you don't want and plotting in the ones that you do?
If this rom is from the same board as you, can say so.
But, .. you still need to run a linux terminal the code to sign the package that you previously made with same special files..
Just the search tools and you'll find it!
...You can easily too start porting rom's too...

[Q] Extracting source from APK

Hi, I am trying to get the source code of the ToggleWidgets.apk that cames with my Motorola Defy+. I already read many things (since I am new user, I am not able to post outside links) but I was not succesful on doing it. What I did so far:
Copied the frame moto-res.apk, framework-res.apk, and blur-res.apk from my Rom.
Installed it on the apktool, apktool if ...
Runned apktool d ToggleWidgets.apk and it was correctly extracted into the dir ToggleWidgets
Now I was expecting to find a classes.dex file. But there is not, and I got stuck. If someone knows what should I do, or a link with things to clarify, I would be thankful.
I just renamed one of my apps with .zip and opened it, and the classes.dex file was in there. not sure if that helps or not.
@ronaldguilmet: It was the very first thing I tried. Interesting that in my case the file present. Thanks!
I guess the class files generated with the Android SDK uses obfuscation through Proguard. I think you cannot disassemble it.
PS: If you approved the previous answer please click on thanks.
thgramos said:
I guess the class files generated with the Android SDK uses obfuscation through Proguard. I think you cannot disassemble it.
PS: If you approved the previous answer please click on thanks.
Click to expand...
Click to collapse
I do not know why ToggleWidgets.apk does not include classes.dex file. But when I tried different applications, I could get the source code using dex2jar, and then jdgui.
eduardomucelli said:
I do not know why ToggleWidgets.apk does not include classes.dex file. But when I tried different applications, I could get the source code using dex2jar, and then jdgui.
Click to expand...
Click to collapse
did you manage to deodex it? if so, can you tell me how? I've tried differents methods with no success. My ultimate goal is to be able to use the Toggle Widgets in a custom ROM like CM9, I don't even know if this is possible without using the motoblur launcher. Could it be that you are trying to do the same thing? it's just that I like those widgets so much and I would like to keep them in a different ROM.

[Q] Find core/java/android/view/Surface.java

Hello,
I would like to know, how its is possible to find, for example the file core/java/android/view/Surface.java .
Sorry for that noob question, but I am really interested in Android Software Developement and when I look at the github-profiles of others I always find those directories and files, I do not find on my system.
I tried using the baksmali tool and baksmalied my framework.jar . Then I found the file /framework/android/view/surface.smali but there are mostly completely different commands, so I think, there must be another tool that can edit the framework.jar in another way.
I would be very thankful for help.
AFAIK, what your looking for is in source, so once a build is compiled, you will not find that file(or folder structure). When you decompile framework.jar, you will find mostly smali files, which makes looking at the code give me headaches...
What are you trying to do? Is this for ICS or GB? and have you looked into setting up a repo on your computer? If you set one up, you will then find all the java source files you are looking for, but then you must compile the files you edit.
netwokz said:
AFAIK, what your looking for is in source, so once a build is compiled, you will not find that file(or folder structure). When you decompile framework.jar, you will find mostly smali files, which makes looking at the code give me headaches...
What are you trying to do? Is this for ICS or GB? and have you looked into setting up a repo on your computer? If you set one up, you will then find all the java source files you are looking for, but then you must compile the files you edit.
Click to expand...
Click to collapse
what i am trying to do, is to add some features like the rotation animation for motorola milestone 2.1 . what i already have managed, is to add ics animations and 4-way-reboot, by editiong the framework-res and framework.jar .

APK-structure

Dear comunity,
is anyone here who can tell me how to find out which files are necessary for a uncertain apk?
This question might look strange but I'm asking because I try to get an apk from a 4.0.x firmware to a 4.1.x and it doesn't work.
The apk I'm talking about is the Snote.apk from the N8010 device and this apk needs a lot of lib's and other fils to run.
So to get it run on other firmwares I need e.g. a tool that shows me which files are in cooperate with Snote. Or otherwise in which file into the apk are these information written?
This question might be helpfully for all android-users who want to find out which files are needed for an apk they want to port.
Thank you

[Q] Hacking Hardware Stumped?

I'm trying to covert a thin-client RDP system into a standalone linux system. I'd like to run a lighthttp server on it and auto-boot it to chromium (on start up).
The device comes with a crappy RDP interface and has a method for installing software UPGRADES via FTP. --- Confirmed working.
Doing some research on the web I was able to find an update package for this device. ATTACHED AS TORRENT FILE.
Using CENTOS I've tried to extract the RAMDISK but Linux doesn't seem to know how to extract the file type. I've tried a ton of scripts from xda-devs none seem to work.
I've tried just changing the system dir to see if I can get that work but it seems that the new image doesn't take to the device. I did see that the scripts have checksum info in them but not sure how to repackage or change them to adjust for the new changes.
I do see the build.prop file with a ton of ANDROID stuff and the package is APK signed. Thus I'm thinking it's an ANDROID setup. Also I see that the device is using busybox.
Any help or ideas how to get this doing what I need it?
Thanks!
chavenor said:
I'm trying to covert a thin-client RDP system into a standalone linux system. I'd like to run a lighthttp server on it and auto-boot it to chromium (on start up).
The device comes with a crappy RDP interface and has a method for installing software UPGRADES via FTP. --- Confirmed working.
Doing some research on the web I was able to find an update package for this device. ATTACHED AS TORRENT FILE.
Using CENTOS I've tried to extract the RAMDISK but Linux doesn't seem to know how to extract the file type. I've tried a ton of scripts from xda-devs none seem to work.
I've tried just changing the system dir to see if I can get that work but it seems that the new image doesn't take to the device. I did see that the scripts have checksum info in them but not sure how to repackage or change them to adjust for the new changes.
I do see the build.prop file with a ton of ANDROID stuff and the package is APK signed. Thus I'm thinking it's an ANDROID setup. Also I see that the device is using busybox.
Any help or ideas how to get this doing what I need it?
Thanks!
Click to expand...
Click to collapse
Any ideas out there?
Bump?

Categories

Resources