(solution) how to take CWM / TWRP backup without switching off your phone. - Galaxy Grand Duos i9082 General

Nandroid backups are usually performed in recovery mode. This means you would have to turn off your phone and reboot in recovery mode, which wastes a whole lot of time rebooting and a lot more time offline.
But thanks to Ameer Dawood for creating a awesome tool which backup all your data just like CWM and TWRP without turn off the phone.
This tool, eventhough called "Online Nandroid", does not upload/save backups to any online/cloud services. Online here means that it does backup while phone is live or still running Android.
Online Nandroid backups the below partitions to /sdcard/clockworkmod/backup directory.
•mmcblk0_start (for Acer devices)
•uboot (for MTK based devices)
•boot
•recovery
•wimax (for Samsung devices)
•appslog (for HTC and Sony (Ericsson) devices)
•kernel
•system
•data
•cache
•datadata (for Samsung devices)
•efs (for Samsung devices)
•preload (for Samsung devices)
•.cust_backup (for Huawei devices)
•flexrom (for Acer devices)
•custpack (for Alcatel devices)
•mobile_info (for Alcatel devices)
•boot (for HP Touchpad)
•.android_secure
•sd-ext
The date format used for folder name is the same used by CWM itself and nandroid backups created with Online Nandroid can safely be restored using CWM, TWRP and 4EXT recoveries.
Official List of Supported Devices: http://bit.ly/OnlineNandroid-SupportedDevices
Requirements:
1. Rooted android phone
2. A terminal emulator installed on phone
3. Latest version of Busybox
4. A working CWM, TWRP or 4EXT based recovery installed
5. Some patience
Installation:
1. Download and copy zip file to SD card
2. Reboot into recovery
3. Choose install zip from SD card, select zip and flash
4. Reboot
Usage:
1. Open terminal emulator
2. Type su to obtain root
3. Type onandroid
4. Wait and watch
If you are getting error mkyaffs2image not found in path, try fix tool in attachments.
If you are getting error dedupe not found in path, try dedupe tool in attachments.
If Online Nandroid is failing to find boot and recovery partitions, flash the zip file for your device from below. (part_detect_tool.baffin)
[/LIST]
The behaviour of Online Nandroid can be adjusted by using command line flags, some of which are described in detail below. Each command line flag has its longer counter-part and both forms can be mixed. For a complete list of command line flags and short descriptions, you can type:
Code:
onandroid -h
OR
onandroid --help
Custom Backup Name:
* Example:
Code:
onandroid -c NAME
OR
onandroid --custom NAME
* Please be careful not to include characters not allowed in filenames.
Timezone modifier:
* Example: Use phone timezone for backup file name
Code:
onandroid -p
OR
onandroid --phone
* Example: Use UTC (default) for backup file name
Code:
onandroid -u
OR
onandroid --utc
* Note: UTC is used as default (if no timezone modifier is passed). This is to comply with CWM nandroid backups.
Backup Modes:
* Good old backup mode (default).
* Example:
Code:
onandroid -o
OR
onandroid --old
* Note: This is the most commonly known, default backup format.
* Split backup mode (CWM6+ only).
* Example:
Code:
onandroid -l
OR
onandroid --split
* Note: This is specifically useful if you have partitions which are over 2GB in size. Use this only if you have CWM 6+.
* CWM6 style incremental / dedupe backup mode.
* Example:
Code:
onandroid -i
OR
onandroid --incremental
* Garbage collect. For incremental backups (used for cleanup after deleting incremental backups).
* Example:
Code:
onandroid -gc
OR
onandroid --garbage-collect
* Advanced / Selective backup mode. For backing up only specific partitions.
* Example:
Code:
onandroid -a PARTITIONS
OR
onandroid --advanced PARTITIONS
* Partition letters / names can be found by typing onandroid -ah
* TWRP backup mode.
* Example:
Code:
onandroid -w
OR
onandroid --twrp
* By default, TWRP backup mode creates uncompressed backups. If compressed backups are required, use it like this:
Code:
onandroid -w -ce
OR
onandroid --twrp --compression-enable
* By default, TWRP backup mode generates md5sum. If md5sums are not required, use it like this:
Code:
onandroid -w -md
OR
onandroid --twrp --md5-disable
Replace Older Backups (with same name) - used with custom backup names:
* While using custom backup names, Online Nandroid will not allow an already existing backup name to be specified, by default. Trying this will return an error and halt backup. If you want to replace the older backup with a new backup, by using the same custom backup name, you can specify the below command line flag.
* Example:
Code:
onandroid -c MyBackup -r
OR
onandroid --custom MyBackup --replace
* Note: This will only work with custom backup names. This can be used to update a backup from a previous state, by way of using advanced backup mode in combination with this mode.
source:http://bit.ly/OnlineNandroid
for more info head over to this thread:http://forum.xda-developers.com/showthread.php?t=1620255

amol8356 said:
Installation:
1. Download and copy zip file to SD card
2. Reboot into recovery
3. Choose install zip from SD card, select zip and flash
4. Reboot
]
Click to expand...
Click to collapse
do we need to flash ALL the attatched files?

If you are getting errors then you have to flash their respective zips.
for example:
1) •If you are getting error mkyaffs2image not found in path, try fix tool in attachments.
2) •If you are getting error dedupe not found in path, try dedupe tool in attachments.
3) •If Online Nandroid is failing to find boot and recovery partitions, flash the zip file for your device. (part_detect_tool.baffin)
Sent from my GT-I9082 using XDA Premium 4 mobile app

For this device it would not require fixtool. Rest of the files should be fine.

Related

[Recovery] RA Revamped for Iconia HC&ICS

