[WIP] PrimeUX - Samsung UX Port into Prime 1.6 - Eee Pad Transformer Android Development
Context: [DEV] Touchwiz for Transformer - xda-developers This was moved because there were no files to test.
What is this? This is based on Prime 1.6. All the samsung galaxy tab 10.1 specific files that run UX have been merged in. Then I decompiled the framework for both the TF and GT10.1, and merged in functionality into the TF framework. It has come a long way, and the launcher is usable. However, the statusbar does not come up because systemui.apk FC's.
PrimeUX: Download THIS IS NOT USABLE YET, PEOPLE WHO EDIT SMALI ONLY
You will get FC's from systemui, media, and myfiles. Media and myfiles could be avoided by leaving out more of the samsung files that fguy did not include in his. I assume it is because of the FC's.
This is meant for others to work on the systemui issue, not for any real use.
Porting Process:
Here was what I was using to decompile the framework. Drop all the files into the framework directory, then run decompile.bat and it'll all go into respective folders under an out folder. Then you can do this to the samsung framework, then diff them with winmerge or something like that.
When you find an error in logcat, search for a term related to it within Notepad++'s search in files feature. Generally, this will point you into the direction of a missing class. Then you can copy the class over into the associated TF framework file by right clicking on the highlighted missing class within Winmerge. However, sometimes it isn't so easy because Samsung and Asus have heavily modified the HC framework. Asus to add the dock functionality, samsung for the touchwiz stuff.
Tools: Decompile Framework
Good to see this happening! quick question, there isn't any resizing needing to done yea? Just smali edits?
Sent from my Desire HD using XDA Premium App
Gtj94 said:
Good to see this happening! quick question, there isn't any resizing needing to done yea? Just smali edits?
Sent from my Desire HD using XDA Premium App
Click to expand...
Click to collapse
I guess I'm unsure what you mean by resizing.
Currently it is at a point where more merging needs to happen(i think) to get the mini apps working. The systemui.apk has a major dependency on the mini apps working, so it crashes without them working.
The main problem I have is there is a FC by systemui, pointing to the mini apps as the problem. However, there is no way to find out why the mini apps aren't running. So, I don't know if more framework porting needs to happen, or what.
Hey rothnic. Great work so far. I don't envy you task of trying to merge the frameworks but you have my full support. I'm no smali expert by any means but I'll help out if I can.
I suggest keeping a healthy supply of beer at hand as smali editing drives me to drink
Ported going to interface with applications such keyboard? I do not like asus keyboard
Roach2010 said:
Hey rothnic. Great work so far. I don't envy you task of trying to merge the frameworks but you have my full support. I'm no smali expert by any means but I'll help out if I can.
I suggest keeping a healthy supply of beer at hand as smali editing drives me to drink
Click to expand...
Click to collapse
Yeah, not the most fun stuff in the world. Was going to get around to touching base with you if I ever get it working. I'll package it up as a delta so it's not a full on release to manage. If there is a way to get it working, I hope to document the changes I made so it could be applied to TF updates as they come out.
stitoo said:
Ported going to interface with applications such keyboard? I do not like asus keyboard
Click to expand...
Click to collapse
If it works, I'll probably alter Prime 1.6 as little as possible. Have you tried Thumb Keyboard from the market? Worth the cost.
Just comparing smali files and in "smali\com\android\systemui\statusbar\tablet" the TableyStatusBar$H file in the Prime UX, when compared to the A500 UX rom exact file. There are many differences between the two. Now Myself have only done minimal smali editing. However I was just wondering if this has already been looked at and/or whether they theoretically should be the same?
Thanks
Dan
dwillMUFC said:
Just comparing smali files and in "smali\com\android\systemui\statusbar\tablet" the TableyStatusBar$H file in the Prime UX, when compared to the A500 UX rom exact file. There are many differences between the two. Now Myself have only done minimal smali editing. However I was just wondering if this has already been looked at and/or whether they theoretically should be the same?
Thanks
Dan
Click to expand...
Click to collapse
I started using the A500 UX version of systemui.apk. I had the errors that we still have now. But, I thought maybe the version that Fguy used for the Acer might not work well with this specific implementation of honeycomb. So I tried a newer version of the samsung UX files, but it had no impact.
So that is why you would find differences between the one in PrimeUX versus Fguy's ROM. I tried talking to him about it, but I think the language barrier is too great to really communicate well enough.
I'm not sure if he added anything to the SystemUI.apk or not, but my intuition was that the changes were mainly to the framework files. That is a consideration to make, though.
this is great, I was wondering if and when we were gonna see this ported. Its great to see the DEV'n really starting to take off!!
Why are you guys concetrating on the keyboard so much for this port, it just gives extra unneeded problems with it, maybe it's a better thing to leave the keyboard as it is for now, i guess that can take alot of headaches away,
br13an said:
Why are you guys concetrating on the keyboard so much for this port, it just gives extra unneeded problems with it, maybe it's a better thing to leave the keyboard as it is for now, i guess that can take alot of headaches away,
Click to expand...
Click to collapse
We, as in the people trying to get this to work, aren't messing with the keyboard at all. One person had a hard to understand comment about the keyboard, and I was just being a nice person about an off topic comment.
The keyboard is definitely the last of my worries.
Okay, so I thought I'd take a look at what is causing the systemui to crash, but upon decompiling in apkmanager I am getting an error. I've done the menuitem 9 and 10 (with both frameworkres and twframeworkres).
I DO get Smali files to edit, but the errors make me not want to try to recompile and put them in there, lol.
nex7er said:
Okay, so I thought I'd take a look at what is causing the systemui to crash, but upon decompiling in apkmanager I am getting an error. I've done the menuitem 9 and 10 (with both frameworkres and twframeworkres).
I DO get Smali files to edit, but the errors make me not want to try to recompile and put them in there, lol.
Click to expand...
Click to collapse
Take some courage, try it
I've had luck despite errors (although unlikely).
Well, I'm at another stop. I was going to use files from a real Galaxy Tab rom to see what differences there are. Perhaps the OP missed something (obv). I can't seem to decompile them. Not even giving me any smali folder. Hmm.
This would be a lot easier if OP listed all the files he has edited to add functions from normal prime 1.6 smali files. If not, I might as well have to start all over just so I'll know what files to edit and which not to. When Winmerge lists a different item, how am I supposed to know it's really just an identical file with some added Asus bonus without checking every single file?
Is anyone able to decode what this exception is? Doing some merges and running logcat while booting, this one comes up (untouched PRIMEUX.zip, just flashed back to the stock zip in OP).
08-22 02:55:12.200: WARN/PackageManager(161): Exception reading jar: /system/framework/twframework-res.apk
08-22 02:55:12.200: WARN/PackageManager(161): java.io.IOException: /system/framework/twframework-res.apk
08-22 02:55:12.200: WARN/PackageManager(161): at dalvik.system.DexFile.isDexOptNeeded(Native Method)
08-22 02:55:12.200: WARN/PackageManager(161): at com.android.server.PackageManagerService.<init>(PackageManagerService.java:904)
08-22 02:55:12.200: WARN/PackageManager(161): at com.android.server.PackageManagerService.main(PackageManagerService.java:706)
08-22 02:55:12.200: WARN/PackageManager(161): at com.android.server.ServerThread.run(SystemServer.java:155)
08-22 02:55:13.440: WARN/PackageManager(161): Failed verifying certificates for package:com.android.systemui
Click to expand...
Click to collapse
nex7er said:
Okay, so I thought I'd take a look at what is causing the systemui to crash, but upon decompiling in apkmanager I am getting an error. I've done the menuitem 9 and 10 (with both frameworkres and twframeworkres).
I DO get Smali files to edit, but the errors make me not want to try to recompile and put them in there, lol.
Click to expand...
Click to collapse
What are you using to decompile? Also, I havn't had much luck compiling apk's, so if anyone knows for sure how, let me know. I can decompile/compile framework files just fine with the files I posted.
nex7er said:
Well, I'm at another stop. I was going to use files from a real Galaxy Tab rom to see what differences there are. Perhaps the OP missed something (obv). I can't seem to decompile them. Not even giving me any smali folder. Hmm.
This would be a lot easier if OP listed all the files he has edited to add functions from normal prime 1.6 smali files. If not, I might as well have to start all over just so I'll know what files to edit and which not to. When Winmerge lists a different item, how am I supposed to know it's really just an identical file with some added Asus bonus without checking every single file?
Click to expand...
Click to collapse
Not sure what you mean by from a real Galaxy Tab rom. I used the files from Fguy's Iconia port at first, then a stock deodexed samsung ROM. I had the same problem I still have, but PrimeUX that I uploaded has untouched samsung applications (everything that goes in /app). I have merged classes from samsung to asus framework files: android.policy.jar, framework.jar, and framework-res.apk. All those errors were related to missing classes, so I merged them.
So what I'm saying is, it doesn't really matter what has already been merged, because those classes now exist. I have approached it by decompiling frameworks from samsung or fguy's rom and prime 1.6. Then i diff them, and then all you can do is use winmerge to let you know if they are different or not. If a file looks like it could have something to do with the status bar etc, then you can double click on that file and winmerge shows a side by side view where you can see the differences and merge lines or not.
This works isn't a clean, let me see which files are different so i can copy them around. It requires digging into each and every class file in the framework to see if something needs to be merged. Also, when you use different ROMs for the touchwiz files, many of the files will differ, so be careful there when mixing stuff.
nex7er said:
Is anyone able to decode what this exception is? Doing some merges and running logcat while booting, this one comes up (untouched PRIMEUX.zip, just flashed back to the stock zip in OP).
Click to expand...
Click to collapse
I'm not sure on that one, but my guess is something went wrong when they deodexed the file. I tried replacing these files from different ROMs, including Fguy's and it always showed that error. I'm thinking maybe it's not a critical error and it still functions since those others work fine.
Oh sweet, you're here! Well, I was using apkmanager but I noticed a few minutes later that you posted working tools in your opening post. My bad, hehe.
I'm not used to editing smali at all, which is why I'm at a stop. There are so many differences (comparing omftab 1.0.5 to your primeux) for it to be a realiable testing ground for just one person. Some files reference different lines than the other (like omftab might have Line 293 somewhere in the file, and your primeux has Line 292 in the same spot). I have no idea if I should be touching those.
Also, running Logcat, I can not see any major problems with systemui popping up. Only the one I posted at the general bootup but it doesn't seem to mean anything. There are also many errors pertaining to mounting the sd-cards, but they still work just fine.
Meaning, it's hard to know what errors are real or not.
Just got done firing up some pokemon on my tab. I guess it's time for a nandroid and try again.
Found the *****y systemui message while doing first boot after flashing.
Code:
08-22 15:32:08.860: ERROR/AndroidRuntime(736): FATAL EXCEPTION: main
08-22 15:32:08.860: ERROR/AndroidRuntime(736): java.lang.RuntimeException: Unable to create service com.android.systemui.SystemUIService: java.lang.NullPointerException
08-22 15:32:08.860: ERROR/AndroidRuntime(736): at android.app.ActivityThread.handleCreateService(ActivityThread.java:2046)
08-22 15:32:08.860: ERROR/AndroidRuntime(736): at android.app.ActivityThread.access$2500(ActivityThread.java:122)
08-22 15:32:08.860: ERROR/AndroidRuntime(736): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1056)
08-22 15:32:08.860: ERROR/AndroidRuntime(736): at android.os.Handler.dispatchMessage(Handler.java:99)
08-22 15:32:08.860: ERROR/AndroidRuntime(736): at android.os.Looper.loop(Looper.java:132)
08-22 15:32:08.860: ERROR/AndroidRuntime(736): at android.app.ActivityThread.main(ActivityThread.java:4025)
08-22 15:32:08.860: ERROR/AndroidRuntime(736): at java.lang.reflect.Method.invokeNative(Native Method)
08-22 15:32:08.860: ERROR/AndroidRuntime(736): at java.lang.reflect.Method.invoke(Method.java:491)
08-22 15:32:08.860: ERROR/AndroidRuntime(736): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:841)
08-22 15:32:08.860: ERROR/AndroidRuntime(736): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)
08-22 15:32:08.860: ERROR/AndroidRuntime(736): at dalvik.system.NativeStart.main(Native Method)
08-22 15:32:08.860: ERROR/AndroidRuntime(736): Caused by: java.lang.NullPointerException
08-22 15:32:08.860: ERROR/AndroidRuntime(736): at com.sec.minimode.manager.MiniModeAppManager.registerCallback(MiniModeAppManager.java:80)
08-22 15:32:08.860: ERROR/AndroidRuntime(736): at com.android.systemui.statusbar.tablet.MiniModeAppsPanel.onFinishInflate(MiniModeAppsPanel.java:440)
08-22 15:32:08.860: ERROR/AndroidRuntime(736): at android.view.LayoutInflater.rInflate(LayoutInflater.java:732)
08-22 15:32:08.860: ERROR/AndroidRuntime(736): at android.view.LayoutInflater.inflate(LayoutInflater.java:479)
08-22 15:32:08.860: ERROR/AndroidRuntime(736): at android.view.LayoutInflater.inflate(LayoutInflater.java:391)
08-22 15:32:08.860: ERROR/AndroidRuntime(736): at android.view.LayoutInflater.inflate(LayoutInflater.java:347)
08-22 15:32:08.860: ERROR/AndroidRuntime(736): at android.view.View.inflate(View.java:11630)
08-22 15:32:08.860: ERROR/AndroidRuntime(736): at com.android.systemui.statusbar.tablet.TabletStatusBar.addPanelWindows(TabletStatusBar.java:352)
08-22 15:32:08.860: ERROR/AndroidRuntime(736): at com.android.systemui.statusbar.tablet.TabletStatusBar.makeStatusBarView(TabletStatusBar.java:718)
08-22 15:32:08.860: ERROR/AndroidRuntime(736): at com.android.systemui.statusbar.StatusBar.start(StatusBar.java:61)
08-22 15:32:08.860: ERROR/AndroidRuntime(736): at com.android.systemui.statusbar.tablet.TabletStatusBar.start(TabletStatusBar.java:473)
08-22 15:32:08.860: ERROR/AndroidRuntime(736): at com.android.systemui.SystemUIService.onCreate(SystemUIService.java:79)
08-22 15:32:08.860: ERROR/AndroidRuntime(736): at android.app.ActivityThread.handleCreateService(ActivityThread.java:2036)
08-22 15:32:08.860: ERROR/AndroidRuntime(736): ... 10 more
I would also like to know what rom you have been using to compare and import from. This would make it easier so I don't use an older or newer rom and **** something up.
I'm pretty sure those line references won't be an issue. It is more to do with things like Environment.smali from android.policy.jar. It has overlapping capability that looks very hard to merge.
Also, about not knowing what are errors. You will see a lot of red stuff coming from samsung related files. A lot of it is just samsung printing out debug information, but for some reason they print them like exceptions. They did this a lot when I was porting the original galaxy tab's email app to the Gtablet. The main issue is the one you pasted. That is all that is given, and it doesn't really tell you much.
I'll try to post later today which samsung ROM I was using. I think it might have been the deodexed one from here: http://forum.xda-developers.com/showthread.php?t=1198921 . I'll find out for sure.
Good stuff. Yeah I've been using that one as well. Right now I am going over services.jar and comparing with omftab and the primeux service.jar is missing a bit. Including one that has to do with TW, apparently.
Differences like this " const v1, 0x10402d3" are all over. I have no idea what they are, but I'm going to guess I'm not to touch these even if they differ?
EDIT ADD: Without having looked much further (just started again), I came upon errors pertaining to GsmSignalBar, referenced from systemui. Could this be what causes the SystemUI.apk to not launch itself?
Code:
08-23 01:14:07.570: WARN/dalvikvm(1113): VFY: unable to resolve virtual method 441: Landroid/telephony/SignalStrength;.getGsmSignalBar ()I
Hmm, now to decide to take time to check this out or try something else. Really hard when you're alone and not working as a team on several parts.
EDIT ADD 2: Hmm, at some point, it IS launching the statusbar without crashing. It's not until later when that errormsg I pasted a few posts up, that it disappears. The remaining errors between it loading and the crashing are all related to phone stuff. Here's a full paste from when it loads till it crashes and starts doing other stuff: http://pastebin.com/4AnEX6kq
Code:
08-23 01:14:07.440: DEBUG/SystemUIService(1113): loading: class com.android.systemui.statusbar.tablet.TabletStatusBar
08-23 01:14:07.490: DEBUG/SystemUIService(1113): running: [email protected]
Not sure what the deal is with the getGsmSignalBar, because that didn't even have to be merged. It was already within framework.jar.
Try this services.jar, I did find something in there critical to the status bar and fixed it:
http://www.multiupload.com/3Q2WD076XI
I'm not setup atm to test. The wife has been needing the tablet and I've been working on the car. However, I should be free to work on this, this afternoon.
Related
HTC's Mail.apk (ie, Exchange) on 1.5 US -- what do we know?
Do we know enough about the dependencies of Mail.apk to conclude that there is no way to get it installed on something like JF's 1.5 US image? I've been playing around with it, and even with swapping out various shared libs and frameworks from Haykuro's Sapphire images I can't get past: E/PackageManager( 793): Package com.htc.android.mail has no signatures that match those in shared user android.media; ignoring! Does anyone know what signature this error is referring to? Is it in the reference to android.media in Mail.apk's AndroidManifest.xml? Anyway, I thought it would be helpful to have one place to discuss this for those of us who'd like to see Mail.apk on 1.5 US. I'd love to know where other people have gotten on this.
Look in packages.xml <shared-user name="android.media" userId="10017"> Cannot figure how to edit this file, it rebuilds upon reboot.
I heard its built into the saphire kernal and thats why it only works on H's saphire builds. I'm sorry, I cant find the thread talking about it.
HTC ships a modified version of the Android core, so you need EVERYTHING from /system/framework from Haykuro's build. You need to modify the ramdisk to include the extra jars. You need some changes in /etc (platform.xml). Then you need a bunch of APKs from that build (Phone.apk, CustomizationProvider.apk, etc) because the stock ones don't work anymore due to the changes HTC made to the core. At this point you might as well just run his build. And you can't even change the stuff in /system/framework on the US build anyway because of the .odex files. Your phone will go into a loop of crashes because of the StaleDexCache exceptions when trying to recompute dependencies. Wait for the Rogers ROM to surface, and maybe we will have more options.
Decompiling a ROM app
Hi there. I've just migrated to Android from WinMo and have a few questions. Firstly, where can I find the ROM apks? In which folder are they stored? I'm particularly interested in the HTC Desire's FM Radio app. Is there anyway I can track what commands does it send to the FM Radio device so I can make a custom Radio app? And as far as those apps run on the Dalvik VM, can the code be partially decompiled? I know it's a long shot for a newbie, but at least it would be an interesting thing to attempt. I got used to dlls in Windows and have almost no experience with Linux, so I know it would be hard. Anyway, any help or suggestions will be much appreciated Edit: ---------------------------------------- So here are the files I succeeded in decompiling: HTCRadio.rar (18.7 MB) In case anybody needs them The archive contains HtcFMRadio.apk, HtcFMRadio.odex, their decompiled resources and classes in smali format and the com.htc.resources framework I will try to make sense of them, but I'm almost certain I'll fail
martintzvetomirov said: Firstly, where can I find the ROM apks? In which folder are they stored? Click to expand... Click to collapse /system/app for system apps, and /system/framework for frameworks: Java runtime, Android libraries, etc. martintzvetomirov said: And as far as those apps run on the Dalvik VM, can the code be partially decompiled? Click to expand... Click to collapse http://code.google.com/p/smali/ - Dalvik bytecode (dis)assembler http://code.google.com/p/android-apktool/ - decodes app resources (they are compiled/optimized to binary form), simplifies working with decoded files, uses smali
Thanks, mate! That's a really good start point for me EDIT: I successfully decompiled the resources and the classes. I've added a link in my fist post in case someone searching in Google for that comes accross this topic
Ok, from what I've seen HTCRadio.apk has registered a service called FMRadioService and luckily its android:exported is set to true. Does it mean that I can call this service from my app and get something useful from it? And if yes, how can I call a service for which the only thing I know about is its name? Cheers EDIT: I successfully invoked the Remote Service and I think implemented the aidl correctly. Now it's time to figure out how to make it work
[TOOL] ApkSpy v1.8 - Resurrected (APK: view manifest on PC and/or Install APK via PC)
APKSPY - RESURRECTED First: I want to thank @ido for the original application -- It was his idea (and his code I've hacked :cyclops and modified. Second: Since Ido seems not to be active anymore I'll re-publish the application here. Unless for some reason Ido will specifically ask me to remove it. The original post ido said: ApkSpy is a simple tool I hacked up tonight which allows you to easily view the manifest of an APK (screenshots attached - not up to date though) just by double clicking it. (It can even associate with the .apk filetype, yay!) ApkSpy relies on the aapt.exe tool from the android SDK, so you must have that installed (or just copy aapt.exe from somewhere, that's the only file needed to run ApkSpy). Click to expand... Click to collapse Third: Requires Microsoft©® .Net Framework v4 (Kind of since I've done it some time ago and waited for Ido [the orignal developer] to respond and allow or disallow me to re-publish... So, I don't remember all the changes I've already done...) v1.8.19 CHANGELOG: Fixed some Date parsing function (zipped file with no time stamp) in ZipStorer (by @Jaime Olivares) maybe causing some of the error reported here... v1.8 CHANGELOG: Changed Icon - CONTRIBUTED BY @Jarmezrocks Removed unneeded tabs (System, Batch Rename, Log) Minimize / Maximized restored back v1.7 CHANGELOG: (Actually 4.1.7.870, but the first and the last parts are internally used :fingers-crossed:) Try to automatically find adb.exe and aapt.exe in ApkSPY directory or in PATH variable: If failed finding any of the executables, the user is asked to manually locate them (★ Currently the location is not saved... ★). Check if the ADB server is running and Start or ask if to Restart ADB server Tidy up the code Refining the original libraries written by Ido related to ADB and AAPT Some more minor code updates Revised most of the "General" tab (other tabs ware not touched) of the UI: Grouped and ordered controls on form Added DropDown of devices attached (★ Not automatically updating upon plugging... ★) Added some control over ADB actions Added status bar that some other details are shown, e.g. device type (Nexus, I9100...), OS version (4.1.2, 4.4.2...) and OS build (KOT49H, KVT49L...) Added (nice looking) information panel with clickable links (for actions on the form) and coloring Other changes (I can't recall right now, since I've done it some time ago and waited for a response from Ido for permission to republish) (★ Maybe I'll add an option for this later, depending on my -- not to much -- free time and requested by users .... ★) Known bugs: Sometimes ADB fails to return build.prop property for the status bar (however it has not caused any critical problem, so (I think) it can be safely ignored) -- haven't been able (yet) to find the exact state it is happening Please take the time to look at the application ABOUT tab Any Other ideas are welcome! If you like it, Don't forget to Thank me If you enjoy using this application as much as I have enjoyed re-writing it please donate to show your appreciation
RESERVED
Nice Sent from my SM-N900T using Tapatalk
Good news Bug report, every time I open this program, this dialog pops up, after click OK, this program works well. PS, aapt.exe is in the same dir with ApkSpy
I got this errors: 1: 2: Error in property: [email protected]@usrdata
cmlx said: Good news Bug report, every time I open this program, this dialog pops up, after click OK, this program works well. PS, aapt.exe is in the same dir with ApkSpy Click to expand... Click to collapse Hey dude, I am not sure what you are doing wrong on your PC but it's certainly not the app as it works perfectly fine on my computer? Out of interest and for the sake or helping the new dev I thought I would raise a few points just to eliminate any finger pointing. There's a wishy-washy area when it comes to building/hacking things that were originally someone elses work...so yeah one can easily make great improvements yet open the door to bugs at the same time too. Anyway...thought I'd ask this: Does aapt sit on your path? I know you said it is in the same directory, however just like a batch script in Windows it needs to "CD" or change directories to the %~dp0 if it is to understand what an executable is that happens to be sitting in the same directory as it's self. So this is is kinda directed at the new dev now. What I think is happening is that aapt is assumed to be in the system path when quite often it is not (i.e. those on XDA who have not yet played with the Android SDK properly). Put simply unless the application knows it is in the same directory as your executable it won't at all understand what aapt is. Does that make sense? @dmagician , I would make sure that the apkspy app can do a check (even if it is a string search for the first few lines returned from aapt.exe), a simple if statement before throwing that error ....actually it would likely be an 'if not' statement. I don't have any of the code in front of me atm but I can help you out if you like? I was hacking this app myself sometime ago when ido first released it just using reshacker. Note: If you are stuck and don't have source code you technically could write a full AutoIT wrapper for this app that could do all the checks and more and then bundle everything up into the one exe still. Check out the newer WinAPI stuff for AutoIT and in particular "Run binary" (yes that's correct you can just about run anything repackaged now and not need to deploy the original exe's or even libraries....they can all be stream fed to AutoIT @Compile time and need not be typically "installed" like you used to have to do. Anyway...I am waffling on shoot me a PM man. @cmlx, to overcome your ApkSpy woes, and until dmagician can put his finger on what the cause is or what ido did when building it ages ago.....then you will firstly need to be patient (props to dmagician to figuring sh!t out so far) but till then where ever you have dumped the ApkSpy and aapt.exe on your system; just copy the address and put it on your system path. To do this 1) right click on My Computer or Computer if you are on Win 7 or 8. 2) Choose properties. 3) Advanced System settings and then at the bottom of tab you will see 'Environment Variables', click it and you will see some "User" and "System" options. Depending on your User access rights on the system you are running on (hopefully you are running as Admin surely?) then you can choose to edit your main system path or create a new variable in your user settings called 'path' Note User variables are always postfix to system variables but should always work anyhow. Disclaimer: cmlx, if however you have already got an aapt.exe already existing on your system path but it is dodgy then you have to ensure that the good aapt.exe in your app directory is placed on path BEFORE the dodgy one....just sayin. Cause your system searches till it finds what it wants and then doesn't search anymore. Simple but can stuff people up quite often....and likely your case. Nowdays we tend to work from the known application location and not from a "Global environment path" when we know that there are going to be conflicts...and I can assure you that aapt is possibly the worst and most modified binary out there LOL. Hence this is also a note to the dev to ensure that ApkSpy reads from the current directory.....or like I am suggesting, wrap aapt up in the main application as well and that way there is no confusion EVER. And I am done..... Oh wait no I am not....sorry bug reports LOL :good: you thought I was all praise eh? Got another thing coming man OK....so um the red boxes should explain everything. A picture says a thousand words (and yeah I needed at least 1 picture for this god damned long arsed post - sry). Um why in gods name would you remove the minimise and expand buttons? WTF? Anyway...it works but errrm yeah it doesn't wrap the text anymore? and it cuts the words off lol. Other than that....I only really have one suggestion and it isn't even really a suggestion as I have kind of already made it so I can just give it to you if you want it? And that is that most people (well I can't say most as I am not speaking for everyone) tend not to like how apps take over their system. This isn't your fault at all in anyway as the first dev thought it was a good idea back then.....and back then hardly anything in Windows knew what a freakin apk was so it was a GOOD thing.....However now, every man and his dog wants to steel .apk extension for himself. I myself tend to be all over the shop with apks so I tend not to want to have any particular Windows app take it away from my control. I use WinZip as the main app for simple double click open as I want to see the contents of apks without needing to decompile them (great for theming) however I have apk shell extensions displaying the apks main icon to explorer, so if I set WinZip as default I get a nice lumping hunk of gold turd/box running rampet all over my Windoze bro ......so if you like I can show you my code that allows me to have default apps for specific tasks without interfering with anyones existing sh!t It looks neat too as you can right click any apk and just choose from a dropdown list what particular app you want at the time. If one has the need to use more apps then they need only put those apps in a list. There is nothing worse than double clicking an apk to find that Bluestacks or some other rubbish Windoze crApp has taken offf with your apk. Lastly I thought I'd ask, Why no config file? Why store everything in memory? I know it's only small....but seeking for things everytime it is executed is a pain in the arse and not good practice. At the very least if you have no idea how to make an exe totally portable then you could reference a config file in the same directory....Or do as most do and write entries to the registry all neat and tucked away. If we get paranoid about "portable-ness" then we write to temporary space in the registry and make sure we clean up upon closing and/or inspect at runtime. simple! I have plenty of AutoIT scripts that do exactly that too, so if you are stuck for ideas let me know. Anyway I have rambled enough, good luck and I will keep reporting bugs haha Edit: That's waaaay too many emoticons. Oooops someone is a little high aren't they? PS: I have attached my PNG of the icon I used for this bugger waaaaaay back....it's less generic and feel free to take it and abuse it and do as you please.
cmlx said: Good news Bug report, every time I open this program, this dialog pops up, after click OK, this program works well. PS, aapt.exe is in the same dir with ApkSpy Click to expand... Click to collapse Yes, I know of this one (and I've specifically wrote about it in the OP), it is NOT related to AAPT executable but to the way ADB is acting (sorry, out of my hands... :angel: Explanation The error comes from the application when trying to query the "ro.build.id" property via adb ('ADB shell getprop "ro.build.id" ') command. I've came across this one but cannot determine the exact situation it is happening (as it can occur when first launching of the app, but after the app is loaded, clicking on refresh does not show this error)... [ I've tried it on with the (only) two devices I own (1st dev. is stock (only the kernel is changed) 4.4.2 Nexus 4, 2nd dev. is S2-i9100 with customized RR ROM)and it seems to happen ONLY on the S2...] It looks that in times, the getprop is being executed before the whole "build.prop" is being processed by ADB (This one I cannot control since it is happening on the ADB shell side [running on the device] -- unless MAYBE doing some [UGLY] delay after first initialization of ADB, which is, by far NOT best practice of process handling according to the literature)...
CyberianIce said: I got this errors: 1: 2: Error in property: [email protected]@usrdata Click to expand... Click to collapse Which came first, the "SpkSpy spy stopped working" or the "Error in property" (if anyways related)? Was it on the same run or two different runs? As of the 1st one: I do not have enough information from your post to check it up... I'll post a new version which shows the exception details As of the 2nd one: Can you send me a copy of your /system/build.prop (so i'll be able to dig trough it and check it)? It looks like my name-value splitter character exist as part of a given value in your build.prop .
Wooow, Long one! But it is nice to know people are using (trying) it! Jarmezrocks said: Hey dude, I am not sure what you are doing wrong on your PC but it's certainly not the app as it works perfectly fine on my computer? Out of interest and for the sake or helping the new dev I thought I would raise a few points just to eliminate any finger pointing. There's a wishy-washy area when it comes to building/hacking things that were originally someone elses work...so yeah one can easily make great improvements yet open the door to bugs at the same time too. Anyway...thought I'd ask this: Does aapt sit on your path? I know you said it is in the same directory, however just like a batch script in Windows it needs to "CD" or change directories to the %~dp0 if it is to understand what an executable is that happens to be sitting in the same directory as it's self. So this is is kinda directed at the new dev now. What I think is happening is that aapt is assumed to be in the system path when quite often it is not (i.e. those on XDA who have not yet played with the Android SDK properly). Put simply unless the application knows it is in the same directory as your executable it won't at all understand what aapt is. Does that make sense? Click to expand... Click to collapse Hi As I've replied to @clmx, This error is not related to AAPT (either executable [location or whatever] or results), but to the ADB command being used... Jarmezrocks said: @dmagician , I would make sure that the apkspy app can do a check (even if it is a string search for the first few lines returned from aapt.exe), a simple if statement before throwing that error ....actually it would likely be an 'if not' statement. I don't have any of the code in front of me atm but I can help you out if you like? I was hacking this app myself sometime ago when ido first released it just using reshacker. Click to expand... Click to collapse Sorry I did not understand... Check for what? Jarmezrocks said: Note: If you are stuck and don't have source code you technically could write a full AutoIT wrapper for this app that could do all the checks and more and then bundle everything up into the one exe still. Check out the newer WinAPI stuff for AutoIT and in particular "Run binary" (yes that's correct you can just about run anything repackaged now and not need to deploy the original exe's or even libraries....they can all be stream fed to AutoIT @Compile time and need not be typically "installed" like you used to have to do. Anyway...I am waffling on shoot me a PM man. Click to expand... Click to collapse I do not need the Auto-IT to wrap these files (although I am using it for other automation in windows), as I can do it right in the C# code (on one of my early versions these files was embedded...) BTW, I know there are some antiviruses out in the wild that do not like the embedded executables -- but it can be done -- and probably will save some time to anyone using this app... If it will be required / asked, I'll embed the 4 binaries (AAPT.EXE, ADB.EXE, and two DLL's AdbWinApi.dll and AdbWinUsbApi.dll [I'm not sure both are required]) needed by the application. Jarmezrocks said: @cmlx, to overcome your ApkSpy woes, and until dmagician can put his finger on what the cause is or what ido did when building it ages ago.....then you will firstly need to be patient (props to dmagician to figuring sh!t out so far) but till then where ever you have dumped the ApkSpy and aapt.exe on your system; just copy the address and put it on your system path. To do this 1) right click on My Computer or Computer if you are on Win 7 or 8. 2) Choose properties. 3) Advanced System settings and then at the bottom of tab you will see 'Environment Variables', click it and you will see some "User" and "System" options. Depending on your User access rights on the system you are running on (hopefully you are running as Admin surely?) then you can choose to edit your main system path or create a new variable in your user settings called 'path' Note User variables are always postfix to system variables but should always work anyhow. Disclaimer: cmlx, if however you have already got an aapt.exe already existing on your system path but it is dodgy then you have to ensure that the good aapt.exe in your app directory is placed on path BEFORE the dodgy one....just sayin. Cause your system searches till it finds what it wants and then doesn't search anymore. Simple but can stuff people up quite often....and likely your case. Nowdays we tend to work from the known application location and not from a "Global environment path" when we know that there are going to be conflicts...and I can assure you that aapt is possibly the worst and most modified binary out there LOL. Hence this is also a note to the dev to ensure that ApkSpy reads from the current directory.....or like I am suggesting, wrap aapt up in the main application as well and that way there is no confusion EVER. Click to expand... Click to collapse The application IS searching for AAPT and ADB executables; The order is Application directory (where ApkSpy.exe resides) PATH environment variable Jarmezrocks said: OK....so um the red boxes should explain everything. A picture says a thousand words (and yeah I needed at least 1 picture for this god damned long arsed post - sry). Um why in gods name would you remove the minimise and expand buttons? WTF? Click to expand... Click to collapse Mostly I like it this way, otherwise - No specific reason... It will be back in the next version... Jarmezrocks said: Anyway... it works but errrm yeah it doesn't wrap the text anymore? and it cuts the words off lol. Click to expand... Click to collapse This Tab was NOT changed by me in any way... To be honest, I've thought of removing it completely -- But -- out of respect to Ido's work -- I've left it in. I assume it is not wrapping due to Font size changed by me globally... I'm seriously giving it second thoughts -- if it should stay at all (It was originally meant for batch rename of multiple APK's... I haven't used it even once...)... I'm Really, REALLY, think of removing it completely (unless someone is / will be using it -- then I'll fix it all)... Jarmezrocks said: Other than that....I only really have one suggestion and it isn't even really a suggestion as I have kind of already made it so I can just give it to you if you want it? And that is that most people (well I can't say most as I am not speaking for everyone) tend not to like how apps take over their system. This isn't your fault at all in anyway as the first dev thought it was a good idea back then.....and back then hardly anything in Windows knew what a freakin apk was so it was a GOOD thing.....However now, every man and his dog wants to steel .apk extension for himself. I myself tend to be all over the shop with apks so I tend not to want to have any particular Windows app take it away from my control. I use WinZip as the main app for simple double click open as I want to see the contents of apks without needing to decompile them (great for theming) however I have apk shell extensions displaying the apks main icon to explorer, so if I set WinZip as default I get a nice lumping hunk of gold turd/box running rampet all over my Windoze bro ......so if you like I can show you my code that allows me to have default apps for specific tasks without interfering with anyones existing sh!t It looks neat too as you can right click any apk and just choose from a dropdown list what particular app you want at the time. If one has the need to use more apps then they need only put those apps in a list. There is nothing worse than double clicking an apk to find that Bluestacks or some other rubbish Windoze crApp has taken offf with your apk. Click to expand... Click to collapse The application is NOT taking over anything, Unless you've clicked the asterisk ("*") button on the System Tab... Was it registered for you without clicking this button? If so, I'll recheck the code (may be it's some residue from the original code). BTW As the previous part of the answer I've wrote -- this one was left in as of respect to @ido's work... 2nd BTW I'd like to see that explorer extension (and [preferable] the code of it - if you are willing to share it) you ware writing about... Jarmezrocks said: Lastly I thought I'd ask, Why no config file? Why store everything in memory? I know it's only small....but seeking for things everytime it is executed is a pain in the arse and not good practice. At the very least if you have no idea how to make an exe totally portable then you could reference a config file in the same directory....Or do as most do and write entries to the registry all neat and tucked away. If we get paranoid about "portable-ness" then we write to temporary space in the registry and make sure we clean up upon closing and/or inspect at runtime. simple! Click to expand... Click to collapse Yep, I've thought of it... But... I was thinking, that (at least) everyone is as geeky as me dauuh , and the most are setting the path correctly... It'll be added in next version (I hope... TIME, TIME!!!! :cyclops... Jarmezrocks said: I have plenty of AutoIT scripts that do exactly that too, so if you are stuck for ideas let me know. Anyway I have rambled enough, good luck and I will keep reporting bugs haha Click to expand... Click to collapse I prefer writing my own code (sorry, I'm a developer in heart and soul...) then using automation like Auto-IT... Jarmezrocks said: Edit: That's waaaay too many emoticons. Oooops someone is a little high aren't they? Click to expand... Click to collapse Jarmezrocks said: PS: I have attached my PNG of the icon I used for this bugger waaaaaay back....it's less generic and feel free to take it and abuse it and do as you please. Click to expand... Click to collapse (@Jarmezrocks please see my PM to you.) PHEW... Long Answer, BUT HEY, I'm not the only one writing longies... :angel: (and i like referencing each and every part separately)...
dmagician said: PHEW... Long Answer, BUT HEY, I'm not the only one writing longies... :angel: (and i like referencing each and every part separately)... Click to expand... Click to collapse Ahh yes. I write long messages sometimes when my medication has kicked in and I am high....not my fault I kinda need to get all the info out of my head in one go while I am awake.....or else there would just be zeds on the response zzzzzzzzzzzzzzzzzzzzzz lol :laugh: (ref narcolepsy). I commend you on your efforts at responding to such gibberish and making good sense of it! :highfive: I have responded to your PM accordingly, and hopefully covered all you need? I have attached all info and sources etc.....well most of it...actually a fair bit of it you will have to workout your self but that is part the fun. Shoot me any questions if you need to...although I have a feeling that you will have mostly all of it covered as you are streets ahead of my knowledge already. I may have misjudged a little in my previous post (although hopefully not to make you feel any less than you actually are? please excuse me if I had said anything that may offended - being naive or what ever....you ARE definitely on the right track). As for the middle menu....I think you could easily remove it and not offend the original dev. It wasn't being used as you mention...and I think it could make way for more/better functionality don't you think? (discuss). However I would ensure all the things I mentioned in my PM first before going too deep and releasing on here. Good move on bringing the buttons back. They were functional. But I DO like the single button close GUI myself on just about everything else....It looks clean. We have similar taste in that regard. It just isn't functional for me to pressing the task notification desktop link everytime I want to minimise the app LOL. The rest I we can discuss via PM, this is pretty much only posted here as an open area for other forum members to provide input and opinion (or complaint....like how often it usually is, eh?).
CyberianIce said: I got this errors: 1: 2: Error in property: [email protected]@usrdata Click to expand... Click to collapse I'd got the same error! For me it helped to copy two files to the install dir "adb.exe" and "AdbWinApi.dll" Both are installed with the well known MyPhoneExplorer into "Program Files\MyPhoneExplorer\DLL" Hope it helps!
Feature Request I use this tool for testing new APK builds on a project I am working on it. It allows me to quickly verify the version number and push to the device. However, since I am usually installing another version of an existing installed APK, I must manually uninstall before using APKSPY. Would it be possible to add a check box that would uninstall any previous versions? It would be really helpful. Nevermind - I didn't fully read the message presented when it fail. It say uninstall/update and it allows the installation. HOWEVER, that brings up a question... Does it uninstall or does it update? There is a difference as you know. Thanks, Jonathan
Hi, I try to run this on Mac via Wineskin Winery, but no luck. Do I need something like .Net, or something else to run ApkSpy? Thank you.
Ja_som said: Hi, I try to run this on Mac via Wineskin Winery, but no luck. Do I need something like .Net, or something else to run ApkSpy? Thank you. Click to expand... Click to collapse The only requirement is the Microsoft .Net 4. (I'll add this to OP)
jmo said: I use this tool for testing new APK builds on a project I am working on it. It allows me to quickly verify the version number and push to the device. However, since I am usually installing another version of an existing installed APK, I must manually uninstall before using APKSPY. Would it be possible to add a check box that would uninstall any previous versions? It would be really helpful. Nevermind - I didn't fully read the message presented when it fail. It say uninstall/update and it allows the installation. HOWEVER, that brings up a question... Does it uninstall or does it update? There is a difference as you know. Thanks, Jonathan Click to expand... Click to collapse Yes I know there is difference between the two (update vs uninstall and install again). It is updating the application (like using "adb install -r apk_file_name.apk"), not doing remove and install
Removed unneeded tabs (System, Batch Rename, Log) Click to expand... Click to collapse The unneeded Batch Rename tab was the only tab I needed really. :laugh: Luckily I found Ido's original version. It's ideal for renaming all those apk's I downloaded and still have the package name when I back them up to my PC. I have an Asus Memo Pad 10 and an Asus Memo Pad 7 and neither are recognised by APKSpy. Not that it's a problem as I have no problem copying to and from them with Windows Exploder or Total Commander. Other than that, it's been a handy little app for this tablet/smartphone virgin newbie. Martin.
wolrik said: The unneeded Batch Rename tab was the only tab I needed really. :laugh: Luckily I found Ido's original version. It's ideal for renaming all those apk's I downloaded and still have the package name when I back them up to my PC. I have an Asus Memo Pad 10 and an Asus Memo Pad 7 and neither are recognised by APKSpy. Not that it's a problem as I have no problem copying to and from them with Windows Exploder or Total Commander. Other than that, it's been a handy little app for this tablet/smartphone virgin newbie. Martin. Click to expand... Click to collapse Hello. 1st: I can -- if requested - re-add the Batch rename. 2nd: I don't know why these two devices are not being recognized -- unless not being recognized by ADB itself -- since I'm spawning devices by parsing the resulting text of "ADB devices" command, So unless being unrecognized by ADB, there should be NO PROBLEM detecting ANY android device with ADB on... if you have any exception messages thrown by the application, please post them here.
dmagician said: Hello. 1st: I can -- if requested - re-add the Batch rename. 2nd: I don't know why these two devices are not being recognized -- unless not being recognized by ADB itself -- since I'm spawning devices by parsing the resulting text of "ADB devices" command, So unless being unrecognized by ADB, there should be NO PROBLEM detecting ANY android device with ADB on... if you have any exception messages thrown by the application, please post them here. Click to expand... Click to collapse No need to re-add the tab just for me, but thanks for the offer. As I get to know my way around Android I'll probably need such things less and less. Sorry, but I know nothing about ADB other than APKSpy needing it. As you can see from the attached pic, the Asus is recognised by Total Commander Martin.
Hi dmagician, Nice work, and a shout-out to Ido who originally created it. I have a feature request: Could you add the option to remove certain permission(s) and save the modified APK file? There are many apps which I feel allow themselves way too much permissions, and this option could be very useful to tame them apps. One more thing: I noticed that APKSpy v1.8.2 doesn't work with the latest version of AAPT.exe (1432KB), from the Android SDK r24. So I had to use a previous version of AAPT.exe (833KB), which worked. Thanks, Eric
Hey does anybody know where the name of the apk is in the XML files inside the apk?
dlopen failure when running OpenCL
I am porting an opencl application onto a Huawei honor8 phone, which comes with opencl. Also it is not rooted When I ran my app, I got the error: /system/vendor/lib64/egl/libGLES_mali.so" ("/vendor/lib64/egl/libGLES_mali.so") needed or dlopened by "/data/app/com.numericcal.ocl_peak-1/lib/arm64/libOpenCL.so" is not accessible for the namespace: [name="classloader-namespace", ld_library_paths="", default_library_paths="/data/app/com.numericcal.ocl_peak-1/lib/arm64:/data/app/com.numericcal.ocl_peak-1/base.apk!/lib/arm64-v8a:/.... and the app crashes. I actually have libGLES_mali.so placed under src/main/jniLibs/arm64-v8a along side whole bunch of other shared libs that libOpenCL.so depends on, I don't understand why this error pops up. (all the shared libs are pulled from the phone -- either from /vendor or /system directory) Anyone have seen this before? Any good guess what I can do to fix it? Thank you! S Cheng
Same here. Honor 8 has the .so files, but trying to load them crashes. Likely because in Android N and Google blocked loading non-NDR runtimes in Android N. Very frustrating. Was looking forward to experimenting with it. I guess they want to force people to use Vulkan.
Repackaging Mobile app which resists repackaging
I tried repackaging an Android app but after installation, when I launch that app, the app is getting crashed immediately. This is the exception I am getting when I decompile this application using `apktool` and rebuild this application using apktool irrespective of any modifications done at the **smali level** or not. exalvxhzn.█: 01 at exalvxhzn.▃.─(Unknown Source:68) at exalvxhzn.▃.━(Unknown Source:0) at java.lang.Runtime.nativeLoad(Native Method) at java.lang.Runtime.loadLibrary0(Runtime.java:1014) at java.lang.System.loadLibrary(System.java:1669) at exalvxhzn.╿.│(Unknown Source:43) at exalvxhzn.┇.─(Unknown Source:13) at exalvxhzn.┇.━(Unknown Source:24) at exalvxhzn.┇.━(Unknown Source:6) at androidx.core.app.CoreComponentFactory.<clinit>(Unknown Source:0) at java.lang.Class.newInstance(Native Method) at android.app.LoadedApk.createAppFactory(LoadedApk.java:229) at android.app.LoadedApk.createOrUpdateClassLoaderLocked(LoadedApk.java:733) at android.app.LoadedApk.getClassLoader(LoadedApk.java:812) at android.app.LoadedApk.getResources(LoadedApk.java:1034) at android.app.ContextImpl.createAppContext(ContextImpl.java:2357) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5821) at android.app.ActivityThread.access$1200(ActivityThread.java:200) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1673) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:201) at android.app.ActivityThread.main(ActivityThread.java:6810) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:873) When we launch an app, the flow of execution is `application` sub-class `constructor` -> applications sub-class `onCreate()` launcher's activity `onCreate()` method. I tried few code injections at the starting of the `onCreate()` as well as at the constructor level. The code injections, I did is regarding - Insertion of Toast message - A basic file creation at the internal storage (After installing , I gave the storage permission before launching the app) I know that there are some **anti-repackaging** techniques which is applied on the app which resists repackaging. My questions are about: 1. Even if an app has depolyed some **anti-repackaging** technqiues, then even if I am inserting a code (`Toast` message/file creation) at the **beginning** of Application's sub-class `onCreate()` method, then also shall I be able to see impact of the code modifications? For e.g. Will I be able to see my Toast messages or the file creation at the internal storage? 2. Can I apply **anti-repackaing** technique, if I am only having the apk and not the source code?Like for e.g consider I have an Amazon apk, can I apply **anti-repackaging** technique on the Amazon apk? 3. When we decompile an application, at **smali** level, which is the 1st function which gets executed when the app is launched? 4. Is it like by applying an anti-repackaging technique, then instead of `onCreate()`, some other method gets called first when we open the app? 5. Why the above exception is coming even if I haven't done any code modifications at the smali level? 6. At Smali level, which is the constructor which gets called first, is it the `static constructor` or `non-static constructor`? It will be a big help if someone could give their valuable inputs on this. Thanks!!