Pixel 5a sdcard folder does not exist anymore - General Questions and Answers

Out of nowhere the screen went black and started flickering without being dropped.
I can interact with the phone via adb commands and was trying to recover data.
I ran the commands below and it's as if the /storage/emulated/0 folder is nonexistent.
Is the phone's storage permanently damaged? I can't adb backup or reset the phone since the screen does not work
I was thinking of booting twrp and using the command line to perform a backup but to my knowledge there is not a twrp image for the Pixel 5a on Android 13.
Code:
barbet:/storage/emulated/0 $ du -ms *
du: *: No such file or directory
barbet:/storage/emulated/0 $ ls -la
total 0
drwxr-xr-x 2 root root 40 1971-07-28 00:58 .
drwxr-xr-x 3 root root 60 1971-07-28 00:58 ..
barbet:/ $ ls
acct cache data_mirror etc lost+found odm_dlkm proc storage system_ext
apex config debug_ramdisk init metadata oem product sys vendor
bin d dev init.environ.rc mnt persist sdcard system vendor_dlkm
bugreports data dsp linkerconfig odm postinstall second_stage_resources system_dlkm
$ adb push file.txt /storage/emulated/0/
file.txt : 1 file pushed, 0 skipped. 1.1 MB/s (316 bytes in 0.000s)
adb: error: failed to copy 'file.txt ' to '/storage/emulated/0/file.txt ': remote couldn't create file: Permission denied
$ adb pull /storage/emulated/0/
/storage/emulated/0/: 0 files pulled, 0 skipped.

This errror msg says
Code:
adb: error: failed to copy 'file.txt ' to '/storage/emulated/0/file.txt ': remote couldn't create file: Permission denied
says all.
Your device's Android 13 does not allow ADB to access storage /data/media/0 ,
BTW:
/storage/emulated/0/ is actually /data/media/0/ exposed through an emulated / virtual filesystem, not the actual one.

I see. I have used the prior commands before on other Android versions and it did not occur to me it was an Android 13 limitation.
I have Magisk installed. Is there a way for me to grant adb root access without being able to see the screen?

The below command works on an android 11 phone but on the Pixel 5a the storage is mounted and when I click on it it unmounts.
Code:
adb shell svc usb setFunctions mtp true

first, find your .android directory on PC and backup your adbkey.pub
then use scrcpy to mirror screen to PC via adb.
Control your Android Smartphone from your PC for free with scrcpy
A new tool called "scrcpy" allows you to display your phone screen on your computer with just a USB connection and ADB. No root required.
www.xda-developers.com
Your phone is rooted, so don't reboot or do anything to get stuck in BFU state. use the power of root instead.
type su and check data is decrypted. you can list files in /data/media/0

Thanks for the replies. I was able to get a free screen replacement at Ubreakifix through an extended Google warranty. The employee was not to knowledgeable about which specific one but I think it's this one.
I tried scrcpy and it worked to enable adb shell root access.
Interestingly, the adb command to enable mtp worked when the screen was repaired.

Related

[Q] Prolly need partitioning, need advice. Tf101g

