1. Preparing environment and building
1.1. Installing bootloader and recovery
This step can be done only in Windows (can be done on Linux too, but I didn't find right version of Linux nvflash):
Run MS Windows (tested even on Windows 7) on host PC
Download this package (Size=12592367 MD5=EA890A3B3E1CEDBBD820D1A798A365A2). Inside package:
Windows drivers for nVidia USB device
nvflash tool and required libraries
Unlocked bootloader, see details here
Batch for automatic update, see original batch here
Generate your SBK with your CPUID by this link
Connect tablet to PC through USB
Turn-off tablet
Press and hold reset button on tablet
Press power and wait until new USB device will be detected
Install USB drivers (can be find in package)
Run script run.bat and follow recommendations
1.2. Downloading sources and building Android
Create directory for AOSP sources
Code:
mkdir aosp && cd aosp
Initializing repo
Code:
repo init -u [url]https://android.googlesource.com/platform/manifest[/url] -b ics-mr1
Downloading sources
Code:
repo sync
Download sources of Acer Picasso device
Code:
git clone git://github.com/shchers/afs_device_acer_picasso.git device/acer/picasso
Download sources of MBM RIL library
Code:
git clone git://github.com/shchers/afs_vendor_mbm_mbm-ril.git vendor/mbm/mbm-ril
Download sources of MBM GPS library
Code:
git clone git://github.com/shchers/afs_vendor_mbm_libmbm-gps.git vendor/mbm/libmbm-gps
Download sources of MBM GPS service
Code:
git clone git://github.com/shchers/afs_vendor_mbm_mbmservice.git vendor/mbm/mbmservice
Setting-up build environment
Code:
source build/envsetup.sh
Configuring target (Acer A500/A501 == full-picasso)
Code:
lunch full_picasso-userdebug
Building with using all available CPU cores
Code:
m -j`grep -c processor /proc/cpuinfo`
2. Installing Android to device
2.1. Updating through CWM recovery
2.1.1. Creating update archive
Go to target output directory
Code:
cd ${ANDROID_PRODUCT_OUT}
Create folder for updater script. Run in console:
Code:
mkdir -p META-INF/com/google/android
Copy updater script there
Code:
show_progress(0.400000, 0);
ui_print("> Formating system partition");
format("ext4", "EMMC", "/dev/block/mmcblk0p3", "0");
ui_print("> Mounting system partition");
mount("ext4", "EMMC", "/dev/block/mmcblk0p3", "/system");
ui_print("> Extracting system directory");
package_extract_dir("system", "/system");
ui_print("> Creating symlinks");
show_progress(0.200000,0);
symlink("Roboto-Bold.ttf", "/system/fonts/DroidSans-Bold.ttf");
symlink("Roboto-Regular.ttf", "/system/fonts/DroidSans.ttf");
symlink("mksh", "/system/bin/sh");
symlink("toolbox",
"/system/bin/ls","/system/bin/mount","/system/bin/cat",
"/system/bin/ps","/system/bin/kill","/system/bin/ln",
"/system/bin/insmod","/system/bin/rmmod","/system/bin/lsmod",
"/system/bin/ifconfig","/system/bin/setconsole","/system/bin/rm",
"/system/bin/mkdir","/system/bin/rmdir","/system/bin/reboot",
"/system/bin/getevent","/system/bin/sendevent","/system/bin/date",
"/system/bin/wipe","/system/bin/sync","/system/bin/umount",
"/system/bin/start","/system/bin/stop","/system/bin/notify",
"/system/bin/cmp","/system/bin/dmesg","/system/bin/route",
"/system/bin/hd","/system/bin/dd","/system/bin/df",
"/system/bin/getprop","/system/bin/setprop","/system/bin/watchprops",
"/system/bin/log","/system/bin/sleep","/system/bin/renice",
"/system/bin/printenv","/system/bin/smd","/system/bin/chmod",
"/system/bin/chown","/system/bin/newfs_msdos","/system/bin/netstat",
"/system/bin/ioctl","/system/bin/mv","/system/bin/schedtop",
"/system/bin/top","/system/bin/iftop","/system/bin/id",
"/system/bin/uptime","/system/bin/vmstat","/system/bin/nandread",
"/system/bin/ionice","/system/bin/touch","/system/bin/lsof");
ui_print("> Applying permissions");
set_perm_recursive(0, 0, 0755, 0644, "/system");
set_perm_recursive(0, 2000, 0755, 0755, "/system/bin");
set_perm_recursive(0, 2000, 0755, 0755, "/system/xbin");
set_perm_recursive(1002, 1002, 0755, 0440, "/system/etc/bluetooth");
set_perm(0, 0, 0755, "/system/etc/bluetooth");
set_perm(1000, 1000, 0640, "/system/etc/bluetooth/auto_pairing.conf");
set_perm(3002, 3002, 0444, "/system/etc/bluetooth/blacklist.conf");
set_perm(1002, 1002, 0440, "/system/etc/dbus.conf");
set_perm(1014, 2000, 0550, "/system/etc/dhcpcd/dhcpcd-run-hooks");
set_perm(0, 2000, 0550, "/system/etc/init.goldfish.sh");
set_perm(0, 0, 0544, "/system/etc/install-recovery.sh");
set_perm_recursive(0, 0, 0755, 0555, "/system/etc/ppp");
set_perm_recursive(0, 2000, 0755, 0644, "/system/vendor");
set_perm(0, 0, 0644, "/system/vendor/fake.txt");
show_progress(0.200000, 10);
package_extract_file("boot.img", "/dev/block/mmcblk0p2");
NOTE: Don't rename file! It should be updater-script!
Download this archive (Size=149342 MD5=9497D5087FEF04C1EA4EE215A3DC83B8) and extract there
Create ZIP archive. Run in console:
Code:
zip -r9 full-pack.zip boot.img system META-INF
Generate keys. Run in console:
Code:
openssl genrsa -out key.pem 1024
openssl req -new -key key.pem -out request.pem
openssl x509 -req -days 3650 -in request.pem -signkey key.pem -out certificate.pem
openssl pkcs8 -topk8 -outform DER -in key.pem -inform PEM -out key.pk8 -nocrypt
Run signing archive. Run in console:
Code:
java -jar ${ANDROID_HOST_OUT}/framework/signapk.jar certificate.pem key.pk8 full-pack.zip full-pack-sign.zip
2.1.2. Using CWM recovery
Upload full-pack-sign.zip on FAT32 formated microSD card
Turn-off tabled
Insert microSD
Press Power button while hold Volume Down button
Release Power button when you'll see text in top left corner, some like "cleaning cache partition..."
From opened menu select "wipe data/factory reset"
Select "Yes -- delete all user data"
Press on "install zip from sdcard" menu
Select "choose zip from sdcard"
In this menu select "full-pack-sign.zip"
After installing press "Go back"
Press "reboot device"
2.2. Updating through Android debug
2.2.1. Updating system partition
Get a root access
Code:
adb root && adb wait-for-device
Remount system partition with R/W permitions
Code:
adb shell mount -o remount,rw -t ext4 /dev/block/mmcblk0p3 /system/
Sync binaries
Code:
adb shell stop && adb sync && adb reboot
2.2.2. Updating boot partition
Reboot to fastboot
Code:
adb reboot bootloader
Select one of possible methods to use new boot partition
Boot with custom kernel and ramdisk without flashing (boot partition will not be rewrote) - this mode useful for debugging kernel/root
Code:
fastboot boot ${ANDROID_PRODUCT_OUT}/kernel ${ANDROID_PRODUCT_OUT}/ramdisk.img
Boot with custom boot.img without flashing (boot partition will not be rewrote) - this mode also can be used for debugging kernel/root
Code:
fastboot boot ${ANDROID_PRODUCT_OUT}/boot.img
Flashing new boot.img to boot partition
Code:
fastboot flash:raw boot ${ANDROID_PRODUCT_OUT}/kernel ${ANDROID_PRODUCT_OUT}/ramdisk.img
2.3. Enabling Google services
To enable Google services on new system, should be copied several Google binaries to /system/app. To do it should b done several steps:
Get a root access
Code:
adb root && adb wait-for-device
Remount system partition with R/W permitions
Code:
adb shell mount -o remount,rw -t ext4 /dev/block/mmcblk0p3 /system/
Download this (i.e. GAPPS) archive (Size=16449776 MD5=C7E6FAAFE7223A17DE93DD1D7A968734)
Extract it somewhere
Code:
mkdir GooglePack && cd GooglePack
unzip googlepack.zip
Stop dalvik virtual machine
Code:
adb shell stop
Upload APK files
Code:
for f in `ls *.apk`; do echo "Uploading $f" && adb push $f /system/app/; done
Remove Provision.apk - it looks like setup wizard, but SetupWizard.apk much powerful
Reboot device to recovery and wipe data partition (use CWM "Wipe" menu for it)
Code:
adb reboot recovery
Reboot device after wiping
Use wizard on system start-up to configure your account
Use Android Market to install GMail and other apps
3. Debugging
3.1. RILD
To see rild log should be done:
Code:
adb logcat -b radio
4. FAQ
Q: WiFi scanner show few AP, but can't connect anywhere...
A: Try to make factory reset.
Click to expand...
Click to collapse
Q: Is it thor2002ro sources?
A: No, it is my own port.
Click to expand...
Click to collapse
Q: What is the version?
A: ICS MR1 (Current version: 4.0.4).
Click to expand...
Click to collapse
5. Supported features
2D/3D acceleration
Photo/Video Camera
2G/3G
GPS
AGPS
SMS (tested only in GSM networks)
WiFi
Bluetooth
Audio/Video playback
Image viewing
External SD Card
External USB storage
Compass
Gyroscope
6. To do
[rild] Add support for USSD
[rild] Add support/check for MMS
[libsensors] Implement libsensors and replace Acer binaries
[audio] Add support for USB audio devices
[audio] Add support for modem audio input
7. Screenshots
Version
{
"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"
}
EDGE connection
Speed test results on HSDPA+
8. Pre-builds
Build #1 (Size=114409141 MD5=11C9E0BE468B21BF061C7ECF6673C9B4)
Build #2 (Size=119899802 MD5=4CB798A28B38D02217752C6E09F0E226)
[reserved]
Reserved for further updates, if it will be necessary...
Well, thanks to my Ukraine neighbor
Should be an interesting project for the weekend!
Would be great if someone could post a .zip
Holy sweet meatballs!
I have a A501, and I'm pleased to hear that the 3G Iconia is getting some love. Makes me wonder if I should sell it with the ICS ROM loaded on it, or keep it now it has ICS love since I have a Galaxy Tab...
Decisions Decisions.
Eagerly waiting a ZIP so we can all be eating some delicious Ice Cream Sandwich.
That's great, also the steps are really clean, maybe you should give some tips to acer
@shchers: aren't you thinking about submitting your work to CyanogenMod so our tables could get official support from CM team? I think there is no Acer Iconia maintainer right now at all in the CM team so you could try and join them as Iconia maintainer. This would be really great.
Hm, forgive me for asking but where is the kernel to use with it?
macia10 said:
Hm, forgive me for asking but where is the kernel to use with it?
Click to expand...
Click to collapse
After I've written above reply, I've checked shchers' git repo and there is a kernel but in a binary form.
@shchers: did you build this kernel yourself? GPL licence requires that you need to publish its sources as well.
yaworski said:
After I've written above reply, I've checked shchers' git repo and there is a kernel but in a binary form.
@shchers: did you build this kernel yourself? GPL licence requires that you need to publish its sources as well.
Click to expand...
Click to collapse
ONLY if he modified it from Acer's released source. If he didn't, he doesn't have to add the sources to his git (though it'd be handy for conveniences sake). Best we wait and see what he says before jumping to ANY conclusions.
Either way, FANTASTIC work shchers! Thank you VERY much!
@shchers: did you build this kernel yourself? GPL licence requires that you need to publish its sources as well.
Click to expand...
Click to collapse
No, I used Acer kernel. But thanks for reminder
When my kernel will be ready I'll share it with community
About ZIP... I see that many people asking about update package, so I started building and it will be ready in a one hour.
shchers said:
No, I used Acer kernel. But thanks for reminder
When my kernel will be ready I'll share it with community
About ZIP... I see that many people asking about update package, so I started building and it will be ready in a one hour.
Click to expand...
Click to collapse
Awesome. Have you thought about the CyanogenMOD suggestion made earlier? If you added your source to that, we could get official support for it on our devices which would rock, and it'd also make life easier for those wanting to get MIUI ported over.
yaworski said:
@shchers: aren't you thinking about submitting your work to CyanogenMod so our tables could get official support from CM team? I think there is no Acer Iconia maintainer right now at all in the CM team so you could try and join them as Iconia maintainer. This would be really great.
Click to expand...
Click to collapse
Good point, but unfortunately I'd never seen CM source code. May be you can share link to CM Gerrit/Git with me?
shchers said:
Good point, but unfortunately I'd never seen CM source code. May be you can share link to CM Gerrit/Git with me?
Click to expand...
Click to collapse
You should find all you need through the following link...
http://www.cyanogenmod.com/community
There's also a link to their Git hub on there.
shchers said:
Good point, but unfortunately I'd never seen CM source code. May be you can share link to CM Gerrit/Git with me?
Click to expand...
Click to collapse
All you need is here:
http://wiki.cyanogenmod.com/wiki/Building_from_source
http://wiki.cyanogenmod.com/wiki/Howto:_Gerrit
(just replace gingerbread branch with ics)
But you probably need working kernel source for the device to submit vendor specific code to CM.
Is this kernel just a binary from Acer's leak? I'm asking because I'm not aware of a working kernel source for a500.
shchers said:
About ZIP... I see that many people asking about update package, so I started building and it will be ready in a one hour.
Click to expand...
Click to collapse
thx man! i really want to give it a try!
and thx for showing some love to us a501 users nobody cares about us
To yaworski and FloatingFatMan:
Guys, thanks a lot for links! I'll try to build CM tonight
shchers said:
To yaworski and FloatingFatMan:
Guys, thanks a lot for links! I'll try to build CM tonight
Click to expand...
Click to collapse
What, that would be very nice, even though i own an A500! If you need an testing, I'll volunteer.
Taptalked u see
tosomax said:
thx man! i really want to give it a try!
and thx for showing some love to us a501 users nobody cares about us
Click to expand...
Click to collapse
See link in comment #1
Well, I guess I can forget about configuring ubuntu for now
cygwin never could get working.
Great job on compiling and getting the link up!
RapidShare.... not so rapid Probably getting flooded by all the 501 users
You 500 users go play with the 500 roms and stop sucking all the bandwidth!
Related
:[Disclaimer]:
Use this at your own risk!
:[Requirements]:
Microsoft .Net 3.0 (or Mono for Linux / Mac).
An update zip or an "update-script" to convert.
An android phone with a custom recovery that supports edify scripted zip files.
The Java Runtime Environment (only required for signing zip files).
:[Tested and functional in Ubuntu 10.10 / 11.04]:
Please see this post for instructions.
:[Description]:
This is a tool for converting amend scripts to edify scripts.
I only have direct access to an Epic 4G, so I can't test this on other phones.
I rely on the community to give me the info needed to support other devices.
Many thanks go the the numerous people that have contributed, sorry there is no list, but you know who you are.
:[Features]:
Backup original files.
Convert script files from amend to edify.
Convert zip files from amend to edify.
Sign converted zip files (requires the JRE).
Batch Mode converts multiple zip files at once.
Mount Types for multiple phones using an easily upgradeable XML database file.
:[Instructions]:
These are in the README, but I'm leaving them here so maybe you will read them:
Open program.
Select "Options" -> check "Backup Original".
Select "Options" -> check "Delete Temp Files".
Select "Options" -> check "Sign Zip File". << Requires Java (probably won't work on Linux).
Select "Options" -> "Mount Type" -> Select your phone or it's closest equivalent.
Select "File" -> "Open" -> Browse for and select the file to be converted.
Check the "Output" Tab for the resulting conversion.
Select "File" -> "Save"...
NOTE::The conversion is done when the file is opened.
Make sure to set the settings before opening the file.
Click to expand...
Click to collapse
{
"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"
}
[Download latest version Here]
[Download latest database version Here] (right-click, "save as")
:[Extra notes]:
Try "Universal" if your device isn't specifically listed.
VibrantMTD is based on mounts taken from a Vibrant running MIUI.
:[Error messages]:
Error: update-script could not be found in zipThe zip you have tried to open does not contain an "update-script" file.
In other words, the zip is not an amend scripted file and there is nothing to convert.
:[WishList]:
Support for more phones. (See I Need Help notes below.)
:[Testing]:
This was originally tested on an Epic 4G with this GB keyboard, a battery mod that originally came from here, and some other random amend scripted zips.
It has since been successfully used on many different phones with many different amend based zips (by people other than myself).
:[Feedback]:
Please report bugs / errors.
:[I need Help]:
If you want specific mounts for your phone to be included, please help me by running this command from adb:
Code:
adb shell "mount > /sdcard/PHONENAME_mountinfo.txt"
or this command from a terminal:
Code:
mount > /sdcard/PHONENAME_mountinfo.txt
Then email the file to [email protected] with the subject "PHONENAME mountinfo".
Replace PHONENAME with your phone's name, so I know what phone it's for.
:[ChangeLog]:
Code:
phoneDatabase update - (04-08-2012)
- Added WildfireS-MarvelC
phoneDatabase update - (04-07-2012)
- Added Xperia X10 Mini
- Added Droid 3
- Added Galaxy S2 t989
- Added Transform Ultra
- Added Xperia Pro
- Added Optimus
(Sorry to those who had to wait for this.)
phoneDatabase update - (11-28-2011)
- Added GalaxyS2i777
phoneDatabase update - (11-28-2011)
- Added Sensation4G
- Added OptimusS
- Added Universal (note: this should work for [I]most[/I] custom recoveries)
[COLOR="Blue"]Try "Universal" if your device isn't specifically listed.[/COLOR]
phoneDatabase update - (11-11-2011)
- Added XperiaNeo
- Added GalaxyGio
- Added OptimusBlack
phoneDatabase update - (10-05-2011)
- Added NookColor
phoneDatabase update - (10-02-2011)
- Added XperiaArc
- Added Legend
phoneDatabase update - (10-01-2011)
- Added Epic4GTouch
phoneDatabase update - (09-28-2011)
- Added Photon4G
- Added HuaweiUM840
phoneDatabase update - (09-22-2011)
- Added CLIQXT
- Added DroidBionic
phoneDatabase update - (08-23-2011)
- Added myTouch4GSlide
- Renamed "MyTouch4G" to "myTouch4G"
phoneDatabase update - (08-02-2011)
- Added DroidX
- Added VibrantMTD
- Added Defy
- Added Evo3D
phoneDatabase update - (06-27-2011)
- Added EeePadTransformer
v1.0.1.2 - (06-21-2011)
- Added used mount point info to output comments.
- Added user configurable Comments area.
(Thank you [URL="http://forum.xda-developers.com/member.php?u=2982370"]tsachi[/URL] for the idea and original code).
- Reworked some internals for the above changes.
- Minor changes to the AboutForm (ESC / ENTER to exit).
phoneDatabase update - (06-21-2011)
- Added GalaxyTab10.1.
- Added XperiaX8.
phoneDatabase update - (06-03-2011)
- Added Ascend.
phoneDatabase update - (06-02-2011)
- Added Blade.
- Added Milestone (Droid).
- Added G2x.
- Added OptimusOne.
- Added XperiaX10.
phoneDatabase update - (05-05-2011)
- Added Optimus2x.
- Added GalaxyS4G.
- Added Vibrant.
v1.0.1.1 - (04-12-2011)
- Adjusted conversion for write_radio_image and write_hboot_image.
- Misc. internal code changes.
phoneDatabase update - (04-12-2011)
- Added HeroC.
- Added NexusS.
- Added Fascinate.
- Added Thunderbolt.
phoneDatabase update - (03-08-2011)
- added Shift4G.
phoneDatabase update - (02-20-2011)
- added MyTouch4G.
v1.0.1.0 - (02-20-2011)
- added phoneDatabase.xml file for dynamic mount type loading.
- Misc. internal code changes.
v1.0.0.11 - (02-15-2011) [COLOR=Blue]Unreleased[/COLOR]
- Misc. internal code changes.
v1.0.0.10 - (02-14-2011)
- added Mount Type selection for HTC Incredible.
- added Mount Type selection for HTC G2.
pre v1.0.0.10
- see ChangeLog.txt (inside the zip)
=]
If this works as intended, could any joe-shmo (like myself) plug in the scripts from a rom.zip, paste over the new output, and then proceed to flash the rom? (avoiding having to wait for the dev to do it)...
Or is it a little more complicated than that
Sent from my baked and emotionless SPH-D700
finally
Sent from my SPH-D700 using XDA App
Beat me to it. I was working on a php convertor
Sent from my SPH-D700 using Tapatalk
It seems to be buggy right now. I've tried converting something small, a Gingerbread keyboard. Installation aborted.
Anyways, here's the link to what I copied:
http://forum.xda-developers.com/showthread.php?t=845162
Here's the output message:
# Unknown:: delete SYSTEM:app/ime-mtm-stock-gingerbread.apk ;
show_progress(0.1, 0);
# Unknown:: You shouldn't have seen this!
# Unknown:: You shouldn't have seen this!
show_progress(0.1, 10);
Doesn't look like proper syntax. You can't use keyword calls for system, data, tmp, etc in edify. Paths must be proper paths, /system
Sent from my SPH-D700 using Tapatalk
so, this tool is for converting the old .zip files we used to use into the new edify .zip files we need to use for EXT4?
ive been trying to find out how to reformat the CIA boot animation and some custom sounds for boot and shutdown to work with EXT4 but so far everything is aborted when i try to install
sauron0101 said:
It seems to be buggy right now. I've tried converting something small, a Gingerbread keyboard. Installation aborted.
Anyways, here's the link to what I copied:
http://forum.xda-developers.com/showthread.php?t=845162
Here's the output message:
# Unknown:: delete SYSTEM:app/ime-mtm-stock-gingerbread.apk ;
show_progress(0.1, 0);
# Unknown:: You shouldn't have seen this!
# Unknown:: You shouldn't have seen this!
show_progress(0.1, 10);
Click to expand...
Click to collapse
Looks like I forgot to add the delete cmd to the switch statement. =[
And the "you shouldn't see this" is from blank lines in the script (I think).
I'll fix it up when I get a chance (after work).
I'll be releasing the source as well if anyone cares...
@Dameon
You should still do the php thing... Some people hate .Net, and online is sometimes better than downloading a tool.
=]
squshy 7 said:
If this works as intended, could any joe-shmo (like myself) plug in the scripts from a rom.zip, paste over the new output, and then proceed to flash the rom? (avoiding having to wait for the dev to do it)...
Or is it a little more complicated than that
Sent from my baked and emotionless SPH-D700
Click to expand...
Click to collapse
Pretty much, yes...
I plan on supporting zip input and signed zip output. I'll have to see how dificult it is to implement...
=]
Program updated, check 1st post for changelog.
@sauron0101
Your errors should now be fixed.
@nubecoder:
Installation still seems to abort for whatever reason. Clockwork gave Error 6.
Dameon87 said:
Beat me to it. I was working on a php convertor
Sent from my SPH-D700 using Tapatalk
Click to expand...
Click to collapse
I was thinking about doing one, too, but it was I going to be lazy and either write a shell script or a simple C prog to use from the command line.
does it work?
thizzmaster said:
does it work?
Click to expand...
Click to collapse
There was a problem with the line endings being used, that seemed to be causing the "Status 6" error.
Should be fixed now.
Please report any bugs found.
=]
Provide a Linux Version, please.
Excellent tool, Great job.
Worked for me with a theme, thanks
does this do this auto or do you need the new edify scripts to paste in the output section? if you need the scripts could somone please post them.
danweb66 said:
does this do this auto or do you need the new edify scripts to paste in the output section? if you need the scripts could somone please post them.
Click to expand...
Click to collapse
Input is for the amend script. Output is where the edify scripts come out.
Remember the cardinal rule of nature, don't put anything in where something is supposed to come out.
I stripped nubecoders comments from his code for anyone who wants to see all the pieces being converted by this program. He has included his code with his prog, so if anyone wants to port at least the converter part to linux or whatever, look in a2eForm.cs.
Code:
* from: assert compatible_with("0.2") == "true"
* to: assert(compatible_with("0.2") == "true");
* from: show_progress 0.1 0
* to: show_progress(0.1, 0);
* from: format SYSTEM:
* to: delete_recursive("/system");
* from: delete SYSTEM:app/ime-mtm-stock-gingerbread.apk
* to: delete("/system/app/ime-mtm-stock-gingerbread.apk")
* from: delete_recursive SYSTEM:app
* to: delete_recursive("/system/app");
* from: copy_dir PACKAGE:system SYSTEM:
* to: package_extract_dir("system", "/system");
* from: copy_dir PACKAGE:app SYSTEM:app
* to: package_extract_dir("app", "/system/app");
* from: symlink SYSTEM:xbin/su SYSTEM:bin/su
* to: symlink("/system/xbin/su", "/system/bin/dumpcrash");
*
* from: symlink dumpstate SYSTEM:bin/dumpcrash
* to: symlink("dumpstate", "/system/bin/dumpcrash");
* from: set_perm_recursive 0 0 0755 0644 SYSTEM:
* to: set_perm_recursive(0, 0, 0755, 0644, "/system");
* from: set_perm_recursive 0 2000 0755 0755 SYSTEM:bin
* to: set_perm_recursive(0, 2000, 0755, 0755, "/system/bin");
* from: set_perm 0 3003 02755 SYSTEM:
* to: set_perm(0, 3003, 02755, "/system")
* from: set_perm 0 3003 02755 SYSTEM:bin/netcfg
* to: set_perm(0, 3003, 02755, "/system/bin/netcfg");
* from: run_program PACKAGE:installbusybox
* to: run_program("installbusybox");
* from: run_program programToRun arg1
* to: run_program("programToRun", "arg1");
* from: run_program programToRun arg1 arg2
* to: run_program("programToRun", "arg1", "arg2");
* from: run_program /system/xbin/busybox --install -s /system/xbin
* to: run_program("/system/xbin/busybox", "--install", "-s", "/system/xbin");
* from: write_raw_image PACKAGE:boot.img BOOT:
* to: assert(package_extract_file("boot.img", "/tmp/boot.img"),
* write_raw_image("/tmp/boot.img", "boot"),
* delete("/tmp/boot.img"));
Hey Guys,
My name is Braa, I’am just a new developer here in the XDA and today I’am going to show you a complete guide on how to make your own “XPERIA” Stock Based ROM.
First of all you have to get the Stock XPERIA Firmware of your device
Let’s get started to build our ROM:
First Step: (Getting the STOCK FTF File of your Device)
1) Get the latest stock FTF Firmware of your device
{
"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"
}
2) Open it using 7-ZIP
3) Now we will be focusing on the most important file “system.sin” Just Extract it to your desktop
4)Now go to the XPERIA Flashtool Tools Sin Editor Choose the system.sin file you have just extracted to your desktop Extract Data
5)Now you will have a file called “system.ext4”
6)Get a tool called “EXT4 Unpacker” then select that file Extract all the files into a folder
Congrlatiouns you have got your stock device firmware but not in the form of “FTF” instead in the form of “ZIP”
But this was not everything we will now move into more advanced part but don’t panic everything will be explained easily with screenshots so, Let’s GO !
Understanding the System folder you have just extracted
System Folder Contains the Majority of ROM Files, now we have to explain the SYSTEM Folder structure
1. app : contain all the system's app and the odex file of system app
2. bin : contain the command and bin files for the rom
3. vendor: specified vendor system. you have your specific vendor's app, libs, and config files here also contains the Themes (XPERIA 2011-2012 Devices)
4. etc : additional setting and files for the ROM.
5. font : It’s Clear it contains the fonts
6. framework : system's framework files and the odex file for framework
7. lib : drivers, modules, kernel related files for the rom
8. media: media files-ringtones, notification, bootanimation.
10. usr : files needed for keyboard, bluetooth, etc.
11. xbin : additional command and bin files (busybox is usually installed here)
12. build.prop file : Contains your Device default properties
Q)DEODEX VS ODEX
A)Most of custom rom available is deodexed rom while our stock rom is half deodexed rom. I'll try to explain it in most simple way. First of all, we should understand that mostly every app in android consist of three part, *apk files, *dex/odex files, and lib files.
ODEXED rom means that *dex file needed to run the app is extracted from the apk file and placed in same folder with the apk files (/system/app). the positive side, it consume less internal memory and a execute faster. the negative side, it makes the app uncostumizable (cannot apply custom themes) and need more space in system partition.
DEODEXED rom means that *dex file needed to run the app is extracted from the apk file and placed in /data/dalvik-cache. the positive side, the app can be themed (full customizable) and consume less system partition. we could put more app in /system/app in deodexed rom. the negative side, it consume a lot of internal memory. please be cautious with the internal memory space if you use deodexed rom. (NOTE: if you start from stock rom, you may use Kitchen to convert odexed to deodexed rom).
Now if you want a really looking good Ui ROM u will stick into DeOdexing your ROM
Note: What was explained above in the part of ODEX VS DEODEX doesn’t mean that DeOdexing ROM will decrease it’s Performance
Q)How to DeOdex My ROM ?
A)Bro, This could be done using many tools like (Universal DeOdexer or DsiXda Kitchen)
Now I will explain the Dsixda kitchen method
Tools Needed:
Cygwin
JDK
Android Kitchen
Steps:
1)Extract Cygwin.zip Run Setup.exe Next Install from local directory Set the root directory as it Set the local package directory as cygwin_packages Select that reload icon and install all
2)Now Click on Cygwin icon on desktop you will see that commands appear automaticly
3)Now Extract the kitchen Android-Kitchen-0.224.zip then rename it to “kitchen” (without the quotations)
4)Then copy that folder into c:/Cygwin home your username folder
5)Open the cygwin and write these commnds
6)Cd kitchen ./menu
7) Just compress the system folder we have just extracted from the ext4 unpacker into ZIP File
8)Now copy that file to C:\cygwin\home\Your username\kitchen\original_update
9)Open the cygwin then write the kitchen commands I’ve mentioned above
10)Select “Set up working folder of your ROM” Press Enter Select the zip you compressed It will ask you to add a null boot.img agree to this
11)Select the “Advanced Options” Select De-Odex files in your ROM Select “b” DeOdex both folders (Recommended) wait till the process finishes
Updater Script ! (Nightmare to a lot of noobs)
Sorry Guys I can’t help you with this part even my updater-script in my ROM I forgot how I did it here is it you can base your updater-script on it
Just download it !
WE’VE Done this part !
Modifying your ROM
1)Adding Tweaks
1.1)Adding init.d Support
Adding init.d support means that you can run your favorite scripts and tweaks on your Stock Based ROM
Download the file “enable_init.d.zip” and put all its files inside system folder into your ROM System Folder
1.2)Modifying Build.Prop for more stability
Here’s a lot of Build.prop Tweaks
1. Force launcher into memory
ro.HOME_APP_ADJ=1
2. Raise JPG quality to 100%
ro.media.enc.jpeg.quality=100
3. VM Heapsize; higher RAM, higher hp can be
dalvik.vm.heapsize=48m
4. Render UI with GPU
debug.sf.hw=1
5. Decrease dialing out delay
ro.telephony.call_ring.delay=0
6. Helps scrolling responsiveness
windowsmgr.max_events_per_sec=150
7. Save battery
wifi.supplicant_scan_interval=180
pm.sleep_mode=1
ro.ril.disable.power.collapse=0
8. Disable debugging notify icon on statusbar
persist.adb.notify=0
9. Increase overall touch responsiveness
debug.performance.tuning=1
video.accelerate.hw=1
10. Raise photo and video recording quality
ro.media.dec.jpeg.memcap=8000000
ro.media.enc.hprof.vid.bps=8000000
11. Signal (3G) tweaks
ro.ril.hsxpa=2
ro.ril.gprsclass=10
ro.ril.hep=1
ro.ril.enable.dtm=1
ro.ril.hsdpa.category=10
ro.ril.enable.a53=1
ro.ril.enable.3g.prefix=1
ro.ril.htcmaskw1.bitmask=4294967295
ro.ril.htcmaskw1=14449
ro.ril.hsupa.category=5
12. Net speed tweaks
net.tcp.buffersize.default=4096,87380,256960,4096,16384,256960
net.tcp.buffersize.wifi=4096,87380,256960,4096,16384,256960
net.tcp.buffersize.umts=4096,87380,256960,4096,16384,256960
net.tcp.buffersize.gprs=4096,87380,256960,4096,16384,256960
net.tcp.buffersize.edge=4096,87380,256960,4096,16384,256960
13. Disable blackscreen issue after a call
ro.lge.proximity.delay=25
mot.proximity.delay=25
14. Fix some application issues
ro.kernel.android.checkjni=0
15. Phone will not wake up from hitting volume rocker
ro.config.hwfeature_wakeupkey=0
16. Force button lights on when screen is on
ro.mot.buttonlight.timeout=0
17. Disable boot animation for faster boot
debug.sf.nobootanimation=1
18. Miscellaneous flags
ro.config.hw_menu_unlockscreen=false
persist.sys.use_di ring=0
persist.sys.purgeable_assets=1
dalvik.vm.dexopt-flags=m=y
ro.mot.eri.losalert.delay=1000
Q)How can I add these lines to my build.prop
A)I will tell you
Download a tool called “Notepad++”
Extract the build.prop file from your ROM then right click on it then edit with notepad++
Go to Last line:
Then add
# Tweak Name
Tweak Properties
#
Done
Here’s my build.prop I used in my ROM: its just a sample copy what you want from it
2)Bravia Engine 2 with X-Reality
Download the file of BE-2 then paste it in your ROM then add these lines to build.prop
# X-Reality Engine
ro.service.swiqi2.supported = true
persist.service.swiqi2.enable = 1
#
ro.service.swiqi3.supported = true
persist.service.swiqi3.enable = 1
#
3) Modifying the wallpapers of the ROM
Go to etc\customization\content\com\sonyericsson\wallpaperpicker\wallpapers
Then Add your Wallpapers
4) Modifying the Themes
system\vendor\overlay\framework
Themes are found here
In newer XPERIA Devices Themes are found in /app
5) Adding Supercharger intiries
Just add these lines to your build.prop
# V6 SuperCharger, OOM Grouping & Priority Fixes created by zeppelinrox.
# DO NOT DELETE COMMENTS. DELETING COMMENTS WILL BREAK UNINSTALL ROUTINE!
# BEGIN OOM_MEM_Settings
ro.FOREGROUND_APP_MEM=1536
ro.VISIBLE_APP_MEM=3072
ro.PERCEPTIBLE_APP_MEM=4096
ro.HEAVY_WEIGHT_APP_MEM=20480
ro.SECONDARY_SERVER_MEM=8192
ro.BACKUP_APP_MEM=14080
ro.HOME_APP_MEM=1024
ro.HIDDEN_APP_MEM=10240
ro.EMPTY_APP_MEM=15360
# END OOM_MEM_Settings
# BEGIN OOM_ADJ_Settings
ro.FOREGROUND_APP_ADJ=0
ro.VISIBLE_APP_ADJ=3
ro.PERCEPTIBLE_APP_ADJ=3
ro.HEAVY_WEIGHT_APP_ADJ=5
ro.SECONDARY_SERVER_ADJ=7
ro.BACKUP_APP_ADJ=6
ro.HOME_APP_ADJ=1
ro.HIDDEN_APP_MIN_ADJ=12
ro.EMPTY_APP_ADJ=15
# END OOM_ADJ_Settings
# End of V6 SuperCharged Entries
6) Making your Apptray Transparent
Just Replace the apptray_pane_bg.9.png I provided to your Home.apk in store mode
7) Changing the bootanimation (HDPI)
XPERIA Z1
XPERIA Z2
8) Media not scanned or No pictures found here’s the solution
Download Rescan media root and put it in data folder of your ROM
If you are on 4.1.2 and HDPI Device (Maybe works on XHDPI or MDPI)
So my ROM “Doomsday” is open source for you, it contains full XPERIA Z2 Ui just take the download link from my signature then download it and take what you need from it but don’t forget to give me the proper credits and press thanks for me
Thread will be updated soon :laugh:
Downloads
My Personal ROM Updater-script
My Build.prop
[URL="http://d-h.st/j59"]Doomsday ROM[/URL]
EXT4 Unpacker
X-Reality and BE-2
apptray_pane_bg.9
XPERIA Z1 Bootanimation (HDPI)
XPERIA Z2 Bootanimation (HDPI)
Init.d Support
Why it says, Installation aborted.. I tried 3,4 times to make installation from custom rom. file... but unable to flash by using that rom the ROM.
Error shows this image in background.. (Can not make ScreenShot)
@Eliminator79 ho did you made a working custom rom from the above tutorial?
I have created 15-20 custom rom in different ways from different tutorials from xda, mostly it stops installation with an error. 4-5 times it started phone just for showing start animation ...
I quit....
Right now Installed stock rom back. after wasting 2 days..
Might be an updater-script
aatifaneeq said:
@Eliminator79 ho did you made a working custom rom from the above tutorial?
I have created 15-20 custom rom in different ways from different tutorials from xda, mostly it stops installation with an error. 4-5 times it started phone just for showing start animation ...
I quit....
Right now Installed stock rom back. after wasting 2 days..
Click to expand...
Click to collapse
Might be an updater-script problem
What's the error that comes during installation ?
Status 7 or Status 6 :good:
no status..
it just says
installation abort..
this time is says , aborted status (0)
View attachment 2893076
Here is the updater script code
Code:
show_progress(0.1, 0);
format("MTD", "system");
mount("MTD", "system", "/system");
package_extract_dir("system", "/system");
symlink("dumpstate", "/system/bin/dumpcrash");
symlink("debuggerd", "/system/bin/csview");
symlink("mksh", "/system/bin/sh");
symlink("toolbox", "/system/bin/chcon");
symlink("toolbox", "/system/bin/setenforce");
symlink("toolbox", "/system/bin/grep");
symlink("toolbox", "/system/bin/runcon");
symlink("toolbox", "/system/bin/touchinput");
symlink("toolbox", "/system/bin/getsebool");
symlink("toolbox", "/system/bin/setsebool");
symlink("toolbox", "/system/bin/restorecon");
symlink("toolbox", "/system/bin/getenforce");
symlink("toolbox", "/system/bin/load_policy");
symlink("toolbox", "/system/bin/cp");
symlink("toolbox", "/system/bin/playback");
symlink("toolbox", "/system/bin/du");
set_perm_recursive(0, 0, 0755, 0644, "/system");
set_perm_recursive(0, 2000, 0755, 0755, "/system/bin");
set_perm(0, 3003, 06755, "/system/bin/ip");
set_perm(0, 3003, 02750, "/system/bin/netcfg");
set_perm(0, 3004, 02755, "/system/bin/ping");
set_perm(0, 2000, 06750, "/system/bin/run-as");
set_perm_recursive(1002, 1002, 0755, 0440, "/system/etc/bluetooth");
set_perm(0, 0, 0755, "/system/etc/bluetooth");
set_perm(1000, 1000, 0640, "/system/etc/bluetooth/auto_pairing.conf");
set_perm(3002, 3002, 0444, "/system/etc/bluetooth/blacklist.conf");
set_perm(1002, 1002, 0440, "/system/etc/dbus.conf");
set_perm(1014, 2000, 0550, "/system/etc/dhcpcd/dhcpcd-run-hooks");
set_perm(0, 2000, 0550, "/system/etc/init.goldfish.sh");
set_perm_recursive(0, 0, 0755, 0555, "/system/etc/ppp");
set_perm_recursive(0, 2000, 0755, 0644, "/system/vendor");
set_perm(0, 2000, 0755, "/system/vendor/lib");
set_perm(0, 2000, 0755, "/system/vendor/lib/hw");
set_perm_recursive(0, 2000, 0755, 0755, "/system/xbin");
show_progress(0.1, 10);
show_progress(0.2, 0);
show_progress(0.2, 10);
unmount("/system");
Also replaced, updater script with yours 1, stil same error..
aatifaneeq said:
this time is says , aborted status (0)
View attachment 2893076
Here is the updater script code
Code:
show_progress(0.1, 0);
format("MTD", "system");
mount("MTD", "system", "/system");
package_extract_dir("system", "/system");
symlink("dumpstate", "/system/bin/dumpcrash");
symlink("debuggerd", "/system/bin/csview");
symlink("mksh", "/system/bin/sh");
symlink("toolbox", "/system/bin/chcon");
symlink("toolbox", "/system/bin/setenforce");
symlink("toolbox", "/system/bin/grep");
symlink("toolbox", "/system/bin/runcon");
symlink("toolbox", "/system/bin/touchinput");
symlink("toolbox", "/system/bin/getsebool");
symlink("toolbox", "/system/bin/setsebool");
symlink("toolbox", "/system/bin/restorecon");
symlink("toolbox", "/system/bin/getenforce");
symlink("toolbox", "/system/bin/load_policy");
symlink("toolbox", "/system/bin/cp");
symlink("toolbox", "/system/bin/playback");
symlink("toolbox", "/system/bin/du");
set_perm_recursive(0, 0, 0755, 0644, "/system");
set_perm_recursive(0, 2000, 0755, 0755, "/system/bin");
set_perm(0, 3003, 06755, "/system/bin/ip");
set_perm(0, 3003, 02750, "/system/bin/netcfg");
set_perm(0, 3004, 02755, "/system/bin/ping");
set_perm(0, 2000, 06750, "/system/bin/run-as");
set_perm_recursive(1002, 1002, 0755, 0440, "/system/etc/bluetooth");
set_perm(0, 0, 0755, "/system/etc/bluetooth");
set_perm(1000, 1000, 0640, "/system/etc/bluetooth/auto_pairing.conf");
set_perm(3002, 3002, 0444, "/system/etc/bluetooth/blacklist.conf");
set_perm(1002, 1002, 0440, "/system/etc/dbus.conf");
set_perm(1014, 2000, 0550, "/system/etc/dhcpcd/dhcpcd-run-hooks");
set_perm(0, 2000, 0550, "/system/etc/init.goldfish.sh");
set_perm_recursive(0, 0, 0755, 0555, "/system/etc/ppp");
set_perm_recursive(0, 2000, 0755, 0644, "/system/vendor");
set_perm(0, 2000, 0755, "/system/vendor/lib");
set_perm(0, 2000, 0755, "/system/vendor/lib/hw");
set_perm_recursive(0, 2000, 0755, 0755, "/system/xbin");
show_progress(0.1, 10);
show_progress(0.2, 0);
show_progress(0.2, 10);
unmount("/system");
Click to expand...
Click to collapse
you should set correct code partition in your update script
i mean this lines:
format("MTD", "system");
mount("MTD", "system", "/system");
you can find this lines in another custom roms which correct work on your phone.
just find this lines in that custom rom ( in meta inf folder in that custom rom ) then copy that lines and replace that in your update script
if your custom rom has a kernel , you should find the partition of kernel at the end of update script and replace in end of your update script
finally replace the update binary in that custom rom which correct work on your rom with your update binary.
do this work at the end of your work.means make your rom first then do this work with your rom.zip file
hope can help you
I have also used the working update script downloaded from Eliminator79's 2nd post... but still displaying same error..
Maybe works
aatifaneeq said:
I have also used the working update script downloaded from Eliminator79's 2nd post... but still displaying same error..
Click to expand...
Click to collapse
Replace the whole META-INF folder of your ROM with mine
Strongly will work :good:
Also did this too..also replaced with few other Xperia J roms, not worked. even replaced only apps folder. but in vain..
aatifaneeq said:
I have also used the working update script downloaded from Eliminator79's 2nd post... but still displaying same error..
Click to expand...
Click to collapse
NO bro
just used update binary from another rom which work correct on your phone
but about update script just edit 2 lines that i told you before
find it in update script for another custom rom for your phone and replace with your update script ( just 2 lines )
of course when you build your rom then do this
Thanks for the reply.
I already did this too. but it only shows boot animation , i have waited 10-12 minutes but nothing changed... same story all the time
aatifaneeq said:
Thanks for the reply.
I already did this too. but it only shows boot animation , i have waited 10-12 minutes but nothing changed... same story all the time
Click to expand...
Click to collapse
Give me the META-INF from your custom rom ( which you made it ) and META-INF from other custom roms which correct work on your phone
hamidreza2010 said:
Give me the META-INF from your custom rom ( which you made it ) and META-INF from other custom roms which correct work on your phone
Click to expand...
Click to collapse
Bro, thanks for the reply..
Here are both META-INF folders, both are not working when i replace (delete and paste all new files) system folder.
P.S. Installation only works when i modify app files from Doomsday ROM Jlo v5 ROM, But i also want to change all other system folders, not only app folder.
aatifaneeq said:
Bro, thanks for the reply..
Here are both META-INF folders, both are not working when i replace (delete and paste all new files) system folder.
P.S. Installation only works when i modify app files from Doomsday ROM Jlo v5 ROM, But i also want to change all other system folders, not only app folder.
Click to expand...
Click to collapse
ok just 2 thing:
1- Your roms has custom kernel ?
2- Give me META-INF folders from another normal custom rom not aroma
hamidreza2010 said:
ok just 2 thing:
1- Your roms has custom kernel ?
2- Give me META-INF folders from another normal custom rom not aroma
Click to expand...
Click to collapse
i do not have any other meta inf :|
Well, i found a rom, and using it as base, where i have replaced app, framework folder and installation worked and Phone is working fine.. But when i replace complete system directory, it stopped on boot screen..
about kernal, i am using stock kernal.sin
here is the meta inf that worked only with app/framework folder
thanks dude
Great TUT :highfive: :good: :victory:
Now I get my ROM installed ok
But BIGGEST PROBLEM I FACE! On Rebooting it stucks on splash screen and then it reboots! :'(
Check my updater script!
Help me someone please :'( Been working a lot but this sh*t doesn't resolves!
I use Xperia SP and this is my whole META-INF Folder
Thanks in advance. Anyone who can help me
Meta INF download below :
Tech N You said:
thanks dude
Great TUT :highfive: :good: :victory:
Now I get my ROM installed ok
But BIGGEST PROBLEM I FACE! On Rebooting it stucks on splash screen and then it reboots! :'(
Check my updater script!
Help me someone please :'( Been working a lot but this sh*t doesn't resolves!
I use Xperia SP and this is my whole META-INF Folder
Thanks in advance. Anyone who can help me
Meta INF download below :
Click to expand...
Click to collapse
Probably one of these
1)Framework issue (Both .jar & -res.apk)
2)Modified Wrongly Build.prop
3)Permissions are set wrongly
4)/lib problems
Just check and let me know
@dorimanx @daniel.stuart14 @REV3NT3CH @savoca @RenderBroken
Hi devs i would to learn how to build rom and kernel for d802 variant for myself.
I have build cm12 with success and it works flawlessly.
Now i want to build kernel compatible with cm 12.
I downloaded kernel from this source: https://github.com/CyanogenMod/android_kernel_lge_msm8974/tree/cm-12.0
I have used linaro toolchain 4.9.2 for a15 cpu, during the build i had a few of errors but i have fixed it, after that i have my zImage and dtb files prepared...
So i have used boot.img from previously cm 12 build(i take it from zip file to flash) to get ramdisk and zImage.
Then i have switch the original zImage with my zImage-dtb from my build and i modified files from ramdisk.
I have flashed this kernel through loki_tool but i'm stuck on lg logo...
So my question is i have to use zImage or zImage-dtb from my build?
What about creating dt.img, its obligatory?
Can i use this offset to build my kernel or i have to change it?
Code:
base=0x00000000
pagesize=2048
ramdisk_offset=0x05000000
tags_offset=0x04800000
Sorry for disturb but im curious and i want to do it by myself, so i hope you can help me!
Thanks in advance
Use this script to compile and create your image. (put in root folder of kernel)
You'll need edit it, and change:
build path. (in my script is: build=/home/daniel/android-dev/kernel_test)
Cross compile path
You'll need change the defconfig path, too.
Change the config="xxx_defconfig", to the defconfig's name of all the g2 variants in "arch/arm/configs".
And put it in your kernel root directory, too. (It's the open_bump, so you don't need loki it again, you can use my installation script + lcd.sh, in ozip folder.)
And, if for some reason you haven't installed the mkbootimg yet, download it, extract. Then, go to the folder that you've extracted, and do that:
Code:
sudo cp mkbootimg /bin/mkbootimg
sudo chmod 755 /bin/mkbootimg
sudo cp dtbToolCM /bin/dtbToolCM
sudo chmod 755 /bin/dtbToolCM
sudo cp mkbootfs /bin/mkbootfs
sudo chmod 755 /bin/mkbootfs
sudo cp mkboot /bin/mkboot
sudo chmod 755 /bin/mkboot
You'll need extract the ramdisk in ramdisk folder on root kernel folder, so you can use "mkboot" for it.
It'll say to you the ramdisk_offset, tags_offset and cmdline. So, change this in export.sh if there's a difference between.
After this. go to your kernel folder, and then: ./export.sh
OBS: In the first time you execute the script, it create the zimage, if everything goes right, execute the script again, and it'll create a zip with boot.img inside.
Hi thanks for your reply i will try this !
Which configs i have to use those one cyanogenmod_d802_config or open_g2 and so on?
I think is the cyanogenmod_d802_config.
@daniel.stuart14
i have updater-script like this:
ui_print("ebreo kernel for lg g2 d802 variant");
ui_print("Installing modules...");
mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system");
delete_recursive("/system/lib/modules");
package_extract_dir("system", "/system");
set_perm_recursive(0, 0, 0755, 0644, "/system/lib/modules");
unmount("/system");
package_extract_file("lcd.sh", "/tmp/lcd.sh");
package_extract_file("boot.img", "/tmp/boot.img");
ui_print("Installing boot.img...");
show_progress(0.500000, 10);
set_perm(0, 0, 0755, "/tmp/lcd.sh");
assert(run_program("/tmp/lcd.sh") == 0);
delete("/tmp/lcd.sh");
ui_print("Done!");
show_progress(1.000000, 10);
Click to expand...
Click to collapse
But i have an error when i flash this by twrp...are there an errors?
Ok i have resolve problem with updater-script, device boot but after a cyanogenmod lho my phone reboot again....how can i debug it?
ebreo said:
Ok i have resolve problem with updater-script, device boot but after a cyanogenmod lho my phone reboot again....how can i debug it?
Click to expand...
Click to collapse
Okay, you should use logcat.
But first, try compile without the changes in kernel that you did.
daniel.stuart14 said:
Okay, you should use logcat.
But first, try compile without the changes in kernel that you did.
Click to expand...
Click to collapse
I didn't any changes its clean kernel from source....i will post logs from build.sh script.
How can i use logcat?
Thanks very much daniel!
Result from build.sh script:
OBJCOPY arch/arm/boot/zImage
Kernel: arch/arm/boot/zImage is ready
CAT arch/arm/boot/zImage-dtb
Kernel: arch/arm/boot/zImage-dtb is ready
[email protected]:~/android/kernel/cm_msm8974$ ./build.sh
TEST Build
Pick variant...
1) d800
2) d801
3) d802
4) ls980
5) vs980
#? 3
Checking for build...
Extracting files...
Modules found.
Making dt.img...
DTB combiner:
Input directory: 'arch/arm/boot/'
Output file: 'out/dt.img'
Found file: msm8974-v2-g2-open_com.dtb ... chipset: 126, rev: 131072, platform: 118, subtype: 0
Found file: msm8974-g2-open_com.dtb ... chipset: 126, rev: 0, platform: 118, subtype: 0
Found file: msm8974-v2-2-g2-open_com.dtb ... chipset: 126, rev: 131074, platform: 118, subtype: 0
=> Found 3 unique DTB(s)
Generating master DTB... completed
dt.img created
Making ramdisk...
Making boot.img...
Bumping...
bumped image: ozip/boot_bumped.img
Zipping...
adding: boot.img (deflated 7%)
adding: system/ (stored 0%)
adding: system/lib/ (stored 0%)
adding: system/lib/modules/ (stored 0%)
adding: system/lib/modules/scsi_wait_scan.ko (deflated 57%)
mv: „../ebreo_Kernel-1.0_d802_signed.zip” i „/home/marcio/android/kernel/cm_msm8974/ebreo_Kernel-1.0_d802_signed.zip” to ten sam plik
Done...
Output zip: /home/marcio/android/kernel/cm_msm8974/ebreo_Kernel-.zip
[email protected]:~/android/kernel/cm_msm8974$
Click to expand...
Click to collapse
So all is gone good
oh, okay.
You can boot, and after some minutes it reboot? Or are you in bootloop?
You can only use logcat if the rom starts.
For it, you must enable ADB, and install adb interface in your linux. (can be in windows too.)
After it, connect the device on PC, open the terminal, and put:
adb logcat
You'll need allow it in your device. So, it will start to show a lot of mensages in terminal.
For save it, do a ctrl + c. (to stop the messages), and put it:
adb logcat -c
It'll be saved on you current folder.
daniel.stuart14 said:
oh, okay.
You can boot, and after some minutes it reboot? Or are you in bootloop?
You can only use logcat if the rom starts.
For it, you must enable ADB, and install adb interface in your linux. (can be in windows too.)
After it, connect the device on PC, open the terminal, and put:
adb logcat
You'll need allow it in your device. So, it will start to show a lot of mensages in terminal.
For save it, do a ctrl + c. (to stop the messages), and put it:
adb logcat -c
It'll be saved on you current folder.
Click to expand...
Click to collapse
My problem is that im in bootloop....
MERE ROM FOR MICROMAX A120
FEATURES:
*KitKat Based
*Aosp Icons
*Sound Settings
*Better Ram Management
*Network Monitor
*Listview Animation
*Volume Rocker Wake switch
*Shutdown Animation switch
*Performance Control
*Proximity Gestures
*Multiuser Support
*App Privacy
*Advanced Reboot Menu
*Updated and Fixed Gapps
*Ios Fonts
Screenshots:
{
"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"
}
INSTRUCTION TO FLASH MERE ROM ON FOTA MMX
1. You must be on stock mmx jellybean or fota mmx kitkat.
2. Boot into recovery. I personally prefer PHILZ.
3. If you are on philz, select clean to install a new rom. If you are not using philz simply wipe/data, wipe/system in any other recovery.
4. Browse to the merefota.zip location in your sd card and install it.
5. Reboot. We are done!
DOWNLOAD LINK : MERE FOTA
Credits :
* Team EPIC for developing MERE
* @umangleekha & @Siddhesh.K15 .
ROM OS Version: 4.4.x KitKat
ROM Kernel: Linux 3.4.x (STOCK)
Version Information
Status: FINAL
Current Beta Version: 1.51
Final Release Date: 2015-01-12
Created 2015-01-08
Last Updated 2015-01-12
Mere rom for STOCK micromax
INSTRUCTION TO FLASH MERE ROM ON MMX STOCK
1. You must be on Stock Kitkat mmx_06. You can download it from here.
2. Download CTR recovery from here and flash it with sp flash tool.
3. Boot into recovery and go to Wipe Menu and click on Wipe Data-Factory Reset.
4. Now select Install zip and browse to the location where you have MERE ROM zip and install it.
5. Reboot your device & enjoy full aosp experience with MERE rom.
Download Link: MERE ROM
Hit thanks if you want me to bring more such roms for our device
Mere rom for wiko rainbow
INSTRUCTION TO FLASH MERE ROM ON WIKO RAINBOW
1. You must be on wiko rainbow kitkat before flashing this ROM.
2. Boot into recovery and wipe/data & /system.
3. Browse your sd card for mere rom zip and install it.
4. Reboot & enjoy!
Note: Do not flash DOLBY mod, DSP manager is inbuilt in the latest version.
DOWNLOAD LINK: Go here
DOLBY MOD FOR MERE
1. Download from here.
2. Boot into recovery and simply flash it, then reboot.
3. Enjoy Dolby sound on your device.
Note: FOR MERE ROM ONLY
Credits: @umangleekha for this mod.
Hit thanks if you want me to bring more such roms for our device
my device is myphone agua rio (s5501) version with 4gb of storage and running Edmhar's Kitkat Deodexed. can i flash this directly to my device? Thanks.
cheeze.keyk said:
my device is myphone agua rio (s5501) version with 4gb of storage and running Edmhar's Kitkat Deodexed. can i flash this directly to my device? Thanks.
Click to expand...
Click to collapse
No, its for different base.
or i need to flash the mmx fota before flashing your rom?
cheeze.keyk said:
or i need to flash the mmx fota before flashing your rom?
Click to expand...
Click to collapse
First, its not my rom. It's Team Mere's creation. So full credits to them for developing such a beautiful rom. I simply ported it.
Second, i am not sure whether micromax fota works on rio or not. Better consult senior devs of your rio group.
Good work, but found a bug.
Wifi internet connection lost when switching between wifi ap (2 routers, same SSID, same security and password, different channel.)
This works well in any other ROM. Never happened to me.
Another thing. Because you used wiko rainbow DarkL zip?
You need to modify the script !!
Code:
mount("ext4", "EMMC", "/dev/block/mmcblk0p5", "/system");
delete_recursive("/system/app");
delete_recursive("/system/priv-app");
delete_recursive("/system/framework");
delete_recursive("/system/media");
package_extract_dir("system", "/system");
[COLOR="Red"]set_perm_recursive(0, 0, 0666, 0666, "/data/data/de.robv.android.xposed.installer/conf/modules.list");[/COLOR]
set_perm_recursive(0, 0, 0777, 0777, "/system/etc/init.d");
set_perm_recursive(0, 0, 0777, 0777, "/system/xbin/busybox");
run_program("/sbin/umount", "/system");
[COLOR="Red"]run_program("/sbin/mount", "/data");
package_extract_dir("data", "/data");[/COLOR]
delete_recursive("/data/dalvik-cache");
[COLOR="Red"]run_program("/sbin/umount", "/data");[/COLOR]
run_program("/system/xbin/busybox", "--install", "-s", "/system/xbin");
show_progress(0.1, 10);
ui_print("[*] Flashing partition: BOOT");
assert(package_extract_file("boot.img", "/tmp/boot.img"),
write_raw_image("/tmp/boot.img", "bootimg"),
delete("/tmp/boot.img"));
assert(package_extract_file("logo.bin", "/tmp/logo.bin"),
write_raw_image("/tmp/logo.bin", "logo"),
delete("/tmp/logo.bin"));
show_progress(0.2, 10);
unmount("/system");
The red lines can be deleted
moonrotation said:
Good work, but found a bug.
Wifi internet connection lost when switching between wifi ap (2 routers, same SSID, same security and password, different channel.)
This works well in any other ROM. Never happened to me.
Another thing. Because you used wiko rainbow DarkL zip?
You need to modify the script !!
Code:
mount("ext4", "EMMC", "/dev/block/mmcblk0p5", "/system");
delete_recursive("/system/app");
delete_recursive("/system/priv-app");
delete_recursive("/system/framework");
delete_recursive("/system/media");
package_extract_dir("system", "/system");
[COLOR="Red"]set_perm_recursive(0, 0, 0666, 0666, "/data/data/de.robv.android.xposed.installer/conf/modules.list");[/COLOR]
set_perm_recursive(0, 0, 0777, 0777, "/system/etc/init.d");
set_perm_recursive(0, 0, 0777, 0777, "/system/xbin/busybox");
run_program("/sbin/umount", "/system");
[COLOR="Red"]run_program("/sbin/mount", "/data");
package_extract_dir("data", "/data");[/COLOR]
delete_recursive("/data/dalvik-cache");
[COLOR="Red"]run_program("/sbin/umount", "/data");[/COLOR]
run_program("/system/xbin/busybox", "--install", "-s", "/system/xbin");
show_progress(0.1, 10);
ui_print("[*] Flashing partition: BOOT");
assert(package_extract_file("boot.img", "/tmp/boot.img"),
write_raw_image("/tmp/boot.img", "bootimg"),
delete("/tmp/boot.img"));
assert(package_extract_file("logo.bin", "/tmp/logo.bin"),
write_raw_image("/tmp/logo.bin", "logo"),
delete("/tmp/logo.bin"));
show_progress(0.2, 10);
unmount("/system");
The red lines can be deleted
Click to expand...
Click to collapse
i will look into that wifi problem soon. & Yes, i used wiko rainbow dark l script. I was too lazy to edit it. I will fix it soon.
users like you always motivate me. Thanks for pointing out mistakes. :good:
moonrotation said:
Good work, but found a bug.
Wifi internet connection lost when switching between wifi ap (2 routers, same SSID, same security and password, different channel.)
This works well in any other ROM. Never happened to me.
Another thing. Because you used wiko rainbow DarkL zip?
You need to modify the script !!
Code:
mount("ext4", "EMMC", "/dev/block/mmcblk0p5", "/system");
delete_recursive("/system/app");
delete_recursive("/system/priv-app");
delete_recursive("/system/framework");
delete_recursive("/system/media");
package_extract_dir("system", "/system");
[COLOR="Red"]set_perm_recursive(0, 0, 0666, 0666, "/data/data/de.robv.android.xposed.installer/conf/modules.list");[/COLOR]
set_perm_recursive(0, 0, 0777, 0777, "/system/etc/init.d");
set_perm_recursive(0, 0, 0777, 0777, "/system/xbin/busybox");
run_program("/sbin/umount", "/system");
[COLOR="Red"]run_program("/sbin/mount", "/data");
package_extract_dir("data", "/data");[/COLOR]
delete_recursive("/data/dalvik-cache");
[COLOR="Red"]run_program("/sbin/umount", "/data");[/COLOR]
run_program("/system/xbin/busybox", "--install", "-s", "/system/xbin");
show_progress(0.1, 10);
ui_print("[*] Flashing partition: BOOT");
assert(package_extract_file("boot.img", "/tmp/boot.img"),
write_raw_image("/tmp/boot.img", "bootimg"),
delete("/tmp/boot.img"));
assert(package_extract_file("logo.bin", "/tmp/logo.bin"),
write_raw_image("/tmp/logo.bin", "logo"),
delete("/tmp/logo.bin"));
show_progress(0.2, 10);
unmount("/system");
The red lines can be deleted
Click to expand...
Click to collapse
Actually he used my rom's updater script, the xposed config file permission line should be removed also the data extract line can be removed but data mount and unmount line is requied because i'm wiping dalvik-cache in updater script.
umangleekha said:
Actually he used my rom's updater script, the xposed config file permission line should be removed also the data extract line can be removed but data mount and unmount line is requied because i'm wiping dalvik-cache in updater script.
Click to expand...
Click to collapse
You're right, I did not see well.
mr-illusionist said:
i will look into that wifi problem soon. & Yes, i used wiko rainbow dark l script. I was too lazy to edit it. I will fix it soon.
users like you always motivate me. Thanks for pointing out mistakes. :good:
Click to expand...
Click to collapse
Here a test of your rom with Xpro kernel v2, and same kernel DarkL rom.
You can see 0,00 B. I use Greenify. I have no idea if it may be the culprit.
This ROM seems interesting, I will surely try this one.
Can someone confirm, if this ROM is pre-rooted?
kool_sandy said:
This ROM seems interesting, I will surely try this one.
Can someone confirm, if this ROM is pre-rooted?
Click to expand...
Click to collapse
Not pre rooted
So, how to root it? I rooted it using kingoroot.
Sent from my Oneplus One
kool_sandy said:
So, how to root it? I rooted it using kingoroot.
Sent from my Oneplus One
Click to expand...
Click to collapse
Well, flash root zip from the attached blog. It can be flashed over any kitkat based rom (mediatek) http://www.androiddevs.net/mediatek-rooting-issue-fix-kitkat-roms/
Thx bro, well try this soon!
Sent from my Oneplus One
umangleekha said:
Actually he used my rom's updater script, the xposed config file permission line should be removed also the data extract line can be removed but data mount and unmount line is requied because i'm wiping dalvik-cache in updater script.
Click to expand...
Click to collapse
I have share this ROM to so many friends BEC i lov this ROM
Hi,
I ported for myself this rom (Gionee P3/Walton Primo GF) but i have a bug: PlayStore refuse to connect. I also port MERE 1.51 flareS from the original developers site and i have the same problem. Do you have any ideea how to solve this bug?
Latest Mere (V1.51) will be updated for wiko base today. Stay tuned!
Full ROM this time.
{
"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"
}
Introduction:-
Hey guys! Here's a complete tutorial for building or porting MIUI to your device! I know there are already some guides for it but I felt none of them were noob-friendly and many were confusing and missing some important instructions. So I decided to share this complete guide which will teach you how to build MIUI from scratch. This is a basic guide in which I have taken building latest MIUI v7 as example. So let's start!
POST 1- Guide to build MIUI using PatchROM Sources
POST 2- Modifying boot.img
POST 3- Guide to port MIUI from another device
Basically,There are two methods by which you can build MIUI ROM for your device.
Build from source using PatchROM Method
Port manually from another device which already has MIUI
Let's start with PatchROM Method:-
Requirements:-
Ubuntu 14.04 64-bit. (Installed as virtual machine like in VMware will also work)
Base ROM for your device.
NOTE- Preferably take pure AOSP built for your device as base ROM rather than CyanogenMod. You'll get less rejects while patching MIUI framework. But CM works too! Your choice..
Apktool. You can use Advanced Apktool by BDFreak. It's easier to use.
Working brain and a lot of patience!!
Prerequisites:-
First of all, take framework-res.apk, framework.jar, framework2.jar, services.jar, android.policy.jar and telephony-common.jar from your base ROM zip.
Now using apktool, decompile all above files.
If you're using advanced apktool then go to 3-Out folder and rename the respective folders to-
PHP:
framework-res
framework.jar.out
framework2.jar.out
services.jar.out
android.policy.jar.out
telephony-common.jar.out
We'll need these folders further for MIUI framework patching.
STEP-1: Preparing build environment
Switch to Ubuntu 14.04. We'll have to prepare ROM building environment.
Next step is to setup android sdk. Follow THIS guide. (Look at 2nd answer graphical image explanation. Follow till step 5.)
Now run the following commands as superuser from terminal-
PHP:
sudo apt-get update
Then after run this-
sudo apt-get install bison build-essential curl flex git git-core gnupg gperf libesd0-dev liblz4-tool libncurses5-dev libsdl1.2-dev libwxgtk2.8-dev libxml2 libxml2-utils lzop openjdk-7-jdk openjdk-7-jre pngcrush schedtool squashfs-tools xsltproc zip zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z-dev ccache libgl1-mesa-dev unzip lib32readline-gplv2-dev lib32z1-dev make python-networkx zlib1g-dev:i386 phablet-tools
Click to expand...
Click to collapse
All the necessary packages are now installed. Now the next step is to configure repository.
In terminal,run following commands-
PHP:
mkdir -p ~/bin
PHP:
PATH=~/bin:$PATH
PHP:
cd ~/bin
PHP:
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
PHP:
chmod a+x ~/bin/repo
PHP:
mkdir ~/patchrom
PHP:
cd ~/patchrom
PHP:
repo init -u git://github.com/MiCode/patchrom.git -b miui-7 -m android-4.4.4.xml
Now you'll have to configure git. Run following commands in terminal-
Code:
git config --global user.email [COLOR="Red"]ENTER_YOUR_EMAIL_ID_HERE[/COLOR]
Code:
git config --global user.name [COLOR="Red"]ENTER_YOUR_REAL_NAME_HERE[/COLOR]
Now it's time to download the MIUI source code! Run the following command in terminal-
PHP:
repo init -u git://github.com/MiCode/patchrom.git -b miui-7 -m android-4.4.4.xml
PHP:
repo sync
Now grab a cup of coffee while the MIUI source gets downloaded. Required time depends on speed of your internet connection. The MIUI source is of size about 600-700 MB (With .repo total is 1.5 GB).
After the source is downloaded,create a new directory in /home. Name it whatever you want. (Preferably codename of your device) In my case, it's taoshan.
PHP:
cd /home/stryder/
PHP:
mkdir taoshan
PHP:
cd taoshan
Now create a makefile for your device. If you want, you can make changes to this my makefile and use.
PHP:
gedit makefile
You can copy the following content in makefile (Don't forget to make changes in it according to your device) and save it.
Code:
#
# Makefile for taoshan
#
# The original zip file, MUST be specified by each product
local-zip-file := stockrom.zip
# The output zip file of MIUI rom, the default is porting_miui.zip if not specified
local-out-zip-file := MIUI7_taoshan.zip
# All apps from original ZIP, but has smali files chanded
local-modified-apps :=
local-modified-priv-apps :=
local-modified-jars :=
# All apks from MIUI
local-miui-removed-apps :=
local-miui-removed-priv-apps :=
local-miui-modified-apps :=
# All apps need to be removed from original ZIP file
local-remove-apps := Gallery2 Exchange2
# Config density for co-developers to use the aaps with HDPI or XHDPI resource,
# Default configrations are HDPI for ics branch and XHDPI for jellybean branch
local-density := XHDPI
PORT_PRODUCT := taoshan
# To include the local targets before and after zip the final ZIP file,
# and the local-targets should:
# (1) be defined after including porting.mk if using any global variable(see porting.mk)
# (2) the name should be leaded with local- to prevent any conflict with global targets
#local-pre-zip := local-pre-zip-misc
#local-after-zip:= local-put-to-phone
# The local targets after the zip file is generated, could include 'zip2sd' to
# deliver the zip file to phone, or to customize other actions
#include phoneapps.mk
include $(PORT_BUILD)/porting.mk
local-pre-zip-misc:
@echo Update boot.img
cp other/boot.img $(ZIP_DIR)/boot.img
@echo Update build.prop
cp other/build.prop $(ZIP_DIR)/system/build.prop
@echo Delete some unneeded files
rm -rf $(ZIP_DIR)/system/etc/.has_su_daemon
rm -rf $(ZIP_DIR)/system/priv-app/Dialer.apk
rm -rf $(ZIP_DIR)/system/priv-app/Keyguard.apk
rm -rf $(ZIP_DIR)/system/priv-app/SystemUI.apk
rm -rf $(ZIP_DIR)/system/priv-app/VoiceDialer.apk
rm -rf $(ZIP_DIR)/system/priv-app/Launcher3.apk
rm -rf $(ZIP_DIR)/system/priv-app/ParanoidOTA.apk
rm -rf $(ZIP_DIR)/system/priv-app/ThemeChooser.apk
rm -rf $(ZIP_DIR)/system/priv-app/ThemesProvider.apk
Explanations:-
'local-zip-file' = Name of your original Base ROM zip
'local-out-zip-file' = Name for your finished MIUI rom
'local-modified-apps' = Apps that will be modified to fit in with the framework. They need to be modified because they contact with the system
'local-remove-apps' = Apps that will be removed from the original ROM
'local-pre-zip' = Refers to code-block that should be executed before the zip is done.
'local-after-zip' = Refers to code-block executed after the zip is completed
'local-zip-misc' = The code-block just described at 'local-pre-zip'. It adds some Google Apps and a build.prop
'local-test' = Another code-block
Now, manually copy the previously decompiled framework folders to your device folder.
PHP:
framework-res
framework.jar.out
framework2.jar.out
services.jar.out
android.policy.jar.out
telephony-common.jar.out
Next,copy your Base ROM zip in your device folder.
Now move to patchrom folder.
PHP:
cd ~/patchrom
PHP:
source build/envsetup.sh
Again move to your device folder and start MIUI framework patching.
PHP:
cd /home/stryder/taoshan
PHP:
make firstpatch
Now a new folder folder temp will be created. In that you'll find the reject folder in which there will be rejects which you have to fix manually. Follow THIS excellent guide by @JavierAlonso to fix rejects. Also see THIS guide.
After fixing all the rejects, type following command to create a flashable zip of your MIUI ROM.
PHP:
make fullota
or you can also use
PHP:
make zipfile
With this, the flashable zip file is built. Now follow the tutorial from next post to modify your boot.img and include this new boot.img in your flashable MIUI ROM zip. Then flash the zip from recovery and enjoy your source built MIUI ROM!
Sometimes, your device might get stuck on bootanimation so in this case, take LOGCAT and look for the error and solve it. You can use some tools like Advanced Logcat Viewer to read the log.
Modifying boot.img
Now, let's modify the boot.img from base ROM zip to it make compatible with our MIUI ROM.
First of all, download any boot image kitchen or editor. I used Android Image Kitchen for Windows.
Assuming you're using the same kitchen, Extract the files from Android Image Kitchen in a separate folder. Copy your base ROM boot.img in that folder.
Now drag and drop the boot.img on unpackimg. The kernel files will be extracted in ramdisk and split_img folder.
We have to modify the ramdisk so move to that. In sbin folder, you'll see the extracted files.
Now there are two chances- First, Your ramdisk is already extracted with various folders and files. In that case ignore the next steps and directly modify in respective files using Notepad++.
While in second case, you'll get the ramdisk as ramdisk.cpio file. If you get this the you'll have to move to Ubuntu again for extracting it.
Now in Ubuntu, copy your ramdisk.cpio in a seperate folder (suppose in stryder folder) in your home directory.
Now, open terminal and run the following command-[No need as superuser]
PHP:
cd stryder
PHP:
cpio -i -F ramdisk.cpio
Some output will be shown in terminal as 2320 blocks or something like that!
Now in your folder, you'll see the extracted ramdisk files.
Now comes the actual modification.
First of all, download attached zip and extract the files in appropriate folders. (If the folder is not present, add that folder).
Open default.prop and edit the lines like this-
PHP:
#
# ADDITIONAL_DEFAULT_PROPERTIES
#
ro.adb.secure=0
ro.secure=0
ro.allow.mock.location=0
ro.debuggable=1
persist.sys.usb.config=mtp,adb
persist.service.adb.enable=1
persist.service.debuggable=1
Save the changes and open init.cm.rc (In case of CyanogenMod) or init.pa.rc (In case of AOSPA). Add # before the import line like this-
PHP:
# Superuser
#import /init.superuser.rc
Save this file and now open init.rc.
At the end of init.rc file, add these lines-
PHP:
#service for shelld
service shelld /system/xbin/shelld
class main
#service for su
service su_daemon /system/xbin/su --daemon
class main
oneshot
service lbesec /system/xbin/lbesec
class main
oneshot
Save this file and then open seapp_contexts.
In that file, add at the end-
PHP:
user=theme seinfo=platform domain=platform_app type=platform_app_data_file
user=backup seinfo=platform domain=platform_app type=platform_app_data_file
user=updater seinfo=platform domain=platform_app type=platform_app_data_file
user=theme_man domain=system_app type=system_data_file
Also modify these lines (if present) to look like this-
PHP:
user=_app domain=untrusted_app type=app_data_file
user=_app seinfo=platform domain=platform_app type=app_data_file
user=_app seinfo=shared domain=shared_app type=app_data_file
user=_app seinfo=media domain=media_app type=app_data_file
user=_app seinfo=release domain=release_app type=app_data_file
Save this file and if present, open init.qcom.rc.
And before this line (at the end)-
PHP:
on property:sys.boot_completed=1
Add these lines-
PHP:
service shelld /system/xbin/shelld
class main
Save the file. Now it's time to repack your ramdisk.
First, move your original ramdisk.cpio from the extracted folder to /home. That is, if your extracted ramdisk is in
PHP:
/home/stryder/
Move original ramdisk.cpio file to-
PHP:
/home/
After that, run this command in terminal-
PHP:
cpio -i -t -F ../ramdisk.cpio | cpio -o -H newc -O ../ramdisk_new.cpio
Now a new file ramdisk_new.cpio will be created. Take a look if it's of the same size as the original one just a few bytes difference.
Also open this ramdisk_new.cpio and make sure you have the newly added files in it. (Ex. otad in bin folder etc.)
Now move this ramdisk_new.cpio to previously extracted Android Image kitchen ramdisk/sbin/ directory.
Delete the original ramdisk.cpio from it and rename the ramdisk_new.cpio to ramdisk.cpio.
Now come back and directly run repackimg. The modified image_new will be generated. Rename it to boot and include this modified boot.img in your MIUI ROM zip. Now you can proceed to flash your MIUI ROM!
Special Thanks- @Zenamp
Port MIUI from another device
Requirements:-
7-zip, Winrar or similar software
Notepad++
Instructions:-
First of all, make 2 folders- 1. BASE ROM 2. PORT ROM
What is Base ROM: It is the ROM which is built for your device. (AOSP or CM etc.)
What is Port ROM: MIUI ROM of other device which you want to port to your device.
NOTE- It's better if the port device and your device has same CPU architecture and specifications. If you couldn't find same specification device then try the device having almost similar specification of your device.
Now extract the Base ROM zip in BASE ROM folder and Port ROM zip in PORT ROM folder.
Next, Delete addon.d (If present), app, framework, fonts, media and priv-app folder in System folder of BASE ROM.
Now copy addon.d (If present), app, framework, fonts, media and priv-app folder from system folder of PORT ROM to system folder of BASE ROM.
Now open etc folder in both ROMs folder. Go to init.d folder of PORT and copy and replace any extra files except 00banner to init.d of BASE ROM.
Now open permissions folder in etc of both ROMs and copy and replace all the permissions files from PORT ROM to your BASE ROM folder except handheld_core_hardware.xml and platform.xml. (In case of CM based BASE ROM, also don't replace org.cyanogenmod.hardware.xml).
Also copy any extra folder available in PORT ROM etc/ to BASE ROM etc/ e.g. miui_feature folder.
Now open your system_fonts.xml in etc folder of BASE ROM and copy this before </familyset> end of file
PHP:
<family>
<nameset>
<name>miui</name>
</nameset>
<fileset>
<file>Miui-Regular.ttf</file>
<file>Miui-Bold.ttf</file>
</fileset>
</family>
<family>
<nameset>
<name>miuiex</name>
</nameset>
<fileset>
<file>MiuiEx-Regular.ttf</file>
<file>MiuiEx-Bold.ttf</file>
</fileset>
</family>
<family>
<nameset>
<name>miuiex-light</name>
</nameset>
<fileset>
<file>MiuiEx-Light.ttf</file>
</fileset>
</family>
Now copy all the extra files from PORT ROM bin, lib and xbin folder to BASE ROM respective folders. Remember, DO NOT REPLACE anything. Just copy and paste and skip the files with same name.
Now, open build.prop of BASE ROM. You can change these value to anything you like-
PHP:
ro.build.id=
ro.build.display.id=
ro.build.date=
ro.build.date.utc=
ro.product.locale.language=en
ro.product.locale.region=US
ro.cm.version=
ro.modversion=
Now copy paste these values at the end of your BASE ROM build.prop. You can edit the fields but keep the structure same.You can look at PORT ROM build.prop for reference.
PHP:
ro.build.description=devicename-user 4.4.2 yourname C2104XXUCNG1 release-keys
ro.build.fingerprint=devicemanufacturer/devicemodel/device:4.4.2/yourname/C2104XXUCNG1:user/release-keys
ro.product.model=Xperia L
ro.product.device=taoshan
ro.build.characteristics=default
#MIUI_Features
ro.miui.has_real_blur=0
ro.miui.has_handy_mode_sf=1
ro.config.sms_received_sound=FadeIn.ogg
ro.config.sms_delivered_sound=MessageComplete.ogg
ro.product.manufacturer=Xiaomi
ro.config.elder-ringtone=Angel.mp3
persist.sys.mitalk.enable=true
ro.miui.ui.version.code=5
ro.miui.ui.version.name=V7
persist.sys.strictmode.disable=true
ro.product.mod_device=yourdevice
Change these fields in BASE ROM build.prop according to PORT ROM build.prop-
PHP:
ro.config.notification_sound=
ro.config.alarm_alert=
ro.config.ringtone=
If your device has On-screen buttons, then add this value at the end of BASE ROM build.prop-
PHP:
qemu.hw.mainkeys=0
Now we're done with build.prop.
Next, open META-INF/com/google/android/updater-script from BASE ROM using Notepad++ and change, compare and replace all the symlink and set_metadata lines in updater-script according to PORT ROM updater-script.If some extra lines are there in BASE ROM updater-script, keep it as it is.
NOTE:-I have attached one sample updater-script with this post. Look below. You can refer from that if you feel any difficulty.
Add these before unmount("/system"); at the end of updater-script-
PHP:
set_perm(0, 1000, 06750, "/system/xbin/shelld");
run_program("/sbin/busybox", "mount", "/data");
package_extract_dir("data", "/data");
package_extract_file("META-INF/com/miui/relink", "/tmp/relink");
set_perm(0, 0, 0555, "/tmp/relink");
run_program("/tmp/relink");
delete("/tmp/relink");
set_perm_recursive(1000, 1000, 0755, 0644, "/data/miui");
set_metadata("/system/bin/debuggerd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/bin/debuggerd_vendor", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:debuggerd_exec:s0");
set_metadata("/system/xbin/su", "uid", 0, "gid", 2000, "mode", 06755, "capabilities", 0x0, "selabel", "u:object_r:su_exec:s0");
delete_recursive("/data/miui/preinstall_apps");
delete_recursive("/data/miui/cust/preinstall_apps");
ui_print("Installation finished...Enjoy!");
unmount("/data");
Also copy META-INF/com/miui and data folder to BASE ROM from PORT ROM.
Now modify your BASE ROM boot.img using the tutorial from previous post and put that new boot.img in BASE ROM folder.
Finally, select META-INF, system, boot.img, file_contexts(If present) and data folder in BASE ROM.
Right click and select Add to Archive. Select Zip. Type the name of zip. (Don't delete ".zip" at the end!) Click OK.
Now you're ready to flash this zip from recovery.
Sometimes, your device might get stuck on bootanimation so in this case, take LOGCAT and look for the error and solve it. You can use some tools like Advanced Logcat Viewer to read the log. Look HERE for fixing bootloop.
I hope you guys understood how to build and port MIUI. I wish you good luck! If you get stuck anywhere, If you become successful building MIUI, feel free to post here. Also if you succeed, I'll appreciate if you give me credits and add link to this thread in your ROM thread on XDA.
Frequently Asked Questions
Shepard62700FR said:
The PatchROM technique (post #1 tutorial) works for Android 4.4 KitKat, meaning that you have to find a KitKat AOSP or CyanogenMod 11 ROM for your device as a base, STRYDER said that he doesn't recommend the OEM Stock ROM as a base due to vendor stuff that might cause more rejects (and I think if the stock ROM is not deodexed, it's worse).So preferably take aosp kitkat rom as base. Patchrom method won't work for Android 5.0 Lollipop and higher.
If you want to port a MIUI Lollipop/Marshmallow ROM to a Lollipop/Marshmallow based device, you will have to do the "port from other device" technique (post #3), which is to find MIUI ROM for another device with the same Android version, chipset, screen resolution and follow the port method. Use this guide for porting to qualcomm and broadcom devices preferably. For mediatek devices, I suggest following porting guides from MIUI forums. Though this guide might work as well.
Click to expand...
Click to collapse
Question:- Can I port MIUI to XXX device?
Answer:- You'll never know if you don't try!
Question:- Can you please port/help porting MIUI to XXX device?
Answer:- Sorry, I won't port. It's not possible for me to accept port requests, that's why I wrote this guide so that you can port it yourself and test it out on the device you own! About helping, post your issues/logs here in this thread. Me or any other members will help you as they can.
Its awesome bro.
Thanks for sharing with us.....
wolfmannight said:
Its awesome bro.
Thanks for sharing with us.....
Click to expand...
Click to collapse
You're welcome bro!
A perfect guide! Many Thanks!
abhatia1435 said:
A perfect guide! Many Thanks!
Click to expand...
Click to collapse
You're welcome bro! It's the most simplified guide you'll ever find...You can try porting MIUI 7 to your Xperia M!
Heyyy Bro, sorry for the noob questions but will all our Sony stuffs like XReality, DSEE HX HD audio, headphone settings will be lost or not, can we mix MIUI with Sony's stuffs
STRYDER~007 said:
You're welcome bro! It's the most simplified guide you'll ever find...You can try porting MIUI 7 to your Xperia M!
Click to expand...
Click to collapse
Yes bro. Was thinking of that only Can I use the method mentioned in 3rd post? Using XL's ROM for porting to XM? Have you released it for XL?
Black Plague said:
Heyyy Bro, sorry for the noob questions but will all our Sony stuffs like XReality, DSEE HX HD audio, headphone settings will be lost or not, can we mix MIUI with Sony's stuffs
Click to expand...
Click to collapse
Well some features may be lost but i have seen my friend @gamzekal has built MIUI with Sony stuffs HERE..So yeah..Probably we can include those stuffs..I'm not sure though!
abhatia1435 said:
Yes bro. Was thinking of that only Can I use the method mentioned in 3rd post? Using XL's ROM for porting to XM? Have you released it for XL?
Click to expand...
Click to collapse
Yeah you can use any method..I have not yet released MIUI for XL..There are some issues with RIL which I'm fixing now..But you can take any other device and port from it..Visit MIUI site and download latest v7! Try taking the device which has similar specification with your XM.. But not necessarily..I ported the one from HTC One S and it still worked!!
Sad but true, I tried to ask him about how he do that stuff but xda won't allow me to send message zzz coz his inbox if full
Black Plague said:
Sad but true, I tried to ask him about how he do that stuff but xda won't allow me to send message zzz coz his inbox if full
Click to expand...
Click to collapse
Yeah I know! Probably he's too lazy to delete his old msgs!!
@STRYDER~007 You did it again bro!!! Thanks for sharing this with us!
sebastiandg7 said:
@STRYDER~007 You did it again bro!!! Thanks for sharing this with us!
Click to expand...
Click to collapse
Happy to share bro! Enjoy!
This is a nice guide... But only for 4.4.4, correct @STRYDER~007?
repo init -u git://github.com/MiCode/patchrom.git -b miui-7 -m android-4.4.4.xml
Click to expand...
Click to collapse
I wan't to port this for eagle (D2303), but all 4.4.4 AOSP / CM / Omni roms are fuc*** up, none of them works properly to be used as base, and all devs went directly into CM12.1 / Omni 5.1.1, which work fantastic. Any ideas?
linuxct said:
This is a nice guide... But only for 4.4.4, correct @STRYDER~007?
I wan't to port this for eagle (D2303), but all 4.4.4 AOSP / CM / Omni roms are fuc*** up, none of them works properly to be used as base, and all devs went directly into CM12.1 / Omni 5.1.1, which work fantastic. Any ideas?
Click to expand...
Click to collapse
Yep.. Only for 4.4 since MIUI 7 patchrom source is based on 4.4.. Try to find base ROM which will be somewhat stable to be used as base.. There's no alternative to that!
Thanks for giving this guide bro.. I am trying your second method, I am using V7.0.5.0.KXDMICI (MIUI7) (downloaded from official site)(for Mi3) rom as a port rom, but i noticed that there is no init.d folder in the etc folder, Am i selected the wrong rom to port? or there is another problem?
dineshkumareswaran said:
Thanks for giving this guide bro.. I am trying your second method, I am using V7.0.5.0.KXDMICI (MIUI7) (downloaded from official site)(for Mi3) rom as a port rom, but i noticed that there is no init.d folder in the etc folder, Am i selected the wrong rom to port? or there is another problem?
Click to expand...
Click to collapse
For which device are you porting? What is your base rom?(You can find it in build.prop) Explain in detail..Also if there's no init.d, it doesn't matter..Go ahead with further procedure..
STRYDER~007 said:
For which device are you porting? What is your base rom?(You can find it in build.prop) Explain in detail..Also if there's no init.d, it doesn't matter..Go ahead with further procedure..
Click to expand...
Click to collapse
I am trying it for xperia L, I am using nyx rom as my base rom(if you recommend any other i can go with it), I am noob in porting (i can't find init.d in build prop, i try further steps and inform you and thanks