Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

Making "Stock" Custom ROMs Defunct (XposedFramework) - Tweaks for any ROM Version

OP pulser_g2

26th November 2012, 06:08 PM   |  #21  
pulser_g2's Avatar
OP Developer Admin / Senior Recognized Developer
Thanks Meter: 11,193
 
19,371 posts
Join Date:Joined: Nov 2009
More
Quote:
Originally Posted by DirkStorck

If I would like to start writing my own mods is there somewhere a guide how to debugg the mod I write?
Thanks!

That's a combined WIP. Debugging - the best way is to use

XposedBridge.log("Message here");

That will be written to /data/xposed/debug.log

You should make loads of them, before and after each line, and you can be sure your code is being seen and run.

That's the basic way, I think there's a better way posted by tungstwenty in the thread I linked in the OP (towards the end?)
26th November 2012, 07:56 PM   |  #22  
DirkStorck's Avatar
Senior Member
Thanks Meter: 378
 
2,146 posts
Join Date:Joined: Sep 2009
More
Thank you. Hope I will have time at the weekend to look into it. That whole framework sounds very interesting

Send from my Omega ROM powered SGS3
26th November 2012, 08:10 PM   |  #23  
Tungstwenty's Avatar
Recognized Contributor
Thanks Meter: 4,406
 
1,824 posts
Join Date:Joined: Nov 2011
Donate to Me
More
Quote:
Originally Posted by pulser_g2

That's a combined WIP. Debugging - the best way is to use

XposedBridge.log("Message here");

That will be written to /data/xposed/debug.log

You should make loads of them, before and after each line, and you can be sure your code is being seen and run.

That's the basic way, I think there's a better way posted by tungstwenty in the thread I linked in the OP (towards the end?)

You're right.
Only recently did I find a way to directly debug it; before that it was through log messages as you suggested
Check this post for a much better way to debug.
The Following 5 Users Say Thank You to Tungstwenty For This Useful Post: [ View ]
27th November 2012, 02:40 PM   |  #24  
Tungstwenty's Avatar
Recognized Contributor
Thanks Meter: 4,406
 
1,824 posts
Join Date:Joined: Nov 2011
Donate to Me
More
MOD - Additional languages for Android 4.2 keyboard
Here's my first mod contribution for the collection

It injects into the Android 4.2 keyboard an additional language resource of your choosing so you have dictionary and swipe support for it.
The available languages are the ones for which I found .dict files on the CM repo:
  • Bulgarian (bg)
  • Croatian (hr)
  • Czech (cs)
  • Danish (da)
  • Dutch (nl)
  • Finnish (fi)
  • Georgian (ka)
  • Greek (el)
  • Hebrew (iw)
  • Hungarian (hu)
  • Norwegian Bokmål (nb)
  • Portuguese (pt_PT)
  • Russian (ru)
  • Swedish (sv)

Tested for the Portuguese (pt_PT) language on ICS and 4.1 JB.
Please leave feedback if you try it out, especially for other languages.


I'm finishing some code cleanup and adding extensive comments, will push them to GitHub later today.
Attached Files
File Type: apk Keyboard42DictInjector-1.0.0.apk - [Click for QR Code] (6.24 MB, 118 views)
Last edited by Tungstwenty; 27th November 2012 at 03:24 PM. Reason: List of supported languages
The Following 5 Users Say Thank You to Tungstwenty For This Useful Post: [ View ]
27th November 2012, 07:35 PM   |  #25  
Tungstwenty's Avatar
Recognized Contributor
Thanks Meter: 4,406
 
1,824 posts
Join Date:Joined: Nov 2011
Donate to Me
More
The code is now available at https://github.com/Tungstwenty/Keyboard42DictInjector
I hope the comments can help you get started.

My next project will be way more complex and with more advanced techniques , so it will probably take me a few days to have it ready.
The Following 6 Users Say Thank You to Tungstwenty For This Useful Post: [ View ]
27th November 2012, 09:45 PM   |  #26  
rovo89's Avatar
Senior Recognized Developer
Thanks Meter: 15,024
 
2,383 posts
Join Date:Joined: Jan 2012
More
Quite a few hacks are already available in Tweakbox. The problem with it is the unknown scope. Some of the tweaks work only in Samsung stock ROMs, maybe limited to 4.0.3, as they activate or use features of TouchWiz. And for CRT, you even need a patched native library to make it work properly, which is hard to create and can only be exchanged as a whole, no partly patches possible that might work for different devices.

So I'm not sure what's better - many small mods or one bigger collection. If there is something to configure (apart from on/off), each mod would have to include its own configuration screen. On the other hand, bug report handling and releasing new versions is more flexible if you just need to look at one tweak and users don't need to install something they don't need. So yeah.. there are upsides and downsides for both.

There is also a big feature in Tweakbox which has no UI yet, but is working fine if you edit the configuration files directly: Changing DPI and things like that on a per-app basis. I mainly use this to force some Samsung apps to 240 DPI (for which they were hardcoded), while I use a lower DPI for the rest of my phone. I will look into creating a proper UI, but first the framework needs to be cleaned up a little.

And finally, I'm using a battery icon mod via Xposed. That would be a good demonstration of replacing resources and also some kind of template. I don't remember where exactly my icons came from (for credits/approval). I think it was JKay's mod for GB, but I can easily use any other battery mod for the demonstration if I don't find the author.
The Following 9 Users Say Thank You to rovo89 For This Useful Post: [ View ]
27th November 2012, 11:30 PM   |  #27  
rovo89's Avatar
Senior Recognized Developer
Thanks Meter: 15,024
 
2,383 posts
Join Date:Joined: Jan 2012
More
Alright, the developer tutorial is updated now to the latest APIs: https://github.com/rovo89/XposedBrid...pment-tutorial
It's really extensive, but if you're interested in learning what's behind Xposed, it will give you some nice insights. It also explains some of the basics of approaching a tweak target.

There is also a page on replacing resources (e.g. strings, booleans, but also images). It's not updated yet, things have become a bit easier meanwhile. Just to give you an idea what's also possible, additionally to pure coding hacks.
The Following 9 Users Say Thank You to rovo89 For This Useful Post: [ View ]
28th November 2012, 12:54 AM   |  #28  
pulser_g2's Avatar
OP Developer Admin / Senior Recognized Developer
Thanks Meter: 11,193
 
19,371 posts
Join Date:Joined: Nov 2009
More
Quote:
Originally Posted by rovo89

Alright, the developer tutorial is updated now to the latest APIs: https://github.com/rovo89/XposedBrid...pment-tutorial
It's really extensive, but if you're interested in learning what's behind Xposed, it will give you some nice insights. It also explains some of the basics of approaching a tweak target.

There is also a page on replacing resources (e.g. strings, booleans, but also images). It's not updated yet, things have become a bit easier meanwhile. Just to give you an idea what's also possible, additionally to pure coding hacks.

Awesome, nice work!
28th November 2012, 09:55 AM   |  #29  
Senior Member
Flag Singapore
Thanks Meter: 197
 
1,585 posts
Join Date:Joined: Aug 2004
More
Tried the Xposed installer, didn't request t grant root and the allowlongsms.apk installed, but without any option to select anything else.

I rebooted my phone and tried typing an sms, but it still auto-converted to an mms after 80 characters...

On a SHV-E250S btw.
28th November 2012, 11:03 AM   |  #30  
rovo89's Avatar
Senior Recognized Developer
Thanks Meter: 15,024
 
2,383 posts
Join Date:Joined: Jan 2012
More
Did you actually hit the "Install" button inside the installer? It should display a message that the installation was successful.

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes