[MOD][XPOSED] Phab7 v1.00 no-reboot UI Switcher

Search This thread

dolorespark

Senior Member
Jan 28, 2013
492
2,026
Phab7 is an on-the-fly UI switcher: select Phone, Phablet, or Tablet, then tap the Change button. The switch happens immediately - no reboot needed. A separate option lets you switch settings screen layouts (e.g. the Settings app) between Phone-style (separate screens for categories and details), and Tablet-style (categories and details, side-by-side).

Unlike other solutions, Phab7 has no effect on your apps beyond for their Settings screens. In particular, it will not alter the size or layout of your launcher's icons or dock (nor will it cause the tablet-style app-drawer icon to appear).

Note: Google removed Tablet mode from KitKat, so it is not available if you're running Android 4.4.x.

Installation

Important: if you have a beta version of Phab7 (v0.9x) currently installed, you must uninstall it before installing v1.0. Android will refuse to install it if one of the betas is present.
  • if you don't already have XposedInstaller on your system, see this thread
  • install Phab7.apk the same way you'd install any other sideloaded app
  • enable Phab7 by reopening the XposedInstaller app and selecting 'Modules'
  • tap directly on the checkbox next to Phab7, then back out and reboot
  • after the initial reboot, you can open the Phab7 app and change UIs as many times as you wish without further reboots
Notes
  • Tablet UI mode is only available when running ICS or JB (v4.03 thru 4.3x). While Phab7 supports KitKat, it does not add back the Tablet mode that Google has removed.
  • Whether Phab7 works on your device depends almost entirely on your ROM's creators. If they removed the graphics and layouts needed for a given UI mode, SystemUI.apk is guaranteed to force-close when you select that mode. A "Keep-Or-Cancel" dialog will automatically restore your settings after 12 seconds if this happens when you choose an incompatible UI mode. Clear the "Unfortunately" popup and you're good to go.
  • the Settings-layout feature takes effect when an app is first launched. To see its effect on running apps (e.g. the system's Settings app). tap the "Recents" button and swipe the app away , then reopen the app.
File

Phab7.apk - v1.00

Credits
  • barrmulio - the first to identify the system changes needed to implement alternate UIs
  • _TB_TB_ - author of TabletUI trigger who first realized that UI-switching could be done by an Xposed module
History
2014/01/22 - v1.00 - initial stable release
2014/01/05 - v0.99 - added keep-or-cancel dialog
2013/12/13 - v0.97 - added scaling for all modes
2013/12/10 - v0.96 - fixed KitKat-specific bug
2013/12/09 - v0.95 - added Tablet UI scaling
2013/11/30 - v0.92 - added support for KitKat
2013/11/27 - v0.90 - initial release
 
Last edited:

coolnessQ

Senior Member
Aug 8, 2012
955
295
25
Rotterdam
Gonna try it on S4 v4.3 :)

Sent from my GT-I9505 using XDA Premium 4 mobile app

---------- Post added at 08:08 AM ---------- Previous post was at 08:02 AM ----------

Ring of FC ;p

Sent from my GT-I9505 using XDA Premium 4 mobile app
 

Metallijim

Senior Member
Dec 1, 2011
1,479
1,083
Bedford
Tried it, changes fine to tablet mode. Just a few layout issues. And the nav glow doesn't fade.
See screenshot.
Xperia Z running eXistenZ 4.10 rom.
Subscribed, this looks promising.

e4ehy2y3.jpg


ryba7e4a.jpg


Sent from Z Beast
 

reversegear

Senior Member
Jul 17, 2011
2,279
1,610
Xiaomi Mi Max 2
Great job. tested working on CM10. status bar looks monster
it could have better you provided DPI settings along with phab7. though i can manage with app settings
the give attachment is flashable zip i just extracted phab7.apk and installed normally
why this is not available in xposed Repo..
 

Dovidhalevi

Senior Member
Jun 26, 2012
2,729
1,171
Now we need not wait for updated Paranoid!! OK Paranoid does do some of this stuff better/more consistantly than AppSetting and this module, but ...
Great!

Wanna outdo Paranoid: Tablet mode mostly more usable in landscape, so ... get the idea?

EDIT: Results using the mod on my LG P500 running cm-10.2 with 4,4 Google Now launcher: I can use AppSetting module to force this launcher to rotate but it does not handle this correctly.

Settings UIs work as promised! This is what I really missed not having Paranoid.

Navigation bar: Question -- what if I do not use one (phone has HW buttons--remember those)? Module should accept phone setting.

Anyway, tablet mode: Repeated FCs of systemUI until I changed to other mode:
Phablet mode: Navigation bar shows as promised. Notifications not effected.
Phone mode: No way to correctly test with this launcher.
Went back to default: Icon bar, no navigation bar.

