Apk porting (specifically motoblur) - Android Software/Hacking General [Developers Only]

I want to play around with Android and see if I can port apks.
I was always curious about motoblur and I want to try it (I have the droidx motoblur). I tried installing BlurHome.apk on an Evo using adb and logcat and it says I am missing the "xyz library" so I look in the framework and found the xyz.jar fill and pushed it to my phone. Then I did a dalvik wipe and a reboot. When I watch the reboot on logcat I see it says it is loading the "xyz.jar" file but when I try and install the apk again, it tells me it can't find "xyz library"
I used apktool to decrypt it and look at the manifest and found a library use tag telling me the xyz.jar is needed. I also see a bunch of permissions pulled from apks I do no hqve installed. Do I need to worry about those too. I know the program with crash when trying to access them, but right now I just want to get it installed to see if it will work.
Sorry I called the library xyz, I'm trying this on my phone.
Any help pointing mie to an article, guide or tutorial about porting or frameworks would be appreciated. I'll end up putting something nice together if I ever figure it out to make it easier for others to figure this out too, or at least understand what is going on when they install a ported apk.

I think I'm on the right path here. I just opened the com.motorola.blur.library.utilities.jar file from the framework (the one that it said didn't exist), copied all the code to the BlurHome.apk and rebuilt it. It installed, but didnt appear in the phone or the app drawer. Then I pushed it to the system/app folder and it force closes on start up! (yay in the right direction)
I wish I could just use the framework.jar's but not sure how to get those to work. There are a few things referenced in the com.motorola.blur.library.utilities.jar that are in other com.motorola.blur.*.jar's so i need to go digging and try to inject those aswell.

Did you have any luck?

Sounds promising how is it going?

trimeijer said:
I think I'm on the right path here. I just opened the com.motorola.blur.library.utilities.jar file from the framework (the one that it said didn't exist), copied all the code to the BlurHome.apk and rebuilt it. It installed, but didnt appear in the phone or the app drawer. Then I pushed it to the system/app folder and it force closes on start up! (yay in the right direction)
I wish I could just use the framework.jar's but not sure how to get those to work. There are a few things referenced in the com.motorola.blur.library.utilities.jar that are in other com.motorola.blur.*.jar's so i need to go digging and try to inject those aswell.
Click to expand...
Click to collapse
Hi, how have you and others been getting on? I'm on that trail myself...either some apps won't appear after installing, or force close.

Gee. I've never seen someone seek out MotoBlur before. If you get this working, I'd like to try it myself, just to see what all the fuss is about.

Related

Skinning this android!