Note 3.16 and below are for HoneyComb bootloader 3.17 & up are for ICS patched bootloader.
This is built from my forked Amon Ra recovery source.
WARNING UNLESS YOU ARE VERY FAMILIAR AND COMFORTABLE USING COMMANDLINE/TERMINAL DO NOT MESS WITH THE EXT3|EXT4 MENU. MESSING WITH THE PARTITION FORMATS CAN LEAVE YOUR ICONIA IN A STATE THAT IS UNABLE TO BOOT NORMALLY AND REQUIRES FIXING VIA COMMANDLINE. Fix for ignoring this warning is done by running "iconia_repair.sh help" from command line in recovery.
Full source for both Apache licensed recovery and GPL licensed kernel & busybox are here
Recovery Features:
Special features for acer iconia :
Touch enabled UI
Can use usb flash drive or normal sdcard as sdcard to flash roms and to use in nandroid backup/restore.
Automatically runs itsmagic on boot
External sdcard mass storage works on iconia
Automatically backs up usb serial (uuid) and the start of mmcblk0 in nandroid backup.
Will not remove /data/media unless full ext wipe option is selected (off by default)
ADB as root user
USB-MS Toggle :mounts sdcard as mass storage
Backup/Restore:
Nand Backup : Select Items to backup with the [X]
Nand Restore : browse to and select nandroid backup items with [X] to restore
Nand Restore Clockwork : browse to and restore cwm backup
Flash Zip From Sdcard: Update.zip must be in root of sdcard or you can directory browse.
Toggle Signature Verify : Toggle on/off signature checking on flashing zips
Wipe Menu:
Wipe data/factory reset: wipes all (data, cache, android_secure & dalvik if outside of /data)
Wipe cache
Wipe Dalvik cache : Wipes Dalvik cache in all possible locations if moved by apps2sd
Wipe SD:ext : Wipes Apps2sd ext partition
Wipe Battery Stats
Wipe rotate settings
Wipe data only
Wipe system
Wipe sdcard
Wipe .android secure : Wipes froyo+ native .android_secure on sdcard
Toggle full ext wipe: Toggles full or quick wipe of ext partitions
Partition Sdcard:
Partition SD: Partition's sdcard for apps2sd (this formats card so all non backed-up data is lost)
Repair Sd:ext
SD:ext2 to ext3 : coverts apps2sd ext2 partition to ext3
SD:ext3 to ext4 : same as above but ext3 to ext4 (
Mounts:
Gui mounts to avoid typing in terminal to mount system, data, cache, sd-ext (if exists), sdcard
Other:
Fix Permissions
Move recovery log to SD
Key Test : Output keycodes for debugging recovery
Check Battery Lvl
Ext3|4 menu: Formatting and re-formatting of partitions
Developer menu:
Make and flash boot from zImage : This makes a mkboot folder on sdcard and mounts sdcard as mass storage then you copy a zImage and kernel modules into this folder and it will create a new boot like anykernel and flash it.
Install su & superuser: Installs or fixes su & superuser install (removes old if exists)
Install eng (unguarded) su: Installs engineering su that doesn't use superuser (removes old su & superuser if exists)
Reboot to bootloader: reboots to bootloader/hboot
Reboot recovery : reboots phone back into recovery
Trouble Shooting:
Use option under Other menu to move recovery log to sd. Mount your sdcard to pc and read that file called recovery.log which will be on your external sdcard. It should have detailed cause of error if its not self-explainatory upload it here as an attachment and then post details about the error. Posts without the log are a complete waste of my time and will be ignored as there is no usable info to assist me in troubleshooting it. You will also be told to go visit /dev/null.
Special Thanks:
Thanks to :
Amon Ra
Koush
Sc2k for itsmagic and getuid.ko
Gweedo767 & CEnnis91 for the touch ui
Skrilax_CZ for patched ICS bootloader & setbootmode
Download Section:
To flash on HC bootloader(requires root):
run itsmagic then
Code:
adb push recovery-ra-iconia-3.13-gnm.img /sdcard
adb shell
su
dd if=/sdcard/recovery-ra-iconia-3.13-gnm.img of=/dev/block/mmcblk0p1
sync
reboot recovery
To flash on ICS Patched Bootloader:
fastboot flash recovery nameofrecovery.img
V3.17 Recovery flashable zip : recovery-ra-iconia-3.17-gnm.zip
ICS recovery-ra-iconia-3.17-gnm.img
md5sum e74dd63395baed6d00c724024ab2d5cc recovery-ra-iconia-3.17-gnm.img
recovery-ra-iconia-3.16-gnm.img
md5sum 357a7033171585005db89d505b6b7c65 recovery-ra-iconia-3.16-gnm.img
recovery-ra-iconia-3.15-gnm.img
md5sum f40fc8fe8708df75583338d09be33ea0 recovery-ra-iconia-3.15-gnm.img
recovery-ra-iconia-3.14-gnm.img
md5sum d69390b62dd914a440ca2ae90ff95a0a recovery-ra-iconia-3.14-gnm.img
recovery-ra-iconia-3.13-gnm.img
md5sum 292d0a37cc7971baab2b32d6dae0d74c recovery-ra-iconia-3.13-gnm.img
Flashable zip for 3.13 is here http://forum.xda-developers.com/showpost.php?p=21727826&postcount=13
Changelog 3.14 :
Added menu option to wipe flexrom and also included it in the default wipe all
Added option to flash a zip from internal storage
Added warnings on using the ext3|4 menu
Added recovery shell script called iconia_repair.sh for users that ignore the above warning and have corrupted their partitions. To use call "iconia_repair.sh help" from adb shell in recovery.
Changelog 3.15
Fixed wipe boot option on emmc devices
Fixed ext3|ext4 format menu for iconia & updated the iconia_repair.sh script to match (still may error 1st time if users used this option on 3.13 or 3.14 to format use script to repair and it will work properly from there out)
Itsmagic is now built into recovery binary
Sdcard is now unmounted after flashing a zip from it.
Changelog 3.16
Fixed nandroid restore from usb stick
Added ability to nandroid restore a cwm backup from usb stick
Changelog 3.17
Updated for ICS patched bootloader
Removed auto run of itsmagic (still there from cmd line)
Updated Mass storage in recovery to 2.6.39 kernel
Compiled setbootmode into recovery -- call setbootmode from cmd line to use
Default quick wipe and nandroid backup skips /data/linux directory if present -- toggling full ext wipe will still remove and reformat 100% of /data
Note: nandroid backup folder is changed from nvmem=* to your devices serial # so you may need to manually move old RA backups into new folder.
Updated su & superuser.apk to current
Seems cool ill try it out in am.
Sent from my HTC Inspire 4G using Tapatalk
Thanks bro. Just downloaded it. Will give it a try in the am. Off to bed!
Just gave it a quick test. Seemed to work fine (touch controls & backup). Haven't tried a restore yet, which is the true test.
Much thanks! This looks extremely promising.
just curious, being a first time venturing a little bit with my a500, how does one run "itsmagic"? i'm having issues with my windows 7 x64 pc recognizing my tablet running thor's latest ICS build 89 over adb, so would it be possible for somebody to make this as a flashable zip from the recovery i already have installed? or is that crazy... i flash new recoveries all the time for my fascinate or droid 1 in CWMR so I'm just curious. thanks!
Same here ive looked at the old its magic thread from way back and still not sure how to call it.
would some one be able to put together s CWM .zip for us to save alot of the same posts?
C:\Program Files (x86)\Android\android-sdk\platform-tools>adb devices
List of devices attached
0123456789ABCDEF device
C:\Program Files (x86)\Android\android-sdk\platform-tools>adb devices
List of devices attached
0123456789ABCDEF device
C:\Program Files (x86)\Android\android-sdk\platform-tools>adb push recovery-ra-i
conia-3.13-gnm.img /sdcard
1665 KB/s (5001216 bytes in 2.932s)
C:\Program Files (x86)\Android\android-sdk\platform-tools>adb shell
[email protected]:/ # su
su
[email protected]:/ # su
su
[email protected]:/ # dd if=/sdcard/recovery-ra-iconia-3.13-gnm.img of=/dev/block/mmc
blk0p1
a-3.13-gnm.img of=/dev/block/mmcblk0p1 <
/sdcard/recovery-ra-iconia-3.13-gnm.img: cannot open for read: Not a directory
1|[email protected]:/ # sync
sync
[email protected]:/ # sudo
sudo
sh: sudo: not found
127|[email protected]:/ # su
su
[email protected]:/ # exit
exit
[email protected]:/ # ^C
C:\Program Files (x86)\Android\android-sdk\platform-tools>adb shell
[email protected]:/ # su
su
[email protected]:/ # itsmagic
itsmagic
sh: itsmagic: not found
127|[email protected]:/ # ^C
C:\Program Files (x86)\Android\android-sdk\platform-tools>adb devices
List of devices attached
0123456789ABCDEF device
C:\Program Files (x86)\Android\android-sdk\platform-tools>adb push recovery-ra-i
conia-3.13-gnm.img /sdcard
1932 KB/s (5001216 bytes in 2.527s)
C:\Program Files (x86)\Android\android-sdk\platform-tools>adb shell
[email protected]:/ # su
su
[email protected]:/ # dd if=/sdcard/recovery-ra-iconia-3.13-gnm.img of=/dev/block/mmc
blk0p1
a-3.13-gnm.img of=/dev/block/mmcblk0p1 <
/sdcard/recovery-ra-iconia-3.13-gnm.img: cannot open for read: Not a directory
1|[email protected]:/ #
this is what i get. not a directory? Does thor's ICS have something set up differently? I'd love to get a legit recovery up in here. Thanks.
---------- Post added at 11:56 AM ---------- Previous post was at 11:43 AM ----------
just for anyone looking in, joe9002 for example, I followed the steps from here to find out you have to run the second set of command in the terminal on the tablet. much easier with a usb keyboard, i might add. got it installed and running nicely. it ain't pretty, but the touch does work. I guess i was expecting more like TWRP with big icons, but not having to use the way too recessed volume buttons is awesome. thanks guys!!!!!
please provide a flashable zip....lazy kid)
easy install
i have used acer recovery installer
http://forum.xda-developers.com/showthread.php?t=1226191
josinpaul said:
please provide a flashable zip....lazy kid)
Click to expand...
Click to collapse
+1, would someone please do a cwm flashable zip for this ?
Thank a million
Sent from my A500 using Tapatalk
If This is a .img. put on your sd card at the same place as the cwm thors recovery .. Acer Recovery installer should See and Install this.. Or am i missing something..
DO NOT TRY JUST BECAUSE I AM ASKING THIS.. But sounds logical.
I just created and tested a CWM flashable file of this image. There's one in the attachment of this post, or you can download it HERE
erica_renee said:
If This is a .img. put on your sd card at the same place as the cwm thors recovery .. Acer Recovery installer should See and Install this.. Or am i missing something..
DO NOT TRY JUST BECAUSE I AM ASKING THIS.. But sounds logical.
Click to expand...
Click to collapse
NOT logical at all!
You need a script run to install it. See post above!!!!
kjy2010 said:
I just created and tested a CWM flashable file of this image. There's one in the attachment of this post, or you can download it HERE
Click to expand...
Click to collapse
You rock! Thanks a ton, as I don't do ADB since I have too many Android devices in this house, and every time I get one connected to my desktop it breaks the connection of the others.
Now, am I reading correctly that we have to manually run itsmagic with this or does it automatically do it? I think I speak for more than just myself when I say I have no idea how or even when to do this.
Has anyone done a successful recover?
internetpilot said:
You rock! Thanks a ton, as I don't do ADB since I have too many Android devices in this house, and every time I get one connected to my desktop it breaks the connection of the others.
Now, am I reading correctly that we have to manually run itsmagic with this or does it automatically do it? I think I speak for more than just myself when I say I have no idea how or even when to do this.
Has anyone done a successful recover?
Click to expand...
Click to collapse
If I read it correctly, you needed to run It's Magic to install it, then the Recovery ran it on it's own, as there's no way to manually run it's magic from recovery, but that's a moot point as I created the flashable zip to install it
kjy2010 said:
If I read it correctly, you needed to run It's Magic to install it, then the Recovery ran it on it's own, as there's no way to manually run it's magic from recovery, but that's a moot point as I created the flashable zip to install it
Click to expand...
Click to collapse
Oops...see that now in the OP. Thanks. Sorry, the running itsmagic as part of the install process through me for a loop. I know that I've seen Thor's CWM recovery automatically loading it, and I was worried that with this recovery we'd have to do it manually.
Alright. Maybe I'll be the guinea pig and try a restore.
kjy2010 said:
If I read it correctly, you needed to run It's Magic to install it, then the Recovery ran it on it's own, as there's no way to manually run it's magic from recovery, but that's a moot point as I created the flashable zip to install it
Click to expand...
Click to collapse
Yes itsmagic is needed to call the bootloader re-write of partition checksums. Itsmagic is executed in both my recovery and thor's on boot. To call it manually in either recovery which is not needed as its already done you would do either "itsmagic" from adb shell in recovery or from updater-script run_program("/sbin/itsmagic"); or call it in a script in a flashable zip.
internetpilot said:
Alright. Maybe I'll be the guinea pig and try a restore.
Click to expand...
Click to collapse
It works I developed and tested this on my own a500 I just got a few days ago. The beta restore CWM backup option only works for a true sdcard not the usb_drive. The amon ra backup & restore options will work with both usb_drive and sdcard fyi.
drellisdee said:
Yes itsmagic is needed to call the bootloader re-write of partition checksums. Itsmagic is executed in both my recovery and thor's on boot. To call it manually in either recovery which is not needed as its already done you would do either "itsmagic" from adb shell in recovery or from updater-script run_program("/sbin/itsmagic"); or call it in a script in a flashable zip.
It works I developed and tested this on my own a500 I just got a few days ago. The beta restore CWM backup option only works for a true sdcard not the usb_drive. The amon ra backup & restore options will work with both usb_drive and sdcard fyi.
Click to expand...
Click to collapse
Thanks again dell! We needed an alternative to the GPL non-compliant CWM that we had!
Your work is GREATLY appreciated and the touch screen is an added bonus!
Very nice addition to the A500, thanks for the hard work.