To those of you who followed link here: don't rush ahead and execute adb command. Read the thread in its entirety, since it contains typos and trial n error.
Gl, hf
Hi. I've been stupid. U may flame me but plz also provide some advice to swallow it with.
I followed bad advice and flashed cwm 5xxxx. After that tried to run superwipe, which got stuck after a few steps. To my horror i realized i had run it from internal. Of course it wiped itself and i got stuck mid-partinioning i think.
Since cwm don't read ext sd i tried to push new recovery via easyflasher, but i can't seem to get a driver that lets my pc interact with the device.
Instead discovered i have adb acess if connected when device is in cwm. From there tried to run PERI v 0.4. At first step, trying to push recovery i get a message of no space available. I think this is due to borked partitioning with superwipe. I guess I can repartition with cwm, but now I've messed so much up I don't wanna do anything more without proper advice.
Thanks
bump
If you have adb access, then use it to push a new rom.
"adb push {shiny new rom or recovery} /sdcard/"
You might have to change /sdcard/ to whatever cwm 5x uses?
Then you can just flash it from cwm.
EDIT: I just saw that you have the tf101G - it might work, but you probably have to find the right rom or recovery.
sent from my transformer
gee one said:
If you have adb access, then use it to push a new rom.
"adb push {shiny new rom or recovery} /sdcard/"
You might have to change /sdcard/ to whatever cwm 5x uses?
Then you can just flash it from cwm.
EDIT: I just saw that you have the tf101G - it might work, but you probably have to find the right rom or recovery.
sent from my transformer
Click to expand...
Click to collapse
Good advice, problem is that im not very savvy. How do i execute that command and what if i need to repartition the internal sd?
When running oneclickrecovery i get following prompts:
Uh-oh! I'm softbricked or have a recovery-bootloop! D:
Never fear sir and/or madam! PERI is here! -trips-
Adb needs to be fully working for this to work properly.
Note that this will wipe your current recovery.
Also note that this may not work, don't taze me bro!
Run? Close if you want to cancel.
Press any key to continue . . .
List of devices attached
0123456789ABCDEF recovery
If you see your device here this will work, if not fix adb.
Press any key to continue . . .
running fix...
dd: writing '/dev/block/mmcblk0p3': No space left on device
4097+0 records in
4096+0 records out
2097152 bytes (2.0MB) copied, 0.345431 seconds, 5.8MB/s
rebooting tab, if at any step it doesn't reboot turn off and turn back on
Once back into an adb possible state continue...
Press any key to continue . . .
Pushing new recovery...
1331 KB/s (4599884 bytes in 3.374s)
Running wolf's exploit...
mv: can't rename '/data/local/tmp': No such file or directory
Going...
ln: /data/local/tmp: No such file or directory
Done!
Now lets reboot your TF again...
Continue when back into ADB again...
Press any key to continue . . .
Flashing new recovery...
dd: can't open '/sdcard/recoveryblob': No such file or directory
Done!
Continue to reboot your tab, do the button combination to test recovery.
(Hold volume-down as it's rebooting and press vol-up to enter recovery)
Press any key to continue . . .
Hopefully that fixed everything!
Press any key to continue . . .
Of course nothing was fixed and I still have cwm 5xxx which can't flash from ext sd. If I can only get another recovery I can flash any rom and that's that.
In device manager the device shows up as android adb interface when booted into cwm. I also have a device named android composite adb interface, but with a warning sign on it.
This is getting tiresome...
Edit: tried using quick adb pusher, but get message that i cant mount as r/w. In cwm cant mount data or sdcard/.android_secure.
Fun thing is I dont have root either.
It looks like your partitions are unformatted.
I think you need to get to a root shell via adb in recovery
- put your phone on recovery and plug into your computer
- type "adb remount" (you might get an error) then type "adb shell"
- you'll be in a terminal shell
- type "mount" to see how/what your sdcard is doing. Look for the line that has /sdcard on it. It might be something like /dev/block/mmcblk0p1 mounted at /sdcard blah blah...
- now to format your sdcard, type "mke2fs /dev/blah/whereever/your/sdcard/is/mounted/from/above"
- allow it to complete and type "exit". you might have to reboot your tab to get everything to remount
- once your tqab is back in recovery, type on your computer "adb push [some new recovery that uses the external sdcard or a new rom] /sdcard"
- if you have recovery bootloops, google around, there is a fix that wipes the reboot command from the misc partition. You can type it from an adb shell it's something like "dd if=/dev/block/zero of=/be/carefule/because/you/have/a/tf101G bs=1 count=13"
- Google is your friend. Linux is your friend. This is a bit of a high level overview, so you'll have to fill in the details yourself. Keep in mind that I don't have a tf101G and I never tried this before (a benefit of never using superwipe!)
Good luck!
OK. I'd like to try the method u describe but as I mentioned I'm really not tech savvy. I don't even know how to get to the point where I type "adb remount". Do I just open a cmd prompt? Tried that - didn't work.
I have downloaded sdk manager for when I did some stuff with my phone earlier and have the basic packages installed.
Are you on Windows? I think it's a path issue. You either need to put everything in the same folder and run everything from there or put adb in your path. I don't use Windows, so that's probably the best advice I can give you. "which adb" and "echo $PATH" probably won't work in Windows like they do in linux.
Ehm.. too techie answer for me to comprehend.
Yes I'm on win 7.
Put what in same folder as what?
Run from there by right clicking empty space in folder and choosing cmd?
What do you mean by putting adb in my path?
For some reason, lots of people on windows just put the recovery/rom and adb in the same folder and run it from there in the command prompt. Put it all in one place and use the cd command in the terminal to get there.
sent while running with scissors
Lol. Don't cut urself man. I might need your help again
I'll try later when kids asleep.
Allright. Learning curve is steep but im clinging on to it:
C:\Program Files (x86)\Android\android-sdk\platform-tools>adb remount
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
remount failed: Success
C:\Program Files (x86)\Android\android-sdk\platform-tools>adb shell
~ # mount
mount
rootfs on / type rootfs (rw)
tmpfs on /dev type tmpfs (rw,nosuid,relatime,mode=755)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
/dev/block/mmcblk0p2 on /cache type ext4 (rw,nosuid,nodev,relatime,user_xattr,ac
l,barrier=1,data=ordered)
~ # mke2fs /dev/block/mmcblk0p2
mke2fs /dev/block/mmcblk0p2
mke2fs 1.41.11 (14-Mar-2010)
/dev/block/mmcblk0p2 is apparently in use by the system; will not make a filesys
tem here!
~ # exit
exit
C:\Program Files (x86)\Android\android-sdk\platform-tools>
Any ideas?
You're almost there... You're /cache partition is already formatted (ext4) Be careful since you can really mess things up with the wrong commands or mis-typed commands.
It looks like you need to mount your sdcard manually. I'm not sure which partition it is. I'll check the stock rom in a little while- I have to run some errands while it downloads.
OK, I downloaded the stock rom and had a look at the /etc/recovery.fstab file in the stock recovery. Should be what we need.
Put your tablet in recovery. Then, in a windows terminal, type "adb remount" and then "adb shell" This wil put you into an android terminal. I don't know if you need read/write permissions in CWM? Who knows? Typing commands in here is the same as typing commands on your tablet (if anyone used the command line any more).
type "ls /dev/block/" and you should see a long list of - look for mmcblk1p1 or mmcblk1. It will probably be the first one.
type "ls /" and look for /sdcard. If it's not there type "mkdir /sdcard" This step creates the mount point if it doesn't exist.
Now type "mount /dev/mmcblk1p1 /sdcard" - Substitute whichever one is in your /dev/block directory from above.
EDIT: If you get errors that it's not formatted or "specify the type" then we'll have to format it first. "mke2fs /dev/block/mmcblk1p1"
Now, in a different windows terminal, type "adb push [a new rom/recovery] /sdcard/"
In CWM, you should be able to flash whatever you pushed there.
If it flashes, but you get bootloops or boot back into CWM, you probably have the dreaded CWM bootloops. You can fix that by typing "dd if=/dev/zero of=/dev/block/mmcblk0p3 bs=1 count=15" in the terminal as the first step after "adb shell" For this you will need root access (with the # prompt, not $) Type "su" if you don't ahve the # prompt. It might work? Note that this is experimental and wipes out a bit of your misc partition. I have no idea of what else is on there, so there might be unintended consequences.
C:\Program Files (x86)\Android\android-sdk\platform-tools>adb remount
remount failed: Success
C:\Program Files (x86)\Android\android-sdk\platform-tools>adb shell
~ # ls /dev/block/
ls /dev/block/
loop0 loop3 loop6 mmcblk0p1 mmcblk0p4 mmcblk0p7 platform
loop1 loop4 loop7 mmcblk0p2 mmcblk0p5 mmcblk1
loop2 loop5 mmcblk0 mmcblk0p3 mmcblk0p6 mmcblk1p1
~ # ls /
ls /
cache proc system
data res tmp
default.prop root ueventd.goldfish.rc
dev sbin ueventd.rc
etc sdcard ueventd.ventana.rc
init staging
init.rc sys
~ # mount /dev/mmcblk1p1 /sdcard
mount /dev/mmcblk1p1 /sdcard
mount: mounting /dev/mmcblk1p1 on /sdcard failed: No such file or directory
~ #
I tried pushing anyway, but can't still mount sdcard on cwm from pad interface.
As for the sdcard contents, I have nothing there that can't be deleted.
use "mount /dev/block/mmcblk1p1 /sdcard" No need to repeat the ls commands.
Sorry for not answering rapidly. Baby chose this night to be at his worst.
First
C:\Program Files (x86)\Android\android-sdk\platform-tools>adb remount
remount failed: Success
C:\Program Files (x86)\Android\android-sdk\platform-tools>adb shell
~ # mount /dev/block/mmcblk1p1 /sdcard
mount /dev/block/mmcblk1p1 /sdcard
~ #
New cmd
C:\Program Files (x86)\Android\android-sdk\platform-tools>adb push cwm-6.0.1.2-t
ouch-external.zip /sdcard/
1332 KB/s (5070063 bytes in 3.715s)
C:\Program Files (x86)\Android\android-sdk\platform-tools>
Can't mount sdcard frow cwm. Can I also flash new rck manually?
Tried reboot and mounting again manually, but cwm won't mount.
Maybe try "mount /dev/block/mmcblk1 /sdcard" ???
I get invalid argument on that command.
What if we forget cwm and try format to default partinioning and push stock?
You could try pushing the stock rom to your tablet and then flashing it via the staging partition. The rom is about 522M, so you might need the sd card, but otherwise, you can push it anywhere it will fit. Staging partition is /dev/block/mmcblk0p4. Google around, the info is certainly in this forum. As long as you can get a root shell via adb, you can flash it. The stock rom is on the Asus sight. Just keep unzipping it until you see the blob file.
Of course, you can flash anything you want via the staging partition, if it's packed in a blob format. You might consider flashing a rooted rom instead of the stock.
I have stock on hd. Shall I mount staging via same commands as i mounted sdcard? Push there via adb. Then what command to flash the blob? The blob has no file extension. Shall i keep it that way?
Edit: ok i tried to unpack the recoveryblob from my desired version of cwm, but tool stopped working during process of writing recoveryblob.sos. I got the tool here http://forum.xda-developers.com/showpost.php?p=21620550&postcount=24
Next problem:
C:\Program Files (x86)\Android\android-sdk\platform-tools>adb remount
remount failed: Success
C:\Program Files (x86)\Android\android-sdk\platform-tools>adb shell
~ # mount /dev/block/mmcblk0p4
mount /dev/block/mmcblk0p4
mount: can't find /dev/block/mmcblk0p4 in /etc/fstab
~ #
Edit 2: I finally managed to get apx working if it somehow can help.

[HOWTO] Solution to fix SystemUI crash loop

Solution to fix SystemUI crash loop
Hi,
i was able to fix the SystemUI crashing loop on my moto g xt1032
via LogCat i found these two errors:
Code:
E/QSEECOMAPI: ( 6008): Error::Cannot open the file /vendor/firmware/keymaster/keymaster.mdt
E/QSEECOMAPI: ( 6008): Error::Cannot open the file /firmware/image/keymaste.mdt
There are just symlinks in /vendor/firmware/keymaster/
Code:
lrw-r--r-- root root 2015-03-04 14:26 keymaster.b00 -> /firmware/image/keymaster.b00
lrw-r--r-- root root 2015-03-04 14:26 keymaster.b01 -> /firmware/image/keymaster.b01
lrw-r--r-- root root 2015-03-04 14:26 keymaster.b02 -> /firmware/image/keymaster.b02
lrw-r--r-- root root 2015-03-04 14:26 keymaster.b03 -> /firmware/image/keymaster.b03
lrw-r--r-- root root 2015-03-04 14:26 keymaster.mdt -> /firmware/image/keymaster.mdt
so we need to look into /firmware/image/.. and we don´t find any of these files in there. That´s a problem.
Lucky me i found those files in my backups.. since i don´t know, what these files contain, i´m not able to upload them for you. maybe secret data.. maybe device specific data.. i don´t know..
so you have to find yourself the correct files in your backup?
as there seems to be a typo anywhere (take a deep look at the second error message!) we also need a file called keymaste.mdt..
i just copied keymaster.mdt and renamed it to keymaste.mdt
files i copied to /firmware/image/ are:
Code:
keymaster.b00
keymaster.b01
keymaster.b02
keymaster.b03
keymaster.mdt
keymaste.mdt
to do so, you have to remount the folder as writeable
adb shell "mount -o rw,remount /firmware"
Click to expand...
Click to collapse
then copy those files.. and reboot
Code:
adb push keymaster.b00 /firmware/image
adb push keymaster.b01 /firmware/image
adb push keymaster.b02 /firmware/image
adb push keymaster.b03 /firmware/image
adb push keymaster.mdt /firmware/image
adb push keymaste.mdt /firmware/image
if your device is absolutly clean installed.. you can´t connect via adb.. because you can´t accept the adb connection on your device..
to connect via adb just boot into twrp recovery.. in twrp press "mount" and disable mtp file transfer.. and now your are able to use adb in twrp
twrp does not mount /firmware.. so we have to do this manually by:
mount -t ext4 -o,rw /dev/block/platform/msm_sdcc.1/by-name/modem /firmware
Click to expand...
Click to collapse
now we are able to use adb push to copy those files like discribed above..
anyone know what these files are for?
whats inside those files?
where to get them?
why is this a problem for systemui?
why isn´t this fixed in cyanogenmod since more than a half year?
maybe anyone is able to verify this:
i downloaded another stock rom (asia xt1033 dualsim).. to extract those keymaster files of it.. and surprise.. those files have same md5 hash, as my files.. that means, those stock files are exactly the same as my files.. so its not a problem for me to upload them.. here you will get a double-click solution to repair SystemUI Crash =)
you need:
adb and adb driver on your windows system
adb access on your moto-g..
if your device is absolutly clean installed.. you can´t connect via adb.. because you can´t accept the adb connection on your device while the systemui crash hides the confirm window.. it is indeed possible.. but very painfull way to get there (usb debugging, etc. must be enabled too).. there is a better solution:
to connect via adb just boot into twrp recovery.. in twrp press "mount" and disable mtp file transfer.. and now you are able to use adb in twrp​
attach your moto-g to your computer
extract the archive (attached to this posting) to whatever folder you want on your windows machine (it is nothing to install via recovery/sideload!!!)
doubleclick one of these coresponding files:
1systemui.fix.bat <- this is your choice if you are able to do adb connection in cyanogenmod
2systemui.fix.bat <- this is your choice if you are in twrp recovery
what this tool will do:
remount /firmware as writeable..
pushing all keymaster files to /firmware/image on your device..
that´s it.. nothing special.. nothing creepy..
systemUI-Crash should be fixed now..
to properly remount /firmware, just reboot device..
sometimes adb can´t recognize your device.. when this happens.. the "tool" is waiting.. and waiting.. and waiting.. stocks at this point:
Code:
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
to fix this just plug the usb-cable of your device out.. and back in.. maybe several times.. untill you see something like this:
Code:
adbd is already running as root
29 KB/s (180 bytes in 0.006s)
1282 KB/s (6568 bytes in 0.005s)
1987 KB/s (16280 bytes in 0.008s)
57 KB/s (176 bytes in 0.002s)
941 KB/s (6748 bytes in 0.007s)
1647 KB/s (6748 bytes in 0.004s)
###########################################
# #
# press any key to reboot your device #
# #
###########################################
bitcoin donations are welcome =)
1EkpEyRuZqHF1Bcuv6dsUKQT9v8a43zbjc

