Join Us and become a Member for a Verified Badge to access private areas with the latest PS4 PKGs.
PS4 Jailbreaking       Thread starter PSXHAX       Start date Oct 13, 2016 at 9:49 PM       5      
Status
Not open for further replies.
Previously ZiL0G80 hinted briefly on the PS4 IDU Mode / E3Mode, and today he shared a bit more of his findings with other PlayStation 4 developers on the PS4 E3Mode via Pastebin.com. (y)

Here are a few related Tweets, and below is the code as he warns the Pastebin will expire in 24 hours:

Code:
using System;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using Sce.PlayStation.HighLevel.UI2;
using Sce.Vsh.Accessor;
using Sce.Vsh.Accessor.Db;
using Sce.Vsh.Lx;
using Sce.Vsh.ShellUI.AppSystem;
using Sce.Vsh.ShellUI.Lnc;

namespace Sce.Vsh.ShellUI.AppMain
{
    // Token: 0x0200000D RID: 13
    [Aot]
    public class E3Mode
    {
        // Token: 0x060000B2 RID: 178 RVA: 0x00004C6A File Offset: 0x00002E6A
        public static void Start()
        {
            if (ShowMode.Enable)
            {
                E3Mode.s_enableAutoBoot = true;
                E3Mode.CreateDimmerScreen();
                E3Mode.StartMonitorPsImpose();
            }
        }

        // Token: 0x060000B3 RID: 179 RVA: 0x00004C83 File Offset: 0x00002E83
        public static void StartFarsightUI()
        {
            if (ShowMode.Enable && E3Mode.s_enableAutoBoot)
            {
                E3Mode.StartAutoBoot();
            }
        }

        // Token: 0x060000B4 RID: 180 RVA: 0x00004C98 File Offset: 0x00002E98
        public static bool IsEnableAutoBoot()
        {
            return ShowMode.Enable && E3Mode.s_enableAutoBoot;
        }

        // Token: 0x060000B5 RID: 181 RVA: 0x00004CA8 File Offset: 0x00002EA8
        private static void Stop()
        {
            E3Mode.s_enableAutoBoot = false;
            E3Mode.DestroyDimmerScreen();
            E3Mode.StopMonitorPsImpose();
        }

        // Token: 0x060000B6 RID: 182 RVA: 0x00004CBC File Offset: 0x00002EBC
        private static void CreateDimmerScreen()
        {
            if (E3Mode.s_dimmerScreen == null)
            {
                E3Mode.s_dimmerScreen = new Scene
                {
                    Focusable = false
                };
                E3Mode.s_dimmerScreen.RootWidget.AppendChild(new Panel
                {
                    BackgroundColor = new UIColor(0f, 0f, 0f, 1f),
                    Width = 1920f,
                    Height = 1080f
                });
                LayerManager.FindContainerSceneByPath("SystemOverlay").AddScene(E3Mode.s_dimmerScreen);
            }
        }

        // Token: 0x060000B7 RID: 183 RVA: 0x00004D64 File Offset: 0x00002F64
        private static void DestroyDimmerScreen()
        {
            if (E3Mode.s_dimmerScreen != null)
            {
                Scene scene = E3Mode.s_dimmerScreen;
                E3Mode.s_dimmerScreen = null;
                UITimer.Start(1f, delegate
                {
                    if (BootManager.IsHealthWarningExecuting())
                    {
                        return false;
                    }
                    scene.RemoveFromSuperScene();
                    return true;
                });
            }
        }

        // Token: 0x060000B8 RID: 184 RVA: 0x00004DA6 File Offset: 0x00002FA6
        private static void StartMonitorPsImpose()
        {
            LayerManager.UpdateFocusSceneAction += new Action<Scene>(E3Mode.OnUpdateFocusScene);
        }

        // Token: 0x060000B9 RID: 185 RVA: 0x00004DB9 File Offset: 0x00002FB9
        private static void StopMonitorPsImpose()
        {
            LayerManager.UpdateFocusSceneAction -= new Action<Scene>(E3Mode.OnUpdateFocusScene);
        }