[TOOLS][ADB][Windows]Push files to device through ADB*now include deodex tools*

See my previous post before in post#2
This is a simple batch file using ADB..
With this you can use ADB to manage your file or APK , Backup, Push Your File to device, or pull file from device..
ADB Work on Stand by Mode (Home Screen) or in Recovery Mode, just set it up..
Extract ADBTOOLSv1.0.1.zip and you will find :
command.bat : Windows Batch Command
_BACKUP_OUT : folder where your backup process done and made
_FLASHING_OUT:
folder for flashing your :
kernel (place your boot.img here)
recovery (place your recovery.img here),
modem (place your modem.bin here)--only for gt p7300
_MODDING_FILE: Folder where your file were created by PULL process
Folder where file for PUSH process should be here
_BATCH_INSTALL : place your APK here for batch install
tools: ADB.exe and busybox binary
success_APK : A folder created for All apk from _BATCH_INSTALL move here after instalation.
Click to expand...
Click to collapse
Notes:
ADB can access all file from device from CWM Recovery, especially CWMR 5.5.0.4
ALL you need to do is:
From Recovery menu, you need to mount /data and /system for ADB working..
THEN, From Command Prompt set ADB Mode to "recovery".(This Batch File set ADB mode to "Home Screen" by default)
So when you use ADB from Online device ( I mean a stand by device).. you dont need to change ADB Mode..
After you set up, you can use ADB as you like..
Code:
=============================================================================
:::: ADB TOOLS FOR GT P7300 and P7310 by suwandiapr
-----------------------------------------------------------------------------
| [*] Before use read this:
| --make sure you have installed adb drivers for your device
| --enable "USB DEBUGGING"
| from (Menu\Settings\Applications\Development)
| --enable "UNKNOWN SOURCES"
| from (Menu\Settings\Applications)
| --increase screen timeout to 10 minutes
| --connect USB cable to PHONE and then connect to PC
| --MAKE SURE YOU HAVE A ROOTED DEVICE AND BUSYBOX
| --Place the right file in the right folder
| --Some feature like Flashing need more tester..so please be aware
| --If you use adb recovery feature, set ADB Mode to recovery
| mount /data and /system from your device recovery
| --If you use adb from homescreen, set ADB Mode to HomeScreen
| --All you Do is your own Risk, use with carefull
-----------------------------------------------------------------------------
****Turn on the screen and allow superuser permission when asked!****
_____________________________________________________________________________
| Current MODDING FILE: NONE | ADB MODE :HomeScreen | sdcard path: /sdcard/|
=============================================================================
:::: ADB PULL ::::
=============================================================================
0 Pulling file from /data ( see result in _MODDING_FILE)
1 Pulling file from /system partition ( see result in _MODDING_FILE)
2 Pulling file from SDcard ( see result in _MODDING_FILE)
3 Backup recovery ( see result in _BACKUP_OUT)
4 Backup Kernel ( see result in _BACKUP_OUT)
5 Backup modem (for P7300 only-see result in _BACKUP_OUT)
6 Backup /system (tar format-see result in _BACKUP_OUT)
7 Backup /efs (tar and .img format-see result in _BACKUP_OUT)
8 Backup APK from /data/app (tar format-see result in _BACKUP_OUT)
=============================================================================
:::: ADB PUSH ::::
=============================================================================
9 Pushing file to /data ( from _MODDING_FILE to device)
10 Pushing file to /system ( from _MODDING_FILE to device)
11 Flashing recovery ( from _FLASHING_OUT to device)
12 Flashing Kernel ( from _FLASHING_OUT to device)
13 Flashing modem for GT P7300 ( from _FLASHING_OUT to device)
=============================================================================
:::: Setting ::::
=============================================================================
14 Set current working File ( for PUSH and PULL )
15 Install busybox on device (need root)
16 Set ADB mode (if you on recovery mode)
17 Install apk ( from _MODDING_FILE to device)
18 Install batch apk ( from _BATCH_INSTALL to device)
=============================================================================
:::: Reboot Menu ::::
=============================================================================
19 Reboot System
20 Boot Into Recovery
21 Reboot Bootloader
22 Quit
My previous post
inspiration from congox case
when you got a problem with bootlop and you forget make a nandroid backup
only have file from other ROM with flashable.zip and need to push the file from your computer to device
you have a recovery support with mount /system and mount /data (tested on CWM 5.5.0.4 and overcome CWM 5.1.2.6) and you can enter this menu while bootloop happen..
STEP 1 : MANUAL
Connect your device with computer
From device, Go to recovery - mounts and storage - mount /system and mount /data
From your computer go to adb terminal and type this
Code:
adb shell "ls /data/media/"
If you can see list of file from your device sdcard, so you make adb work for your device ..
Place your zip file on your path, says on C://backup.zip and you want to copy the file to /sdcard/download/ and type this code
Code:
adb push backup.zip /data/media/download/.
wait for copying progress done..
After you done with moving file to device sdcard, check content of your sdcard with this code
Code:
adb shell "ls /data/media/download/"
When you found your file from list, you can flash backup.zip from recovery
STEP 2 : WINDOWS BATCH FILE
I made a simple Batch File for windows (sorry i dont have MAC or LINUX distro) , this file will make a folder with name "emergency" in SDCARD and with your files inside that.
Extract the FLASHER.rar somewhere on your Local folder,example: on your " Desktop" Folder
in folder "FLASHER" you will find runme.bat and folder "files"
Rename your file ((flashable.zip files you want to send through ADB) to "backup.zip" and then Put your file into this path /FLASHER/files/myfiles/ (just replace the existing "backup.zip" with files from yours)
Connect your tab with Computer
Reboot into Recovery Menu from your device
From menu Mounts and Storage choose mount /system and /data
From your Computer go To Folder flasher and klik runme.bat
Follow the instruction on window untill copying process done and device reboot to recovery again (copying process will take a minutes depend on your file size)
Now you can flash a emergency ROM from recovery
Window instruction
Code:
-----------------------------------------------------------------------------
ADB EMERGENCY COPYING TOOL for TAB 8,9
created by SUWANDIAPR
-----------------------------------------------------------------------------
[*] This script will:
(1) COPY YOUR FILE FROM COMPUTER TO SDCARD/emergency/*
(2) CHECKING YOUR CONNECTED DEVICE DIRECTORY
[*] Before u begin:
(1) make sure u have installed adb drivers for ur device
(2) make sure u have installed CWM 5.5.0.4 ON YOUR DEVICE
(3) connect USB cable to PHONE and then connect to PC
(4) Rename your Flashable .zip file with "backup.zip"
and place inside "myfiles" folder on your Computer
(5) from Recovery Menu, Choose "Mounts and storage" then
-mount /system and -mount /data
(6) CONNECT YOUR TAB WITH PC WHILE ON RECOVERY MENU
---------------------------------------------------------------
CONFIRM ALL ABOVE
Sorry for my Bad english, if there is somebody want to correct every words i use , im very welcome and will change with the proper words and sentence..
Hope this help someone..
Nice guide, thanks!!
I needed some help with mounting the system using adb through a batch file.
I use this command
adb -d shell mount -o remount rw /system
But the mounting fails (I have a rooted phone )
pleas help me I know this is off topic
2 possible reasons for this command to fail:
- /default.prop (on the phone) contains the following line: "ro.secure=1". Then you need another boot.img (in fact just a modified ramdisk). look for "unpack-bootimg.pl" or "unpackbootimage" you may find a guide how to do this manually (not too easy). A rooted kernel would also do the trick.
you can check your default prob with this command "adb shell cat /default.prop".
- in some cases mount requires more parameters. try "adb shell mount" and look for the line containing "/system". In front of system is the "device-name". in my case the mount command would look like this:
mount -o remount,rw /block/dev/mmcblk0p24 /system
hope this helps and sorry for answering off-topic questions....
nail16 said:
I needed some help with mounting the system using adb through a batch file.
I use this command
adb -d shell mount -o remount rw /system
But the mounting fails (I have a rooted phone )
pleas help me I know this is off topic
Click to expand...
Click to collapse
you can use busybox and call the binary from the shell
i assume that your device in normal mode ( in home screen)..
here some example..
Code:
su
adb push busybox /tmp/.
adb shell "chmod 755 /tmp/busybox"
adb shell "tmp/busybox mount -o remount,rw /system"
after you type "su" superuser will prompt a request, choose "allow".
glitschi667 said:
2 possible reasons for this command to fail:
- /default.prop (on the phone) contains the following line: "ro.secure=1". Then you need another boot.img (in fact just a modified ramdisk). look for "unpack-bootimg.pl" or "unpackbootimage" you may find a guide how to do this manually (not too easy). A rooted kernel would also do the trick.
you can check your default prob with this command "adb shell cat /default.prop".
- in some cases mount requires more parameters. try "adb shell mount" and look for the line containing "/system". In front of system is the "device-name". in my case the mount command would look like this:
mount -o remount,rw /block/dev/mmcblk0p24 /system
hope this helps and sorry for answering off-topic questions....
Click to expand...
Click to collapse
yes you right glistchi, samsung lock adb root on new firmware on my SG- Note..
And make me flash an older firmware for rooting..
new update
Never mind, got it to work
i want to push same file in data system (/data/data) but my tab is not root. can i??
if from cwm recovery, yes you can.. if from stand by mode (home screen) the answer is no... you need root to make it happen..
i got this error
please help

[Guide][NOOB-Friendly] How to share your Nandroid Backup and Modem

As we are having a lot of Jelly Bean leaks lately, a lot of users want to share the Nandroid backup to others but sometimes they make mistakes which ends up in md5 mismatches or some of them don't know how to create a share-able zip.
I have tried to create this guide to enable them in doing so. Hope this will help everyone.
Requirement:
CWM Recovery
7zip, Winrar or any file compressing tool
ADB setup in your PC
Click to expand...
Click to collapse
Once you have applied the OTA and done a factory reset, Follow the process given below:-
If your have ClockworkMod Touch Recovery 6.0.1.2 (Believe me it is easier and better in Touch recovery - Get it from here) follow these:-
In CWM Recovery
Reboot into Recovery => Hold Volume Up + Home + Power buttons together for about 5-7 seconds, release the buttons when you see the recovery menu
Choose -> Backup and Restore
Chooose -> Choose Backup Format (Optional)
Change Backup format to tar (Optional)
Choose -> Create image.zip
This will create an image.zip and an image folder in your Internal Sdcard inside the clockworkmod>backup folder
Copy the image.zip file to your PC, rename it to the software version you are sharing for e.g. GT-I9300-XXXXXXXX. Important do not put spaces in the name.
Upload this zip to whichever Filehosting site you want to share with.
*this image.zip can be flashed in CWM directly without having the need to extract the files inside*
Click to expand...
Click to collapse
If you have ClockworkMod Recovery 5.5 (Get it from here) Follow these:-
In CWM Recovery
Reboot into Recovery => Hold Volume Up + Home + Power buttons together for about 5-7 seconds, release the buttons when you see the recovery menu
Choose -> Backup and Restore
Choose -> Backup (either Internal or External SDcard by default it will backup to ExtSDcar)
Your Backup will now be there inside the clockworkmod>backup folder, Copy this folder to your PC
Zip the Folder and give it a name for e.g. GT-I9300-XXXXXX (Dont use spaces)
Now you can upload this zip to any filehosting service of your choice
Click to expand...
Click to collapse
How to extract the modem:-
For extracting the modem you need to be rooted (If you are not or want to know how go here)
Using ADB (Go here if you want to know how to set up ADB)
Connect your phone to you PC (Please ensure that ADB debugging option is checked in Developer Options)
Type
Code:
adb devices
You will get something like this:
Code:
List of devices attached
XXXXXXXXXXXXXX device
It shows your device is connected via ADB
Type
Code:
adb shell
You will get a output like this:
Code:
C:\adb>adb shell
[email protected]:/ $
Type
Code:
su
You will get:
Code:
su
[email protected]:/ #
(Those who are using Terminal Emulator can start from this step)
Type
Code:
dd if=/dev/block/mmcblk0p7 of=/sdcard/modem.bin bs=4096
You will get
Code:
[email protected]:/ # dd if=/dev/block/mmcblk0p7 of=/sdcard/modem.bin bs=4096
dd if=/dev/block/mmcblk0p7 of=/sdcard/modem.bin bs=4096
8192+0 records in
8192+0 records out
33554432 bytes transferred in 2.892 secs (11602500 bytes/sec)
[email protected]:/ #
Your modem.bin file is copied to the root of your sdcard, copy it to your PC and upload it to the file hosting site of your choice
Click to expand...
Click to collapse
I have tried to write everything to the best of my knowledge. If anyone feels that I have missed something or I have written something wrong please let me know. I will make the changes.
Thanx for this very useful
Sent from my GT-I9300 using Tapatalk 2
anurag549 said:
Thanx for this very useful
Sent from my GT-I9300 using Tapatalk 2
Click to expand...
Click to collapse
will be helpful for many ... nice work buddy
Q: When I dump modem I get a modem.bin and its ~30mb, while shipped modems in stock fw is ~12mb, why is this?
Perka said:
Q: When I dump modem I get a modem.bin and its ~30mb, while shipped modems in stock fw is ~12mb, why is this?
Click to expand...
Click to collapse
Well that escapes me..may be someone knowledgeable can shed some light on it..
Sorry..
Maybe the that provided with the firmware is a patch..I know OTA files are patches but can't say much about full firmwares..
I'm trying to do this using the terminal emulator in Rom toolbox and u keep getting permission denied?
(from what I understood we had two ways of doing this correct? A computer and adb or TE, correct?)
Danielhammons1 said:
I'm trying to do this using the terminal emulator in Rom toolbox and u keep getting permission denied?
(from what I understood we had two ways of doing this correct? A computer and adb or TE, correct?)
Click to expand...
Click to collapse
You have to type su in terminal to gain root access. It's just like a standard Linux terminal.

[Solution] Customize or update the factory image for stock recovery

The stock recovery on the Nook Simple Touch has a routine to restore the device to factory state, wiping everything in the process. It is initiated on the 8th unsuccessful boot (unsuccessful := interrupted before the boot counter could be reset). The image is stored on the "/misc" partition, /dev/block/mmcblk0p3, as /factory.zip. On my device, it's version 1.0.1 (file size: 108460423, MD5 sum: 3ae0d4d9869330dec639a7da9c50fa72). Not very useful. So, how about customizing it? Or at least upgrading it to stock 1.2.1?
When restoring to factory state, the /cache and /data partitions are wiped independently by the stock recovery. As for the files inside the ZIP, there is no difference between the factory image and the OTA (over-the-air) update (nook_*_update.zip). The format of both files is the standard Edify ("updater-script") style. If you have your own script you can put it there for easy restoration. If you don't, you can at least upgrade the factory image there to 1.2.1, the latest version. The example is for the latter case, but all the steps will be the same, except the first one.
Please do not follow these instructions blindly. Instead, read them critically and adjust to your situation, adding extra steps such as backups where necessary. Make sure that you don't mind if everything from your device is erased in the process.
Remove B&N cruft from the ZIP update header
Start with the file nook_1_2_update.zip (get it here from B&N). Make sure you have the right file: size 121323347, MD5 sum: 30822c2927482380c325a47dc060daee. Note that while a well-formed ZIP file starts with the letters "PK" (from the initials of Phil Katz, the original developer of the ZIP format), the B&N ZIP has some proprietary gibberish at the beginning:
Code:
...............'1.2.1.24.carbon1_2.gossamer.rrdp.s70455.......XOLBsPWsxv0saXev7rdGBBrQLzdM74ai2CM4h6oD/D3S9xeKq8eFYW7j0+MgLohN4x/3tyIYaZV6YiLEi7gLXq+7XjvWV4KaTGvNw0wM6x11IPOEzYwmHryagnY91XjkfKTjwKR8XC3SkSRu4TT01DZ6lfqsw6MZO18AFz48GEjXcxKy8SQZyhA++kobYWlcC8jNa/EmkGgVJien7QJ4LvR8N5Bftk11WRTOy6+BSQQgdBh4K/i2WI0TqfpH7JC+6vNp5rb61KTXpZIMLHGyZloYca68mnn4rmr1SKqodpffgSmYI+f7DPt7RgBEkXGz20x+3kKA+OcPbd1QKvIwd+A==.........;=.
First 418 bytes of nook_1_2_update.zip. Unprintable characters replaced with dots.
Unzip and other unpackers will get through this just fine so you might not even notice it but it will prevent the file from working as factory image for the stock recovery, so let's start by getting rid of the cruft. There are at least three options here: (1) use dd(1) (UNIX shell or Windows CLI), (2) use Free Hex Editor (Windows GUI), (3) unzip and repack again. The dd command if you're lucky to have a recent version is:
Code:
dd if=nook_1_2_update.zip of=factory.zip skip=418bytes
- or -
Code:
dd if=nook_1_2_update.zip of=factory.zip iflag=skip_bytes skip=418
Option (3) will break the B&N signature on the ZIP. Theoretically, if the signature is preserved, the file should work as-is as the new factory image as it matches the key stored in the recovery). It didn't work for me but I didn't try too hard because what I want to do is to use a custom image anyway so feel free to check for yourself (skip to the last step).
Otherwise, if you are using the stock update file that you want to sign again, you need to remove the signature that is already there. Supposing your soon-to-be new factory image file is called factory.zip, the way to do it is:
Code:
zip -d -q factory.zip META-INF\CERT.SF META-INF\CERT.RSA META-INF\MANIFEST.MF
Insert your key into stock recovery RAM disk image
For customized factory.zip signed with your own key, we need to tweak the recovery image a bit.
Extract the image from the update ZIP:
Code:
unzip -j nook_1_2_update.zip ramdisk-recovery.img
Replace the file res/keys (see attachment) in the image, using XDA user Renate NST's bootutil.exe tool:
Code:
bootutil /r ramdisk-recovery.img res\keys
You can also leave the old key in place and append the new one, just make sure there is nothing in between them (not even whitespace). And here are the alternative steps to unpack and repack the image using just the standard tools, which might come handy on UNIX:
Unpack:
Code:
dd if=ramdisk-recovery.img bs=64 skip=1 | gzip -cd | cpio -id
Repack:
Code:
find . -not -name ramdisk-recovery.img | cpio -oc | gzip -c9 | mkimage -A arm -O linux -T ramdisk -C gzip -a 0 -e 0 -d - ramdisk-recovery.new.img
Now the image just needs to be installed:
Code:
adb shell mkdir /data/boot
adb shell mount -t vfat /dev/block/mmcblk0p1 /data/boot
adb push ramdisk-recovery.img /data/boot/uRecRam
adb shell umount /data/boot
adb shell rm /data/boot
Sign and install the customized factory image ZIP
Suppose our new factory image is called factory.zip. Then to sign it:
Code:
java -jar signapk.jar [B]-w[/B] testkey.x509.pem testkey.pk8 factory.zip factory.signed.zip
See the attachment below for the necessary files. Note the -w switch, which is particularly important in this case.
Now just for the installation part:
Code:
adb shell mkdir /data/factory
adb shell mount -t ext2 /dev/block/mmcblk0p3 /data/factory
adb push -p factory.signed.zip /data/factory/factory.zip
adb umount /data/factory
adb rm /data/factory
Restore to factory image to check if it works
For an easy alternative to the power button marathon:
Code:
adb shell
echo -n -e "\x08\x00\x00\x00" >/rom/devconf/BootCnt
reboot
Warning: this wipes everything, all your data on the device will be lost.
Bonus: What if you want to use your own key?
The testkey.{pk8,x509.pem} is one of these ubiquitous Android debug keys, used all around. Apparently, it was good enough for B&N as well, as they used a version of it too for their OTAs (see /system/etc/security/otacert.zip). If it's not good enough for you though, and you have your own key, the attached keys file will not work for you; instead, you need to generate the key dump in the right format for yourself using the dumpkey utility also provided in the attachment:
Code:
java -jar dumpkey.jar testkey.x509.pem >>res/keys
Replace the references to testkey with the name of your key throughout the examples. If you're doing this on Windows, remember to convert the line ending to UNIX format (CR+LF to LF), not doing so might make the key not work.
General note: If at any stage you need to debug why a key is rejected, there is a log being saved by the stock recovery under /cache/recovery/log.
Disclaimer: Please do not follow these instructions blindly, but instead adjust them to your situation. This is the minimal set of necessary actions, with any optional steps removed for the clarity of illustration. I don't do it this way myself: personally, I'd make a backup here and there, verify MD5 sums after copying large files, etc. In any case, if something goes wrong, you will have to boot from SD card and restore your device. If everything goes right, you will lose all the data on the device. These instructions are provided on an "as is" basis. I will not provide support if anything doesn't work as expected for you. Anything you decide to do based on the above instructions is your sole responsibility.
dumpkey.jar really helped, thanks for that. Had to make exponent 3 type android key else it gets rejected, if you compiled the class, can you remove that check? Out of thanks for today.
Just a short note:
"bootutil" is now called "imgutil" and can be found in the signature.
There are more options than before, but I forget which ones.

GSI Porting Tools for Android (Auto Script A to A/B wip)

I wanted a way to easily work on GSIs with my phone. These are the fruits of my labor.
Prerequisites:
* Magisk manager > settings > mount namespace mode > global
* Termux
How to dump, edit, and convert your stock OS into a GSI?​
1. Using Termux run the following commands. This assumes you have root.
Code:
su
ls /dev/block/bootdevice/by-name
cd /data/local/tmp
For me system is labeled as system_a, so this is what we're going to use. This name may differ by device so it's always a good idea to check. Next command...
Code:
dd if=/dev/block/bootdevice/by-name/system_a of=/data/local/tmp/system.img
2. About 1-2min after running the previous command you'll have a raw system image in your tmp directory. Now we need to mount it like so...
Code:
mkdir /mnt/a && chmod 0755 /mnt/a
mount -o loop system.img /mnt/a
3. If everything went smoothly your raw image is now mounted at /mnt/a and visible with a root explorer. Not only that, it's also live! So any changes you make while it's mounted will be permanent. Simply make any edits as you see fit using a root explorer, then unmount the image when you're done like this...
Code:
umount /mnt/a
Tip: If you can't unmount due to device or resource busy, back out of /mnt/a or any subfolders with your root explorer. If the files are being accessed then you can't unmount them until you get out.
4. Now that the raw image we dumped into /data/local/tmp has been edited, we need to convert it into a sparse image for flashing. Download arm_img_binaries.zip. Extract the files and copy img2simg to /data/local/tmp and set permissions to 0755. From termux run the following commands...
Code:
./img2simg system.img name-of-gsi.img
cp /name-of-gsi.img /sdcard/name-of-gsi.img
You're done! Now just install it like any other GSI using twrp or fastboot.
To clean up everything simply run...
Code:
rm -rf /data/local/tmp/*
How to edit a GSI that's already in sparse format?​
Again we're going to need our arm_img_binaries. This time copy simg2img to /data/local/tmp & chmod 0755 just like before. Copy your GSI to the same location then run...
Code:
./simg2img name-of-gsi.img system.img
From there, just follow the guide starting at step #2.
Sources & Tools used:
Termux: Clang, build-essential, git, and python for compiling arm versions of the needed binaries with my Moto G7 Play. **(Supports Android 8, 9, & 10)**
android-simg2img repo - https://github.com/anestisb/android-simg2img.git
A to AB Port Script -- wip​
1. Copy both GSIs and tools.tar.gz to the root of your internal storage. Then rename your A only GSI to a.img and your AB GSI to ab.img. I believe a stock dump converted to a sparse image can also be used for this.
2. Download port_gsi.sh.txt and remove .txt from the name. Then place it in /data/local/tmp and set permissions on the file 0755.
3.Run the script and wait. You're moving gigs of data, so it will take several minutes. To do this with Termux, use the following commands.
Code:
su
cd /data/local/tmp
./port_gsi.sh
4. Once the script finishes check the root of your sdcard. Your new GSI will be named new_gsi.img. Install it with fastboot or twrp and cross your fingers.
Notes:
* I recommend that you have at least 12gb of storage available for this process. To get a rough estimate of how much space you actually need, add the size of both GSIs together then multiply by 3. For the images I tested, this comes out to around 10.8gb
* This will put selinux into permissive mode for the duration of the script. Selinux is returned to enforcing at the end of the script.
* The script has been optimized for storage space. It's also self cleaning. The script doesn't remove itself though. port_gsi.sh will be left in /data/local/tmp. You need to remove it manually. This was by design so I wouldn't have to keep copying it every time I want to run the script.
* In theory some small edits to the script would allow it to port AB to A, or a stock dump to an A or AB GSI.
* The arm binaries provided should also work for converting oem or vendor images between sparse and raw. Android 8, 9, & 10 are supported.
* If anyone can improve upon my work, please do! I'm grateful for any suggestions or ideas.
Tips and Tricks
Backup partitions to inactive slots...
Code:
su
dd if=/dev/block/by-name/oem_a of=/dev/block/by-name/oem_b
dd if=/dev/block/by-name/vendor_a of=/dev/block/by-name/vendor_b
dd if=/dev/block/by-name/system_a of=/dev/block/by-name/system_b
dd if=/dev/block/by-name/boot_a of=/dev/block/by-name/boot_b
How to mount and edit inactive partitions...
Code:
su
mkdir /mnt/a && chmod 0755 /mnt/a
mount -o loop /dev/block/by-name/system_b /mnt/a
Navigate to /mnt/a with a root explorer and make any changes you want. The changes will be permanent. To unmount simply back root explorer out of /mnt/a or any subfolders then run...
Code:
umount /mnt/a
This works on system, oem, and vendor partitions.
U r an inspiration. Great job! I think I was merely hours from jus walking into oncoming traffic over the frustration this A & B **** has given me for nearly two months. I probably bricked it 15 or more times EVERY SINGLE DAY trying all sorts of things with fastboot and ramdisk combo attacks. Never did better than achieving root shell thru adbd from PC and recovery. I tried every SuperSU zip I could find to try even to jus give magisk root to accomplish and that didn't work either. I have security updates thru Feb '20 and I have a suspicion it plays a part in this. Everything I've read on it when I'd give up for awhile all date six months or more and nothing y'all were doing then we worked much at all. It would but for very temporary....anyhow this is exactly direction we needed to go to fix this very unfriendly to developing trap they call A/B...This phone scrambled my eggs man. Anytime my phone reboots I have an anxiety attack
kapmino269 said:
Nice , good start .
I sugest to add more tools, like convert to dat and rhe opposite ( img2dat.py - dat2img.py ) and ither stuff .... scripts and make android kitchen tool which works on android , I got this idea 2 weeks ago but no time for me (NOW) .
Which I meant :
Tool u can use it like AIK magisk by @osm0sis , but with more better way , better way means to make it easy for user also us ex :
Script :
1- unpack
2- repack
3- convert
4- compress
5- etc...
User : 1
Script :
1- unpack img .
2- unpack squashfs img .
3- unpack (recovery / boot) img .
.....etc
Like that....
User : 1
Script :
Chose which one ?
1- s.img 2- v.img
If convert :
User : 3
Script :
1- convert img to (dat || dat.br) .
2- convert a img to ab img .
Etc .......
And so on ..... That will be very awesome , hope I can see it by u , if no luck np I will try to write scripts for that later .
Hope that my suggest will help u .
Click to expand...
Click to collapse
I get what you're saying. That's actually an awesome idea. I'll see what I can do!
Great guide, many thanks
Successfully made image of my system.. Located in /dev/block/mapper
Getting an error when trying to mount it though, wonder if you have seen it before?
I've got a Redmi Note 9s with dynamic partitioning
Code:
dd if=/dev/block/mapper/system of=systemmiui.img
4838824+0 records in
4838824+0 records out
2477477888 bytes (2.3 G) copied, 23.800180 s, 99 M/s
mkdir /mnt/miui11 && chmod 0755 /mnt/miui11
mount -o loop systemmiui.img /mnt/miui11
mount: '/dev/block/loop9'->'/mnt/miui11': Block device required
I did however manage to unpack and repack on pc.
... That alone has been a saviour with my device only having a closed sourcd twrp clone
Spaceminer said:
A to AB Port Script -- wip​
1. Copy both GSIs and tools.tar.gz to the root of your internal storage. Then rename your A only GSI to a.img and your AB GSI to ab.img. I believe a stock dump converted to a sparse image can also be used for this.
2. Download port_gsi.sh.txt and remove .txt from the name. Then place it in /data/local/tmp and set permissions on the file 0755.
3.Run the script and wait. You're moving gigs of data, so it will take several minutes. To do this with Termux, use the following commands.
Code:
su
cd /data/local/tmp
./port_gsi.sh
4. Once the script finishes check the root of your sdcard. Your new GSI will be named new_gsi.img. Install it with fastboot or twrp and cross your fingers.
Notes:
* I recommend that you have at least 12gb of storage available for this process. To get a rough estimate of how much space you actually need, add the size of both GSIs together then multiply by 3. For the images I tested, this comes out to around 10.8gb
* This will put selinux into permissive mode for the duration of the script. Selinux is returned to enforcing at the end of the script.
* The script has been optimized for storage space. It's also self cleaning. The script doesn't remove itself though. port_gsi.sh will be left in /data/local/tmp. You need to remove it manually. This was by design so I wouldn't have to keep copying it every time I want to run the script.
* In theory some small edits to the script would allow it to port AB to A, or a stock dump to an A or AB GSI.
* The arm binaries provided should also work for converting oem or vendor images between sparse and raw. Android 8, 9, & 10 are supported.
* If anyone can improve upon my work, please do! I'm grateful for any suggestions or ideas.
Click to expand...
Click to collapse
thank you very much for your work,
so can i use this on a linux computer? and how ti use?
awesome,realy cool,thanx!!!
hello how to do the opposite. from A/B to A-only. I have an AB img and I want to convert it to A-only. Thanks
Spaceminer said:
I wanted a way to easily work on GSIs with my phone. These are the fruits of my labor.
Prerequisites:
* Magisk manager > settings > mount namespace mode > global
* Termux
How to dump, edit, and convert your stock OS into a GSI?​
1. Using Termux run the following commands. This assumes you have root.
Code:
su
ls /dev/block/bootdevice/by-name
cd /data/local/tmp
For me system is labeled as system_a, so this is what we're going to use. This name may differ by device so it's always a good idea to check. Next command...
Code:
dd if=/dev/block/bootdevice/by-name/system_a of=/data/local/tmp/system.img
2. About 1-2min after running the previous command you'll have a raw system image in your tmp directory. Now we need to mount it like so...
Code:
mkdir /mnt/a && chmod 0755 /mnt/a
mount -o loop system.img /mnt/a
3. If everything went smoothly your raw image is now mounted at /mnt/a and visible with a root explorer. Not only that, it's also live! So any changes you make while it's mounted will be permanent. Simply make any edits as you see fit using a root explorer, then unmount the image when you're done like this...
Code:
umount /mnt/a
Tip: If you can't unmount due to device or resource busy, back out of /mnt/a or any subfolders with your root explorer. If the files are being accessed then you can't unmount them until you get out.
4. Now that the raw image we dumped into /data/local/tmp has been edited, we need to convert it into a sparse image for flashing. Download arm_img_binaries.zip. Extract the files and copy img2simg to /data/local/tmp and set permissions to 0755. From termux run the following commands...
Code:
./img2simg system.img name-of-gsi.img
cp /name-of-gsi.img /sdcard/name-of-gsi.img
You're done! Now just install it like any other GSI using twrp or fastboot.
To clean up everything simply run...
Code:
rm -rf /data/local/tmp/*
How to edit a GSI that's already in sparse format?​
Again we're going to need our arm_img_binaries. This time copy simg2img to /data/local/tmp & chmod 0755 just like before. Copy your GSI to the same location then run...
Code:
./simg2img name-of-gsi.img system.img
From there, just follow the guide starting at step #2.
Sources & Tools used:
Termux: Clang, build-essential, git, and python for compiling arm versions of the needed binaries with my Moto G7 Play. **(Supports Android 8, 9, & 10)**
android-simg2img repo - https://github.com/anestisb/android-simg2img.git
Click to expand...
Click to collapse
hello how to do the opposite. from A / B to A-only. I have an AB img and I want to convert it to A-only
i'm trying to mount a gsi image but it says that requires -t option, what should i do?

Categories

Resources