I have seen a modified Phone.apk floating around for a while but sadly it stated that it was NOT compatible with the HTC Hero.
Well my phone had a 'feature' that makes it vibrate when the outgoing call connects, and i wanted to remove it.
Note that i'm running DamageControl 2.09 and there is NO option to disable this 'feature'.
Being quite determined and having an OK background in reversing applications i decided to give it a go.
My phone now contains an option in Phone Settings that will enable/disable this vibrate on outgoing connect.
Below i have detailed what I did and why. (I'll spare you all the things i did that didn't work, and only show HOW to modify the APK and get the system to accept it!)
Requistes:
able to run adb from command prompt (SDK in PATH EnVar)
able to run apktool from command prompt (in SDK folder?)
able to run the testsigner from the command prompt as 'java testsign' (ClassPath EnVar)
First things first, anything we do the the Phone.apk is going to require us to resign it. this presents a few problems...
Phone.apk has the following in it's AndroidManifest.xml
android:sharedUserId="android.uid.phone"
Click to expand...
Click to collapse
This means that there is most likely more .apks that have this same UserId (7 to be exact on DC 2.09)
All APKs sharing the same UserID MUST be signed with the same certificate or the OS wont let 'em load.
The second problem is that it is a system application, and if we change it's Certificate it will no longer be granted certain SYSTEM permissions like DEVICE_POWER
The easiest solution was for me to resign every apk in /system/app and /system/framework
Here is a little batch script for windows that i used (you may have to execute the commands individually, sometimes it's tempermental)
Code:
echo off
adb shell stop
mkdir SystemApp
adb pull /system/app SystemApp
mkdir SystemFramework
adb pull /system/framework SystemFramework
for /R %%x in (*.apk) do java testsign "%%x"
adb remount
adb push SystemApp /system/app
adb push SystemFramework /system/framework
rmdir /S /Q SystemApp
rmdir /S /Q SystemFramework
adb reboot recovery
echo Wipe Dalvik-Cache and Perform Factory Reset
echo execute 'adb shell chmod -R 777 /system' from adb
echo reboot and enjoy!
echo on
This code will take care of resigning all system apps, effectively changing the system certificate. Now we are free to modify the Phone.apk all we want!
Please remember that anytime we push a system app like Phone.apk which is 'always' running we should either be in recovery or use the following script:
Code:
adb shell stop
adb remount
adb push Phone.apk /system/app/Phone.apk
adb shell start
del Phone.apk
pause
after a short while the phone will seem to do a soft reset and will be running the new Phone.apk
Now that we have certificate issues out of the way lets look into the actual application itself.
once decompiled with apktool you can run this script to rename all the files to .txt (this is for being able to search the file contents via Windows Search)
note: the command prompt must be CD'd into the output directory of apktool
Code:
for /R %%x in (*.smali) do REN "%%x" *.txt
having searched through all the code for various keyphrases, i'll only show the correct ones here. We need to find where shouldVibrateOut() is located.
after searching for that we should see that it's located in Ringer.smali and looks like this:
Code:
.method shouldVibrateOut()Z
.locals 1
.prologue
.line 430
const/4 v0, 0x1
return v0
.end method
the code above effectively says return true; clearly someone was taking an easy way out here ... but this does confirm that there is no option to disable the 'feature'.
To disable it we could simply change the 0x1 to a 0x0 and recompile/push/reboot and be done with it. But the goal here is to extend the features of the phone, and doing what the dev should have done (giving users the option).
So, next we need to find the Preferences Activity that lists the options, and modify it's XML file to add our own there
looking again in the AndroidManifest.xml we find this:
<activity android:theme="@android:style/Theme.NoTitleBar" android:name="PhonePreference" android:configChanges="keyboardHidden|orientation">
Click to expand...
Click to collapse
So we know the activity is named PhonePreference
now we navigate to the /res/xml folder of apktool's output and find phone_preference.xml
it seems the last Checkbox is:
<com.htc.preference.HtcCheckBoxPreference androidersistent="true" android:title="@string/preference_save_contact" android:key="pref_key_save_contact" android:summary="@string/preference_save_contact_statement" android:defaultValue="true" />
Click to expand...
Click to collapse
so we're going to take this line and copy paste it underneath and make it look like this (changes are bolded)
<com.htc.preference.HtcCheckBoxPreference androidersistent="true" android:title="@string/preference_vibrate_out" android:key="pref_key_vibrate_out" android:summary="@string/preference_vibrate_out_statement" android:defaultValue="false" />
Click to expand...
Click to collapse
now we need to edit the strings.xml file to add values for the above checkbox
add these 2 lines to the strings.xml file:
<string name="preference_vibrate_out">Outgoing Calls Vibrate</string>
<string name="preference_vibrate_out_statement">Phone will vibrate on connect for Outgoing calls</string>
Click to expand...
Click to collapse
If we were to compile it and push it to the phone now we would see a new menu option!
Sadly the Phone application is unaware of how to use this new setting to determine whether or not to vibrate. so we must teach it by editing the code.
I'm not going to go into great detail of what each line does they're pretty self explanatory. however i will go over the important pieces...
we need to change the shouldVibrateOut() routine to this:
.method shouldVibrateOut()Z
.locals 4
.prologue
const/4 v0, 0x0
#v0=(Null);
const-string v1, "pref_key_vibrate_out"
#v1=(Reference);
iget-object v2, p0, Lcom/android/phone/Ringer;->mContext:Landroid/content/Context;
.local v2, v2:Landroid/content/Context;
#v2=(Reference);
invoke-static {v2}, Lcom/htc/preference/HtcPreferenceManager;->getDefaultSharedPreferences(Landroid/content/ContextLandroid/content/SharedPreferences;
move-result-object v3
#v3=(Reference);
invoke-interface {v3, v1, v0}, Landroid/content/SharedPreferences;->getBoolean(Ljava/lang/String;Z)Z
move-result v0
#v0=(Boolean);
return v0
.end method
Click to expand...
Click to collapse
the string in v1 is the same string as the android:key="pref_key_vibrate_out" we used when making the new checkbox.
the rest of the code basically grabs a hold of the instance's Context variable and uses some built in APIs to read the setting of that checkbox and return it's value:
Checked == True
Unchecked == False
This will enable the shouldVibrateOut routine to detect whether or not it SHOULD rather than just saying yes.
Come to think of it, why make a routine whose name suggests there's an option and then not give one!! anywayz let's finish up...
next if you did rename all the files you'll need to put them back to .smali
for /R %%x in (*.txt) do REN "%%x" *.smali
Click to expand...
Click to collapse
and then recompile it using apktool, resign it, push it to the /system/app folder AFTER issuing the STOP command as shown above.
once it's pushed you should be able to simply use
adb shell start
Click to expand...
Click to collapse
to do a 'soft' reboot of the phone.
If the app crashes try going into recovery mode and wiping out the dalvik cache!
I hope those who have read this got something out of it, and that i wasn't too confusing or too vague. any questions or comments you may have are welcome.
Enjoy!
Thanks for the instructions, you rock. This will help immensely for adding an option for roam only. I got it working for Fresh, but there were problems with other ROMs. I'm thinking your info will help resolve the issues.
noob Q. is there a flashable file...
That's pretty pro
i can make one, but you still have to resign your entire /system/app and /system/framework...
i could include those in the update.zip for you if you are running DamageControl 2.09
Hmmm... I'm running Zen... so I believe it should work....
Sent from my HERO200 using XDA App
i dont think an update.zip full of DamageControl system apps would work on a different ROM... if u can resign the system itself as described above... i can make an update.zip for you with the Phone.apk in it
Ok....
Sent from my HERO200 using XDA App
Zip Format
please please please make a backup of your original phone FIRST!
adb pull /system/app/Phone.apk Phone.bak
if you flash this update.zip for the new phone and it keeps FCing on you you'll need to either A) flash the Original i've provided in a zip format or reboot into recovery and push your old one back.
you MUST resign all system files like i've described above for my mod to work...
place the below files on your sdcard and flash away...
I do not promise anything unless you are running on DamageControl ROM 2.09
ummmm.... ok so after 2 or so hours... looks like it only works with damage rom.... somewhere some how there is something that is not letting this work... i wounder what it could be,,,,,,, ..... any way great work thank you for your help....
maybe i'll see if i can't get a working one on the Zen rom... any version info i need to be aware of?
EDIT: I'm assuming you're running this ROM....http://forum.xda-developers.com/showthread.php?t=662113
EDIT2: Here you go, as long as you're running the above rom... it'll work, tested it myself
http://www.mediafire.com/?kiaqt264culyt96
vibrate is off by default
to re-enable the vibrate go into Settings->Call->Phone Settings and there's a checkbox for Vibrate on Outgoing
Nieylana said:
maybe i'll see if i can't get a working one on the Zen rom... any version info i need to be aware of?
EDIT: I'm assuming you're running this ROM....http://forum.xda-developers.com/showthread.php?t=662113
EDIT2: Here you go, as long as you're running the above rom... it'll work, tested it myself
http://www.mediafire.com/?kiaqt264culyt96
vibrate is off by default
to re-enable the vibrate go into Settings->Call->Phone Settings and there's a checkbox for Vibrate on Outgoing
Click to expand...
Click to collapse
Actually I'm running Zen Hero fx....
Sent from my HERO200 using XDA App
here: http://www.mediafire.com/?s1zkx93bcnmjfxc
for Zen Hero FX 2.1 Lite
flash this zip and wipe the cache...
Nieylana said:
here: http://www.mediafire.com/?s1zkx93bcnmjfxc
for Zen Hero FX 2.1 Lite
flash this zip and wipe the cache...
Click to expand...
Click to collapse
this is sweet...... again thank you for all your hard work.... it works like a charm....
Hey Q. Do you know anything about vibrating when you press the dial pad... I'm looking thru settings but can't fine it... do you know if its something like this.?.?.
Sent from my HERO200 using XDA App
I can mods that too for you if you would like. Let me know.and the best part is now that u've flashed that zip file, all u'll need is a diff phone app (smaller download )... will work on it tomorrow
Sent from my HERO200 using XDA App
Big-O-Devil said:
Hey Q. Do you know anything about vibrating when you press the dial pad... I'm looking thru settings but can't fine it... do you know if its something like this.?.?.
Sent from my HERO200 using XDA App
Click to expand...
Click to collapse
http://forum.xda-developers.com/showthread.php?t=660506
check out this thread bout haptic dialer
Never mind believe he was talking bout adding the option of turning it on and off
I can mods that too for you if you would like. Let me know.and the best part is now that u've flashed that zip file, all u'll need is a diff phone app (smaller download )... will work on it tomorrow
If you can.... ... that would be sweeeeet..
Sent from my HERO200 using XDA App
Click to expand...
Click to collapse
Sent from my HERO200 using XDA App
a few problems... it doesn't seem to haveit's own settings page (cant use the Phone Settings page... different package), nor can i seem to add a button to the thing .. will try later
Nieylana said:
a few problems... it doesn't seem to haveit's own settings page (cant use the Phone Settings page... different package), nor can i seem to add a button to the thing .. will try later
Click to expand...
Click to collapse
sounds like a real head-buster.....
Related
Can anyone put this in a cw flashable zip or have one already? I need to get rid of the stupid popup that tells me my battery is full. It wakes me up and it seems to keep my alarm clock from going off sometimes!?
1. decompile/de-odex services.jar/odex
2. open "com\android\server\status\StatusBarPolicy.smali" in a text editor
find ".method private showFullChargePopup()V" about line 2779
and remove the entire method all of it from ".method private showFullChargePopup()V"
to .end method
and delete this line at about line 3441
invoke-direct {p0}, Lcom/android/server/status/StatusBarPolicy;->showFullChargePopup()V
3. save, compile and re-odex as necessary
Click to expand...
Click to collapse
What ROM version and theme? The services.jar file changes between roms and themes.
Blackhole 3.0 DL09
Oh my god! If you could also do this for me, or just tell me how or something ( I have no idea what the dedeoxin' does or anything) I would be forever thankful! haha
I have DJ05 Superclean JT rom
Its just an simple apk you can get rid of via root explorer or titanium backup or whatever.
In titanium its called FullBatPopupApp 1.0, I have removed it with no ill effects. The name of the apk in /system/app/ is FullbatPopup.apk
Sent from my SCH-I500 using Tapatalk
1. You need to have java installed for this. You will also need smali/baksmali
2. Open command prompt or linux terminal with your phone plugged in. Also navigate to or create a directory to perform the work in.
3. Once in your working directory, run:
Code:
adb pull /system/framework/services.jar
3a. If your system isn't de-odexed, you may need to pull an odex file as well
4. Take the smali/baksmali files you downloaded earlier and put them in the same directory that your services.jar file is in.
5. Run the following (assumes windows command prompt):
Code:
java -jar baksmali-<version>.jar services.jar
5a. If your system is not deodexed, you will likely need to deodex the system/services.jar for this to work.
6. Open the file required for the edit and make the needed changes.
7. Run the following (again, assuming windows command prompt):
Code:
java -jar smali-<version>.jar out -o classes.dex
8. Replace the classes.dex file within services.jar with the new classes.dex file
9. Push the file to /system/framework with adb, then reboot:
Code:
adb push services.jar /system/framework/services.jar
adb reboot
9a. You may need to remount the /system partition as rw to push the file.
10. On restart, the phone will take longer to boot, but assuming the changes were made properly you should be good.
I left out some information for the "a" steps on purpose. If you cannot do these steps yourself, or find how to do them, you likely shouldn't be doing this on your own. As always, backup your phone/data before trying this, and I am not responsible for any lost data, non-booting phones, or bricked devices. If you are unsure of what you are doing, then don't do it.
n0yd said:
Its just an simple apk you can get rid of via root explorer or titanium backup or whatever.
In titanium its called FullBatPopupApp 1.0, I have removed it with no ill effects. The name of the apk in /system/app/ is FullbatPopup.apk
Sent from my SCH-I500 using Tapatalk
Click to expand...
Click to collapse
Removing that does nothing, already did it and I still get the popup.
Or just find the post with the hidden menu dialer codes and turn it off that way.........
Sent from my SCH-I500 using XDA App
Even the hidden dialer menu does not always work either. Plus I thought the hidden menu was not accessible in DJ05/DL09? Maybe this is with certain roms?
yea I hate that popup. Ive removed the apk also and still it keeps popping up. A fix would be greatly appreciated!!!
The dailer codes worked for me. Using Blackhole 3.0. Just make sure you include the Hidden Menu when building your rom.
Sent from my SCH-I500 using XDA App
imnuts said:
Removing that does nothing, already did it and I still get the popup.
Click to expand...
Click to collapse
Weird, I never noticed. Thanks for letting me know
Sent from my SCH-I500 using Tapatalk
+1 on getting rid of this stupid pop up.
Man I hate that thing.
I posted instructions on how to do it. I'm not going to do the mod for everyone, so do it on your own, or ask the rom builder to include the change in the rom. There are to many roms and themes out there to try and accomplish this for every possible combination.
Hidden menu method would not work for me on dj05.
Changed it to disabled and it still pops up
I just went in with root explorer and mounted system/app as RW, renamed FullBattPopup.apk to FullBattPopup.apk.OLD and it did not get recreated after a reboot. I guess I'll have to wait till a full charge to see if it comes back.
I just used Titanium Backup to freeze FullBatPopupApp.
Will report back after I change my phone....
Sent from my Samsung Fascinate
Pfredd said:
I just used Titanium Backup to freeze FullBatPopupApp.
Will report back after I change my phone....
Sent from my Samsung Fascinate
Click to expand...
Click to collapse
As I figured, freezing didn't remove the popup.
I went ahead and edited the services file, as specified earlier in this post. I followed the procedure provided by imnuts and did the edits as specified in the post by Nimhlan.
It appears to work like a charm. No more Full battery popups!
I would post my edited file, but I suspect it is dependent on what kernel/ROM you are running....
Do you download the smali 1.26.jar & baksmali 1.26 jar or just the baksmali & smali file in the link provided.
ellisz said:
Do you download the smali 1.26.jar & baksmali 1.26 jar or just the baksmali & smali file in the link provided.
Click to expand...
Click to collapse
You need the *.jar files. However, I tried making the edit and I still get the popup.
Hey guys, need some help with this one from some of you with more android/linux experience than me.
In my continuing quest to make Blackhole as customizable as possible I've been working on a way for users to easily install paid apps (legally downloaded of course), and stuff that I don't have available in rom manager in one easy step at the same time the rom is installed. In pursuit of this goal I've found that it's possible for the update-script file inside a clockworkmod zip to call a script in the zip as well. I've gotten it to say it's run the script, but it doesn't do what it's supposed to. here's what i've got:
#! /bin/
busybox cp /sdcard/app/* /system/app/
When I type the command into a terminal on the phone it works. When I open an adb shell and type "bash install.sh" it works. But when I get the update.zip to run the script, or run it in root explorer it just says it's run it, but doesn't do anything.
Is there something I'm missing about how to call the script? Do I need to somehow add the bash program to the zip file so it can run the script right? Has anyone ever done something like this who can point me in the right direction?
do you have an output you can show us?
Sent from my SCH-I500 using XDA App
This is a shot in the dark but does writing to /system/app require root permissions? It could be that you've given your terminal app root, so it runs under su. But when the script is being executed it does not have root and fails, but perhaps the output is being held back a bit and you're not seeing the permission denied.
Steve_ ?!
whoa, didn't expect it to be you of all people
Anyhoo, this is a bit off topic, but I've got a small request, can you somehow make BlackHole 2.4 an option on Rom manager? I don't have DL09 so I can't use 3.0, but I really like the ability to select everything to customize, instead of me going and installing one thing at a time....
Why not just add the following to the end of the update-script:
Code:
copy_dir /sdcard/app SYSTEM:
Also, is the SDCard mounted by default when the phone boots to recovery? If it isn't, or it isn't mounted while the update is processing, that will also cause the problem.
wizang said:
This is a shot in the dark but does writing to /system/app require root permissions? It could be that you've given your terminal app root, so it runs under su. But when the script is being executed it does not have root and fails, but perhaps the output is being held back a bit and you're not seeing the permission denied.
Click to expand...
Click to collapse
Could very well be, it's not showing me any output when i run it the two ways it doesn't work, just says it's been run.
vegittoss15 said:
Steve_ ?!
whoa, didn't expect it to be you of all people
Anyhoo, this is a bit off topic, but I've got a small request, can you somehow make BlackHole 2.4 an option on Rom manager? I don't have DL09 so I can't use 3.0, but I really like the ability to select everything to customize, instead of me going and installing one thing at a time....
Click to expand...
Click to collapse
Haha, caught me. I was trying to remain incognito Yeah, i'll get 2.4 loaded back up on rom manager for you today. But if you flash 3.0 it will upgrade you to DL09 and the DJ05 kernels and modem are compatible, or at least no one i know of has had issues.
imnuts said:
Why not just add the following to the end of the update-script:
Code:
copy_dir /sdcard/app SYSTEM:
Also, is the SDCard mounted by default when the phone boots to recovery? If it isn't, or it isn't mounted while the update is processing, that will also cause the problem.
Click to expand...
Click to collapse
sdcard is mounted when you go to recovery, because it's got to access the update.zip file on it to install anything. I'll try your code, do you know what to put after SYSTEM: to make it go to the /app directory? thanks for the idea, it's a different way to go, i didn't think about the fact the update-script could access the device if you don't use the "package" tag.
Don't you need to add "sh" to the bin directory and define the script as so:
#! /bin/sh
if you want it to execute properly..
dcow90 said:
Don't you need to add "sh" to the bin directory and define the script as so:
#! /bin/sh
if you want it to execute properly..
Click to expand...
Click to collapse
normally yes, but there doesn't seem to be a /bin/sh directory on my fascinate, only /bin and that's where the cp and mv and cat, etc. are.
I made a script to do this forever ago on my G1 when it first came out... Let me see if I can find it.
This has been done lots of times before. If you look around on xda there are some backup scripts which do the same thing.
Sent from my SCH-I500
imnuts said:
Why not just add the following to the end of the update-script:
Code:
copy_dir /sdcard/app SYSTEM:
Also, is the SDCard mounted by default when the phone boots to recovery? If it isn't, or it isn't mounted while the update is processing, that will also cause the problem.
Click to expand...
Click to collapse
Well I gave that a shot, and i think it could work, but the recovery wouldnt do it. it says "non-package source path not yet supported" good idea tho.
yutsoku said:
I made a script to do this forever ago on my G1 when it first came out... Let me see if I can find it.
Click to expand...
Click to collapse
If you can that would be great.
n0yd said:
This has been done lots of times before. If you look around on xda there are some backup scripts which do the same thing.
Sent from my SCH-I500
Click to expand...
Click to collapse
I spent a good bit of time searching and most of the scripts I found were much more complex than what i need, or were written to run on a computer, which i've already done.
sonofskywalker3 said:
normally yes, but there doesn't seem to be a /bin/sh directory on my fascinate, only /bin and that's where the cp and mv and cat, etc. are.
Click to expand...
Click to collapse
Thats not the point. You need to set a shell interpreter, not a path. Cwm uses busybox sh, which is in /bin in recovery mode. Google search shebang
Sent from my SCH-I500 using XDA App
jt1134 said:
Thats not the point. You need to set a shell interpreter, not a path. Cwm uses busybox sh, which is in /bin in recovery mode. Google search shebang
Sent from my SCH-I500 using XDA App
Click to expand...
Click to collapse
Going to go ahead and parade my stupidity in front of everyone here:
so does that mean i'm right using #! /bin/ or that it should be #! /bin/sh/ or something else entirely? I'm so confused.
sonofskywalker3 said:
Going to go ahead and parade my stupidity in front of everyone here:
so does that mean i'm right using #! /bin/ or that it should be #! /bin/sh/ or something else entirely? I'm so confused.
Click to expand...
Click to collapse
#!/bin/sh for scripts in recovery. #!/system/bin/sh for scripts in android.
Sent from my SCH-I500 using XDA App
First off, this is my very FIRST publically posted Android mod, and my second one ever - I made the first one earlier today. In other words, I'm new and may make mistakes.
These steps work for me, though!
Exactly what this guide does:
When you enable "Blocking mode" in the Samsung JB ROMs, an "ongoing" (and thus unremovable) notification is shown AT ALL TIMES, even if Blocking mode is only active for a certain time period (at night in my case).
This mod will entirely remove that notification. It will not show up even when blocking mode IS in fact blocking calls etc.
IMO the ideal behavior would be to show it during the time it's active, but that would be a much harder mod to make, as you'd need to add new (byte)code.
Now, with that out of the way...
Requirements:
* DEODEXED AND ROOTED Samsung Jelly Bean ROM (I use WanamLite XXDLIH v3.9, google it - I can't post the link)
* 7-zip (google it)
* Galaxy S III - not sure if other models than the i9300 will work, my guess is that they will. I can't test on other phones than my own, though, so you're on your own in that case! Also no idea if Note models will work, I've never used one.
* A Windows computer - unless the tools are available for other platforms.
* Java -- if you can do Start -> Run -> "java" -> OK without an error, you should be fine.
* A bit of patience
As always, this is on your own risk!
Steps to hack:
0) BACK UP YOUR PHONE! My suggestion would be to take a nandroid backup before getting started.
1) Get an apktool that works with JB APKs.
Here's the one I use (assemble the link): mediafire . com / ?ufzdylekbkloffy
(Sorry for doing that, but surely posting guides constitutes making helpful contributions? )
The ZIP contains two apktool versions, one for decoding and one for building.
Thing is, I'm not 100% sure on where I got the apktool JARs. I think one of them is the unmodified 1.4.2 JAR, and one is modified to work with ICS (and newer) APKs.
I couldn't get EITHER of them to both decode AND build, so I made two separate batch scripts.
I do promise that the thing's safe, but if you don't trust me, you can find them elsewhere - I'm just not sure exactly where. I found them by trial and error.
2) Unpack the tools to a directory, e.g. "apktool" on your desktop. (If you want to follow this guide to the letter, you need to use that folder too.)
3) Start a command prompt - Start -> Run -> enter "cmd" -> click OK
4) Connect your phone via USB, and make sure USB debugging is enabled on it (under Settings -> Developer Options)
5) Enter the following commands, exactly as specified, in order of course:
Code:
cd Desktop\apktool
adb pull /system/framework/framework-res.apk
java -jar apktool-BUILD.jar if framework-res.apk
adb pull /system/app/SecSettings.apk
apktool-d SecSettings.apk SecSettings-mod
You should now have a "SecSettings-mod" directory (under Desktop\apktool) with the contents of the APK.
6) Browse to SecSettings-mod\smali\com\android\settings\dormantmode, right-click "DormantModeNotiReceiver.smali" and Open With... -> Notepad (or right-click and "Edit", if that choice exists)
7) Click the Edit menu -> Find..., and search for "notificationCreate" (no quotes). The first hit should be ".method public notificationCreate [... etc]"; click Find Next.
The next hit should be something like
Code:
invoke-virtual {p0, p1}, Lcom/android/settings/dormantmode/DormantModeNotiReceiver;->notificationCreate(Landroid/content/Context;)V
8) Comment that line out by adding a # as the very first character, so you end up with
Code:
# invoke-virtual {p0, p1}, Lcom/android/settings/dormantmode/DormantModeNotiReceiver;->notificationCreate(Landroid/content/Context;)V
9) A few lines down (10 or so), there's another invoke-virtual, for notificationClear. Comment this out as well, aagin by adding a # as the first character on the line.
When you're done, save and exit.
10) OK, we're getting there. Time to rebuild the modded APK.
Go back to the command prompt (or start a new one, see above).
Run this command:
Code:
apktool-b SecSettings-mod SecSettings-new.apk
This may take a LONG while, it takes a bit over 11 minutes for me (nearly all of it to build resources). Be patient!
When it's completed, open up both the ORIGINAL .apk and the modded one in separate 7-zip windows. Delete "AndroidManifest.xml" from the modified apk, then select and copy "META-INF" and "AndroidManifest.xml" from the original to the modified APK. Exit 7-zip.
11) Time to get the modded file over to your phone! Run these commands:
Code:
adb remount
adb push SecSettings-new.apk /system/app
adb shell
12) You should now have the file on your phone, and have an adb shell open. Almost there!
If you're not root (i.e. if the command line ends with $ rather than #), run "su".
Then:
Code:
cd /system/app
mv SecSettings.apk SecSettings.apk.OLD
mv SecSettings-new.apk SecSettings.apk
... and you're finally DONE, if all went well.
"exit" the adb shell, and reboot your phone. When it boots up, the notification should be gone, but blocking mode still works.
Let me know if you have problems, and we'll see if I'm qualified to help solve them.
Before
After
(I would show that blocking mode is active, but the toggle was offscreen in the "before" shot, and I don't want to revert to snap a new one!)
I've also modded away the brightness bar + rearranged the quick-setting icons via this guide - the steps are essentially the same as this guide, except you edit SystemUI.apk and change different files (two XML files instead of the .smali).
To get rid of the brightness bar, follow that guide but also look in values/bools.xml where you can change a brightness value and auto-brightness-button to false. (Change both!)
Great work, Does anyvbody have this as a flashable zip??
carrd said:
Great work, Does anyvbody have this as a flashable zip??
Click to expand...
Click to collapse
Hmm, I'm not sure whether simply using the finished SecSettings.apk is a good idea or not. If a ROM has changed it, those changes would be lost.
The alternative might be to have all this done by a script on the phone (in CWM), but I'm not sure whether that's possible or not. Anyone?
exscape said:
Hmm, I'm not sure whether simply using the finished SecSettings.apk is a good idea or not. If a ROM has changed it, those changes would be lost.
The alternative might be to have all this done by a script on the phone (in CWM), but I'm not sure whether that's possible or not. Anyone?
Click to expand...
Click to collapse
Here's a CW Zip. I've built this based on the XXDLIH build one.
The script will backup the original file to /system/app/SecSettings.apk.orig so worse case scenario you just need to rename it using a root explorer (any will do).
Let me know, however like anything you flash with CWM, make a backup FIRST and I'm not to be held responsible for your phone becoming Self Aware or owt.
Also, The guide at the top is basically right, however there's a lot of steps missing, I'll knock something up if anyone wants it to fill in the gaps (setting up the environment for a start etc).
However this 'should' work on all XXDLIH builds (but AFAICT should work on XXDLIB as well)
Here's the link to the file https://www.dropbox.com/s/kov1bdluu0pt8x8/Blocking_Mode_Icon_Remover.zip
i've intalled you mod by cwm in wannamlite 3.9 and every thing went like a charme. i have a few mods intalled and nothing was deleted. thanks a lote really nice job.
Sent from my GT-I9300 using Tapatalk 2
mocas said:
i've intalled you mod by cwm in wannamlite 3.9 and every thing went like a charme. i have a few mods intalled and nothing was deleted. thanks a lote really nice job.
Sent from my GT-I9300 using Tapatalk 2
Click to expand...
Click to collapse
No probs, anything to help.
Thanks to exscape for the source.
the_ape said:
Also, The guide at the top is basically right, however there's a lot of steps missing, I'll knock something up if anyone wants it to fill in the gaps (setting up the environment for a start etc).
Click to expand...
Click to collapse
Hmm, which environment? All the files (adb, apktool + their dependencies) should be included.
Anyway, thanks for the zip
exscape said:
Hmm, which environment? All the files (adb, apktool + their dependencies) should be included.
Anyway, thanks for the zip
Click to expand...
Click to collapse
You need to pull the various frameworks from the device, and put them in the right place. This is all documented elsewhere on the site, but for quickness sake, here's a down and dirty.
Download the 7Z Below (latest versions of aapt etc from http://forum.xda-developers.com/showthread.php?t=1792937), unpack them somewhere. Make sure Jave JRE is installed.
To pull from device, plug the Phone in then
Goto unpack folder
Let's get the frameworks from the device, so plugin the device, and ADB Devices and make sure you get a deviceID back.
pull_framework.bat
pull_twframework.bat
Now get the frameworks installed
set_framework-res.bat
set_twframework.res.bat
Let's get the APK we want to work with, so....
adb pull /system/app/SecSettings.apk .\apk\SecSettings.apk
OK, file in the right place, so let's get it unpacked to work with.
apktool d apk\SecSettings.apk working\SecSettings
That will take a few minutes, as it's got to sort out the framework dependencies etc, so give it a second or two. It should then look a little like the following
I: Baksmaling...
testI: Loading resource table...
I: Loaded.
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\YourUserName\apktool\framework\1.apk
I: Loaded.
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Done.
I: Copying assets and libs...
Now lets edit the smali for the fix (thanks to exscape for this, so click his thanks button)
notepad .\working\SecSettings\smali\com\android\settings\dormantmode\DormantModeNotiReceiver.smali
<CTRL>-F notificationCreate
Find Next one
change invoke-virtual {p0, p1}, Lcom/android/settings/dormantmode/DormantModeNotiReceiver;->notificationCreate(Landroid/content/ContextV
to
#invoke-virtual {p0, p1}, Lcom/android/settings/dormantmode/DormantModeNotiReceiver;->notificationCreate(Landroid/content/ContextV
and a bit further down
change invoke-virtual {p0, p1}, Lcom/android/settings/dormantmode/DormantModeNotiReceiver;->notificationClear(Landroid/content/ContextV
to
#invoke-virtual {p0, p1}, Lcom/android/settings/dormantmode/DormantModeNotiReceiver;->notificationClear(Landroid/content/ContextV
OK, edit done, save and back to the command prompt
start .\apk
Open the APK in 7-Zip/WinRar/Whatnot
Select the AndroidManifest.xml and the META-INF folder, and extract them to the working folder
We have all our bits, so let's put it back together in a usable APK
First we need to create an unsigned build (without the real manifest and META-INF)
apktool b working\SecSettings built\SecSettings-Unsigned.apk
This will take a while to run, as it's compiling everything it needs, should look a bit like this
: Checking whether sources has changed...
I: Smaling...
I: Checking whether resources has changed...
I: Building resources...
I: Building apk file...
Right, now we need a signed version, so copy the manifest XML and META-INF folders to \build\apk in the SecSettings folder.
move .\working\AndroidManifest.xml .\working\SecSettings\build\apk
move .\working\META-INF .\working\SecSettings\build\apk
Let's now compile the nice signed version, this will take moments, as it's just integrating the Manifest with the already compiled stuff.
apktool b working\SecSettings built\SecSettings.apk
And there we are, job done.
Copy to device in any way that you want, easiest is probably
adb push .\built\SecSettings.apk /system/app/SecSettings.apk
Remember that will overwrite the original (but you have a backup in the APK folder remember), just launch settings now on the device and you should be good to go.
Having said that, easier just to flash the zip
Ohh, I forgot the framework step. Sorry about that. I changed step #5 to include it now.
That's all I've done as far as frameworks go, and I've both used the guide myself (before I wrote it ) and tried it once after... So it should work now.
exscape said:
Ohh, I forgot the framework step. Sorry about that. I changed step #5 to include it now.
That's all I've done as far as frameworks go, and I've both used the guide myself (before I wrote it ) and tried it once after... So it should work now.
Click to expand...
Click to collapse
You will deffo need the TW Framework as well, else it wont be able to decompile. If you want to make sure, try
rd /s %userprofile%\apktool
Then try the process you have out, and you should get issues as the twframework is not available
the_ape said:
You will deffo need the TW Framework as well, else it wont be able to decompile.
Click to expand...
Click to collapse
I just deleted the entire \Users\x\apktool folder, re-added framework-res and decompiled the SecSettings APK with no errors. I'm sure I've never used the 'apktool if' command with anything else prior, too. Hmm.
mocas said:
i've intalled you mod by cwm in wannamlite 3.9 and every thing went like a charme. i have a few mods intalled and nothing was deleted. thanks a lote really nice job.
Sent from my GT-I9300 using Tapatalk 2
Click to expand...
Click to collapse
exscape said:
I just deleted the entire \Users\x\apktool folder, re-added framework-res and decompiled the SecSettings APK with no errors. I'm sure I've never used the 'apktool if' command with anything else prior, too. Hmm.
Click to expand...
Click to collapse
Cool, just making sure, if it works then cracking.
However setting up the fw's that way is the 'correct way' to do them.
hi again, is it possible for u to make a flashable zip with remove blocking mode and smart rotation?
when i install smart rotation i lose blocking mode and vice versa. thanks a lote.
Sent from my GT-I9300 using Tapatalk 2
mocas said:
hi again, is it possible for u to make a flashable zip with remove blocking mode and smart rotation?
when i install smart rotation i lose blocking mode and vice versa. thanks a lote.
Sent from my GT-I9300 using Tapatalk 2
Click to expand...
Click to collapse
I can certainly have a look, can you post a link to the rotation hack your using please?
Sorted, I'll compile and upload shortly, not a problem.
here is the link, thanks a lot again.
http://forum.xda-developers.com/showthread.php?t=1933519
Sent from my GT-I9300 using Tapatalk 2
mocas said:
here is the link, thanks a lot again.
http://forum.xda-developers.com/showthread.php?t=1933519
Sent from my GT-I9300 using Tapatalk 2
Click to expand...
Click to collapse
Here we go, https://www.dropbox.com/s/mtycq38lfw3sl4z/Blocking_Mode_Icon_Remover_With_Smart_Rotate-DLIH.zip
Should work just fine, works Fine on mine anyhow.
Let me know if there's issue, and click thanks if you appreciate
thanks a lot, no issues what so ever... every thing went just fine.
Sent from my GT-I9300 using Tapatalk 2
mocas said:
thanks a lot, no issues what so ever... every thing went just fine.
Sent from my GT-I9300 using Tapatalk 2
Click to expand...
Click to collapse
Most welcome
Would this excellent mod work on a Note II, by any chance?
Hi,
I'm trying to get the caller ID issue resolved on my i9502, as described in this thread:
http://forum.xda-developers.com/showthread.php?t=2268120
My i9502 has been flashed with this ROM:
http://pan.baidu.com/share/link?shareid=2302611&uk=3760742413
Everything is working fine with this ROM, except that CallerID doesn't correctly lookup contacts. It tries to find a contact name based on 11 matching digits.
When i try to follow the steps, as described in the thread above, to change the MIN_MATCH value
Check for and fix MIN_MATCH constant in telephony framework
1) Decompile framework.jar
2) Open smali/android/telephony/PhoneNumberUtils.smali
3) Search for MIN_MATCH constant and set it to 0x7
When running baksmali command i get the following errors:
C:\apktool\system\framework>java -jar baksmali.jar -x framework.odex
Error occured while loading boot class path files. Aborting.
org.jf.dexlib.Code.Analysis.ClassPath$ClassNotFoundException: Could not find int
erface Landroid/widget/AdapterView$OnItemClickListener;
at org.jf.dexlib.Code.Analysis.ClassPath$ClassDef.loadAllImplementedInte
rfaces(ClassPath.java:867)
at org.jf.dexlib.Code.Analysis.ClassPath$ClassDef.<init>(ClassPath.java:
692)
at org.jf.dexlib.Code.Analysis.ClassPath.loadClassDef(ClassPath.java:282
)
at org.jf.dexlib.Code.Analysis.ClassPath.initClassPath(ClassPath.java:16
3)
at org.jf.dexlib.Code.Analysis.ClassPath.InitializeClassPathFromOdex(Cla
ssPath.java:110)
at org.jf.baksmali.baksmali.disassembleDexFile(baksmali.java:104)
at org.jf.baksmali.main.main(main.java:297)
Error while loading class Landroid/accounts/ChooseAccountActivity$1; from file f
ramework.odex
Error while loading ClassPath class Landroid/accounts/ChooseAccountActivity$1;
And when running baksmali command against the framework.jar file:
C:\apktool\system\framework>java -jar baksmali.jar -x framework.jar
UNEXPECTED TOP-LEVEL EXCEPTION:
org.jf.dexlib.DexFile$NoClassesDexException: zip file framework.jar does not con
tain a classes.dex file
at org.jf.dexlib.DexFile.<init>(DexFile.java:298)
at org.jf.baksmali.main.main(main.java:269)
Anyone managed to deodex framework.jar of this ROM, and change the "smali/android/telephony/PhoneNumberUtils.smali" file to fix caller ID issue?
Did backsmali!
Hello,
I managed to backsmali framework.jar, what I did follows:
* Downloaded Backsmali-Manager_v1.5: http://forum.xda-developers.com/showthread.php?t=2311766
* Copied Phone's /system/framework folder to backsmali-manager folder.
* Run: java -jar tools\baksmali.jar -x -d framework put-file-here\framework.odex -o project\framework-jar
And that did the trick, but I think we need to follow the instructions from here: http://forum.xda-developers.com/showthread.php?t=1756953
luizfeliperj said:
Hello,
I managed to backsmali framework.jar, what I did follows:
* Downloaded Backsmali-Manager_v1.5: http://forum.xda-developers.com/showthread.php?t=2311766
* Copied Phone's /system/framework folder to backsmali-manager folder.
* Run: java -jar tools\baksmali.jar -x -d framework put-file-here\framework.odex -o project\framework-jar
And that did the trick, but I think we need to follow the instructions from here: http://forum.xda-developers.com/showthread.php?t=1756953
Click to expand...
Click to collapse
Hi,
Getting closer, but my phone was hanging after i put back the re-compiled framework.odex file.
I did the following:
1) de-compiled framework.odex:
C:\Baksmali-Manager_v1.5\system>java -jar ..\tools\baksmali.jar -x -d framework ..\put-file-here\framework.odex -o project\framework-jar
2) Edited the file: "smali/android/telephony/PhoneNumberUtils.smali ":
.field static final MIN_MATCH:I = 0x7
.field static final MIN_MATCH_CHINA:I = 0x7
.field static final MIN_MATCH_HK:I = 0x7
.field static final MIN_MATCH_TW:I = 0x7
3) Re-compiled again:
C:\Baksmali-Manager_v1.5\system>java -Xmx512M -jar ..\tools\smali.jar .\project\framework-jar -o new-framework.odex
4) re-named the file to "framework.odex"
And then put it back on my phone. I noticed that the re-compiled file is 6.98Mb vs. 7.41Mb the original framework.odex file.
Tried it anyway, but my phone was hanging at the Samsung logo on re-boot.
5) Re-flashed my phone with the rooted ROM. Now it starts up fine again
Did i miss something when de-compiling & compiling?
A look into the code
jompie said:
Hi,
3) Re-compiled again:
C:\Baksmali-Manager_v1.5\system>java -Xmx512M -jar ..\tools\smali.jar .\project\framework-jar -o new-framework.odex
4) re-named the file to "framework.odex"
And then put it back on my phone. I noticed that the re-compiled file is 6.98Mb vs. 7.41Mb the original framework.odex file.
Tried it anyway, but my phone was hanging at the Samsung logo on re-boot.
Did i miss something when de-compiling & compiling?
Click to expand...
Click to collapse
What you get back from smali is a regular jar, not an odexed one. When you run backsmali with '-x' argument, you tell backsmali to deodex the source file. So, Maybe, that was the problem.
But there are other points in the code we should pay attention. For your need, I don't think that you need to change anything in the original framework. You need that the MIN_MATCH variable set to 0x7. As far as I could understand from the smali code, if you change the sales code, you can accomplish that. And, as far as I know, sales code is a configuration directive, from one or more of the many xmls available in the /system directory.
I will substantiate what I said this some code snippets.
The MIN_MATCH* variables are defined as:
.field static final MIN_MATCH:I = 0x7
.field static final MIN_MATCH_CHINA:I = 0xb
.field static final MIN_MATCH_HK:I = 0x8
.field static final MIN_MATCH_TW:I = 0x9
In CompareLoosely method, there is a check for the sales_code "CHN" "CHU" "CHM" "CTC" "CHC"
.method public static compareLoosely(Ljava/lang/String;Ljava/lang/StringZ
(...)
const-string v11, "ro.csc.sales_code"
(...)
.local v9, "salesCode":Ljava/lang/String;
const-string v11, "CHN"
(...)
const-string v11, "CHU"
(...)
const-string v11, "CHM"
(...)
const-string v11, "CTC"
(...)
const-string v11, "CHC"
So, here is what I think. If CSC is defined as CHN (the default for this firmware), the MIN_MATCH_CHINA (0xb (11)) will be used, and that is really what is happening.
So we need test those others sales codes to check which one trigger which MIN_MATCH* variable. My guest is if you select any CSC not listed in the above list, the default case of 0x7 will be used. To change the CSC (I mean change the 'ro.csc.sales_code' property), we can use the method described by: http://www.geekzone.co.nz/forums.asp?forumid=97&topicid=109787.
UPDATE:
I misunderstood the smali code, the corresponding java code from the smali code follows:
String s2 = SystemProperties.get("ro.csc.sales_code");
if (!"CHN".equals(s2) && !"CHU".equals(s2) && !"CHM".equals(s2) && !"CTC".equals(s2) && !"CHC".equals(s2))
{
if (!"FET".equals(s2) && !"TWM".equals(s2) && !"CWT".equals(s2) && !"BRI".equals(s2))
{
if ("TGY".equals(s2))
{
So, if your sales code is not listed in any of the if's, you will use the the getMinMatch method, the corresponding java code follows.
public static int getMinMatch()
{
if (CscFeature.getInstance().getInteger("CscFeature_RIL_CallerIdMatchingDigit") == -1)
return 7;
else
return CscFeature.getInstance().getInteger("CscFeature_RIL_CallerIdMatchingDigit");
}
This CscFeature_RIL_CallerIdMatchingDigit is know and is located in the /system/csc/others.xml. What we need is a way to change the sales_code. I suppose that, if we change the /system/csc/sales_code.dat with any other unlisted code, like XEU, we would be fine.
UPDATE 2:
Changing the sales_code.dat did the trick, but now I have problems in dialer, I can't dial anyone, there is no button to press, they dissapeared.
Here what I did.
Edited the sales_code.dat, now it is XEU.
Reboot
Opened Config->Manage Apps->Contacts Stores->Cleaned everything (this will wipe all your contacts, back it up)
Reboot
Resynced my contacts with google, All my sms senders are now recognized!!! But I can't dial anyone...
UPDATE 3:
Modified the the smali code, recompiled, odexed using these instructions: http://forum.xda-developers.com/showthread.php?t=1208320
Result, no luck, will try again later.
UPDATE 4:
Did it!!! Works for me!
* Updated framework.odex [ Attached to this post ]
* Opened Config->Manage Apps->Contacts Store->Cleaned everything (this will wipe all your contacts, back it up)
* Reboot
Senders are now recognized !!
UPDATE 5:
To use this patched framework.odex you need to:
* Change the /system/framework/framework.odex with the one provided in the zip file
* Change the <CscFeature_RIL_CallerIdMatchingDigit> parameter inside the /system/csc/others.xml, remove the default value (11) and insert the desired one(ex. 8).
* Clean Contacts Store by opening Config->Manage Apps->Contacts Store and press the buttons destinated to clean everything.
* Reboot
* Resync contacts or restore Contacts from TitaniumBackup.
PS: There is no need to change sales_code.dat file, keep it intact.
SMS senders should now be recognized.
luizfeliperj said:
What you get back from smali is a regular jar, not an odexed one. When you run backsmali with '-x' argument, you tell backsmali to deodex the source file. So, Maybe, that was the problem.
UPDATE 4:
Did it!!! Works for me!
* Updated framework.odex [ Attached to this post ]
* Opened Config->Manage Apps->Contacts Stores->Cleaned everything (this will wipe all your contacts, back it up)
* Reboot
Senders are now recognized !!
Click to expand...
Click to collapse
anyone tried this? does it work?
luizfeliperj said:
What you get back from smali is a regular jar, not an odexed one. When you run backsmali with '-x' argument, you tell backsmali to deodex the source file. So, Maybe, that was the problem.
But there are other points in the code we should pay attention. For your need, I don't think that you need to change anything in the original framework. You need that the MIN_MATCH variable set to 0x7. As far as I could understand from the smali code, if you change the sales code, you can accomplish that. And, as far as I know, sales code is a configuration directive, from one or more of the many xmls available in the /system directory.
I will substantiate what I said this some code snippets.
The MIN_MATCH* variables are defined as:
.field static final MIN_MATCH:I = 0x7
.field static final MIN_MATCH_CHINA:I = 0xb
.field static final MIN_MATCH_HK:I = 0x8
.field static final MIN_MATCH_TW:I = 0x9
In CompareLoosely method, there is a check for the sales_code "CHN" "CHU" "CHM" "CTC" "CHC"
.method public static compareLoosely(Ljava/lang/String;Ljava/lang/StringZ
(...)
const-string v11, "ro.csc.sales_code"
(...)
.local v9, "salesCode":Ljava/lang/String;
const-string v11, "CHN"
(...)
const-string v11, "CHU"
(...)
const-string v11, "CHM"
(...)
const-string v11, "CTC"
(...)
const-string v11, "CHC"
So, here is what I think. If CSC is defined as CHN (the default for this firmware), the MIN_MATCH_CHINA (0xb (11)) will be used, and that is really what is happening.
So we need test those others sales codes to check which one trigger which MIN_MATCH* variable. My guest is if you select any CSC not listed in the above list, the default case of 0x7 will be used.
UPDATE:
I misunderstood the smali code, the corresponding java code from the smali code follows:
String s2 = SystemProperties.get("ro.csc.sales_code");
if (!"CHN".equals(s2) && !"CHU".equals(s2) && !"CHM".equals(s2) && !"CTC".equals(s2) && !"CHC".equals(s2))
{
if (!"FET".equals(s2) && !"TWM".equals(s2) && !"CWT".equals(s2) && !"BRI".equals(s2))
{
if ("TGY".equals(s2))
{
So, if your sales code is not listed in any of the if's, you will use the the getMinMatch method, the corresponding java code follows.
public static int getMinMatch()
{
if (CscFeature.getInstance().getInteger("CscFeature_RIL_CallerIdMatchingDigit") == -1)
return 7;
else
return CscFeature.getInstance().getInteger("CscFeature_RIL_CallerIdMatchingDigit");
}
This CscFeature_RIL_CallerIdMatchingDigit is know and is located in the /system/csc/others.xml. What we need is a way to change the sales_code. I suppose that, if we change the /system/csc/sales_code.dat with any other unlisted code, like XEU, we would be fine.
UPDATE 2:
Changing the sales_code.dat did the trick, but now I have problems in dialer, I can't dial anyone, there is no button to press, they dissapeared.
Here what I did.
Edited the sales_code.dat, now it is XEU.
Reboot
Opened Config->Manage Apps->Contacts Stores->Cleaned everything (this will wipe all your contacts, back it up)
Reboot
Resynced my contacts with google, All my sms senders are now recognized!!! But I can't dial anyone...
UPDATE 3:
Modified the the smali code, recompiled, odexed using this instructions: http://forum.xda-developers.com/showthread.php?t=1208320
Result, no luck, will try again later.
UPDATE 4:
Did it!!! Works for me!
* Updated framework.odex [ Attached to this post ]
* Opened Config->Manage Apps->Contacts Stores->Cleaned everything (this will wipe all your contacts, back it up)
* Reboot
Senders are now recognized !!
Click to expand...
Click to collapse
Thanks a lot for your work!!
I followed your steps, now it's working, i can now see who calls me. And also SMS still shows the right contact.
BTW, i didn't change sales_code.dat and even then it works. My region code should be SEA, but apparently it doesn't matter.
Now i can remove the Prefixer & Touchpal apps, that i used as a workaround.
Thanks again!
You are right, there is only framework.jar and framework2.jar, so i guess it wont work. but i have a hard time downloading the rooted chinese rom so i can try it, after downloading around 400+mb it stops as if finished and the speed starts very fast then slows down, would really appreaciate it if somebody could help...thank you...[/QUOTE]
If you use linux, you can use wget -c to continue the download from where it stopped. I had the very dame problem when the downloaded file hit 98%. I use wget to complete it
luizfeliperj said:
jimmyl19 said:
If you use linux, you can use wget -c to continue the download from where it stopped. I had the very dame problem when the downloaded file hit 98%. I use wget to complete it
Click to expand...
Click to collapse
i use a pc win7, any remedy? thanks...
PS. found a solution, i think, downloading now using a download manager, speed is to the max... thanks
Click to expand...
Click to collapse
Installing the chinese ROM
jimmyl19 said:
Hi, how did you install the chinese rom? do i have to flash samsung official firmware first? .. thanks...
Click to expand...
Click to collapse
I had CWM recovery, it was not an option to loose it. So here is what I did.
* Did a factory reset and a /system wipe using CWM.
* Got the chinese ROM tar file, extracted it, removed the recovery.img (rm recovery.img), repacked the tar file ( tar -cf fw.rar boot.img system.img csc.img sboot.bin... all the remaining files)
* Flashed the modified tar (fw.tar) using ODIN
With it, I had the chinese ROM installed and did not lose the CWM recovery.
Using Linux or OSX it is pretty straightforward, for windows, you need to download tar for windows, google for tar win32. It should point you to gnu tar project website. There they have a port of tar to the win32 OS.
luizfeliperj said:
I had CWM recovery, it was not an option to loose it. So here is what I did.
* Did a factory reset and a /system wipe using CWM.
* Got the chinese ROM tar file, extracted it, removed the recovery.img (rm recovery.img), repacked the tar file ( tar -cf fw.rar boot.img system.img csc.img sboot.bin... all the remaining files)
* Flashed the modified tar (fw.tar) using ODIN
With it, I had the chinese ROM installed and did not lose the CWM recovery.
Using Linux or OSX it is pretty straightforward, for windows, you need to download tar for windows, google for tar win32. It should point you to gnu tar project website. There they have a port of tar to the win32 OS.
Click to expand...
Click to collapse
Hi, your method is a little complicated. Can i just flash the chinese rom tar file using odin then flash CWM (w/c one do you use philz or cofface v3.0?) again using odin? thanks...
jimmyl19 said:
Hi, your method is a little complicated. Can i just flash the chinese rom tar file using odin then flash CWM (w/c one do you use philz or cofface v3.0?) again using odin? thanks...
Click to expand...
Click to collapse
For sure! You method is simpler. It's because I try to keep my flashing count at minimum, and reflashing the recovery is always scary. For recovery, I use philz, because of its exfat support.
luizfeliperj said:
For sure! You method is simpler. It's because I try to keep my flashing count at minimum, and reflashing the recovery is always scary. For recovery, I use philz, because of its exfat support.
Click to expand...
Click to collapse
Hi, finished flashing chinese rom, cleared cache, partition, reset. then install CWM cofface, then put the framework.odex in system/framework,and replace file, phone restart then change permission to rw,r,r. then sync google contact, call my phone from a 7 digit number, still does not match with caller id, so change 11 digit matching to 7 in csc/others.xml, clear data in contact storage, resync google contact, still not showing name of contact. Did i miss or done something wrong? thanks...
Hi, sorry... its working already. Thank you for the help, much appreciate it!!:good:
jimmyl19 said:
luizfeliperj said:
i use a pc win7, any remedy? thanks...
PS. found a solution, i think, downloading now using a download manager, speed is to the max... thanks
Click to expand...
Click to collapse
Uploaded the ROM here, if still needed:
http://www.fileconvoy.com/dfl.php?id=g3ac935230235665599932394609c1e80292419119
Click to expand...
Click to collapse
jompie said:
jimmyl19 said:
Uploaded the ROM here, if still needed:
http://www.fileconvoy.com/dfl.php?id=g3ac935230235665599932394609c1e80292419119
Click to expand...
Click to collapse
Hi Jompie, thank you very much for the upload. i also fixed mine already, caller id matching now working, thank you also for this fix, you started it.:good:
Click to expand...
Click to collapse
jompie said:
jimmyl19 said:
Uploaded the ROM here, if still needed:
http://www.fileconvoy.com/dfl.php?id=g3ac935230235665599932394609c1e80292419119
Click to expand...
Click to collapse
SO this Rom is caller ID fixed? or is it able to be fixed?
i downloaded the latest "rooted" chinese rom: I9502ZNUAME4_Rooted_JUFENG_4
is this the same? is there a simple way to fix the Caller ID problem?
Click to expand...
Click to collapse
jompie said:
Thanks a lot for your work!!
I followed your steps, now it's working, i can now see who calls me. And also SMS still shows the right contact.
BTW, i didn't change sales_code.dat and even then it works. My region code should be SEA, but apparently it doesn't matter.
Now i can remove the Prefixer & Touchpal apps, that i used as a workaround.
Thanks again!
Click to expand...
Click to collapse
"Opened Config->Manage Apps->Contacts Stores->Cleaned everything (this will wipe all your contacts, back it up)"
where do i find this? sorry for the dumb question but i cant really find "config" thanks!
Update:
found it. thanks anyway!
ronnylaborada said:
"Opened Config->Manage Apps->Contacts Stores->Cleaned everything (this will wipe all your contacts, back it up)"
where do i find this? sorry for the dumb question but i cant really find "config" thanks!
Update:
found it. thanks anyway!
Click to expand...
Click to collapse
late reply (better than never)
just go to settings> more> application manager> ALL
PS: it looks like you already got it. but hey it might help someone else...
omid_freesky said:
late reply (better than never)
just go to settings> more> application manager> ALL
PS: it looks like you already got it. but hey it might help someone else...
Click to expand...
Click to collapse
Hi, updated the ROM to MG2 at pan.baidu.com/share/link?shareid=3761575987&uk=3509615084
however seems like this caller id modification doesn't work anymore...
@jompie @luizfeliperj Thank you very much! Worked like a charm!
*Update: Celebrated too early. Phone is now stuck on Samsung logo. I'm on stock I9502ZNUCMF2 firmware. Is this the reason why it didn't work?
bryan_mmx said:
@jompie @luizfeliperj Thank you very much! Worked like a charm!
*Update: Celebrated too early. Phone is now stuck on Samsung logo. I'm on stock I9502ZNUCMF2 firmware. Is this the reason why it didn't work?
Click to expand...
Click to collapse
Was made for this rom: I9502ZNUAME4_Rooted_JUFENG.rar
Download from:
http://pan.baidu.com/share/link?shareid=2302611&uk=3760742413#dir/path=/rom/飓风行动/三星/I9502联通版
EDIT: Version 6.9 onwards, the methods are moved to somewhere else. I haven't found them yet due to exams.
So, last week a news struck android users viciously- the new much awaited Google assistant will be pixel specific only. But developers have already managed to get assistant on any nougat phone by editing the build.prop. But users have reported that camera and some other apps aren't working properly.
Today, I tried to decompile and remove from Google app the check for pixel device. I have got it working on my android one running Resurrection Remix 6.0.1.
I'll give here the steps.
DISCLAIMER- I won't be responsible for your bricked device. I tried it and it worked. Doesn't mean it will work for you too. Keep the original apk ready so that you can revert back in case anything happens.
What is working
Voice recognition
chats
Navigation etc.
What isn't working
The "OK Google" hotword detection is not working. It tells you to train your voice model everytime.
Requirements
apktool (make sure you have set it up properly)
A smali editor ( Notepad++ for Windows, I used kate on Linux)
patience
Android build tools (adb and zipalign)
Let's start
1. First we need the Google apk. Make sure you have upgraded to the latest ( mine was 6.8.21.21). Copy the file to your PC. Name it Google.apk
2. Open up a terminal in Linux (in Windows, navigate to the folder where apktool is located, and shift+right click on a blank space and click "open command prompt here"). If you're on Linux, make sure apktool is in your PATH.
Type
Code:
apktool d Google.apk
This should create a folder called "Google"
3. Open Google/smali/com/google/android/apps/gsa/assistant/a/e.smali file with your preferred editor.
4. Look for a method called pU() like this-
Code:
.method public static pU()Z
.locals 3
.prologue
const/4 v0, 0x1
.line 97
invoke-static {}, Lcom/google/android/libraries/e/a/a;->aY()Z
move-result v1
.line 2188
............
change the
Code:
const/4 v0, 0x0
to
Code:
const/4 v0, 0x1
Repeat the same process with another method called pT()
If you can't find them in the path I provided, then look for something like this "ro.opa.eligible_device" inside an "if-neq" or "if-eqz". If you find this, then that is probably the required method.
5. Return to the root directory (where the Google directory is located) and type
Code:
apktool b Google
6. The app should be ready in Google/dist directory. Move to there and copy the Original apk.
7. Open the original apk with a zip viewer (winrar or 7zip, I used ark). Extract the META-INF folder to the directory.
8. Open the modified apk with the zip viewer . Don't extract it. Just drag and drop the META-INF folder on the apk. Make sure you have the compression option as "store"
9. Now install this app. Some people reported that it does not install from the device. I never tried to install it from my phone. I actually installed it via adb and it worked. type-
Code:
adb install -r Google.apk
10. Wipe the data of the Google app from settings. No need to reboot.
Attachment: Assistant running on my phone with screen search
Guys, try this and let me know if it works or not.
this is awesome
Amazing, gonna try it out tomorrow!
Sent from my MotoG3 using XDA-Developers mobile app
Noice
Working Thank You !
Works on note 5!
Working on RR rom for moto g2 xt1068.
Surprisingly even OK Google is working.
No lag. I have one question tho: Is it he or she? What is his/her name? I rather called her Alia (bollywood guys would understand)
deleted
Hey this looks awesome! So I just need to install your mod apk or do I still have to replace the META_INF from original apk? Also, can you guide me with the installation from phone terminal? Beacuse my PC has adb problems. Thanks!
rpravenclaw said:
Hey this looks awesome! So I just need to install your mod apk or do I still have to replace the META_INF from original apk? Also, can you guide me with the installation from phone terminal? Beacuse my PC has adb problems. Thanks!
Click to expand...
Click to collapse
People are reporting that my app is not installing. You could try replacing the META-INF.
App install but it still the old google
spaghetio said:
I wasn't able to get it working on my HTC One M8. When I tried to install your pre-compiled APK, I was met with an error: [INSTALL_PARSE_FAILED_UNEXPECTED_EXCEPTION]. I also tried to follow your directions to edit the APK myself, but apktool apparently ran into a lot of errors and wasn't able to compile it.
I wish I could tell you more, but I don't know much about the working of APKs, and I've never even used apktool before.
Click to expand...
Click to collapse
Have you installed the framework and set up apktool properly? There's guides on how to do it on XDA
ANIKETultimate said:
Have you installed the framework and set up apktool properly? There's guides on how to do it on XDA
Click to expand...
Click to collapse
file not found on this link https://www.dropbox.com/s/bq0wpi5t38laklo/Google.apk?dl=0
shubham tech said:
file not found on this link https://www.dropbox.com/s/bq0wpi5t38laklo/Google.apk?dl=0
Click to expand...
Click to collapse
Updated the link :laugh:
ANIKETultimate said:
Updated the link :laugh:
Click to expand...
Click to collapse
peoples are reporting that using n-ify xposed module they are able to use google assitant http://forum.xda-developers.com/xposed/modules/xposed-android-n-ify-features-t3345091/page1093 have a look
will test in sometime.
shubham tech said:
peoples are reporting that using n-ify xposed module they are able to use google assitant http://forum.xda-developers.com/xposed/modules/xposed-android-n-ify-features-t3345091/page1093 have a look
will test in sometime.
Click to expand...
Click to collapse
Yes, N-ify also has the same issues as me. Their method is also similar as mine. But mine should work for non rooted users also.
I'm using N-ify too! Assistant works but swiping it up doesn't bring up screen search.
Edit : Screen search works after reboot.
Jainyankee1993 said:
Works on note 5!
Click to expand...
Click to collapse
U built ur own or used op apk ?
---------- Post added at 02:34 PM ---------- Previous post was at 02:16 PM ----------
ANIKETultimate said:
Updated the link :laugh:
Click to expand...
Click to collapse
Download is stopping at mid way
People, who can patch the last x64 one?
http://rgho.st/6THMPzFVV
Cant install apk from first post anyway ((
Thanx ))
doesnt work with 32bit devices like note 4?