XT1900-7 no permissions in TWRP - Moto X4 Questions & Answers

Greetings.
could not really find anything within this forum that would describe my problem adequately, so I will just ask here, hoping someone had the same.
I recently received this device (XT1900-7), successfully unlocked bootloader and went on to boot and install TWRP.
Booting it temporarily is childs play, but doing anything else within TWRP seems to be pointless. Flashing the TWRP installer results in a bootloop when trying to access TWRP.
To flash LineageOS 16.0 a persistent installation of TWRP is not required (right?) so I really do not care that much about it failing to install properly, I will be just fine with flashing LineageOS from the temporary TWRP.
Here comes the trouble though. I have not yet tried to wipe anything, as I suspect it of not working properly in my case.
Trying to run a backup, something I always prefer to do before wiping and flashing anything, is not possible due to permissions error - it fails to create the TWRP folder. I am also unable to push anything via adb to /sdcard and the contents of /sdcard are rather confusing. There are folders whose names contain random numbers and letters. Checking inside these folders shows that they seem to have an unlimited amount of subfolders.
Opening a terminal in TWRP (as well as adb shell) throws linker warnings (/system/etc/ld.config.txt seems to be missing for /sbin/toolbox) about it being unable to read said file. It does so with every command I submit to the shell.
When I unmount /data I am able to push to the device (though still not to /sdcard - again missing permissions).
Also when switching to slot B it gives me "Error changing bootloader boot slot to B" with "Failed to mount /vendor (invalid argument)".
Relevant data:
I have not done a firmware update, it is still running on Android 7.1.1 and I do not intend to do an update since the stock rom is to be replaced by LineageOS anyways.
As mentionend: XT1900-7, 64GB mmc, 4GB DRAM and so on...
I am able to push files to /tmp for example which allows me to flash the twrp-installer.
Edit: TWRP version is the latest available (3.3.1-0)
Is there anyone who had similar issues and might provide help?
No need to ELI5, I'm at least experienced in Linux, not that much in Android. Previous phone was a G4 Play which was pretty straightforward (unlock, fastboot flash recovery and flash away whatever I felt like).
If you need any more information I will be happy to provide it.
Thanks in advance to anybody that can give me a hint or clue to solve this.

Well. Nvm. It works flawlessly with twrp-3.2.1-1. Seems to be something with latest version. Thx anyways

Related

Bootloop after CM install. Won't restore backup, mount /data, flash stock

Hi developers. I am sorry for posting this. I spent the last week trying to solve it by myself with no hope. This is my second time installing something on a phone, but it is my only phone, so I beg anyone for a help...
-What I did:
Some days ago I downgraded to this ROM C5503_10.1.1.A.1.310_GLOBAL-LTE.ftf to use DoomLord rooting script. I did it with flashtool for linux and I applied his .bat step by step in the terminal since windows would not detect my phone.
It worked. I had root for some days, but I was still annoyed by sony default android. So I decided to install Cyanogenmod.
I unlocked the device with sony official system and wen't straight to this instructions, before the first reboot
wiki.cyanogenmod.org/w/Install_CM_for_yuga
I booted succesfully in CWM, followed everything as it says there. But that's where weird things happened:
-The problems:
-The backup
I tried, it wouldn't mount /sdcard. Since I don't understand much about this, I thought it was normal. The next choice was sdcard1, I backed up there. Or so I thought...
-The factory reset
I factory reset, again, not mounting sdcard. Here is the message that shows when I try this now:
can't mount /data!
Error mounting /sdcard.android_secure
Skipping format...
Data wipe complete.
Since it said it is complete, I went on installing the zip file from my sdcard1. Both CM 10.2.1 (dogo, the right one for my phone) and the appropriate GAPPS.
Now it loops on the CM loop animation and I have to remove the battery...
-The restore problem
It still boots on the recovery mode. So I tried recovering my backup from sdcard1. But the image name is 1970.01.01.00.03.16. And it says "md5 mismatch"
I tried flashing again the stock rom with flashtool. The proccess goes on but nothing happens. I still have CWM and the boot loop.
I read elsewhere someone with a similar problem who solved using sony "emma" software. I installed it, it won't even recocnize my phone.
It recocnizes that there is a phone, but don't know which one.
But that has alway been the case with windows. I haven't been able to do anything in windows other then accessing the sdcard (when the phone worked).
Is there something I can do? I imagine that somehow, for some reason, the /data and /sdcard partitions got corrupted. I imagine I would need to repartition this and install again, but I have no idea how this happens on phones...
I can mount /system /cache and /storage/sdcard1. just /data I can´t. Says "error mounting /data"
This is my only phone and a vey recent $400 thing. I was very stupid to do that withouth a replacement and really need this phone. I greatly appreciate any help...
I found this post forum.cyanogenmod.com/topic/6433-solved-messed-up-partitions-on-internal-storage/ searching the internet. Is it possible that this would solve my problem? or would it finish bricking the phone?
Here's what you'll need:
Working recovery, basic knowledge of adb & the shell
Parted (download here)
stock PB31IMG.zip
Note also that I had run unrevoked forever (so my phone was S-OFF) ... I'm not sure if that's required or not.
So, grab parted from the link above. Now you need to extract the individual binaries from the .zip (the 6 files in the sdparted folder within the zip), ideally to your android-sdk\tools directory. Now push all 6 files (adb push [file] /sbin/). Next, we need to make them useable, so go into the shell (adb shell). Change to your /sbin/ directory, and run: chmod 0755 <file> on each of the 6 files.
Now, we need to fix the partitions. This is assuming that the partitions are there, just the wrong format (which is what happened to me .. I accidentally made them FAT32 instead of ext). So, run the following: parted /dev/block/mmcblk0 mkfs ext2. It will ask if you want to continue, hit yes. When it asks for the partition number, enter 1. Next, when it asks for the format, enter ext2. Let it do its thing. Now, once it's done, run parted again. This time, enter partition 2 (everything else is the same).
Click to expand...
Click to collapse

Wipe & Flashing has no effect

Hi,
I have a problem with my Moto G 2014 XT1068 which is described in topic: forums.androidcentral.com/moto-g-2013/391289-something-seriously-wrong-my-moto-g.html#post3668518
I can't do these steps, because dialog window shows up all the time, and i cant go further.
I have disabled usb debugging option and can't disable ART runtime.
First of all "Factory" in bootloader doesn't work. Wipe and factory reset via stock recovery has no effect; old android remains, the same using TWRP:
"E:Unable to open 'cache/recovery/.version' but ends successfully
and PHilz.
I've tried to flash many roms using many recoveries( TWRP - few versions up to 2.8.5 because 2.8.6 has display flickering bug, few Philz, and few others that also flicker) and fastboot and msfastboot(both on linux).
When i flash via fastboot or mfastboot using xml.zip roms everything looks ok, there are no errors, but flashing has no effect - I have still old ROM with old issue.
When i flash via different recoveries always some errors appears. For example flashing latest CM 12.1 nightly
via TWRP i get:
"E:Error executing updater binary in zip '/sideload/package.zip'
or via stock recovery (ADB sideload) get:
"(...)
Verifying update package...
E:Failed to verify whole-file signature
E:signature verification failed
Installation aborted."
Partition erase in fastboot despite "OKAY" message in CLI has no effect. As i understand this should remove all files from partitions.
This problem showed up when i discharged battery to 0% and turned on the phone.
Have you any ideas what should i try more?
Thanks in advance.
Hi,
I've tried other things to back my phone to life, like turn on usb debugging or even delete files, all via adb shell in recovery, but it is impossible. In TWRP or PhilzTouch I remount partitions with rw privileges, it look like I'm able modifying files via vi and cat to check results but when remount one more time old files still exist, so it is like there is some buffer? (maybe some security lock?), when try rm -rf files it shows up that i can't delete because it read only... (but mount says rw). After remount partitions with rw privileges wipe /data in twrp ended successfully but has no effect.
Do you know why everything looks ok, but it is not? Of course android boots up but is useless and after few minutes phone turns off.
i have the exact same problem with xt1064 that shuts off after bootanimation, all flashing and wiping look ok, but stuck in same result.
i read in some threads it's due to corrupt partitions and there's no solution yet to this problem, i hope this is not true, please share if you make any progress, i will do the same. best of luck.
Sounds like you both have a failed eMMC. If that is the case, and I'm certain it is, there is nothing that can be done to "save" or "restore" your devices.
Sent from my XT1031
hi, maybe any1 has already found a solution?
dihcar said:
i have the exact same problem with xt1064 that shuts off after bootanimation, all flashing and wiping look ok, but stuck in same result.
i read in some threads it's due to corrupt partitions and there's no solution yet to this problem, i hope this is not true, please share if you make any progress, i will do the same. best of luck.
Click to expand...
Click to collapse
I have exactly the same issue with my XT1063. Reading a lot for a solution, traying all without success.
Hopping someone can help us!

Help with unify userdata

