[Q] (MiRaGe-KANG build dual boot) How do I set the emmc OS to see uSD p6? - Nook Color Q&A, Help & Troubleshooting

B&N is flashing the emmc 1.4.1 system build for me tomorrow,
when that is done, I need to tell that OS when its booted,
it should find /sdcard (the standard fat32 external storage
filesystem) on the last hardware partition on the uSD card
(which I think is p6?).
I wondered if I can mount from either of the 2 OSes on the card,
the emmc /system partition (say via root explorer or a terminal
emulator or adb shell) to edit its /system/etc/vold.fstab to point
to the correct partition?
Is there a defined way to edit the emmc system from a sdcard
based system, or do I have to root the emmc OS to edit it?
Can I 'adb pull' the file, edit it on windows and 'adb push'
it back to /system, (or does it require rooting to turn on 'usb
debugging' to enable adb)?
I already expanded the the last partition with EASYUS to fill the card.

fuzzynco said:
B&N is flashing the emmc 1.4.1 system build for me tomorrow,
when that is done, I need to tell that OS when its booted,
it should find /sdcard (the standard fat32 external storage
filesystem) on the last hardware partition on the uSD card
(which I think is p6?).
I wondered if I can mount from either of the 2 OSes on the card,
the emmc /system partition (say via root explorer or a terminal
emulator or adb shell) to edit its /system/etc/vold.fstab to point
to the correct partition?
Is there a defined way to edit the emmc system from a sdcard
based system, or do I have to root the emmc OS to edit it?
Can I 'adb pull' the file, edit it on windows and 'adb push'
it back to /system, (or does it require rooting to turn on 'usb
debugging' to enable adb)?
I already expanded the the last partition with EASYUS to fill the card.
Click to expand...
Click to collapse
Yeah, quite simple.
From your CM7 rom.
-Use root explorer and browse to /mnt.
-In the /mnt folder create a folder called /nsystem
-Now open up terminal emulator and perform the following commands
Code:
$ su
# mount /dev/block/mmcblk0p5 /mnt/nsystem
-Now go back to root explorer and browse to /mnt/nsystem/etc
-I think you have to mount it as r/w and then long press on vold.fstab
-Edit the sdcard mount from "auto" to "7", not 6. It has to be "7"
-Save it and make sure you exit out of root explorer. Not just pushing the home button, but choosing exit from the menu
-Go back to terminal and it should bring you back to where you left off and type in the following commands
Code:
# umount /mnt/nsystem
# exit
$
-Now you can reboot to the stock rom and it should be able to share the same sdcard partition as your dualbootsd
Racks

racks11479 said:
Yeah, quite simple.
From your CM7 rom.
-Use root explorer and browse to /mnt.
-In the /mnt folder create a folder called /nsystem
-Now open up terminal emulator and perform the following commands
Code:
$ su
# mount /dev/block/mmcblk0p5 /mnt/nsystem
-Now go back to root explorer and browse to /mnt/nsystem/etc
-I think you have to mount it as r/w and then long press on vold.fstab
-Edit the sdcard mount from "auto" to "7", not 6. It has to be "7"
-Save it and make sure you exit out of root explorer. Not just pushing the home button, but choosing exit from the menu
-Go back to terminal and it should bring you back to where you left off and type in the following commands
Code:
# umount /mnt/nsystem
# exit
$
-Now you can reboot to the stock rom and it should be able to share the same sdcard partition as your dualbootsd
Racks
Click to expand...
Click to collapse
That's exactly what I needed.
Is holding the hard key (N) supposed
to display a menu? The effects I saw were
normal boot (CM7), both volume keys (CM9)
and N key CWM Recovery.

B&N decided they have to replace the device, (store tech said
TPTB required them to stop using the repartitionin uSD cards they
were using). Since they can't reflash, they agreed to send a .replacement)

Related

New Hero will not take recovery image

I have been lurking on this site for sometime in anticipation of my new Sprint Hero.
I got mine the other day.
Of course I want to put a custom image on it.
So I start with this link to start the process and get a recovery image on it.
I am following The Rest that guys guide.
When I get to step 13
adb push recovery-RA-heroc-v1.5.2.img /sdcard
I get a permission denied error.
What are some ways around this or am I doing something incorrect?
I have searched the forums to no avail
Thanks in advance.
My Hero has this software versions:
Kernel 2.6.27-533ce29d
Build # 1.56.651.2 CL85027 release keys
Software version # 1.56.651.2
Hardware version # 0002
Did you "unmount the sdcard then enable your USB debugging"?
Unmount and enable USB Debugging from the applications menu.
And I think its "Theres That Guy"... Could be wrong.
Here are the contents of my command window.
I unmounted the sd card then I enabled the usb debugging.
I cannot even see the sd card in windows but the phone is seeing the correct capacity.
Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\gpoulos>cd C:\android-sdk-windows\tools
C:\android-sdk-windows\tools>adb devices
adb server is out of date. killing...
* daemon started successfully *
List of devices attached
HT9CWHF05632 device
C:\android-sdk-windows\tools>adb push asroot2 /data/local/
706 KB/s (74512 bytes in 0.103s)
C:\android-sdk-windows\tools>adb shell
$ chmod 0755 /data/local/asroot2
chmod 0755 /data/local/asroot2
$ /data/local/asroot2 /system/bin/sh
/data/local/asroot2 /system/bin/sh
[+] Using newer pipe_inode_info layout
Opening: /proc/671/fd/3
SUCCESS: Enjoy the shell.
# mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
# cd /system/bin
cd /system/bin
# cat sh > su
cat sh > su
# chmod 4755 su
chmod 4755 su
# exit
exit
$ exit
exit
C:\android-sdk-windows\tools>adb push recovery-RA-heroc-v1.5.2.img /sdcard
failed to copy 'recovery-RA-heroc-v1.5.2.img' to '/sdcard/recovery-RA-heroc-v1.5
.2.img': Permission denied
C:\android-sdk-windows\tools>
Uh Oh, did Sprint patch our root???
Sucks if they did, it looks like everything is done right.
My other suggestion is to go down load the pre-kitchen from
Geekfor.me
Downloads are on the right.
Use Auto-rooter.
Troopermoonchild said:
I have been lurking on this site for sometime in anticipation of my new Sprint Hero.
I got mine the other day.
Of course I want to put a custom image on it.
So I start with this link to start the process and get a recovery image on it.
I am following The Rest that guys guide.
When I get to step 13
adb push recovery-RA-heroc-v1.5.2.img /sdcard
I get a permission denied error.
What are some ways around this or am I doing something incorrect?
I have searched the forums to no avail
Thanks in advance.
My Hero has this software versions:
Kernel 2.6.27-533ce29d
Build # 1.56.651.2 CL85027 release keys
Software version # 1.56.651.2
Hardware version # 0002
Click to expand...
Click to collapse
I have always had an issue doing it from adb shell, or flashrec, even though it would work perfect on the old ladys phone. If your phone is rooted, put recovery on root of sdcard, download command executer from market. Open it, check superuser, and type.
flash_image recovery /sdcard/recovery-RA-heroc-v1.5.2.img
I can't remember if recovery is needed or not after flash image. If it doesn't work, try the other way. Also make sure you spell the file name right. It should take about 30 seconds, then reboot into recovery. This way, can be done quickly, from your phone. Also, if anything in the command is entered improperly, it won't work.
Wait never mind, its not Root thats failing its the Recovery Image.
Do this:
Rename the recovery image file something easy like RA152.img
Copy it to your SD card from windows. Which means you have to slide down the notifications bar and mount it for Windows to see it.
Once you have it on the ROOT of the SD card, not in a folder.
Go into CMD and do this.
CD C:\AndroidSDK\Tools
adb shell
su
flash_image recovery /sdcard/RA152.img
Kcarpenter said:
Uh Oh, did Sprint patch our root???
Sucks if they did, it looks like everything is done right.
My other suggestion is to go down load the pre-kitchen from
Geekfor.me
Downloads are on the right.
Use Auto-rooter.
Click to expand...
Click to collapse
It looks like he has root already.
Troopermoonchild said:
I have been lurking on this site for sometime in anticipation of my new Sprint Hero.
I got mine the other day.
Of course I want to put a custom image on it.
So I start with this link to start the process and get a recovery image on it.
I am following The Rest that guys guide.
When I get to step 13
adb push recovery-RA-heroc-v1.5.2.img /sdcard
I get a permission denied error.
What are some ways around this or am I doing something incorrect?
I have searched the forums to no avail
Thanks in advance.
My Hero has this software versions:
Kernel 2.6.27-533ce29d
Build # 1.56.651.2 CL85027 release keys
Software version # 1.56.651.2
Hardware version # 0002
Click to expand...
Click to collapse
I just got mine yesterday same spec as your hero. Using flipz pre kitchen work just fine.
Wow you guys are awesome.
Where do I do for flipz pre kitchen?
Thanks again.
forum.xda-developers.com/showthread.php?t=606172
Just mount your SD card via USB to your computer and copy it over. Then unmount and flash it.
I tried the Fresh Kitchen
When I try to auto root it says cannot find asroot2 please redownload the kitchen. I did that same results.
When I try to push a recovery image ontot the SD card it says kitchen cannot find the filepush.bat please redownlaod the kitchen. Which I did.
So frustrating!!!!!!!!!!!!!!
Troopermoonchild said:
I tried the Fresh Kitchen
When I try to auto root it says cannot find asroot2 please redownload the kitchen. I did that same results.
When I try to push a recovery image ontot the SD card it says kitchen cannot find the filepush.bat please redownlaod the kitchen. Which I did.
So frustrating!!!!!!!!!!!!!!
Click to expand...
Click to collapse
Try this. Go to Setting -> SD Card & Phone Storage and see if you have an option to mount the SD card. If you do, try tapping the option to mount.
If you have 'Unmount SD card', try tapping that option, ejecting the SD card, reinsert it again, and (if needed) tap the 'Mount SD Card' option.
The only other option I can think of is to reformat the SD card in a card reader in Windows...could be a bad format.
Also i cannot see the SD card in Windows. I ahve tried it on a Windows 7 and a Windows XP machine.
I know the phone sees the card because its showing the correct size.
tkirton said:
Try this. Go to Setting -> SD Card & Phone Storage and see if you have an option to mount the SD card. If you do, try tapping the option to mount.
If you have 'Unmount SD card', try tapping that option, ejecting the SD card, reinsert it again, and (if needed) tap the 'Mount SD Card' option.
The only other option I can think of is to reformat the SD card in a card reader in Windows...could be a bad format.
Click to expand...
Click to collapse
I never get a mount option. No matter what I try.
After I unmount the sd card. I can then remove the card from the phone.
Then when I insert it. The phone recognizes it and automatically mounts the card.
Plug the phone into your computer. Drag down the notification bar. Mount it. Then copy using Windows Explorer.
jonnythan said:
Plug the phone into your computer. Drag down the notification bar. Mount it. Then copy using Windows Explorer.
Click to expand...
Click to collapse
Please describe better. I dont understand.
to move something to your SD card such as music or in this case the recovery image touch and hold at the very top of your screen and slide your finger down to the bottom. this should show a couple different options one will say USB connected. press that option and it will bring up a dialog box asking if you want to mount the card press mount. If you have windows then autoplay sould pop up on your comp and say open folder to view files choose that. you then drag and drop the recovery image to the SD card. once again go to notifications and choose the same option and unmount the card.
you then go to cmd and type this
Code:
cd/
cd /where_ever_you _have_SDK/tools/
adb shell
su
cd /sdcard/
flash_image recovery recovery-RA-heroc-v1.5.2.img
wait untill you see the '#' symbol and type
Code:
reboot recovery
that should do it

[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

[Q] [Help]

Hey i have really messed up my nexus 4.Please help.I'll tell you my problem in short:I have flashed recovery.img onto userdata by mistake using quikIMG.So now the phone got reset and the whole phone was seemed wiped.There was nothing on the phone.Thats what i assumed after peeking into galary/music etc but when i connected my phone to the pc it is showning that the phone's 10gb is used.Basically it is showing that the data is still there.Can you tell me any way to bring back the data?
Try factory reset
This may or may not work, no guarantees. This will be difficult, time consuming, and you must do everything exactly as written; so read it first and ask questions before you begin. I am using a Windows PC, most of these commands will be similar on other OS's, those when in the adb shell are identical. This will require adb and a custom recovery (I use TWRP, so I'll be able to offer TWRP specific help quicker), find a method to flash that before you begin, and find where that recovery keeps it backup files. Also this will require you to flash a rooted ROM, of the same android version you had before: if you had stock, I recommend you flash stock and root it; either way, have that ready to go before you start. Lastly, the worst case scenario will require you to have a linux system and possibly some kind of removable media (USB stick, external HDD, etc), you can just boot a linux live disk, and that's what I'll be doing with Ubuntu; again, have this ready first. There will come a point about mid way through, where, depending on the results you may need to wait for me to follow up with you, I will try to do this in a timely manner, but I can't promise anything.
Basically what we are going to do is explore the file system in an adb shell while it is booted to a custom recovery, hopefully from there your /data and /sdcard partitions will still be intact; if they are not we may still be able to recover some of your data. If they are intact you can simply use the recovery to make a backup of them.
And so, with your phone connected to your computer, boot to recovery. Then open a command prompt and enter:
Code:
adb shell
cat /proc/mounts
The output will look like:
/dev/block/mmcblk0p23 /data ext4 rw,relatime,data=ordered 0 0
/dev/block/mmcblk0p23 /sdcard ext4 rw,relatime,data=ordered 0 0
/dev/block/mmcblk0p22 /cache ext4 rw,relatime,data=ordered 0 0
Click to expand...
Click to collapse
First is the block, then the mount point, then the file system type, last is information about how recovery treats it.
If you do not see /dev/block/mmcblk0p23 associated with a mount point then enter:
Code:
mount -o rw /dev/block/mmcblk0p23 /data
mount -o rw /dev/block/mmcblk0p23 /sdcard
If you get an error on both of these then skip to the breakt.
Now check both these directories to ensure it is the data you expect it to be, enter:
Code:
cd /data
ls
cd /sdcard
ls
Maybe go down a few levels to confirm your data is really there. If the output doesn't look right, then skip to the break.
Otherwise, enter:
Code:
exit
Use the phone screen to navigate to the backups menu and backup data.
When the backup is complete use adb pull to copy the backup onto your computer, this may take a very long time.
Code:
adb pull /sdcard/TWRP TWRP
Now flash your ROM, including a data wipe, and boot it, once it is running fully, reboot into recovery and push the backup to the phone.
Code:
adb push TWRP /sdcard/TWRP
Use the phone screen to restore the data.
--------------------THE BREAK, cause XDA automagically made these two posts one, ****ers--------------------
Hopefully you got this sorted out with the first part, this part may not work at all, and it will be a lot more tedious if it does. So, at this point something happened which indicates /mmcblk0p23 really did lose the data, so we'll just copy the whole thing and explore that copy in linux to extract what data you can.
With the phone in recovery, and a command prompt in an adb shell:
Code:
dd if=/dev/block/mmcblk0p23 of=/tmp/userdata.ext4
This may take a REALLY long time. When it is done, enter:
Code:
exit
adb pull /tmp/userdata.ext4
This will take just as long or longer. Transfer userdata.ext4 to your removable media device. And boot to your linux setup. Open a terminal window in the directory with userdata.ext4 enter:
Code:
sudo mkdir userdata
sudo mount -o loop userdata.ext4 userdata
cd userdata
ls
Now if any of your data still exist in a form I'd be able to help you recover, it will be in this directory, userdata. If you see something that you recognize, or that you know you need, copy it and save it to the removable media. After that you can reboot your system.
Go ahead and flash your new ROM now, let it fully book, and then copy back whatever you managed to save.
I kinda lost steam there toward the end, sorry, it's 0316 here. If anything is unclear ask away. Good luck.

[Q] How do I install parted command?

I'm trying to wipe and format a microSD card that I have plugged in via OTG and already have it wiped with this;
Code:
dd if=/dev/zero of=/dev/block/sda
Now I'm looking into how to recreate a MBR and partition table and it says to use the parted command, which I'm glad about as I'm familiar with the command from using Ubuntu but it's not installed and I can not find any instructions on how to get it. Can anyone explain how to install it? I know I could just plug the SD card into a computer and do it but I'm having fun doing all this on a tablet. Lol
Bump
Anyone?
I have got the same question, any other solutions?
This is the most complete information I have found yet, but it doesn't work. Either from me messing something up or it not being correct for the Nexus 7 being that it was made two years ago. http://www.droidforums.net/forum/htc-droid-eris/78650-internal-storage-partitions-screwed-up.html
I pushed all six files to /sbin/ with no errors and changed their permissions with no issues but I restart the tablet and none of the six files are in /sbin/
Just for the heck of it I extracted the six files to the SD card in the tablet, CD'd to it and used chmod 0755 on all six files then tried to run it and this is what I get.
Code:
[email protected]:/storage/emulated/legacy/folder # parted
sh: parted: not found
127|[email protected]:/storage/emulated/legacy/folder # ls
e2fsck
mke2fs
parted
resize2fs
sdparted
tune2fs
... how can you NOT find that?
herqulees said:
... how can you NOT find that?
Click to expand...
Click to collapse
Depending on how your PATH env var is set, the current directory might or might not be being searched for program load(s). So indicating the current directory explicitly with a leading "./" such as
$ ./parted
will certainly work (if a read & execute bit set on file, and the filesystem is not mounted -noexec ) .
But...
...if those files are dynamically linked rather than statically linked, and the appropriate link-libraries they reference come up missing during run-time linking it is possible to still see a "not found" message. Sort of a red-herring error message, but there you go.
I just looked in TWRP's /sbin (ramdisk) just now. Don't see parted in there.
[Edit] I do see the string "fdisk" inside the busybox executable though! - maybe boot into recovery and see what
busybox fdisk /dev/block/sda
gets you? (I suppose result depends on whether or not TWRP kernel plumbs the device into place.)
Perhaps the quickest solution is to simply use a PC and media reader to do the partitioning from a PC instead of the N7. You might even want to boot a "Live CD" version of Linux to get at the tools you need. (BTW, I think that Ubuntu's Live CD mounts a fuse FS over the top of the RO DVD/CD, so you can even download and install packages as needed).
I managed to get everything to work by doing this:
1. Using this app https://play.google.com/store/apps/details?id=com.beansoft.mount_system&hl=en I remounted /system as RW
2. Using the CyanogenMod File Manager I copied the parted file to /system/bin (from the root of the SD card)
3. Then using the File Manager still, go to the Properties of the parted file and go to Permissions and under R, W, and X put a check mark in the three boxes bellow each. (I don't know which ones it needs permissions for so I just give it permissions to everything, kinda frowned upon to do but I trust this program so...)
By doing this you can completely stay out of command line, but at the same time you're installing a command line program so you shouldn't be afraid of the command line in the first place. Lol.
Note: After this you can go to a terminal window and type su to get root access then type
Code:
parted /dev/block/sda
you will of opened your external memory card, now use parted as you would normally.

[Solved] Link2sd "mount warning" fix for all samsungs and android 5.1.1+ stock ROM

[Solved] Link2sd "mount warning" fix for all samsungs and android 5.1.1+ stock ROM
Hi.
I suppose many samsung and some sony devices have the problem "mount warning" displayed by Link2sd after installing it for manage second partition on external sd card. You do not have to generate mounting scripts again and again and restart system by Link2sd's own menu option to fix this. This solution lets to mount second partition automatic in boot phase.
Thank you to Warre101 for the idea.
If you want to use Link2sd you have to have rooted device. I did it on samsung galaxy tab 4 with stock ROM 5.1.1..
The best application for make all operations is Total Commander (TC).
1. Create subdirectory su.d in directory /system where you store your script, do it in left window of TC.
/system/su.d
2. Set 700 (RWX) permision for new created directory in Propertis TC's menu option . (Long tap directory name)
3. In the right window of TC open directory : /data/data/com.buak.Link2SD/files/
4. Copy the file init-link2sd.sh from right to left window. (If this file does not exist , create your own text file and paste the content from the example)
5. Change name of this file in the left window (/system/su.d directory) to 11link2sd
6. Copy renamed file back to right window and open it in Totalcmd-Editor (installed with TC)
7. Remove not needed text , the result should be:
Code:
#!/system/bin/sh
sleep 4
mount -t ext2 -o rw /dev/block/mmcblk1p2 /data/sdext2
8. Write changes and leave editor.
9. Copy changed file back to /system/su.d (left window). Overwrite existing file.
10. Set 700 (RWX) permision for this file . /system/su.d/11link2sd
11. Restart the device.
The new created script will mount partition needed by Link2sd for manage second partition on your external sd card during the booting phase of device/system .
This is not 100% sure if /su.d solution will work in every ROM. If you will find one not working, please comment here.
Help
Tomek0000 said:
Hi.
I suppose many samsung and some sony devices have the problem "mount warning" displayed by Link2sd after installing it for manage second partition on external sd card. You do not have to generate mounting scripts again and again and restart system by Link2sd's own menu option to fix this. This solution lets to mount second partition automatic in boot phase.
Thank you to Warre101 for the idea.
If you want to use Link2sd you have to have rooted device. I did it on samsung galaxy tab 4 with stock ROM 5.1.1..
The best application for make all operation is Total Commander (TC).
1. Create subdirectory su.d in directory /system where you store your script, do it in left window of TC.
/system/su.d
2. Set 700 (RWX) permision for new created directory in Propertis TC's menu option . (Long tap directory name)
3. In the right window of TC open directory : /data/data/com.buak.Link2SD/files/
4. Copy the file init-link2sd.sh from right to left window.
5. Change name of this file in the left window (/system/su.d directory) to 11link2sd
6. Copy renamed file back to right window and open it in Totalcmd-Editor (installed with TC)
7. Remove not needed text , the result should be:
Code:
#!/system/bin/sh
sleep 4
mount -t ext2 -o rw /dev/block/mmcblk1p2 /data/sdext2
8. Write changes and leave editor.
9. Copy changed file back to /system/su.d (left window). Overwrite existing file.
10. Set 700 (RWX) permision for this file . /system/su.d/11link2sd
The new created script will mount partition needed be Link2sd for manage second partition on your external sd card during the booting phase of device/system .
This is not 100% sure if /su.d solution will work in every ROM. If you will find one not working, please comment here.
Click to expand...
Click to collapse
in the directory : /data/data/com.buak.Link2SD/files/ , i cannot find the file init-link2sd.sh, only 2 files "link2sd_b and link2sd.log" and link2sd_b cannot be edited. My account haven't post 10 posts yet, so i cannot upload image for you to check.
can i creat the new init-link2sd.sh and continue your intructions ?
My device: Samsung galaxy A7 2016 (android 6.0.1 Rusia)
Hi _DoomD_ .
You should see this file if you installed current version of link2sd. If this file does not exist, you can use other text file or create new and copy the content from the example. If you use windows, do not use copy/paste. Linux uses different end line char. You does not do it on Tab 4 I suppose ... no mater , it will work on others if only your system will support new created /system/su.d/ .
Please let us know if it will work in android 6.0.1 .
Bye
Tomek0000 said:
Hi _DoomD_ .
You should see this file if you installed current version of link2sd. If this file does not exist, you can use other text file or create new and copy the content from the example. If you use windows, do not use copy/paste. Linux uses different end line char. You does not do it on Tab 4 I suppose ... no mater , it will work on others if only your system will support new created /system/su.d/ .
Please let us know if it will work in android 6.0.1 .
Bye
Click to expand...
Click to collapse
At step 8, i couldnot save changes. It gived me a writing error. I tried to change permission but it didnot work. I couldnot finish your intruction using totalcommand. I tried to use root explorer to edit and finished your intruction. But mount warning didnot fix.
I think your solution cannot work on android 6.0.1. Now i use apps2sd instead. Anyway, thanks for your help.
The problem with saveing exists in /system/... location. This is a reason i write abot coping renamed file back to link2sd's subdirectory and do all changes here. If your TC has root permision, it saves changes here. If this is not working, I do not know where is a source of problem.
File permision 700 lets the root do anything with file. TC with root permission uses root priv. for this operation. Maybe wrong owner of file, should be root...
A nifty thing one can do on a setup without built-in init.d, but recent SuperSU root with su.d, is to create and bind system/etc/init.d. I use a script in su.d to do this:
00000mounts:
Code:
mount -o bind,rw /su/su.d /system/etc/init.d;
In my case, I'm using systemless root, thus the '/su/su.d' location. Change it to your su.d folder location if it differs. This one line gives what amounts to standard init.d support, and any apps that create init.d scripts will see the /system/etc/init.d folder, use it, and their scripts end up in su.d and get executed on boot by SuperSU.
(And yes, this makes link2sd mounting work out of the box. Well, YMMV, but it worked for me.)
Filesystem for the second partition.
Code:
#!/system/bin/sh
sleep 4
mount -t ext2 -o rw /dev/block/mmcblk1p2 /data/sdext2
The important thing is that if you are using different filesystem for the second partition you should change `ext2` after `mount -t` to whatever filesystem you use. Maybe someone has posted it already but I do not have a time to check it. In my case I use `ext4` so it looks like this:
Code:
#!/system/bin/sh
sleep 4
mount -t ext4 -o rw /dev/block/mmcblk1p2 /data/sdext2
After this change Link2SD works perfectly on my Samsung Galaxy J3 (2016) aka SM-J320FN with stock Samsung ROM. Thanx.
@HostisSupremus
it has sense. I am always format it to ext2 on all my devices because of undelete support for ext2 and a lack of this support for ext4.
I found interesting fact on some of my devices . When you install link2sd, it wants to create initial script when you have to select your filesystem of second partition. I have always ext2, but some my devices works if I select ext2 and some do not. If do not, it works if I select ext4 , and it works with realy ext2 phisical partition. I do not know why .
dosent work for me, samsung galaxy tab a6 2016 android 5.1 rooted with magisk
This is what finally worked for me after three days of trying everything, thank you OP, you are my saviour
Difficult to believe after all these years of development link2sd does not verify init.d support.
I am using LOS 14.1 (Android 7.1) on my LG L70 and encounter the same mounting-failed problem.
I pull the file init-link2sd.sh out and it reads:
set +e
echo "$(date) mounting..." > $LOG
sleep 2
mount -t vfat -o rw,uid=1000,gid=1000,umask=133,dmask=0002 /dev/block/vold/public:179_66 /data/sdext2 1>>$LOG 2>>$LOG
mount -t vfat -o rw,uid=1000,gid=1000,umask=133,dmask=0002 /dev/block/mmcblk1p2 /data/sdext2 1>>$LOG 2>>$LOG
mount >> $LOG
echo "$(date) mount finished" >> $LOG
chmod 773 /data/dalvik-cache
Is there anything wrong? Why the 2nd partition can be mounted automatically at boot?
Also if there is a problem can I edit the file then push back directly?
I tried to edit the file init-link2sd.sh and pushed it back to phone. Not working...
thanks.
perfect..
my DEVICE J320G:good:
As a magisk user, I created a mount .sh script at /sbin/.magisk/img/.core/post-fs-data.d which seems to execute at boot time but not solve the issue

Categories

Resources