SELinux Issue? Modifying System CACERTS On Nougat Emulator

I'm trying to modify the cacerts file on the system partition of a non-Google Play emulator to avoid annoying messages during development / Pen Testing on Nougat, related to an app I'm working with and I'm running into some issues. Even though I successfully copy the file to the /etc/security/cacerts/ directory and have confirmed the certificate is in the same format, its not showing as a Trusted Credential and gives a permission denied error when utilizing ls -al as a regular user (but displays fine as root). Permissions and file ownership are the same on all certificates, including mine; but my certificate shows up as "unlabeled" when I do an ls -aZl, verses all the working certificates show a label of "system_file". As a result, I'm assuming this is due to SELinux on the emulator, but I'm new to SELinux and I can't figure out what is setting that label. I utilized the following tool to convert file_contexts.bin, but nothing in there appears to reference cacerts. I'm not quite sure where to poke next.
In case it matters, and from a techniques standpoint in case anyone wants to get as far as I have in this:
I utilized Arsenal Image Mounter to mount the system.img file as writeable that was found in the following location:
%USERPROFILE%\AppData\Local\Android\Sdk\system-images\android-25\default\x86_64
Utilizing that I copied my certificate to /etc/security/cacerts/9a5ba575.0 (A copy of this cert is attached as 9a5ba575.0.txt ) . (I did this both as a copy & paste of the local file in Windows, and by duplicating an existing working certificate file utilizing a cygwin bash, and replacing the file contents. Neither method made a difference)
I then built an Android Virtual Device (AVD) and booted it up.
The command ' adb shell "ls -aZl 9a*" as non-root yields (First result is my cert, 2nd is another cert):
Code:
ls: /etc/security/cacerts/9a5ba575.0: Permission denied
-rw-r--r-- 1 root root u:object_r:system_file:s0 7537 2018-08-03 14:57 /etc/security/cacerts/9ab62355.0
The same command run as root yields:
Code:
-rw-r--r-- 1 root root u:object_r:unlabeled:s0 4246 2022-07-06 10:50 /etc/security/cacerts/9a5ba575.0
-rw-r--r-- 1 root root u:object_r:system_file:s0 7537 2018-08-03 14:57 /etc/security/cacerts/9ab62355.0
This shows my certificate is being loaded properly, but has "permission" issues. As you can tell from the ls -aZL output though, the only difference is the security label.
Thanks for your help!