Hi. Can somebody tell me exactly what steps I need to do to unify userdata? I don't see any clear instructions anywhere.
I tried to adb push the unify_userdata zip to /sdcard on my Xperia T. But when I tried to install the zip from the TWRP menu it exited with "Error: 7". I then tried to wipe the data on "Internal Storage" and "Legacy SDCard", copied the zip to the Legacy SDCard and tried to install that. That looked to be working, but I think I saw an error message go by and now my Internal Storage is still 1974MB and Legacy SDCard is 0MB. So I'm guessing the process did not work.
So, what do I do now? Any help would be much appreciated. Thanks.
In the end I installed LineageOS (14.1) anyway hoping that it would partition and mount whatever it needed anyway. It did, and everything installed correctly. If anyone else gets into this situation, then check the output of fdisk. Reboot into recovery (TWRP for me) and allow modifications when that screen pops up (not read-only, basically). Then you can run the commands:
Code:
adb shell
fdisk -l /dev/block/mmcblk0
Check that the data partition is ~14 Gb. (You can run the "mount" command to check which partition corresponds to what mount point.) If it is, then you can probably install LineageOS and it will work fine. Even if something fails, you can go back to recovery and wipe and retry the process.
But note that I believe you MUST unify user data. If you don't, LineageOS will install fine but there will be a bug whereby the storage will not be reported correctly. In Settings -> Storage you will see something like 13 Gb in use out of 14 Gb when it should be much lower than this. Reinstalling LineageOS will not fix this. You need to run the unify user data zip that is linked to in the LineageOS mint wiki and then install LineageOS.

Advanced advice for internal storage recovery after attempted flash to LineageOS 17

