[Q]add reboot to power menu.. - Dell Venue

http://forum.xda-developers.com/showthread.php?t=811532
└ This Thread looks while watching it, and curious.
Step 2 ,
When "com\android\internal\app\ShutdownThread.smali " fix,
cannot found that.
「.line 531
invoke-static {}, Landroid/os/Power;->shutdown()V
.line 532
return-void」
also
Step 3,
When "com\android\internal\policy\impl\GlobalActions.sm ali" fix,
cannot found "aput-object v2, v0, v1"
Venue is Different from existing descriptions.
What a way to get through a rock?

Related

[Q] Need help with extended power menu on 2.3.6

Hi all!! I need help with the extended power menu!
I'm on Gingerbread 2.3.6 and my rom is deodexed. I tried to add the extended power menu following this and this tutorial...
After study my "globalaction.smali", the code that I changed is this:
Code:
const/4 v0, 0x3
I follow the tutorial, but if I change the above code with "0x4 or 0xanynumber " my phone reboots when I try to bring up the menu, but the menu is not displayed. I only have a small vibration.
where I'm wrong?

Getting T-Mobile Wifi Calling working on other ROMS/Devices

This thread is as much a dumping ground for what I figure out, as it is an information sharing endevor. Anyone who feels that they can contribute, feel free.
My goal is to take the tmobile wifi calling code, and make it portable to as many devices/roms as I can. Ideally I would like to take whatever I need from the various frameworks, and make it portable enough that we could inject it into even cyanogenmod with little to no hassle.
All of this is based on the m919 t-mobile version of the SGS4.
This is what I have figured out about wifi calling so far:
Files Containing Wifi Calling stuff
Code:
./app/ims-service.apk -- whole file? possible merge required.
./app/ip-provider.apk -- whole file
./app/IPService.apk -- whole file
./app/SecContacts.apk -- We REALLY should merge. This may be easier to just copy to other TW Roms.
./app/SecMms.apk -- We REALLY should merge. This may be easier to just copy to other TW Roms.
./app/SecPhone.apk -- We REALLY should merge. This may be easier to just copy to other TW Roms.
./app/SecSettings.apk -- We REALLY should merge. This may be easier to just copy to other TW Roms.
./app/WifiCall.apk -- whole file
./framework/jsr-api.jar -- partial methods + merge -- This contains a class that we can simply copy into our target framework, but there are still files that must be manually merged.
./framework/services.jar -- merge
./framework/telephony-common.jar -- partial methods + merge -- This contains a class that we can simply copy into our target framework, but there are still files that must be manually merged.
Files needing to be merged.
Code:
./telephony-common.jar/com/android/internal/telephony/gsm/GsmServiceStateTracker.smali
./telephony-common.jar/com/android/internal/telephony/PhoneFactory.smali
./telephony-common.jar/com/android/internal/telephony/CallManager.smali
./telephony-common.jar/com/android/internal/telephony/uicc/SIMRecords.smali
./telephony-common.jar/com/android/internal/telephony/uicc/IsimUiccRecords.smali
./jsr-api.jar/com/android/ims/core/media/player/RecvPlayerImpl.smali
./jsr-api.jar/com/android/ims/core/media/player/RecvPlayerImpl$1.smali
./jsr-api.jar/com/android/ims/core/media/player/SendPlayerImpl.smali
./jsr-api.jar/com/android/ims/core/media/player/SendPlayerImpl$1.smali
./services.jar/com/android/server/WifiService.smali
./app/SecSettings/apk/res/values/strings.xml
./app/SecSettings/res/xml/wifi_calling_settings.xml
./app/SecSettings/smali/com/android/settings/deviceinfo/Status$6.smali
./app/SecSettings/smali/com/android/settings/deviceinfo/Status.smali
./app/SecSettings/smali/com/android/settings/wifi/WifiSettings.smali
./app/SecSettings/smali/com/android/settings/SecuritySettings.smali
./app/SecContacts/smali/com/sec/android/app/contacts/util/ImsLowSignalHelper.smali
./app/SecContacts/smali/com/sec/android/app/contacts/util/ImsLowSignalHelper$1.smali
./app/SecPhone/res/xml/wifi_calling_settings.xml
./app/SecPhone/smali/com/android/phone/GsmUmtsAdditionalCallOptions.smali
./app/SecPhone/smali/com/android/phone/CallController.smali
./app/SecPhone/smali/com/android/phone/GsmUmtsAdditionalCallOptions$3.smali
./app/SecPhone/smali/com/android/phone/InCallControlState.smali
./app/SecPhone/smali/com/android/phone/InCallTouchUi.smali
./app/SecPhone/smali/com/android/phone/NotificationMgr.smali
./app/SecPhone/smali/com/android/phone/InCallScreen.smali
./app/SecPhone/smali/com/android/phone/CallFeaturesSetting$16.smali
./app/SecPhone/smali/com/android/phone/CallCard.smali:
./app/SecPhone/smali/com/android/phone/PhoneUtils.smali
./app/SecPhone/smali/com/android/phone/InCallMenu.smali
./app/SecPhone/smali/com/android/phone/InCallScreen$38.smali
./app/SecMms/smali/com/android/mms/util/IMSUtils.smali
./app/SecMms/smali/com/android/mms/ui/ComposeMessageFragment$1.smali
./app/SecMms/smali/com/android/mms/ui/ComposeMessageFragment.smali
More to come as I figure out more.
*EDIT*
I am working from the open source project here:
https://github.com/FennyFatal/the-ims-open-source-project-for-android
I got a preliminary merge done with framework/apk files from the i9505:
I am building now to test...
Here is a more complete listing of the functions that were involved. There ARE some missing. I got a bit anxious around 85% of the way through and stopped documenting.. silly me.
Functions needing merge:
Code:
SecMms/smali/com/android/mms/transaction/HttpUtils.smali
.method protected static httpConnection(Landroid/content/Context;JLjava/lang/String;[BIZLjava/lang/String;ILandroid/net/http/AndroidHttpClient;Lorg/apache/http/HttpRequest;)[B
SecMms/smali/com/android/mms/transaction/PushReceiver$ReceivePushTask.smali
.method private isDataAvailable()Z
./SecMms/smali/com/android/mms/transaction/RetrieveAckTransaction.smali
.method private isNetworkAvailable()Z
./SecMms/smali/com/android/mms/transaction/RetryScheduler.smali
.method private constructor <init>(Landroid/content/Context;)V
.method private isConnected()Z
./SecMms/smali/com/android/mms/transaction/Transaction.smali
.method private ensureRouteToHost(Ljava/lang/String;Lcom/android/mms/transaction/TransactionSettings;)V
./SecMms/smali/com/android/mms/transaction/TransactionService.smali
.method private isNetworkAvailable()Z
.method protected beginMmsConnectivity()I
.method public onDestroy()V
./SecMms/smali/com/android/mms/ui/ComposeMessageFragment.smali
.method public confirmSendMessageIfNeeded()V
.method public onResume()V
.method public onOptionsItemSelected(Landroid/view/MenuItem;)Z
.method networkWarningDialogAndSend(Z)V
./SecContacts/smali/com/android/contacts/detail/ContactDetailFragment$ViewAdapter$4.smali
.method public onClick(Landroid/view/View;)V
./SecContacts/smali/com/android/contacts/detail/ContactDetailFragment.smali
.method public onCreate(Landroid/os/Bundle;)V
.method public onPause()V
.method public onResume()V
./SecContacts/smali/com/android/contacts/list/ContactEntryListFragment.smali
.method public onCreate(Landroid/os/Bundle;)V
.method public onResume()V
.method public onPause()V
./SecContacts/smali/com/android/contacts/list/ContactTileListFragment.smali
.method public onCreate(Landroid/os/Bundle;)V
.method public onResume()V
.method public onPause()V
./SecContacts/smali/com/android/contacts/quickcontact/QuickContactListFragment.smali
.method static synthetic access$800(Lcom/android/contacts/quickcontact/QuickContactListFragment;)Lcom/sec/android/app/contacts/util/ImsLowSignalHelper;
.locals 1
.parameter "x0"
.prologue
.line 78
iget-object v0, p0, Lcom/android/contacts/quickcontact/QuickContactListFragment;->mImsLowSignalHelper:Lcom/sec/android/app/contacts/util/ImsLowSignalHelper;
return-object v0
.end method
.method public onResume()V
.method public onPause()V
./SecContacts/smali/com/android/contacts/quickcontact/QuickContactListFragment$2.smali
.method public onClick(Landroid/view/View;)V
./SecContacts/smali/com/sec/android/app/contacts/list/ContactListSweepActionListener.smali
.method public onSweepActionFired(II)V
./SecContacts/smali/com/sec/android/app/dialertab/calllog/CallDetailActivity.smali
.method protected onCreate(Landroid/os/Bundle;)V
.method protected onPause()V
./SecContacts/smali/com/sec/android/app/dialertab/calllog/CallLogFragment.smali
.method public callSelectedEntry()V
.method public onCreate(Landroid/os/Bundle;)V
.method public onPause()V
.method public onResume()V
.method public setSweepActionEnabled(Z)V
./SecContacts/smali/com/sec/android/app/dialertab/dialpad/DialpadFragment.smali
.method private placeCall_result(Ljava/lang/String;)V
.method private setupAddtionalButtons(Landroid/view/View;)V
.method public callVisualVoiceMail()V
.method public callVoicemail()V
.method public dialButtonPressed()V
.method public onCreate(Landroid/os/Bundle;)V
.method public onPause()V
.method public onResume()V
./SecContacts/smali/com/sec/android/app/dialertab/widget/DialtactsListSweepActionListener.smali
.method public onSweepActionFired(II)V
./SecPhone/smali/com/android/phone/CallCard.smali
.method private updateDisplayForConference(Lcom/android/internal/telephony/Call;)V
.method updateMySoundBtn(Lcom/android/internal/telephony/Call$State;)V
./SecPhone/smali/com/android/phone/CallController.smali
.method private placeCallInternal(Landroid/content/Intent;)Lcom/android/phone/Constants$CallStatusCode;
./SecPhone/smali/com/android/phone/CallFeaturesSetting.smali
.field private mWifiCallSwitchPreference:Landroid/preference/Preference;
.method private registerRegReceiver(Z)V
.method private updateEtcPreference()V
.method protected initGeneralSetting(Z)V
.method protected initVideoSetting(Z)V
.method public onCreate(Landroid/os/Bundle;)V
.method public onPause()V
.method public onResume()V
./SecPhone/smali/com/android/phone/GsmUmtsAdditionalCallOptions.smali
.method public onFinished(Landroid/preference/Preference;Z)V
.method public onPause()V
.method public onResume()V
./SecPhone/smali/com/android/phone/GsmUmtsAdditionalCallOptions$3.smali
.method public onReceive(Landroid/content/Context;Landroid/content/Intent;)V
./SecPhone/smali/com/android/phone/IccNetworkDepersonalizationPanel$2.smali
Replace file, and subfiles.
./SecPhone/smali/com/android/phone/InCallMenu.smali
.method protected prepareOptionsMenu(Landroid/view/Menu;)Z
./SecPhone/smali/com/android/phone/InCallTouchUi.smali
.method private updateInCallIcons(Lcom/android/phone/InCallControlState;)V
./SecSettings/smali/com/android/settings/deviceinfo/Status.smali
.method private registerRegReceiver(Z)V
.method public onPause()V
.method protected onResume()V
./SecSettings/smali/com/android/settings/wifi/WifiSettings.smali
.method private updateConnectionState(Landroid/net/NetworkInfo$DetailedState;)V
./SecSettings/smali/com/android/settings/SecuritySettings.smali
.method private createPreferenceHierarchy()Landroid/preference/PreferenceScreen;
./services.jar.out/smali/com/android/server/WifiService.smali
.method constructor <init>(Landroid/content/Context;)V
.method private setNotificationVisible(ZIZI)V
Side Note:
./SecMms/smali/com/android/mms/ui/ComposeMessageFragment.smali
.method public static isWhiteTheme()Z
./SecMms/smali/com/android/mms/MmsConfig.smali
+ const-string v10, "http://wap.samsungmobile.com/uaprof/SGH-M919.xml"
- const-string v10, "http://wap.samsungmobile.com/uaprof/GT-I9505.xml"
Will post back with results soon, I am building my own custom kernel from the i9505 source, because it seems that the current (latest) stock kernel binaries have some sort of anti suid patch.
WiFi calling on AOSP ROMs has been attempted ever since T-Mobile came out with it. Its impossible from what i have read. T-Mobile uses specific libs and modules that they DO NOT release. Making it impossible. I think there is like a 10000 dollar bounty thread in the S3 forums for it too. And its been there since forever. I don't see it being possible unless somehow AOSP (Cyanogenmod) makes their own version of it.
elesbb said:
WiFi calling on AOSP ROMs has been attempted ever since T-Mobile came out with it. Its impossible from what i have read. T-Mobile uses specific libs and modules that they DO NOT release. Making it impossible. I think there is like a 10000 dollar bounty thread in the S3 forums for it too. And its been there since forever. I don't see it being possible unless somehow AOSP (Cyanogenmod) makes their own version of it.
Click to expand...
Click to collapse
You just watch me.
Fenny said:
You just watch me.
Click to expand...
Click to collapse
You'd be an XDA star if you do Not trying to discourage, but iv'e seen elite recognized developers say they have tried and failed xD
Let's put the non-technical comments aside and keep the focus on what it's supposed to be in these forums - the technical stuff. General comments have plenty of room in other forums.
And as it was reminded - let's not get wrapped up too much in the titles, post counts, etc to see who is innovative. DJRbliss is a great example.
elesbb said:
WiFi calling on AOSP ROMs has been attempted ever since T-Mobile came out with it. Its impossible from what i have read. T-Mobile uses specific libs and modules that they DO NOT release. Making it impossible. I think there is like a 10000 dollar bounty thread in the S3 forums for it too. And its been there since forever. I don't see it being possible unless somehow AOSP (Cyanogenmod) makes their own version of it.
Click to expand...
Click to collapse
#1. AOSP is not cyanogenmod.
#2. Developers long ago made this mod for all Sensation ROMs including stock AOSP and stock Sense ROMs.
#3. This isn't an open discussion for people who think they know it all.
To the |OP|
I have both the M919 and the i9500 and would love to help with any files, logs, etc.
My experience includes decompiling/recompiling/modifying XMLs and .apks, just shoot me a PM for any additional items you may require.
Lets do this !
I dont know if this helps but I have tmobile and I tried to use wifi calling on a phone with no service and it called tmobile instead of the number I dialed. So it seems connected to their service not just the wifi that you are on
maradonaiconboy said:
You just watch me.
Clubvegas999
Click to expand...
Click to collapse
If you can solve the project totally before I can, more power to you.
I've figured out that the issues I was having were due to SELinux on the particular i9505 rom I was working with, things are progressing a lot more smoothly now. I should have enough information to build a more generic Xposed Framework Mod soon.
There is a1400$ bounty for this in the nexus 4 forums if you do solve this and want to cash out. Going to watch this threads closely. I don't know if you need assistance but I'm a programmer with some experience in decompiling/compiling apks and doing forensic work on apks. More than willing to help out and beta test for cm 10.1 on the n4
I posted some info awhile back from when I had the S3, perhaps this may be of some use to you http://forum.xda-developers.com/showthread.php?t=2110061
layzer253 said:
I posted some info awhile back from when I had the S3, perhaps this may be of some use to you http://forum.xda-developers.com/showthread.php?t=2110061
Click to expand...
Click to collapse
Good information there, that makes me think it might need some sort of T Mobile OEM certificate on the device in order to validate the sim over wifi. If that's the case perhaps we can take the entire certificate store from the T Mobile stock rom, and load that only for the purposes of authentication for wifi calling. Looks like it's time to do more digging
Sent from my SGH-M919 using Tapatalk 4 Beta
I'm no smali/apk hacker, but I am fairly competent in porting ROMs from the ground up. Nonetheless, I would assume part of the issue may be that some of the code is relying on particular libs in addition to framework changes.
Just thought I would let y'all know I am making some progress.
layzer253 said:
I posted some info awhile back from when I had the S3, perhaps this may be of some use to you http://forum.xda-developers.com/showthread.php?t=2110061
Click to expand...
Click to collapse
Super good call on that. I was just able to successfully log into the service, and send a text message with code from the open ims project.
Fenny said:
Just thought I would let y'all know I am making some progress.
Super good call on that. I was just able to successfully log into the service, and send a text message with code from the open ims project.
Click to expand...
Click to collapse
Keep us updated, this will be awesome w my $30 prepaid plan that has 100 mins only.
Ian B
I am excited, WiFi calling is by far the number 1 feature I miss running on an aosp ROM!
Just a quick update.
I have got it to the point that it generates the proper login data, but it seems that the ROM that I am on is not updating cellular location information properly, so it is leaving off the "last network" entry that should be sent as part of the auth, it works if I hack it into the message, but that's not a good solution.
You can have a look at the code here: https://github.com/FennyFatal/the-ims-open-source-project-for-android
Build Instructions for the test client.
Clone the repo, do 'ant update', then ./build.sh. Make sure you have smali/baksmali wrapper scripts in your path.
You DO need to replace '12066311973' with your own imsi, as reading the imsi is not properly implemented yet.
Fenny said:
Just a quick update.
I have got it to the point that it generates the proper login data, but it seems that the ROM that I am on is not updating cellular location information properly, so it is leaving off the "last network" entry that should be sent as part of the auth, it works if I hack it into the message, but that's not a good solution.
You can have a look at the code here: https://github.com/FennyFatal/the-ims-open-source-project-for-android
Build Instructions for the test client.
Clone the repo, do 'ant update', then ./build.sh. Make sure you have smali/baksmali wrapper scripts in your path.
You DO need to replace '12066311973' with your own imsi, as reading the imsi is not properly implemented yet.
Click to expand...
Click to collapse
Keep up the good work!
layzer253 said:
Keep up the good work!
Click to expand...
Click to collapse
I have finally found the code for the hashing algorythm for AKA auth it was in telephony-common, and was being called via an ITelephony interface. Not sure if I can take the appropriate classes and just move them verbatim or not... certainly we will have to either move it out of telephony-common and into the code for this app, or add it to the aosp code since it does use data from the sim. (And add it to the interface in framework). I would ideally like this to all be java (No smali injection) so I'm working on translating it from smali right now.
The good news is that I can reliably move the wifi calling feature to almost any sammy based rom, just working on portability to aosp now.
Sent from my SGH-M919
Fenny said:
I have finally found the code for the hashing algorythm for AKA auth it was in telephony-common, and was being called via an ITelephony interface. Not sure if I can take the appropriate classes and just move them verbatim or not... certainly we will have to either move it out of telephony-common and into the code for this app, or add it to the aosp code since it does use data from the sim. (And add it to the interface in framework). I would ideally like this to all be java (No smali injection) so I'm working on translating it from smali right now.
The good news is that I can reliably move the wifi calling feature to almost any sammy based rom, just working on portability to aosp now.
Sent from my SGH-M919
Click to expand...
Click to collapse
Can you share the one for Sammy roms ?

[HELP] Forcing Spotify to tablet mode ( Smali patch version )

Spent last two days trying to edit .smali files in Spotify to force it to tablet mode without any luck. I know there's Xposed module for this but I'd like to achieve the same by edit .smali files, this way no root required and ART compatible, i know many user will appreciate this.
findings so far ( thanks to Xposed module creator @JsChiSurf too ):
spotify uses getDisplayMetrics() to get pixel height/width/xdpi
spotify uses pythagoras to get screen diagonal size
spotify reads manufacteur/brand/device type/device id
Click to expand...
Click to collapse
functions it uses to achieve this are located in com\spotify\mobile\android\util\ab.smali, just did a whole decompiled apk search with jd-gui for "getDisplayMetrics" and this is the only place it access height/width
this is how it looks:
Code:
public static ac h()
{
return new ac(Build.MODEL, Build.MODEL, Build.BRAND, Build.MANUFACTURER);
}
public final double b()
{
DisplayMetrics localDisplayMetrics = this.a.getResources().getDisplayMetrics();
return Math.sqrt(Math.pow(localDisplayMetrics.widthPixels / localDisplayMetrics.xdpi, 2.0D) + Math.pow(localDisplayMetrics.heightPixels / localDisplayMetrics.ydpi, 2.0D));
}
public final String g()
{
return ((TelephonyManager)this.a.getSystemService("phone")).getDeviceId();
}
now dalvik opcodes:
Code:
# virtual methods
.method public final b()D
.locals 7
.prologue
const-wide/high16 v5, 0x4000
.line 44
iget-object v0, p0, Lcom/spotify/mobile/android/util/ab;->a:Landroid/content/Context;
invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v0
invoke-virtual {v0}, Landroid/content/res/Resources;->getDisplayMetrics()Landroid/util/DisplayMetrics;
move-result-object v0
.line 45
iget v1, v0, Landroid/util/DisplayMetrics;->widthPixels:I
int-to-float v1, v1
iget v2, v0, Landroid/util/DisplayMetrics;->xdpi:F
div-float/2addr v1, v2
float-to-double v1, v1
invoke-static {v1, v2, v5, v6}, Ljava/lang/Math;->pow(DD)D
move-result-wide v1
iget v3, v0, Landroid/util/DisplayMetrics;->heightPixels:I
int-to-float v3, v3
iget v0, v0, Landroid/util/DisplayMetrics;->ydpi:F
div-float v0, v3, v0
float-to-double v3, v0
invoke-static {v3, v4, v5, v6}, Ljava/lang/Math;->pow(DD)D
move-result-wide v3
add-double v0, v1, v3
invoke-static {v0, v1}, Ljava/lang/Math;->sqrt(D)D
move-result-wide v0
return-wide v0
.end method
what I've tried so far:
placing some "mul-double v0, v0, v0" before return-wide v0 -> my idea was to mul return value to have a bigger screen diagonal
removing sqrt call
returning custom values using const opcode
Click to expand...
Click to collapse
everytime im installing modded apk in bluestacks, nothing changed i can only play shuffle mode aka mobile mode.
my environment:
Bluestacks to test app -> I set its screen size to 100*100 this way spotify starts in mobile phone mode and i can test
Virtuous Ten Studio to edit spotify apk -> when creating new project DESELECT disassemble resources otherwise when compiling it will fail
to set bluestacks screen size to trigger mobile mode : StacksTweak
Can anyone more experienced contribute/help me? This way user that dont want roor/use ART can use spotify forced in tablet mode
no one?
edit: search in com\spotify\mobile\android for keywords like "screen_size" and "layout_as_tablet" some lines above ther's the call to phytagoras function i described before. File im talking about is MainActivity.smali in com\spotify\mobile\android\ui\activityl folder. Event forcing the check to return true aka im in tablet mode doesnt work
Can some dev explain this?
very nice idea, I'm interested in it too... does someone know how to do?
What the diffrence between the tablet and phone gui of spotify if you guys don't mind me asking..?
I found where it calculates Pythagoras to grab screen diagonal and tried to patch apk then rebuilt it. BTW it doesn't seem to affect apk when executed, so maybe im rebuilding/patching in the wrong way, that's why I posted. Maybe some dev can explain why it doesn't work when executed.
I think it's the right place to patch since it's clearly calculating screen diagonal
With tablet mode you can select which song you want to play, with phone mode only shuffle is enabled, both gui are the same
I would LOVE a working forced-tablet apk! I have a 9.7" no-name tablet which only runs Spotify in mobile mode. I cannot use the Xposed module because it has not been backported to Gingerbread (Xposed - yes, the module - no).
Spotify never responded to my support ticket, so I would have no guilt using a tweaked app to force tablet mode on my....tablet!
fudduf said:
I would LOVE a working forced-tablet apk! I have a 9.7" no-name tablet which only runs Spotify in mobile mode. I cannot use the Xposed module because it has not been backported to Gingerbread (Xposed - yes, the module - no).
Spotify never responded to my support ticket, so I would have no guilt using a tweaked app to force tablet mode on my....tablet!
Click to expand...
Click to collapse
that's why i'd like to patch apk, Xposed is a general way, not specific to Spotify and it requires root, many users dont want it. I think patching apk is the best solution for this problem, as i stated before, i found where patch it's needed, now some devs should help us, but i think they're too busy as none of them replied, maybe just a tip to point me in the right direction and patch it...
any headway into this project? This would be so cool if achieved.
Tabletmatrics.
Sent from my Barnes & Noble Nook HD using Tapatalk 4
Hey steebro,
I like your thinking! But I quess you are digging on the wrong place.
The code your working on, looks more like the actual math itself. What you
need to find or rather to mod is the real IF function that asks:
"!! pseudo code !!"
If this device is a phone
set play mode
else
set shuffle mode
Maybe it is vice versa:
set play mode
If this device is not a tablet
set shuffle mode
They could be a lot of options how they wrote this procedure to get this information and set the mode.
First you need to find this point where the code decided which mode will be activated.
Which functions are calling the public final double b() ?
Than! You can "just" set the "set shuffle mode" in comments or replace it with the "set play mode" and the job
is done! And it doesnt matter what device you have!
I appreaciate your work because I think the same way. If you need a beta tester, don't hesitate
to contact me. I can also take a look in the code to identify the procedure we need to find!?
Cheers
NewBit
Bump on this because with 5.0 released this has ruined my spotify. If anyone has a way to get in into tablet mode with xposed please do tell.
Same here...
I found a lot of references for getdisplaymetrics:
spotify/smali/net/hockeyapp/android/views/UpdateView.smali :
spotify/smali/net/hockeyapp/android/views/b.smali :
spotify/smali/net/hockeyapp/android/views/c.smali :
spotify/smali/net/hockeyapp/android/views/a.smali :
spotify/smali/android/support/v7/app/f.smali :
spotify/smali/android/support/v7/internal/view/menu/ActionMenuItemView.smali :
spotify/smali/android/support/v7/internal/view/menu/y.smali :
spotify/smali/android/support/v7/internal/view/menu/ActionMenuPresenter.smali :
spotify/smali/android/support/v7/internal/view/menu/ActionMenuView.smali :
spotify/smali/android/support/v7/internal/view/a.smali :
spotify/smali/android/support/v7/internal/widget/ActionBarView.smali :
spotify/smali/android/support/v7/internal/widget/ActionBarContextView.smali :
spotify/smali/android/support/v7/internal/widget/ListPopupWindow.smali :
spotify/smali/android/support/v7/internal/widget/ActivityChooserView.smali :
spotify/smali/android/support/v4/view/PagerTabStrip.smali :
spotify/smali/android/support/v4/view/PagerTitleStrip.smali :
spotify/smali/android/support/v4/view/PagerTitleStripHacked.smali :
spotify/smali/android/support/v4/view/ViewPager.smali :
spotify/smali/android/support/v4/view/ActionBarTabStrip.smali :
spotify/smali/android/support/v4/widget/DrawerLayout.smali :
spotify/smali/android/support/v4/widget/SlidingPaneLayout.smali :
spotify/smali/android/support/v4/widget/ad.smali :
spotify/smali/android/support/v4/widget/SwipeRefreshLayout.smali :
spotify/smali/com/userzoom/bb.smali :
spotify/smali/com/userzoom/az.smali :
spotify/smali/com/userzoom/ay.smali :
spotify/smali/com/facebook/widget/i.smali :
spotify/smali/com/devsmart/android/ui/HorizontalListView.smali :
spotify/smali/com/mixpanel/android/mpmetrics/y.smali :
spotify/smali/com/mixpanel/android/mpmetrics/e.smali :
spotify/smali/com/mixpanel/android/surveys/SurveyChoiceView.smali :
spotify/smali/com/google/android/gms/ads/d.smali :
spotify/smali/com/google/android/gms/internal/ar.smali :
spotify/smali/com/google/android/gms/internal/ak.smali :
spotify/smali/com/google/android/gms/internal/j.smali :
spotify/smali/com/google/android/gms/internal/ls.smali :
spotify/smali/com/google/android/gms/internal/fs.smali :
spotify/smali/com/google/android/gms/internal/dw.smali :
spotify/smali/com/google/android/gms/internal/el.smali :
spotify/smali/com/google/android/gms/internal/eo.smali :
spotify/smali/com/google/android/gms/internal/cs.smali :
spotify/smali/com/google/android/gms/internal/c.smali :
spotify/smali/com/google/android/gms/internal/er.smali :
spotify/smali/com/google/android/gms/internal/jq.smali :
spotify/smali/com/google/android/gms/plus/j.smali :
spotify/smali/com/mobileapptracker/h.smali :
spotify/smali/com/spotify/mobile/android/spotlets/search/view/SearchViewsManager.smali :
spotify/smali/com/spotify/mobile/android/spotlets/browse/c.smali :
spotify/smali/com/spotify/mobile/android/spotlets/collection/b/b.smali :
spotify/smali/com/spotify/mobile/android/util/bk.smali :
spotify/smali/com/spotify/mobile/android/util/ao.smali :
spotify/smali/com/spotify/mobile/android/ui/ActionBarManager.smali :
spotify/smali/com/spotify/android/paste/graphics/e.smali :
spotify/smali/com/spotify/android/paste/widget/EmptyView.smali :
spotify/smali/com/squareup/picasso/z.smali :
spotify/smali/it/sephiroth/android/library/widget/y.smali :
spotify/smali/it/sephiroth/android/library/widget/AbsHListView.smali :
spotify/smali/it/sephiroth/android/library/widget/s.smali :
Click to expand...
Click to collapse
This is gonna be hard to achieve.
oh please guys make this happen. I love tablet metrics, but I want to update to lollipop. this is the only thing keeping me from updating. I hope you didn't give up on this. rooting for ya
any updates??
Yes please someone do it. This is the only thing I hate about lollipop, I've subscribed to music all access but I think nothing beats Spotify
Forcing tablet mode!
I'm also looking for this to work. I've found that the function shuffle takes a boolean which I assume that this will tell the app to work in tablet/phone mode after calculating the metrics. So I tried to set that boolean to be false (or true) from the beginning. But when I modify anything the app want open or crash immediately after openning. So I think you guys should look there for a fix as I lack the skills to modify an app
Good luck!
Forced tablet mode
Captain here. I was also frustrated to find out XPosed therefore TabletMetrics does not work on ART (& Android Lollipop), and I had no other choice but to learn some Dalvik.
I do "honestly not know" how the link appeared below, but to all who feel like "free music on 'ma phone":
~removed because more info below~
@op You are missing just one more method hiding somewhere in .../util/ that plays a big role here
ViRb3 said:
So guys I decided to move this work to a separate topic. The interest of all of you is what made me do that .
You can find the newest Spotify mod [updated today!] here from now on:
http://forum.xda-developers.com/android/general/mod-spotify-tablet-mode-t3006191/
Click to expand...
Click to collapse
Forcing tablet mode!
ViRb3 said:
Captain here. I was also frustrated to find out XPosed therefore TabletMetrics does not work on ART (& Android Lollipop), and I had no other choice but to learn some Dalvik.
I do "honestly not know" how the link appeared below, but to all who feel like "free music on 'ma phone":
URL: mega.co.nz/#!pdoEEYjL (latest version as of now)
Mr.Key: rOuCoHJ6uEN6L8PQv1SevDCOytNRs4brP2grVqtjoSY
@op You are missing just one more method hiding somewhere in .../util/ that plays a big role here
Click to expand...
Click to collapse
WOW!! You sir are a genius! Literally! Please I really wanna learn how you done it from start to end. Please teach me This is a dream come true for me, man
I receive this error
Sent from my Nexus 5 using XDA Free mobile app
Same for me, but using standard login works 100% THANKS ViRb3!

Firefox v35.0.1 with Flash Enabled

It's me from the development section. I noticed a little while back that starting firefox 29, our device is explicitly blacklisted from mozilla not to use the flash plugin. Regardless of whether you're on kitkat or not and whether you installed flash or not firefox will check to see if you're using a tegra2 (and surprise) tegra3 device. If you have one of these, firefox goes out of its way to make sure you don't use flash. In place, it has a cheesy "we're sorry" message. On most kitkat roms flash will not work because you need to compile the rom with -DNEEDS_VECTORIMPL_SYMBOLS . However, this flag is automatically used for our tablet to get the camera driver to load. It would seem like a no-brainer to use flash on our tablet then.
Here's the code that disables flash for us: firefox-source/mobile/android/base/GeckoAppShell.java
Code:
// An awful hack to detect Tegra devices. Easiest way to do it without spinning up a EGL context.
[B]boolean[/B] isTegra = (new File("/system/lib/hw/[B]gralloc.tegra.so[/B]")).exists() ||
(new File("/system/lib/hw/[B]gralloc.tegra3.so[/B]")).exists();
if (isTegra) {
// [COLOR="Red"][B]disable Flash[/B][/COLOR] on Tegra ICS with CM9 and other custom firmware (bug 736421)
File vfile = new File("/proc/version");
FileReader vreader = null; ...etc
Not feeling like recompiling firefox fore just those few lines I decided to use apktool to try and remove this function. The smali apktool produces, barely resembles the java code. I think I've managed to bypass the tegra check with this "v2" hack method:
/smali/org/mozilla/gecko/GeckoAppShell.smali
Code:
[[email protected] fennec]$ diff GeckoAppShell.smali.orig GeckoAppShell.smali
4166,4188c4166
< new-instance v1, Ljava/io/File;
<
< const-string v4, "/system/lib/hw/gralloc.tegra.so"
<
< invoke-direct {v1, v4}, Ljava/io/File;-><init>(Ljava/lang/String;)V
<
< invoke-virtual {v1}, Ljava/io/File;->exists()Z
<
< move-result v1
<
< [B]if-nez v1, :cond_0[/B]
<
< new-instance v1, Ljava/io/File;
<
< const-string v4, "/system/lib/hw/gralloc.tegra3.so"
<
< invoke-direct {v1, v4}, Ljava/io/File;-><init>(Ljava/lang/String;)V
<
< invoke-virtual {v1}, Ljava/io/File;->exists()Z
<
< move-result v1
<
< [B]if-eqz v1, :cond_2[/B]
---
> goto :[B]cond_2[/B]
Here's how I think the new hack works as it does according to the screenshot. I think the first 6 lines check for the tegra2 display driver file. The 6th line says that "if the check returned a non zero value skip to condition 0". I can only assume that a non zero check would indicate the file was found. It's skipping straight to "condition 0" because the original java code had the check for the tegra2 and tegra3 driver in a logical OR. In this case, if the first half of the OR is true, there's no use to check the second half since a minimum of 1 of the halves must be true.
The second half is when the tegra2 driver hasn't been found it will try for the tegra3. **Note these lines are NOT executed if the tegra2 driver was found because of the jump to condition_0 which bypasses these lines.** However, at the end is an interesting "if the result of the search is zero, skip to condition 2". I'm assuming that if both checks failed then condition 2 must be what comes after the "if (isTegra)" in the java code. condition_2 likely skips past the body of that if staement. In that case, I'll have firefox skip right to the chase and directly go to condition 2 without checking. I consider this a more clean hack that removes the check altogether. While not poetic it's efficient.
As to why we shouldn't just stick to firefox 28.0.1... security issues! Each new version of firefox patches up security holes in the previous versions. As much as we like to poke fun at Internet Explorer for swiss cheese security (among other things...), we wouldn't be any better using an old firefox.
Download v30 here
Download v31 here
Download v32 here
Download v32.0.1 here
Download v32.0.3 here
**New**: just pick up your updates from the android file host link.
Screenshot to prove that it works below :cyclops: :
I uploaded the new firefox v31. You must uninstall firefox v30 first since I used a different signing key. I'll stick with the new one for now since I lost the one I used for firefox 30.
Here's the old hack method:
Code:
.line 1860
new-instance v1, Ljava/io/File;
const-string v4, "/system/lib/hw/[B]dont.be.mean.to.tegra2[/B]"
invoke-direct {v1, v4}, Ljava/io/File;-><init>(Ljava/lang/String;)V
invoke-virtual {v1}, Ljava/io/File;->exists()Z
move-User Nameresult v1
if-nez v1, :cond_0
new-instance v1, Ljava/io/File;
const-string v4, "/system/lib/hw/[B]dont.be.mean.to.tegra3[/B]"
invoke-direct {v1, v4}, Ljava/io/File;-><init>(Ljava/lang/String;)V
invoke-virtual {v1}, Ljava/io/File;->exists()Z
move-result v1
It simply changes which files are used to confirm a tegra2 or tegra3 board. The file name changes were intended to be poetic.
Hello,
Are you planning on updating your mod for Firefox 32?
spamam1 said:
Hello,
Are you planning on updating your mod for Firefox 32?
Click to expand...
Click to collapse
Yeah. Sometime next week.
Sent from my GT-I9300
All right everyone. V32 is up. Sorry for the wait. As usual, it uses the same hack mentioned in the first post.
To those who keep up to date on the thread by new post notifications: firefox v32.0.1 is out. This uses a newer cleaner hack. The new hack is described in the first post. It took me a good 45 mins to come up with that simple solution.
The old hack is still explained in the second post for those who are curious of the difference.
Firefox v32.0.3 is up. Uses the v2 hack.
Is flash automatically enabled after I install this on my tab that already has flash installed or do I need to enable it manually?
Sent from my new ZenFone 5
SystemDoctor said:
Is flash automatically enabled after I install this on my tab that already has flash installed or do I need to enable it manually?
Sent from my new ZenFone 5
Click to expand...
Click to collapse
It will be automatically enabled if it's already installed.
Sent from my GT-I9300
It's back guys. Firefox with flash unblocked for v33. I had a few issues with apktool but I'm using a workaround for that. You MUST uninstall the old firefox first for reasons I don't know.
There's a surprise youtube mod yt-sig.apk. It WILL crash play service whenever you watch a video or exit one. That shouldn't be too bad. You can always hit ok. I wouldn't bother trying it if you're on a kitkat rom but if you're on a lollipop rom it may complement the latest dev advances nicely. Let's say if you like it, keep it to yourself. It goes without saying you've gotta uninstall the stock youtube app and may never update it. I probably won't update it because there's little functional changes with each youtube app update.
Firefox unblocked v34 is up. Unfortunately you have to uninstall v33 first before installing v34. Apktool can no longer rebuild the whole apk. It can still recompile the smali so I just swap out the mozilla supplied classes.dex in the apk for my modified one.
You can still use flash in lollipop.
Firefox v35 unblocked is up.
Thanks for both apps can't get yt to install even after removed stock one and flash does not always seem to work
gazleyp said:
Thanks for both apps can't get yt to install even after removed stock one and flash does not always seem to work
Click to expand...
Click to collapse
After removing the stock one, try doing adb install and copy the error message to here. For flash make sure you're using this firefox and not the official one. With the newer omni roms I make (latest and 2nd latest) flash should be way more responsive. I uploaded a screen shot to show it in action on a relatively recent omni build of lollipop.
----------------------------------------------------------Added-----------------------------------------------------------
Anyways the new v35.0.1 is up.
Have this working sweet with your ROM now

What's the deal with extended DEX bytecode verification on Oreo?

Hey guys and gals,
I've been doing some unwholesome DEX bytecode patching on an app. Frequently I'll want to patch a function(which returns Boolean) to do an early return, with a hardcoded value that I want. Normally, this could be accomplished by assembling:
12 00 const/4 v0, 0
0f 00 return v0
This used to work all well and good up until Oreo. Now, the same approach will sometimes trip a verification error on Oreo:
Code:
AndroidRuntime: java.lang.VerifyError: Verifier rejected class blah: boolean blah.foo(java.lang.Object) failed to verify: boolean blah.foo(java.lang.Object): [0x3] register v0 has type Undefined but expected Boolean return-1nr on invalid register v0 (declaration of 'blah.foo' appears in blahblahblah.dex)
In the original code I'm patching, v0 *is* the register that would normally be used to return a Boolean type. I was under the impression that Booleans were internally implemented using ints at the VM level, and that you could just move a 0 or a 1 into a register and return it as Boolean. Yet with Oreo, the bytecode verifier is somehow now able to infer data types from the bytecode?? I realize how weird this sounds, but the above error seems to imply exactly this (unless I'm missing something here)??
So, questions for people:
* Does anyone know the means by which the bytecode verifier in the VM infers the data types of virtual registers (or at least, of primitive values being returned)?
* Does anyone know how to 'trick' the verifier into thinking a particular virtual register is holding a Boolean type, even though the given virtual register was last written using a 'const' (0x12) instruction? (Yeah, I know how ridiculous this sounds. I can't even type this question with a straight face...)
Thanks!
Argh. Looking at https://android.googlesource.com/platform/dalvik.git/+/android-4.1.1_r3/vm/analysis/CodeVerify.cpp, it looks like register types are set based on type-specific get/put instructions. But in addition to iget-boolean / iput-boolean, it is possible to move a constant into a register and treat THAT as a Boolean directly. But why would the VM freak out if one of these were to be returned?

Categories

Resources