• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
UBports Robot Logo UBports Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login

Navigating (enabling developer mode) with broken screen (oneplus 3t)

Scheduled Pinned Locked Moved Unsolved Support
29 Posts 5 Posters 6.3k Views 3 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J Offline
      joe @Toadtoad
      last edited by 30 Jun 2020, 01:51

      @Toadtoad
      Wow. I think this is it. Even with the screen not awake this works.

      1. Hold the superkey (windows key) for about a second.
        While holding press 4. which is the default location of settings.
      2. This gets you to the login, where you type your password and press enter.
      3. Now phone is in settings. Press TAB 24 times. Then Press space.
      4. Now you are in About. Press TAB 7 times. Then press space.
      5. Now you are in Developer Mode. Press TAB 3 times. Then press space. This enables/disables developer mode.
      T 1 Reply Last reply 30 Jun 2020, 20:16 Reply Quote 3
      • T Offline
        Toadtoad @joe
        last edited by 30 Jun 2020, 20:16

        @joe Thank you so much. The only thing is that I don't have a password, which is supposedly required for enabling the mode. Also, how would I accept my computer's keys for adb? Sorry for all of the complications.

        J L 2 Replies Last reply 30 Jun 2020, 21:29 Reply Quote 0
        • D Offline
          doniks
          last edited by doniks 30 Jun 2020, 20:30

          for the password, I think you should be able to boot twrp, connect with adb, mount the system, chroot into it and then passwd phablet.

          for ssh, maybe some of this stuff helps: https://gitlab.com/ubports/community-ports/pinephone/-/issues/104#note_360710771

          1 Reply Last reply Reply Quote 1
          • J Offline
            joe @Toadtoad
            last edited by 30 Jun 2020, 21:29

            @Toadtoad

            To accept adb, I don't recall that dialog, but generally pressing "space" does things. Good luck! Let us know how it goes.

            1 Reply Last reply Reply Quote 0
            • C Offline
              Capsia
              last edited by 30 Jun 2020, 22:27

              Hi, The default password should be 0000 if unset.

              1 Reply Last reply Reply Quote 0
              • L Offline
                Lakotaubp @Toadtoad
                last edited by 1 Jul 2020, 05:46

                @Toadtoad ADB not working yet on OP3(T)

                J 1 Reply Last reply 1 Jul 2020, 15:42 Reply Quote 0
                • T Offline
                  Toadtoad
                  last edited by 1 Jul 2020, 06:40

                  I've tried all of the suggestions so far. I don't know if a password is on my default, and 0000 didn't work (also is there an initial setup I have to complete before being able to perform this action). I chrooted in TWRP, but passwd was not in the /system/bin directory. So, I'm making progress, but am not there yet.

                  D 1 Reply Last reply 1 Jul 2020, 11:15 Reply Quote 0
                  • D Offline
                    doniks @Toadtoad
                    last edited by 1 Jul 2020, 11:15

                    @Toadtoad said in Navigating (enabling developer mode) with broken screen (oneplus 3t):

                    I chrooted in TWRP, but passwd was not in the /system/bin directory.

                    Can you paste exact steps you took and output? passwd should be there. If you are looking at a folder called '/system/bin' then you are looking at the wrong place. I don't think such a folder exists INSIDE the UBports system image/partition (not sure which one the OP3t has.., so again, please post steps verbatim!). It should be in a "normal" Linux location, something like /bin /sbin /usr/bin /usr/sbin don't have a device in front of me.

                    And while I'm sure you should be able to get passwd working, I'm not sure UBports is the best system for a "headless" (broken screen) system. It is designed for touch input. With Halium it should be possible to put other systems on it as well ... I'm a bit out of the loop, but at some point there was a debian version and for sure there is plasma mobile, which may or may not work easier in headless style.

                    T 1 Reply Last reply 2 Jul 2020, 22:13 Reply Quote 0
                    • J Offline
                      joe @Lakotaubp
                      last edited by 1 Jul 2020, 15:42

                      @Lakotaubp said in Navigating (enabling developer mode) with broken screen (oneplus 3t):

                      @Toadtoad ADB not working yet on OP3(T)

                      Oof. Good point!
                      SSH is the way.

                      1 Reply Last reply Reply Quote 0
                      • T Offline
                        Toadtoad @doniks
                        last edited by 2 Jul 2020, 22:13

                        @doniks I booted into TWRP. Opened up the adb shell and did the following:

                        twrp mount system
                        chroot system
                        PATH=$PATH:PATH
                        passwd phablet
                        

                        And I got /bin/sh: 3: passwd: not found

                        Since it doesn't seem like I'll set up adb or ssh, any suggestions to run headlessly on my phone? Thanks.

                        D 1 Reply Last reply 2 Jul 2020, 23:03 Reply Quote 0
                        • D Offline
                          doniks @Toadtoad
                          last edited by 2 Jul 2020, 23:03

                          @Toadtoad said in Navigating (enabling developer mode) with broken screen (oneplus 3t):

                          @doniks I booted into TWRP. Opened up the adb shell and did the following:

                          yeah that doesn't sound right. up front please add pwd and ls -l before you mount, otherwise it's kinda hard to know from the distance what actually gets mounted where

                          twrp mount system
                          chroot system

                          the more I think about it, I think ALL halium ports use an image file and not the system partition. it looks like you are mounting the partition.

                          please show ls -l / inside the chroot, then we can be sure

                          PATH=$PATH:PATH

                          not sure, what you are trying to achieve here ... I don't think it does what you think it does ... I think you are adding the literal string ":PATH" to the end of the $PATH environment variable which doesn't make much sense.

                          However, since you are not using export I also think it does not affect the lines following, so it is (luckily/unluckily) immaterial

                          passwd phablet

                          And I got /bin/sh: 3: passwd: not found

                          Since it doesn't seem like I'll set up adb or ssh, any suggestions to run headlessly on my phone? Thanks.

                          You're jumping to conclusions.

                          Please do (I'm just typing from memory, so be careful when copy/pasting and give us relevant output to help you)

                          ls -l / 
                          cat /etc/fstab
                          mount 
                          mount /data 
                          ls -l /data 
                          

                          then please see here how to chroot into a halium rootfs http://docs.halium.org/en/latest/porting/debug-build/logging-in.html?highlight=chroot#logging-in

                          and again, just to make sure we are on the same page, please ls -l / once inside the rootfs

                          T 1 Reply Last reply 3 Jul 2020, 00:53 Reply Quote 0
                          • T Offline
                            Toadtoad @doniks
                            last edited by Toadtoad 7 Mar 2020, 00:59 3 Jul 2020, 00:53

                            @doniks Okay, I'll try it out. The PATH thing was a typo on my part; I did PATH=$PATH:/bin, but it seems like I didn't have the right idea from the start, so I'll try your instructions. Thanks

                            Edit:
                            ls -l /

                            total 3372
                            dr-xr-xr-x   4 root root         0 1970-01-04 02:12 acct
                            lrwxrwxrwx   1 root root        11 1970-01-01 00:00 bin -> /system/bin
                            lrwxrwxrwx   1 root root        50 1970-01-01 00:00 bugreports -> /data/user_de/0/com.android.shell/files/bugreports
                            drwxr-xr-x   3 root root        60 2017-01-12 13:56 cache
                            lrwxrwxrwx   1 root root        13 1970-01-01 00:00 charger -> /sbin/charger
                            dr-xr-xr-x   2 root root        40 1970-01-01 00:00 config
                            lrwxrwxrwx   1 root root        17 1970-01-01 00:00 d -> /sys/kernel/debug
                            drwxr-xr-x   8 root root      4096 2017-01-09 11:51 data
                            lrwxrwxrwx   1 root root        12 1970-01-01 00:00 default.prop -> prop.default
                            drwxr-xr-x  10 root root      3760 1970-01-04 02:12 dev
                            drwxr-xr-x   2 root root       140 2017-01-12 13:56 etc
                            -rw-r--r--   1 root root     33643 1970-01-01 00:00 file_contexts
                            -rw-r--r--   1 root root    674825 1970-01-01 00:00 file_contexts.bin
                            -rwxr-x---   1 root root   2212400 1970-01-01 00:00 init
                            -rwxr-x---   1 root root      3114 1970-01-01 00:00 init.rc
                            -rwxr-x---   1 root root       103 1970-01-01 00:00 init.recovery.hlthchrg.rc
                            -rwxr-x---   1 root root        52 1970-01-01 00:00 init.recovery.ldconfig.rc
                            -rwxr-x---   1 root root        35 1970-01-01 00:00 init.recovery.mksh.rc
                            -rwxr-x---   1 root root      5727 1970-01-01 00:00 init.recovery.qcom.rc
                            -rwxr-x---   1 root root       111 1970-01-01 00:00 init.recovery.service.rc
                            -rwxr-x---   1 root root      1323 1970-01-01 00:00 init.recovery.usb.rc
                            drwxr-xr-x   3 root root        60 1970-01-01 00:00 license
                            drwxr-xr-x   3 root system      60 1970-01-04 02:12 mnt
                            drwxr-xr-x   2 root root       200 1970-01-01 00:00 odm
                            drwxr-xr-x   2 root root        40 1970-01-01 00:00 oem
                            drwxrwxrwx   2 root root        40 1970-01-04 02:12 persist
                            -rw-r--r--   1 root root     23786 1970-01-01 00:00 plat_file_contexts
                            -rw-r--r--   1 root root      7212 1970-01-01 00:00 plat_hwservice_contexts
                            -rw-r--r--   1 root root      6687 1970-01-01 00:00 plat_property_contexts
                            -rw-r--r--   1 root root      1315 1970-01-01 00:00 plat_seapp_contexts
                            -rw-r--r--   1 root root     14057 1970-01-01 00:00 plat_service_contexts
                            dr-xr-xr-x 384 root root         0 1970-01-01 00:00 proc
                            lrwxrwxrwx   1 root root        15 1970-01-01 00:00 product -> /system/product
                            -rw-r--r--   1 root root      3042 1970-01-01 00:00 prop.default
                            drwxr-xr-x   3 root root        80 1970-01-01 00:00 res
                            drwx------   2 root root        40 2019-04-15 10:55 root
                            drwxr-x---   2 root root      6700 2017-01-12 13:59 sbin
                            drwxrwx---   3 root root      4096 2017-01-09 11:51 sdcard
                            -rw-r--r--   1 root root    387957 1970-01-01 00:00 sepolicy
                            drwxr-xr-x   2 root root        40 1970-01-04 02:12 sideload
                            drwxr-x--x   2 root root        40 1970-01-01 00:00 storage
                            dr-xr-xr-x  12 root root         0 1970-01-04 02:12 sys
                            drwxr-xr-x  24 109  113       4096 2017-01-10 21:47 system
                            drwxrwxr-x   2 root shell       80 2017-01-12 14:01 tmp
                            drwxr-xr-x   5 root root       180 1970-01-01 00:00 twres
                            -rw-r--r--   1 root root      5272 1970-01-01 00:00 ueventd.rc
                            drwxrwxrwx   2 root root        40 2017-01-12 13:56 usb_otg
                            drwxr-xr-x   3 root root        60 1970-01-01 00:00 vendor
                            -rw-r--r--   1 root root      6178 1970-01-01 00:00 vendor_file_contexts
                            -rw-r--r--   1 root root         0 1970-01-01 00:00 vendor_hwservice_contexts
                            -rw-r--r--   1 root root       218 1970-01-01 00:00 vendor_property_contexts
                            -rw-r--r--   1 root root         0 1970-01-01 00:00 vendor_seapp_contexts
                            -rw-r--r--   1 root root         0 1970-01-01 00:00 vendor_service_contexts
                            -rw-r--r--   1 root root        65 1970-01-01 00:00 vndservice_contexts
                            

                            cat /etc/fstab

                            /dev/block/sda3 /cache ext4 rw 0 0
                            /dev/block/sda15 /data ext4 rw 0 0
                            /dev/block/sda2 /persist ext4 rw 0 0
                            /dev/block/sde20 /system ext4 rw 0 0
                             /usb_otg vfat rw 0 0
                            

                            mount

                            'rootfs on / type rootfs (rw,seclabel,size=2834740k,nr_inodes=708685)
                            tmpfs on /dev type tmpfs (rw,seclabel,nosuid,relatime,size=2918948k,nr_inodes=729737,mode=755)
                            devpts on /dev/pts type devpts (rw,seclabel,relatime,mode=600)
                            proc on /proc type proc (rw,relatime,gid=3009,hidepid=2)
                            sysfs on /sys type sysfs (rw,seclabel,relatime)
                            selinuxfs on /sys/fs/selinux type selinuxfs (rw,relatime)
                            tmpfs on /mnt type tmpfs (rw,seclabel,nosuid,nodev,noexec,relatime,size=2918948k,nr_inodes=729737,mode=755,gid=1000)
                            none on /acct type cgroup (rw,relatime,cpuacct)
                            tmpfs on /tmp type tmpfs (rw,seclabel,relatime,size=2918948k,nr_inodes=729737)
                            pstore on /sys/fs/pstore type pstore (rw,seclabel,relatime)
                            adb on /dev/usb-ffs/adb type functionfs (rw,relatime)
                            /dev/block/sda15 on /data type ext4 (rw,seclabel,relatime,data=ordered)
                            /dev/block/sda15 on /sdcard type ext4 (rw,seclabel,relatime,data=ordered)
                            /dev/block/sde20 on /system type ext4 (rw,seclabel,relatime,data=ordered)
                            

                            mount /data

                            mount: '/dev/block/sda15'->'/data': Device or resource busy
                            

                            ls -l /data

                            1|OnePlus3:/ # ls -l /data
                            total 32792
                            -rw-------  1 root   root   33554432 1973-06-18 14:57 SWAP.img
                            drwxrwx--x 44 system system     4096 1973-06-18 14:58 android-data
                            drwxr-xr-x  3 root   root       4096 1973-06-18 14:57 cache
                            drwx------  2 root   root       4096 1970-01-01 00:02 lost+found
                            drwxrwx---  3 root   root       4096 2017-01-09 11:51 media
                            drwxr-xr-x  5 root   root       4096 1973-06-18 14:58 system-data
                            drwxr-xr-x  3 root   root       4096 2020-06-26 05:32 user-data
                            

                            The first step of the guide you linked involves the following the command: mount /data/rootfs.img /a, which outputs that rootfs.img does not exist.

                            D 1 Reply Last reply 3 Jul 2020, 06:06 Reply Quote 0
                            • D Offline
                              doniks @Toadtoad
                              last edited by 3 Jul 2020, 06:06

                              @Toadtoad thanks for the clear post!

                              The first step of the guide you linked involves the following the command: mount /data/rootfs.img /a, which outputs that rootfs.img does not exist.

                              oh. uhh. I am really surprised. You are positive that UT is installed right? Maybe things are not working as I thought they are :man_shrugging: Can you show ls -l /system?

                              There is a thread about the oneplus 3t in the porting - devices section. People there should know how to chroot in

                              T 1 Reply Last reply 4 Jul 2020, 00:25 Reply Quote 0
                              • L Offline
                                Lakotaubp
                                last edited by 3 Jul 2020, 06:43

                                https://forums.ubports.com/topic/3253/oneplus-3-3t/538 Just to help speed things along if needed.

                                1 Reply Last reply Reply Quote 2
                                • T Offline
                                  Toadtoad @doniks
                                  last edited by 4 Jul 2020, 00:25

                                  @doniks
                                  ls -l /system

                                  total 88
                                  drwxr-xr-x   2 root root 4096 2020-06-26 06:53 android
                                  drwxr-xr-x   2 root root 4096 2017-01-10 21:46 bin
                                  drwxr-xr-x   2 root root 4096 2016-04-12 20:14 boot
                                  lrwxrwxrwx   1 root root   14 2020-06-26 06:53 cache -> /android/cache
                                  lrwxrwxrwx   1 root root   13 2020-06-26 06:53 data -> /android/data
                                  drwxr-xr-x   3 root root 4096 2020-06-26 05:28 debian
                                  drwxr-xr-x   4 root root 4096 2020-06-26 05:24 dev
                                  drwxr-xr-x 110 root root 4096 1973-06-18 14:58 etc
                                  lrwxrwxrwx   1 root root   16 2020-06-26 06:53 factory -> /android/factory
                                  lrwxrwxrwx   1 root root   17 2020-06-26 06:53 firmware -> /android/firmware
                                  drwxr-xr-x   3 root root 4096 2020-06-26 05:32 home
                                  drwxr-xr-x  19 root root 4096 2020-06-26 05:28 lib
                                  drwx------   2 root root 4096 1970-01-01 00:00 lost+found
                                  drwxr-xr-x   2 root root 4096 2020-06-26 05:23 media
                                  drwxr-xr-x   2 root root 4096 2020-06-26 05:23 mnt
                                  lrwxrwxrwx   1 root root   12 2020-06-26 06:53 odm -> /android/odm
                                  drwxr-xr-x   3 root root 4096 2020-06-26 05:31 opt
                                  lrwxrwxrwx   1 root root   16 2020-06-26 06:53 persist -> /android/persist
                                  drwxr-xr-x   2 root root 4096 2016-04-12 20:14 proc
                                  drwx------   2 root root 4096 2020-06-26 05:32 root
                                  drwxr-xr-x   8 root root 4096 2020-06-26 05:31 run
                                  drwxr-xr-x   2 root root 4096 2020-06-26 05:32 sbin
                                  drwxr-xr-x   2 root root 4096 2020-06-26 05:23 srv
                                  drwxr-xr-x   2 root root 4096 2016-02-05 09:48 sys
                                  lrwxrwxrwx   1 root root   15 2020-06-26 06:53 system -> /android/system
                                  drwxrwxrwt   2 root root 4096 2020-06-26 05:32 tmp
                                  drwxr-xr-x   2 root root 4096 2020-06-26 06:53 userdata
                                  drwxr-xr-x  10 root root 4096 2020-06-26 05:23 usr
                                  drwxr-xr-x  11 109  113  4096 2020-06-25 12:57 var
                                  lrwxrwxrwx   1 root root   22 2020-06-26 06:53 vendor -> /android/system/vendor
                                  

                                  Should I reinstall UBPorts?

                                  D 1 Reply Last reply 4 Jul 2020, 05:38 Reply Quote 1
                                  • D Offline
                                    doniks @Toadtoad
                                    last edited by doniks 7 Apr 2020, 05:45 4 Jul 2020, 05:38

                                    @Toadtoad said in Navigating (enabling developer mode) with broken screen (oneplus 3t):

                                    @doniks
                                    ls -l /system

                                    total 88
                                    drwxr-xr-x   2 root root 4096 2020-06-26 06:53 android
                                    drwxr-xr-x   2 root root 4096 2017-01-10 21:46 bin
                                    drwxr-xr-x   2 root root 4096 2016-04-12 20:14 boot
                                    lrwxrwxrwx   1 root root   14 2020-06-26 06:53 cache -> /android/cache
                                    lrwxrwxrwx   1 root root   13 2020-06-26 06:53 data -> /android/data
                                    drwxr-xr-x   3 root root 4096 2020-06-26 05:28 debian
                                    drwxr-xr-x   4 root root 4096 2020-06-26 05:24 dev
                                    drwxr-xr-x 110 root root 4096 1973-06-18 14:58 etc
                                    lrwxrwxrwx   1 root root   16 2020-06-26 06:53 factory -> /android/factory
                                    lrwxrwxrwx   1 root root   17 2020-06-26 06:53 firmware -> /android/firmware
                                    drwxr-xr-x   3 root root 4096 2020-06-26 05:32 home
                                    drwxr-xr-x  19 root root 4096 2020-06-26 05:28 lib
                                    drwx------   2 root root 4096 1970-01-01 00:00 lost+found
                                    drwxr-xr-x   2 root root 4096 2020-06-26 05:23 media
                                    drwxr-xr-x   2 root root 4096 2020-06-26 05:23 mnt
                                    lrwxrwxrwx   1 root root   12 2020-06-26 06:53 odm -> /android/odm
                                    drwxr-xr-x   3 root root 4096 2020-06-26 05:31 opt
                                    lrwxrwxrwx   1 root root   16 2020-06-26 06:53 persist -> /android/persist
                                    drwxr-xr-x   2 root root 4096 2016-04-12 20:14 proc
                                    drwx------   2 root root 4096 2020-06-26 05:32 root
                                    drwxr-xr-x   8 root root 4096 2020-06-26 05:31 run
                                    drwxr-xr-x   2 root root 4096 2020-06-26 05:32 sbin
                                    drwxr-xr-x   2 root root 4096 2020-06-26 05:23 srv
                                    drwxr-xr-x   2 root root 4096 2016-02-05 09:48 sys
                                    lrwxrwxrwx   1 root root   15 2020-06-26 06:53 system -> /android/system
                                    drwxrwxrwt   2 root root 4096 2020-06-26 05:32 tmp
                                    drwxr-xr-x   2 root root 4096 2020-06-26 06:53 userdata
                                    drwxr-xr-x  10 root root 4096 2020-06-26 05:23 usr
                                    drwxr-xr-x  11 109  113  4096 2020-06-25 12:57 var
                                    lrwxrwxrwx   1 root root   22 2020-06-26 06:53 vendor -> /android/system/vendor
                                    

                                    Now, this looks like UT! I am so surprised.

                                    Should I reinstall UBPorts?

                                    No, no need. Seems you were correct earlier! Just double check that there is a home/phablet folder in there then it is 100% that this is UT. Then find the passwd executable. It has to be in any of bin sbin usr/bin usr/sbin I'm sure. Then chroot /system and change phablet's password using that passwd that you just found.

                                    PS: Could you do me a favor? It's not really relevant for your passwd/ssh question, but it would help me understand how this halium port is put together. Can you paste ls -l /system/var/lib/lxc/android (or without the leading /system if you are inside the chroot)

                                    T 1 Reply Last reply 4 Jul 2020, 18:17 Reply Quote 0
                                    • J Offline
                                      joe
                                      last edited by 4 Jul 2020, 17:05

                                      Also try "phablet" as the default password. That's what it was on my OP3.

                                      1 Reply Last reply Reply Quote 0
                                      • T Offline
                                        Toadtoad @doniks
                                        last edited by 4 Jul 2020, 18:17

                                        @doniks
                                        Ah, I didn't add sbin, /usr/bin, and /usr/sbin to PATH. passwd was in /usr/bin. I changed the password, so I think I'm able to get in. But, it seems like adb isn't even supported on the OP3T, so it seems like a moot point. @joe since you were able to help me navigate to developer mode, do you think you can tell me how to open the terminal with a keyboard, so I could try to setup SSH?

                                        J 1 Reply Last reply 5 Jul 2020, 04:26 Reply Quote 0
                                        • J Offline
                                          joe @Toadtoad
                                          last edited by 5 Jul 2020, 04:26

                                          @Toadtoad
                                          Once you can be sure that you are past the lock screen:
                                          UPDATE on this for me for some reason:

                                          • Hold superkey, and press a number to open any app . e.g. settings, which will prompt for password if locked.
                                          • Enter password ** For me I now have to press TAB to make the cursor go to the password field.

                                          You can reach the terminal or any app by pressing:

                                          • Superkey (this will open the dash)
                                          • Type in "terminal" , which should search for the app. Then press Enter.
                                          • You should be in terminal now, and it asks for your password again. Type that in and press Enter.
                                          • Now will be in the command line
                                          T 1 Reply Last reply 5 Jul 2020, 05:18 Reply Quote 0
                                          • T Offline
                                            Toadtoad @joe
                                            last edited by Toadtoad 7 May 2020, 05:22 5 Jul 2020, 05:18

                                            @joe Okay, I think nearly everything is setup for SSH. The one thing I can confirm isn't working yet is wifi. My network runs on wpa-psk, and I need some way to bring the credentials to the phone. Is this possible through adb shell?

                                            EDIT: Also, do I need to TAB when opening the terminal before entering my password? Thanks.

                                            J 1 Reply Last reply 6 Jul 2020, 04:23 Reply Quote 0
                                            13 out of 29
                                            • First post
                                              13/29
                                              Last post