hello everybody,
well as the title says, i've bricked it. i've had TWRP installed (it doesn't boot past the loading screen now) and working with magisk. all good until i decided to be my ol'dumb self and formatted /system before reflashing and even before that, to enable the OEM unlock. so after attempting a reboot to recovery, it just got stuck at TWRP's logo.
then, i booted into fastboot and the phone displayed the Phone unlocked FRP lock screen. so i couldn't flash AOSP 8.1 because of the OEM unlock thing. then i used DC unlocker in an attempt to get around the OEM lock and after rebooting i can't even put the phone in fastboot. it just goes into the TWRP logo and stays there. can't boot into fastboot through adb either.. i tried sticking UPDATE.APP into a folder called dload in my sdcard and pressing vol+&vol- while booting as i read somewhere but no dice..
i did make a backup with TWRP and if i could get write access to /system i could push the files from the backed up /system, which i've tried (adb push system /) but it's read-only.. so wah-wah.. any way of getting write access? i've tried running su in a shell (adb shell) and i get /sbin/sh: su: not found
edit: funny enough, i'm able to push some files into /system (see below)
Code:
D:\Downloads\_LIUGIGB>adb push --sync system /
adb: warning: skipping empty directory 'system\app\Bluetooth\lib\arm64\'
adb: warning: skipping empty directory 'system\app\BuiltInPrintService\lib\arm64\'
adb: warning: skipping empty directory 'system\app\HwIAware\lib\arm64\'
adb: warning: skipping empty directory 'system\app\HwPowerGenieEngine3\lib\arm\'
adb: warning: skipping empty directory 'system\app\HwPowerGenieEngine3\lib\arm64\'
adb: warning: skipping empty directory 'system\app\HwSoundRecorder\lib\arm64\'
adb: warning: skipping empty directory 'system\app\HwVideoEditor\lib\arm\'
adb: warning: skipping empty directory 'system\app\NfcNci_45\lib\arm64\'
adb: warning: skipping empty directory 'system\app\PacProcessor\lib\arm64\'
adb: warning: skipping empty directory 'system\app\PrintSpooler\lib\arm64\'
adb: warning: skipping empty directory 'system\app\SwiftKey\lib\arm64\'
system\: 4950 files pushed. 1040 files s.... 5.5 MB/s (576383367 bytes in 100.358s)
D:\Downloads\_LIUGIGB>adb shell
~ # su
/sbin/sh: su: not found
~ # cd system
/system # ls
app delapp framework
asr emui lib
bin etc lib64
build.prop fake-libs lost+found
cameraplugins fake-libs64
compatibility_matrix.xml fonts
after pushing the files, the phone still won't go into fastboot, when i run adb reboot fastboot, the phone shuts down and if i press power&vol+ or power&vol- the phone does nothing. also plugging the cable while pressing vol- has the same effect: nothing..
edit2: could the fact that my phone is encrypted be an issue too? (this took me here which took me to edit3)
edit3: i formatted userdata through adb shell (/dev/block/platform/hi_mci.0/by-name # make_ext4fs userdata) TWRP and fastboot are back! went into eRecovery and the stock rom is downloading. i hope this solves the issue..
edit4: after downloading & flashing the stock rom my phone is back to life. i'm not sure where i messed up, but i'm sure i did somewhere along the way.. i'll leave this here, maybe someone will find it handy..
You could explain to me how you did it, I have the same problem. please
Related
Hello everyone,
I have a T-Mobile L9 Optimus and I have rooted it according to this guide, it was very helpful
http://forum.xda-developers.com/showthread.php?t=2173465
After removing a bunch of bloatware, I also wanted to remove T-Mobile's Boot and Shutdown animations, which on this phone are located in system/media -> bootanimation.zip and shutdownanimation.zip
I used ADB to pull both files into Windows as a backup
Then, I used ADB to open a shell as su:
adb shell
su
Then I realized I couldn't use the rm command for those zip files because the /system folder is mounted as read-only by default. To change that I used the following commands:
mount -o rw,remount /system
then I used the rm command to remove the two zip files
then I used
mount -o ro,remount /system
to have the folder back in its default read-only state
Then I restarted my phone and voila - no shut-down animation and only a default LG and Android animation on startup
Then I re-started Command prompt to get back to ADB (I still don't know how to exit shell and get back to ADB, help on that?) and here's the problem - I can no longer access root permission in ADB.
When I type in adb root, I get "adbd cannot run as root in production builds"
When I type in adb remount, I get remount failed: Operation not permitted
If I open a shell, I can still enter su, but after the procedures above, ADB thinks that my phone is a production build and I would like to know why, and how I can fix it without returning the original bootanimation.zip and shutdownanimation.zip files.
Is there a background process on T-Mobile phones that goes through a default checklist of system files, then determines that a phone must be a production build if some of those files aren't there? Is there a way to modify that process if it exists? I would rather do that than have to put in a "dummy" bootanimation.zip and shutdownanimation.zip
Lastly, if I were to return those original files through shell, would everything return to normal regarding ADB?
So adb shell and su doesn't work for you now ?
Edit:
I missed a part of your post,
That is a normal behaviour. I don't thing you could adb root before removing animations.
Edit:
If you want to run something from command prompt you have to:
adb shell su -c command_goes_here
How to Backup when Samsung Galaxy S3 not booting -stuck at Samsung text logo?
The phone is not rooted and adb usb debug was never turned on.
1. I can boot in the "Android System Recovery" Mode using "Volume Up"+"Home"+"Power".
2. I don't have ADB USB Debug set up.
* When using ADB it can get the serial number:
Code:
adb devices -l
List of devices attached
881aa70c recovery
* When using ADB pull to get all SDCard (the built-in 16G memory)
Code:
>adb pull /sdcard/ C:\U_adt
pull: building file list...
0 files pulled. 0 files skipped.
It cannot see any file on /sdcard/
* When using ADB to pull the /sys/block/ where is the mmcblk0 which is mounted at boot as /SDCard/ it says skipping speical file
Code:
>adb pull /sys/block/ C:\U_adt
pull: building file list...
skipping special file 'ram0''
skipping special file 'ram15'
skipping special file 'loop0'
skipping special file 'loop7'
skipping special file 'mmcblk0'
skipping special file 'mmcblk0boot1'
skipping special file 'mmcblk0boot0'
0 files pulled. 0 files skipped.
* When using ADB backup it says to confirm on the screen, but the phone can not boot to normal where may be the confirmation, and in "Recovery" there is no confirmation message.
Code:
>adb backup -shared
Now unlock your device and confirm the backup operation.
I want to backup the DCIM/Camera and other personal data.
How can this backup be done?
Thank you,
George
Hi, I'd like to ask a general question (I suppose) about device boot process. I've made some changes in init.rc and I packed again boot.img. Then I flashed it. So, phone shows logo screen. I've changed boot.img again to enable adb by making changes to default.prop.
So, I've packed boot.img and flashed it again. So, phone shows logo screen and I can use adb during boot process, but I don't know how to use adb to get info about android failed boot (adb has not root permissions, though).
What methods could I follow in these cases? Any ideas?
P.S.
My changes at boot.img: I've moved /system, /usrdata and /cache mount commands into an .sh script in ramdisk root directory.
P.P.S.
I've tried also adb pull last_kmsg and I don't see error messages in the little log (~87 kb). When I look at last_kmsg, I see some lines about phone charging (connected to pc), so I think these messages could be related at the moment which phone is connected to pc but turned off (I'm not sure, though) because last_kmsg is related to previous boot process (charging mode with phone turned off?) and the current one (I think). I'd like to read kmsg and not last_kmsg, however, but kmsg can be read only by root (and my current adb has not root permissions, as I said before).
P.P.P.S.
During the boot process, I can pull directories and files from ramdisk root directory (related to boot partition) into my pc by using adb pull command. I've found that 'dev', 'proc' and 'sys' are very well populated of files and sub-directories. Instead, 'data' and 'system' directories are sadly empty. So, I suppose /usrdata and /system related partitions are not mounted at that moment and such thing prevents to load android system.
Solved
I've found a way to get dmesg without using adb shell. It's possible to use busybox dmesg command inside a shell script (placing busybox binary and shell script into ramdisk root directory of boot.img) and run the script by busybox ash command from init.rc, redirecting the output to a logfile. The command inside shell script should look like as the following:
Code:
/busybox dmesg >> /path/to/my/logfile.txt 2>&1
(That way, stderr and stdout will be redirected to a log file, that can be pulled down by adb pull command)
Strange problem - "/sdcard" becoming read-only during file copy - Please help!
Hello all, I am trying to load LineageOS on a Samsung Tab 3 (SM-T217S, aka "lt02ltespr") and I am having a very strange issue that I am really hoping someone can help me with. Specifically, when I'm trying to push the Lineage installer with adb, it starts copying normally, but 20-80MB into the copy it fails out as the /sdcard partition has suddenly become "read-only." If I copy significantly smaller files they copy over without error, but even then immediately after the copy the filesystem is read-only as before.
For reference, here's what I've done:
* I have wiped the stock OS
* I have loaded TWRP v3.1.0-0 on the tablet, but I previously had TWRP 2.7.0 on it and had the exact same problem.
* adb seems to be fully functional, other commands work as normal
* There is plenty of space available in /sdcard/, something like 11GB
* If I push the files to other locations (e.g. /tmp) they copy over just fine. But if I then try to move or copy the files from there to /sdcard the same problem happens
* /sdcard is definitely not read-only before the attempt to copy to it
* Problem occurs with other files as well, so not specific to the Lineage installer
My current attempted process is as follows:
* Boot into "recovery mode", aka TWRP
* Go in to mount and "Disable MTP" to make ADB functional
* Attempt to push Lineage installer (although same problem happens with other files) with the command:
* adb push lineage-14.1-20171221-nightly-lt02ltespr-signed.zip /sdcard/
It starts copying, but after a while the following happens:
adb: error: failed to copy 'lineage-14.1-20171221-nightly-lt02ltespr-signed.zip' to '/sdcard/lineage-14.1-20171221-nightly-lt02ltespr-signed.zip': remote write failed: Read-only file system
lineage-14.1-20171221-nightly-lt02ltespr-signed.zip: 0 files pushed. 6.1 MB/s (36499096 bytes in 5.700s)
Once this happens, i can't fix/change the /sdcard/ partition (even trying to remount it read-write doesn't work), and i need to reboot the phone back into TWRP again to delete the partially written file or make any other changes.
Any help here would be hugely appreciated, thanks!
Well after all that i fixed it. Needed an fsck.
In case anyone else experiences this problem, here was the fix:
# mount
...
/dev/block/mmcblk0p25 on /data type ext4 (rw,seclabel,relatime,data=ordered)
/dev/block/mmcblk0p25 on /sdcard type ext4 (rw,seclabel,relatime,data=ordered)
# umount /data
# umount /sdcard
# e2fsck -pcfv /dev/block/mmcblk0p25
When that finished I rebooted the device, and after that the file copies worked just fine.
I am trying to pull the data partition of my Huawei mate 10 lite to my computer. I used the mount command in TWRP to find its name and then used:
sudo adb pull /dev/block/mmcblk0p59 mmcblk0p59.img
A few minutes after command is run, it gives the error message:
adb: error: cannot write 'mmcblk0p59.img': File too large
The directory where im trying to pull it to has ~500 GB of free space so that's not the issue. Please help.
Seems there is a file size limitation. Try this
Code:
adb exec-out "dd if=/dev/block/mmcblk0p59 bs=4096" > C:\mmcblk0p59.img