        // Token: 0x060000BA RID: 186 RVA: 0x00004DCC File Offset: 0x00002FCC
        private static void OnUpdateFocusScene(Scene scene)
        {
            if (LayerManager.FindRootContainerScene(scene) == LayerManager.FindScene("PSMenu"))
            {
                E3Mode.Stop();
            }
        }

        // Token: 0x060000BB RID: 187 RVA: 0x00004DEC File Offset: 0x00002FEC
        private static void StartAutoBoot()
        {
            if (UT.UserService.ForegroundUserId == -1)
            {
                E3Mode.Stop();
                return;
            }
            string text = null;
            using (AppBrowseItemAccessor appBrowseItemAccessor = new AppBrowseItemAccessor())
            {
                appBrowseItemAccessor.SetUserId(UT.UserService.ForegroundUserId);
                List<Item> items = appBrowseItemAccessor.GetItems(0, Math.Min(32, appBrowseItemAccessor.GetTotalCount()));
                foreach (Item current in items)
                {
                    AppBrowseItem appBrowseItem = current as AppBrowseItem;
                    if (appBrowseItem != null && appBrowseItem.CanRemove)
                    {
                        text = appBrowseItem.TitleId;
                    }
                }
            }
            if (text.Empty())
            {
                E3Mode.Stop();
                return;
            }
            Utility.AppLauncher appLauncher = Utility.LaunchApp(text, "", EventMonitor.AppAttr.None);
            appLauncher.LaunchFinishedAction += delegate(Utility.AppLauncher obj)
            {
                E3Mode.Stop();
            };
        }

        // Token: 0x060000BC RID: 188 RVA: 0x00004EE0 File Offset: 0x000030E0
        public E3Mode()
        {
        }

        // Token: 0x060000BD RID: 189 RVA: 0x00004DE5 File Offset: 0x00002FE5
        [CompilerGenerated]
        private static void <StartAutoBoot>b__5(Utility.AppLauncher obj)
        {
            E3Mode.Stop();
        }

        // Token: 0x040000AA RID: 170
        private static bool s_enableAutoBoot;

        // Token: 0x040000AB RID: 171
        private static Scene s_dimmerScreen;

        // Token: 0x040000AC RID: 172
        [CompilerGenerated]
        private static Action<Utility.AppLauncher> CS$<>9__CachedAnonymousMethodDelegate6;

        // Token: 0x0200103D RID: 4157
        [CompilerGenerated]
        private sealed class <>c__DisplayClass3
        {
            // Token: 0x06007D59 RID: 32089 RVA: 0x00004D42 File Offset: 0x00002F42
            public <>c__DisplayClass3()
            {
            }

            // Token: 0x06007D5A RID: 32090 RVA: 0x00004D4A File Offset: 0x00002F4A
            public bool <DestroyDimmerScreen>b__2()
            {
                if (BootManager.IsHealthWarningExecuting())
                {
                    return false;
                }
                this.scene.RemoveFromSuperScene();
                return true;
            }

            // Token: 0x04005272 RID: 21106
            public Scene scene;
        }
    }
}
Also below is a few pictures of the elusive PS4 IDU Mode App and the PS4 IDU Mode Menu from @PixelButts via Twitter:

PS4 IDU Mode App.jpg PS4 IDU Mode.jpg
Thanks to Anonymous for the heads up! :ninja:
PS4 Development E3Mode Update by ZiL0G80.jpg
 

Comments

Good question, I don't even see anything on the Wiki about PS4 E3Mode yet... so this is probably the early stages of discovery and documentation of it by developers is my guess.

Hopefully someone will dumb it down for the rest of the world at some point, for now we can just awe about it like so:

omg-cat.jpg

 
If that's the case and PS4 devs get somewhere with demos vs retail consoles you can bet those will be the most sought after, or a way to convert PS4 retail to demo perhaps ;-)
 
Status
Not open for further replies.
Back
Top