Hi everyone. Got a puzzle for you forensic data recovery guys out there. I am a fool having a bad day today. For the first time in 10 years of screwing with Android, I backed up my ROM with twrp and also backed up my sms and calls, but then managed to somehow forget to copy those files off the internal storage before trying to flash my phone to LineageOS and botching the internal storage. Here is what happened.
0) Before state: Rooted (I think) and for sure running OxygenOS 5.0.3, flashed via TWRP. TWRP version 3.2.1-0. 128 GB OnePlus 3T
1) Backed up System, data, etc to backup on internal storage via TWRP. Booted into OS and backed up SMS and calls to .xml file.
2) Wiped data, system, cache and dalvik/art cache.
3) Downloaded LineageOS w/ microG via zip in TWRP and attempted to install. Received error that I needed to update the modem to at least 9.0.3.
4) Mounted storage from TWRP and copied in Stable9.0.3+Firmware+Modem_OnePlus+3T.zip. Ran the install and was successful.
5) Installed lineage-17.1-20200826-microG-oneplus3.zip via TWRP. Left prompt to install TWRP checked and booted into OS.
6) Upon boot, saw the message: "Decryption unsuccessful" The password that you entered is correct but unfortunately your data is corrupt.
7) Rebooted back into TWRP to mount storage. Could not get anything to mount because it would not accept my decrypt passcode.
8) Figured TWRP bug, flashed twrp-3.4.0-0-oneplus3.img via fastboot. Could decrypt now with passcode but all storage read 0MB
9) Flashed modem back to OnePlus3T_5.0.3-25-05-18-FIRMWARE-flashable.zip via adb sideload method which is what I assume I was running before since that was the OS version. Rebooted
10) Booted back into TWRP, discovered I still couldn't see files. Downgraded TWRP back to 3.2.1-0 via fastboot.
11) Unable to decrypt from TWRP or even install zips. No change at any point in the OS. Flashed TWRP back to 3.4.0.0.
12) Ran adb shell twrp decrypt XXXXXX (where XXXXXX is my pin) which gave me this message:
Attempting to decrypt data partition or user data via command line.
(then it returned to shell so I assume it worked)
13) Ran an ADB pull command (adb pull /dev/block/dm-0 backup.img). There is obviously something there because it downloaded 111 GB worth of .img file (which I'm 99% certain was the amount of space I had used on the phone). Tried to open the .img file with multiple EXT4 programs and they all said the file/partition was corrupt.
14) Tried to wipe data via TWRP. Failed to wipe because it couldn't be mounted. Followed this:
https://************/how-to-fix-twrp-unable-to-mount-storage-internal-storage-0mb/
15) Ended up with MTP mount of 101 GB free space. Everything seems to be lost on the phone at present. No programs I use to recover the data off the MTP mount (just doing a raw file scrape) can see it as a OnePlus in Windows.
After finding a better guide on XDA, it sounds like this is a known issue that happens when you go from 5.0.x to 9.x on this phone where your encryption breaks and you lose all files. Unfortunately I saw that about 15 minutes after step 14...
My next thoughts would be to:
a) downgrade everything (ROM, firmware, etc) and then try to push the 111 GB .img file back to the phone via ADB, then flash a stock OnePlus 5.0.3 ROM over it to see if I could get the internal storage to mount again. Don't even need to boot into the OS--just to get the internal storage mounted again through TWRP.
--OR--
b) convert the .img file to a .raw and then possibly a .vhd and use Recuva or something to scan the image of the phone and see if I can find those .xml files and maybe a twrp backup if I'm lucky. Although if the entire .img contents is still encrypted and not actually just a corrupt android filesystem, I think I am hosed on this option.
I would prefer option a) but I didn't know if anyone had any insight on this. I thought maybe there would be a way for me to get into the filesystem via ADB maybe and clear out some botched encryption cache or keystore/etc in order to get it to mount again. I'm also not sure if you're able to downgrade the firmware or modem either from 9 to 5 (even though I never got errors on downgrade). Thoughts? Am I just royally hosed?
Tried option b. Nothing but garbage. I made a backup of the .img file this time... so still would be willing to try option a) unless anyone thinks that this is impossible.
Edit: yep... may be too late... https://forum.xda-developers.com/on...-9-0-3-5-0-8-firmware-barrier-t3941164/page18
To my knowledge the data partitions content is unrecoverable lost after the reboot from 5) to 6). The img contains the messed up (and still encrypted) dm0 container but without the enctyption footer which is "outside" the dm0 container in sda15 (aka userdata) partition. To decrypt the img you are missing the device dependent key (an encrypzed partition can be decrypted only on the device the enctyption has been done on) as well as the encryption footer (which is messed up after the reboot).
Format data (not only wipe!) and start over.
Thanks for the reply. That makes sense and is what I was afraid of.
I wonder if it would be possible to regenerate the crypto footer by doing something like this to get the HMAC keys and then flashing a rom to recreate the cryptofooter and then editing the key values to reflect the old cryptofooter values based on the KeyMaster extraction via this exploit.
http://bits-please.blogspot.com/2016/06/extracting-qualcomms-keymaster-keys.html?m=1
It might depend on how much of the cryptofooter is left and whether or not 5.0.3 is vulnerable to these CVEs...
I’m not sure if I know enough about the KeyMaster structure to know how to rebuild it even if I were able to retrieve the HMAC keys.
I also know TWRP now supports EDL so perhaps there is something with a Qualcomm tool I could yse to assist.
Obviously this would mean security issues for everyone on these older builds if I am able to regenerate the crypto footer.
Are you aware of adb commands or likewise that I could run to survey the KeyMaster damage?
As stated: to my knowledge the data is lost after the first reboot with the 9.0.x bootloader.
If you search the official los thread (don't remember if 17 or 16) you'll find some detaled postings on restoring the keys after updating the bl from 5.0.x to 9.0.x. The user, who has examined that has failed, but perhaps it helps to shine some light on your questions.

Pixel 5 Recovery questions

I recently bought an unlocked Pixel 5 from Amazon, only to discover it is (apparently) a VZW that was carrier unlocked, and so the OEM Unlock is not available. I am slowly making my peace with that fact, but am curious how much leeway I have to get at lease *some* more control.
When I boot into stock recovery, I have the option to mount /system. I am hoping this means I can pull, edit, and then push the build.prop and possibly other files as well. Perhaps also push the superuser binary. However, I am unable to detect my phone when I mount /system.
My system specs:
Windows 10 Pro
Version 21H2
OS Build 19044.2728
I have installed the latest drivers from Google.
I am able to detect and interact with my device in both ADB and Fastboot.
I was hoping being able to mount /system in the recovery menu meant I could use ADB shell and browse around the /system folder and tweak a few things. However, my computer behaves as though NOTHING is attached when I go into recovery. No "drivers not found" messages, no mysterious unidentified anything showing up in device manager.
Can anyone give me guidance as to how to get this working? Or am I not understanding how this is supposed to work?
Pixels do not have a recovery partition.; recovery lives in /boot alongside ramdisk and system kernel. Recovery is largely unnecessary from a modding perspective because of the ease of which we can directly flash device partitions.
Ok, but I can boot into stock recovery via "adb reboot recovery". From there I have the option to "Mount /system". I am hoping to be able to do that, then use adb to pull and then alter the build.prop file.
I can not flash device partitions because I cannot unlock the bootloader (I apparently have a Verizon phone.)

Categories

Resources