Custom system.img and load/test on emulator - Android Software/Hacking General [Developers Only]

Sorry for my English! I want to create an image
custom of /system (system.img)to use it and
test with the emulator. To do this I proceeded to:
1) Start Emulator with 128 MB partition size
2) mount / systen write option with mount-o rw, remount-t yaffs2 / dev/block/mtdblock3 /system and chmod 777 /system
3) adb push mkfs.yaffs2.arm in /system
4) go comand mkfs.yaffs2 /system system.img
5) adb pull system.img
6) why system.img is small (44MB?)
7) replace system.img in folder on Platform sdk
8) emulator not run ...
9) why not run ? (stop on test Android_ )

Related

[HOW-TO] change your french orange dream firmware by a custom one...

Thanks to :
• JF for his recovery.img
• Arisme for the analysis of the dumped french orange firmware and his tools to customize the firmware
1) The tools
Unzip all the tools on one folder on your hard disk (c:\ModifDream for example)
SDK here :
http://developer.android.com/sdk/download.html?v=android-sdk-windows-1.1_r1.zip
fastboot here :
http://member.america.htc.com/download/web_materials/ADP/fastboot.exe
other tools here :
http://www.megaupload.com/?d=XMGZSYOM
You must copy thoses files on the microSD card :
- boot-root.img
- systemDEV.img
- dataDEV.img
- libhtc_ril.so (we need this patch from the original french firmware for a compatibility with the radio)
- wlan.ko (we need this patch from the original french firmware for a compatibility with wifi)
- busybox.asc
- trout-keypad-v3-franch-azerty.kcm.bin (with the ' and the ")
2) Backup of your dream.
We will use the JF recovery :
- Shutdown the dream
- plug it to the PC
- put your dream in fastboot mode
- On the PC, do :
cd\ModifAndroid
fastboot boot recoveryJF.img
- On the dream keyboard do ALT+B to backup your dream
- At the end of the backup do BACK+HOME to reboot
Ok the backup is done (NANDROID folder on your microSD card
3) Patch the boot for permanent root access throw adb
Put the dream in fastboot mode
Plug it to the PC
- On the PC, do :
cd\ModifAndroid
fastboot boot recoveryBoot.img
After the startup of your dream, do on the PC :
adb shell
mount /dev/block/mmcblk0p1 /sdcard
flash_image boot /sdcard/boot-root.img
reboot
4)Install of the new firmware and of all the patchs (ADP firmware)
Put the Dream in fastboot mode and plug it to the PC
- On the PC do :
cd\ModifAndroid
fastboot boot recovery-unyaffs.img
After the startup, do on the PC
adb shell
mount /dev/block/mmcblk0p1 /sdcard
mkdir /tmp/system
mkdir /tmp/data
mount /dev/block/mtdblock3 /tmp/system
mount /dev/block/mtdblock5 /tmp/data
cd /tmp/system
rm -rf * (dont be afraid by the error)
unyaffs /sdcard/systemDEV.img
cd /tmp/data
rm -rf * (dont be afraid by the error)
unyaffs /sdcard/dataDEV.img
cp /sdcard/libhtc_ril.so /tmp/system/lib/
cp /sdcard/wlan.ko /tmp/system/lib/modules/
cp /sdcard/trout-keypad-v3-franch-azerty.kcm.bin /tmp/system/usr/keychars/
cp /sdcard/trout-keypad-v3-franch-azerty.kcm.bin /tmp/system/usr/keychars/trout-keypad-v3.kcm.bin
cp /sdcard/trout-keypad-v3-franch-azerty.kcm.bin /tmp/system/usr/keychars/trout-keypad.kcm.bin
Do on the dream keyboatd ALT + W
After the startup, do on the PC (to have root and busibox) :
cd\ModifAndroid
adb shell
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
dd if=/sdcard/busybox.asc of=/system/bin/busybox
chmod 4755 /system/bin/busybox
cd /system/bin/
busybox cp -s busybox cp
busybox sh
cat sh > su
chmod 4755 su
reboot
OK, that is finished!
After the startup you will have to sign in with your gmail account. To do it you have first to create an APN (MENU and then NEW APN)
5)Back to the orange firmware
If you need to come back to the orginal situtation, just copy system.img and data.img from your NANDROID backup at the root of your microSD Card and copy and rename the boot.img from this backup to boot-orange.img at the root of the card.
Put the dream in fastboot mode
Plug it to the PC
- On the PC do :
cd\ModifAndroid
fastboot boot recovery-unyaffs.img
After the startup, do on the PC :
adb shell
mount /dev/block/mmcblk0p1 /sdcard
mkdir /tmp/system
mkdir /tmp/data
mount /dev/block/mtdblock3 /tmp/system
mount /dev/block/mtdblock5 /tmp/data
cd /tmp/system
rm –rf * (don't be afraid by the error)
unyaffs /sdcard/system.img
cd /tmp/data
rm –rf * (don't be afraid by the error)
unyaffs /sdcard/data.img
On the dream keyboard do ALT + W
Put again the dream in fastboot mode
On the PC do
cd\ModifAndroid
fastboot boot recoveryBoot.img
After the startup do on the PC :
adb shell
mount /dev/block/mmcblk0p1 /sdcard
flash_image boot /sdcard/boot-orange.img
reboot
REMARK
You will find in the zip a tool : unyaffs. With this tool you can extract on your PC image like system.img or data.img. This is really interesting if you need some patch from the orginal firmware. Maybe italian users can use it to get their keyboard layout, update it (with an hex editor) and replace the french layout in this exemple with the italian one
To use this tool : unyaffs system.img or unyaffs data.img with your image on the same folder fo unyaffs
Ah ouais ca a l'air sport comme méthode.
Oh it's seems pretty hard to do .
Are you sure it's working ?????
Vraiment impressionnant... j'espère que cela fonctionne bien
Tous mes espoirs d'avoir un téléphone Dream fonctionnel vont devenir réalité...
Enorme...
Really impressing I hope that it works well
All my hopes to have a functional telephone Dream are going to become reality
Enormous...
Note that it looks complicated because all steps are shown to give a headstart to other modders.
You can build a simple update.zip from those instructions if you want the most "interesting" parts being
a) gaining root by booting an image
b) using unyaffs to restore the original firmware, since no official update.zip exists for it so far
Really Great Job...
I have try this rom...
It's pretty good... YOU'RE THE KING OF THE ANDROID FRENCH PHONE
I have some problems with synchro (no 3G) and the img files are in English...
Could you help me to put this in French ???
Thanks in advance.
Best Regards
ADP firmware is an German/English firmware. You won't find a french firmware with a good google sync...
For the 3G have you created the new APN as described ?
For the APN :
name : orange
apn : orange
user : orange
pwd : orange
MCC : 208
MNC : 01
type : default
It's working....
Do you think it will be possible to made my own Firmware making a build with the French translations ???
Thanks in advance
You could translate the free (i.e. non Google) apps. But it's going to be a lot of work, when Cupcake is coming in a few months.
After i hacked my dream, following all the steps, my calendar app shuts down all the time...so i went back to orange firmware and my calendar is ok, but no synchro as it's expected to do with this firmware.
Anyone has same issue ? ideas ?
Oh, and before i went back to orange firmware, IM app and voice search were activated oO
Anyway, good job guys !
Problem
That finnish but I got a problem I am block by google account, my sim card is not reconize. I was maybe forget an step, but wich one ?
please help me
thx for that job
have you created the new apn as described ?
yes
yes I create orange apn like describe but It never ask me pin code ;-(
hum hum.. have you done the line cp /sdcard/libhtc_ril.so ...
I think yes, because I just copy/paste all command line, so that one were paste (I hope), if not what can I do ?
thx
i am surfing with my dream so it is not easy to write a specific process... so do again the step 4 and, please. do it line after line to be sure that all is ok...
ok I will try now to do step 4 and tell you if it is good. Or I will go on orange rom
thx geek78
is it normal
/tmp/system # rm –rf *
rm: cannot remove '–rf': No such file or directory
rm: app: is a directory
rm: bin: is a directory
rm: etc: is a directory
rm: fonts: is a directory
rm: framework: is a directory
rm: lib: is a directory
rm: lost+found: is a directory
rm: media: is a directory
rm: sounds: is a directory
rm: usr: is a directory
rm: xbin: is a directory
/tmp/system #
no, do again rm -rf * (dont forget the space after -rf)
yes It is what I do (I just copy and paste) so I keep space, but you said don't worry with error ;-)
The error is maybe here because all the process is ok, just an error in this command line.
I retry
thx
It smelt very good, you are a king, ****ing process, who do what you ask him ;-)
It first view all is good, I just need to do some configuration.
Thanks geek78 and have good night
See yu