If I remember from Paranoid, tablet mode put notifications bar on the bottom right. Phablet left it on top, opening to half-height, had to change dpi to fit it to screen width correctly. So tablet mode, once working, would either have both at bottom right justified or just the notifications as chosen in the phone's settings! Someone check current Paranoid.
 
Last edited:

dolorespark

Senior Member
Jan 28, 2013
492
2,026
Don't flash that zip!

the give attachment is flashable zip i just extracted phab7.apk and installed normally

OMG!!!! My apologies! The zip that was posted (in error) was only for the Hisense Sero 7 Pro and contained a tablet-specific mod to SystemUI.apk.

The script in that zip checks for the model, so it should have failed if you tried to flash it on any other device. However, if somehow you succeeded in flashing it, you will have to restore your ROM's original SystemUI.apk. The original, along with SystemUI.odex if present, is in your /system/app folder with '-org' appended to it. If you have problems handling this, I can create an update.zip to do this for you.

Again, my apologies - it was late...
 
Last edited:

dolorespark

Senior Member
Jan 28, 2013
492
2,026
For me with android 4.1 only settings work and status bar and nav bar don t work

tablet mode: Repeated FCs of systemUI until I changed to other mode:
Phablet mode: Navigation bar shows as promised. Notifications not effected.
Phone mode: No way to correctly test with this launcher.

Generally speaking: if "nothing happens", the issue probably lies within Phab7; if SystemUI FCs, then it's probably your ROM.

For Phab7 problems, XposedInstaller's debug.log should identify the problem - you can find it in /data/data/de.robv.android.xposed.installer/log/debug.log. Pull the file and attach it to a posting. For ROM problems, I'd need a logcat log that covers the time period when the FC occurred. If you need help generating one, let me know. (logcat logs for Phab7 issues are certainly welcome too, however, they have to include system startup to be useful.)

For SystemUI FCs, a possible cause is vendor customization of a particular NavBar layout that wasn't carried over to the other versions. The tablet I use is a perfect example. It defaults to Phablet and has a screenshot button (which most everyone hates). The button wasn't implemented for Phone since they assumed it would never be used, so SystemUI FCs in Phone UI when their code goes looking for a button that doesn't exist. To get it to work, I had to patch their systemui.apk to get rid of both the button and the code that references it. This is not something I'd want to try on a device I don't own.

Bottom line: I'd be happy to implement reasonable workarounds to enhance compatibility with the widest range of devices, but even then, not all modes will work with all devices.
 

Dovidhalevi

Senior Member
Jun 26, 2012
2,729
1,171
Generally speaking: if "nothing happens", the issue probably lies within Phab7; if SystemUI FCs, then it's probably your ROM.

For Phab7 problems, XposedInstaller's debug.log should identify the problem - you can find it in /data/data/de.robv.android.xposed.installer/log/debug.log. Pull the file and attach it to a posting. For ROM problems, I'd need a logcat log that covers the time period when the FC occurred. If you need help generating one, let me know. (logcat logs for Phab7 issues are certainly welcome too, however, they have to include system startup to be useful.)

For SystemUI FCs, a possible cause is vendor customization of a particular NavBar layout that wasn't carried over to the other versions. The tablet I use is a perfect example. It defaults to Phablet and has a screenshot button (which most everyone hates). The button wasn't implemented for Phone since they assumed it would never be used, so SystemUI FCs in Phone UI when their code goes looking for a button that doesn't exist. To get it to work, I had to patch their systemui.apk to get rid of both the button and the code that references it. This is not something I'd want to try on a device I don't own.

Bottom line: I'd be happy to implement reasonable workarounds to enhance compatibility with the widest range of devices, but even then, not all modes will work with all devices.

and this is an older device.
I am attaching the debug.log, but changing the name to debug.txt to get in on here.
 

Attachments

  • debug.txt
    35.1 KB · Views: 23

Saeedblack

Senior Member
Nov 5, 2011
115
36
Kermanshah
Generally speaking: if "nothing happens", the issue probably lies within Phab7; if SystemUI FCs, then it's probably your ROM.

For Phab7 problems, XposedInstaller's debug.log should identify the problem - you can find it in /data/data/de.robv.android.xposed.installer/log/debug.log. Pull the file and attach it to a posting. For ROM problems, I'd need a logcat log that covers the time period when the FC occurred. If you need help generating one, let me know. (logcat logs for Phab7 issues are certainly welcome too, however, they have to include system startup to be useful.)

