[TUTORIAL] Extract Contents Inside Of SMGs - Atrix 4G Android Development

Hi there,
Here how I extract contents including folders and files from smg files.
I didn't find any real tutorial about this, I hope it will help you guys to better develop.
This following may soft brick your device, anyway you can recovery it by flashing it back with rsd lite.
always remember, use at your own risks...
Requirement:
- rsd lite \ sbf_flash
- sdcard
- 1,5gb android application free space
- gingerbreak (rooted phone)
- adb (android sdk)
- atrix phone
- no need of desktop linux
1) Extract the smg files from the sbf, to do you can use Rsd Lite or use Sbf_flash, google search is your friend.
link for sbf_flash
Code:
http://blog.opticaldelusion.org/2010/05/sbfflash.html
2) copy the smg files you extracted into the sdcard
2 *) optionally copy shellscript.sh to your sdcard if you don't want to type all those commands.
3) root your phone, easy with gingerbreak
4) set the phone to development mode and open adb shell
5) type the following commands :
* get su access, type su:
Code:
adb shell# su
* remount main block device to have write access to mnt directory:
Code:
mount -o rw,remount -t ext3 /dev/block/mmcblk1 / ;
* create two temporary loop devices:
Code:
/osh/bin/mknod /dev/loop0 b 7 0
/osh/bin/mknod /dev/loop1 b 7 1
* create two new mount directories for example:
Code:
mkdir /mnt/retail ;
mkdir /mnt/att ;
* mount smg files: ( in this example smg files are in smgs directory of your sdcard /smgs, I will copy the contents of retail smg to att smg, that's mean att smg contents will be overwritten )
Code:
/osh/bin/mount -o loop /mnt/sdcard-ext/smgs/olyfr_u4_1.5.7_signed_olpsattspe_p012_hwolympus_1g_1ffCG57.smg /mnt/att ;
/osh/bin/mount -o loop /mnt/sdcard-ext/smgs/olyem_u4_2.1.1_signed_ucaolyportfr_p014_a004_m001_hwolympus_1g_1ffCG57.smg /mnt/retail;
* make clean the att smg
Code:
/osh/bin/rm -rf /mnt/att/* ;
* copy contents from retail smg to att smg:
Code:
cp -dpRf /mnt/retail/* /mnt/att/;
* umount the previous mount directories we created
Code:
/osh/bin/umount /mnt/retail;
/osh/bin/umount /mnt/att ;
you're all done, congratulation!!
here is the script to automate the job, edit it as you want.
Code:
#!/system/bin/sh
mount -o rw,remount -t ext3 /dev/block/mmcblk1 / ;
/osh/bin/mknod /dev/loop0 b 7 0
/osh/bin/mknod /dev/loop1 b 7 1
mkdir /mnt/retail ;
mkdir /mnt/att ;
/osh/bin/mount -o loop /mnt/sdcard-ext/smgs/olyfr_u4_1.5.7_signed_olpsattspe_p012_hwolympus_1g_1ffCG57.smg /mnt/att ;
/osh/bin/mount -o loop /mnt/sdcard-ext/smgs/olyem_u4_2.1.1_signed_ucaolyportfr_p014_a004_m001_hwolympus_1g_1ffCG57.smg /mnt/retail;
/osh/bin/rm -rf /mnt/att/* ;
cp -dpRf /mnt/retail/* /mnt/att/;
/osh/bin/umount /mnt/retail;
/osh/bin/umount /mnt/att ;
there are 3 smgs that you can mount
1) system directory ...CG57.smg
2) data & preinstall directory CG62.smg
3) osh directory CG58.smg

Looks interesting thanks.
Sent from my MB860 using XDA Premium App

This is pretty awesome. I was wondering if something like this can be done. Is there an actual way to edit the cg smgs, so you could repack your own sbf and flash it?

You can also just take the SMG and mount it on any Linux box. Saves a lot of trouble. Of course, if you don't have a virtual machine or don't use Linux, this could be faster.

im sorry but what can we accomplish with the SMG files?

samcripp said:
im sorry but what can we accomplish with the SMG files?
Click to expand...
Click to collapse
SMG is smg, LOL...
that was a joke!!!
Get serious, I really don't know exactly what it is, for now I know that only motorola is using it, so this is just a filename extension and nothing more.
Inside the smg you have contents that you can use to build a custom roms, anyway there are many ways to do this.
Code:
Is there an actual way to edit the cg smgs, so you could repack your own sbf and flash it?
yes there is, but there smg checksums verification when you load the sbf in rsd lite, I never successfully created a fully flashable sbf. Unfortunately there is no full tutorial about this.

briggie108 said:
This is pretty awesome. I was wondering if something like this can be done. Is there an actual way to edit the cg smgs, so you could repack your own sbf and flash it?
Click to expand...
Click to collapse
You can by editting a single code group, and flashing it via fastboot. You'll need linux to mount and edit the image though.

Related

CM6 Apps2ext

so ive been trying all day to get my /sd-ext to mount . ive added mount commands to the init files in /system/etc/init.d but none of them seem to run on boot. what should i do?
are you talking about app2sd or am i misunderstanding you?
yes trying to implement commands for a dirty ext apps2sd on cm6 nexus
the builders have said it will be in a future release when they are happy with performance
superg81 said:
the builders have said it will be in a future release when they are happy with performance
Click to expand...
Click to collapse
wow that was not helpful in any way
well **** me,i was trying to be nice.piss off
ahronzombi said:
wow that was not helpful in any way
Click to expand...
Click to collapse
just incase someone else runs into douches who dont help
I spent all night trying to do this so im going to document this.
-None of this stuff is my work , thanks to Pershoot, teamdouch and cyanogen for the files to push
-This is a very ugly hack. Maybe someone else can make this simpler by making a flashable rom with this already applied. I'm not knowledgeable enough at this point to make this any easier or i would.
-I dont dev , i dont make roms and i dont claim to be good at this. !!!!PLEASE USE AT YOUR OWN RISK!!! BACKUP!!!!
-Feel free to take this and fix my flaws, dont need to give me credit.
okay this is how i got apps2ext in cm6 nexus
Im doing this right after flashing cm , haven't installed apps or registered my account on the phone. i have a existing ext partition.
1.Symlink
(copy any of your apps to the new location if you already have a running system without this hack)
Code:
adb remount
Code:
adb shell mkdir /sd-ext
Code:
adb shell mkdir /sd-ext/app
Code:
adb shell rm /data/app
Code:
adb shell ln -s /sd-ext/app /data/app
2.init files
Okay i added this to a few init files. but you need to add this line to an init file in
/system/etc/init.d/
Code:
busybox mount -t ext2 /dev/block/mmcblk0p2 /sd-ext/
any may work for example this is /system/etc/init.d/00banner
Code:
#!/system/bin/sh
#
# Print startup info
#
busybox mount -t ext2 /dev/block/mmcblk0p2 /sd-ext/
L="log -p i -t cm"
$L "Welcome to Android `getprop ro.build.version.release` / `getprop ro.modversion`";
$L " _ ";
$L " __ __ _ ___ _ _ __ ___ __ _ _ _ _ __ __))";
$L "((_ \\(/'((_( ((\\( ((_)((_( (('((\\( ((\`1( ((_)((_( ";
$L " )) _))";
$L " ";
3.flash boot.img of kang-o-rama froyo. its in the (final) update zip at http://forum.xda-developers.com/showpost.php?p=6973422&postcount=2139
extract and copy the boot.img file to your sdcard
Code:
adb shell flash_image boot /sdcard/boot.img
Code:
adb shell reboot recovery
4. Now you have apps2ext, but wifi wont work
So........
flash pershoots nexus froyo kernel from http://droidbasement.com/db-blog/ using your recovery
THIS IS UGLY I KNOW
If your smarter than me please make this easier for all of us, this took me hours to figure out on my own + twitter
Thanks ahead of time to whom ever helps with this
What was the need for the boot.img step? I believe after creating the symlink you don't need anything else
right on bro, thanks a bunch for ur research, i was looking for something like this. U da man
i would also like to know why is the boot.img necessary
xxmonsterx said:
i would also like to know why is the boot.img necessary
Click to expand...
Click to collapse
Because Kang-o-rama has Apps2sd in the ramdisk (not the zImage) inside of boot.img.
So, flashing Kang-o-rama's boot.img will give you K-O-R's kernel with integrated Apps2sd. But ofcourse it breaks wifi, because you have not yet replaced the /system/lib/modules/bcm4329.ko file.
Now, Pershoot's kernel flash (as well as nearly any kernel flash) actually pulls the ramdisk out of your existing boot.img, integrates it with his zImage, and then repacks a new boot.img - and, critically, it also copies in the matching bcm4329.ko driver.
So, you don't have to actually flash Pershoot's kernel - you should just need to pull the /system/lib/modules/bcm4329.ko file out of Kang-o-rama when you take out the boot.img. Then flash the boot.img AND replace the .ko at the same time, and you ought to be golden.
So, assuming that you put the .ko file in the root of your SD card :
Code:
adb shell flash_image boot /sdcard/boot.img
adb remount
adb shell
su (if you are not already root in the ADB session for some reason...)
cp /system/lib/modules/bcm4329.ko /system/lib/modules/bcm4329.ko.bak
cp -f /sdcard/bcm4329.ko /system/lib/modules/bcm4329.ko
chmod 644 /system/lib/modules/bcm4329.ko
reboot
And you should be good to go - using Kang-o's kernel if that is acceptable for you.

Linux installer

Trying to get Ubuntu chroot up and running with Linux installer from the market.
Followed the quick start guide to a "t", only changes I made from the default settings were distribution and version. This resulted in a /data/local/mnt/Linux directory with the Ubuntu file structure inside and a Linux.loop file in the root of my internal storage.
The part that is confusing of how to mount. The last step in the guide is to press the button that creates the linuxchroot script; when I press the button out says it's creating the file but the file isn't created.
I'm attempting to use the following commands to mount manually:
Code: ---------# mount loop.img directory ---------If for some reason that doesn't work use losetup.
Code: ---------# losetup /dev/block/loop7 loop.img # mount -t auto /dev/block/loop7 directory
But not sure how to use them because there isn't a .img file, just the previously mentioned /data/local/mnt/Linux directory and the Linux.loop file.
Anyone? Thanks in advance
Sent from my DROID3 using Tapatalk 2
Q9Nap said:
Trying to get Ubuntu chroot up and running with Linux installer from the market.
Followed the quick start guide to a "t", only changes I made from the default settings were distribution and version. This resulted in a /data/local/mnt/Linux directory with the Ubuntu file structure inside and a Linux.loop file in the root of my internal storage.
The part that is confusing of how to mount. The last step in the guide is to press the button that creates the linuxchroot script; when I press the button out says it's creating the file but the file isn't created.
I'm attempting to use the following commands to mount manually:
Code: ---------# mount loop.img directory ---------If for some reason that doesn't work use losetup.
Code: ---------# losetup /dev/block/loop7 loop.img # mount -t auto /dev/block/loop7 directory
But not sure how to use them because there isn't a .img file, just the previously mentioned /data/local/mnt/Linux directory and the Linux.loop file.
Anyone? Thanks in advance
Sent from my DROID3 using Tapatalk 2
Click to expand...
Click to collapse
If you see the directory structure in /data/local/mnt/Linux then it's already mounted.
Code:
chroot /data/local/mnt/Linux /bin/bash
Should work, but I have no idea why the script isn't being created.
To manually mount.
Code:
mount /sdcard/Linux.loop /data/local/mnt/Linux
and un-mount after exiting the chroot environment by a ctrl-d or typing "exit".
Code:
umount /data/local/mnt/Linux
if un-mounting causes a device is busy error, un-mount the lazy way
Code:
umount -l /data/local/mnt/Linux
Doing any of this manually might cause some errors because the script isn't doing whatever it is that it does.
Ok so I finally got Ubuntu up and running with vnc server and all, & realized there's no way to input text.
Anyone know if there's any possible way to be able to use the d3 keyboard while in chroot (other than in terminal of course) ?
*edit*
Seems to be working now...

[guide] how to deodex rom jb [ARGendroid Team]

Files needed:
Xultimate 2.4 Download here
Download files "Smaili-1.2.4.jar" and "baksmali-1.4.2.jar" link
tutorial:
Once downloaded xUltimate & unzip wherever
Files "baksmali-1.4.2.jar" and "smali-1.4.2.jar" rename deleting numbers, would be as follows: · baksmali.jar "and" smali.jar ".
Copy both files to / xUltimate / jar and replace the existing.
Connect the PC to cellular USB debugging.
Open the folder xUltimate the main.exe
Select option 5; wait takes about 5-30 minutes depending on the phone model.
When and finish is created in the folder xUltimate 2 folders, "done_app" and "done_frame" copy both to sd (in case of a terminal with internal and external memory to the internal copy).
I opened a command window (I take it for granted that adb is correctly configured and no, I will not explain how, if in this section are supposed to know that) type in the following:
adb shell
su
stop
mount -o remount,rw /dev/block/mtdblock4 /system
cp /sdcard/done_app/* /system/app/
cp /sdcard/done_frame/* /system/framework/
rm /system/app/*.odex
rm /system/framework/*.odex
mount -o remount,ro /dev/block/mtdblock4 /system
reboot
enjoy..!!
Note: I recommend doing then wipe cache and cache davilk, if not boot also wipe data.
original post argendroid
max_choco said:
Files needed:
Xultimate 2.4 Download here
Download files "Smaili-1.2.4.jar" and "baksmali-1.4.2.jar" link
tutorial:
Once downloaded xUltimate & unzip wherever
Files "baksmali-1.4.2.jar" and "smali-1.4.2.jar" rename deleting numbers, would be as follows: · baksmali.jar "and" smali.jar ".
Copy both files to / xUltimate / jar and replace the existing.
Connect the PC to cellular USB debugging.
Open the folder xUltimate the main.exe
Select option 5; wait takes about 5-30 minutes depending on the phone model.
When and finish is created in the folder xUltimate 2 folders, "done_app" and "done_frame" copy both to sd (in case of a terminal with internal and external memory to the internal copy).
I opened a command window (I take it for granted that adb is correctly configured and no, I will not explain how, if in this section are supposed to know that) type in the following:
adb shell
su
stop
mount -o remount,rw /dev/block/mtdblock4 /system
cp /sdcard/done_app/* /system/app/
cp /sdcard/done_frame/* /system/framework/
rm /system/app/*.odex
rm /system/framework/*.odex
mount -o remount,ro /dev/block/mtdblock4 /system
reboot
enjoy..!!
Note: I recommend doing then wipe cache and cache davilk, if not boot also wipe data.
original post argendroid
Click to expand...
Click to collapse
Thanks - worked!
Can I make this guide on the JB ROM for RAZR XT910 ??Thanks
mclfriggi said:
Can I make this guide on the JB ROM for RAZR XT910 ??Thanks
Click to expand...
Click to collapse
Hey, if it works perfectly secure. regards
Enviado desde mi XT890 usando Tapatalk 2
My friend worked perfectly nom razr hd xt925, thank you.
Now I just need to make the process of adb that complicated.
Dear sir,how to how change deodex apk in jb to odex as i need to add 1 systemui.apk file to my GB stock rom.thank.
Not worked on my Motorola Droid 4 XT894
exxand said:
Not worked on my Motorola Droid 4 XT894
Click to expand...
Click to collapse
This forum its for xt890! Razr i
Intel device - Razr i Owner
Hit thanks if i help you or you like my style
Im still learning about all things here and I use motorola razr xt 910. This guide works for razr running stock jb 4.1.2 retail.en.eu.
Thanks for the guide guys....:good::good::good::good::good:
max_choco said:
Files needed:
Xultimate 2.4 Download here
Download files "Smaili-1.2.4.jar" and "baksmali-1.4.2.jar" link
tutorial:
Once downloaded xUltimate & unzip wherever
Files "baksmali-1.4.2.jar" and "smali-1.4.2.jar" rename deleting numbers, would be as follows: · baksmali.jar "and" smali.jar ".
Copy both files to / xUltimate / jar and replace the existing.
Connect the PC to cellular USB debugging.
Open the folder xUltimate the main.exe
Select option 5; wait takes about 5-30 minutes depending on the phone model.
When and finish is created in the folder xUltimate 2 folders, "done_app" and "done_frame" copy both to sd (in case of a terminal with internal and external memory to the internal copy).
I opened a command window (I take it for granted that adb is correctly configured and no, I will not explain how, if in this section are supposed to know that) type in the following:
adb shell
su
stop
mount -o remount,rw /dev/block/mtdblock4 /system
cp /sdcard/done_app/* /system/app/
cp /sdcard/done_frame/* /system/framework/
rm /system/app/*.odex
rm /system/framework/*.odex
mount -o remount,ro /dev/block/mtdblock4 /system
reboot
enjoy..!!
Note: I recommend doing then wipe cache and cache davilk, if not boot also wipe data.
original post argendroid
Click to expand...
Click to collapse
Does this work for Razr i on Stock Jelly Bean, no cwm recovery installed, rooted but bootloader locked (method from jcase with TwerkMyMoto 1.0)?
Thanks in advance

[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

[GUIDE] Running ArchLinuxARM on Huawei Ascend P7

Prerequisites:
Rooted device
Busybox installed ( get it from Google Play )
Terminal emulator ( get it from Google Play )
An armv7h linux image ( see the download link below )
ArchLinuxARM images:
You can download any ArchLinuxARM image you want from this link sourceforge.net/projects/linuxonandroid/files/ArchLinux/
After downloading your image rename it to "arch.img".
Step 1:
Create the following directories on your EXTERNAL-SDcard ( works on internal too but you'll have to modify the paths in the arch.sh script ): archlinux/ and archlinux/mount/
Step 2:
Copy the arch.img file you downloaded from your computer to your EXTERNAL-SDcard and store it under archlinux/
Step 3:
Open a text editor on your computer and create a new file called arch.sh and paste the following text in it:
# path to the linux img
# change this in case it is different from your image's path
LINUX_IMG=/storage/sdcard1/archlinux/arch.img
# location where the linux image will be mounted (/storage/sdcard1/archlinux/mount/)
# change this if you want to mount it somewhere else
LINUX_DIR=/storage/sdcard1/archlinux/mount/
# create the directory where the linux image will be mounted in case it doesn't exist
mkdir -p $LINUX_DIR
# mount the image
busybox mount -o loop $LINUX_IMG $LINUX_DIR
# mount dev and proc directories
cd $LINUX_DIR
busybox mount -t proc proc proc/
busybox mount -o bind /dev/ dev/
# optionally mount sdcard and external sdcard (if you do not want to mount them simply comment the following 2 lines)
busybox mount -o bind /sdcard/ sdcard/
busybox mount -o bind /storage/sdcard1/ external_sd/
# copy resolv.conf from android environment to arch linux environment
cp /etc/resolv.conf etc/resolv.conf
# chroot into the arch linux environment
chroot $LINUX_DIR /bin/bash
Step 4:
Copy the arch.sh script from your computer to the root of your INTERNAL SDcard ( since we don't have execute permissions on the external SDcard we will store the script on the internal SDcard).
Step 5:
Unplug your AscendP7 from the computer and open the terminal emulator.
Once the terminal emulator opened type the following:
su
cd /storage/sdcard0/
./arch.sh
If you followed the above steps, after executing the above commands you should find yourself inside the ArchLinux environment.
problem with download file
MihaiChirculete said:
Prerequisites:
Rooted device
Busybox installed ( get it from Google Play )
Terminal emulator ( get it from Google Play )
An armv7h linux image ( see the download link below )
ArchLinuxARM images:
You can download any ArchLinuxARM image you want from this link nl.mirror.archlinuxarm.org/armv7h/alarm/
After downloading your image rename it to "arch.img".
Step 1:
Create the following directories on your EXTERNAL-SDcard ( works on internal too but you'll have to modify the paths in the arch.sh script ): archlinux/ and archlinux/mount/
Step 2:
Copy the arch.img file you downloaded from your computer to your EXTERNAL-SDcard and store it under archlinux/
Step 3:
Open a text editor on your computer and create a new file called arch.sh and paste the following text in it:
# path to the linux img
# change this in case it is different from your image's path
LINUX_IMG=/storage/sdcard1/archlinux/arch.img
# location where the linux image will be mounted (/storage/sdcard1/archlinux/mount/)
# change this if you want to mount it somewhere else
LINUX_DIR=/storage/sdcard1/archlinux/mount/
# create the directory where the linux image will be mounted in case it doesn't exist
mkdir -p $LINUX_DIR
# mount the image
busybox mount -o loop $LINUX_IMG $LINUX_DIR
# mount dev and proc directories
cd $LINUX_DIR
busybox mount -t proc proc proc/
busybox mount -o bind /dev/ dev/
# optionally mount sdcard and external sdcard (if you do not want to mount them simply comment the following 2 lines)
busybox mount -o bind /sdcard/ sdcard/
busybox mount -o bind /storage/sdcard1/ external_sd/
# copy resolv.conf from android environment to arch linux environment
cp /etc/resolv.conf etc/resolv.conf
# chroot into the arch linux environment
chroot $LINUX_DIR /bin/bash
Step 4:
Copy the arch.sh script from your computer to the root of your INTERNAL SDcard ( since we don't have execute permissions on the external SDcard we will store the script on the internal SDcard).
Step 5:
Unplug your AscendP7 from the computer and open the terminal emulator.
Once the terminal emulator opened type the following:
su
cd /storage/sdcard0/
./arch.sh
If you followed the above steps, after executing the above commands you should find yourself inside the ArchLinux environment.
Click to expand...
Click to collapse
which one must to download?
rahim1234 said:
which one must to download?
Click to expand...
Click to collapse
I changed the download link. Try this: sourceforge.net/projects/linuxonandroid/files/ArchLinux/
so, what is the advantage of this kernel?

Categories

Resources