Java in Vodafone 858 Smart

I've a problem installing Java in my 858:
I follow theses steps:
Open Terminal Emulator
su
mount -o remount,rw /dev/block/mtdblock3 /system
cp /sdcard/jbed.apk /system/app
cp /sdcard/libjbedvm.so /system/lib
but at the last command say me the memory is not enought, so retried but say the file exist and is read only, open the explorer i see the file is some kb versus the 3 mb in sdcard, i tried in terminal change permission with chmod in 777 at this file, tried in adb, tried to eliminate but nothing to do, i've smartlucky rom 2.4 (froyo 2.2.2 rooted).
Some suggestion ?

VzwSilentSSOEngine.apk && VzTones.apk

Turns out subject apk needed to get to 4.1.2:
1) extract stock.vzw_root66.tar
2) mount -t ext4 -o loop=/dev/loop0 ./system.img.ext4 /mnt/foo
3) adb push VzTones.apk /sdcard
4) cp /sdcard/VzTones.apk /system/app/
5) adb push VzwSigSSOEngine.apk /sdcard/
6) cp /sdcard/VzwSigSSOEngine.apk /system/app/VzwSilentSSOEngine.apk
7) run system update
8) profit?

[MOD][GT-S7562] Move dalvik-cache to cache partition

Hi guys,
This Tuto is for GT-S7562 user (like me) but maybe work on other Android device, You have to try if you want.
Because S Duos has only 1.7 Go user partition, but have about 500 Mo cache partition unused, so I was wondering why not use this partition to move some files like dalvik-cache files?
So after many trying, I've successfully moved these files and free up about 175 Mo from internal storage
Note: remember, that the cache partition is needed by samsung mainly for OTA updates, so If your use your cache partition, maybe you're not be able to update anymore your device using OTA!!!...
Let's start:
To make simple, You have to modify the init.rc file inside the boot.img file.
How?
1. unpack boot.img
2. modify init.rc file (see below)
3. re-pack the boot.img
4. flash your device
5. PRAY :angel:
Step by step:
1 unpack your boot.img
(personnaly I use dsixda kitchen to unpack and repack boot.img file but you can find many others tools inside the forum to do this, just use your mind )
2. Open init.rc file (inside boot.img-ramdisk folder) with notepad ++
a. inside "# setup the global environment"
add this line
export ANDROID_CACHE /cache
b. find this line
mkdir /cache 0770 system cache
modify to
mkdir /cache 0771 system cache
c. find this line
chmod 0770 /cache
modify to
chmod 0771 /cache
d. inside "# create dalvik-cache, so as to enforce our permissions"
change this line
mkdir /data/dalvik-cache 0771 system system
into these lines
mkdir /cache/dalvik-cache 0771 system system
chown system system /cache/dalvik-cache
chmod 0771 /cache/dalvik-cache
symlink /cache/dalvik-cache /data/dalvik-cache
e. Save changes and close notepad++
3. Repack your boot.img
4. Convert your boot.img into tar file
4. Reboot into recovery
5. Clear /cache and /dalvik-cache
6. Reboot into download mode
7. Flash your device with odin
8. Reboot normally
9. Enjoy :good:
N.B: If you have root explorer, you can see cache files inside /cache/dalvik-cache and data/dalvik-cache (bacause of symlink) but It don't take anymore space in data partition.
Just edit it using any root browser..
No need to unpack pack etc...
I m right?

