Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,805,829 Members 42,511 Now Online
XDA Developers Android and Mobile Development Forum

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

Tip us?
 
pulser_g2
Old
#21  
pulser_g2's Avatar
Developer Admin / Senior Recognized Developer - OP
Thanks Meter 10,825
Posts: 19,299
Join Date: Nov 2009
Quote:
Originally Posted by DirkStorck View Post
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?)


Having trouble getting an answer? | What is XDA about? | How to ask for help?

if [ $PM.incoming.type = $type.question.ROM.how_to_use ] || [ $PM.incoming.type = $type.question.ROM.silly_question ]; then mv $PM.incoming /.trash; PM.response($responsetype.ignore); $PM.sender.ignore_in_future=true; init.sequence($boy_who_cried_wolf); fi;

BTC: 1K2fpDsRHkirWmk3PKiqtzhVHKUJCWPWnN
PGP: 0x260F4FDEF258E3C4
 
DirkStorck
Old
#22  
DirkStorck's Avatar
Senior Member
Thanks Meter 355
Posts: 2,051
Join Date: Sep 2009
Location: Mainz
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
Samsung SG5 (G900F)
Rom: AllianceROM v5.2
Kernel ktoonsez KT-SGS5
Backup Phone:
Samsung SG3 Rom: temasek v82
 
Tungstwenty
Old
#23  
Tungstwenty's Avatar
Recognized Contributor
Thanks Meter 4,380
Posts: 1,812
Join Date: Nov 2011

 
DONATE TO ME
Quote:
Originally Posted by pulser_g2 View Post
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.

Device: Xperia Z (C6603)
ROM: Stock 4.4.2 10.5.A.0.230
Locked bootloader, rooted, XZDualRecovery
Retired device: Samsung Galaxy S2 (GT-I9100)

My threads that you might find useful:

SUPERCOMPUTER: what it sounded like before you bought it
The Following 5 Users Say Thank You to Tungstwenty For This Useful Post: [ Click to Expand ]
 
Tungstwenty
Old
(Last edited by Tungstwenty; 27th November 2012 at 02:24 PM.) Reason: List of supported languages
#24  
Tungstwenty's Avatar
Recognized Contributor
Thanks Meter 4,380
Posts: 1,812
Join Date: Nov 2011

 
DONATE TO ME
Default 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)

Device: Xperia Z (C6603)
ROM: Stock 4.4.2 10.5.A.0.230
Locked bootloader, rooted, XZDualRecovery
Retired device: Samsung Galaxy S2 (GT-I9100)

My threads that you might find useful:

SUPERCOMPUTER: what it sounded like before you bought it
The Following 5 Users Say Thank You to Tungstwenty For This Useful Post: [ Click to Expand ]
 
Tungstwenty
Old
#25  
Tungstwenty's Avatar
Recognized Contributor
Thanks Meter 4,380
Posts: 1,812
Join Date: Nov 2011

 
DONATE TO ME
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.

Device: Xperia Z (C6603)
ROM: Stock 4.4.2 10.5.A.0.230
Locked bootloader, rooted, XZDualRecovery
Retired device: Samsung Galaxy S2 (GT-I9100)

My threads that you might find useful:

SUPERCOMPUTER: what it sounded like before you bought it
The Following 6 Users Say Thank You to Tungstwenty For This Useful Post: [ Click to Expand ]
 
rovo89
Old
#26  
rovo89's Avatar
Senior Recognized Developer
Thanks Meter 14,080
Posts: 2,367
Join Date: Jan 2012
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.
Tired of updating your mod for every new ROM release?
You want give users the possibility to combine different mods without creating tons of different files for all possible combinations?
Then have a look at my Xposed framework - modifications without APK changes!
The Following 9 Users Say Thank You to rovo89 For This Useful Post: [ Click to Expand ]
 
rovo89
Old
#27  
rovo89's Avatar
Senior Recognized Developer
Thanks Meter 14,080
Posts: 2,367
Join Date: Jan 2012
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.
Tired of updating your mod for every new ROM release?
You want give users the possibility to combine different mods without creating tons of different files for all possible combinations?
Then have a look at my Xposed framework - modifications without APK changes!
The Following 9 Users Say Thank You to rovo89 For This Useful Post: [ Click to Expand ]
 
pulser_g2
Old
#28  
pulser_g2's Avatar
Developer Admin / Senior Recognized Developer - OP
Thanks Meter 10,825
Posts: 19,299
Join Date: Nov 2009
Quote:
Originally Posted by rovo89 View Post
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!


Having trouble getting an answer? | What is XDA about? | How to ask for help?

if [ $PM.incoming.type = $type.question.ROM.how_to_use ] || [ $PM.incoming.type = $type.question.ROM.silly_question ]; then mv $PM.incoming /.trash; PM.response($responsetype.ignore); $PM.sender.ignore_in_future=true; init.sequence($boy_who_cried_wolf); fi;

BTC: 1K2fpDsRHkirWmk3PKiqtzhVHKUJCWPWnN
PGP: 0x260F4FDEF258E3C4
 
coolfire
Old
#29  
Senior Member
Thanks Meter 194
Posts: 1,575
Join Date: Aug 2004
Location: Singapore
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.
CURRENT:
Main - SGN2 - SHV-E250S 32GB
ROM:
|ROM|-|MyRom Revolution|-|V5|-|-2-27-13-|
and Simplistic Framework V3.5.1
Kernel: Always changing

Standby - Leo
WM ROM: NON
WM Radio: 2.15.50.14
Droid: [Dec. 9, 2012][ROM][720p] NexusHD2-JellyBean-4.1.2-CM10 V1.3a [NAND with DataOnEXT]

RETIRED

SGN | SGSII | Blackstone | Atom Life | Stealth | Dopod |577W | XDA2
 
rovo89
Old
#30  
rovo89's Avatar
Senior Recognized Developer
Thanks Meter 14,080
Posts: 2,367
Join Date: Jan 2012
Did you actually hit the "Install" button inside the installer? It should display a message that the installation was successful.
Tired of updating your mod for every new ROM release?
You want give users the possibility to combine different mods without creating tons of different files for all possible combinations?
Then have a look at my Xposed framework - modifications without APK changes!

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes