cyanogenmod flash_image boot - Miscellaneous Android Development

Hi
I create an apk.
It execute "erase_image boot".
It failed with "could not estabilish write context for boot".
When the apk do "flash_image boot boot.img", it returned "error writing boot".
This command works in adb.
How to make it works?

Related

E:footer is wrong when sideloading zip on X1032 Cyanogenmod

I stupidly deleted google download manager, and I've converted a apk of Download manager for Android to a flashable zip as a replacement. I put it in sdk platform-tools and opened a command prompt in the directory. I use
Code:
adb sideload blah.zip
and get this in the terminal:
Code:
Total xfer: 0.06x
This on the phone (and a android on it's back):
Code:
Install failed
(blah blah)
E:footer is wrong
E:signature verification failed
Thank you for your help.

Stucked in TWRP

I had LinegeOS installed on my xperia. But don't have root. I wanted to install root addon, but didn't have TWRP because previous time I just temporary boot with
fastboot boot twrp.img
Now I do the same fastboot boot twrp.img
and flash the root addon. I got this error Failed to mount /data invalid argument but also got successful flashed or something like that.
When I press Reboot > System it reboots in TWRP
I tried to flash LineageOS but I get error:
Code:
detected filesystem ext4 for /dev/block/platform/msm_sdcc.1/by-name/system could not detect filesystem for /dev/block/platform/msm_sdcc.1/by-name/userdata, asuming f2fs
mount: failed to mount /dev/block/platform/msm_sdcc.1/by-name/userdata at /date: No such device unmount of /data failed: no such volume
Patching system image unconditionally
Updater process ended with signal: 7
Error installing
Failed to mount /data
Is there a way to fix that without losing data ?
In TWRP file manager I see the system folders
try to boot on the latest twrp by fastboot boot twrp.img then wipe system then try to install the rom again.
copy the twrp.img to the internal memory
After booting download and flash the latest SuperSU then install terminal then type "su" then grant root access, then flash the TWRP on the FOTAKernel PArtition by
dd if=/sdcard/twrp.img of=/dev/block/platform/msm_sdcc.1/by-name/FOTAKernel

Custom recovery development for the k81

Thanks to PizzaG there's now a working build of PitchBlack recovery. Flash it with deadman96385's k81tool
k81-pitch-black-recovery.img
More to come in the near future
Instructions
Download the k81tool and the recovery image
Open a command prompt and change the working directory to the location you saved the tool and recovery image to by issuing this command:
Code:
cd "C:\user directory"
Set up ADB tools in a second command prompt
Enable ADB in the tablets developer options, then issue this command through ADB to boot the device into EDL:
Code:
adb reboot edl
The screen will be black and the LED will be red
Go back to the command prompt that you set to the k81tool directory and issue this command
Code:
k81tool write recovery "C:\user directory"\k81-pitch-black-recovery.img
The output should look like this:
Code:
Sending programmer...Connecting to programmer...log: Binary build date: Mar 26 2016 @ 00:32:43
log: [email protected] [email protected]
log: [email protected] [email protected]
log: Finished sector address 0
log: Finished sector address 0
Writing recovery ...
log: start 491520, num 55508
Write 28420096 bytes, 55508 sectors
Failed: Unknown error
Reset in 5 seconds ...
Reset in 4 seconds ...
Reset in 3 seconds ...
Reset in 2 seconds ...
Reset in 1 seconds ...
Failed: Unknown error
Ignore the "Failed: Unknown error" messages and reboot the device into recovery either by key combination or ADB
Swipe to allow modifications and you should have a working recovery
Download link for what's available. PB and OF built from 7.1, TWRP built from 6.0
https://androidfilehost.com/?w=files&flid=319540

fastboot commands hangings with no output

Hello,
I'm trying to flash a custom a ROM for the first time but I'm facing some issues.
I'm using an Ubuntu 20.04 and my phone is an Asus Max Pro M1.
I can see my device with "adb devices" and I can boot in the bootloader with "adb reboot bootloader".
Then I can see my device with "fastboot devices". But when I'm trying another fastboot command (for example "flash recovery"/"flashing unlock"/"oem unlock") my terminal prompt is just hanging, I don't get any output. And it won't do anything until I restart my phone by pushing the power button, at that time it will just print three lines of logs telling me that the command failed.
Here is an example of what I get :
Bash:
[email protected]:~/Documents/Code/tel$ adb devices
List of devices attached
K3AXB762C86977F device
[email protected]:~/Documents/Code/tel$ adb reboot bootloader
[email protected]:~/Documents/Code/tel$ sudo fastboot oem unlock
...
FAILED (command write failed (Success))
finished. total time: 0.000s
Does anyone have an idea of what is happening ?
IMHO the typical command sequence is
Code:
adb devices
adb reboot fastboot
fastboot devices
fastboot <subcommand>
but I may err, as always ...

Bootloader screen showing "Device is LOCKED" even though I've enabled OEM unlock in Android settings

Hi,
I've a Pixel (sailfish) that I'm trying to load TWRP and Magisk, and I'm unable to flash the recovery image as the bootloader page shows "Device is LOCKED", even though I've already enabled OEM unlock in Developer Settings. How do I unlock the bootloader?
goister said:
Hi,
I've a Pixel (sailfish) that I'm trying to load TWRP and Magisk, and I'm unable to flash the recovery image as the bootloader page shows "Device is LOCKED", even though I've already enabled OEM unlock in Developer Settings. How do I unlock the bootloader?
Click to expand...
Click to collapse
Enabling the OEM Unlock option is the first step but it doesn't unlock the phone. It merely enables unlocking the phone. You have to use a specific adb command to unlock the phone. Since the command varies with models and I am not familiar with your phone, please search for the correct command on Google.
Thanks. I'm following this page - https://www.xda-developers.com/how-to-install-twrp/
I managed to unlock it with fastboot, but I can't seem to flash the recovery. I downloaded the TWRP image from https://dl.twrp.me/sailfish/twrp-3.7.0_9-0-sailfish.img.html and renamed it to twrp.img. I then performed the following steps as per the instructions from xda above:
booted to bootloader with adb reboot bootloader
Temporarily booted to TWRP with fastboot boot twrp.img
Copied TWRP image file to device with adb push twrp.img /sdcard
Go to Advanced->Install Recovery Ramdisk, select twrp.img and swipe to install
I get the following error
Updating partition details...
Failed to mount '/system_root' (Invalid argument)
Failed to mount '/vendor' (Invalid argument)
...done
Unpacking Boot...
Backing up Boot...
Unpacking /sdcard/twrp.img...
Repacking Boot...
/sbin/magiskboot decompress /tmp/repakorig/ramdisk.cpio /tmp/repackorig/ramdisk-1.cpio process ended with ERROR: 1
Error repacking image.
I tried to mount vendor partition, wipe and format the device and retry step 4 and made it a bit further (no more failed to mount '/system_root' and '/vendor' errors, as below, but still fails.
Updating partition details...
Failed to mount '/vendor' (Invalid argument)
...done
Unpacking Boot...
Backing up Boot...
Unpacking /sdcard/twrp.img...
Repacking Boot... /sbin/magiskboot decompress /tmp/repakorig/ramdisk.cpio /tmp/repackorig/ramdisk-1.cpio process ended with ERROR: 1 Error repacking image.
Any suggestions?
goister said:
Go to Advanced->Install Recovery Ramdisk, select twrp.img and swipe to install
Click to expand...
Click to collapse
You can download both the .img and the .zip files. After booting using the .img file, instead of step 4 above, you can try Install from the booted TWRP and navigate to where the .zip file is and simply install it. That is what the TWRP page for Pixel recommends:
fastboot boot path/to/twrp.img
This will temporarily boot TWRP on your device. If you are using a lockscreen pin/pattern/password and do not get prompted to enter your passord, reboot to the bootloader and try again. Go to install and browse to the zip and install the zip. The zip will install TWRP to both boot slots. Installing TWRP at this time will remove root if you are currently rooted.
Click to expand...
Click to collapse
Damn...why did the xda instructions say otherwise?
OK so I managed to reflash to stock image again after the boot loop, and then I followed the TWRP instructions. I was prompted to enter the device password when booting up to TWRP temporarily, and was able to get to TWRP once I entered my device PIN.
After I installed the zip file, I get the following screen:
Installing zip file '/sdcard/twrp.zip'
Updating partition details...
...done
Attempting to decrypt FBE for user 0...
User 0 Decrypted successfully
Data successfully decrypted
Updating partition details...
...done
Full SELinux support is present.
MTP Enabled
Failed to mount '/system root' (Invalid argument)
Failed to mount '/vendor' (Invalid argument)
Failed to mount '/system root' (Invalid argument)
Failed to mount '/system root' (Invalid argument)
Failed to mount '/system root' (Invalid argument)
Installing zip file '/sdcard/twrp.img'
Unmounting system...
########################################
# TWRP Installer for A/B devices #
########################################
Unpacking the installer...
Running image patcher on boot_a...
Running image patcher on boot_b...
Image patching complete!
Done installing TWRP!
*** NOTE: You are now unrooted! ***
Updating partition details...
Failed to mount '/system root' (Invalid argument)
Failed to mount '/vendor' (Invalid argument)
...done
After this, it reboots to Android fine, but whenever I try to reboot to recovery, it goes to the white screen with the Google logo, then reboots to Android.
I'm using the latest TWRP for sailfish - twrp-installer-3.7.0_9-0-sailfish.zip.
Any ideas why?

Categories

Resources