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

    Readonly Filesystem (Nexus 5) and broken power button

    Scheduled Pinned Locked Moved Google Nexus 5
    31 Posts 5 Posters 4.2k Views 2 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.
      • C Offline
        Creuzdos
        last edited by

        Hi everyone, here is my full story :
        The power button of my Nexus 5 is broken.
        I wanted to make some changes to be able to wake the phone with the volume buttons.
        So, I wanted to modify the file /system/usr/keylayout/gpio-keys.kl but the file system is readonly.
        I tried to reinstall the system using ubports software (hoping i would find an option RO or RW but i found none).
        I tried the "magic rw feature" by creating a file/userdata/.writable_image.
        I tried sudo mount -o rw,remount / that doesn't solve my problem and sudo mount -o rw,remount /system but it says mount: cannot remount /dev/loop1 read-write, is write-protected

        I tried to play with the terminal within the phone and with adb shell.
        So basically, i have 2 major problems :

        1. Is it even possible to use the volume buttons like i would use the power button ?
        2. If it is ... then how am I supposed to modify the system files ?

        Thanks for reading.
        Feel free to ask me additionnal informations.

        dobeyD KenedaK 2 Replies Last reply Reply Quote 0
        • dobeyD Offline
          dobey @Creuzdos
          last edited by

          @creuzdos said in Readonly Filesystem (Nexus 5) and broken power button:

          So, I wanted to modify the file /system/usr/keylayout/gpio-keys.kl but the file system is readonly.

          You would have to do this from recovery, as it's modifying the Android side.

          I don't know if it will work, but if it does then your volume buttons will not be usable for volume any longer.

          C 1 Reply Last reply Reply Quote 0
          • C Offline
            Creuzdos @dobey
            last edited by

            Hi, thank you for your fast reply.

            Can you explain a bit what you mean by "from recovery".
            I am ready to try anything, am i not using the right tools ?

            I understand what it implies but I think I can live without volume buttons as I can change the volume inside the settings pannel. Unfortunately, a phone without a power button is almost not usable. When the screen is locked, the only way to wake it right now is to plug a USB cable and then unplug it to unlock the screen. :beaming_face_with_smiling_eyes:

            K dobeyD 2 Replies Last reply Reply Quote 0
            • K Offline
              kugiigi @Creuzdos
              last edited by

              @creuzdos You can also use a magnetic case or any magnet šŸ˜‰

              C 1 Reply Last reply Reply Quote 0
              • dobeyD Offline
                dobey @Creuzdos
                last edited by

                @creuzdos said in Readonly Filesystem (Nexus 5) and broken power button:

                Can you explain a bit what you mean by "from recovery".

                adb reboot-recovery

                You will need to adb shell in recovery mode, to make any changes to the Android image parts, such as gpio-keys file.

                C 1 Reply Last reply Reply Quote 0
                • C Offline
                  Creuzdos @kugiigi
                  last edited by

                  @kugiigi Wow... I didn't know this trick could work... this could be a solution indeed. Unfortunately, I have none to try it now but this is very interesting.

                  @dobey Ok thanks, i'm not very comfortable but I'll try my best. I think you provided a great help putting me on a good track.

                  note : it's adb reboot recovery according to the man page šŸ˜‰

                  1 Reply Last reply Reply Quote 0
                  • C Offline
                    Creuzdos @dobey
                    last edited by

                    @dobey In recovery mode, the /system directory contains only a lost+found directory and i can't find the file /system/usr/keylayout/gpio-keys.kl

                    I tried this : https://nattster.wordpress.com/2015/09/22/use-volume-button-to-wake-up-nexus-5/

                    but at step 6 as i just said... the file doesn't exist. I'm a bit stuck here.

                    KenedaK dobeyD 2 Replies Last reply Reply Quote 0
                    • KenedaK Offline
                      Keneda @Creuzdos
                      last edited by Keneda

                      @creuzdos Can't you simply repair hardware?

                      2015-2023 : Meizu MX4 ā˜ ļøāš°ļøāœļø
                      2023-2024 : Nexus 5 ā˜ ļøāš°ļøāœļø
                      2024-***** : FPOS Fairphone 5 waiting UT for freedom šŸ˜‰
                      šŸ‡²šŸ‡«šŸ‡¬šŸ‡§

                      dobeyD 1 Reply Last reply Reply Quote 0
                      • dobeyD Offline
                        dobey @Keneda
                        last edited by

                        @keneda said in Readonly Filesystem (Nexus 5) and broken power button:

                        @creuzdos Can't you simply repair harware?

                        It can be repaired, but I would hardly use the word simply to describe the act.

                        KenedaK 1 Reply Last reply Reply Quote 0
                        • dobeyD Offline
                          dobey @Creuzdos
                          last edited by

                          @creuzdos I think you need to mount /system first, as it's not mounted yet in recovery, IIRC.

                          Beyond that, I'm not sure.

                          1 Reply Last reply Reply Quote 0
                          • KenedaK Offline
                            Keneda @dobey
                            last edited by

                            @dobey
                            OK you're right, for me it's quite simple, i'm the hardware kind of guy lol.

                            2015-2023 : Meizu MX4 ā˜ ļøāš°ļøāœļø
                            2023-2024 : Nexus 5 ā˜ ļøāš°ļøāœļø
                            2024-***** : FPOS Fairphone 5 waiting UT for freedom šŸ˜‰
                            šŸ‡²šŸ‡«šŸ‡¬šŸ‡§

                            dobeyD 1 Reply Last reply Reply Quote 1
                            • KenedaK Offline
                              Keneda @Creuzdos
                              last edited by

                              @creuzdos
                              If you want to try the fix :
                              https://protyposis.net/blog/replacing-the-nexus-5-power-button/

                              2015-2023 : Meizu MX4 ā˜ ļøāš°ļøāœļø
                              2023-2024 : Nexus 5 ā˜ ļøāš°ļøāœļø
                              2024-***** : FPOS Fairphone 5 waiting UT for freedom šŸ˜‰
                              šŸ‡²šŸ‡«šŸ‡¬šŸ‡§

                              1 Reply Last reply Reply Quote 0
                              • dobeyD Offline
                                dobey @Keneda
                                last edited by

                                @keneda Even as a hardware geek, it is still quite difficult. It is a very tiny button which must be placed just right, and requires liquid solder paste and hot air rework station to do correctly. It's not a simple solder job.

                                KenedaK 1 Reply Last reply Reply Quote 0
                                • KenedaK Offline
                                  Keneda @dobey
                                  last edited by

                                  @dobey
                                  I know i can do it, i already did that kind of solder work.

                                  It's just a proposal if he feels he can do it (and have tools for that), or know someone that can do it for him.

                                  2015-2023 : Meizu MX4 ā˜ ļøāš°ļøāœļø
                                  2023-2024 : Nexus 5 ā˜ ļøāš°ļøāœļø
                                  2024-***** : FPOS Fairphone 5 waiting UT for freedom šŸ˜‰
                                  šŸ‡²šŸ‡«šŸ‡¬šŸ‡§

                                  C 1 Reply Last reply Reply Quote 0
                                  • C Offline
                                    Creuzdos @Keneda
                                    last edited by Creuzdos

                                    @keneda Thank you very much. If you want the full story :
                                    I bought 2 replacement buttons on the internet. I tried to do it myself first... it was a total disaster šŸ˜‚ Then I brought it to a local repair shop. It cost me 35€. And it worked 2-3 months and broke again...
                                    So now I just want to have a usable phone to play with UT. šŸ˜‰

                                    @dobey Ok, I managed to flash my Nexus with an android rom. I could edit the files and it worked perfectly as expected. Then I reinstalled Ubuntu touch. I did not check the "wipe system" checkbox hoping the /system files would stay but unfortunately they have been replaced. I'm trying again tomorrow.
                                    Thank you and good night

                                    KenedaK 1 Reply Last reply Reply Quote 0
                                    • KenedaK Offline
                                      Keneda @Creuzdos
                                      last edited by Keneda

                                      @creuzdos said in Readonly Filesystem (Nexus 5) and broken power button:

                                      I bought 2 replacement buttons on the internet. I tried to do it myself first... it was a total disaster Then I brought it to a local repair shop. It cost me 35€. And it worked 2-3 months and broke again...
                                      So now I just want to have a usable phone to play with UT.

                                      Ok i understand :disappointed_face:

                                      However, i must tell, never again go to those so-called "phone repair shops" that pop up from here and there, they're 99% owned by incompetents, always go to real electronician repair shop (hard to find i know).

                                      Hope you will succeed in software workaround.

                                      2015-2023 : Meizu MX4 ā˜ ļøāš°ļøāœļø
                                      2023-2024 : Nexus 5 ā˜ ļøāš°ļøāœļø
                                      2024-***** : FPOS Fairphone 5 waiting UT for freedom šŸ˜‰
                                      šŸ‡²šŸ‡«šŸ‡¬šŸ‡§

                                      1 Reply Last reply Reply Quote 0
                                      • C Offline
                                        Creuzdos
                                        last edited by Creuzdos

                                        Here is a little update.
                                        Day 3 : I have installed multiple times android, paranoid android and ubuntu touch
                                        I have used twrp recovery img and modified /system/usr/keylayout/gpio-keys.kl
                                        as I said yesterday it works absolutely as expected on paranoid android but everytime I come back to ubuntu-touch (even when I uncheck every checkbox inside the ubport-installer )
                                        the file /system/usr/keylayout/gpio-keys.kl is the default read-only file.

                                        If anyone has a tip to help me set the /system partition writable or replace this file one way or another. If it is not possible, what i'm going to do next is probably go try paranoid android to play with in the next few days / weeks.

                                        Is it possible to get a zip with the ubuntu touch ROM for NEXUS 5, so i can install it through twrp like i did with the other android systems ?

                                        Thank you all for your help and keep up the good work.

                                        AntiDroidA KenedaK 2 Replies Last reply Reply Quote 0
                                        • AntiDroidA Offline
                                          AntiDroid @Creuzdos
                                          last edited by

                                          @creuzdos I may be wrong but couldn't you boot into TWRP, use

                                          adb push path/to/new/file /sdcard
                                          

                                          from your host to get the new file on the device and then use the file manager under advanced in TWRP to replace the one that keeps being over written with the one you placed in /sdcard?

                                          OnePlus One with UT OTA-15 daily driver. I would be testing the Halium 7.1 port if I could roll back to OTA-15
                                          OnePlus 6T PostmarketOS Custom Gnome on Mainline Kernel

                                          KenedaK 1 Reply Last reply Reply Quote 0
                                          • KenedaK Offline
                                            Keneda @AntiDroid
                                            last edited by

                                            @antidroid
                                            Go to \system with file manager, after image made writable with UTTT, then check infos for folders and files in here : all is read only, you will not be able to paste anything here, you can copy files from, then paste in writable folder like "downloads", but that's all.

                                            2015-2023 : Meizu MX4 ā˜ ļøāš°ļøāœļø
                                            2023-2024 : Nexus 5 ā˜ ļøāš°ļøāœļø
                                            2024-***** : FPOS Fairphone 5 waiting UT for freedom šŸ˜‰
                                            šŸ‡²šŸ‡«šŸ‡¬šŸ‡§

                                            AntiDroidA 1 Reply Last reply Reply Quote 0
                                            • KenedaK Offline
                                              Keneda @Creuzdos
                                              last edited by Keneda

                                              @creuzdos said in Readonly Filesystem (Nexus 5) and broken power button:

                                              @dobey In recovery mode, the /system directory contains only a lost+found directory and i can't find the file /system/usr/keylayout/gpio-keys.kl

                                              Did you try acces this file with ADB from recovery after enabling Developer Mode from system settings under Ubuntu Touch? (System settings -> About -> Developer mode -> enable -> adb reboot recovery -> adb shell)

                                              2015-2023 : Meizu MX4 ā˜ ļøāš°ļøāœļø
                                              2023-2024 : Nexus 5 ā˜ ļøāš°ļøāœļø
                                              2024-***** : FPOS Fairphone 5 waiting UT for freedom šŸ˜‰
                                              šŸ‡²šŸ‡«šŸ‡¬šŸ‡§

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