[Q] [HELP] How can I creat a .img file and mount script?? - Android Q&A, Help & Troubleshooting

Recent days I'm working on a Mod for Android and I've a lot of files in my mod pack. I want my files to be packed in a EX4 like disk image ".img" file, thats why I can change my files permissions, modify them easly and a SDCARD with fat32 formatted is not supported by Linux permission. So what I want is
1. files and folders to > files.img
2. A mount script that can mount the "files.img" file at boot time.
Then I want the place the "files.img" file in my SDCARD and let mount script to mount at boot time.
Could you tell me plz.. How can I do this and what I've to do for it ??? I'm a Windows user for PC any tool for creat ".img" file.. I'm really in need for this.

Related

Myfolder in Root folder is missing

Hi guys,
I used ES File Explorer to create a folder in Root"/" directory as MyFolder. I copied some video files from sdcard to that folder...
It was kind of slow and hanging... But when i rebooted again, i am not able to find the folder in Root..
Can somebody let me know what is happening...
Cheers!!!!!
You can't create folders in /, do it in /data or /mnt/media

Downgrade CWM 6 to CWM 5

I want to downgrade from CMW 6.x (that comes with KernelPanic) to CWM 5.x, because with CWM 6 you cannot restore a backup. Using CWM 6 the android.secure-backup part is corrupted and therefore all applications on SD are gone.
I tried various methods like x-part, copying files to /system/bin and /system/xbin and one-click-installs using adb, but it will not replace the CWM 6.x. Is that because it's somehow build in with the kernel (in KernelPanic)? Or am I missing something?
Yes, exactly. Because it's built in kernel. In ramdisk to be precise.
u have to flash a kernel that have cwm 5.
this is the only solution
copy the android_secure.vfat.tar part of the backup to your computer .
Use 7z or WinRar to extract the file
You will find a bunch of files with extension .asec
Attach your phone to computer ...
Navigate to .android_secure
copy the asec files to android_secure
Profit !!
karandpr said:
copy the android_secure.vfat.tar part of the backup to your computer .
Use 7z or WinRar to extract the file
You will find a bunch of files with extension .asec
Attach your phone to computer ...
Navigate to .android_secure
copy the asec files to android_secure
Profit !!
Click to expand...
Click to collapse
yes, this is the way of restoring that data manually to sd card.
Thanks for all the answers. I will install the Radeon Kernel, which is quite fast also and has CWM 5 in it.

[Q] Mounting SD Card at boot with init.d

I have a init.d script that involves sdcard activity, but the card is obviously not mounted whilst the script is being executed. So is it possible to write a init.d script that would mount an sdcard at boot time?
Im looking for this solution too.. I believe mount sdcard on init will be a great idea.. because i have apps on sdcard so, it will need to be scan only after it boot to the OS.
Same here... could u get the solution ?
I want my script to copy some file from /sdcard to /data at boot time.

Int2ext help

Hello guyz, i'm trying to install int2ext script on my phone, but without success. I've got a Samsung S4 Clone with J.B 3.1, stock rom and stock recovery. I managed to create an ext2 partition through windows and enable init.d scripts with an googlestore app. Using a script named 05mountsd, the system manages to mount the ext2 partition and i'm able to browse it with root explorer. But when i copy any of the int2ext/int2ext+ scripts in the init.d folder (remember, i dont have cwm recovery to install from zip) the phone boots normaly and 5secs after i see my background, the phone goes back in loading android screen.
I have to delete the 40int2ext script from init.d through adb shell, for the phone to boot up normally again. Then inside the ext2 partition i am able to see that the script has managed to create some files and folders! But i cant install apps in there. Also link2sd app gives a message that the partition cannot be mounted and that i should try fat.
Any ideas how to get int2ext or any other storage script to work?
Bump!!!
I managed to install a cwm recovery that supports my phone's UBIFS format.
Still can't get any script that links apps to sd to work.
When i try to install CronMod_int2ext.zip through recovery i get an error. Also i cant mount or format the sd-ext partition in the recovery, though i tried partitioning the sd inside the recovery as well as from windows. Both attempts fail to mount in recovery.
With Mounts2sd app, i get bootloop problem.
Anyone!?
bump
931 6923243
bump!

Access User Data in Recovery Backup

