chillzz
Dauer-User
- 1.641
- Themenstarter
- #1.061
cyonix schrieb:Wenn du diesen link nochmal findest wäre es sehr cool wenn du ihn nochmal Posten könntest!finde es besser wenn man den lockscreen anpassen könnte....
Sent from my HTC Desire using Tapatalk
Ich hab dich nicht vergessen.
Das ist der Auszug von miuiandroid.com ...
Code:
Certainly, unfortunately the icons are part of dexters template so the icon changes wont work unless you fancy photoshopping some new ones into the 3x layouts in the file, i will be getting round to this
lets take 1 step at a time
Extract the Lockscreen.mtz downloaded from the link in first post, extract its contents using whatever, winzip, winrar etc, i use 7z as its easiest and helpful for repacking later
navigate to lockscreen/lockscreen/advance and open up manifest.xml with your favourite text editor, near the bottom of this file you will see the entries for the different apps, the first in the list (use search) is
<Intent action="android.intent.action.MAIN" package="com.miui.camera" class="com.miui.camera.Camera"/>
Changing Application Associations
the best way to do this is by capturing the logcat when launching the app you want to use (note i havnt tested this yet)
i will use miren browser as the example here
get a logcat of your device and save it to a txt file - "adb locat > mylog.txt"
open up your app that you want to use (id try and do it from a shortcut on the home screen as i found it easier to find in the logcat that way)
hit ctrl+C in the cmd window to stop recording, now open up your mylog.txt
use search until you find some (I/ActivityManager) entries to your program you want to use
in my caseit was this line i was looking for
"I/ActivityManager( 248): Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=cn.miren.browser/.ui.BrowserActivity bnds=[245,592][355,710] } from pid 547
Put 2 + 2 Together
so from the manifest.xml for browser we have
<Intent action="android.intent.action.VIEW" package="com.android.browser" class="com.android.browser.BrowserActivity"/>
and from me launching the app and capturing with logcat we have
I/ActivityManager( 248): Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=cn.miren.browser/.ui.BrowserActivity bnds=[245,592][355,710] } from pid 547
we only need to change the package and class both of which are found at the cmp=section (cn.miren.browser/.ui.BrowserActivity)
our new package is cn.miren.browser
our new class is both the package and class combined cn.miren.browser.ui.browserActivity
so we modify the manifest.xml to read
<Intent action="android.intent.action.VIEW" package="cn.miren.browser" class="cn.miren.browser.ui.BrowserActivity"/>
save the manifest.xml and overwrite the original, then you need to repack all the files back together, this is where i use 7zip, you can do with winrar aswell, you must save as a zip file and have no compression (winrar is 0 compress, 7zip is called store), save your file and rename it to xyz.mtz (xyz been whatever your want) then perform installation instructions as above
sorry that this is a bit long, not so easy to describe as i thought it would be lol