Easiest way to temporarily get root on Android

Hi
I have a new Android device, it's not any of the ones that have their own forum.
More specifically it runs Android 11 on top of a 4.19.193 Rockchip BSP kernel.
I need to read one or two specific files but these files are only readable by root.
I have ADB shell access.
What I do want to acheive:-
Temporarily have an ability to copy a file that's readable only by root, this could be by some GUI app that copies files, as long as the copy is readable by normal user, running commands as root, copy a partition to an image file, export to a desktop machine and read it there. Any one of these would get me that file.
What I don't want to do:-
I don't want to permanently modify the device, unlock the bootloader, put su into /system or anything like that.
Does anyone know of a rooting app that can give me temporary root access but then doesn't actually change the system?
thanks
To get temporary super-user ( AKA root ) rights on an Android's device shell all you have to do is to find a suitable su binary and copy it onto Android's filesystem.
A: To run Android shell commands with super-user right from within the shell on desktop computer ( AKA Command Prompt ) you have to run within desktop computer shell
Code:
adb devices
adb push <LOCATION-OF-SUITABLE-SU-BINARY-ON-PC-HERE> /data/local/tmp/
what will 1. connect the Android device to your desktop computer and 2. upload the su binary in the Android device temporary directory always available for the user.
B: Then, in desktop computer shell type
Code:
adb shell "cd /data/local/tmp & chmod 776 su"
what makes the su binary executable: its ownership by default is set to shell.
C: Then in desktop computer shell type
Code:
adb shell "ls -l"
what will show you content and permissions on recently uploaded files.
D:
To apply a series of Android shell commands what require super-user rights you now would run
Code:
adb shell
export PATH=/data/local/tmp:$PATH"
su -c "<SHELL-CMD-HERE>"
....
su -c "<SHELL-CMD-HERE">
exit
BTW:
When in an Android shell another process like su gets started then this spawned process runs as a child process means it inherits most of the parent process attributes.
adb push allowed me to send the file
Code:
adb push su /data/local/tmp/
su: 1 file pushed. 1.2 MB/s (11640 bytes in 0.009s)
but the adb shell command is failing
Code:
adb shell "cd /data/local/tmp & chmod 776 su"
chmod: su: No such file or directory
if I then log in over adb I don't seem to have permissions to do anything in data
Code:
adb shell
ls -al
drwxrwx--x 47 system system 4096 2022-09-02 16:31 data
cd data
ls -al
ls: .: Permission denied
additionally, I thought that su would need the suid bit set
Does chmod 766 acheive that?
oh this works
Code:
adb shell
cd /data/local/tmp
ls -al
total 18
drwxrwx--x 2 shell shell 3452 2022-09-02 16:32 .
drwxr-x--x 4 root root 3452 2022-07-27 03:04 ..
-rw-rw-rw- 1 shell shell 11640 2022-09-02 16:29 su
Code:
chmod 776 su
ls -al
total 18
drwxrwx--x 2 shell shell 3452 2022-09-02 16:32 .
drwxr-x--x 4 root root 3452 2022-07-27 03:04 ..
-rwxrwxrw- 1 shell shell 11640 2022-09-02 16:29 su
Code:
adb shell
export PATH=$PATH:/data/local/tmp
su
su: setgid failed: Operation not permitted
The device has separate boot_a, boot_b, dtbo_a, dtbo_b partitions.
If I could be reasonably sure that booting a boot partition from a similar device (I have one) would pick up the dtb from this device then I think I could be reasonably confident of not frying anything, I might try and boot it from fastboot.

[SOLVED] Restore build.prop to default: adb shell doesn't let me write

ROM: LineageOS 18.1, Recovery: LineageOS 18.1 recovery
I messed up and put my build.prop in an invalid state. I got the default build.prop from the rom zip,rebooted the phone to recovery (lineageos 18.1 recovery), mounted the system partition on /mnt/system, and tried to write build.prop to default via adb shell and then cat >/mnt/system/system/build.prop and writing whatever stuff I want. However, even after remounting as rw, I get the following error message:
Code:
cat: xwrite: No space left on device
The same thing happens if I just edit on my PC and do adb push
Code:
$ adb push build.prop /mnt/system/system/build.prop
build.prop: 1 file pushed, 0 skipped. 89.9 MB/s (2662 bytes in 0.000s)
adb: error: failed to copy 'build.prop' to '/mnt/system/system/build.prop': remote write failed: No space left on device
Now what does this even mean?? There is 3.1M free space, as confirmed by df -h. I really searched I cannot find anything on this. Any help would be really appreciated!
---
I can confirm it is mounted as rw by checking this line in /proc/mounts
Code:
/dev/block/dm-0 /mnt/system ext4 rw,seclabel,relatime 0 0
adb remount also fails with
/system/bin/sh: remount: inaccessible or not found
I'm at my wit's end, any guidance here? I feel this should really not be this difficult! I just want to rewrite build.prop from adb/recovery!
---
It might have something to do with overlayfs, as seen here https://android.googlesource.com/platform/system/core/+/master/fs_mgr/README.overlayfs.md. However adb remount merely says /system/bin/sh: remount: inaccessible or not found! How should I get this to work?
---
Finally: maybe I could just try to flash a zip containing only the build.prop via adb sideload? Will adb sideload wipe anything (e.g. system) or just overwrite the files which are present in the zip?
---
Just ended up flashing again. It worked without deleting apps or data

Categories

Resources