touchwiz hooks? - Xposed Framework Development

Hey
Im a comp sci student just trying to widen my programming experience. And since im out of ideas/bored of writing stuff that has no use I want to try out some Android development, since I already know Java.
Just creating apps does not appeal to me, so I want to write xposed modules.
I started this journey today so dont judge.
I followed this guide: https://github.com/rovo89/XposedBridge/wiki/Development-tutorial and tried
to do the clock example on my Samsung s7 edge. I get to the point where I can activate the module in xposed and all that, but the clock does not change.
My thought was, since touchwiz is as far from stock as possible, is "com.android.systemui.statusbar.policy.Clock" - "updateClock" the wrong method to hook?
Is there any "easy" way to see touchwiz methods, like AOSP?
Also... Question number two:
How do I find methods to hook in other apps, say Twitter for example?
Thanks!

bump?

20 views no answers... Howe the **** do u learn xposed i there is no proper in-depth teaching site? This forum is dead...

If you want to find out how system on your device works (in case it's different from AOSP) the only way is to do some reverse engineering. Which means taking and decompiling system framework related files and then go through the code which when decompiled is in form of "smali" files. (SystemUI in case of status bar). There are guides for decompiling so you'll have to go through some research.
The same applies to 3rd party apps like Twitter (or better to say all those that don't have source code publicly available).

Thank you so much for the answer!
So I have to decompile all of touchwiz?
Seems like I should just start with android apps since this is such of a large process.
I have APK studio, and understand the smali files, can I hook the methods in these? Would really like a more explanitory tutorial.. (im not telling u to write one )
Thanks again for answering!

Referring to your original post about trying to hook status bar clock. You have to decompile SystemUI apk which contains all status bar related code and logic. From decompiled source you can find out how status bar clock is implemented to be able to decide what method and in what class you need to hook to achieve desired functionality.

How do I find the SystemUI apk? I found an incredible tool online that decompiles apks to pure Java.
Does anyone know if samsung uses the same SystemUI as in AOSP github project? In that case I would'nt even need the tool.
Again, thanks for all your replies, you have been a BIG help.
http://stackoverflow.com/questions/...work-hooking-samsung-s7-edge-system-processes
Posted this on stack, but no replies so far, they tend to be super quick otherwise..

Kewkpad said:
How do I find the SystemUI apk? I found an incredible tool online that decompiles apks to pure Java.
Does anyone know if samsung uses the same SystemUI as in AOSP github project? In that case I would'nt even need the tool.
Again, thanks for all your replies, you have been a BIG help.
http://stackoverflow.com/questions/...work-hooking-samsung-s7-edge-system-processes
Posted this on stack, but no replies so far, they tend to be super quick otherwise..
Click to expand...
Click to collapse
Maybe try logging package name eveytime handleLoadPackage is called. You will get a list of all packages that system loaded from which you might be able to determine which one is SystemUI.
Code:
public void handleLoadPackage(final LoadPackageParam lpparam) throws Throwable {
XposedBridge.log("Loading package: " + lpparam.packageName);
}

Related

Read/Write Settings?

I am looking to read and write system settings. I have already found out how to Read the current theme style (Dark or Light), but is it possible to programmatically change it?
I have also looked everywhere for an API to be able to grab the current wallpaper file, and write in a different one, but no luck.
Can anybody point me in the right direction?
Thanks!
afaik I don't think you can change the user's theme, but you can override it.
Download either the DarkStyles.xaml or LightStyles.xaml:
http://www.windowsphonegeek.com/news/theme-forcing-for-windows-phone-7
Then you can merge the xaml file into the resource dictonary of the resources of app.xaml:
Code:
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Resources/DarkStyles.xaml"></ResourceDictionary>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
I don't think there's an api for grabbing the current wallpaper, but u can use MediaLibrary to check out the currently saved pictures if I remember correctly, otherwise there might be something related to Tasks.
Don't know about wallpaper but I have a thread for adding customs accents and 3 extra themes. Yu could also make your own but im on my phone and it would take forever to type out how.
Sent from my HD7 using XDA Windows Phone 7 App

[Q] Source code for our device..

I'm new to theming and modifying apps and the whole lot, but I do have some experience with Java programming and am starting to understand smali better. I am wondering if the source code for our phone is available and what that would entail exactly.. I basically want the Java source code for the systemui.apk so I can make modifications easier without needing to fumble with cryptic smali code. I know about dex2jar and have used it with varying results, but it still comes down to editing smali and I am at a road block.
thanks for any information that might help
PS it seems like XDA has reformatted their forums or something because I can not find the search button anymore.. my apologies if this post is redundant
frescoraja

Trying to modify Camera.so to bring back some 1.2 functionality

Been a lot of complaints on other forums about the crippled camera app in bada 2.0 and I'd like to restore some of the fuctionality from 1.2. Perhaps it's not actually possible as all I have seen is the KK5 app brought back to enable front camera, and no 1.2 app for bada 2.0 to restore some of the other missing functions like pause in video recording or editing options. So if this is waste of time please let me know, but I though the main problem was passing the sequrity check which has now been solved thanks to kubika. SO if possible this is the precise scope of the project:
It's not just the ability to pause a video recording, or edit anything after, there's a lot of other stuff too...
NO Image Quality selection
NO countinous/sequance shoot mode
NO sharpness, saruration, contrast adjustment... but still have auto contrast check box... as oppesed to what?!?!?
NO thumbnail or info view for picture when reviewing from cammera app
NO edit fuction for anything from anywhere as already mentioned... though admittedly if I really want to edit a pic I'll probably do it on my PC anyway.
Although a noob at this I do have some expeciance with PC's, and my understanding is that bada apps are in C++ so if one can decompile and recompile the camera app. Then ALL missing functions, with possible exception of editing that probably calls on seperate app, should be easily recoverable in the bada 2.0 camera app. I've actually checked the samsung developer website, and it gives guidelines on how to implemnet many of these functions if whishing to create your own app, so the code should be easy to reinsert even for me in their own app. The one problem may be creating/inserting buttons/tiles for the menus if not already available but simply uncalled, which I hope is actually the case since one can easily recover the record call button.
The main issue is I don't know how to decompile the two apps to read and compare the code, and then recompile them, so could someone please point me to the appropriate program(s) with hopefuly some instructions on how to use them. I think this is something that may be appreciated by many since we can now more easily upload modified apps, and is a relatively simple mod for a noob to atempt... so if anyone can offer some help with that to get me started, it's a project I'd be looking to take up .
innovative ..
liked your idea.
+1
to keep it simple, you can't 'decompile' a binary code to a c++ code, the compiling process is a one-way procedure..

noob apk decode/build tools?

hello,
just wondering if anyone can point me in the right direction?
I'm interested in doing a little bit of editing on some apk's to improve the JoyOS port. It's just little things like removing chinese characters and making some slightly better translations.
From what I can gather, most of what I want to do can be achieved by editing the "strings.xml" within some of the system apk's....like JOYsettings.apk etc.
Only trouble is, I can't find any apk editing tools that work on my windows machine. Most of the ones i've seen are java based, and tend to crash whenever the file you're working on is bigger than say 100kb :s
obviously, not good for editing main system apk's....or....pretty much any apk's.
can someone point me in the right direction for what I can use to siply decode and then rebuild the edited apk's?
Gloris said:
hello,
just wondering if anyone can point me in the right direction?
I'm interested in doing a little bit of editing on some apk's to improve the JoyOS port. It's just little things like removing chinese characters and making some slightly better translations.
From what I can gather, most of what I want to do can be achieved by editing the "strings.xml" within some of the system apk's....like JOYsettings.apk etc.
Only trouble is, I can't find any apk editing tools that work on my windows machine. Most of the ones i've seen are java based, and tend to crash whenever the file you're working on is bigger than say 100kb :s
obviously, not good for editing main system apk's....or....pretty much any apk's.
can someone point me in the right direction for what I can use to siply decode and then rebuild the edited apk's?
Click to expand...
Click to collapse
Here you go...study that in the link..and tool you specificly need is apk tool or its alternatives...just read the tut carefully...ill add youtube links if needed later
http://forum.xda-developers.com/showthread.php?t=1661770
Hope i helped....
many thanks, i'll give that a good read tomorrow...when i'm a bit less sleepy
Gloris said:
many thanks, i'll give that a good read tomorrow...when i'm a bit less sleepy
Click to expand...
Click to collapse
you can change these two lines in build.prop of your rom with winrar or 7zip to make it boot in English
ro.product.locale.language=en
ro.product.locale.region=US
Then save the changes
If you want to remove chineese apps just open system folder,then app folder and simply remove what you dont like...save the changes and flash the ROM
Hope this save you some time,cause editing apk is time and nerve consuming job...
thanks. i did remove all the things like chinese app store etc...it's just a little tweaking basically of the settings.apk and some other apps that have some pretty iffy translations. my favourite so far is that instead of "low battery warning" it says "low electrical quantities"
::EDIT::
think i'm gonna give up lol.
i have apktool working, it decompiles fine, but as soon as i go to recompile (even if i make no changes) it gives at brut.androlib errors all the time.

[Q] making sense of .smali

hey guys.
can one of you masters point me in the correct direction to understanding .smali code?
I'm trying to update the video ringtone app that I had themed back in 2010. I've been able to get most of it done via .xml and .png edits, but I'm running into an issue I never ran back then. there's a check in the code of the program that tells me the app is corrupt. I know it's because it's been edited, but it's a free apk, i'm not breaking any rules. never heard of free apks being so strict.
I'm fairly certain it's down to .smali, as I've poured through all the .xmls and I don't see anything referencing that error except the strings.xml in res/values/.
within the smali i'm fairly certain i'm in the right folder, as I'm seeing different .smali files for specific parts of the program I can recognize based on the name, but nothing makes sense of what's on the smali code.
i can real .xml plainly, but .smali reads like text java...which I'm very bad at. is this something that I can visualize by using Eclipse or another Java compiler? how do you guys find what you need to edit in the code?
any help is greatly appreciated.
nobody? I know someone must know because you awesome guys do smali changes all the time!
I found a "guide" on editing/themeing Android. It mentioned I needed Eclipse. that's ALL it ever said about Eclipse...I need it, for what?!
What does it do when you try to open the program? Does it just fc or does it actually tell you that it's corrupt?
the problem only happens when I try to select a video for a specific contact.
instead of opening the video picker thing, it gives a toast notification saying the application is corrupt. the toast notification goes away and the app stays open.
I can continue to use the app otherwise, and everything else seems to be working. the share/download videos option gives the same message, but that connects to a server, so that is understandable.
the app still works. i just don't want to release it as is since you can only have one video ringtone right now, and I like having custom ringtones and I know so will other people.

Categories

Resources