[TUTORIAL]How to unbrick your N4 - Nexus 4 General

How to unbrick your N4 ​I'm not responsible for anything that happens with your device!
I accidently flashed a S4 ROM.
After I noticed that, I tried to flash a factory image, but it booted for a very long time and WiFi, signal and other radio stuff didn't work.
Then I searched for help here, but anything they suggested didn't work, so you might be thinking that the only solution would be to send the device for repair.
But I searched for a solution anyway and found it
So this is what you need to download:
Nexus 4 Unbrick.zip
For Nexus 4 16GB you also need to download this files:
Nexus 4 Unbrick 16 GB Files.zip
OK let's start:
First thing we need to do is extracting everything and installing the LGNPST (this is for Windows 8, but I don't see why it shouldn't work on other versions).
Open your extracted Nexus 4 files folder
Open the LGNPST folder
Install "LGUnitedMobileDriver_S4981MAN38AP22_ML_WHQL_Ver_3.8.1.exe", it's located under "LG_USB_Driver"
Install "LGNPSTv1.3_Lab_Verison_RightClickReg.exe", located in root of the folder
Install "LGNPST_GenericModels_Ver_5_0_12_0", located under "NPST Generic Components and Models"
Install "LGNPST_Components_Ver_5_0_20_0", also located under "NPST Generic Components and Models"
Copy the Models folder to C:\LG Electronics\LGNPST\
Start a command prompt as admin
Type: regsvr32 "C:\LG Electronics\LGNPST\Models\LGNPST_LS970.dll" (yes, I know this is a .dll for the Optimus G)
That's it
If you got no ADB or fastboot drivers installed, install the Universal ADB Driver.
Now start the LGNPST and get your N4 into download mode:
Turn the phone off.
Make sure the phone is off.
Plug a USB cable into your PC, AND ONLY INTO YOUR PC. THE PHONE PART COMES NEXT.
Hold down the volume up and down buttons for 2 (two) seconds on your Nexus, and continue to hold the volume up and down buttons while pluging in the USB cable which is connected to your PC. Continue to hold the buttons until the download mode screen appears. Now step five.
Once the download mode screen comes up, let go of the volume buttons.
Thanks to @Connor Baker for sharing this method
Now you should get a screen like this:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Now your LGNPST should look like this:
In the bottom center you see DLL and BIN File.
Click on the folder symbol and select LGNPST_LS970.dll (and again, yes, I know it's for Optimus G, trust me I know what I'm doing)
Then select the .bin file you extracted before.
Now click start and it'll flash it.
Your N4 will reboot automatically, but the LGNPST reached only 85%, thats's normal (but please wait until the 67% changed to 85% before you close it)
The LGNPST will say you, that you should reboot again to download mode to finish the process, but the only thing it does is giving you an error message.
So now you have a developer firmware on your device and it's encrypted so you can do nothing.
Reboot into bootloader with Vol - and power button.
Now start flash_all.bat in the flashfactory folder and the program will do the things by itself.
Now you are completely on stock and should have a fully working device
Next steps for Nexus 4 16GB:
First thing I need to say: No, this doesn't work!
First step is rooting your phone (search through XDA if you don't know how; thanks to Rockstar600 for remembering me)
Copy the files you downloaded for the 16GB Version on your Nexus 4 (without the CWM Image).
If "dd" got renamed to "dd.bin" rename it back to "dd".
Install Root Browser or an similar app and copy the files to your /system directory.
Then flash the CWM Recory Image.
To do that open the folder that contains the Factory Image flashable with fastboot and do CTRL+Right Click in that folder and select "Open Command Prompt here" or something like that (don't know the exact name).
Get your device into fastboot mode with Vol- and Power.
Now type:
Code:
fastboot flash recovery recovery-clockwork-touch-6.0.4.7-mako.img
Then reboot into recovery.
I think you leaved CMD open.
So now type:
Code:
adb shell
mount /system
cp /system/dd /
chmod 755 /dd
/dd if=/dev/block/mmcblk0 of=/system/pgpt8G.img bs=512 count=34
/dd if=/dev/block/mmcblk0 of=/system/sgpt8G.img bs=512 skip=30777311
umount /data
umount /cache
umount /system
df -h
Now the output should look like this:
Code:
# df -h
Filesystem Size Used Available Use% Mounted on
tmpfs 911.7M 48.0K 911.6M 0% /dev
There shouldn't be a extra line.
If there is no extra line then continue with:
Code:
mount /system
/dd if=/dev/block/mmcblk0 of=/system/DDR bs=512 skip=15267840 count=2015
/dd if=/system/DDR of=/dev/block/mmcblk0 bs=512 seek=30775296 conv=notrunc
/dd if=/system/sgpt16G.img of=/dev/block/mmcblk0 bs=512 seek=30777311 conv=notrunc
/dd if=/system/pgpt16G.img of=/dev/block/mmcblk0 bs=512 seek=0 conv=notrunc
parted /dev/block/mmcblk0
Then type p and press enter and the output should look like this:
Code:
# parted /dev/block/mmcblk0
GNU Parted 1.8.8.1.179-aef3
Using /dev/block/mmcblk0
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) p
p
Model: MMC 016G92 (sd/mmc)
Disk /dev/block/mmcblk0: 15.8GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 524kB 67.6MB 67.1MB fat16 modem
2 67.6MB 68.2MB 524kB sbl1
3 68.2MB 68.7MB 524kB sbl2
4 68.7MB 70.8MB 2097kB sbl3
5 70.8MB 71.3MB 524kB tz
6 71.3MB 94.4MB 23.1MB boot
7 94.4MB 117MB 23.1MB recovery
8 117MB 118MB 799kB m9kefs1
9 118MB 119MB 799kB m9kefs2
10 119MB 120MB 799kB m9kefs3
11 120MB 121MB 524kB rpm
12 121MB 121MB 524kB aboot
13 121MB 122MB 524kB sbl2b
14 122MB 124MB 2097kB sbl3b
15 124MB 124MB 524kB abootb
16 124MB 125MB 524kB rpmb
17 125MB 125MB 524kB tzb
18 125MB 126MB 524kB metadata
19 126MB 143MB 16.8MB misc
20 143MB 159MB 16.8MB ext4 persist
21 159MB 1040MB 881MB ext4 system
22 1040MB 1627MB 587MB ext4 cache
23 1627MB 15.8GB 14.1GB ext4 userdata
24 15.8GB 15.8GB 524kB DDR
25 15.8GB 15.8GB 507kB grow
Notice that userdata partition is 14.1GB in size
In case parted reports an error I suggest to return back to the old 8G partition tables, see below.
You can close parted with simply typing quit.
Now reboot the phone into bootloader: type reboot and hold 'Up' button to enter bootloader menu.
Then type:
Code:
fastboot erase userdata
fastboot -w
Now again start the flash-all.bat in your folder.
Now you have your 16GB back
Return back to the old 8G partition tables:
In case parted reported an error, put the old 8G partition tables back. This should not happen but never say never:
Code:
/dd if=/system/sgpt8G.img of=/dev/block/mmcblk0 bs=512 seek=30777311 conv=notrunc
/dd if=/system/pgpt8G.img of=/dev/block/mmcblk0 bs=512 seek=0 conv=notrunc
Fix for Bluetooth and MAC adress:
For bluetooth:
- In /persist directory create bluetooth directory. Under the new directory create a file named .bdaddr (don't miss the dot!)
Edit the file and put 6 random characters in it. Even better, if you can do this in a hex editor and put 6 random bytes, not just printable characters.
- Set execute and read permissions for everybody on /persist/bluetooth directory and change owner of .bdaddr to bluetooth:bluetooth and permission to 660 (read/write for owner and group and nothing else). In command line:
Code:
chown root:root /persist/bluetooth
chmod 755 /persist/bluetooth
chown bluetooth:bluetooth /persist/bluetooth/.bdaddr
chmod 660 /persist/bluetooth/.bdaddr
For mac address:
- In /persist directory create wifi directory. In the new directory create a file named .macaddr (don't miss the dot!)
Edit the file and put 12 random hex numbers in it (0-9, A-F), save.
- Set execute and read permissions for everybody on /persist/wifi directory and change owner of .macaddr to wifi:wifi and permission to 660 (read/write for owner and group and nothing else). In command line:
Code:
chown root:root /persist/wifi
chmod 755 /persist/wifi
chown wifi:wifi /persist/wifi/.macaddr
chmod 660 /persist/wifi/.macaddr
- run /system/bin/conn_init program. Can be run in root explorer(choose Linux Script Handler when you open it), or in adb shell:
Code:
su
/system/bin/conn_init
Then reboot and check if the changes got applied in settings
Donate
Every $ helps me : Donate
Credits
Koush for his ADB Driver
Jhoopes517 for his tutorial to install LGNPST
FLYN's thread about unbricking a Nexus 4, because I got the parts for LGNPST from there
foil for his .tot files
Jbele for his picture from download mode xD
Google for the factory images
dvhexer for his guide to convert 8GB to 16GB

OK there's a problem: After using this method you get only 8GB and it seems like there's no fix for that
Does somebody know a solution?
PS: Yes, already tried that: http://forum.xda-developers.com/showthread.php?p=36673191#post36673191

Have you tried formatting data, not wipe, in recovery?

Try this: http://forum.xda-developers.com/showthread.php?t=2033692

meangreenie said:
Have you tried formatting data, not wipe, in recovery?
Click to expand...
Click to collapse
Yes.
RussianBear said:
Try this: http://forum.xda-developers.com/showthread.php?t=2033692
Click to expand...
Click to collapse
Mentioned it above, but forgot to remove postcount behind showthread, sry

nice!!
I know someone who can use this:
http://forum.xda-developers.com/showthread.php?t=2175663

I think I found a fix for the 8GB problem
But it needs a external sd so I need to make some changes
EDIT: Got it, I'll add this to the guide now

thanks !!!!!!!!!!!!!!!!!
I am from china.
i flash the 4.3 for s4.
and i know 2 person have the same problem like me in our forum.
SO happy i encounter the god-like person--you!
thanks a lot.
And i will quote your ways to save them, are you mind this?

tigerCHINA said:
I am from china.
i flash the 4.3 for s4.
and i know 2 person have the same problem like me in our forum.
SO happy i encounter the god-like person--you!
thanks a lot.
And i will quote your ways to save them, are you mind this?
Click to expand...
Click to collapse
Why on earth would you flash anything for the S4? I'm curious

Updated OP with Instructions to get your 16 GB back
tigerCHINA said:
I am from china.
i flash the 4.3 for s4.
and i know 2 person have the same problem like me in our forum.
SO happy i encounter the god-like person--you!
thanks a lot.
And i will quote your ways to save them, are you mind this?
Click to expand...
Click to collapse
No problem, it's there to help everyone
KiNG OMaR said:
Why on earth would you flash anything for the S4? I'm curious
Click to expand...
Click to collapse
Everyone does start as a beginner, one and a half year ago I thought there are universal ICS flashable zips (look here xD) , now look where I got

I wanna try 4.3 but i dont know i will fail
KiNG OMaR said:
Why on earth would you flash anything for the S4? I'm curious
Click to expand...
Click to collapse
I wanna try 4.3 but i dont know i will fail

Hi, thanks for your help. I have a Nexus 4 bricked, when a friend tried to flash Nexus 7 kernel. The phone is dead and have only a red blinking led. When i connect the nexus to my Windows 8, i see a DXUSB_ERROR (or something similar, i don't have now the phone). Do you think it will work your method?
Thanks
Regards
EDIT: I have no fastboot or download mode

cicciociccio333 said:
Hi, thanks for your help. I have a Nexus 4 bricked, when a friend tried to flash Nexus 7 kernel. The phone is dead and have only a red blinking led. When i connect the nexus to my Windows 8, i see a DXUSB_ERROR (or something similar, i don't have now the phone). Do you think it will work your method?
Thanks
Regards
EDIT: I have no fastboot or download mode
Click to expand...
Click to collapse
Hmmm....don't know, can you get into a download mode?
Give it a try, seems like you can't brick even more
Oh, didn't saw that edit.
No, without download mode you can't use this

Gigadroid said:
Oh, didn't saw that edit.
No, without download mode you can't use this
Click to expand...
Click to collapse
So i tought. That's a pity :'(

thanks for the guide! as i said you're my hero!! but i cant do the 16gb part. i think im doing something wrong first, i write the lines one by one right? second, when i type: cp /system/dd /
it says that cannot find the file, something like that. i have move the 3 files to /system of course. and no the dd file didnt renamed to dd.bin, i check it. can you help??

@OP,
Thanks a ton bro!!

johnxarma said:
thanks for the guide! as i said you're my hero!! but i cant do the 16gb part. i think im doing something wrong first, i write the lines one by one right? second, when i type: cp /system/dd /
it says that cannot find the file, something like that. i have move the 3 files to /system of course. and no the dd file didnt renamed to dd.bin, i check it. can you help??
Click to expand...
Click to collapse
Ignore, I was incorrect.

meangreenie said:
Lose the last space, it's a typo I believe. dd/ or just dd
Click to expand...
Click to collapse
thanks for the reply. but i dont understand you.. what part i must change to correct the code?
 @Gigadroid can you fix the typos in OP??

johnxarma said:
thanks for the guide! as i said you're my hero!! but i cant do the 16gb part. i think im doing something wrong first, i write the lines one by one right? second, when i type: cp /system/dd /
it says that cannot find the file, something like that. i have move the 3 files to /system of course. and no the dd file didnt renamed to dd.bin, i check it. can you help??
Click to expand...
Click to collapse
Yes, one by one.
Try to mount system partition, simply type:
Code:
mount /system
I'll add this to op
meangreenie said:
Lose the last space, it's a typo I believe. dd/ or just dd
Click to expand...
Click to collapse
It isn't a typo.
cp stands for copy, the first path says which file will be copied, the second path where it will be copied.
In this case we want the files in our root directory which is /

its very useful THX:good::good:

Related

Dual Boot Atrix: Simplified and Standalone (30 Jan 2013)

Quickly and conveniently leverage the strengths of mainstream ROMs and kernels using my new simplified and standalone dual boot tools!
Here I assume that your rooted Atrix with unlocked boot loader already hosts a ROM on EMMC. Even if you're not dual booting, I think you will find some or all of these tools helpful!
Steps
Code:
1. Boot to Recovery
2. Flash SmartPart FZ (partition SD card right on your phone!)
3. Flash Copy-ROM (copy ROM --- all except boot image --- from EMMC to SD card)
4. Flash Atrix Boot Emporium V3.0 (boot ROM on SD card to verify success)
5. Flash another ROM of your choice to EMMC and reboot (optional)
Links
SmartPart-V1.0-signed.zip: http://www.mediafire.com/?wm96y92g3lla3ot
Copy-ROM-V1.0-signed.zip: http://www.mediafire.com/?i068xs1ktdkd183
Atrix-Boot-Emporium-V3.0-signed.zip: http://www.mediafire.com/?zsf4is8fbzs7sf9
All zips tested working on my AT&T Atrix + Samsung 32GB Class 10 SD using ClockworkMod Recovery 5.0.2.0.
If everything goes well, you will have demonstrated "standalone" dual boot capability on your Atrix beauty without a computer! In fact, "unlisted" ROMs may be supported. For example I downloaded upndwn4par's CSROM V7.0 (26 Jan 2013), ported it to SD and then successfully booted it with faux's 1.0 GHz GB boot image featured in Emporium.
Walk-Through
Step 1: I prefer ClockworkMod Recovery 5.0.2.0 as it appears to be the most compatible recovery for Atrix.
Step 2: SmartPart FZ shrinks your (external) SD card's FAT32 partition by 4GB and adds three new “ext” partitions: /system, /cache and /data of ample size to host virtually any Android ROM. SmartPart FZ takes about 30-45 seconds to partition a Class 10 card.
Important! You MUST flash SmartPart FZ from internal memory (“choose zip from internal sdcard”) because if you flash it from external memory, your SD card gets mounted and you can't partition a mounted filesystem. Also it is a good idea to flash SmartPart FZ immediately after booting to CWM; else your SD card could get mounted accidentally.
Not sure you want dual boot? Just select the “Restore” option and Smart Part FZ restores your SD to its original state by removing any existing ext partitions (up to three consecutive partitions) and growing your FAT32 partition back to its original size. This takes about 10-15 seconds on a Class 10.
Note: SmartPart FZ is fundamentally the same as its shell script predecessor ( http://forum.xda-developers.com/showthread.php?t=1651356 ) --- except that FZ runs unattended and does not backup anything.
Step 3: Copy-ROM, with the “EMMC to SD Card” option selected, copies all files on /system, /cache and /data files to the equivalent SD card ext partitions created in Step 2. Your EMMC ROM becomes a “live backup” on SD that you can boot to, thus freeing up EMMC to host another ROM of your choice.
One advantage of copying a ROM to SD is that you can first configure it the way you wish (GApps etc.), and then copy it over instead of having to flash individual customized zip files to SD. Then you're ready to flash a different ROM to EMMC, or blast off with a fully redundant system.
Copy-ROM uses the “cp -a” command, which I have found to be several times faster than cloning partitions. How much faster depends partly on disk usage since cloning copies everything, including empty space. Example: Port CM10 Liquid Smooth with ~100 total apps to a Class 10 SD. Clone ROM takes 15 minutes. Copy-ROM takes less than 2 minutes.
Another advantage of copying files over cloning partitions is that you don't have to worry about partition size mismatch. And I would not want to modify EMMC partitions --- too scary for me.
Step 4: Use Emporium V3.0 to boot a supported ROM whether it is hosted on EMMC or SD. Emporium contains boot images and corresponding /system/lib/modules for:
Code:
ICS MROM
ICSROM
CM10 epinter (Stock and OC1300)
CM10 Th3Bill (AOKP, Liquid Smooth and MIUI)
CM7 MROM (HV and SV)
CM7 Neutrino (EE, GT and GT+)
GB MROM (HV and SV)
GB NottachTrix (ATT and faux 1.00, 1.30 and 1.45)
Emporium V3.0 is less than 120 MB compressed and 10-15% more uncompressed. Each file named “boot.img” was lifted from its respective ROM zip. Each file named “boot-sd.img” exactly matches its big brother boot.img, except that ramdisk was modified to redirect ROM filesystem mounts from EMMC to SD:
Code:
/system: mmcblk0p12 to mmcblk1p2
/cache: mmcblk0p15 to mmcblk1p3
/data: mmcblk0p16 to mmcblk1p4
except for CM10 boot images. Please read CM10 Notes below.
Emporium Options
One of the dilemmas associated with dual booting is how to clear /cache and or /data. Of course CWM can do this, but only for ROMs hosted on EMMC: It does not recognize ROMs hosted on SD. And CWM is a little cumbersome to use since the clearing options are not all on one page. Emporium addresses these issues by displaying a single page with options to:
Code:
Clear /cache and /data/dalvik-cache
Clear /data (BE CAREFUL)
on EMMC or SD depending on the option selected on the first page. Now you can conveniently boot to a jet clean ROM whether it is hosted on EMMC or SD. Of course if you just copied a healthy ROM to SD, it is probably not necessary to clear.
I will explain the third option: Extract Boot Files to /sdcard/Boot later.
All three options are null by default.
Step 5: Nothing new here if you've ever flashed a ROM.
Now if for some reason you want to reverse the process and copy a ROM from SD Card to EMMC, just flash Copy-ROM and this time select the “SD to EMMC” option. Then flash Emporium or fastboot your EMMC ROM with the boot image of your choice. You may want to Nandroid-backup or Titanium Backup before doing a reverse copy.
Of course there are faster ways to switch between ROMs. But the tools presented here give your Atrix a simplified, standalone dual boot capability using all flashable zips.
Once you're comfortable using these flashable zip tools, you can then move onto “live” boot switching using all soft keys. To that end, I rolled up all of Emporium's boot images and my simplified boot switcher “boot-rom.sh” to a single directory named “Boot” which also includes the user-configurable subdirectories ROM1 and ROM2. Just select Emporium's option: Extract Boot Files. This extracts Emporium's Boot directory and its contents to the top directory of your SD card. After that you can copy your ROM boot images to Boot/ROM1 and Boot/ROM2 using Root Explorer or other suitable app. Copy boot.img to {path-to-SD}/Boot/ROM1 and boot-sd.img to {path-to-SD}/Boot/ROM2.
Now you can switch “live” between ROMs or boot to recovery using the appropriate command string:
Code:
sh boot-rom.sh (reboot to current ROM)
sh boot-rom.sh 1 (boot to ROM1)
sh boot-rom.sh 2 (boot to ROM2)
sh boot-rom.sh 3 (boot to Recovery)
Here is Emporium's boot-rom.sh:
Code:
#!/system/bin/sh
echo Motorola Atrix Dual Boot ROM1 emmc or ROM2 SD card
echo sendust7 @ xda developers
echo
echo Usage: sh boot-rom.sh N
echo where N = blank \(reboot to current ROM\)
echo 1 \(reboot to ROM1\)
echo 2 \(reboot to ROM2\)
echo 3 \(reboot to recovery\)
echo
echo "Home directory: $HOME"
echo
if [ $# -eq 0 ]; then
echo Rebooting to current ROM. Please wait...
sleep 3
reboot
elif [ $1 -eq 1 ]; then
if [ -f $HOME/ROM1/boot.img ]; then
cat $HOME/ROM1/boot.img > /dev/block/mmcblk0p11
echo Rebooting to ROM1. Please wait...
sleep 3
reboot
else
echo "boot.img not found. Check home directory."
exit 1
fi
elif [ $1 -eq 2 ]; then
if [ -f $HOME/ROM2/boot-sd.img ]; then
cat $HOME/ROM2/boot-sd.img > /dev/block/mmcblk0p11
echo Rebooting to ROM2. Please wait...
sleep 3
reboot
else
echo "boot-sd.img not found. Check home directory."
exit 1
fi
elif [ $1 -eq 3 ]; then
echo Rebooting to recovery. Please wait...
sleep 3
reboot recovery
else
echo "Invalid option. See Usage."
exit 1
fi
return 0
Note that boot-rom.sh is more robust than previous versions. The improved logic displays the $HOME directory and also displays an error message if it can't find ROM1/boot.img or ROM2/boot-sd.img under $HOME. If you are using Script Manager to launch boot-rom.sh, go to Settings>More>Advanced>Configuration, set Home directory to {path-to-Boot} (for example, “/storage/sdcard1/Boot” for CM10), press field at bottom to select Home directory, then select “Export $HOME” and “Browse as root”. So when you launch boot-rom.sh from Script Manager, the $HOME directory should be: {path-to-SD-card}/Boot. If not, you get an error message if you enter an argument of 1 or 2 in the command string.
Be sure to launch boot-rom.sh as root.
CM10 Notes
If you unpack any of Emporium's CM10 files named “boot-sd.img”, note that I made two small changes in ramdisk in addition to rerouting filesystem mounts:
The “init” executable was replaced with the MROM ICS init
init.olympus.rc was modified to grant elevated privileges in mkdir /storage/sdcard{0,1} per the MROM ICS init.olympus.rc
I found these two additional steps necessary to successfully boot CM10 from SD and to make apps run properly. That said, these “boot-sd.img” files should be viewed as experimental, as your mileage may differ. But no kernels were modified.
I think that porting CM10 to SD has some merit as the /system partition is easily up-sized to hold apps moved from the /data partition. Why would I make this obscure statement? Well it turns out that CM10 apps running under /system appear to have more privileges than those running under /data. I demonstrated this behavior on at least two different CM10 builds hosted on both EMMC and SD using “aLogcat” a GUI-based system logcat generator. When I launched aLogcat under /data/app, it would not display logcat to screen nor save results to a file. Then I moved it to /system/app and the problems disappeared.
Enjoy.
Troubleshooting
No wifi? Try re-flashing with Emporium since it refreshes /system/lib/modules.
Soft-brick? You may have attempted to boot a non-existent, corrupt or incompatible ROM.
Unusually fast completion of zip flash? An error has probably occurred, and you may need adb and recovery log to debug.
Disclaimer: Standard disclaimers apply.
Credits: Embedded in the zip files.
Photos and Screenshots
SmartPart FZ Before and After (in adb shell):
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Emporium V3.0 Directory Structure
More on the way!
beautiful
B-e-a-u-t-i-f-u-l
Great work......I will try it. Thanks
from the (M)ATRIX...
Awesome stuff, as usual.
can you explain what exactly is this? what we will be able to do with it?
antmiu2 said:
can you explain what exactly is this? what we will be able to do with it?
Click to expand...
Click to collapse
It automates dual ROM setup and usage.
antmiu2 said:
can you explain what exactly is this? what we will be able to do with it?
Click to expand...
Click to collapse
It generates a "live" backup of your existing ROM on your SD card --- a ROM you can boot to. Then you can flash another ROM to internal memory just as you normally would.
If all goes well, you will have successfully dual booted your Atrix.
Here's the original xda article on dual booting Atrix: http://www.xda-developers.com/android/atrix-4g-dual-booting-method-for-linux-and-windows/
sendust7 said:
If you are using Script Manager to launch boot-rom.sh, go to Settings>More>Advanced>Configuration, set Home directory to {path-to-Boot} (for example, “/storage/sdcard1/Boot” for CM10), press field at bottom to select Home directory, then select “Export $HOME” and “Browse as root”. So when you launch boot-rom.sh from Script Manager, the $HOME directory should be: {path-to-SD-card}/Boot. If not, you get an error message if you enter an argument of 1 or 2 in the command string.
Click to expand...
Click to collapse
Hi sendust. Thank you very much! :good:
Managed to succesfully run TheBill's PA 299 from my sdcard (using AOKP boot.img) and restore and run a backup of a GB rom (nottachtrix based) to/from emmc.
I also managed to reboot from GB to PA299 using Script Manager by following the above quoted steps.
I can't seem to get Script Manager to run the same script from PA299 using 1 as argument to reboot into my GB rom. I did set Home directory as instructed to /storage/sdcard1/Boot but the log still says Home = / and it returns boot.img not found.
Any help would be appreciated
cheers
n1c00_
n1c00_ said:
Hi sendust. Thank you very much! :good:
Managed to succesfully run TheBill's PA 299 from my sdcard (using AOKP boot.img) and restore and run a backup of a GB rom (nottachtrix based) to/from emmc.
I also managed to reboot from GB to PA299 using Script Manager by following the above quoted steps.
I can't seem to get Script Manager to run the same script from PA299 using 1 as argument to reboot into my GB rom. I did set Home directory as instructed to /storage/sdcard1/Boot but the log still says Home = / and it returns boot.img not found.
Any help would be appreciated
cheers
n1c00_
Click to expand...
Click to collapse
Great to hear of your success!
I experienced similar behaviour with Script Manager (SM) running under /system/app. Then I moved it to /data/app and the problem went away.
If SM resides in /data/app and still doesn't work, uninstall it and download the latest version from Play Store.
Here is SM (under /data/app) in action, booting from Neutrino 2.91 (ROM1) to Liquid Smooth (ROM2) ...
sendust7 said:
Great to hear of your success!
I experienced similar behaviour with Script Manager (SM) running under /system/app. Then I moved it to /data/app and the problem went away.
If SM resides in /data/app and still doesn't work, uninstall it and download the latest version from Play Store.
Click to expand...
Click to collapse
Thanks. SM already resides in data/app and reinstalation from Store didn't help.
I realise the problem is with SM and not with the script cause it runs fine in GB
Are there any other options?
Here's what I get
Thanks a million!
n1c00_
[Deleted --- Redundant.]
n1c00_ said:
Thanks. SM already resides in data/app and reinstalation from Store didn't help.
I realise the problem is with SM and not with the script cause it runs fine in GB
Are there any other options?
Here's what I get
Thanks a million!
n1c00_
Click to expand...
Click to collapse
I would check permissions for SM. Below is what I have for CM10 Liquid Smooth (scroll down to "os.tools.scriptmanager-1.apk"). Note that the permissions match those of the other apps.
Another option would be to configure a different app like Terminal Emulator to execute boot-rom.sh as root from the Boot directory.
[email protected]:~# adb kill-server
[email protected]:~# adb shell
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
[email protected]:/ $ su
[email protected]:/ # cd /data/app
[email protected]:/data/app # ls -ld *.apk
-rw-r--r-- root root 5433305 2013-02-02 16:35 Magazines.apk
-rw-r--r-- root root 6160306 2013-02-02 16:35 com.android.vending-1.apk
-rw-r--r-- root root 1345436 2013-02-02 16:35 com.devuni.flashlight-2.apk
-rw-r--r-- root root 5615781 2013-02-02 16:35 com.ebay.mobile-1.apk
-rw-r--r-- root root 6284122 2013-02-01 13:50 com.google.android.apps.currents-1.apk
-rw-r--r-- root root 7232165 2013-02-01 13:50 com.google.android.apps.maps-2.apk
-rw-r--r-- root root 3591566 2013-02-01 13:50 com.google.android.gm-2.apk
-rw-r--r-- root root 4075228 2013-02-01 13:50 com.google.android.gms-1.apk
-rw-r--r-- root root 6149925 2013-02-01 13:50 com.google.android.youtube-2.apk
-rw-r--r-- root root 16600426 2013-02-02 16:35 com.instagram.android-1.apk
-rw-r--r-- root root 5787419 2013-02-02 16:35 com.keramidas.TitaniumBackup-1.apk
-rw-r--r-- root root 316047 2013-02-02 16:35 com.liveov.shotuxtrial-1.apk
-rw-r--r-- root root 7116916 2013-02-02 16:35 com.mediafire.android-1.apk
-rw-r--r-- root root 6869418 2013-02-02 16:35 com.sirma.mobile.bible.android-1.apk
-rw-r--r-- root root 853905 2013-02-02 16:35 com.socialnmobile.dictapps.notepad.color.note-1.apk
-rw-r--r-- root root 417303 2013-02-02 16:35 com.speedsoftware.rootexplorer-1.apk
-rw-r--r-- root root 1004380 2013-02-02 16:35 com.sportstracklive.stopwatch-1.apk
-rw-r--r-- root root 98247 2013-02-02 16:35 eu.chainfire.cfbench-1.apk
-rw-r--r-- root root 1020803 2013-02-02 16:35 eu.chainfire.supersu-1.apk
-rw-r--r-- root root 84111 2013-02-02 16:35 eu.kowalczuk.rsync4android-1.apk
-rw-r--r-- root root 73631 2013-02-02 16:35 fr.depoortere.android.CircleBatteryWidget-1.apk
-rw-r--r-- root root 343102 2013-02-02 16:35 jackpal.androidterm-1.apk
-rw-r--r-- root root 781592 2013-02-02 16:35 jp.sblo.pandora.jota-1.apk
-rw-r--r-- root root 492578 2013-02-02 16:35 org.cohortor.gstrings-1.apk
-rw-r--r-- root root 1193795 2013-02-02 16:35 os.tools.scriptmanager-1.apk
-rw-r--r-- root root 141061 2013-02-02 16:35 se.qzx.isoextractor-1.apk
-rw-r--r-- root root 671989 2013-02-02 16:35 spinninghead.talkingstopwatchlite-1.apk
-rw-r--r-- root root 303317 2013-02-02 16:35 uk.co.nickfines.RealCalc-1.apk
[email protected]:/data/app #
sendust7 said:
I would check permissions for SM. Below is what I have for CM10 Liquid Smooth (scroll down to "os.tools.scriptmanager-1.apk"). Note that the permissions match those of the other apps. Another option would be to configure a different app like Terminal Emulator to execute boot-rom.sh as root from the Boot directory.
Click to expand...
Click to collapse
After few hours of trial and error finally managed to get it working!
Sendust you're a star!
SM just didn't want to configure (probably) because it was installed while running rom from sd. Once I got it installed running the rom on emmc and copied emmc to sd it kept the configuration. I just had to change the argument.
Thanks and keep up the good work :good:
I dont knlw if i am the only one but its seems I cant use dualboot with ICSROM on SD and CM10 on EMMC, everything show to have been done properly but when i try to boot into ICSROM i have a black screen (no bootlogo ), and when i flashed mrom kernel on ICSROM i get the bootlogo for ever ... :crying:
Any ideas ?
PS i use bootemporium
DBSS Troubleshooting
johnannis said:
I dont knlw if i am the only one but its seems I cant use dualboot with ICSROM on SD and CM10 on EMMC, everything show to have been done properly but when i try to boot into ICSROM i have a black screen (no bootlogo ), and when i flashed mrom kernel on ICSROM i get the bootlogo for ever ... :crying:
Any ideas ?
PS i use bootemporium
Click to expand...
Click to collapse
Troubleshooting manual in work.. I will try to have something in a few hours.
[UPDATE, 05 Feb 2012 1315 PST]
I duplicated the problem on my Atrix. In fact I couldn't even get ICSROM 1.4.6 to boot from EMMC. I tried reformatting /system, /cache and /data and re-flashing. Got a fixed Big-M with fadeout, followed by a single-blink and then blank for many minutes.
Then I CWM flashed MROM boot.img using Emporium 3.0 but it hung up at the pulsating Big-M. In retrospect, I may not have waited long enough.
Then I flashed MROM ICS right over ICSROM and it booted.
Then I reflashed ICSROM 1.4.6 and rebooted. Same behavior as at the start.
Then I CWM factory reset and flashed ICSROM 1.4.3 (previous version). This time, I got pulsating Big-M for several minutes (expected due to factory reset) followed by Location Consent screen, indicating a successful boot. So ICSROM 1.4.3 appears to work.
Then I flashed Emporium's ICSROM 1.4.6 boot.img (EMMC) and rebooted. Big-M came up and then... blank --- as before.
So I reinstalled 1.4.6 ROM, factory reset, fastbooted the 1.4.3 boot image (pulled from ICSROM 1.4.3 zip file) and voila... 1.4.6 came up.
These results intimate an issue with the ICSROM 1.4.6 kernel.
Unfortunately there is not a straightforward means of obtaining kernel debug messages (dmesg >> dmesg.txt) on a failed boot: http://bootloader.wikidot.com/linux:android:kmsg
Now if you Copy-ROM ICSROM 1.4.6 to SD, you need a modified boot image. Try this one:
Link (boot-icsrom-1.4.3-sd.img): http://www.mediafire.com/?57b25z5hkid2bc2
Modified init.olympus.rc code (ramdisk):
Code:
mount ext3 /dev/block/mmcblk1p2 /system noatime nodiratime wait ro barrier=1
mount ext3 /dev/block/mmcblk1p4 /data nosuid nodev noatime nodiratime wait barrier=1
mount ext3 /dev/block/mmcblk1p3 /cache nosuid nodev noatime nodiratime wait barrier=1
[UPDATE, 05 Feb 2012 1630 PST]
OK. I may have found a problem with the stock ICSROM 1.4.6 boot.img. If you unpack it and navigate to /ramdisk/default.prop, you will notice several "read-only" settings --- ones that can only be modified in ramdisk. I made one small change: Set ro.debuggable=1 (instead of 0). Here is the modified default.prop:
Code:
#
# ADDITIONAL_DEFAULT_PROPERTIES
#
ro.secure=0
ro.allow.mock.location=0
ro.debuggable=1
persist.sys.usb.config=mtp
After making this one simple change, I repacked the 1.4.6 boot.img (boot-repack.img) then did the following:
Code:
Reboot to CWM
Perform factory-reset
Flash ICSROM 1.4.6
Reboot to fastboot
fastboot flash boot boot-repack.img
fastboot reboot
This time, I still got the familiar Big-M fadeout followed by the single-blink Big-M. But then 30 seconds later, the pulsating Big-M appeared, and several minutes after that, ICSROM 1.4.6 finally came up.
Link (boot-icsrom-146-emmc.img): http://www.mediafire.com/?5da1ngcny8px14w
Note: In the ICS MROM boot.img, "ro.debuggable" is already set to 1.
The short answer is that the ICS kernels are presently not stable, which is why I hesitated to include them in Atrix Boot Emporium.
Hope this helps.
what happens if i use the smart formater to my ext.sdcard and on the card are swap partitions and webtop partition? do i lose them??
Hai_Duong said:
what happens if i use the smart formater to my ext.sdcard and on the card are swap partitions and webtop partition? do i lose them??
Click to expand...
Click to collapse
I deliberated much about this and decided that for V1.0 I would stick with three (primary) ext partitions.
So yes, if you flash SmartPart FZ V1.0 and select the "Create" option, it will first do this:
Code:
echo "We first remove any existing partitions beyond the FAT32 partition..."
#echo "ENTER to continue; CNTL-Z to exit." ; read
parted /dev/block/mmcblk1 rm 4 > /dev/null 2>&1
parted /dev/block/mmcblk1 rm 3 > /dev/null 2>&1
parted /dev/block/mmcblk1 rm 2 > /dev/null 2>&1
parted /dev/block/mmcblk1 print
and then it wll create three new partitions, one each for /system, /cache and /data:
Code:
parted /dev/block/mmcblk1 mkpartfs primary ext2" $val3" "$val4"
parted /dev/block/mmcblk1 mkpartfs primary ext2" $val5" "$val6"
parted /dev/block/mmcblk1 mkpartfs primary ext2" $val7" "$val8"
where the $val parameter values are partition boundaries based on the FAT32 right-hand boundary and fixed partition sizes defined in the shell script.
sendust7 said:
I deliberated much about this and decided that for V1.0 I would stick with three (primary) ext partitions.
So yes, if you flash SmartPart FZ V1.0 and select the "Create" option, it will first do this:
Code:
echo "We first remove any existing partitions beyond the FAT32 partition..."
#echo "ENTER to continue; CNTL-Z to exit." ; read
parted /dev/block/mmcblk1 rm 4 > /dev/null 2>&1
parted /dev/block/mmcblk1 rm 3 > /dev/null 2>&1
parted /dev/block/mmcblk1 rm 2 > /dev/null 2>&1
parted /dev/block/mmcblk1 print
and then it wll create three new partitions, one each for /system, /cache and /data:
Code:
parted /dev/block/mmcblk1 mkpartfs primary ext2" $val3" "$val4"
parted /dev/block/mmcblk1 mkpartfs primary ext2" $val5" "$val6"
parted /dev/block/mmcblk1 mkpartfs primary ext2" $val7" "$val8"
where the $val parameter values are partition boundaries based on the FAT32 right-hand boundary and fixed partition sizes defined in the shell script.
Click to expand...
Click to collapse
oh thats sad. i wanted to try this because i love to test roms but i dont want to give up on my webtop partition.
Using your 1.4.3 boot.img and it still doesnt want to boot in the rom Dont know why, but after i flash the emmc with another rom it doesnt boot, before that it booted from sd
Sent from my Nexus 4 using xda app-developers app
johnannis said:
Using your 1.4.3 boot.img and it still doesnt want to boot in the rom Dont know why, but after i flash the emmc with another rom it doesnt boot, before that it booted from sd
Sent from my Nexus 4 using xda app-developers app
Click to expand...
Click to collapse
OK that's good info. The file: boot-icsrom-1.4.3-sd.img was intended to boot 1.4.6 on SD. But of course it does not have the "ro.debuggable=1" fix. So when I got 1.4.6 to boot on EMMC using the fix:
Link (boot-icsrom-146-emmc.img): http://www.mediafire.com/?5da1ngcny8px14w
I realized that boot-icsrom-1.4.3-sd.img probably would not boot 1.4.6 on SD. And such was the case for me.
Did you try this:
Code:
Reboot to CWM
Perform factory-reset
Flash ICSROM 1.4.6
Reboot to fastboot
fastboot flash boot boot-icsrom-146-emmc.img
fastboot reboot
I would not be surprised if you got different results based on what the ICSROM author says...
http://forum.xda-developers.com/showthread.php?p=37561654&highlight=work#post37561654 ,
]If someone can post a link I will definitely take a look at it.
But please don't your hopes too high guys. Remember this ROM runs different on every device.
Click to expand...
Click to collapse
[UPDATE 07 Feb 2013, 0745 PST]
So I unpacked the ICSROM 1.4.6 and MROM boot images and found that the ICSROM init.olympus.rc (the device-specific script launched at boot time by the init process) is three times the size of MROM's init.olympus.rc.]. More to follow...

[GUIDE] Making Dump Files Out of Android Device Partitions

Use:
The main purpose is to make a file that contains all data in android specific partition. This is really handy in case of dumping leak firmwares.
Pr-requirement:
- Rooted device.
- Knowledge of how to use adb or Terminal Emulator.
The first step of making dump files out of device partitions is to locate its mounting points..!!
So in our tutorial, we will make it in 2 sections. Section 1 for how to get mounting points, and section 2 for how to get partition dumped..
Keep in mind that this is xda-university; so my target is to show beginners how to do that manually, without the aid of any tool, so they can get the concept behind it.. OK let's begin..!!
Section 1:
Getting mounting points​There are several methods to achieve this, but we will discuss the easiest methods that give efficient information about the partition that you want to know its mounting point.
All these methods will be described using adb shell.
Way #1
Code:
adb shell
cat /proc/partitions
This one needs from you to figure out which block belong to which partition name.!!
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Way #2
Code:
adb shell
ls -al /dev/block/platform/[B][COLOR="Blue"]dw_mmc[/COLOR][/B]/by-name
This one will give you info about the dev block names WITH their familiar names (i.e, boot, recovery, system... etc)
This command is not universal between devices, and you will need to gather its pieces (/dev/block/platform/dw_mmc/by-name).
How?
- In your device, use any explorer that can get you to the device root (personally I use ES Explorer, by pressing on "/" on navigation bar).
- Go to "/dev/block/platform/" folder
- Here you will see some files and folders, we need to open folders and search for the folder called "by-name" inside one of them; in my situation it was "dw_mmc" folder which has the folder "by-name" inside it.
- At the end, my targeted piece info will be (/dev/block/platform/dw_mmc/by-name)
- Now open adb shell and put that command..
Way #3
By pushing parted binary to /system/bin folder and run it (you can find it in attachment).
Code:
adb remount
adb shell "su" "" "mount -o remount,rw /system"
adb push parted /system/bin/parted
adb shell
chmod 0755 /system/bin/parted
parted /dev/block/[B][COLOR="Blue"]mmcblk0[/COLOR][/B]
print
Here, your mounting points will start with /dev/block/mmcblk0p* where (*) is the number shown in the table above for each partition.
example:
The hidden partition mounting point will be mmcblk0p10
The radio partition mounting point will be mmcblk0p7
The system partition mounting point will be mmcblk0p9
The recovery partition mounting point will be mmcblk0p6
and so on
Don't forget to "quit" the parted action after grasping your device mounting points.
N.B:
- You may need to run first:
Code:
adb shell
cat /proc/partitions
to know what is the initial name for your device partition.. In the example above, it was mmcblk0.
- Also to be able to do adb push to /system partition for parted binary, you will need insecure boot.img used in your ROM or adbd insecure installed in your device (Check this thread for that app), or just push parted binary manually by any root explorer and then fix permissions to rwxr-xr-x (755).
***​
Section 2:
Dumping ROM partition​After locating the mounting point of the partition you want to dump, open adb shell command prompt and type:
Code:
adb shell
su
dd if=[B][COLOR="Blue"]/yourMountingPoint[/COLOR][/B] of=[B][COLOR="Green"]/yourDestination[/COLOR][COLOR="Red"]/partitionType[/COLOR][/B]
Let's say I want to take a dump out of system partition from above example. So the adb commands will be:
Code:
adb shell
su
dd if=[B][COLOR="Blue"]/dev/block/mmcblk0p9[/COLOR][/B] of=[B][COLOR="Green"]/sdcard[/COLOR][COLOR="Red"]/system.img[/COLOR][/B]
This may take a while to complete the dumping process, depending on the size of your dumped partition; so be patient..
Note:
If the partition is formatted as ext3/4 then the dumped partition will have .img as an extension.
Other partition dumps have different extensions; examples:
radio.bin
param.lfs
Sbl.bin
zImage (without extension)
***​
Optional:
Read Partition Image​After dumping an image from android partition, you can mount it to extract a particular file for sharing, or the whole dump content in case the ROM chief wants to make a ROM out of dump files..
For Linux Users:
- Open terminal and type:
Code:
su -
mkdir -p /mnt/disk
mount -o loop [B][COLOR="Red"]yourImage.img[/COLOR][/B] /mnt/disk
cd /mnt/disk
ls -l
For Windows Users:
- Download LinuxReader from this site here.
- Open it -> Drives -> Mount Image -> Then choose your dumped image and hit Mount. A new driver will appear that contains all files inside the dumped image called "Linux native Volume 1". Just double click it to get inside the dumped image.
I hope you will find this tutorial beneficial,,,
Yours;
Actions Explanation
★ Tutorial Legends ★​
In this post, I will try to explain the use of each binary used in the tutorial, so you can make sense of each action taken.
#1
Code:
adb shell
Run remote shell interactively, as if you are in linux terminal.
Click to expand...
Click to collapse
#2
Code:
cat /proc/partitions
cat binary is used to concatenate file(s) and print them to standard output display. In our example, it prints the content of partitions file which is found in proc folder to screen display.
Click to expand...
Click to collapse
#3
Code:
ls -al /dev/block/platform/dw_mmc/by-name
ls binary is used to list directory contents.
-al is the used option for ls which means to include entries that started with "." in long listing format. There are a lot of options for ls binary. You can always print ls --h to display help menu for other options available.
Click to expand...
Click to collapse
#4
Code:
adb remount
Remounts the /system partition on the device read / write. This has been disabled in some devices (those with secure boot image); so you need to make sure that you have patched adbd that can run this command effectively.
Click to expand...
Click to collapse
#5
Code:
su
Used to get super-user privilege.
Click to expand...
Click to collapse
#6
Code:
mount -o remount,[B][COLOR="Red"]rw[/COLOR][/B] /system
Specific command to mount the /system partition on the device read / write (rw).
If you change rw to ro, you will get /system partition mounted as read only.
Click to expand...
Click to collapse
#7
Code:
adb push parted /system/bin/parted
adb push is used to copy file/dir from your local computer to android device. The usual format is adb push <local> <remote>
Click to expand...
Click to collapse
#8
Code:
chmod 0755 /system/bin/parted
chmod binary is used to set permissions for the specified file/dir.
The number after chmod is the permission used. See the next box for better understanding of chmod formatting:
Code:
[CENTER][B][COLOR="Red"]----------------
| CHMOD SCHEME |
----------------[/COLOR][/B][/CENTER]
[B] r w x[/B]
[B]4 2 1 [COLOR="Green"]= 7 (Full Permissions)[/COLOR][/B]
User ( ) ( ) ( ) [B][COLOR="Green"]--> 2nd digit[/COLOR][/B]
Group ( ) ( ) ( ) [B][COLOR="Green"]--> 3rd digit[/COLOR][/B]
Other ( ) ( ) ( ) [B][COLOR="Green"]--> 4th digit[/COLOR][/B]
Special UID GID STK
( ) ( ) ( ) [B][COLOR="Green"]--> 1st digit, ignored on most cases or put 0[/COLOR][/B]
In the above example, it is set to 0755 which means the following scheme:
Code:
[B] r w x[/B]
[B]4 2 1[/B]
User ([B][COLOR="Red"]*[/COLOR][/B]) ([B][COLOR="Red"]*[/COLOR][/B]) ([B][COLOR="Red"]*[/COLOR][/B]) [B][COLOR="Green"]--> This equals to 7 (rwx)[/COLOR][/B]
Group ([B][COLOR="Red"]*[/COLOR][/B]) ( ) ([B][COLOR="Red"]*[/COLOR][/B]) [B][COLOR="Green"]--> This equals to 5 (r-x)[/COLOR][/B]
Other ([B][COLOR="Red"]*[/COLOR][/B]) ( ) ([B][COLOR="Red"]*[/COLOR][/B]) [B][COLOR="Green"]--> This equals to 5 (r-x)[/COLOR][/B]
Special UID GID STK
( ) ( ) ( ) [B][COLOR="Green"]--> This equals to 0 (---)[/COLOR][/B]
As you can see, if you said 0755, it will be as same as saying ---rwxr-xr-x
Click to expand...
Click to collapse
#9
Code:
dd if=/dev/block/mmcblk0p9 of=/sdcard/system.img
dd binary is used to copy a file with converting and formatting.
if means input file; here we pointed to the whole partition, not specific file.
of means outputting file to specific destination path; here it is to sdcard with system.img name.
Click to expand...
Click to collapse
#10
Code:
mkdir -p /mnt/disk
mkdir binary is used to make folder dir.
-p is mkdir option which means to create folder with sub-folder at the same time. Here we want to create mnt folder that contains disk sub-folder in it. If the folder and or sub-folder(s) are already exists, it will not give error but nothing will be created.
Click to expand...
Click to collapse
#11
Code:
mount -o loop yourImage.img /mnt/disk
This is linux way to mount images into specific directory (/mnt/disk in this example).
Click to expand...
Click to collapse
#12
Code:
cd /mnt/disk
cd used to get inside specific dir path.
Click to expand...
Click to collapse
#13
Code:
ls -l
ls binary is used to list directory contents as described above.
-l is the used option for ls which means to list contents in long listing format.
Click to expand...
Click to collapse
Cheers
another way to get common names
on way #2, I've often used:
Code:
cat /proc/emmc
on a few devices to reveal similar info.
Rob
can i able to mount boot.img in android itself...actually i wanted to extract boot.img frm mobile without any tools or without the help of PC...if there be any possibilities..??
hasan4791 said:
can i able to mount boot.img in android itself...actually i wanted to extract boot.img frm mobile without any tools or without the help of PC...if there be any possibilities..??
Click to expand...
Click to collapse
if you mean extract to modify boot.img, then I don't think there is away to do that from device itself in the moment..
if you mean dumping boot.img then yes you can, just install terminal emulator from Google play and you can run adb shell commands directly from the device
Great guide hopefully makes it easier for us to get dumps! if you add logcats etc, i find they have trouble executing "adb logcat >> log.txt" -.-
also you should teach them the easy tar method, so while booted "tar -c /system/* >> /sdcard/system.tar" or via adb shell
ricky310711 said:
Great guide hopefully makes it easier for us to get dumps! if you add logcats etc, i find they have trouble executing "adb logcat >> log.txt" -.-
also you should teach them the easy tar method, so while booted "tar -c /system/* >> /sdcard/system.tar" or via adb shell
Click to expand...
Click to collapse
Yup that is possible and easy to extract but it is only for partitions that is shown in android os,,, you can't use it for boot.img, sbl.bin, modem.bin...etc right
majdinj said:
Yup that is possible and easy to extract but it is only for partitions that is shown in android os,,, you can't use it for boot.img, sbl.bin, modem.bin...etc right
Click to expand...
Click to collapse
ofcoarse, i actually had a project going where it detects all partitions(modems, boot.img, system etc..) that archives itself into a .zip
it was going well until i did something in the script, now it only works on the s3 it shall be continued one day!
Such great tutorial, this is definitely going to come in handy for me. I have a question, how can you dump (extract) a bootloader? Can i use the same method as dumping the ROM?
Could you explain how to extract stock recovery image please?
Sent from my HTC One using xda app-developers app
Where did the parted binary come from?
For Gods Sake
http://forum.xda-developers.com/sho...IDE] Unpack/repack ext4 Android system images
http://forum.xda-developers.com/sho... Creator (deployable over all kernel sources)
http://forum.xda-developers.com/sho...ipt]Backup all paritions on i9505 to odin rom
http://forum.xda-developers.com/sho...al 4.3 TW Custom Rom/ The ORIGINAL WIFI TRICK
... use Forum Search Engine first, then start asking all your 'important' questions
¤ GT-I9505 - powered by KitKat ¤
insink71 said:
on way #2, I've often used:
Code:
cat /proc/emmc
on a few devices to reveal similar info.
Rob
Click to expand...
Click to collapse
Thx for this. On my HTC One there is no "by-name" folder. It only has "by-num". cat /proc/emmc works fine though.
Cheers.
I also wrote a guide, It just using the "by-name"
and needs root
[HOWTO] dump your rom
Code:
dd if=/dev/block/platform/msm_sdcc.1/by-name/system of=/storage/extSdCard/system.img
dd if=/dev/block/platform/msm_sdcc.1/by-name/recovery of=/storage/extSdCard/recovery.img
dd if=/dev/block/platform/msm_sdcc.1/by-name/param of=/storage/extSdCard/param.img
dd if=/dev/block/platform/msm_sdcc.1/by-name/boot of=/storage/extSdCard/boot.img
Hi,
I tried this on my I-9505G. It is NOT rooted, so I thought I could enter the system through Clockworkmod Recovery.
I did it, but at first I didn't mount the DATA partition (later on I did through CWM Recovery); I still ran the command:
dd if=/dev/block/platform/msm_sdcc.1/by-name/system of=/data/media/TEST/system.img
Thought I hadn't mounted anything, the media folder was still there, I only created the TEST folder.
After the image was created I typed the "ls" command and the system.img file was in /data/media/TEST/.
I then rebooted once again in CWM and ran the "adb shell" command once again, I entered /data/media/ e neither the img file nor the TEST folder I had created were there.
My question is: where have they gone?? Are they still occupying some of my space or they just got deleted automatically when I rebooted??
Please let me know as I'd like to free that extra unuseful 1.2 Gb system.img file.
Anyway, just as side information, I later on mounted the /data through CWM interface and was able to see the folders ("/data/media/0/") I can see by plugging the phone normally to the computer. I then dumped the image.
I have some other questions:
I can I mount the /data folder (or the external SD) via command?
What extention should I give to the other partitions? (All of them)
Why did you say that it's MANDATORY that the phone be rooted if it can be done this way?
Are the images I'm dumping flashable through fastboot?
Thank you all for your time!
Anybody? Please.
•I can I mount the /data folder (or the external SD) via command?
I have not been able to find the SD card in clockwork on the I9505G, hence one of my rooting procedures send the root file vi "adb sideload".
I might be able to pull the data from the phone but the clockwork recovery is still not working 100% when fastbooting it.
•What extention should I give to the other partitions? (All of them)
.img are fine.
•Why did you say that it's MANDATORY that the phone be rooted if it can be done this way?
currently it is required that the phone be unlocked. Something need to be fixed in clockwork to make it work any other way.
•Are the images I'm dumping flashable through fastboot?
They should be, but I have not been able to flash anything on the I9505G vi fastboot because of the secure boot.
without a full official image this make my playing around a little concerning (slowing me down).
I will look into this at my leisure. I would love to be able to pull a rom off a phone with only unlocking it.
I will test some stuff using my old galaxy nexus.
I actually dumped everything WITHOUT being rooted. I only unlocked the bootloader... So it works.
Further, I tried to run "fastboot boot recovery.img" with recovery.img being the image file I dumped. The phone froze and I had to pull the battery... So I assume they're not flashable as well, though I'd like other feedbacks.
I've not clearly understood what "secure boot" means. Any guide or wiki?
Thanks!
---------- Post added at 06:56 PM ---------- Previous post was at 06:55 PM ----------
I actually dumped everything WITHOUT being rooted. I only unlocked the bootloader... So it works.
Further, I tried to run "fastboot boot recovery.img" with recovery.img being the image file I dumped. The phone froze and I had to pull the battery... So I assume they're not flashable as well, though I'd like other feedbacks.
I've not clearly understood what "secure boot" means. Any guide or wiki?
Thanks!
Hey, great guide! I need some help but. I can't retrieve the common names / labels of my devices partitions. It's a GT-i8150 and there is no 'by-name' sub directory. Furthermore, parted does not work on mmcblk0 for some reason (unable to satisfy partition restraints or something). I also have no emmc file in proc.
Does anyone know how some other methods for getting the names of the partitions?
EDIT:
Another question - using ADB shell, is it possible to dump a partition straight from the phone onto the computers hard drive? My little 2GB sd card isn't coping! Thanks
a very basic but good guide
Sent from my GT-P1000 using xda app-developers app

[Question] Samsung GS3 mini (I8190) EFS script

I have device with IMEI NULL that I want to mount (or replace the efs into generic) in adb in similar with this script:
cd c:/androidsdk/tools
adb shell
su
mke2fs /dev/block/mmcblk0p3 ( skip to next step if fail)
mount -w -t ext4 /dev/block/mmcblk0p3
reboot
Click to expand...
Click to collapse
I tried the above script but unfortunately it brokes the partition because I think that code is not for i8190, but no worry about that because I already managed to fix it with pit file.
Anybody can share it with me?especially developers please.
Thanks in advance.
cz4r3n said:
I have device with IMEI NULL that I want to mount (or replace the efs into generic) in adb in similar with this script:
I tried the above script but unfortunately it brokes the partition because I think that code is not for i8190, but no worry about that because I already managed to fix it with pit file.
Anybody can share it with me?especially developers please.
Thanks in advance.
Click to expand...
Click to collapse
0p3 is PIT partition. mmcblk0p11 is EFS, but i'm not sure what you're trying to do here.
tys0n said:
0p3 is PIT partition. mmcblk0p11 is EFS, but i'm not sure what you're trying to do here.
Click to expand...
Click to collapse
I'm trying to mount the efs to create generic efs.tnx for the reply
EDIT: Is this the proper way of mounting or formatting efs?
Can I used this command in general?
adb shell
mke2fs -T ext4 /dev/block/mmcblk0p11
mkdir /efs
mount -w -t ext4 /dev/block/mmcblk0p11 /efs
Click to expand...
Click to collapse
cz4r3n said:
I'm trying to mount the efs to create generic efs.tnx for the reply
EDIT: Is this the proper way of mounting or formatting efs?
Can I used this command in general?
Click to expand...
Click to collapse
I think it could work. Otherwise try
Code:
mount -o rw,remount -t ext4 /dev/block/mmcblk0p11 /efs
tys0n said:
I think it could work. Otherwise try
Code:
mount -o rw,remount -t ext4 /dev/block/mmcblk0p11 /efs
Click to expand...
Click to collapse
I tried and here is the log:
D:\adbsdk\sdk\platform-tools>adb shell
~ # ←[6nmke2fs -T ext4 /dev/block/mmcblk0p11
mke2fs -T ext4 /dev/block/mmcblk0p11
mke2fs 1.41.11 (14-Mar-2010)
/dev/block/mmcblk0p11 is apparently in use by the
stem here!
~ # ←[6nmkdir /efs
mkdir /efs
mkdir: can't create directory '/efs': File exists
Click to expand...
Click to collapse
cz4r3n said:
I tried and here is the log:
Click to expand...
Click to collapse
Ok. Only thing I can think of is to do it from recovery and try to unmount it first.
tys0n said:
Ok. Only thing I can think of is to do it from recovery and try to unmount it first.
Click to expand...
Click to collapse
I'm doing it in recovery mode.Im using Team Win Recovery Project v2.6.0.0.
here is the log after unmounting efs from recovery:
D:\adbsdk\sdk\platform-tools>adb shell
~ # ←[6nmke2fs -T ext4 /dev/block/mmcblk0p11
mke2fs -T ext4 /dev/block/mmcblk0p11
mke2fs 1.41.11 (14-Mar-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
1024 inodes, 4096 blocks
204 blocks (4.98%) reserved for the super user
First data block=0
1 block group
32768 blocks per group, 32768 fragments per group
1024 inodes per group
Writing inode tables: done
Creating journal (1024 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 35 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
~ # ←[6nmkdir /efs
mkdir /efs
mkdir: can't create directory '/efs': File exists
~ # ←[6nmount -w -t ext4 /dev/block/mmcblk0p11 /efs
mount -w -t ext4 /dev/block/mmcblk0p11 /efs
~ # ←[6n
Click to expand...
Click to collapse
cz4r3n said:
I'm doing it in recovery mode.Im using Team Win Recovery Project v2.6.0.0.
here is the log after unmounting efs from recovery:
Click to expand...
Click to collapse
Yeah, your /efs dir is still in root directory, but it looks like you got it formated and remounted.
double post (deleted)
ah ok, ya I think so, because it shows factory mode in the screen already.I am expecting that the imei will be converted to 004 but it still shows null.
Anyway, tnx for a big hand.Now then, I'll try to use special box to re-write the original imei.tnx tnx...really appreciate it
cz4r3n said:
ah ok, ya I think so, because it shows factory mode in the screen already.I am expecting that the imei will be converted to 004 but it still shows null.
Anyway, tnx for a big hand.Now then, I'll try to use special box to re-write the original imei.tnx tnx...really appreciate it
Click to expand...
Click to collapse
You got any files in your /efs now?
tys0n said:
You got any files in your /efs now?
Click to expand...
Click to collapse
I used Root Explorer to check the folder and my imei is empty.Unfortunately I have no efs backup.
Any recommendation sir?tnx
cz4r3n said:
I used Root Explorer to check the folder and my imei is empty.Unfortunately I have no efs backup.
Any recommendation sir?tnx
Click to expand...
Click to collapse
Any "FactoryApp" folder in /efs? If so, try
Code:
adb shell
su
echo -n ON > /efs/FactoryApp/factorymode
to get out of factory mode. Then reboot.
Use dialpad and enter *#*#0011#, use menu button and choose "back" , menubutton and "back" again. There you should have an option to rebuild/restore NV. Doubt it will bring back IMEI tho :/
tys0n said:
Any "FactoryApp" folder in /efs? If so, try
Code:
adb shell
su
echo -n ON > /efs/FactoryApp/factorymode
to get out of factory mode. Then reboot.
Use dialpad and enter *#*#0011#, use menu button and choose "back" , menubutton and "back" again. There you should have an option to rebuild/restore NV. Doubt it will bring back IMEI tho :/
Click to expand...
Click to collapse
It's not working, I dialed *#*#0011# and pressed menu or home button (am I right?) there is no option in choosing "back".
cz4r3n said:
It's not working, I dialed *#*#0011# and pressed menu or home button (am I right?) there is no option in choosing "back".
Click to expand...
Click to collapse
After *#*#0011# you should get to factoryapp settings. When you push menubutton you will get a menu where you can choose back.
Btw, are you on stock rom?
tys0n said:
After *#*#0011# you should get to factoryapp settings. When you push menubutton you will get a menu where you can choose back.
Btw, are you on stock rom?
Click to expand...
Click to collapse
Yes I'm on stock rom.Btw, I used this *#0011# and it prompt me in Service Menu and I used below method also but it's not working:
1. Dial *#0011#
2. press Menu then tap BACK
3. press the Menu again the tap KEY INPUT then enter 1, (wait a few seconds) it auto jumped into service menu.
4. press Menu then tap BACK
Your are now in the SERVICE MODE MAIN MENU
Click to expand...
Click to collapse
Service Menu still blank
cz4r3n said:
Yes I'm on stock rom.Btw, I used this *#0011# and it prompt me in Service Menu and I used below method also but it's not working:
Service Menu still blank
Click to expand...
Click to collapse
Not sure why that is :/ Try to reflash stock in odin.
tys0n said:
Not sure why that is :/ Try to reflash stock in odin.
Click to expand...
Click to collapse
I already did.before I'm on 4.1.2 but i downgraded to 4.1.1 to make sure.but still no luck...
I think because of the absence of nv_data.
cz4r3n said:
I already did.before I'm on 4.1.2 but i downgraded to 4.1.1 to make sure.but still no luck...
Click to expand...
Click to collapse
Ok. I'll send you a pm. Let's see if we can work this out.

Data partition can’t format

I have a Chinese version of k20 pro, and a friend gave it to me because it could not be repaired. Bootloader has been unlocked and can enter fastboot and twrp recovery at present. But recovery shows
"primary block device ‘/dev/block/bootdevice/by-name/userdata’ for mount point ‘/data’ is not present!
Failed to mount ‘/data’(invalid argument)”
I tried format data and change file system in twrp, but it didn't work. I also tried fastboot flash userdata, and he displayed
"failed (remoteartition not found).
I also downloaded the official system and used fastboot to execute "flash_all.sh". Halfway through the execution, it displayed
"error:cannot load'./images/ system.img' :value too large for defined data type. flash system error”
Is there a way to solve it? I'm not in China, so I can't send it back to official repairs.
(I don’t have a windows pc to use it now) The previous fastboot operation was done using raspberry pi 4
xperiazu21 said:
I have a Chinese version of k20 pro, and a friend gave it to me because it could not be repaired. Bootloader has been unlocked and can enter fastboot and twrp recovery at present. But recovery shows
"primary block device ‘/dev/block/bootdevice/by-name/userdata’ for mount point ‘/data’ is not present!
Failed to mount ‘/data’(invalid argument)”
I tried format data and change file system in twrp, but it didn't work. I also tried fastboot flash userdata, and he displayed
"failed (remoteartition not found).
I also downloaded the official system and used fastboot to execute "flash_all.sh". Halfway through the execution, it displayed
"error:cannot load'./images/ system.img' :value too large for defined data type. flash system error”
Is there a way to solve it? I'm not in China, so I can't send it back to official repairs?.
(I don’t have a windows pc to use it now) The previous fastboot operation was done using raspberry pi 4?
Click to expand...
Click to collapse
what happens if
Fastboot erase userdata
[email protected] said:
what happens if
Fastboot erase userdata
Click to expand...
Click to collapse
Thanks in advance for your reply! After I tried it, he showed
"failed(remote: check device console.).“
If I erase other partitions, such as cache, it can be finished.
I also tried to extract userdata.img to flash from the official fastboot. Use fastboot flash userdata userdata.img, it displays
"failed(remote;partition not found)"
Try flashing from mi flash tool... From an windows pc. Do not choose lock option.
---------- Post added at 07:25 PM ---------- Previous post was at 06:55 PM ----------
Try this also
The data partition is sda31 for this device so
Go to recovery.. Terminal... Type Belo command
mke2fs -T ext4 /dev/block/sda31
tune2fs –L userdata /dev/sda31
Then reboot
Flash a fastboot image... System etc
If fastboot failed to flash system.img take the image to sdcard install image from recovery.
Tell me what happens.
[email protected] said:
Try flashing from mi flash tool... From an windows pc. Do not choose lock option.
---------- Post added at 07:25 PM ---------- Previous post was at 06:55 PM ----------
Try this also
The data partition is sda31 for this device so
Go to recovery.. Terminal... Type Belo command
mke2fs -T ext4 /dev/block/sda31
tune2fs –L userdata /dev/sda31
Then reboot
Flash a fastboot image... System etc
If fastboot failed to flash system.img take the image to sdcard install image from recovery.
Tell me what happens.
Click to expand...
Click to collapse
I will find windows pc to try miflash during the holiday!
I tried the command in the terminal, it showed
"the file /dev/block/sda31 does not exist and no size was specified".
I changed the recovery to orange fix, and used the file browser to view /dev/block, but I didn't see sda31:crying:
Show me the output of below command in orange fox terminal
fdisk -l
And also
fdisk /dev/sda
p
[email protected] said:
Show me the output of below command in orange fox terminal
fdisk -l
And also
fdisk /dev/sda
p
Click to expand...
Click to collapse
I tried the fdisk -l and fdisk /dev/sda commands, and the message in the picture was displayed.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
(Sorry I can't save the screenshot to the usb device)
-------Update-------
I tried to replace the recovery with wzsx150's twrp
and execute command “parted /dev/block/sda”
The GPT table seems to be damaged, can it be repaired?
Y.. After the last ss inside parted..
Type p enter
Show me the ss..
You have to recreate partition table tru parted
[email protected] said:
Y.. After the last ss inside parted..
Type p enter
Show me the ss..
You have to recreate partition table tru parted
Click to expand...
Click to collapse
I'm sorry for my bad English:crying:
I don't know what you mean very much, what should I do now?
Parted /dev/block/sda
Inside parted cmd prompt type
(parted) print
Show me the screen shot
Use orange fox latest recovery... F disk will work there
[email protected] said:
Show me the output of below command in orange fox terminal
fdisk -l
And also
fdisk /dev/sda
p
Click to expand...
Click to collapse
[email protected] said:
Parted /dev/block/sda
Inside parted cmd prompt type
(parted) print
Show me the screen shot
Use orange fox latest recovery... F disk will work there
Click to expand...
Click to collapse
Thank you for your detailed explanation!
I downloaded the latest version of orange fix recovery and executed parted command. The message is still the same as before.
Use fdisk in latest orange fox.
Check details first. Get partition table
[email protected] said:
Use fdisk in latest orange fox.
Check details first. Get partition table
Click to expand...
Click to collapse
I typed "fdisk /dev/block/sda”, and then typed “p” in the command, showing all the partitions.
The end sector of the userdata partition seems to be a problem?
Ok... See partition no 31 which is data partition has start and end address wrong. Thats the issue.
Just re create this partition... It will start working then.
Type fdisk /dev/sda
Type d to proceed to delete a partition
Type 31 to select the 31st partition and press enter
This will delete data partition.
Then create it
[email protected] said:
Ok... See partition no 31 which is data partition has start and end address wrong. Thats the issue.
Just re create this partition... It will start working then.
Type fdisk /dev/sda
Type d to proceed to delete a partition
Type 31 to select the 31st partition and press enter
This will delete data partition.
Then create it
Click to expand...
Click to collapse
I cannot use the /dev/sda path, I can only use the /dev/block/sda path
How should I delete partition 31? It has only 4 actions and no delete option
My mistake...
/dev/block/sda
This guide will help u
https://tldp.org/HOWTO/Partition/fdisk_partitioning.html
Btw hw r u taking screen shot of orange fox?
/ $ su
:/ # busybox fdisk /dev/block/sda
Note: sector size is 4096 (not 512)
Found valid GPT with protective MBR; using GPT
Command (m for help): p
Disk /dev/block/sda: 237158400 sectors, 704M
Logical sector size: 4096
Disk identifier (GUID): 6ca8833f-cde5-e7e6-50f2-77495c5b84a2
Partition table holds up to 32 entries
First usable sector is 6, last usable sector is 29644794
Number Start (sector) End (sector) Size Name
1 6 7 8192 switch
2 8 15 32768 ssd
3 16 23 32768 dbg
4 24 31 32768 bk01
5 32 63 128K bk02
6 64 127 256K bk03
7 128 255 512K bk04
8 256 383 512K keystore
9 384 511 512K frp
10 512 1023 2048K bk05
11 1024 2047 4096K misc
12 2048 3071 4096K vm-data
13 3072 4095 4096K bk06
14 4096 6143 8192K logfs
15 6144 8191 8192K bk07
16 8192 12287 16.0M oops
17 12288 16383 16.0M devinfo
18 16384 20479 16.0M oem_misc1
19 20480 24575 16.0M metadata
20 24576 32603 31.3M bk08
21 32604 40959 32.6M splash
22 40960 49151 32.0M bk09
23 49152 65535 64.0M persist
24 65536 81919 64.0M persistbak
25 81920 98303 64.0M logdump
26 98304 131071 128M minidump
27 131072 163839 128M rawdump
28 163840 180223 64.0M recovery
29 180224 245759 256M cache
30 245760 507903 1024M cust
31 507904 29644794 111G userdata
Command (m for help):
Given partition table for a correct device. Taken in my own device.
[email protected] said:
My mistake...
/dev/block/sda
This guide will help u
https://tldp.org/HOWTO/Partition/fdisk_partitioning.html
Btw hw r u taking screen shot of orange fox?
Click to expand...
Click to collapse
Use the volume down and power button, the photo will be stored in /tmp, copy the image to usb_otg.
Thank you very much, you saved this phone, I flashed it to miui eu rom, it works well!
In the end, I did not use fdisk to modify, but gdisk.
fdisk seems to be unable to perform too many operations on the gpt format. Using gdisk is similar to fdisk.
Thank you again, and google translate XD.
Now you help two person in future...
And then tell them to help two and so on recursively.
Also let me know gdisk binary details.. Where u got it...?
[email protected] said:
Now you help two person in future...
And then tell them to help two and so on recursively.
Also let me know gdisk binary details.. Where u got it...?
Click to expand...
Click to collapse
When I was searching for how to use fdisk to delete partitions, I found this discussion. There are partition tools like gdisk and fdisk available for download
https://forum.xda-developers.com/mi-9t/help/mi-9t-hard-brick-miui11-test-t3975347/page6/
i have bootloader unlocked but cant install fastboot rom via mi flash
i have k2o pro device
i have try to install fastboot rom manually but i got error coundnt read sparse file or now i stuck on erase boot
any help!!!!
bootloader unlock
cant it be a hardware promblem

[DEV][ Expand System Partition To 4GB - P9 Lite ]

Hello !
Here you will find the information needed to change the system partition from 2GB to 4GB - this operation is somewhat useful for installing any version of GApps on your device using LOS 17.1 Android 10 : Huawei P9 Lite Kirin version !
Download mkfs.ext4 and parted from here : https://forum.xda-developers.com/attachments/parted_gdisk_fdisk_mkfs-ext4-arm-zip.4494671/
Warning I: the entire data partition will be deleted following this procedure, make sure you have backed up and saved it to a microsd card
Warning II: if you have sound issues, please check Step III !
Step I : extended system partition from about 2GB to 4GB ( example for a device with 16GB )
- extract "mkfs.ext4" and "parted" from previously download archive and put them into a new created tmp directory
- connect the device to the computer via the USB cable and bring the device into TWRP revovery with this command :
> adb reboot recovery
- copy the two executable files from the computer to the device :
> adb push tmp data/local
> adb shell
# cp -r data/local/tmp/mkfs.ext4 sbin/mkfs.ext4
# chmod 0777 sbin/mkfs.ext4
# cp -r data/local/tmp/parted sbin/parted
# chmod 0777 sbin/parted
- launch the "parted" function as follows :
# parted /dev/block/mmcblk0
- display all properties of all partitions : (I wrote what needs to be displayed as a command before pressing enter, so you just have to type "print" and press enter because (parted) is already displayed as promter ... be careful not to type (parted) twice in the following commands)
(parted) print
- go to line 44, which should be the same for all devices :
44 1057MB 3137MB 2080MB ext2 system msftdata
45 3137MB 3339MB 201MB ext4 cust msftdata
46 3339MB 3372MB 33.6MB ext4 version msftdata
47 3372MB 4010MB 638MB ext2 vendor msftdata
48 4010MB 4211MB 201MB ext4 product msftdata
49 4211MB 15.8GB 11.5GB userdata msftdata
Click to expand...
Click to collapse
- if line 44 is not identical to this one here, please stop the process by writing quit and enter, I'm waiting for a private message with what is written on line 44 in the case of your device so that I can guide you correctly .
- assuming that all devices have the same system partition ( the same 44 line ) - approximately 2GB, we go to the next steps:
- access the Mount menu in TWRP and uncheck Data, and follow the steps below step by step :
(parted) rm 49
(parted) rm 48
(parted) rm 47
(parted) rm 46
(parted) rm 45
(parted) rm 44
(parted) mkpart system ext2 1057 5319
(parted) name 44 system
(parted) set 44 msftdata on
(parted) mkpart cust ext4 5319 5521
(parted) name 45 cust
(parted) set 45 msftdata on
(parted) mkpart version ext4 5521 5554
(parted) name 46 version
(parted) set 46 msftdata on
(parted) mkpart vendor ext2 5554 6192
(parted) name 47 vendor
(parted) set 47 msftdata on
(parted) mkpart product ext4 6192 6393
(parted) name 48 product
(parted) set 48 msftdata on
- for devices with 16GB :
(parted) mkpart userdata 6393 15.8GB
- for devices with 32GB :
(parted) mkpart userdata 6393 31.3GB
- for devices with 64GB :
(parted) mkpart userdata 6393 62.5GB
(parted) name 49 userdata
(parted) set 49 msftdata on
(parted) quit
Step II : activating partitions for reuse :
# mkfs.ext4 /dev/block/mmcblk0p44
# mkfs.ext4 /dev/block/mmcblk0p45
# mkfs.ext4 /dev/block/mmcblk0p46
# mkfs.ext4 /dev/block/mmcblk0p47
# mkfs.ext4 /dev/block/mmcblk0p48
# mkfs.ext4 /dev/block/mmcblk0p49
- go to TWRP -> Wipe -> Advanced Wipe -> select System -> Repair or Change File System -> Change File System -> EXT4 -> Swipe to Change
- go to TWRP -> Wipe -> Advanced Wipe -> select Vendor -> Repair or Change File System -> Change File System -> EXT4 -> Swipe to Change
- go to TWRP -> Wipe -> Format Data -> yes
- reboot device from TWRP to TWRP in order to use data again after formated !
- go to TWRP -> Wipe -> Advanced Wipe -> select Dalvik/ART Cache, Cache, Data, Internal Storage, System, Vendor -> Swipe to wipe
- copy the new updated of LOS 17.1 with system partition of 4GB into your device
- copy any GApps arm64 Android 10 to your device
- Install them like always, enjoy !
Reboot to System in order to enjoy your Android 10 with almost any version of GApps !
Step III: flash back product image to fix sound issues !
- download product.img md5: 848880f9b74686394b0b4667620b5682
- go to TWRP and copy product.img on your internal memory
- flash product image to product partition :
> adb shell
# dd if=/sdcard/product.img of=/dev/block/bootdevice/by-name/product
393216+0 records in
393216+0 records out
201326592 bytes (192 M) copied, 10.460969 s, 18 M/s
# reboot
Click to expand...
Click to collapse
That's all !
Del.
Hey @surdu_petru, thank you for outlining the steps because I wanted to upgrade to the recent version.
I followed along until rebooting from TWRP into TWRP:
- reboot device from TWRP to TWRP in order to use data again after formated !
Click to expand...
Click to collapse
However, at that point I cannot make it into TWRP anymore. Upon booting the phone only makes it into FASTBOOT&RESCUE MODE and an error is shown "reboot_enter_fastboot_common_func". The phone does not respond to any fastboot commands from PC at this point and I seem to be stuck. Not sure what went wrong here. Do you maybe have an idea what went wrong for me and I can get into TWRP? On the screen it says "PHONE Unlocked" and "FRP Locked". Before I was using your latest build from before May. Thanks a lot.
Edit: Never mind. I got it to boot into TWRP eventually. Not sure why it did not work initially. After being able to boot into TWRP I was able to follow through and now got the latest build installed and it solved my issue with F-Droid and subtracks.
Thanks for keeping this old phone alive, which my daughter can now use to listen to audiobooks.
alterschalter said:
Hey @surdu_petru, thank you for outlining the steps because I wanted to upgrade to the recent version.
I followed along until rebooting from TWRP into TWRP:
However, at that point I cannot make it into TWRP anymore. Upon booting the phone only makes it into FASTBOOT&RESCUE MODE and an error is shown "reboot_enter_fastboot_common_func". The phone does not respond to any fastboot commands from PC at this point and I seem to be stuck. Not sure what went wrong here. Do you maybe have an idea what went wrong for me and I can get into TWRP? On the screen it says "PHONE Unlocked" and "FRP Locked". Before I was using your latest build from before May. Thanks a lot.
Click to expand...
Click to collapse
I don't know exactly what you did wrong ... and my device has reached this state but I managed to start it in TWRP recovery! Since the device is in fastboot mode, hold down the power button until the device turns off, and at this point press and hold the plus volume key until TWRP recovery enters!
EDIT :
If you have FRP Locked, than you can't use fastboot comands ... try to enter into TWRP in order to recover your device !
Eventually I was able to boot into TWRP and could follow through. Thanks for the detailed description of all steps. Finally I can use the old phone with Android 10. Thanks a lot.
alterschalter said:
Eventually I was able to boot into TWRP and could follow through. Thanks for the detailed description of all steps. Finally I can use the old phone with Android 10. Thanks a lot.
Click to expand...
Click to collapse
I'm glad to hear you made it !
ciao vorrei espandere la partizione di sistema ma con adb non va che si fa per andare in recovery ma poi faccio adb push ma mi da errore non so come mi aiuti a farove? o se c'è un file zip più semplice aspetto una risposta grazie
hello I would like to expand the system partition but with adb it does not go that is I do to go to recovery but then I do adb push but it gives me an error I do not know how to do you help me to farove? or if there is a simpler zip file I wait for an answer thanks
Olliblacklist said:
hello I would like to expand the system partition but with adb it does not go that is I do to go to recovery but then I do adb push but it gives me an error I do not know how to do you help me to farove? or if there is a simpler zip file I wait for an answer thanks
Click to expand...
Click to collapse
No, there is no simple zip for install via TWRP, you should try to fix your issues by installing correct drivers and adb, fastboot commands on your desktop !
surdu_petru said:
No, there is no simple zip for install via TWRP, you should try to fix your issues by installing correct drivers and adb, fastboot commands on your desktop !
Click to expand...
Click to collapse
okay i try to install the drivers and i hope to succeed but the guide you posted can also be good for huawei p9?
Olliblacklist said:
okay i try to install the drivers and i hope to succeed but the guide you posted can also be good for huawei p9?
Click to expand...
Click to collapse
Yes, but you need to adjust it accordingly ...
surdu_petru said:
Yes, but you need to adjust it accordingly ...
Click to expand...
Click to collapse
in what way ? that is, isn't it the same as driving?
Olliblacklist said:
in what way ? that is, isn't it the same as driving?
Click to expand...
Click to collapse
ok so you are telling me the guide is not the same for the p9
Olliblacklist said:
in what way ? that is, isn't it the same as driving?
Click to expand...
Click to collapse
No, P9 it's not the same device like P9 Lite, it may have a different partition structure and also other sizes ...
Olliblacklist said:
ok so you are telling me the guide is not the same for the p9
Click to expand...
Click to collapse
Yes, this guide it's ONLY for P9 Lite , but it can be adjusted on almost any device if you know how to change it accordingly ... if not, better stay away - you can damage the device very quickly !
surdu_petru said:
No, P9 it's not the same device like P9 Lite, it may have a different partition structure and also other sizes ...
Click to expand...
Click to collapse
I understand sin I can not do it I thought that with the guide you posted I could do it
surdu_petru said:
> adb push tmp data/local
Click to expand...
Click to collapse
When I run that, I get an error, which is this one: (Using Huawei P9 Lite VNS-L31)
failed to copy 'tmp/parted' to 'data/local/parted': secure_mkdirs failed: No such file or directory
Could you please help me?
Thanks.
Here's the screenshot.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
EndemicRocket said:
When I run that, I get an error, which is this one: (Using Huawei P9 Lite VNS-L31)
failed to copy 'tmp/parted' to 'data/local/parted': secure_mkdirs failed: No such file or directory
Could you please help me?
Thanks.
Here's the screenshot.
View attachment 5622609
Click to expand...
Click to collapse
What is the output of this command :
> adb shell ls -l data/local
Click to expand...
Click to collapse
surdu_petru said:
What is the output of this command :
Click to expand...
Click to collapse
ls: data/local: No such file or directory
By the way, I'm on TWRP Recovery (3.2.3-10).
EndemicRocket said:
ls: data/local: No such file or directory
By the way, I'm on TWRP Recovery (3.2.3-10).
Click to expand...
Click to collapse
Please check LOS 17.1 thread, it's state clearly what TWRP you should have on your device !
EDIT:
> adb shell ls -l data/local should return tmp, try to solve your issues !

Categories

Resources