Readonly Filesystem (Nexus 5) and broken power button
-
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 triedsudo mount -o rw,remount /
that doesn't solve my problem andsudo mount -o rw,remount /system
but it saysmount: 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 :- Is it even possible to use the volume buttons like i would use the power button ?
- If it is ... then how am I supposed to modify the system files ?
Thanks for reading.
Feel free to ask me additionnal informations. -
@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.
-
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.
-
@creuzdos You can also use a magnetic case or any magnet
-
@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 asgpio-keys
file. -
@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 -
@dobey In recovery mode, the
/system
directory contains only alost+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.
-
@creuzdos Can't you simply repair hardware?
-
@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.
-
@creuzdos I think you need to mount
/system
first, as it's not mounted yet in recovery, IIRC.Beyond that, I'm not sure.
-
@dobey
OK you're right, for me it's quite simple, i'm the hardware kind of guy lol. -
@creuzdos
If you want to try the fix :
https://protyposis.net/blog/replacing-the-nexus-5-power-button/ -
@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.
-
@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.
-
@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 -
@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
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.
-
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 theubport-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.
-
@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?
-
@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. -
@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
)