For SystemUI FCs, a possible cause is vendor customization of a particular NavBar layout that wasn't carried over to the other versions. The tablet I use is a perfect example. It defaults to Phablet and has a screenshot button (which most everyone hates). The button wasn't implemented for Phone since they assumed it would never be used, so SystemUI FCs in Phone UI when their code goes looking for a button that doesn't exist. To get it to work, I had to patch their systemui.apk to get rid of both the button and the code that references it. This is not something I'd want to try on a device I don't own.

Bottom line: I'd be happy to implement reasonable workarounds to enhance compatibility with the widest range of devices, but even then, not all modes will work with all devices.

for me it have been FC for first run and after reboot it never appear again but don t have FC
also here you are i attached log that you notice
 

Attachments

  • debug.zip
    17.9 KB · Views: 22

dolorespark

Senior Member
Jan 28, 2013
492
2,026
No TabletUI in KitKat

On my N7, checking 'tablet' in system settings changes the module's menu just fine but has no effect on Rom settings. Setting default ui to phablet didn't help either.

N7(flo)-Rastakat-franco.kernel

Is this a KitKat-based ROM? Sadly, all of the code and resources needed to support Tablet UI have been stripped from Android v4.4. Because Phab7 v0.9 doesn't make provisions for this change, the UI switcher doesn't work. I will fix that ASAP so that at least Phone and Phablet are available. Restoring Tablet UI may be more than an Xposed module can/should do, but I'll investigate...

However, the Settings screen mod should still work. As mentioned in the OP, if the system's Settings app is already running, you'll have to remove it from "Recents" and reopen it. If you reboot with "Tablet-style" settings in place and it still doesn't work, let me know.

and this is an older device.
I am attaching the debug.log, but changing the name to debug.txt to get in on here.

You didn't describe where you're having problems. During one session, one of your other Xposed modules (com.wisdomsky.xploit) failed every time, even when Phab7 hadn't made any changes. After a reboot, the problems were gone but so were Phab7's standard messages. What changed?
 

Dovidhalevi

Senior Member
Jun 26, 2012
2,729
1,171
You didn't describe where you're having problems. During one session, one of your other Xposed modules (com.wisdomsky.xploit) failed every time, even when Phab7 hadn't made any changes. After a reboot, the problems were gone but so were Phab7's standard messages. What changed?

I first tried it before rebooting, then realized that it cannot work that way and rebooted. Then Phab7 worked as described.
Since wisdonsky operates on the notifications bar, could be that the interaction with tablet mode trying to move that is what is noted.
 

MMeester

Senior Member
Jan 3, 2013
77
21
Is this a KitKat-based ROM?
Yes.
However, the Settings screen mod should still work. As mentioned in the OP, if the system's Settings app is already running, you'll have to remove it from "Recents" and reopen it. If you reboot with "Tablet-style" settings in place and it still doesn't work, let me know.
Sadly, no change in settings app after a reboot. Do you need any logs?
Thank you for looking into the issue.

N7(flo)-Rastakat-franco.kernel
N4(mako)-PKK-franco.kernel
 

Metallijim

Senior Member
Dec 1, 2011
1,479
1,083
Bedford
Can I ask what in the system side of things this is targeting? Only asking because I had a problem with Tablet mode where I changed compatibility mode, and that then caused constant FC of SystemUI.

Also where are the settings stored? I managed to get out of the fc loop, but am now left with a layout problem of my System UI. Nothing major, but even if I change SystemUI, it persists.

Any help appreciated.
 

dolorespark

Senior Member
Jan 28, 2013
492
2,026
Can I ask what in the system side of things this is targeting? Only asking because I had a problem with Tablet mode where I changed compatibility mode, and that then caused constant FC of SystemUI.

Also where are the settings stored? I managed to get out of the fc loop, but am now left with a layout problem of my System UI. Nothing major, but even if I change SystemUI, it persists.

Phab7 is designed to do as little as possible to achieve its goals - in some cases, perhaps too little. For Phone and Phablet, it does some setup when SysUI starts and that's it. For Tablet, it has to be slightly more intrusive but not much.

Sadly, I had no way to test compatibility mode so I'm not surprised that it has issues. Recovery from most any problem should be as simple as switching to another UI. In this case, getting out of TabletUI, then returning without touching the compatibility button should cure what ails you.

If you get repeated FCs in SystemUI, one way out is to leave the toast up there, then from ADB, delete /data/data/com.e_vertise.dopa.phab7/shared_prefs/settings.xml. When you dismiss the toast and SysUI restarts, you should be back to your device's default settings.

Note: if I understand things correctly, Android may try to reload SysUI's Java code several times using the same process before it gives up and kills that process. Once it restarts SystemUI using a new process, you're certain to be back to normal if you've deleted Phab7's settings file.
 
  • Like
