Related
Hello,
I'm quite new in android development, so sorry for dumb question.
I have new GT-S6102 (because of dualsim setup) and I'd be quite happy with the stock firmware (S6102XXMA2) if it wasn't of the 160M memory. What I'm trying to do is to modify init.rc in bootimage to mount /data on 4G second partition of my SDCard instead of 160M /dev/stl11.
I'm using a Ubuntu 12.04 machine for my experiments.
I've copied /dev/block/bml7 from my phone using ADB, extracted it using abootimg.
First (and I hope that main) trouble is that when I try to update the boot.img (abootimg -u boot.img -r initrd.img), even without modifying the ramdisk, the resulting image has few different bytes near the beginning of the file. Anyway when I flashed it back to phone, it booted normally.
Then I unpacked the ramdisk (using steps from here) and modified init.rc:
Code:
mount ext4 /dev/block/mmcblk0p2 /data nosuid nodev crypt check=no
# mount rfs /dev/stl11 /data nosuid nodev crypt check=no
I have a 32G uSD card with 28G FAT and 4G EXT4 primary partitions.
Then I've repacked it, made new boot.img, flashed with ODIN and it made a nice bootloop with Samsung bootanimation without usual sound.
What am I doing wrong?
Is this modification even possible?
Thanks for advice
P.S.
I've tried to extract the boot.img from S6102XXMA3_S6102DBTMA1_S6102XXMA2_HOME.tar.md5, but 7zip on Windows and TAR on linux complain that it isn't valid archive.
jelinek.01 said:
Hello,
I'm quite new in android development, so sorry for dumb question.
I have new GT-S6102 (because of dualsim setup) and I'd be quite happy with the stock firmware (S6102XXMA2) if it wasn't of the 160M memory. What I'm trying to do is to modify init.rc in bootimage to mount /data on 4G second partition of my SDCard instead of 160M /dev/stl11.
I'm using a Ubuntu 12.04 machine for my experiments.
I've copied /dev/block/bml7 from my phone using ADB, extracted it using abootimg.
First (and I hope that main) trouble is that when I try to update the boot.img (abootimg -u boot.img -r initrd.img), even without modifying the ramdisk, the resulting image has few different bytes near the beginning of the file. Anyway when I flashed it back to phone, it booted normally.
Then I unpacked the ramdisk (using steps from here) and modified init.rc:
Code:
mount ext4 /dev/block/mmcblk0p2 /data nosuid nodev crypt check=no
# mount rfs /dev/stl11 /data nosuid nodev crypt check=no
I have a 32G uSD card with 28G FAT and 4G EXT4 primary partitions.
Then I've repacked it, made new boot.img, flashed with ODIN and it made a nice bootloop with Samsung bootanimation without usual sound.
What am I doing wrong?
Is this modification even possible?
Thanks for advice
P.S.
I've tried to extract the boot.img from S6102XXMA3_S6102DBTMA1_S6102XXMA2_HOME.tar.md5, but 7zip on Windows and TAR on linux complain that it isn't valid archive.
Click to expand...
Click to collapse
OK, so it seems that I´ve managed to work it out at last.
The unpacking and repacking of bootimage was all right, trouble was in updating only the init.rc and probably using ext4. What I have done:
I replaced all mentions of mounting /dev/stl11 on /data by mounting /dev/block/mmcblk0p2 (that was in files fota.rc, init.rc, init.charge.rc, res/recovery.fstab). In res/recovery.fstab I also changed formatting type from rfs16 to rfs32 so it supports my 4.5G partition.
Then I flashed the bootimg in my phone and formatted the data partition in recovery (that was the only way to make it rfs I've found).
Maybe it would all work with changing the format and mount type to ext4, but I hoped for as little modification as possible.
Now it reports 4.25GB free space after all my apps are installed, hurray .
I have just to remember to never boot it up without SDcard inserted. Maybe it would work as a possibility to borrow the phone to somebody with another card.
The boot.img came from S6102XXMA3_S6102DBTMA1_S6102XXMA2_HOME.tar.md5, if someone wants to try it, it is here . It probably wouldn't touch the original /data partition, so it might be possible to try it and undo it by flashing original boot.img. It just requires to have a second primary partition on SDcard and formatting it in recovery before first boot.
i didnt know to do that boot "compiling" like u did, quite good for you, im using cronmod int2ext , i have 850mb internal. i use 'pimp my rom' to get init.d support.
Hey folks,
I have recently replaced my older Evervolv on the Touchpad with a current Milaq Nightly, and for some reason it doesn't mount the internal SDcard partition (worked fine with Evervolv).
When I 'mount -t vfat /dev/mapper/store-media /sdcard' manually, it works fine and I can see the files in there, so the file system apparently is intact, but Android doesn't seem to recognize it as usable SDcard storage (i.e. no "move to SD" option in the app manager etc). The mount doesn't persist across reboots either, and adding an entry to /fstab.tenderloin is equally pointless.
Any hints on what could it be that prevents my device from automounting this partition?
WooShell said:
Hey folks,
I have recently replaced my older Evervolv on the Touchpad with a current Milaq Nightly, and for some reason it doesn't mount the internal SDcard partition (worked fine with Evervolv).
When I 'mount -t vfat /dev/mapper/store-media /sdcard' manually, it works fine and I can see the files in there, so the file system apparently is intact, but Android doesn't seem to recognize it as usable SDcard storage (i.e. no "move to SD" option in the app manager etc). The mount doesn't persist across reboots either, and adding an entry to /fstab.tenderloin is equally pointless.
Any hints on what could it be that prevents my device from automounting this partition?
Click to expand...
Click to collapse
It's not simply a matter of flashing the newer datamedia builds over an older, probably non-DM build. It requires restructuring the internal storage of the TP. Explicit directions are here. Use the newer version of the tool.
shumash said:
It's not simply a matter of flashing the newer datamedia builds over an older, probably non-DM build. It requires restructuring the internal storage of the TP. Explicit directions are here. Use the newer version of the tool.
Click to expand...
Click to collapse
The Evervolv before already was a datamedia build, and I have adjusted the partition sizes accordingly.
It worked correctly after the EW->Milaq migration about two weeks ago, and broke when I flashed a new Nightly over it last weekend.
(I did the whole cleanup via CWM before flashing the new nightly, just to avoid that question.)
I'm stuck at the Teamwin loading screen with the screen going dark and then back to the Teamwin screen.
Partitions are converted to f2fs. (ev_tenderloin-6.0-testing-2015.11.28 was the last upgrade I had installed and boots fine, but when I went to install a newer build i discovered this problem.)
I have used adb to reinstall twrp (its funny while it wont go past the Teamwin screen I can use adb push to try different recovery's) and get the same issue. If I install any other build (twrp / cwm) it will boot into recovery, but since none of them have f2fs support (unless there is another twrp or cwm build that has it?) it will only see the webOS partition.
tptoolbox v42 wont install android because:
e2fsck: bad magic number in super-block while trying to open /dev/store/cm-cache
/dev/store/cm-cache:
The supperblock could not be read or does not describe a correct ext2
filesystem. If the devoce os va;od amd ot rea;;y cpmtaoms am ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
esfsck -b 8193 <device>
e2fsck -fp detected error on fs on vol cm-cache rc=8
Click to expand...
Click to collapse
So I guess my question boils down to is there anything else I can try to fix this or do I need to just use tailor to reformat Android system, Android cache and Android data then tptoolbox to reinstall?
I went I used tailor to destroy and rebuild my android partitions and reinstalled, so for now at least the issue has been resolved.
Perhaps someone can help. I've read a lot of the great content here but I've hit a wall.
A few weeks ago my ovation device was running cm11+cwm but began random rebooting. Clearing the cache+dalvik only helped briefly.
I tried an upgrade with a twrp 3.0.0.0 (using the amazing multiboot recovery SD), but it hung formatting the cache partition (I waited about an hour). Tried again, same thing.
I used adb shell to fix a blank file system type on the cache partition but was only successful in creating an ext2 partition there. I got cm13 booting but it trebuchet kept crashing. I tried twrp again and flashing a different image and tried a factory reset. Big mistake.
Now when I try to boot any recovery SD it doesn't boot all the way. Using adb shell, my dmesg shows that umount is hanging. No emmc partitions seem to be mounted. The partition data exists in dmesg but calls to parted hang. Mkfs.ext4 also hangs (naturally).
So I've lost the ability to fully boot recovery SDs (they are probably hanging when they try to mount the emmc partitions). As such I can't flash a recovery. I have a clockwork backup that has a system.ext.tar file in it, but I don't know how to use it at this point.
I can't mount /rom so I'm worried.
Is my emmc shot? Is there any way to tell?
Thanks!
Would a noEMMC SD be safe?
I guess what I was hoping to do was use adb to completely wipe and restore the device to a sane state, which would include repartitioning and formatting the emmc partitions. Is that possible? Maybe not at this point.
I guess another question would be: if my NookHd+ emmc is technically working but currently unrecoverable, is it possible for me to safely use a NOemmc SD card? There seem to be some warnings about those wrecking emmc but I can't find any technical explanation as to why.
Based on further diagnostics, my emmc is one of the faulty Samsung models and so I think the crashes and ultimate recovery failures were the failure of the emmc.
I've successfully installed 10.1 noEMMC on one microsd. Runs Okay but a lot of apps I am interested in don't work on android from this vintage.
I tried to install 4.4.4/CM11 noEMMC but it can't mount the necessary partitions as per the install process on the iamafanof Wordpress page. I also see SELinux errors in the twrp recovery log. Does anyone know how to overcome this mount issue that apparently impacts some people.
Assuming there are others out there who find this useful, I have some updates.
I was determined to figure out why the CM11 NoEMMC was not working for me but CM10.2 noEMMC works fine. I get the error that many others get: unable to mount /boot, /data, /system.
I used adb shell to connect to the twrp 2.8.0.0 that runs when you boot the CM11 noEMMC SD boot/install image and compared the Linux system differences between that and the system you can see connected to the cwm 6.0.4.? That runs when you boot the CM10.2 noEMMC SD boot/instal image.
First things first: cm10 noEMMC remaps the internal emmc as /dev/block/emcblk1 and the external microsd card slot as blk0 (this is swapped from the norm and correct for a situation where you want to install to the SD as though it were the internal device).
CM11 noEMMC does not do this. I think that the author assumed that if your emmc is bricked then the system won't see your /dev/block/emmcblk0 at all so your external sdcard will take over that number. Clearly that's true for some, but it's not true for me.
I also began poking around the post boot script (in /sbin) to see how the cm11 noEMMC prepares the partitions on the Sd card and to see what Command it uses to create the data partition
Here's the kicker. I was able to mount my emmc rom partition and copy off all that data with an adb pull. I was able to initialize the cache partition (9) as a blank ext4 partition. I was even able to initialize the user partition (10) as ext4... Though I'm not sure that's right. I began mounting partitions and got greedy and tried to mount the whole partition map and it failed.
So, there's something wrong with (at least) one of my partitions. When recovery tries to mount the partitions, mount hangs and recovery fails to fully load. The noEMMC sd card got me around this because it doesn't try to mount any of the emmc partitions let alone all of them.
So, does anyone know if I can make new file systems on every partition and if by luck I'm able to get a twrp or cwm to fully load, will flashing a stock recovery put data on all those partitions?
Thanks
Sorry to resurrect this thread, But it exactly speaks to my issue. You mention that the blk0 and blk1 devices need to be switched for cm11 image to mount partitions properly. Does anyone know specifically where this might be done. Can files of the existing nov4 cm11 image be altered to reverse these two devices?
CalculonsTalent said:
Assuming there are others out there who find this useful, I have some updates.
I was determined to figure out why the CM11 NoEMMC was not working for me but CM10.2 noEMMC works fine. I get the error that many others get: unable to mount /boot, /data, /system.
I used adb shell to connect to the twrp 2.8.0.0 that runs when you boot the CM11 noEMMC SD boot/install image and compared the Linux system differences between that and the system you can see connected to the cwm 6.0.4.? That runs when you boot the CM10.2 noEMMC SD boot/instal image.
First things first: cm10 noEMMC remaps the internal emmc as /dev/block/emcblk1 and the external microsd card slot as blk0 (this is swapped from the norm and correct for a situation where you want to install to the SD as though it were the internal device).
CM11 noEMMC does not do this. I think that the author assumed that if your emmc is bricked then the system won't see your /dev/block/emmcblk0 at all so your external sdcard will take over that number. Clearly that's true for some, but it's not true for me.
I also began poking around the post boot script (in /sbin) to see how the cm11 noEMMC prepares the partitions on the Sd card and to see what Command it uses to create the data partition
Here's the kicker. I was able to mount my emmc rom partition and copy off all that data with an adb pull. I was able to initialize the cache partition (9) as a blank ext4 partition. I was even able to initialize the user partition (10) as ext4... Though I'm not sure that's right. I began mounting partitions and got greedy and tried to mount the whole partition map and it failed.
So, there's something wrong with (at least) one of my partitions. When recovery tries to mount the partitions, mount hangs and recovery fails to fully load. The noEMMC sd card got me around this because it doesn't try to mount any of the emmc partitions let alone all of them.
So, does anyone know if I can make new file systems on every partition and if by luck I'm able to get a twrp or cwm to fully load, will flashing a stock recovery put data on all those partitions?
Thanks
Click to expand...
Click to collapse
Could you please teach me how to mount EMMC partitions and retrieve data specially /factory partition with ADB?
I can only boot my Nook HD+ with with bootable SD card with TWRP or CWM.
Thanks.
A few years ago, I installed CM 11 (20140804) on my friend's Nook HD. At some point, he told me it stopped working, but we didn't discuss it much until he pulled it out recently. CM would constantly reboot as though it were an initial boot (CM boot logo, "Upgrading Android - Optimizing Apps", Reboot). I've seen similar behavior fixed by resets, so I figured I'd just re-install stock while I was at it.
Not so much.
I threw in an SD which had TWRP (I forget which version offhand) and CM10 installed, and it launched to TWRP, rather than booting. I though it was a little odd, but figured I'd just held the down button while booting accidentally. I tried to install the 9/2018 stock, but it failed saying "E:\ Unknown Command" with some complaint about "no_factory_override". I tried again using CWM 6.0.2.7, but got the same result. Poking around with CWM, I found that neither /data nor /emmc will mount, and attempting to factory reset gives an error when trying to wipe /data (which makes sense, since it isn't mounted).
I pulled up ADB and shelled in, and got the following:
~ # mount data
mount: mounting /dev/block/mmcblk0p10 on /data failed: Invalid argument
~ # mount emmc
mount: mounting /dev/null on /emmc failed: No such device
~ # mount
rootfs on / type rootfs (rw)
tmpfs on /dev type tmpfs (rw,nosuid,relatime,mode=755)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
/dev/block/mmcblk0p9 on /cache type ext4 (rw,nodev,noatime,nodiratime,barrier=1,
data=ordered)
/dev/block/mmcblk0p6 on /bootdata type vfat (rw,nodev,noatime,nodiratime,fmask=0
000,dmask=0000,allow_utime=0022,codepage=cp437,iocharset=iso8859-1,shortname=mix
ed,errors=remount-ro)
/dev/block/mmcblk0p8 on /system type ext4 (rw,nodev,noatime,nodiratime,barrier=1
,data=ordered)
/dev/block/mmcblk1p1 on /sdcard type vfat (rw,nodev,noatime,nodiratime,fmask=000
0,dmask=0000,allow_utime=0022,codepage=cp437,iocharset=iso8859-1,shortname=mixed
,errors=remount-ro)
/dev/block/mmcblk1p1 on /sdcard type vfat (rw,relatime,fmask=0000,dmask=0000,all
ow_utime=0022,codepage=cp437,iocharset=iso8859-1,shortname=mixed,errors=remount-
ro)
Click to expand...
Click to collapse
The relevant lines from fstab are:
/dev/block/mmcblk0p10 /data ext4 rw
/dev/null /emmc datamedia rw
Click to expand...
Click to collapse
So I guess my question is, is the emmc shot? I didn't know this was a thing until I was looking into the issue, and I don't know which emmc this unit has. I don't know what precipitated the original bootloop, since the tablet wasn't in my possession, but I would assume it was caused by the corruption of /data and /emmc.
If anyone has encountered such an issue and fixed it, any help would be appreciated.
antjenkins said:
A few years ago, I installed CM 11 (20140804) on my friend's Nook HD. At some point, he told me it stopped working, but we didn't discuss it much until he pulled it out recently. CM would constantly reboot as though it were an initial boot (CM boot logo, "Upgrading Android - Optimizing Apps", Reboot). I've seen similar behavior fixed by resets, so I figured I'd just re-install stock while I was at it.
Not so much.
I threw in an SD which had TWRP (I forget which version offhand) and CM10 installed, and it launched to TWRP, rather than booting. I though it was a little odd, but figured I'd just held the down button while booting accidentally. I tried to install the 9/2018 stock, but it failed saying "E:\ Unknown Command" with some complaint about "no_factory_override". I tried again using CWM 6.0.2.7, but got the same result. Poking around with CWM, I found that neither /data nor /emmc will mount, and attempting to factory reset gives an error when trying to wipe /data (which makes sense, since it isn't mounted).
I pulled up ADB and shelled in, and got the following:
The relevant lines from fstab are:
So I guess my question is, is the emmc shot? I didn't know this was a thing until I was looking into the issue, and I don't know which emmc this unit has. I don't know what precipitated the original bootloop, since the tablet wasn't in my possession, but I would assume it was caused by the corruption of /data and /emmc.
If anyone has encountered such an issue and fixed it, any help would be appreciated.
Click to expand...
Click to collapse
Nooks can't be bricked. I made a thread about a week ago of going back to stock. Have a look at this. https://forum.xda-developers.com/no...ck-nook-hd-nook-hd-2-2-1-2018-update-t3840163
And if you want to give CM 11 a try again, I made CM 11 for hummingbird. Keep an eye out on the thread, because I will have a new build out shorty. https://forum.xda-developers.com/nook-hd/development/rom-lineageos-11-t3665351
***EDIT***
I didn't read your whole thread, try going into the system... I had the same message on my Nook HD+ (ovation), and I had stock installed without a problem.
secretwolf98 said:
Nooks can't be bricked. I made a thread about a week ago of going back to stock. Have a look at this. https://forum.xda-developers.com/no...ck-nook-hd-nook-hd-2-2-1-2018-update-t3840163
And if you want to give CM 11 a try again, I made CM 11 for hummingbird. Keep an eye out on the thread, because I will have a new build out shorty. https://forum.xda-developers.com/nook-hd/development/rom-lineageos-11-t3665351
***EDIT***
I didn't read your whole thread, try going into the system... I had the same message on my Nook HD+ (ovation), and I had stock installed without a problem.
Click to expand...
Click to collapse
That was the stock build I was trying to install (thanks for providing it, by the way). The main problem seems to be that /data doesn't mount (bad argument probably means the partition is corrupted?). I'll try an e2fsck tomorrow. What recovery are you using to flash that stock?
antjenkins said:
That was the stock build I was trying to install (thanks for providing it, by the way). The main problem seems to be that /data doesn't mount (bad argument probably means the partition is corrupted?). I'll try an e2fsck tomorrow. What recovery are you using to flash that stock?
Click to expand...
Click to collapse
Your welcome. I used @amaces TWRP build. https://notredame.app.box.com/s/26a4bygh9vbaw7jjq08xr5evomvaw5ww/file/316434771307
antjenkins said:
A few years ago, I installed CM 11 (20140804) on my friend's Nook HD. At some point, he told me it stopped working, but we didn't discuss it much until he pulled it out recently. CM would constantly reboot as though it were an initial boot (CM boot logo, "Upgrading Android - Optimizing Apps", Reboot). I've seen similar behavior fixed by resets, so I figured I'd just re-install stock while I was at it.
Not so much.
I threw in an SD which had TWRP (I forget which version offhand) and CM10 installed, and it launched to TWRP, rather than booting. I though it was a little odd, but figured I'd just held the down button while booting accidentally. I tried to install the 9/2018 stock, but it failed saying "E:\ Unknown Command" with some complaint about "no_factory_override". I tried again using CWM 6.0.2.7, but got the same result. Poking around with CWM, I found that neither /data nor /emmc will mount, and attempting to factory reset gives an error when trying to wipe /data (which makes sense, since it isn't mounted).
I pulled up ADB and shelled in, and got the following:
The relevant lines from fstab are:
So I guess my question is, is the emmc shot? I didn't know this was a thing until I was looking into the issue, and I don't know which emmc this unit has. I don't know what precipitated the original bootloop, since the tablet wasn't in my possession, but I would assume it was caused by the corruption of /data and /emmc.
If anyone has encountered such an issue and fixed it, any help would be appreciated.
Click to expand...
Click to collapse
Did you try the CWM recovery/stock in this thread: https://forum.xda-developers.com/showthread.php?t=2062613
Note that there is a different CWM for the stock recovery and another for various changes. This is what I have always used to return the tablet to out-of-the-state.