Some of you may have noticed that, despite changing the User-Agent in the browser, you are still sent to a mobile website anyway. Gawker media (io9, lifehacker, gizmodo, etc) is especially obnoxious as there is no way to disable this, and the redirect fires when you hit the back button, keeping you trapped. Blogs hosted on wordpress.com have an option to view the full site, but you must select this for each blog.
These sites detect the UAProf (X-Wap-Profile) header, which android's web framework tacks onto every request. On the Epic - unlike other phones - there is no way to disable this using hiddenmenu; X-Wap-Profile: http://device.sprintpcs.com/Samsung/SPH-D700/EC05.rdf is hardcoded.
To further complicate matters, Google checkin, MMS, and Sprint Market purchasing all use webkit, and break if this header is suppressed.
Below are two smali patches that suppress the header in different ways. Only one is meant to be applied.
#1 is strict, and suppresses UAProf unless the User-Agent contains 'Android' or 'GoogleLog'. I have -not- tested this against the stock MMS client, but it works perfectly with AOSP provided you select the Android User-Agent.
#2 only suppresses UAProf if the User-Agent string contains 'Windows', which means it won't work for browsers that try to masquerade as a linux or mac browser in desktop mode.
I've tested patch#1 on SRF 1.1, with Dolphin Browser 4.x and AOSP MMS.
To apply:
$ adb pull /system/framework.jar .
$ apktool d framework.jar
$ unzip -p /somewhere/uaprof-patches.zip uaprof-1.diff.txt | patch -l -p0
-OR-
$ unzip -p /somewhere/uaprof-patches.zip uaprof-2.diff.txt | patch -l -p0
$ apktool b framework.jar.out
$ zip -ju framework.jar build/apk/classes.dex
I've thrown framework.jar directly back into /system/framework and rebooted without issue, but to play it safe you may wish to create an update.zip and backup before flashing in CWM.
Patch1:
Code:
diff -ur orig-framework.jar.out/smali/android/webkit/FrameLoader.smali framework.jar.out/smali/android/webkit/FrameLoader.smali
--- orig-framework.jar.out/smali/android/webkit/FrameLoader.smali 2011-10-01 15:09:02.000000000 +0000
+++ framework.jar.out/smali/android/webkit/FrameLoader.smali 2011-10-01 17:21:36.000000000 +0000
@@ -744,7 +744,7 @@
.end method
.method private populateStaticHeaders()V
- .locals 8
+ .locals 10
.prologue
const-string v6, "Accept"
@@ -824,6 +824,16 @@
move-result-object v6
+# UAProfMod
+ const-string v8, "Android"
+ invoke-virtual {v6, v8}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
+ move-result v8
+ const-string v9, "GoogleLog"
+ invoke-virtual {v6, v9}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
+ move-result v9
+
+# /UAProfMod
+
invoke-interface {v4, v5, v6}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
.line 369
@@ -851,6 +861,12 @@
.local v2, ver:Ljava/lang/String;
iget-object v4, p0, Landroid/webkit/FrameLoader;->mHeaders:Ljava/util/Map;
+# UAProfMod
+ if-nez v9, :cond_4
+ if-eqz v8, :cond_3
+ :cond_4
+# /UaProfMod
+
const-string v5, "X-Wap-Profile"
new-instance v6, Ljava/lang/StringBuilder;
@@ -879,6 +895,10 @@
invoke-interface {v4, v5, v6}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
+# UAProfMod
+ :cond_3
+# /UAProfMod
+
.line 375
return-void
.end method
Patch2:
Code:
diff -ur orig-framework.jar.out/smali/android/webkit/FrameLoader.smali framework.jar.out/smali/android/webkit/FrameLoader.smali
--- orig-framework.jar.out/smali/android/webkit/FrameLoader.smali 2011-10-01 15:09:02.000000000 +0000
+++ framework.jar.out/smali/android/webkit/FrameLoader.smali 2011-10-01 17:19:06.000000000 +0000
@@ -744,7 +744,7 @@
.end method
.method private populateStaticHeaders()V
- .locals 8
+ .locals 9
.prologue
const-string v6, "Accept"
@@ -824,6 +824,12 @@
move-result-object v6
+# UAProfMod
+ const-string v8, "Windows"
+ invoke-virtual {v6, v8}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
+ move-result v8
+# /UAProfMod
+
invoke-interface {v4, v5, v6}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
.line 369
@@ -851,6 +857,10 @@
.local v2, ver:Ljava/lang/String;
iget-object v4, p0, Landroid/webkit/FrameLoader;->mHeaders:Ljava/util/Map;
+# UAProfMod
+ if-nez v8, :cond_3
+# /UaProfMod
+
const-string v5, "X-Wap-Profile"
new-instance v6, Ljava/lang/StringBuilder;
@@ -879,6 +889,10 @@
invoke-interface {v4, v5, v6}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
+# UAProfMod
+ :cond_3
+# /UAProfMod
+
.line 375
return-void
.end method
One final note; gawker websites are -horribly- coded and try to pre-cache all sorts of junk. They actually -need- the mobile site, and will run like molassis unless you block
the following:
||dyn-cache.io9.com^
||dyn-cache.lifehacker.com^
||dyn-cache.gizmodo.com^
http://hyperion.gawker.com^
http://fastcache.gawkerassets.com/assets/images/*/*/*/xsmall_
http://fastcache.gawkerassets.com/assets/images/*/*/*/micro_
You did all this just for the hate of gawker? I understand but daaaammmn
Sent from my SPH-D700 using xda premium
Actually it was one too many wordpress.com blogs that did it. Their idea of 'mobile-friendly' is rather minimalist.
Porn sites do the same ****
Sent from my SPH-D700 using xda premium
nerdtaco said:
Porn sites do the same ****
Sent from my SPH-D700 using xda premium
Click to expand...
Click to collapse
And there isn't a smali patch to get yourself a girlfriend, that still needs to be done the old fashioned way
Wait... I'm not saying knock her out and drag her home by the hair... Much easier, I would imagine, but a little TOO old fashioned...
Sent from my SPH-D700 using XDA App
nerdtaco said:
Porn sites do the same ****
Sent from my SPH-D700 using xda premium
Click to expand...
Click to collapse
lol
10chars
Any way these patches could be put together into a CWM flashable zip?
Sent from my SPH-D700 using xda premium
Ceelos09 said:
Any way these patches could be put together into a CWM flashable zip?
Sent from my SPH-D700 using xda premium
Click to expand...
Click to collapse
Nope. Well, possibly. But it'd kinda be like a theme. Build-specific.
sent from my miui-ified epic
Or you can just use skyfire...
Sent from my SPH-D700 using Tapatalk
lafronz said:
Or you can just use skyfire...
Sent from my SPH-D700 using Tapatalk
Click to expand...
Click to collapse
Opera Mobile also has an option to set it as a desktop agent.
lafronz said:
Or you can just use skyfire...
Click to expand...
Click to collapse
I thought skyfire uses webkit? If so, it sends uaprof too.
cornaljoe said:
Opera Mobile also has an option to set it as a desktop agent.
Click to expand...
Click to collapse
Opera and Firefox aren't affected by this issue. They just suffer from crappy UIs
Ceelos09 said:
Any way these patches could be put together into a CWM flashable zip?
Click to expand...
Click to collapse
For what rom? I could upload my framework.jar but I imagine it would only work on SRF 1.1.0 (ec05) and derivatives that don't modify framework.jar.
Actually after trying out skyfire for a bit most websites didn't send me to the mobile version. Except for the occasional youtube page being m.youtube instead
First of all THANK YOU for this great post.
I looked very hard finding where the wap profile code is located. I was searching in the wrong place thinking it was on the Browser's code not thinking of the framework.
Your diff patch is framework related. It would be nice if you would give instructions and code for any framework.
I added the following code on my Xperia Neo V .62 official Rom.
line 744 on file framework.jar.out\smali\android\webkit\FrameLoader.smali
change locals 5 to locals 7
Code:
.method private populateStaticHeaders()V
.locals 5
line 839 on same file add the lines below ".line 371"
Code:
.line 371
#patch remove this line after adding
iget-object v4, p0, Landroid/webkit/FrameLoader;->mSettings:Landroid/webkit/WebSettings;
invoke-virtual {v4}, Landroid/webkit/WebSettings;->getUserAgentString()Ljava/lang/String;
move-result-object v4
const-string v3, "Android"
invoke-virtual {v4, v3}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v5
const-string v3, "GoogleLog"
invoke-virtual {v4, v3}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v6
if-nez v5, :cond_4
if-eqz v6, :cond_3
:cond_4
# patch ends here remove this line
iget-object v2, p0, Landroid/webkit/FrameLoader;->mHeaders:Ljava/util/Map;
const-string/jumbo v3, "x-wap-profile"
In my post you will find the compiled framework.jar and an "all in one" batch script which can be used to install it on a rooted device with just one click!
Tested and works fine!
This is for Xperia Neo V .62 official Rom ONLY
Related
Alright, here's my first "release": an ugly "hack" (more like "skript kidding", but that's a different story) enabling trackpad-to-wake and trackpad-to-unlock on new Sense (based on 1.72) ROMs.
Credits to muhhhh and b1oh4zard for extracting the htclockscreen.apk from the Virtuous 0.9.0 (thread http://forum.xda-developers.com/showthread.php?t=929182) and to a very old (pre-1.72) update.zip for the same I had lying around on my drive - I'm sorry, but I don't remember who built that in the first place (if the author recognizes it, please step forward and I'll be glad to provide a link or something).
Basically, all I did was unzip the old update.zip - replace the apk file - zip back.
How to install: download the file below to your SD card and flash from recovery.
Tested and working fine with Baadnewz v1.8c -> first click on trackpad wakes the device, the second click unlocks it. Enjoy and please report back if any trouble.
If your ROM is based on 1.84, do NOT flash my file, but use the one by poorhatsoap instead: http://forum.xda-developers.com/showpost.php?p=11325344&postcount=4825 .
Reserved (just in case).
Sorry, I am not sure what's the prupose of this function ? Is this for LOCK and UNLOCK the DESIRE by using the trackpad instead of the power button ? Thanks
Fantastic - thanks for this!
chihliouma said:
Sorry, I am not sure what's the prupose of this function ? Is this for LOCK and UNLOCK the DESIRE by using the trackpad instead of the power button ? Thanks
Click to expand...
Click to collapse
Just for waking/unlocking - the locking is still done by the Power button or automatically following the screen timeout.
thank you very much
works with my baadnwz 1.8c
Great! Works on coolexe HD v2. Just the thing I missed.
Sent from my HTC Desire using XDA App
Glad to hear it's working, it's one functionality I can't live without... the power button is in an impossible position for one-handed operation.
airwave88 said:
Alright, here's my first "release": an ugly "hack" (more like "skript kidding", but that's a different story) enabling trackpad-to-wake and trackpad-to-unlock on new Sense (based on 1.72) ROMs.
Credits to muhhhh and b1oh4zard for extracting the htclockscreen.apk from the Virtuous 0.9.0 (thread http://forum.xda-developers.com/showthread.php?t=929182) and to a very old (pre-1.72) update.zip for the same I had lying around on my drive - I'm sorry, but I don't remember who built that in the first place (if the author recognizes it, please step forward and I'll be glad to provide a link or something).
Basically, all I did was unzip the old update.zip - replace the apk file - zip back.
How to install: download the file below to your SD card and flash from recovery.
Tested and working fine with Baadnewz v1.8c -> first click on trackpad wakes the device, the second click unlocks it. Enjoy and please report back if any trouble.
Click to expand...
Click to collapse
Great...thanks a lot!!!
OMG, thank you som much. was thinking to start a thread about this earlier today.
Thank you so much. I was going crazy without this.
Trackpad wake & unlock only (no power button wake)
Any chance someone can do this without power button wake; my phone keeps turning on in my pocket. there used to be options with MCR roms so that you could have trackpad wake only.
Thanks
one question... doesn't roms like RCMixHD got that already for longer than 3 months?
Flashmaniac said:
one question... doesn't roms like RCMixHD got that already for longer than 3 months?
Click to expand...
Click to collapse
No idea to be honest, I've only been using baadnewz's HD ROM (and some 2.3 flavors) for quite a while how.
However, I believe the 1.72 base may be a little bit newer than three months.
Flashmaniac said:
one question... doesn't roms like RCMixHD got that already for longer than 3 months?
Click to expand...
Click to collapse
I had it for the older base, i never patched the newbase lockscreen
So thanks man, spared chefs some job!
robocik said:
I had it for the older base, i never patched the newbase lockscreen
So thanks man, spared chefs some job!
Click to expand...
Click to collapse
Not my work, the patched apk is coming from Virtuous 0.9.0, I only repacked it to a flashable-friendly format.
tinker2000 said:
Any chance someone can do this without power button wake; my phone keeps turning on in my pocket. there used to be options with MCR roms so that you could have trackpad wake only.
Thanks
Click to expand...
Click to collapse
I looked into it, but I'm quite a newbie in this field; if someone can point me in the right direction, would be glad to create several different setups (with/without power button active, with/without menu button for unlock etc).
So far, I managed to unpack the apk, deodex the classes.dex using baksmali and compare the patched/non-patched files. The only differences are in the htclockscreen.smali file (the 342 KB one), but can't make out where the correct button is actually declared (the main suspect is line 801, but can't tell for sure):
Code:
E:\Desire\smali>fc htclockscreen.smali htclockscreen_orig.smali
Comparing files HtcLockScreen.smali and HTCLOCKSCREEN_ORIG.SMALI
***** HtcLockScreen.smali
.line 801
.local v0, msg:Landroid/os/Message;
const v1, 0x17
if-ne p1, v1, :cond_2d
invoke-virtual {p0}, Lcom/htc/lockscreen/HtcLockScreen;->goToUnlockScreen()V
:cond_2d
const/16 v1, 0x14
***** HTCLOCKSCREEN_ORIG.SMALI
.line 800
.local v0, msg:Landroid/os/Message;
const/16 v1, 0x14
*****
***** HtcLockScreen.smali
if-eq p1, v1, :cond_46
***** HTCLOCKSCREEN_ORIG.SMALI
if-eq p1, v1, :cond_3e
*****
***** HtcLockScreen.smali
if-eq p1, v1, :cond_46
***** HTCLOCKSCREEN_ORIG.SMALI
if-eq p1, v1, :cond_3e
*****
***** HtcLockScreen.smali
if-eq p1, v1, :cond_46
***** HTCLOCKSCREEN_ORIG.SMALI
if-eq p1, v1, :cond_3e
*****
***** HtcLockScreen.smali
if-eq p1, v1, :cond_46
.line 805
iget-object v1, p0, Lcom/htc/lockscreen/HtcLockScreen;->mReminderView:Lcom/h
tc/lockscreen/HtcLSViewInterface;
***** HTCLOCKSCREEN_ORIG.SMALI
if-eq p1, v1, :cond_3e
.line 804
iget-object v1, p0, Lcom/htc/lockscreen/HtcLockScreen;->mReminderView:Lcom/h
tc/lockscreen/HtcLSViewInterface;
*****
***** HtcLockScreen.smali
if-eqz v1, :cond_46
.line 806
iget-object v1, p0, Lcom/htc/lockscreen/HtcLockScreen;->mReminderView:Lcom/h
tc/lockscreen/HtcLSViewInterface;
***** HTCLOCKSCREEN_ORIG.SMALI
if-eqz v1, :cond_3e
.line 805
iget-object v1, p0, Lcom/htc/lockscreen/HtcLockScreen;->mReminderView:Lcom/h
tc/lockscreen/HtcLSViewInterface;
*****
***** HtcLockScreen.smali
:cond_46
move v1, v4
***** HTCLOCKSCREEN_ORIG.SMALI
:cond_3e
move v1, v4
*****
***** HtcLockScreen.smali
.line 810
goto :goto_20
***** HTCLOCKSCREEN_ORIG.SMALI
.line 809
goto :goto_20
*****
E:\Desire\smali>
yah, made my life easier
baadnewz said:
yah, made my life easier
Click to expand...
Click to collapse
Thanks for the link mate.
Now just pray people bother reading the post before asking in your thread "is it possible to have a new version of the ROM with trackpad-to-unlock?"
OMG Finally the one working on ReflexTSense 1.6.1. Thanks man
airwave88 said:
Thanks for the link mate.
Now just pray people bother reading the post before asking in your thread "is it possible to have a new version of the ROM with trackpad-to-unlock?"
Click to expand...
Click to collapse
there will be a couple that wont read, why would they do that it's easier to ask and demand, then read a little
This walk-through can be used to get around that device compatibility check, by hard coding the game you purchased to see your Device as a Nexus S (or what ever device you would like). Please be aware that just because the game now runs on your device doesn't mean it's actually compatible, you may still receive errors.
This patch/hack/whatever doesn't disable the DRM licensing, so it's useless unless you bought the game. I won't be working on something to disable the license check, so don't ask. I will not be distributing the fully patched games, so don't ask. If you have any questions about the patch, do ask.
Steps;
1. Decompile the Gameloft apk of your choice with your favorite decompiler (Apktool, etc).
2. Open up the /smali/com/gameloft/android/ANMP/GloftA6HP/installer/GameInstaller.smali in your favorite text editor and look for the following lines;
Code:
const-string v1, "?model="
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
sget-object v1, Landroid/os/Build;->MODEL:Ljava/lang/String;
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
&
Code:
const-string v1, "&device="
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
invoke-static {}, Lcom/gameloft/android/ANMP/GloftA6HP/GLUtils/SUtils;->getPhoneDevice()Ljava/lang/String;
move-result-object v1
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
3. Edit them as follows;
Code:
const-string v1, "?model="
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
const-string v1, "Nexus S"
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
&
Code:
const-string v1, "&device="
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
const-string v1, "samsung"
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
4. Open up the /smali/com/gameloft/android/ANMP/GloftM3HM/GLUtils/XPlayer.smali in your favorite text editor and look for the following lines;
Code:
const-string v1, "&android_build_model="
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
invoke-static {}, Lcom/gameloft/android/ANMP/GloftM3HM/GLUtils/Device;->getPhoneModel()Ljava/lang/String;
move-result-object v1
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
&
Code:
const-string v1, "&android_build_device="
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
invoke-static {}, Lcom/gameloft/android/ANMP/GloftM3HM/GLUtils/Device;->getDevice()Ljava/lang/String;
move-result-object v1
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
5. Edit them as follows;
Code:
const-string v1, "&android_build_model="
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
const-string v1, "Nexus S"
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
&
Code:
const-string v1, "&android_build_device="
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
const-string v1, "Samsung"
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
5. Recompile the apk and then sign the apk (autosign).
6. Enjoy a job well done.
As I'm sure you already guess all I did was remove the phone device and model calls and replace them with static const-strings. I'm not a fan of changing my device in the build.prop,which was the previous work around, so to me this is a better way to do it. I've looked at a few different decompiled Gameloft games and the gameinstall and xplayer smali's seem to work the same way, so I'd imagine you should be able to do this with any GameLoft game.. I actually only own one GameLoft game, but it worked perfectly on Asphalt 6 on my Touchpad.
If you run across any issues with this method, just post it in the thread.
Thanks to Unknown26man of Slatedroid for bringing this to my attention, I had actually never tried to play Asphalt 6 on my Touchpad till he mentioned it.
I posted this originally on SDX, but I've seen a bunch of questions on XDA about Gameloft game compatability, so I figured I'd post it here too.
This is perfect. Thanks so much!
Working for HTC one x
Sent from my HTC One X using xda premium
I'm trying to do Order and Chaos b/c I bought it on my phone but really want to play it on my asus transformer.
I found the location where you make the edits, but it appears there's a duplicate of that same portion. Do I edit both, or just the last one, or trial and error it?
I'm using virtuous ten studio btw, if that makes any difference.
-edit-
Jk, I found where I need to edit.
richmondo said:
This is perfect. Thanks so much!
Working for HTC one x
Sent from my HTC One X using xda premium
Click to expand...
Click to collapse
Yeah I read a few different threads about the HTC Ones getting the not compatible errors, glad it worked for you.
If I could thank you anymore on the OP, I'd thank you about 3,000 times right now.
OMG
So I'm about to do this to get this working on my Transformer (Tegra 2). Do I need to set the model number to match another Tegra 2 device, or will it work using the Nexus S?
I just know that in my attempt to get this working and looking for SD card data, there have been various versions such as PowerVR and Tegra and Snapdragon, etc.
I just make sure I do it right and right the first time.
player911 said:
So I'm about to do this to get this working on my Transformer (Tegra 2). Do I need to set the model number to match another Tegra 2 device, or will it work using the Nexus S?
I just know that in my attempt to get this working and looking for SD card data, there have been various versions such as PowerVR and Tegra and Snapdragon, etc.
I just make sure I do it right and right the first time.
Click to expand...
Click to collapse
I'd use what ever is closest supported device to the device your loading it on. I used the Nexus S in the example, because it worked fine on my Touchpad.
Rafa6571 said:
[*] C:\Users\Edward\Desktop\AutoAPKTool2.0.4\_INPUT_APK\BSHD
recompiling C:\Users\Edward\Desktop\AutoAPKTool2.0.4\_INPUT_APK\BSHD...
I: Smaling...
I: Building resources...
invalid resource directory name: C:\Users\Edward\Desktop\AutoAPKTool2.0.4\_INPUT_APK\BSHD\res/drawable-xlarge
invalid resource directory name: C:\Users\Edward\Desktop\AutoAPKTool2.0.4\_INPUT_APK\BSHD\res/values-xlarge
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\Edward\AppData\Local\Temp\APKTOOL92022326272817367.tmp, -I, C:\Users\Edward\apktool\framework\1.apk, -S, C:\Users\Edward\Desktop\AutoAPKTool2.0.4\_INPUT_APK\BSHD\res, -M, C:\Users\Edward\Desktop\AutoAPKTool2.0.4\_INPUT_APK\BSHD\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:193)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:301)
at brut.androlib.Androlib.buildResources(Androlib.java:248)
at brut.androlib.Androlib.build(Androlib.java:171)
at brut.androlib.Androlib.build(Androlib.java:154)
at brut.apktool.Main.cmdBuild(Main.java:182)
at brut.apktool.Main.main(Main.java:67)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\Edward\AppData\Local\Temp\APKTOOL92022326272817367.tmp, -I, C:\Users\Edward\apktool\framework\1.apk, -S, C:\Users\Edward\Desktop\AutoAPKTool2.0.4\_INPUT_APK\BSHD\res, -M, C:\Users\Edward\Desktop\AutoAPKTool2.0.4\_INPUT_APK\BSHD\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:191)
... 6 more
El sistema no puede encontrar el controlador especificado.
Click to expand...
Click to collapse
I get this error when i try to compile
I know there was an update to the smali compiler/decompiler that I had to find and install because I was getting similar errors when working on something else not this Gameloft thing. Not sure if that applies here but I noticed the smali error.
Sent from my PG41200 using Xparent Purple Tapatalk 2
rafa6571 said:
I get this error when i try to compile
Click to expand...
Click to collapse
Because your not making any changes to the resource files run apktool like this;
"apktool d -r whatever.apk"
Nice little tutorial. Took some researching to learn how the actual commands to recompile and sign it. Overall it was simple. Since I have a Transformer, I used "Xoom" and "Motorola" vs Samsung and Nexus S.
I copied it over and it installed and is currently downloading the SD card files.
I hate that Gameloft does this stupid check. Glad I can finally bypass it.
apktool gives NullPointerException when trying to compile back version 1.1.3 of O&C.
r2beta0 said:
apktool gives NullPointerException when trying to compile back version 1.1.3 of O&C.
Click to expand...
Click to collapse
Have you managed to get the game to recompile. I cant seem to get it to compile whatever I do. And I have xperience with apktool as I did a lot of ROM work and app editing on the x10 and these GL are the most annoying yet for not recompiling
Sent from my LT18i using xda premium
Blackwatch89 said:
Have you managed to get the game to recompile. I cant seem to get it to compile whatever I do. And I have xperience with apktool as I did a lot of ROM work and app editing on the x10 and these GL are the most annoying yet for not recompiling
Sent from my LT18i using xda premium
Click to expand...
Click to collapse
Make sure you're using Java 6 instead of 7 (adjusted in Control Panel>Java if in windows). By switching back that switched the compiling errors for me
Blackwatch89 said:
Have you managed to get the game to recompile. I cant seem to get it to compile whatever I do. And I have xperience with apktool as I did a lot of ROM work and app editing on the x10 and these GL are the most annoying yet for not recompiling
Sent from my LT18i using xda premium
Click to expand...
Click to collapse
The edits made to the XPlayer.smali are slightly different then the example I gave. I believe O&C uses v1 and v2 rather then v0 and v1 in the Xplayer.smali code for "&android_build_device=" and "&android_build_model=".
I was able to get it to compile.
omac_ranger said:
Make sure you're using Java 6 instead of 7 (adjusted in Control Panel>Java if in windows). By switching back that switched the compiling errors for me
Click to expand...
Click to collapse
Ofc what was I thinking . I updated to 7 as minecraft started lagging lol. Thanks. I managed to get it to recompile anyways and now it works on my Mrs one x XD was hard work though. I remember switching back to java6 as I needed to root my Mrs sensation and know that its safer using 6 for android development. Thanks for the reminder
Sent from a coffee machine running android 4.0.3b FW. 4.0.3.B.0.500
ften said:
The edits made to the XPlayer.smali are slightly different then the example I gave. I believe O&C uses v1 and v2 rather then v0 and v1 in the Xplayer.smali code for "&android_build_device=" and "&android_build_model=".
I was able to get it to compile.
Click to expand...
Click to collapse
Got it done now. Chamged it to think its an Asus Transformer 101 Tegra3 Edition and the graphics on the one x are just like OMG. I even emailed Gameloft saying they need to get there as**s in gear as if we can do it why cant they and I know what there answer will be. "Its because we have not done any test for that device. As no test have been done we can not confirm it as compatible for that device" thats what they will say
Sent from a coffee machine running android 4.0.3b FW. 4.0.3.B.0.500
o&c 1.1.3
Could someone pm me with a recomplied order and chaos 1.1.3? my pc is down atm so all I have is my phone currently and all the so called cracked apks I've found for o&c 1.1.3. Give me the same error as the version I bought ok Google play. I can give my email in the reply if someone would be so gracious as to help me out.
gsxr0685 said:
Could someone pm me with a recomplied order and chaos 1.1.3? my pc is down atm so all I have is my phone currently and all the so called cracked apks I've found for o&c 1.1.3. Give me the same error as the version I bought ok Google play. I can give my email in the reply if someone would be so gracious as to help me out.
Click to expand...
Click to collapse
What device is it for?
Sent from my LT18i using xda premium
Isn't my work all credits to @kin201303
original thread: http://forum.xda-developers.com/showthread.php?t=2729438
Root and deodexed framework2.jar recommended.
Needed tools:
Backsmali/Smali
Notepad++
7Zip
1.) Baksmali framework2.jar
2.) Navigate to com/samsung/android/multiwindow folder
3.) Open MultiWindowApplicationInfos.smali
find: .field private static final SUPPORTEDSCALE_ALL_APPLICATIONS:Z
add blue
Code:
# static fields
[COLOR="Blue"].field private static final CONFIG_FILE:Ljava/lang/String; = "/system/etc/mw_blacklist.txt"[/COLOR]
[COLOR="DarkGreen"].field private static final SUPPORTEDSCALE_ALL_APPLICATIONS:Z[/COLOR]
find: .field mNotSupportScaleAppList:Ljava/util/ArrayList;
add blue
Code:
.end field
[COLOR="Blue"].field mMaxPenWindowCount:I
.field private mMultiWindowBlackList:Ljava/util/List;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/List",
"<",
"Ljava/lang/String;",
">;"
}
.end annotation
.end field [/COLOR]
[COLOR="DarkGreen"].field mNotSupportScaleAppList:Ljava/util/ArrayList;[/COLOR]
find: .method public isSupportApp(Ljava/lang/StringZ
overwrite the whole method with this new one:
Code:
[COLOR="DarkGreen"].method public isSupportApp(Ljava/lang/String;)Z[/COLOR]
.registers 6
iget-object v2, p0, Lcom/samsung/android/multiwindow/MultiWindowApplicationInfos;->mMultiWindowBlackList:Ljava/util/List;
if-nez v2, :cond_3b
new-instance v2, Ljava/util/ArrayList;
invoke-direct {v2}, Ljava/util/ArrayList;-><init>()V
iput-object v2, p0, Lcom/samsung/android/multiwindow/MultiWindowApplicationInfos;->mMultiWindowBlackList:Ljava/util/List;
new-instance v2, Ljava/io/File;
const-string v3, "/system/etc/mw_blacklist.txt"
invoke-direct {v2, v3}, Ljava/io/File;-><init>(Ljava/lang/String;)V
invoke-virtual {v2}, Ljava/io/File;->exists()Z
move-result v2
if-eqz v2, :cond_3b
:try_start_18
new-instance v1, Ljava/io/BufferedReader;
new-instance v2, Ljava/io/FileReader;
const-string v3, "/system/etc/mw_blacklist.txt"
invoke-direct {v2, v3}, Ljava/io/FileReader;-><init>(Ljava/lang/String;)V
invoke-direct {v1, v2}, Ljava/io/BufferedReader;-><init>(Ljava/io/Reader;)V
:cond_24
:goto_24
invoke-virtual {v1}, Ljava/io/BufferedReader;->readLine()Ljava/lang/String;
move-result-object v0
if-eqz v0, :cond_3b
invoke-virtual {v0}, Ljava/lang/String;->trim()Ljava/lang/String;
move-result-object v0
invoke-virtual {v0}, Ljava/lang/String;->length()I
move-result v2
if-lez v2, :cond_24
iget-object v2, p0, Lcom/samsung/android/multiwindow/MultiWindowApplicationInfos;->mMultiWindowBlackList:Ljava/util/List;
invoke-interface {v2, v0}, Ljava/util/List;->add(Ljava/lang/Object;)Z
:try_end_39
.catch Ljava/lang/Exception; {:try_start_18 .. :try_end_39} :catch_3a
goto :goto_24
:catch_3a
move-exception v2
:cond_3b
iget-object v2, p0, Lcom/samsung/android/multiwindow/MultiWindowApplicationInfos;->mMultiWindowBlackList:Ljava/util/List;
invoke-interface {v2, p1}, Ljava/util/List;->contains(Ljava/lang/Object;)Z
move-result v2
if-nez v2, :cond_45
const/4 v2, 0x1
:goto_44
return v2
:cond_45
const/4 v2, 0x0
goto :goto_44
.end method
find: .method public isSupportScaleApp(Landroid/content/pm/ActivityInfoZ
overwrite the whole method with this new one:
Code:
[COLOR="DarkGreen"].method public isSupportScaleApp(Landroid/content/pm/ActivityInfo;)Z[/COLOR]
.registers 2
const/4 p0, 0x1
return p0
.end method
4.) Save your changes
5.) Smali classout folder
6.) Add the new classes.dex file to framework2.jar with 7Zip
7.) Push to your Phone
8.) Copy the attached mw_backlist.txt to system/etc folder set permissions. (rw-r--r--)
9.) Reboot
4.4.2 Multi Instance & Quad view
Optional: Multi instance
find: .method public isSupporMultiInstance(Landroid/content/pm/ActivityInfoZ
Delete red
Add blue
Code:
[COLOR="DarkGreen"].method public isSupporMultiInstance(Landroid/content/pm/ActivityInfo;)Z[/COLOR]
.registers 5
.parameter "activityInfo"
.prologue
[COLOR="red"]const/4 v0, 0x0[/COLOR]
[COLOR="blue"]const/4 v0, 0x1[/COLOR]
.line 217
if-eqz p1, :cond_7
iget-object v1, p1, Landroid/content/pm/ComponentInfo;->applicationInfo:Landroid/content/pm/ApplicationInfo;
if-nez v1, :cond_8
Optional: Quad view
Thanks to @unclefab for sharing!
Original thread: http://forum.xda-developers.com/showthread.php?t=2770531
Whit this mod you can see 4 app in multi window. (second & third screen shot in the attachment)
Download the attached rar file and copy com.sec.feature.multiwindow.quadview.xml from it to:
/ system / etc / permissions folder
Set permissions to rw-r--r--
Reboot.
good good good. Thanks for sharing
Very cool! Good job
Sent from my SM-N900T using Tapatalk 2
tkari4 said:
Optional: Multi instance
...
Click to expand...
Click to collapse
Just saw this one and I am just like a Woohoo! Thanks buddy...
Thank you tkari4. It also works great in the S5 port (why not ).
Thanks man!!!!
:good:
Nice job!! Really great thing..
Ancient phones: Nokia 3310, 5210, 6610, 6600, Samsung E700, Samsung D410, Nokia N73, Siemens SL55, Iphone 2G, Nokia E5, Samsung galaxy S2, S3, Galaxy grand duos.
Sent from my samsung note III N9005.
Rooting needed?
Do i need to root to use it? My N3 still under warranty and i dont wanna void it...yet
Netpreneur said:
Do i need to root to use it? My N3 still under warranty and i dont wanna void it...yet
Click to expand...
Click to collapse
Yes, root needed.
Can someone mod the files and make a flashable zip for the stock Tmo NE6 rom for us noobs please. Thank you
Sent from my SM-N900T using Tapatalk
Post your file framework2.jar and twframework2.odex in dropbox, mega or other service and I mod and make a flashable zip file for you.
Sent from my SM-N9005 using xda premium
framework file
technoyama said:
Post your file framework2.jar and twframework2.odex in dropbox, mega or other service and I mod and make a flashable zip file for you.
Sent from my SM-N9005 using xda premium
Click to expand...
Click to collapse
Hi. I attached the files you asked for. Thank you
Good work
Enviado desde mi SM-N9005 mediante Tapatalk
Is this mod for odex rom? Im getting an android upgrading message after every reboot. An im sure thats what happens with odex mods......could be wrong tho lol
Sent from my SM-N9005 using XDA Premium 4 mobile app
maskerwsk said:
Is this mod for odex rom? Im getting an android upgrading message after every reboot. An im sure thats what happens with odex mods......could be wrong tho lol
Sent from my SM-N9005 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
Thanks added to OP.
Only for deodexed jar.
Great Job...
Even works with my Note2....
Thanks..
Hi man! Thanks for sharing your guide. I am having problems in making it working for N8000. I have done all those changes to smali but no luck. Do you have an hint ?
Vish.N said:
Hi. I attached the files you asked for. Thank you
Click to expand...
Click to collapse
Hi Vish.N
I access the XDA's Forum just today. I found a problem when trying to deodex your framework2.jar and I'll check what might be going wrong in the process. I'm a bit out of time because final exams here at the college where I teach. But by the end of the week I send you the modified file.
Sorry for answering just now
Mikyno said:
Hi man! Thanks for sharing your guide. I am having problems in making it working for N8000. I have done all those changes to smali but no luck. Do you have an hint ?
Click to expand...
Click to collapse
Sorry! Can't help without the N8000.
Hello guys!
As you probably noticed, few changes have been introduced in the newest FWs that prevent Increasing the number of available apps for displaying toolbox feature. We used to be able to introduce a simple change in one smali in SecSettings and all was good. Or use an amazing app by @xperiacle. Unfortunately, a few things have changed and now we need to tweak things some more to make them alright again.
So let's get crackin':
You're gonna need:
SecSettings.apk
framework2.jar
Knowledge to decompile/baksmali/compile/smali apks/jars
Text/code editor
About 5 minutes of your time
So:
1. Decompile SecSettings.apk or just baksmali the classes.dex
Navigate to smali/com/android/settings/toolbox/ToolboxList.smali
Find the following line in code:
Code:
const/4 v0, 0x5
Basically this is creates an integer that is being used as our maximal toolbox apps number. In this (default stock) case, the number is 5. We are gonna increase that. That is so the settings allow us to CHOOSE more than 5 apps from the list. Now, if we want to have up to 7 apps, we're gonna change the code to this:
Code:
const/4 v0, 0x[COLOR="Blue"]7[/COLOR]
or any number between 5-7 you want...
BUT! if we want more than 7, we need to increase the size of the register (which is now 4 bit). So if we want between 7-9 apps (f.e. for max 8 apps) we change to this :
Code:
const/[COLOR="Blue"]16[/COLOR] v0, 0x[COLOR="Blue"]8[/COLOR]
Now, we know that we're actualy using hexadecimal numbers, so after 9 we're going to switch to a,b,c... and so on. f.e., to increase to max 12 apps we're oging to use 0xc.
How many apps we can add? Well, it's abit tricky, since the feature is dpi dependant. I have managed well with 12 apps on default dpi (480). So I am going to limit my users to that. The reason is double folded:
More than 12 apps on default dpi is gonna cause a crash. Now since it's a framework based feature, the crash is gonna manifest as hot boot.
It's a toolbox, not an app drawer. More than 7-8 apps sounds to me like it defies the purpose. Not to mention more than 12.
There is a way to increase the ammount of apps by reducing the size of app icons and gaps in framework-res.apk dimens. If someone is interested I will append a guide for that. Personally, I am not doing that.
Click to expand...
Click to collapse
So from now on we will talk about increasing the number of apps to 12 max. meaning we inputed const/16 v0, 0xc into our smali.
Next step - still in this smali - about two lines below you will see the following:
Code:
.line 83
sput v0, Lcom/android/settings/toolbox/ToolboxList;->MAX_DEFAULT_APPS:I
Line number may differ or you might not have it id you decompiled without debugging... But what we're going to do is add a line (in blue) above that sput v0, Lcom/android/settings/toolbox/ToolboxList;->MAX_TOOLBOX_APPS:I... so our code will look like this (you add the line in blue):
Code:
const/16 v0, 0xc
.line 82
sput v0, Lcom/android/settings/toolbox/ToolboxList;->MAX_TOOLBOX_APPS:I
[COLOR="Blue"]const/4 v0, 0x5[/COLOR]
.line 83
sput v0, Lcom/android/settings/toolbox/ToolboxList;->MAX_DEFAULT_APPS:I
Now the reason we're doing that, is that by default the same max number of apps is being transfered to the max number of default apps (new addition by samsung). But if we do that, the first 7 apps after the default 5 (in our case) are going to be "considered" as "default" and that causes them to be displayed wrongly inside the list where you choose the apps and also causes settings crash upon repeated entry to the apps editing.
We need to feed a different integer to the max default apps. And since it's 5, we are adding an integer of 5 between max apps and max default apps.
Now you can recompile SecSettings.apk and push back into your phone.
At this point you will notice that even though you can shoose more than 5 apps, the toolbox is still showing only 5. It becomes short and cut at the bottom.
To fix that we dive into the framework.
2. Baksmali framework2.jar
Navigate to smali/com/samsung/android/toolbox/TWToolBoxFloatingViewer.smali
Find the following code:
Code:
iget v2, p0, Lcom/samsung/android/toolbox/TwToolBoxFloatingViewer;->FIXED_SHORTCUT_ITEM_GAP:I
iget v4, p0, Lcom/samsung/android/toolbox/TwToolBoxFloatingViewer;->FIXED_SHORTCUT_ITEM_SIZE:I
add-int/2addr v2, v4
mul-int/lit8 v2, v2, 0x4
add-int/2addr v0, v2
iget v2, p0, Lcom/samsung/android/toolbox/TwToolBoxFloatingViewer;->FIXED_ROUND_TAIL_SIZE:I
add-int/2addr v0, v2
iput v0, p0, Lcom/samsung/android/toolbox/TwToolBoxFloatingViewer;->TOTAL_HEIGHT:I
Note the following line mul-int/lit8 v2, v2, 0x4!!! Basically Samsing introdused a new object in this fragment that's called TOTAL_HEIGHT. That objects takes a value that's a result of multiplying FIXED_SHORTCUT_ITEM_GAP+FIXED_SHORTCUT_ITEM_SIZE by 4. Plus a little round tail but it doesn't concern us...
So let us multiply the FIXED_SHORTCUT_ITEM_GAP+FIXED_SHORTCUT_ITEM_SIZE by 12!!! This is the max height that we need. The feature will resize itself according to the ammount of chosen apps up to that total height.
So our code will become this:
Code:
iget v2, p0, Lcom/samsung/android/toolbox/TwToolBoxFloatingViewer;->FIXED_SHORTCUT_ITEM_GAP:I
iget v4, p0, Lcom/samsung/android/toolbox/TwToolBoxFloatingViewer;->FIXED_SHORTCUT_ITEM_SIZE:I
add-int/2addr v2, v4
[COLOR="Blue"]mul-int/lit8 v2, v2, 0xc[/COLOR]
add-int/2addr v0, v2
iget v2, p0, Lcom/samsung/android/toolbox/TwToolBoxFloatingViewer;->FIXED_ROUND_TAIL_SIZE:I
add-int/2addr v0, v2
iput v0, p0, Lcom/samsung/android/toolbox/TwToolBoxFloatingViewer;->TOTAL_HEIGHT:I
That's it, guys! Smali/recompile framework2.jar and install into your device.
I hope this help those of you who were interested in fixing that annoying "innovation" and I hope it explains the logic behind it.
No credits needed, no asking for permission. If this helps you - use and enjoy!!! We're all in open source and sharing knowledge business after all.
I would like to thank my beloved family... that tolerates me AND android, god knows how, but they still love and always support me
And my dear friend @Wuby986 for always being there for me, never letting go and never letting me let go of my little crazy ideas. For loving this feature and fighting for it. Thank you!!!
And special thanks to @DaOldMan for being my mentor once and teaching me how to decompile my first app. And for listening to me when I have crazy ideas
Mineeee
perfect guide as usual well done
Wonderful !
Wuby986 said:
perfect guide as usual well done
Click to expand...
Click to collapse
Your guides are the light for others. Instead of making this a cookbook guide for parrots your explanations are wonderful and make me feel I am not just a parrot, but someone with a brain
Thomas
increase toolbox apps
SWEET!!!
thx for this guide!!!
always happy to learn something new.
:highfive:
You can simply install S5 Toolbox Addon.
http://forum.xda-developers.com/showthread.php?t=2774569
buddy66 said:
You can simply install S5 Toolbox Addon.
http://forum.xda-developers.com/showthread.php?t=2774569
Click to expand...
Click to collapse
Sure mate! Only that on the new firmwares it doesn't work. It states so at the top of the guide [emoji106] [emoji106] [emoji106]
Read the last pages of the thread you're referring us to
Sent from my SM-G900F using Tapatalk
Nice. Really well written
Sent from my SM-G900F using Tapatalk
Goldie said:
Nice. Really well written
Sent from my SM-G900F using Tapatalk
Click to expand...
Click to collapse
Thanks, master! Coming from you its a huge compliment! Highly appreciated!!!
Sent from my SM-G900F using Tapatalk
This thread has been added as a great addition to my GALAXY S5 UNIFIED MODS THREAD - GUIDES & LINKS thread.
Thank you for the great work!
sorry, I'm kinda new to this, can I do this on an ODEXED ROM?or does it have to be DOEDEXED? Thank you for this and thank you for your input
Mandirigma said:
sorry, I'm kinda new to this, can I do this on an ODEXED ROM?or does it have to be DOEDEXED? Thank you for this and thank you for your input
Click to expand...
Click to collapse
Hey there.. Yeah it has to be deodexed in order to follow this guide
@daxgirl @Wuby986 This one is confusing me too. In my framework2.jar there is no FIXED_SHORTCUT_ITEM_GAP or FIXED_SHORTCUT_ITEM_SIZE. instead it has FIXED_ITEM_SIZE, FIXED_MAIN_ITEM_SIZE, FIXED_MAIN_ITEM_GAP and FIXED_ITEM_GAP. Also it doesn't have the multiply part added into the code. This is what I believe needs changed instead. And here is the smali file http://pastebin.com/9VsFhAN3
Code:
iget v0, v0, Lcom/samsung/android/toolbox/TwToolBoxFloatingViewer;->FIXED_MAIN_ITEM_WIDTH:I
move/from16 v23, v0
div-int/lit8 v11, v23, 0x2
move-object/from16 v0, p0
iget v0, v0, Lcom/samsung/android/toolbox/TwToolBoxFloatingViewer;->FIXED_MAIN_ITEM_HEIGHT:I
move/from16 v23, v0
div-int/lit8 v10, v23, 0x2
iget-object v0, v14, Lcom/samsung/android/toolbox/TwToolBoxFloatingViewer$ToolBoxMenu;->bounds:Landroid/graphics/Rect;
Code:
iget v0, v0, Lcom/samsung/android/toolbox/TwToolBoxFloatingViewer;->FIXED_ITEM_SIZE:I
move/from16 v23, v0
div-int/lit8 v11, v23, 0x2
move-object/from16 v0, p0
iget v0, v0, Lcom/samsung/android/toolbox/TwToolBoxFloatingViewer;->FIXED_ITEM_SIZE:I
move/from16 v23, v0
div-int/lit8 v10, v23, 0x2
iget-object v0, v14,
Question
@daxgirl @Wuby986
Hi, I am using Note 3 N9005 Lollipop.
Poland firmware.
I can't find framework2.jar file in framework.
And I guess my framework is odexed.
amk19 said:
@daxgirl @Wuby986
Hi, I am using Note 3 N9005 Lollipop.
Poland firmware.
I can't find framework2.jar file in framework.
And I guess my framework is odexed.
Click to expand...
Click to collapse
All the relevant files are on framework.jar, my friend. The mod works exactly the same. It has been used in numerous roms on note 3.
Sent from my SM-G900F using Tapatalk
amk19 said:
@daxgirl @Wuby986
Hi, I am using Note 3 N9005 Lollipop.
Poland firmware.
I can't find framework2.jar file in framework.
And I guess my framework is odexed.
Click to expand...
Click to collapse
yeah it could be.. !! as long as you didn't deodexed it is odex... it is odex if you see the boot.oat file ( or at least that's how it should, based on s5 i have).. anyway it is most likely that you don't have the framework2.jar.. there isn't anymore on L
Wuby986 said:
yeah it could be.. !! as long as you didn't deodexed it is odex... it is odex if you see the boot.oat file ( or at least that's how it should, based on s5 i have).. anyway it is most likely that you don't have the framework2.jar.. there isn't anymore on L
Click to expand...
Click to collapse
In order to make it odex there should be framework.odex file. But I can't find any.
All I can see is framework.jar which is around 300 bytes...
How can make required changes to obtain 12 Apps in Toolbox?
amk19 said:
In order to make it odex there should be framework.odex file. But I can't find any.
All I can see is framework.jar which is around 300 bytes...
How can make required changes to obtain 12 Apps in Toolbox?
Click to expand...
Click to collapse
As i told you, you have the boot.oat, which now contains the old odex files for framework..
Try searching google for guides on how to deodex roms
amk19 said:
In order to make it odex there should be framework.odex file. But I can't find any.
All I can see is framework.jar which is around 300 bytes...
How can make required changes to obtain 12 Apps in Toolbox?
Click to expand...
Click to collapse
You can use this tool http://forum.xda-developers.com/galaxy-s5/general/tool-deodex-tool-android-l-t2972025
To deodex your entire rom and then you need to flash it ALL in recovery. I suggest taking a dev base by @_alexndr for n900, replacing app priv-app and framework folders in system of his zip and flashing. You will have a flashable deodex with correct permissions and aroma.
Hey @daxgirl how about guide to port/enable toolbox? Can you share it ?? Thanks.
*This thread is for dev, Rom maintainer.
Do not flash the attached file without services.jar editing.
*Don't send pm to me with your service.jar anymore. you never get my reply.
.
.
.
.
.
.
Hi all,
This is first mod by NX team
We decide to share our mod with XDA members.
Any dev can use this mod to their own rom with proper credits
This mod will be working with any kernel(selinux permissive) / any variant if you are on Note7 ported rom.
Features are below.
1.Bluelight filter fix
2.AOD notification alarm touch / Music control
(Note7 original behavior)
3.AOD brightness control
(Rooted/Reboot required to take effect)
Credits :
@Patrick.H (NX Team)
@karkasss (NX Team)
@develoid ALT and F4 (AOD touch / Bluelight filter fix)
@asc1977, @DaOldMan (AOD brightness control)
(Please copy & paste when you add our credits)
We say again.
All credits should be mentioned on your OP when you add this mod to your rom.
All codes are not original note7 code but their code written by themselves.
So anybody can notice when you steal our work without credits
Attached file is for AryaMOD note7 users we already modded to show you before & after.
I'm sure you can mod by comparing code for services.jar. (both classes.dex / classes2.dex are modded)
And rest files should be added/replaced.
Do not forget to give proper permission for each file if you try to flash add-on or OTA
(Please see the updater-script)
You can add AOD Brightness control menu to your rom control instead of AODsettings.apk
http://forum.xda-developers.com/showthread.php?p=69653504
Download :
https://drive.google.com/open?id=0ByMmvUc7IhtmbkVEYkI0eklBNW8
Video review :
https://youtu.be/7CsFPvf3vls
Caution :
1. If you do data reset(Factory reset), Bluelight filter will not be working.
Because some files are located in \data\bluelight\
=> Flashing mod file again.
2. Only English string is supported on notification panel when Blulight filter is activating.
If you want to translate to your language, open then edit the string /data/bluelight/filter.cfg
3.Selinux policy should be permissive by kernel to work bluelight filter.
4. http://forum.xda-developers.com/showthread.php?p=69933565
5.Bluelight filter is not working on exynos device. Sorry to late inform you.
Below files from zip are only for AryaMOD note7 users,
because @Kamy (Rom maintainer) deleted quickpanel toggle and setting menu of bluelight filter
-csc/aryamod.xml
-priv-app/SecSettings2
We are considering if we upload our rom which is all these mod included to XDA.
This rom has just pure function of Note7 without any mod.
Let you know our decision soon.
How to edit your services.jar
classes.dex part
1.AOD brightness control
com\android\server\display\DisplayPowerController.smali
For this smali edit, follow the below instruction.
http://forum.xda-developers.com/showthread.php?p=69653504
But only different string for "eragon_brightness" instead of "aod_brightness"
Because, AODsettings.apk file was aligned with this string "eragon_brightness" already.
2. AOD Touch & Bluelight filter
com\android\server\power\PowerManagerService$BinderService.smali
1)Go to the
.method public setDozeOverrideFromAod(IIILandroid/os/IBinderV
2)Search
const-string v0, "PowerManagerService"
2)Add below line
invoke-static {p2}, Lcom/samsung/android/aod/AODTouchDaemon;->call(I)V
like this.
Code:
const/16 v0, 0xff
if-le p3, v0, :cond_2d
:cond_2c
const/4 p3, -0x1
:cond_2d
[COLOR="Blue"]invoke-static {p2}, Lcom/samsung/android/aod/AODTouchDaemon;->call(I)V[/COLOR]
const-string v0, "PowerManagerService"
new-instance v2, Ljava/lang/StringBuilder;
invoke-direct {v2}, Ljava/lang/StringBuilder;->()V
com\samsung\android\mdnie\MdnieManagerService.smali
1)Search
.field private mDisplayOn:Z
2)Add below line
.field private mDaemon:Lcom/samsung/android/bluelightfilter/KPPDaemon;
like this
Code:
.field private final mContext:Landroid/content/Context;
.field private mCurtainModeIsRunning:Z
[COLOR="blue"].field private mDaemon:Lcom/samsung/android/bluelightfilter/KPPDaemon;[/COLOR]
.field private mDisplayOn:Z
.field private mEbookScenarioEnabled:Z
3)Search
const-string/jumbo v2, "lcd_curtain" or "lcd_curtain"
4)Add below line
invoke-virtual {p0}, Lcom/samsung/android/mdnie/MdnieManagerService;->addFilter()V
like this
Code:
:cond_fa
invoke-direct {p0}, Lcom/samsung/android/mdnie/MdnieManagerService;->setting_is_changed()V
[COLOR="blue"]invoke-virtual {p0}, Lcom/samsung/android/mdnie/MdnieManagerService;->addFilter()V[/COLOR]
return-void
:cond_101
const-string/jumbo v2, "lcd_curtain"
5)Search
# virtual methods
6)Add blue lines
Code:
# virtual methods
[COLOR="blue"].method public addFilter()V
.locals 2
new-instance v0, Lnxteam/craftingmod/bluelightfilter/KPPDaemon;
iget-object v1, p0, Lcom/samsung/android/mdnie/MdnieManagerService;->mContext:Landroid/content/Context;
invoke-direct {v0, v1}, Lnxteam/craftingmod/bluelightfilter/KPPDaemon;-><init>(Landroid/content/Context;)V
iput-object v0, p0, Lcom/samsung/android/mdnie/MdnieManagerService;->mDaemon:Lnxteam/craftingmod/bluelightfilter/KPPDaemon;
return-void
.end method[/COLOR]
.method public getContentMode()I
7)Search
.method public setmDNIeEmergencyMode(Z)Z
See the above lines.
8)Replaced Red lines by Blue lines
Code:
const-string v2, "/sys/class/mdnie/mdnie/accessibility"
if-eqz p1, :cond_4a
[COLOR="red"] const/4 v1, 0x6[/COLOR]
:cond_4a
[COLOR="Red"] invoke-static {v2, v1, p2}, Lcom/samsung/android/mdnie/MdnieManagerService;->sysfsWrite_CB_HBM(Ljava/lang/String;I[I)Z[/COLOR]
move-result v1
goto :goto_44
.end method
Code:
const-string v2, "/sys/class/mdnie/mdnie/accessibility"
if-eqz p1, :cond_4a
[COLOR="blue"] const/4 v1, 0x2[/COLOR]
:cond_4a
[COLOR="Blue"] invoke-static {v2, v1, p2}, Lcom/samsung/android/mdnie/MdnieManagerService;->sysfsWrite_CB(Ljava/lang/String;I[I)Z[/COLOR]
move-result v1
goto :goto_44
.end method
classes2.dex part
1)Add below smali to /root folder
https://drive.google.com/open?id=0ByMmvUc7IhtmY3JBNzJJUUNMMUE
Important
Don't forget add below permissions to your updater-script
set_perm(0, 2000, 0755, "/system/bin/kppd");
set_perm(0, 2000, 0666, "/data/bluelight/filter.cfg");
set_perm(0, 2000, 0666, "/data/bluelight/kppd.cfg");
This is wonderful [emoji120]
Sent from my SM-G935F using Tapatalk
Kamy said:
This is wonderful ?
Sent from my SM-G935F using Tapatalk
Click to expand...
Click to collapse
Why not [emoji12]
Nice job mate but in the title it's for all Note7 ported ROM however in the downloaded file it's for Aryamod only.
Second point, is the file flashable in any N7 ROM to fix AOD and blue filter.
Thnxx
Sent from my SM-N9005 using Tapatalk
amour9999 said:
Nice job mate but in the title it's for all Note7 ported ROM however in the downloaded file it's for Aryamod only.
Second point, is the file flashable in any N7 ROM to fix AOD and blue filter.
Thnxx
Sent from my SM-N9005 using Tapatalk
Click to expand...
Click to collapse
You do not flash this zip file if you are not on AryaMOD Note7 rom.
This thread is for Dev, Rom maintainer.
So you should wait until they mod.
karkasss said:
You do not flash this zip file if you are not on AryaMOD Note7 rom.
This thread is for Dev, Rom maintainer.
So you should wait until they mod.
Click to expand...
Click to collapse
Mate mind u shared exactly what u do it for aod ? , for other roms based on s7 , ?
Wow this is awesome!!! :good:
karkasss said:
Why not [emoji12]
Click to expand...
Click to collapse
Sorry I used emoji switch on keyboard and showed up as question mark. I meant this IS wonderful indeed thank you for sharing.
Sent from my SM-G935F using Tapatalk
Kamy said:
Sorry I used emoji switch on keyboard and showed up as question mark. I meant this IS wonderful indeed thank you for sharing.
Sent from my SM-G935F using Tapatalk
Click to expand...
Click to collapse
@Kamy
I sent pm you. could you ckeck please?
Thanks dude.. can you make also a settings without fingerprint and iris menu.thanks again.waiting for your instruction how to removed the korean in the notification panel.
examiner said:
Thanks dude.. can you make also a settings without fingerprint and iris menu.thanks again.waiting for your instruction how to removed the korean in the notification panel.
Click to expand...
Click to collapse
Wait until I update bluelightfilter.apk for the multi language. I'm not available at this moment.
Other request should be asked via original rom thread.
for the fingerprint, you can delete easily.
etc/permissions/ search *fingerprint~.xml
just delete all.
File updated.
Korean translated to English on notification panel.
Only english is supported.
If you want translate your language, edit string /data/bluelight/filter.cfg
OP updated. (Caution)
Here I am, I could not miss (under invitation) my great friend as well as great DEV @karkass
karkasss said:
File updated.
Korean translated to English on notification panel.
Only english is supported.
If you want translate your language, edit string /data/bluelight/filter.cfg
Click to expand...
Click to collapse
Is the notification strings supposed to be like this, i.e. mixed Korean and English?
kopitalk said:
Is the notification strings suppose to be like this, i.e. mixed Korean and English?
Click to expand...
Click to collapse
You can only change english to your language. ignore the written Korean. that is just reference.
I think you made a mistake with credits...
Tamerlan didn't do the mod for AOD brightness on RC but @asc1977 made it with [MENTION=3026895]DaOldMan[/MENTION help here]:
http://forum.xda-developers.com/showthread.php?p=69653504
Regards
karkasss said:
You can only change english to your language. ignore the written Korean. that is just reference.
Click to expand...
Click to collapse
Forgive friend @karkass are messed up with 100 things open, and I understood little. Just a simple flash in recovery? And since in the zip I see services.jar but is universal? ...Sorry, but I did not understand
Ufo71 said:
Forgive friend @karkass are messed up with 100 things open, and I understood little. Just a simple flash in recovery? And since in the zip I see services.jar but is universal? ...Sorry, but I did not understand
Click to expand...
Click to collapse
you need to edit your services.jar comparing both file after baksmali.
one is before.zip
the other one is from NXteamMOD_for_AryaMOD_Note7.zip