Reactions: Metallijim

MikeRL100

Senior Member
Jun 20, 2012
696
451
27
We'll soon find out if it works on KitKat. Yes I know how to disable Xposed from recovery. Using it on KitKat doesn't seem to cause any crashes, but it doesn't do anything at all on KitKat.

Sent from my Nexus 7 using Tapatalk 4
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 69
    Phab7 is an on-the-fly UI switcher: select Phone, Phablet, or Tablet, then tap the Change button. The switch happens immediately - no reboot needed. A separate option lets you switch settings screen layouts (e.g. the Settings app) between Phone-style (separate screens for categories and details), and Tablet-style (categories and details, side-by-side).

    Unlike other solutions, Phab7 has no effect on your apps beyond for their Settings screens. In particular, it will not alter the size or layout of your launcher's icons or dock (nor will it cause the tablet-style app-drawer icon to appear).

    Note: Google removed Tablet mode from KitKat, so it is not available if you're running Android 4.4.x.

    Installation

    Important: if you have a beta version of Phab7 (v0.9x) currently installed, you must uninstall it before installing v1.0. Android will refuse to install it if one of the betas is present.
    • if you don't already have XposedInstaller on your system, see this thread
    • install Phab7.apk the same way you'd install any other sideloaded app
    • enable Phab7 by reopening the XposedInstaller app and selecting 'Modules'
    • tap directly on the checkbox next to Phab7, then back out and reboot
    • after the initial reboot, you can open the Phab7 app and change UIs as many times as you wish without further reboots
    Notes
    • Tablet UI mode is only available when running ICS or JB (v4.03 thru 4.3x). While Phab7 supports KitKat, it does not add back the Tablet mode that Google has removed.
    • Whether Phab7 works on your device depends almost entirely on your ROM's creators. If they removed the graphics and layouts needed for a given UI mode, SystemUI.apk is guaranteed to force-close when you select that mode. A "Keep-Or-Cancel" dialog will automatically restore your settings after 12 seconds if this happens when you choose an incompatible UI mode. Clear the "Unfortunately" popup and you're good to go.
    • the Settings-layout feature takes effect when an app is first launched. To see its effect on running apps (e.g. the system's Settings app). tap the "Recents" button and swipe the app away , then reopen the app.
    File

    Phab7.apk - v1.00

    Credits
    • barrmulio - the first to identify the system changes needed to implement alternate UIs
    • _TB_TB_ - author of TabletUI trigger who first realized that UI-switching could be done by an Xposed module
    History
    2014/01/22 - v1.00 - initial stable release
    2014/01/05 - v0.99 - added keep-or-cancel dialog
    2013/12/13 - v0.97 - added scaling for all modes
    2013/12/10 - v0.96 - fixed KitKat-specific bug
    2013/12/09 - v0.95 - added Tablet UI scaling
    2013/11/30 - v0.92 - added support for KitKat
    2013/11/27 - v0.90 - initial release
    5
    Phab7 v1.00 now available

    I've just released the first "stable" version of Phab7. See the OP for details and a link to the file.

    Important: If you have one of the betas (v0.9x) installed, you MUST uninstall it before attempting to upgrade to v1.0. My apologies for this inconvenience...
    5
    does phab7 use the previously existing tablet nav bar code in the rom or does it bring the code itself?

    I'm curious as to the fact that gravitybox (for example) cannot modify the equivilent things in tablet mode, as it supports ICS/JB where the tablet nav bar is normally available. I'm wondering if it was never supported in gravity box or if it's due to how phab7 and gb interact.

    One example that GB cannot modify would be the statusbar battery icon, both the actual icon and the one in the popup clock box.

    Phab7 does not replace existing code or provide new functionality (yet) - it simply nudges the existing code to go in the direction you want it to.

    It appears that the author of GB has not given Tablet UI mode much consideration. I say this because GB generates a null-pointer exception about once a second when in tablet mode, and I assume he would have dealt with the error if he were aware of it. I have no reason to believe that the result would be any different if I were using a tablet-mode patch to SystemUI.apk rather than Phab7.

    Now that I have the next version of Phab7 ready for release (later today), I'll have some time to test that hypothesis - as well as time to send him excerpts from my logcat.log showing those exceptions..
    4
    new version supports KitKat

    I've posted a new version of Phab7 (v0.92) which now supports KitKat. See the OP for details.
    4
    New Version - v0.97

    I've posted a new release of Phab7 which features:
    • scaling in all 3 modes (Phone, Phablet, and Tablet)
    • an option to hide the Navigation bar in Phone and Phablet modes, per request
    • fewer but more informative messages in the XposedInstaller log
    See the original posting for details and a download link.
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone