How To Guide Pre-Rooted GSI for Samsung SM-T220 XAR A13 WA6 - Samsung Galaxy Tab A7 Lite

I recently finished installing a rooted GSI on my T220. I don't post very often so this format is going to be rough. While the steps are still fresh in my mind, I am providing what worked for me in case they can help someone else.
Prereq:
I have already upgraded my T220 to the latest release below, unlocked my bootloader (detailed steps are covered elsewhere in the forum), and installed Magisk.
I used Debian Linux for all steps except ODIN which was Win11. I mention this because I tried a couple steps below on my Windows box and they failed.
Both lz4 & simg2img can be installed using apt on debian.
Step 1:
Download latest Samsung release using Bifrost (https://github.com/zacharee/SamloaderKotlin):
PDA/CSC/CP/AP
T220XXS2CWA6/T220OXM2CWA6/T220XXS2CWA6/T220XXS2CWA6
Android 13
Security: 2023-01-01
Release: 2023-02-17
Step 2:
Extract AP file from downloaded zip.
Step 3:
Copy AP_T220XXS2CWA6_T220XXS2CWA6_MQB61601712_REV00_user_low_ship_MULTI_CERT_meta_RKEY_OS13.tar file to T220 and patch tar file using Magisk.
Magisk patches boot.img & vbmeta.img and spits out another tar file: magisk_patched-25200_XXXXX.tar. Copy this back to your linux machine.
Step 4:
Extract the super.img.lz4 file from the magisk_patched-25200_XXXXX.tar and decompress it:
Code:
tar -xvf magisk_patched-25200_rOeaE.tar
lz4 -d super.img.lz4 super.img
Step 5:
Convert Android sparse images to raw images & extract the image files from super.img:
lpunpack as referenced in multiple other posts didn't work for me. After some searching, I came across this post: https://forum.xda-developers.com/t/customap-2022.4473159/#post-87204333 which talks about an alternative tool to extract called imjtool.
I dl'd imjtool from http://newandroidbook.com/tools/imjtool.tgz as indicated in the post.
Save the super.raw file, we're going to need it again later.
Code:
sudo simg2img super.img super.raw
imjtool.ELF64 super.raw extract
The extraction gave me four image files in an extracted directory:
odm.img
product.img
system.img
vendor.img
Go ahead and delete the system.img, we're going to replace it.
Step 6:
Download your GSI file and extract system.img
I used Google's, but there are others:
There's a GSI list here for other options:
Generic System Image (GSI) list
Notes about tinkering with Android Project Treble. Contribute to phhusson/treble_experimentations development by creating an account on GitHub.
github.com
Generic System Image releases | Platform | Android Developers
developer.android.com
Android 13 QPR2 (Beta)
Date: February 1, 2023
Build: T2B3.230109.002
Build type: experimental
Security patch level: January 2023
Google Play Services: 22.46.17
ARM64 aosp_arm64-exp-T2B3.230109.002-9523436-98a648ca.zip
Extract system.img from the dl'd zip and copy system.img into the extracted directory with all the other images (step 5)
Steps 7 & 8 are from another post in the forum: https://forum.xda-developers.com/t/guide-t220-t225-flash-a-gsi-on-the-a7-lite-without-twrp.4456821/
Step 7:
Get the size of all partitions and the size of the original super.raw
Code:
stat -c '%n %s' *.img
odm.img 4349952
product.img 1234505728
system.img 1890627584
vendor.img 640036864
stat -c '%n %s' ../super.raw
../super.raw 6023020544
8. Repack super.img (this step is a copy/paste from https://forum.xda-developers.com/t/guide-t220-t225-flash-a-gsi-on-the-a7-lite-without-twrp.4456821/)
Code:
lpmake --metadata-size 65536 \
--super-name super \
--metadata-slots 2 \
--device super:ORIGINAL_SUPER_IMG_SIZE \
--group main:SUM_OF_ALL_PARTITIONS_SIZES \
--partition odm:readonly:ODM_PARTITION_SIZE:main \
--image odm=./odm.img \
--partition product:readonlyRODUCT_PARTITION_SIZE:main \
--image product=./product.img \
--partition system:readonly:SYSTEM_PARTITION_SIZE:main \
--image system=./system.img \
--partition vendor:readonly:VENDOR_PARTITION_SIZE:main \
--image vendor=./vendor.img \
--sparse \
--output ./super_new.img
Replace ORIGINAL_SUPER_IMG_SIZE, SUM_OF_ALL_PARTITIONS_SIZES, ODM_PARTITION_SIZE, PRODUCT_PARTITION_SIZE, SYSTEM_PARTITION_SIZE, VENDOR_PARTITION_SIZE with the values you obtained in step 7.
Read lpmake docs for a more detailed expalation of the args used above:
partition_tools - platform/system/extras - Git at Google
My actual command:
Code:
sudo ../otatools/bin/lpmake --metadata-size 65536 --super-name super --metadata-slots 2 --device super:6023020544 --group main:3769520128 --partition odm:readonly:4349952:main --image odm=./odm.img --partition product:readonly:1234505728:main --image product=./product.img --partition system:readonly:1890627584:main --image system=./system.img --partition vendor:readonly:640036864:main --image vendor=./vendor.img --sparse --output ./super_new.img
Step 9:
Compress super_new.img and rename:
Code:
lz4 -B6 --content-size super_new.img super.img.lz4
Step 10:
Replace the super.img.lz4 in the magisk_patched-25200_rOeaE.tar file and copy to the Win11 ODIN box.
Step 11:
Put your T220 into Download Mode
Flash the updated GSI_magisk_patched-25200_rOeaE.tar that contains the new super.img.lz4 file in the AP slot using ODIN.
A couple of notes:
I did get a warning in DL Mode while flashing, but it hasn't seem to impact anything so far.
sw rev check fail super fused 2 > binary 0
I had to do a factory reset on my first boot.
Hope this helps someone.

Thanks, i follow your tuto and have now my T220 on GSI too, Project Elixir. I'm on Debian too. Just another info, 'lpmake' was not in debian. Need to install a package who contain it.
Choose EUX version with Bifrost.
I 've get same message too during flashing.
The factory reset after the first boot seems needing, the tablet restart on recovery first.
It's certainly a method for newbies, you must understand what you do and why.
But tuto it's an help for others. So thanks again.

HEY please send the flashable files !><! i just know how to use odin and i really don't understand how to flash the GSI on my T220 ! it would be really helpful if you send me the AP file link !! I really want to flash a Gsi bored on the stock ui + sucks a lot !!

Related

Howto - unpack,change,repack boot.img

Hi, for those interested I wrote following steps (ubuntu 10.10 32b):
(based on excellent http://android-dls.com/wiki/index.php?title=HOWTO:_Unpack,_Edit,_and_Re-Pack_Boot_Images )
I included compiled tools mkbootfs , mkbootimg and perl scripts unpack-bootimg.pl and repack-bootimg.pl.
Repack-bootimg.pl is edited and the needed parameters for our folio are included ([email protected] [email protected] vmalloc=192M video=tegrafb console=ttyS0,115200n8 usbcore.old_scheme_first=1 tegraboot=sdmmc tegrapart=recovery:122000:a00:800,linux:a0e00:1000:800,loader:300:400:800,mbr:700:200:800,system:900:20000:800,cache:20900:80000:800,misc:a0900:400:800,userdata:a1f00:80000:800 boardtype=PR)
1) unpack attachement mytools.tgz into your home, in your home the folder ~/mytools is created:
tar -xzf mytools.tgz
2) copy existing boot.img into ~/mytools (from foliomod update.zip)
3) ./unpack-bootimg.pl boot.img
- old kernel from boot.img is extracted: boot.img-kernel.gz
- content of contained ramdisk is extracted in folder: boot-img.ramdisk
4) copy new compiled kernel (zImage) into ~/mytools (from <source>/kernel/arch/arm/boot/zImage , you have to compile yourself with the weeds2000 quide http://forum.xda-developers.com/showthread.php?p=10331797#post10331797)
5) make all desired changes into ramdisk folder
6) repack new boot.img with a new kernel and changed ramdisk
./repack-bootimg.pl zImage boot.img-ramdisk boot-new.img
7) new boot image is created as boot-new.img
8) if you want just to experiment, you can take any full foliomod dexter's update.zip (1.3d), put the new boot image inside instead original one.
It is possible to remove the other 2 images (recovery and system) if you want just to flash kernel. NOTE! But you have to remove the extrating command for recovery and system from update.zip/meta-inf/com/google/android/update-script.
p.s. Feel free to correct me, if something wrong with the steps. It's my first attempt to compile kernel
I am on FolioMod 1.3d and I use the kernel built without patches from http://tegramid.com/wiki/Main_Page(Full GPL source bundle including framework) for a day without problems. I had to do a full wipe. It's meant for testing, I don't say that kernel from source is better or worse.
Many thanks to Dexter because everything is based on his release, weeds2000 because of his kernel compile quide and tsh who placed the sources on the git and to all who try hacking our folio
thx for this, that 'll be usefull
thanks for the guide.
i have managed to do every thing up to the repack
when i type
Code:
perl repack-bootimg.pl boot.img-kernel.gz boot.img-ramdisk.gz boot.img
i get error
Code:
boot.img-ramdisk.gz Not a directory at repack-bootimg.pl line 13.
even though it is definatly in their. any idea how to get it to work?
You don't have to provide the folder instead of the packed Ramdisk-File!
Because this script is made doing changes in Ramdisk and kernel..
So you can change the scripts inside the boot.img-ramdisk folder and the script will repack and add it to the new boot.img!
permission denied
i have done everything as you said, but while using split_bootimg.pl i got "permission denied". please suggest me what to do?
1. Enable read/write permissions for that file.
2. Tobr, you made a mistake in repack-bootimg.pl. You forgot to add " ./ " before mkbootimg.
Jon2555 said:
1. Enable read/write permissions for that file.
2. Tobr, you made a mistake in repack-bootimg.pl. You forgot to add " ./ " before mkbootimg.
Click to expand...
Click to collapse
The script was downloaded from internet not written by me. And it worked for me just fine. I can not verify now that you are right (probably you are). If it works for you with ./ then either I can put fixed version for download for others (if there is anybody) or it can be here just as a notice for other users, if not working.
I have ./ defined in my path variable in my profile so that i don't need it.
eror when repack
tobr said:
Hi, for those interested I wrote following steps (ubuntu 10.10 32b):
(based on excellent http://android-dls.com/wiki/index.php?title=HOWTO:_Unpack,_Edit,_and_Re-Pack_Boot_Images )
I included compiled tools mkbootfs , mkbootimg and perl scripts unpack-bootimg.pl and repack-bootimg.pl.
Repack-bootimg.pl is edited and the needed parameters for our folio are included ([email protected] [email protected] vmalloc=192M video=tegrafb console=ttyS0,115200n8 usbcore.old_scheme_first=1 tegraboot=sdmmc tegrapart=recovery:122000:a00:800,linux:a0e00:1000:800,loader:300:400:800,mbr:700:200:800,system:900:20000:800,cache:20900:80000:800,misc:a0900:400:800,userdata:a1f00:80000:800 boardtype=PR)
1) unpack attachement mytools.tgz into your home, in your home the folder ~/mytools is created:
tar -xzf mytools.tgz
2) copy existing boot.img into ~/mytools (from foliomod update.zip)
3) ./unpack-bootimg.pl boot.img
- old kernel from boot.img is extracted: boot.img-kernel.gz
- content of contained ramdisk is extracted in folder: boot-img.ramdisk
4) copy new compiled kernel (zImage) into ~/mytools (from <source>/kernel/arch/arm/boot/zImage , you have to compile yourself with the weeds2000 quide http://forum.xda-developers.com/showthread.php?p=10331797#post10331797)
5) make all desired changes into ramdisk folder
6) repack new boot.img with a new kernel and changed ramdisk
./repack-bootimg.pl zImage boot.img-ramdisk boot-new.img
7) new boot image is created as boot-new.img
8) if you want just to experiment, you can take any full foliomod dexter's update.zip (1.3d), put the new boot image inside instead original one.
It is possible to remove the other 2 images (recovery and system) if you want just to flash kernel. NOTE! But you have to remove the extrating command for recovery and system from update.zip/meta-inf/com/google/android/update-script.
p.s. Feel free to correct me, if something wrong with the steps. It's my first attempt to compile kernel
I am on FolioMod 1.3d and I use the kernel built without patches from http://tegramid.com/wiki/Main_Page(Full GPL source bundle including framework) for a day without problems. I had to do a full wipe. It's meant for testing, I don't say that kernel from source is better or worse.
Many thanks to Dexter because everything is based on his release, weeds2000 because of his kernel compile quide and tsh who placed the sources on the git and to all who try hacking our folio
Click to expand...
Click to collapse
hi
when do this in ubuntu 11.4
get eorr below
[email protected]:~/Desktop/untitled folder$ ./unpack-bootimg.pl boot.img
kernel written to boot.img-kernel.gz
ramdisk written to boot.img-ramdisk.cpio.gz
463 blocks
extracted ramdisk contents to directory boot.img-ramdisk/
[email protected]:~/Desktop/untitled folder$ ./repack-bootimg.pl zImage boot.img-ramdisk boot-new.img
gzip: folder/ramdisk-repack.cpio.gz: No such file or directory
sh: mkbootimg: not found
No such file or directory at ./repack-bootimg.pl line 21.
[email protected]:~/Desktop/untitled folder
can any one help me?
any tools for windows ?
nguyenhonganh said:
any tools for windows ?
Click to expand...
Click to collapse
Same request!
repack problem
Can somebody tell me is it possible to repack kernel and ramdisk using just hex editor? Without this scripts and unmkbootimg and mkbootimg. What does not work for me cos im using i9100 Philz root. I know how to unpack it and change init.rc and pack it back again. So can i just put my (kernel+ramdisk) ramdisk.cpio.gz file inside mmcblk0p5 in exac location. Will that work out? I dont know what this is doing:
mkbootimg --kernel zImage --ramdisk initramfs.cpio.gz --base 0x20000000
--cmdline 'no_console_suspend=1' -o new_boot.img
this address thing and cmdline but if i replace just ramdisk i dont need to set up addres again cos everything will be in same place. And one more question if something goes wrong can i boot to recovery or download mode?
New kernel copied itself to mmcblk0p5
and i have new CWM now. So it seems to me recovery is inside mmcblk0p5 as well and my phone never use mmcblk0p6
@tobr, I cannot open the archive of boot.img-kernel.gz. When I try to open it with terminal, it says: Not a valid gzip file. What to do?

[All In One Guide for Dummies] Porting ROMs/Building CM7 from Source/Themes |80% Done

Here you have it people , I may be wrong at some places so please excuse me
Requirements :
winzip
any file explorer on your desktop
2 ROMs ( one of X10 and other )
Suggestions :
Use ROMs from Phones like NexusOne , HTC Desire
all phones with QSD8250 and Adreno 200
Method:
Just do these changes to the files and have a Port which boots up
Delete :
/data folder
boot.img
/system/etc/firmware
/system/etc/init.d
Copy & Paste :
in /system/bin -
akmd2
am
bmgr
chargemon
charger
fix_permissions
hci_qcomm_init
hci_attach
ime
input
monkey
pm
port-bridge
qumxd
rild
updatemiscta
wlanmac
wlantool
ramdisk.tar/.gz
/system/etc :
replace all files in -
bluetooth
dhcpcd
wifi
firmware
copy the files -
apns-conf.xml
dbus.conf
DualMicControl
gps.conf
hosts
init* files
media-profiles.xml
resolv.conf
sensors.conf
sysctl.conf
vold.fstab
/system/lib folder :
delete and replace all files in:
/system/lib/modules
/system/lib/hw
copy the following files
in /system/lib/egl :
All EXCEPT libGLES_android.so
copy & replace these files :
libauth.so
libcm.so
libdiag.so
libdbus.so
libdss.so
libdsm.so
libgsl.so
libgstk_exp.so
libmiscta.so
libmmgsdilib.so
libmmipl.so
libmmjpeg.so
libnv.so
liboem_rapi.so
liboemcamera.so
liboncrpc.so
libpbmlib.so
libqmi.so
libqueue.so
libril.so
libril-qc-1.so
libuim.so
libwms.so
libwmsts.so
/system/usr/keychars -
es209ra_keypad.kcm
and delete the original file (example : passion_keypad.kcm OR bravo_keypad.kcm)
/system/usr/keylayout -
es209ra*.kl
do the same as with.kcm
Replace :-
Build.prop
META-INF folder
Cautions :-
Use the same version of android to port
You will need to change the build.prop to whatever you desire
You may need to edit the update-script
Porting gets over here !!!!!
WAIT I'll Complete it later
Many People want to know this right ?
Bro , Dude , Buddy , friend , mate WHICH FILES ARE FOR WHAT ??
what does akmd2 do ? what is it for ????
Here , I will try to provide you as many answers as I can :-
# Prebuilt kl keymaps
/system/usr/keylayout/es209ra_keypad.kl
/system/usr/keylayout/es209ra_handset.kl
/system/usr/keychars/es209ra_keypad.kcm.bin
## RIL related stuff [Responsible For GSM/DATA and Sim card]
/system/lib/libril.so
/system/bin/port-bridge
/system/bin/qmuxd
/system/lib/libauth.so
/system/lib/libcm.so
/system/lib/libdiag.so
/system/lib/libdll.so
/system/lib/libdsm.so
/system/lib/libdss.so
/system/lib/libgsdi_exp.so
/system/lib/libgstk_exp.so
/system/lib/libmmgsdilib.so
/system/lib/libnv.so
/system/lib/liboem_rapi.so
/system/lib/liboncrpc.so
/system/lib/libpbmlib.so
/system/lib/libqmi.so
/system/lib/libqueue.so
/system/lib/libuim.so
/system/lib/libril-qc-1.so
/system/lib/libwms.so
/system/lib/libwmsts.so
## Camera proprietaries
/system/lib/liboemcamera.so
/system/lib/libmmjpeg.so
/system/lib/libmmipl.so
/system/lib/libcamera.so
/system/lib/libopencore_common.so
## FIRMWARE
/system/etc/firmware/yamato_pfp.fw
/system/etc/firmware/yamato_pm4.fw
/system/etc/firmware/camfirm.bin
## ATHEROS WIFI [ WIFI modules for X10 ]
/system/lib/modules/athwlan.bin.z77
/system/lib/modules/data.patch.hw2_0.bin
/system/bin/wlan_mac
/system/bin/wlan_tool
## BT proprietary [ Bluetooth for X10 ]
/system/bin/hci_qcomm_init
/system/bin/hciattach
## Adreno 200 files [ Responsible for display i.e. the GPU ]
/system/lib/libgsl.so
/system/lib/egl/libGLESv1_CM_adreno200.so
/system/lib/egl/libq3dtools_adreno200.so
/system/lib/egl/libEGL_adreno200.so
/system/lib/egl/libGLESv2_adreno200.so
## Other libraries and proprietary binaries
/system/etc/vold.fstab [ SD Card ]
/system/etc/sensors.conf [Proximity sensors , etc]
/system/bin/akmd2
#offline charger
/system/bin/chargemon
/system/bin/updatemiscta
/system/lib/libmiscta.so
#hw [The lights between the HOME , Menu and back button ]
/system/lib/hw/copybit.qsd8k.so
/system/lib/hw/sensors.default.so
HOW TO MAKE THEMES
There are 2 types of themes you can make :-
1.Involving systemUI.apk and framework-res.apk
2.Involving the T-mobile Theme engine
I will begin with LEVEL (1)
There are two ways of doing this as well
1.Classic Way
2.The spaarc's cheap way (I use this one )
CLASSIC WAY
Requirements :-
1.A cool head
2.Apk Manager 4.4 (OR any APK editor , etc )
3.Original Framework-res.apk and SystemUI.apk
4.Themed Framework-res.apk and SystemUI.apk
OR
4.Many .PNG Images , In order to theme
Method :-
1.Use apk manager to decompile the original AND Themed apk's(i.e If you have a themed one)
2.ONLY Replace files found in /res/drawable-hdpi folder
3.ReCompile
4.Just replace Using RootExplorer or make a update.zip
Spaarc's Cheap Way
This is top secret , but i will tell it you
Requirements :-
1.Computer
2.7-zip
3.Original Framework-res.apk and SystemUI.apk
4.Themed Framework-res.apk and SystemUI.apk
OR
4.Many .PNG Images , In order to theme
Method :-
1.Use 7-zip to extract the apk
2.Replace files
3.Repack as zip using 7-zip again
4.Rename to ".apk"
5.Replace and Enjoy
T-MOBILE THEME CHOOSER
Follow this AWESOME guide
I don't have the time or patience of rewritting it in my cheeky tongue
Here , this completes your themeing guide
If you have any questions just Drop me a PM
HOW TO COMPILE CM7 ROMS FROM SOURCE
I have written this guide only for linux Users
Bibliography -
1.source.android.com
2.wiki.cyanogenmod.com
The guide starts here :-
Install the ADB
Install the Android SDK.
2.Install the Build Packages
Install using the package manager of your choice:
For 32-bit & 64-bit systems:
sudo apt-get install git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.6-dev squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev sun-java6-jdk pngcrush schedtool
For 64-bit only systems:
sudo apt-get install g++-multilib lib32z1-dev lib32ncurses5-dev lib32readline5-dev gcc-4.3-multilib g++-4.3-multilib
NOTE: gcc-4.3-multilib g++-4.3-multilib is no longer available for Ubuntu 11.04 64-bit, but should still build without issue.
NOTE: On Ubuntu 10.10, and variants, you need to enable the parter repository to install sun-java6-jdk:
sudo add-apt-repository "deb http://archive.canonical.com/ maverick partner"
This will get you all the resources you need to build your CyanogenMod ROM
3.Create the Directories
You will need to set up some directories in your build environment.
To create them:
mkdir -p ~/bin
mkdir -p ~/android/system
4.Install the Repository
Enter the following to download make executable the "repo" binary:
curl https://github.com/spaarc/tools_repo/repo > ~/bin/repo "OR" curl https://github.com/spaarc/tools_repo/blob/master/repo > ~/bin/repo
chmod a+x ~/bin/repo
NOTE: You may need to reboot for these changes to take effect.
Now enter the following to initialize the repository:
cd ~/android/system/
repo init -u git://github.com/CyanogenMod/android.git -b gingerbread
repo sync -j16
5.Copy proprietary files
NOTE: This only needs done the first time you build.
You will need to have a Xperia X10 with a working copy of CyanogenMod install and ADB working on the computer. This script will copy the proprietary files from the device.
Connect the device to the computer and ensure that ADB is working properly.
cd ~/android/system/device/SEMC/es209ra/
./extract-files.sh
NOTE: If some hardware isn't working, like camcorder or FM radio, you will need to find the updated prop blobs.
6.Download RomManager
NOTE: This only needs to be done when an update to RomManager is released. If you are-up-to date, you may skip to Building CyanogenMod.
Download RomManager which is needed by the build:
~/android/system/vendor/cyanogen/get-rommanager
7.Building CyanogenMod
Check for updates
First, check for updates in the source:
cd ~/android/system/
repo sync
Configure Build & Compile
Now, the environment must be configured to build and the ROM compiled, from code, for the Xperia X10
. build/envsetup.sh && brunch es209ra
Install
Copy your .zip file from ~/android/system/out/target/product/es209ra/update.cm-XXXXX-signed.zip to the root of the SD card.
Optional: Download Google Apps for CyanogenMod 7 and place it on the root of the SD card.
Flash both of these .zip files from recovery.
reserved 4
reserved last
Awesome my friend, keep it up, good to see another dude, which are trying to help our X10 community .
Thnx a lot Spaarc bro.... u r gr8 coz u help
Sent from my X10i using XDA App
thanks sparc that will help people like me who wants to develop and play with android and with the xperia
That is nothing ,
The first post is incomplete
I also have to write how to compile Aosp ROM s
Which files are for what , which you r porting
I also have to write how to code those sources which u can see at github ...
There is a lot , how to make themes ...
sent from my Android powered smart phone
spaarc said:
That is nothing ,
The first post is incomplete
I also have to write how to compile Aosp ROM s
Which files are for what , which you r porting
I also have to write how to code those sources which u can see at github ...
There is a lot , how to make themes ...
sent from my Android powered smart phone
Click to expand...
Click to collapse
Why dont you type it up on notepad or ms word so you dont have to keep stopping and people than going it is only half complete and crap like that. If you type it all up in notepad then you can just copy/paste here and then it will all me done.
Just saying what I would do and just trying to help
Sent from my X10i using xda premium
I don't have time to do it that's why ...
I'll complete it in this week
I don't care what people say
sent from my Android powered smart phone
wow..nice tutorial man!!
thanx!
Main part of the guide is over
approx 2/3 left
Really really exhausted , TC and bring me new ROMS
Thanks can u do like a guide of porting roms from the phones with different gpu/cpu?
Paji tussi great hoo!!
Sent from my X10i using xda premium
#offline charger
/system/bin/chargemon
/system/bin/updatemiscta
/system/lib/libmiscta.so
Click to expand...
Click to collapse
is that all for offline charging?
i am working on integrating offline charger in main kernel ramdisk... so that it will be independent of all things in /system
If I can't do it how could I teach you ?
It is next to impossible
Bit still editing the init.rc in ramdisk should do the trick
sent from my Android powered smart phone
spaarc said:
If I can't do it how could I teach you ?
It is next to impossible
Bit still editing the init.rc in ramdisk should do the trick
sent from my Android powered smart phone
Click to expand...
Click to collapse
that and hex editing the files involved
Mate i need help have done this method with x10 2.3.3 and arc 2.3.4 and only copied the files u have said and i have UB with DK v5 the phone just reboots and reboots while on DK logo...
Shouldn't their be files from permissions folder?
sahibunlimited said:
Mate i need help have done this method with x10 2.3.3 and arc 2.3.4 and only copied the files u have said and i have UB with DK v5 the phone just reboots and reboots while on DK logo...
Shouldn't their be files from permissions folder?
Click to expand...
Click to collapse
No nothing more ,
Did you copy the ramdisk ?
Send me a logcat
sent from my Android powered smart phone

[TUTORIAL] Extract Kernel from ROM

This simple tutorial is so easy and powerful
This Tutorial is made from me and it has the Copyright!
1) put the ROM from which you want to extract the kernel into original_update folder (C: \ cygwin \ home \ username \ etc..)
2) Run Cygwin and go into the kitchen
3) Select option 1 and select the ROM you want to extract the kernel
4) Option 20 (boot image tools) and choose w
5) Go into BOOT EXTRACTED folder and take the zImage file
6) Now go to WORKING_NameProject / system / lib / modules and copy all files inside.
7) Take a zip of another kernel and switch the components
DONE!
Easy no?

[DEV][WIP][ICS][GUIDE]Patchrom method to build MIUI from Source

After the Release of ICS for our phones i decided to try building MIUI for our phones
I was able to make a zip but still havent got a booting ROM
Here I Hope to bring out developers to try and help out in developing an MIUI ROM Based on Stock the Procedure is pretty Simple
This also might Help understand what this Project is about
MIcode-Patchrom
To get started with MiCode/patchrom, you'll need to get
familiar with [Git and Repo](http://source.android.com/download/using-repo).
To initialize your local repository using the patchrom trees, use a command like this:
mkdir patchrom
cd patchrom
repo init -u git://github.com/MiCode/patchrom.git -b ics
Then to sync up:
repo sync
once there
We start off like this
STEP 1: Extracting the tools
I've extracted the tools to ~/patchrom, but you can use another directory if you want. I'll call that folder the PatchROM root folder.
STEP 2: Choosing the ROM
The PatchROM docs recommend that we use a stock ICS ROM from the device manufacturer.
So i've taken thebrainfaka's beta build and used it as my Base ROM.
U could follow the same steps
EDIT:
Although i Decided to turn things around after alotta failures so now if ur on the stock rom just type in
Code:
../build/envsetup.sh
when u are in the folder ST25i
then
Code:
../tools/releasetools/ota_target_from_phone -r
STEP 3: Creating the file structure
To port, we need to create a folder inside the PatchROM root directory for our device. I created a folder called 'ST25i' and made a makefile file
You also need to decompile the following APK files and put the resulting folder on the 'ST25i' folder:
/system/framework/android.policy.jar
/system/framework/framework.jar
/system/framework/framework-res.apk
/system/app/SystemUI.apk
/system/framework/services.jar
and the apps defined on the 'local-modified-apps' below
STEP 4: Editing the Makefile
The makefile i made has the following structure:
Code:
#
# Makefile for ST25i
#
# The original zip file, MUST be specified by each product
local-zip-file := ST25i.zip
# The output zip file of MIUI rom, the default is porting_miui.zip if not specified
local-out-zip-file := MIUI_ST25i.zip
# All apps from original ZIP, but has smali files chanded
local-modified-apps := CustomizedSettings MediaProvider
local-modified-jars :=
local-miui-modified-apps := MiuiHome Mms Settings Phone ThemeManager MiuiGallery Music
local-miui-removed-apps := MediaProvider
# All apps need to be removed from original ZIP file
include phoneapps.mk
# 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-zip-misc
local-after-zip:= local-test
# 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 $(PORT_BUILD)/porting.mk
# To define any local-target
local-zip-misc:
@echo Replace build.prop
cp other/build-ST25i.prop $(ZIP_DIR)/system/build.prop
rm $(ZIP_DIR)/system/vendor/overlay -rf
rm $(ZIP_DIR)/system/etc/customization/content/com/sonyericsson/wallpaperpicker/wallpapers -rf
local-test:
echo "an example action"
Code:
local-phone-apps = AccessoryKeyDispatcher \
AdobeFlashPlayer \
ApplicationsProvider \
AudioEffectService \
Bluetooth \
bootinfo \
CameraExtensionPermission \
CdfInfoAccessor \
CertInstaller \
CredentialManagerService \
DefaultCapabilities \
DefaultContainerService \
enhancedusbux \
ES_File_Explorer \
FaceLock \
GenericApplicationInstaller \
Initial-boot-setup \
livewallpaperearth \
InfiniteView \
MediaProvider \
MemcardTransportService \
Nfc \
PackageInstaller \
qcsemcservice \
Radio3 \
SemcCamera3D \
QuickPanelSettings \
SecWallpaperChooser \
SemcAlbum \
SemcAutoPowerOff \
SemcCameraUI \
SemcClock \
ServiceMenu \
SoundEnhancement \
usb-mtp-backup-transport \
usb-mtp-marlin-wrapper \
usb-mtp-update-wrapper \
usb-mtp-vendor-extension-service \
usbotg \
UsbTransportService \
UserDictionaryProvider \
UxpNxtLockScreen \
WapiCustomization \
WapPush \
WeatherWidget \
Youtube
Now Phoneapps.mk which i included in the makefile refers to all phone apps that i dont require
I'm still not sure regarding this but this what i made it so far
STEP 5: Apply MIUI Changes
To apply the MIUI changes on the choosen ROM, type those commands in the root of PatchROM:
Code:
source build/envsetup.sh
cd ST25i # CHANGE THIS LINE TO MATCH THE FOLDER YOU CREATED IN STEP 3
make
Now it should decompile the ROM and merge the ROM's smali files with the MIUI files, and create an ZIP file with the MIUI rom.
Github Sources for Xperia U build directory
Here!
These files should be in the folder u named as ST25i
u may use "git clone " and get all the files into ur local directory "ST25i"
Please Note in my github i've provided Files SPECIFICALLY FOR XPERIA U
Following everthing U've done so far
Now u maybe able to make ur build
while in the "patchrom" directory type in
Code:
$source ./build/envsetup.sh
$cd ST25i
$make
then go to folder/view options and check "show hidden files"
Now u will see a folder named ".build"
Enter that folder u will find a zip named MIUI_ST25i.zip
Which is Your MIUI ROM
So far I havent had success in getting it to boot,
So a humble request to All Devs to help out with this
Thanks for support Xperia U
Regards.
Hi Friends,
Just stumbled upon this thread while I was searching for something else. I recently managed to successfully port MIUI patchrom for my device Samsung Galaxy R running ICS 4.0.4.
The patchrom is for ICS 4.0.1 - 4.0.3, so if you running 4.0.4, it will be a little tougher.
But seeing the OP, I see you got something missing after build/envsetup.sh you need to run "make firstpatch" for the first time. That patches your framework, services and policy to work with MIUI. Then you'll get a hell lot of reject smali code files that you need to fix by hand. Then when you "make fullota" or "make zipfile" it will work. You may also need to patch your kernel init script in case your framework is too large for apktool to build and needs to be divided into two, like in our case.
I hope this helps. I was quoting the standard MiCode patchrom way of porting new devices. Please ignore if you are following some other setup.
parajsinghal said:
Hi Friends,
Just stumbled upon this thread while I was searching for something else. I recently managed to successfully port MIUI patchrom for my device Samsung Galaxy R running ICS 4.0.4.
The patchrom is for ICS 4.0.1 - 4.0.3, so if you running 4.0.4, it will be a little tougher.
But seeing the OP, I see you got something missing after build/envsetup.sh you need to run "make firstpatch" for the first time. That patches your framework, services and policy to work with MIUI. Then you'll get a hell lot of reject smali code files that you need to fix by hand. Then when you "make fullota" or "make zipfile" it will work. You may also need to patch your kernel init script in case your framework is too large for apktool to build and needs to be divided into two, like in our case.
I hope this helps. I was quoting the standard MiCode patchrom way of porting new devices. Please ignore if you are following some other setup.
Click to expand...
Click to collapse
Ah i'm following a different setup mate,for me the first problem to be tackled is compiling framework-res.apk,i
Even without changes I'm able to recompile but the darn thing wont work,
I have reports of similair errors in compiling framework-res
Once i get that sorted out i should be able to move forward...
oh and i already have compiled framework,services and policy with miui changes btw,
I'm pretty sure its the framework-res.apk which is giving me errors,
Some dudes in Sola also reported the same...
Hopefully when i figure out why my compiled framework doesnt boot i should get stuff moving..
bharat_goku said:
Ah i'm following a different setup mate,for me the first problem to be tackled is compiling framework-res.apk,i
Even without changes I'm able to recompile but the darn thing wont work,
I have reports of similair errors in compiling framework-res
Once i get that sorted out i should be able to move forward...
oh and i already have compiled framework,services and policy with miui changes btw,
I'm pretty sure its the framework-res.apk which is giving me errors,
Some dudes in Sola also reported the same...
Hopefully when i figure out why my compiled framework doesnt boot i should get stuff moving..
Click to expand...
Click to collapse
Why are you completetly compiling and not only drag/drop modified files using 7zip. Or did i understand something wrong.....
thebrainkafka said:
Why are you completetly compiling and not only drag/drop modified files using 7zip. Or did i understand something wrong.....
Click to expand...
Click to collapse
I have smali files too which can't be added by 7zip
Sent from my ST25i using xda premium
Ok now i decided to restart the building procedure all over again,
Too many errors in my build log so gimme a little while before i update my github sources...
To make MIUI working you must edit ramdisk in kernel.

[Resolved][Q] How to modify default.prop in nAa Kernel

Hi All,
Due to specific APP requirement, I need to modify some settings in kernel.
Here are all the settings I need to modify in default.prop:
ro.secure=1
ro.debuggable=0
persist.service.adb.enable=0
Here are the methods I already try:
1. Android Kernel; Kitchen 0.3.1 (http://forum.xda-developers.com/showthread.php?t=1659584)
Fail at extract kernel.sin, cannot found RamDisk
2. dsixda's Android Kitchen 0.224 (http://forum.xda-developers.com/showthread.php?t=633246)
Fail at extract kernel.sin, cannot found RamDisk
3. kernel.sin unpacker by DooMLoRD (http://forum.xda-developers.com/showthread.php?t=1262656)
Fail at extract kernel.sin, cannot found RamDisk
4. Tools in Xperia FlashTool
Fail...
The kernel.sin was extract from 2.6.32.61-nAa-jb-06.ftf. (http://forum.xda-developers.com/showthread.php?t=2136471)
I already start studying how to compile nAa kernel...
Is there any easier way to apply this change?
Thanks!
Resolved.
It's because LZ4 compress format.
Here are the steps to Unpack nAa Kernel / Modify default.prop / Repack Kernel FTF
1. Decompress nAaKernel.ftf
You will got Kernel.sin
2. FlashTool => Tools -> Sin Editor => Select Kernel.sin => Extract data
You will got kernel.elf and kernel.partinfo
3. FlashTool => Tools -> Extrators => Elf => Select kernel.elf => Unpack
You will got kernel.elf.2 and kernel.elf.Image
kernel.elf.2 = ramdisk binary which compressed by LZ4!
kernel.elf.Image = zImage
4. Rename kernel.elf.Image to zImage
5. Rename kernel.elf.2 to ramdisk.lz4 and use LZ4 tools to decompress it
You will got a new ramdisk binary which was known as ramdisk.cpio
6. Rename ramdisk which extracted in step.5 to ramdisk.cpio
7. Copy ramdisk.cpio and zImage to ubuntu system.
8. Extract ramdisk.cpio and you will see default.prop
Make any modify you need.
9. Compress ramdisk folder to ramdisk.cpio
Here are the commands:
find . | cpio -o --format=newc > ramdisk.cpio
10. Compress ramdisk.cpio by GZip
Here is the command:
gzip ramdisk.cpio
11. Use Kernel Kitchen to create kernel.sin
Put ramdisk.cpio.gz and zImage in input folder under Kernel Kitchen.
Create kernel.sin by this tools.
12. FlashTool => Tools => Bundle Creation => select kernel.sin and loader.sin => Create your FTF
13. Flash into your device!
Although Puzzle & Dragons still cannot works on X10 mini with MiniCM10...
But I tried and learned something. :laugh:
thanks for explaining the process
it is very useful for me .
ramdisk.gpio decompress & compress
I tried to follow all steps, but isn´t work for me :'(
What I did:
1) decompress E15_2.6.32.60-nAa-05.ftf with 7z under windows: I get kernel.sin and loader.sin (OK)
2) extract data from kernel.sin with flashtool (0.9.16) under windows: I get kernel.elf and kernel.partinfo (OK)
3) extract elf from kernel.elf with flashtool (0.9.16) under windows: I get kernel.elf.2 & kernel.elf.Image (OK)
4) renamed kernel.elf.2 to ramdisk.lz4, and kernel.elf.Image to zImage; both under windows with f2 (OK)
5) decompress ramdisk.lz4 (3662KB) under windows (fastcompression . blogspot.com . es/p/lz4.html): I get ramdisk (4608KB) (it supposed to be renamed, so I expect it´s ok)
6) renamed ramdisk to ramdisk.cpio under windows with f2 (OK). Copy to ubuntu (QUESTION: zImage is used in ubuntu only in kernel kitchen???)
7) extract ramdisk.cpio (4718592- not command in the post): I used cpio -i -F ramdisk.cpio (9216 blocks); 4 new elements> default.prop init (files) android modules (directories)
8) I want to check I can extract & compress ramdisk (and make a "new" kernel), so I don´t do any modification
9) with only those 4 elements in the directory (default.prop init (files) android modules (directories)), I make ramdisk: find . | cpio -o --format=newc > ramdisk.cpio (PROBLEM: alert message "ramdisk.cpio has been increased, 4718080 new bytes has not been copied" other line "27647 blocks")
Original ramdisk.cpio was 4718582, but the new one is 14155264... 3 times more!!! I think the problemis here, but I don´t know how to resolve it
I have done the rest of the manual
10) kernel.sin created with kernel kitchen 0.2.3 under ubuntu (last kitchen version gives me an error, because in despite of choose create kernel.sin from zImage and ramdisk, it tries to do a ftf from kernel -not available- and ramdisk)
11) ftf creation under windows with X10 flashing tool 0.5.0.0 (flashtool 0.9.16 force me to write what device is for, but the cell is blocked, so I cann´t do it) OK
12) I tried to flash it, but it was aborted, so I expect ftf was incorrect
Sorry for wrote all: I thik the problem is extracting and compresing randisk.cpio, but I prefer to write everithing to be sure and be as clear as possible.
Any help will be great!

Categories

Resources