[Q] (vold.fstab) storage is messed up \O/

I edit ( vold.fstab ) for swaping sdcard with external_sdcard .
but now my tab dose not show any storage ?
tab: karbonn tornado
problem resolved
Flash with stock rom, and its done :good:
Download any stock rom from here :
androidxda(.)com/download-karbonn-stock-rom-models
:victory:
or you can change it with ADB PULL
Here some text which i find on net :
Download the Android Debug Bridge from here, and extract the contents (to the same directory).
Connect your device to your computer using the USB cable and open up a command prompt (Windows logo key + R, type cmd and press Enter).
Once that is open, type the following commands:
cd <entire path to adb.exe file>
adb shell
su
mount -o remount,rw /system (if that doesn't work: mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system)
exit
exit
adb push <path to original file> /system.etc/vold.fstab
adb reboot
That will grant root, mount the system as writeable and then push the original file and overwrite the modified one (and reboot your device).
Click to expand...
Click to collapse
I don't know about Android Commander, but a simpler way (in my opinion) would be to use ADB. You may have already installed the Android SDK (if not, go here). I assume that you don't have modified your System Path.
Move your vold.fstab to C:\Program Files\Android\android-sdk\platform-tools or C:\Program Files (x86)\Android\android-sdk\platform-tools
Go to the android-sdk folder, shift+right click on platform-tools and choose "Open command prompt here"
Next steps depends if you have a custom rom (a) or not (b) (see comments).
We take root privilege:
a) If your device is 4.0 or above, type adb root
b) Type adb shell then su
We make /system writeable:
a) adb remount
b) mount -o remount,rw /system then exit
adb push vold.fstab /system
adb reboot
This should do the trick.
Click to expand...
Click to collapse
to pull (read) should not need root.
adb pull /system/etc/vold.fstab
or
adb pull /etc/vold.fstab
what output did you get?
_____________________________________________________
adb pull /etc/vold.fstab
edit vold.fstab and change the following line:
dev_mount usbdisk /mnt/usbdisk auto /devices/platform/tegra-ehci
to
dev_mount usbdisk /mnt/usbOTG auto /devices/platform/tegra-ehci
save the file, and go back to the command line
adb remount
adb push vold.fstab /etc/vold.fstab
abd reboot
Click to expand...
Click to collapse
But i dont get any of em

Categories

Resources