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.
      • ToadtoadT Offline
        Toadtoad @doniks
        last edited by

        @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 Reply Quote 1
        • D Offline
          doniks @Toadtoad
          last edited by doniks

          @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)

          ToadtoadT 1 Reply Last reply Reply Quote 0
          • J Offline
            joe
            last edited by

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

            1 Reply Last reply Reply Quote 0
            • ToadtoadT Offline
              Toadtoad @doniks
              last edited by

              @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 Reply Quote 0
              • J Offline
                joe @Toadtoad
                last edited by

                @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
                ToadtoadT 1 Reply Last reply Reply Quote 0
                • ToadtoadT Offline
                  Toadtoad @joe
                  last edited by Toadtoad

                  @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 Reply Quote 0
                  • J Offline
                    joe @Toadtoad
                    last edited by

                    @Toadtoad
                    Refer to my first post for the wifi part.
                    Under

                    [wifi-security]
                    auth-alg=open
                    group=
                    key-mgmt=wpa-psk
                    pairwise=
                    proto=
                    psk=
                    

                    psk = [your wifi password]

                    I think you can copy the settings from another ubuntu machine under
                    /etc/NetworkManager/system-connections

                    You don't need to TAB for the password in terminal. Also it might vary for the one on the lock screen 😛

                    ToadtoadT 1 Reply Last reply Reply Quote 0
                    • ToadtoadT Offline
                      Toadtoad @joe
                      last edited by

                      @joe I tried copying the file from my Manjaro machine, replacing the permissions and adding the password, but it didn't seem to work, as I couldn't detect my phone on nmap from another computer on the LAN. I even tried to get into the terminal to use nmcli to connect (https://docs.ubuntu.com/core/en/stacks/network/network-manager/docs/configure-wifi-connections) but it didn't seem to work, either. How can i get my internet connected, and is there any way to verify I'm actually in the terminal? Sorry for how complicated this is getting, and thanks for the help.

                      J 1 Reply Last reply Reply Quote 0
                      • J Offline
                        joe @Toadtoad
                        last edited by

                        @Toadtoad
                        You are setting up via ADB through TWRP?
                        Permissions should be:
                        -rw------- 1 root root
                        And the profile in /data/system-data/etc/NetworkManager/system-connections is the exact name of the wifi SSID.

                        Not sure how you would know if you are in the terminal or not. One way would be to assume you are, then create a file e.g. "touch testfile" . Then go back to TWRP-adb and see if that file exists.

                        ToadtoadT 1 Reply Last reply Reply Quote 0
                        • ToadtoadT Offline
                          Toadtoad @joe
                          last edited by

                          @joe The permissions were -rwxrwxrwx 1 root root, but that should work as well (albeit it could be more secure). The profile has the same name as the SSID.

                          After testing, I don't think I was in the terminal. Should I try reinstalling UBPorts from scratch, and is there an initial setup page that I haven't bypassed that I may be hitting? I'm trying to figure out why I didn't access the terminal. I believe I followed the instructions exactly.

                          C 1 Reply Last reply Reply Quote 0
                          • C Offline
                            Capsia @Toadtoad
                            last edited by

                            @Toadtoad Hi,
                            You can test if you are in the terminal by connecting your headphones,
                            then type:

                            pactl load-module module-loopback
                            

                            Now you should hear your voice from the microphone to the headphones.
                            If it works, make sure to unload the module before unplugging the headphones:

                            pactl unload-module module-loopback
                            

                            If everything worked, you've successfully opened the terminal.
                            (If you run the commands without plugged headphones, your phone will generate strange, loud sounds)

                            ToadtoadT 1 Reply Last reply Reply Quote 1
                            • ToadtoadT Offline
                              Toadtoad @Capsia
                              last edited by

                              @Capsia Okay, based off of that, it seems like I am not in the terminal, unfortunately. Is there anything else I could try?

                              1 Reply Last reply Reply Quote 0
                              • First post
                                Last post