Hi,
I have a Wiko Lenny 3 phone and need to recover the pictures. The unlock code is lost, the touchscreen doesn't work anymore. My ideas so far:
1. I used the "Backup user data" feature of the stock recovery to a SD card.
Since I cannot upload an image until I have 10 posts, the recovery is like
"
Android Recovery
alps/full_v3702/v3702
6.0/MRA58K/1453981211
user/release-keys
Volume down to move highlight;
enter Volume up key to select.
----------------------------------------
Reboot system now
Reboot to bootloader
Apply update from ADB
Apply update from SD card
Wipe data/factory reset
Wipe cache partition
Backup user data ---> this is what I used
Restore user data
Root integrity check
Mount /system
View recovery logs
Power off
----------------------------------------
SD card free space: 29564MB
User data allocated: 11893MB
backup file: userdata_20190929_172118.backup
Backup user data complete.
"
But how to access the data? Tutorials which I found didn't help (merging the files in Linux, remove 512 Bytes and rename to zip to be able to extract "some" data: it isn't recognized as zip file). Is it possible to restore this user data to a virtual device somehow to access the data?
2. Removing the code: Following a German instruction (I'm not allowed to link it, sorry).
ADB doesn't recognize the device. Probably because USB debugging is turned off and I cannot turn it on without unlocking the device.
I don't do this very often, so my knowledge about ADB and Android is limited.
Does someone have a helping hint? Thank you in advance!
Regards
Martin
Martin_2 said:
Hi,
I have a Wiko Lenny 3 phone and need to recover the pictures. The unlock code is lost, the touchscreen doesn't work anymore. My ideas so far:
1. I used the "Backup user data" feature of the stock recovery to a SD card.
Since I cannot upload an image until I have 10 posts, the recovery is like
"
Android Recovery
alps/full_v3702/v3702
6.0/MRA58K/1453981211
user/release-keys
Volume down to move highlight;
enter Volume up key to select.
----------------------------------------
Reboot system now
Reboot to bootloader
Apply update from ADB
Apply update from SD card
Wipe data/factory reset
Wipe cache partition
Backup user data ---> this is what I used
Restore user data
Root integrity check
Mount /system
View recovery logs
Power off
----------------------------------------
SD card free space: 29564MB
User data allocated: 11893MB
backup file: userdata_20190929_172118.backup
Backup user data complete.
"
But how to access the data? Tutorials which I found didn't help (merging the files in Linux, remove 512 Bytes and rename to zip to be able to extract "some" data: it isn't recognized as zip file). Is it possible to restore this user data to a virtual device somehow to access the data?
2. Removing the code: Following a German instruction (I'm not allowed to link it, sorry).
ADB doesn't recognize the device. Probably because USB debugging is turned off and I cannot turn it on without unlocking the device.
I don't do this very often, so my knowledge about ADB and Android is limited.
Does someone have a helping hint? Thank you in advance!
Regards
Martin
Click to expand...
Click to collapse
Martín only way you could access them pictures is if you had twrp
([emoji3590]09-09-18[emoji3590])
Thanks. Is it possible to flash TWRP without losing data and without access via ADB?
Martin_2 said:
Thanks. Is it possible to flash TWRP without losing data and without access via ADB?
Click to expand...
Click to collapse
If your phone has twrp available and it's a Samsung you can flash it and you won't be able to do a twrp backup without formatting data to have data partition mountable in twrp to flash decrypt zip to do a backup however you don't need to format to be able to mount system partition once system is mounted you can use the twrp file explorer to delete files to delete your screen lock so you can enter the phone
([emoji3590]09-09-18[emoji3590])
PoochyX said:
If your phone has twrp available and it's a Samsung you can flash it and you won't be able to do a twrp backup without formatting data to have data partition mountable in twrp to flash decrypt zip to do a backup however you don't need to format to be able to mount system partition once system is mounted you can use the twrp file explorer to delete files to delete your screen lock so you can enter the phone
([emoji3590]09-09-18[emoji3590])
Click to expand...
Click to collapse
It's a Wiko Lenny 3, no Samsung. Sorry, I don't get it without punctuation.
Do I get it right, that
- If TWRP is available for my phone I can flash it, but I need to format all my data (no option)
- I can flash a "decrypt zip" to do a backup (what is it, where do I get it?)
- I can mount the system partition and can use the TWRP file explorer to delete files (how can I mount it?)
Thanks.
Problem solved, I could access all the data in the backup from the stock recovery!
This is how it worked:
In short: Make a backup of all user files in the stock recovery to a MicroSD card, put it to a Linux desktop, merge the backup files by skipping the first 512 bytes of each file, copy the merged file to Windows, extract it with 7zip.
In long:
1. I put an empty 32GB FAT32 formatted MicroSD card in the MicroSD slot of the Wiko Lenny 3
2. I used "Backup user data" from the Stock Recovery (see my first post). It took a few minutes until ~12GB of user data were written to the card. The stock recovery told me when it was done.
3. I copied all files (6 files, userdata_20190929_172118.backup to userdata_20190929_172118.backup5) to a Linux environment (Linux Mint 19.2)
4. The rest is explained in this video: https://www.youtube.com/watch?v=cY4cKKimEFU. If it is offline, I will explain here.
Do not use something like "cat userdata_yyyymmdd_HHMMSS.backup* > userdata_yyyymmdd_HHMMSS.backup" to merge all files into one because it will add the unnessesary 512 bytes header of all .backup files to the merged file. Instead copy all content except the first 512 bytes to another file and append the content from the other files to it, also by skipping the first 512 bytes.
5. This command will copy the content of the first file "userdata_20190929_172118.backup" to a new file "img.ext4":
Code:
dd if=userdata_20190929_172118.backup skip=512 bs=128k iflag=nocache,skip_bytes oflag=nocache,append conv=notrunc of=img.ext4
6. Repeat using the same command to append the content of all other files to the file "img.ext4" by skipping the first 512 bytes. Be sure to increase the number of the source file extention in the command. Next one therefore is:
Code:
dd if=userdata_20190929_172118.backup1 skip=512 bs=128k iflag=nocache,skip_bytes oflag=nocache,append conv=notrunc of=img.ext4
7. Repeat with all files
8. Copy the file "img.ext4" to a NTFS formatted USB stick or an external hard drive and go on with a Windows environment. The reason is that Linux will prevent opening some important folders
9. Install 7zip
10. Extract the file "img.ext4" with 7zip. If you are searching for pictures, you will find them in the subfolder "\media\0\DCIM\Camera"
Martin_2 said:
Problem solved, I could access all the data in the backup from the stock recovery!
This is how it worked:
In short: Make a backup of all user files in the stock recovery to a MicroSD card, put it to a Linux desktop, merge the backup files by skipping the first 512 bytes of each file, copy the merged file to Windows, extract it with 7zip.
In long:
1. I put an empty 32GB FAT32 formatted MicroSD card in the MicroSD slot of the Wiko Lenny 3
2. I used "Backup user data" from the Stock Recovery (see my first post). It took a few minutes until ~12GB of user data were written to the card. The stock recovery told me when it was done.
3. I copied all files (6 files, userdata_20190929_172118.backup to userdata_20190929_172118.backup5) to a Linux environment (Linux Mint 19.2)
4. The rest is explained in this video:
. If it is offline, I will explain here.
Do not use something like "cat userdata_yyyymmdd_HHMMSS.backup* > userdata_yyyymmdd_HHMMSS.backup" to merge all files into one because it will add the unnessesary 512 bytes header of all .backup files to the merged file. Instead copy all content except the first 512 bytes to another file and append the content from the other files to it, also by skipping the first 512 bytes.
5. This command will copy the content of the first file "userdata_20190929_172118.backup" to a new file "img.ext4":
Code:
dd if=userdata_20190929_172118.backup skip=512 bs=128k iflag=nocache,skip_bytes oflag=nocache,append conv=notrunc of=img.ext4
6. Repeat using the same command to append the content of all other files to the file "img.ext4" by skipping the first 512 bytes. Be sure to increase the number of the source file extention in the command. Next one therefore is:
Code:
dd if=userdata_20190929_172118.backup1 skip=512 bs=128k iflag=nocache,skip_bytes oflag=nocache,append conv=notrunc of=img.ext4
7. Repeat with all files
8. Copy the file "img.ext4" to a NTFS formatted USB stick or an external hard drive and go on with a Windows environment. The reason is that Linux will prevent opening some important folders
9. Install 7zip
10. Extract the file "img.ext4" with 7zip. If you are searching for pictures, you will find them in the subfolder "\media\0\DCIM\Camera"
Click to expand...
Click to collapse
I have the exact same problem with an older 2017 ALCATEL Pixi Unite A466BG. The code is lost and there's some photos we need off of it. I followed these instructions but when I got the img.ext4 file on Windows and tried extracting it with 7zip, I got an error that "ext4" is not an archive file.
I was hoping to see if anyone else had ideas of possibly why 7zip wasn't recognizing it? I had 3 backup files to merge (backup, backup1, backup2).

Categories

Resources