I'm not a developer myself, but I had one create me some software to output apks for live wallpapers using video. Still had some bugs in the resulting apks but didn't seem like was going to get any further in getting them resolved so I just ended the project figuring that I can probably get someone else to fix it later.
So right now I'm wondering, would sending the apk (that came from my software) to another developer be enough for them to locate the bugs and optimize the individual apk. Which whatever actions were needed will be noted and have either them or someone else implement them into my current software. (I'm assuming the source code is in the apk itself)
Related
I like many other have been experiencing Force closes on Google Play Music, Movies, and YouTube after the latest updates on ICS based roms. I have seen people report experiencing this problem on Stock, Liquid, AOKP, and CM9 on various devices. I myself have wiped data and even tried it on a completely fresh rom install from what I could tell there were no files on my SD card generated from previous versions of Google Play Music that would cause the problem. On my regular rom I uninstalled and wiped any existence of the old version multiple times. When I place the widget on my home screen it'll shuffle and play through my locally stored music on my sd card (not pinned music actually music I copied my self). It seems to be wanting to display an element but that it doesn't exist so it crashes.
I reported the crash inside the Stack trace it includes the error:
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.google.android.music.activitymanagement.TopLevelActivity}: android.view.InflateException: Binary XML file line #6: Error inflating class android.app.MediaRouteButton
Here is a logcat for the Google Play Music FC as well http://pastebin.com/VP2cSmN1 It seems to be the same exact bug that causes YouTube to crash although the Play Movies is a slightly different but similar bug from what I can tell.
I think more people are needed so that this bug is noticed and fixed. I created a thread on the Google Support forums here I encourage everyone that is having this problem to make a post so that it is noticed and fixed.
https://productforums.google.com/forum/#!msg/mobile/a6u2tK6a49g/-Juju-8C9vQJ
Please post in this thread if you are having this problem or if you have a solution to the problem. Now obviously the easiest solution would be for Google to update all the apps with a fix but possibly the problem could lie with the individual custom roms. Any information that anyone has on these issues would be welcome and needed to get this problem fixed.
EDIT: Here is the old Google Play Music APK to downgrade. http://forum.xda-developers.com/showthread.php?t=1533816
EDIT: After a little research I found this in the documentation for Android and apparently it's a class that is only found in Jelly Bean which brings me to the question why is it trying to use it on an ICS rom?
http://developer.android.com/reference/android/app/MediaRouteButton.html
EDIT: Raeled found out if you remove the res/layout-v16 folder from the apk file the apps no longer force close. The Movies app had an additional res/menu-v16 folder I had to remove. Keep in mind I don't know what side effects this will have on the apps but so far from what I have seen they work fine however I haven't rented any movies. Also because these are modified with an APKTool the signature was broken so you will have to uninstall your older versions to use them and I don't think you will be able to install any updates from the Google Play Store since the signature won't match. Anyways at least a solution until Google can fix the problem or our custom rom developers can find what causes the apps to want to use the Level 16 API.
EDIT: If you're a rom developer you can fix this problem in your rom by applying this change and recompiling from source. Explanations of why you need to do this can be found below.
https://github.com/aospX/platform_build/commit/a34ffcecc7c237ac9c9e263984f6a74d3a7c3831
I'm on AOKP and having the same issue. Would very much appreciate a fix :fingers-crossed:
Thanks for posting hopefully we get more attention to this issue!
I am using EOS ICS (4.0.4) on my Xoom 3G and aospx ICS on my Desire HD and was experiencing the FC's on both of them.
Have been doing some experimenting on altering the APK to get it to work on my device. I've been using APKTool to remove the "\res\layout-v16" folder from the APK. That seemed to do the trick and the modified app seemed to run fine on both the devices.
This raises the question for me why "layout-v16" would get used at all in the first place as my limited Android knowledge tells me it should not be used on API 15 (4.0.4).
I'm not completely sure what this all means but to me it looks like the devices are telling the apps that it is running on Jelly Bean while it is actually not.
Would you be able to post your modified apk files?
EDIT: I was able to do it however if you know how to do it without breaking signatures so that they can just update over the other apps that would be great.
Altering the APK without breaking the sign should not be possible. Even if it was we'd probably need to "fix" every new version anyways.
I have been looking in the android documentation and the resource should indeed not be used according to the specs on the Android development website.
To test further i have created a simple APK file (attached) that will print out the current API level. It also has to "res\layout" and a "res\layout-v16". When i run it on my device it will (just like music apk) select the v16 resource while the API level is 15. When i ask the API level using code it correctly reports 15.
Also changed folder to "res\layout-v17" quick just for a test but then the devices didn't pick this resource. So it will correctly skip API 17 content
So it seems the system does know it's API 15 but will still get API 16 resources.
If the case is that the problem is in the custom roms and the official ICS roms do not have this problem i think the change that Google is gonna fix this is pretty low.
Raeled said:
Altering the APK without breaking the sign should not be possible. Even if it was we'd probably need to "fix" every new version anyways.
I have been looking in the android documentation and the resource should indeed not be used according to the specs on the Android development website.
To test further i have created a simple APK file (attached) that will print out the current API level. It also has to "res\layout" and a "res\layout-v16". When i run it on my device it will (just like music apk) select the v16 resource while the API level is 15. When i ask the API level using code it correctly reports 15.
Also changed folder to "res\layout-v17" quick just for a test but then the devices didn't pick this resource. So it will correctly skip API 17 content
So it seems the system does know it's API 15 but will still get API 16 resources.
If the case is that the problem is in the custom roms and the official ICS roms do not have this problem i think the change that Google is gonna fix this is pretty low.
Click to expand...
Click to collapse
Yeah basically the Google Guy basically said our custom rom people need to fix it which is probably true however in my mind they could just as easily make a separate ICS APK like they have a separate APK for Gingerbread not a hard thing to do. But I hope that you're able to find the root of this problem I don't really have enough experience with this to know how to solve it in the rom. But you are saying that if there is API 16 material in the Apps it will pick it up and use it no matter what app it is?
I've used the android SDK to create 2 ICS Virtual devices. (4.0: API 14 and 4.0.3: API 15). These devices resolved the resources as they where supposed to do. After that i installed the Google Play Music app on them and also those worked perfectly fine.
The change that google is gonna fix this is next to none. The APK is not in error here. If they do this fix then they'd be saying that the specs are "more like guidelines"
And yes, this problem will spread to every app that will use API 16 only functionality in an API 16 only resource.
Yeah I've pretty much come to the conclusion that there is something wrong with the actual roms that need to be fixed by our developers! Just the root of the problem needs to be found.
The following are speculations as i messed up my Xoom by testing it. So use caution when trying to do what i did.
After some exploration in the Android source i found that the resource manager (the component that is responsible for loading the "res\layout", a.o.) is initialized not by using the "Build.Version.SDK_INT" (this has the correct value of 15), but by another property "Build.Version.RESOURCES_SDK_INT". This can be found in the source at: "\core\java\android\content\pm\PackageParser.java" (line 497 & 712).
Moving to source at "\core\java\android\os\Build.java" (line 120) we find out that "RESOURCES_SDK_INT" is based on "SDK_INT" but adds +1 if "CODENAME" is not equal to the value "RES". A few lines up we see that codename is read from the "ro.build.version.codename" key in the "build.prop" file. In the roms i use this value is "AOSP" so this means the resource sdk version gets +1 and will start to prefer Jelly Bean resources.
I tried to modify my "build.prop" file but this caused my xoom to not get past the boot animation. So once more: be carefull
doesn't this mean it should be 15 instead of aosp? This other rom theirs has the value of REL they claim not to have the same issue we are having but I can't confirm this.
Oh by changing this for whatever reason it thought apps weren't there and decided to wipe a bunch of the app data... I just backed up the system so that was awesome!
Sent from my ThunderBolt using Tapatalk 2
Link_of_Hyrule said:
doesn't this mean it should be 15 instead of aosp?
Sent from my ThunderBolt using Tapatalk 2
Click to expand...
Click to collapse
The "ro.build.platform.codename" is automatically set by the flag PLATFORM_VERSION_CODENAME in build/core/version_defaults.mk when compiling from source..Which =AOSP stands for development build and REL is release build. But by changing PLATFORM_VERSION_CODENAME := REL this does in fact fix this issue as Raeled suspected (tested by installing latest Google Play Music and latest YouTube, both work fine now.. )..
https://github.com/aospX/platform_build/commit/a34ffcecc7c237ac9c9e263984f6a74d3a7c3831
thanks Raeled
But it requires recompiling the entire rom from source?
existz said:
The "ro.build.platform.codename" is automatically set by the flag PLATFORM_VERSION_CODENAME in build/core/version_defaults.mk when compiling from source..Which =AOSP stands for development build and REL is release build. But by changing PLATFORM_VERSION_CODENAME := REL this does in fact fix this issue as Raeled suspected (tested by installing latest Google Play Music and latest YouTube, both work fine now.. )..
https://github.com/aospX/platform_build/commit/a34ffcecc7c237ac9c9e263984f6a74d3a7c3831
thanks Raeled
Click to expand...
Click to collapse
So this means that your next rom build is going to be possible to use the google music and youtube app from the market without any problems?!?!
Link_of_Hyrule said:
But it requires recompiling the entire rom from source?
Click to expand...
Click to collapse
Correct..it seems that once compiled with =AOSP, all the system packages check this and if it doesn't return as a development platform (=AOSP) it crashes..this is why just changing it in build prop does not work..So the whole rom needs recompiled with =REL.
onesolo said:
So this means that your next rom build is going to be possible to use the google music and youtube app from the market without any problems?!?!
Click to expand...
Click to collapse
Yes, changes are already pushed to git and will be in next release.
Sent from my Inspire 4G using xda app-developers app
Well your devices are lucky to have a dev actively working on fixing this it seems us Mecha users will have to wait for a dev to come along and release a new build or new ICS rom with the fix.
EDIT: Finally got it fixed in the up coming build
can u please update to the latest yt version?
Bump
Sent from my MZ601 using XDA Premium HD app
Youtube app (v4.1.23) & Google Play Music (v4.3.615.481147):
Thanks raeld can you put up the latest version 4.1.47 to please?
Hello guys, I had an idea and wanted to discuss it with you people that you are definitely more experienced than me, I was wondering if it was possible to create a single apk which is the ROM, or this apk should include the bootanimation, and the launcher would be the apk (or rather a activity in it) ditto for SystemUI framework-res or for short, this apk should consist of the various components that make up a normal ROM, all in one file (except, I think for the folder META-INF because that is read, as far as I know, the default of any recovery, or should create a recovery made on purpose), the benefits would be many of the small size of the system, the speed, the "simplicity" of programming (think that should be programmed to a single apk with all the functions of a system and not to distribute all in many files), but then I came effettivamante doubt that this is not feasible, and so I wondered if you could do the same thing but only for apk (those contained in the app folder)
So what do you think?Is feasible?
No.
R: What do you think?
luxifr said:
No.
Click to expand...
Click to collapse
Why?
UP!! someone might be a little more precise
---blacksoul--- said:
UP!! someone might be a little more precise
Click to expand...
Click to collapse
Don't bump your own thread. Why on earth would we even want to do it? It would increase the size of the ROM, make it extremely hard to debug, and I'm not even sure how it could hypothetically work.
"Joining" all the system apps is certainly possible.
But:
-Seperate apps can be supported and updated better
-One APK with ALL THOSE THOUSENDS of Java code lines is VERY messy
-Compiling it would take long , very long - less attractive to developers
-I can think of much more, but it isn't of any use so I'll stop here.
Cy
Sent from my Galaxy Nexus running Android 4.2 JB
I'll add one other...
You'd still need an underlying file system since Android/Java are interpreted languages and require an interpreter to execute the code.
Hi,
I'm trying to build the default Email app from source.
Using the CM10.2 as base: https://github.com/CyanogenMod/android_packages_apps_Email
I used some patches, which I successfully applied, as this is the main reason of doing this whole thing
At first I tried using apktool but that didn't work out.
Currently I'm struggling with importing the necessary libs in eclipse (adt-bundle-windows-x86_64-20130917; target API 18 aka 4.3.x).
First issue is that even though I am using Google APIs i'm still missing com.google.common. Without google APIs i'm missing the whole com.google...
apparently the app has it's own libs com.android.emailcommon which are provided with the application.
I had to add emailcommon/src in the buildpath because the rest of the app was referencing it.
Problem here is under com.android.emailcommon.service.EmailServiceProxy: IEmailService cannot be resolved to a type. I'm seeing though that IEmailService.aidl exists so why isn't it seeing that interface?
I'd be gratefull for any help here.
Thanks!
bump
please help
any some hint would be nice!
bump?
hello. i am interested in how to mod an apk for offline capability.
for example, Asphalt 8 game, is now version 1.2.1b i have searched offline mods, i only find "unlimited money". i just want offline, no money, no nothing.
i have apktool, i have java development, i have signapk, i have software for apk midification. can you guys help me? either make my apk offline, or tell me how to do it?
It's not simple and depends on the app. If you're asking I suppose you have no idea how an app actually works? If so, there isn't much you can do…
Basically, you need to look for the relevant checks and modify/remove them.
GermainZ said:
It's not simple and depends on the app. If you're asking I suppose you have no idea how an app actually works? If so, there isn't much you can do…
Basically, you need to look for the relevant checks and modify/remove them.
Click to expand...
Click to collapse
i do know how apk's work, in fact i have decompiled and modified a fiew, signed and all such. but only minor stuff in resources or xml. i did not touch the smali. now the problem is i have no idea for what strings to search. except the "enable internet check" and some lines. but i suspect that's not all. because after i modified that, the building gave me 6 errors.
Hi everyone,
So the company that provides the TV channels in my country (like the cable companies in the US) has a streaming service that streams most of these channels online to phones, tablets, computers.
The problem is that their app is, according to them "not supported on hacked devices". Just so we're clear, we're talking about Android here, and hacked = root/custom rom, which this stupid company considers illegal. In some devices, they check both root and custom rom, in some only one of them, and in some the app will work even if you have both. For example, on my Nexus 4 the app worked with stock rom that was rooted. Now that I am running a custom rom, trying to hide root using various apps does not work. So obviously the problem, with my device at least, is running the custom rom.
I'm currently learning Java & Android development and have decided to use the little knowledge that I have to try to find the lines of code responsible for this idiotic check.
I looked up many tools for decompiling apps and have finally found a good one, called JadX.
http://androidcracking.blogspot.co.il/2014/03/jadx-dex-to-java-decompiler.html#links
This decompiler is excellent, but gives me a scary amount of code files to look. Even so, trying to search all of them (JadX has that functionality) for the code that checks for root/custom rom has turned up nothing. I have also tried to search for the message they give me when I open the app (about hacked devices not working) but I found nothing, again.
One more thing - a developer that also tried to solve this problem said he traced the problem back to DxDrmDlcCore. I searched it, found it a some class, but not sure what to do now (delete the entire class and recompile?)
Can someone here direct me towards what I need to be looking for?
OR
Is the solution really simple, such as editing my build.prop? Someone suggested it once, but did not know what lines to edit.
If someone is ready to step up to the challenge, I can upload the apk.
Thank you!