Un so um jesusfreke if I understand all this and I'm not shure I fully do, but if I take out thr framework-res.apk un pack it edit it pack it all back up and sign it with thr sighnapk.jar utility and throw it back on my phone which has been moded with your boot recovery and update it will work....well at least in theory????? What's the worst that could happen at a failed attemtp do ya think?
worst that could happen?
brick phone. and I dont mean zack morris.
But assuming you know what everything you just typed actually does, should be fine.
VR4Stryph said:
Un so um jesusfreke if I understand all this and I'm not shure I fully do, but if I take out thr framework-res.apk un pack it edit it pack it all back up and sign it with thr sighnapk.jar utility and throw it back on my phone which has been moded with your boot recovery and update it will work....well at least in theory????? What's the worst that could happen at a failed attemtp do ya think?
Click to expand...
Click to collapse
I think you also have to re-sign all the .apk files in the /system/app folder. I just tried this last night and it all worked. I modified the default background in framework-res.apk. So now my phone is using the default background image with ugly black lines that I painted on it in gimp (see screenshot)
The only caveat is that you may have to reset the phone once you re-sign all the apks (alt+w in recovery mode). You will lose all your installed applications and data, and you'll have to re-enter your google account and password when you boot back up.
Try it without reseting, and if your phone acts weird, then try a reset and it should smooth things back out. After that point, you should be able to modify framework-res.apk without having to reset again.
The worst* that will happen is that you can't boot the phone normally. If that happens, put the modified RC30 update back onto your sd card somehow (external reader, another phone that uses miniSD cards, etc), and then boot into recovery mode and re-apply the modified RC30 update.
*I make no guarantees you won't brick your phone of course . But I can't think of anyway you would by doing this.
This isn't exactly skinning but it might help you start:
I modified the Launcher.apk so I could have my own wallpaper in the wallpaper gallery and take out the ugly stuff. Im sure you could change other resources in this and possibly other apk's as well.
I downloaded the android source from here http://source.android.com/download then slightly changed the source for Launcher.apk and recompiled it (make Launcher). My modified Launcher.apk worked fine on the emulator so I remounted my G1's /system partition as rw and replaced /system/app/Launcher.apk with my version and removed Launcher.odex then rebooted (dont forget to save the originals if you try this). So far its been working great in JesusFreke's modified RC30.
A screenshot of the modified wallpaper gallery is here: http://x8x.us/android/device.png
The signed modified Launcher.apk is here: http://x8x.us/android/Launcher_modified_wallpaper.apk
A tarball of the modified source is here: http://x8x.us/android/Launcher_modified_wallpaper.tar.gz
You can browse the modified source directory here: http://x8x.us/android/Launcher_modified_wallpaper/
The only changes I made were to src/com/android/launcher/WallpaperChooser.java and the res/drawable/wallpaper_*.jpg files.
Hopefully this will help you make similar changes on your own, at least until Google comes up with an easier method for changing skins and such. And maybe a wallpaper gallery thats not static!
Being able to do things like this are what I was hoping for when I bought the G1, sucks that they won't allow people to choose to enable root.
I just saw a detailed post from Living_Sword over at modmygphone on how to make the re-signing thing work. Thought y'all might be interested
http://www.modmygphone.com/forums/showthread.php?p=16871#post16871
JesusFreke said:
I just saw a detailed post from Living_Sword over at modmygphone on how to make the re-signing thing work. Thought y'all might be interested
http://www.modmygphone.com/forums/showthread.php?p=16871#post16871
Click to expand...
Click to collapse
Looks alot like the method you described above... umm... there any way to backup text messages yet.. iv'e got a few hundred that i'd like to keep :*(
VR4Stryph said:
Looks alot like the method you described above... umm... there any way to backup text messages yet.. iv'e got a few hundred that i'd like to keep :*(
Click to expand...
Click to collapse
It is. He took my idea and ran with it.
Re: backing up text messages.. not sure. Let me play with it a bit and get back to you
JesusFreke said:
It is. He took my idea and ran with it.
Click to expand...
Click to collapse
lol I never ran away with your idea. I acknowledge it as yours and thanked you for the idea in the original post here.
I know we are all trying to get the best out of our G1 and stealing ideas isn't the right way to go about it. Hope I cleared all misunderstandings
I didn't mean that in a bad way I saw your article and was like "oh cool! He got it to work."
just to clarify...
the default wallpapers you see in the Wallpaper Gallery activity are embedded in Launcher.apk?
i always thought it read some directory of images.
i guess that explains why the process for converting images from the Pictures activity requires crop/resizing and the gallery activity doesn't.
JesusFreke said:
I just saw a detailed post from Living_Sword over at modmygphone on how to make the re-signing thing work. Thought y'all might be interested
http://www.modmygphone.com/forums/showthread.php?p=16871#post16871
Click to expand...
Click to collapse
If i am just modifying a pic (.png) in the apk, does the apk still have to be resigned?
yes, it does need to be resigned.
Modifying Wallpaper Gallery
ive been trying to find a way to add my own wallpapers to the gallery and it seems its no easy task, isnt there a way to redirect the path to make it look in a directory? im a linux noob (especially on devices like this) so if im asking a dumb question i dont know that i am
also.. if the only route is to modify the launcher package, is it possible to add as many as you want? or is there a limit to how many you can put in/replace?
best bet is to modify the apk (i think it's launcher but it may be framework-res) but as far as i know you can only replace the wallpapers there unless you wanna try some hex edits
Apotheo said:
I downloaded the android source from here http://source.android.com/download then slightly changed the source for Launcher.apk and recompiled it (make Launcher).
Click to expand...
Click to collapse
im trying to create my own Launcher.apk so i can include my own wallpapers into the Wallpaper Gallery. Everytime i type "make Launcher" (im in the /packages/apps/ dir) it just says:
make: Nothing to be done for `Launcher'.
so i figured i would try going into the Launcher dir, then trying it... then i get this:
make: *** No rule to make target `Launcher'. Stop.
how do you compile these things? ive also tried opening it in eclipse with the android plugin but when i try to compile it tells me to fix like 300 something errors first.

Missing apps after HERO upgrade

I was wondering if anyone else was running into the problem I'm having, and if it has been covered before and I missed it in the search box earlier I apologize. I just recently tried to upgrade to JACHero2.6 and my market app (most important) along with several others are missing. The apps are automatically installed on all my other roms, it is only with hero that I end up missing alot of apps. I have a correctly formatted SD card and I did a wipe before I installed this and tried the whole process twice. If I am forgetting to do something special prior to installation or afterwards please let me know!!
darkphoenix2012 said:
I was wondering if anyone else was running into the problem I'm having, and if it has been covered before and I missed it in the search box earlier I apologize. I just recently tried to upgrade to JACHero2.6 and my market app (most important) along with several others are missing. The apps are automatically installed on all my other roms, it is only with hero that I end up missing alot of apps. I have a correctly formatted SD card and I did a wipe before I installed this and tried the whole process twice. If I am forgetting to do something special prior to installation or afterwards please let me know!!
Click to expand...
Click to collapse
you may have gotten a bad download. try redownloading it again. do you have 3 partition (fat32 ext2/3 linux-swap) if not i suggest that for jac's 2.63 also make sure you check file extensions in recovery screen. hopefully this helps
Yes I have my card that exact format and I tried using the filesystem checker in the recovery screen it said filesystem check was complete!! I'll try doing the whole process over again but I'm not sure how that would help, and it is sad too this is the best damn hero rom i've tested to date, its fast as hell!! If it weren't for my apps not being here i wouldn't be planning on a future rom update in the near future or until some big release happens.
make sure you always check md5 sum of all your hero build download
you could of had a damaged downloaded rom and this could affect your rom.
Just tried to download a fresh copy of the rom, checked to make sure my sd card was working properly, wiped and re-flashed yet my market app and the same apps I was missing before is still missing. It should be included that apps on my ext2 were coming back like they should be just not all of them, and not a few apps that I thought should be included with the rom. Is there anything I should check that I may not have yet?
I would use Root Explorer to check if the apk files are still under system/sd/app if they aren't... well, there's no way you're going to see them again unless you re-install them. You can also look under system/sd/app_s if that's there. Other than that, if you can't find it, it's not there. (If you know the exact name of the file or at least part of the apk file name, under terminal type: find "file name" (w/o quotes ofc)
You can add wildcards (*) if you don't know the exact name of the file. If the apk file is still there... well... let's just see if its there first.
I checked using terminal, I typed "vending.apk" and tried to check the dir's you specified for the apks. If they are there I can't find them, although I am a bit limited as terminal is the only app that came loaded with which to check for files. If the apk files are indeed not there then why would the apps install on their own without a problem on any other build but hero??? I must be doing something wrong right? I am open to any suggestions at this point, even using a different rom to check for something, my goal is to have this rom flashed with my apps working soon!
heres the vending.apk from jachero 2.63 you can try and adb push it to /system/sd/app_s and see if it works.
Thanks, I'll try pushing that over but I'm still worried about the rest of the apps I'm missing. Would there be anything else I could try to make it possibly fix all the missing apps? What could be causing this problem in the first place? I did notice that my sd card has an ext2 rather than ext3 part, will that cause all of this to happen? I'm still pretty lost on this. I tried going back to another rom just to make sure my apps would still all pull up correctly, and they did so it has to be something related to this most recent build of jachero, or something
welcome to the club my friend (-;
i have the exact same problem and noone was able to help me yet.
It must have something to do with Jacs apps2sd method. i read some tweets between him and cyanogen that it might be a little 'rough'.
however - it's always the same apps that are missing, in my case it's (badly enough) launcher.apk AND rosie.apk which pretty much means that i can't solve it.
i also tried everything i could with ADB - without luck. I somehow have the feeling that theres something staying on the phone even when wiping and formatting.... I'll check this through ADB this evening.
look @ my recent posts:
http://forum.xda-developers.com/search_rop.php?searchid=25731882
for previous moaning from myself ( (-; ) and discussion with others in the JACthread. Basically the last 15 - 20 posts are about nothing else (-;
I will also do some logcating today - i've already seen the errors through install (rosie.apk couldn't be parsed etc) but i forgot to save it (and the command promt only saves 100 lines or something)
h.nocturna said:
I would use Root Explorer to check if the apk files are still under system/sd/app if they aren't... well, there's no way you're going to see them again unless you re-install them. You can also look under system/sd/app_s if that's there. Other than that, if you can't find it, it's not there. (If you know the exact name of the file or at least part of the apk file name, under terminal type: find "file name" (w/o quotes ofc)
You can add wildcards (*) if you don't know the exact name of the file. If the apk file is still there... well... let's just see if its there first.
Click to expand...
Click to collapse
I have used AndExplorer and put the APK's in the sys/sd/apps and it all worked fine. Very easy to do if you don't know how to push, just reboot after.
Can someone please tell me how i can get myfaves app on any mod im burning up my minutes thanks.
jivany said:
Can someone please tell me how i can get myfaves app on any mod im burning up my minutes thanks.
Click to expand...
Click to collapse
You don't need to have the myfaves app for you myfave minutes to work. You are still calling them for free regardless if you have the icon or myfave compatible phone or whatever. If you want to manage the people just log on to mytmobile.com and make the changes there.
Hmmmmmmmm . I never realized thanks for pointing that out TurboTsi.
darkphoenix2012 said:
Thanks, I'll try pushing that over but I'm still worried about the rest of the apps I'm missing. Would there be anything else I could try to make it possibly fix all the missing apps? What could be causing this problem in the first place? I did notice that my sd card has an ext2 rather than ext3 part, will that cause all of this to happen? I'm still pretty lost on this. I tried going back to another rom just to make sure my apps would still all pull up correctly, and they did so it has to be something related to this most recent build of jachero, or something
Click to expand...
Click to collapse
open up your copy of the build and check in system/app_s to see if the .apks are even in the build. if pushing the vending.apk works i dont mind posting the other ones you are missing if you want to pm me or something
Just tried opening the update.zip file and verified that all the apks are there. Which makes me wonder what exactly is up. Im thinking it could be an apps2sd issue, like what was said above. I didnt have this problem with older hero roms that i can remember. TBH I could try pushing apps with adb but that wouldn't bring back my other 3rd party apps floating in ext2 limbo. So I'm out of ideas ;(
darkphoenix2012 said:
Just tried opening the update.zip file and verified that all the apks are there. Which makes me wonder what exactly is up. Im thinking it could be an apps2sd issue, like what was said above. I didnt have this problem with older hero roms that i can remember. TBH I could try pushing apps with adb but that wouldn't bring back my other 3rd party apps floating in ext2 limbo. So I'm out of ideas ;(
Click to expand...
Click to collapse
try going to the recovery console and entering upgrade_fs and that will change your ext2 to ext3 and see if wiping and flashing change anything. also if you have root explorer you can check your /system/sd folder to see if all of your third party apps are there
Just tried upgrade_fs and it gave me a "unable to allocate block" I noticed there is little if any room left on the ext2 partition. Would that cause all of this? If not would it be worth a shot to resize the partition and give it more space from my fat32 then try to upgrade wipe reload again?
If you're out of ideas, then I would attempt to resize first (but backup your fat32 first) and then see if that solves it, if not, then I would format, wipe, and update...
but are you sure those 3rd party apps are not there? Try using Root Explorer to determine if the 3rd Party Apps are there, if they are, just pull them to your sdcard and try installing them again with ASTRO or something like that.

Custom Themed ADW.Launcher

Ok, here's my situation: I made a custom themed, modified version of ADW.Launcher 1.0.1, as I have with previous versions. They will not install via a file browser & package manager on the phone or using adb. The only way I've gotten them to install is by flashing it to /system/app/, but that makes future updates impossible unless I restore my phone to an earlier state.
My question: How can I simply make this install or how can I theme an application already installed to /data/app/? I suppose signing it myself could work, but I'd have to learn how to do that.
Thanks!
you need to resign the apk. You may need to delete META-INF
http://ip208-100-42-21.static.xda-developers.com/showthread.php?t=473580
This has me very frustrated. I use Linux, not Windows. The link you gave me doesn't help. I cannot figure out how to do this, and it's ticking me off. I shouldn't have to spend hours trying to do this.
I used the following link and successfully created a signed apk, but it still won't install.
http://forum.xda-developers.com/showthread.php?t=538020
xvenom89 said:
This has me very frustrated. I use Linux, not Windows. The link you gave me doesn't help. I cannot figure out how to do this, and it's ticking me off. I shouldn't have to spend hours trying to do this.
I used the following link and successfully created a signed apk, but it still won't install.
http://forum.xda-developers.com/showthread.php?t=538020
Click to expand...
Click to collapse
I don't see why you're getting ticked off... I'm only trying to help you and you didn't even specify what os you were using.
Did you delete meta-inf before resigning? You'll also need to unistall adw before reinstalling.
If all else fails, upload the apk and I'll resign it for you
xvenom89 said:
This has me very frustrated. I use Linux, not Windows. The link you gave me doesn't help. I cannot figure out how to do this, and it's ticking me off. I shouldn't have to spend hours trying to do this.
I used the following link and successfully created a signed apk, but it still won't install.
http://forum.xda-developers.com/showthread.php?t=538020
Click to expand...
Click to collapse
Dude relax he just spent time trying to help you where no one else even bothered
Sent from my Incredible
No guys, you've got it all wrong; I'm not ticked at any of you, but at my own failure. I'm not sure why it won't work. Yes, I deleted the META-INF folder before signing it and got an output file containing a new META-INF, but the errors persisted. Having someone else do it for me would be nice, but it won't help much since I'll have to do it after every update. Thanks a lot for your offer, though.
I'll just keep trying..

[Q] APK manager help

Hey i am trying to use apk manager 4.9 but it says adb cannot be found. Im thinking this is because its been moved from tools to platform-tools. Is there anyway to make it look in there instead or is there a different solution?
Ive tried a lot of different ways to sign the apps but I cant get the app to install after i do it.
Thanks.
Copy the contents of platform-tools to tools.
worked up till a point
thanks that works. although once i get the app installed it closes (says it has stopped working).. have you had success modding apps? all i changed was one image slightly and saved it as the exact same name ect.
edit: im a retard. ignore this post

Mixzing app won't open

I updated my phone to4.4.1 today and ever since I haven't been able to open my music player 'Mixzing'. When I click on the App icon it goes to a black screen momentarily then back to the home screen without starting the app (this is the only app that it happens on)
I have wiped dalvik ect and deleted any folders that have 'mixzing' on and tried re-installing but nothing has helped.
Any ideas?
anyone?
Same here
I couldn't post my question on the corresponding Dev Thread for CM11 on i9300, but found this post for Nexus 5. Unfortunately without an answer.
I have the same problem (MixZing app doesn't open) on i9300 with CM11 nightly (Android 4.4.2). On CM10.2 (Android 4.3.1) it worked fine.
Have you found an answer somewhere else?
storchp said:
I couldn't post my question on the corresponding Dev Thread for CM11 on i9300, but found this post for Nexus 5. Unfortunately without an answer.
I have the same problem (MixZing app doesn't open) on i9300 with CM11 nightly (Android 4.4.2). On CM10.2 (Android 4.3.1) it worked fine.
Have you found an answer somewhere else?
Click to expand...
Click to collapse
Same here, no solution yet.
I made a modded version of the mixzing app to get it to launch for me:
All I did was replace the following in com.mixzing.android.SdCardHandler.getCardId()
Code:
invoke-static {v10}, Landroid/os/FileUtils;->getFatVolumeId(Ljava/lang/String;)I
move-result v4
with
Code:
const/16 v4, 0xBEEF
You should use your own random number instead of BEEF since this effectively means that you are always returning the same value for getFatVolumeId as far as the app is concerned.
Can you explain this to the developer of MixZing? So they can update the original App.
Would be nice, thanks.
storchp said:
Can you explain this to the developer of MixZing? So they can update the original App.
Would be nice, thanks.
Click to expand...
Click to collapse
They have said that they know about it. They were just taking too long for my taste, so I did it myself instead.
If you can't wait I can post my modded version if you want, but I highly recommend doing the mod yourself rather than simply trusting that my posted version does not contain any malware. It's just a good habit to get into IMO.
Never modded an App. But I'm eager to learn. Any resource (document, blogpost, etc.) I should look into?
storchp said:
Never modded an App. But I'm eager to learn. Any resource (document, blogpost, etc.) I should look into?
Click to expand...
Click to collapse
You can technically use a combination of 7zip (or another zip utility), smali, baksmali, and signapk to do this mod, however this is not the most user friendly way to do it. I would suggest using one of the following:
Here is one way, apktool (Linux, Mac OS, Windows): http://forum.xda-developers.com/showthread.php?t=2195680
The other is Virtuous Ten Studio (Windows Only): http://forum.xda-developers.com/showthread.php?t=1619473
*EDIT*
It is important to note that since this is not a system apk -- I.E. one that comes with the phone -- you will have to re-sign the apk after adding, removing, or changing any of the files inside. If it were a system apk, you could place the classes.dex file directly into the apk (which is secretly a zip file) without re-signing. (VTS does this for you automatically).
Thanks, I'll check it out.
Ok, decompiled it and found the lines you mentioned in a file called SdCardHandler.smali.
Before I change it I want to understand a little bit what I'm doing.
The method getFatVolumeId() returns the Id of a given Mount Point. It's a native method call which I guess causes the trouble here.
If I change it to a static value, does it do any harm? I mean I have an internal and external SD card. Does MixZing check both?
You should use your own random number instead of BEEF
Click to expand...
Click to collapse
Just some hex value I can think of? e.g. AEEF, CEEF, ABCD, ...
Couldn't wait, wanted to try anyway
Did the changes, compiled a new apk, signed it, but it doesn't install :crying:
When installing via the phone itself it just tells me that the App hasn't been installed.
When installing via ADB it get an INSTALL_FAILED_SHARED_USER_INCOMPATIBLE error. Need to figure out, how to fix this.
storchp said:
Couldn't wait, wanted to try anyway
Did the changes, compiled a new apk, signed it, but it doesn't install :crying:
When installing via the phone itself it just tells me that the App hasn't been installed.
When installing via ADB it get an INSTALL_FAILED_SHARED_USER_INCOMPATIBLE error. Need to figure out, how to fix this.
Click to expand...
Click to collapse
The problem is that on our devices, that native method does not exist, so we just arbitrarily use a value such that it always returns the same value (I.E. always the same card) As for the error, uninstall any applications signed by the same certificate as Mixzing was or sign your modded copy with debug keys, and it should install just fine.
*edit*
Other fun values:
DEAD, F00D, B00B, BABE, C0DE.
Thanks. A little research brought me to the packages.xml file. In there I found the shared user attribute for the MixZing Upgrader App. I was not sure if I want to edit the file. But after your tip I just uninstalled the Upgrader App and I could install the modded version.
Thanks a lot
Meanwhile they have fixed the App in the store.

Categories

Resources