[GUIDE] How to Build TencentOS for any Device [GUIDE] - Android Software/Hacking General [Developers Only]

{
"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"
}
TencentOS is an aftermarket firmware designed by the Chinese company Tencent. Tencent also created the QQ and WeChat IM services.​
TencentOS, just like MiUi is not open source. However, Tencent has provided a version of PatchRom for you to use called TOSPlus. I have tested this on the Samsung Galaxy Star Pro. The guide for the TencentOS PatchRom is different than the MiUi and LewaOS and it is written in Chinese only. I will be writing a guide in English so that more people can port this great ROM to their devices.
Pre Steps:
You should Install 2 versions of Java. Version 7, and Version 6.
For Ubuntu and derivatives, type:
Code:
sudo apt-get install openjdk-7-jdk
Now we need the official Java 6.
For Ubuntu and derivatives, type:
Code:
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java6-installer
Be sure to select add when it asks if you want to add the repository or not.
Then, make sure you have all of the required android packages:
Code:
sudo apt-get install git-core gnupg flex bison gperf build-essential \
zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 \
lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z-dev ccache \
libgl1-mesa-dev libxml2-utils xsltproc unzip
Note: the above is only for 64-bit. Will update when 32-bit is tested.
------------------------------------------------------------------------------------------------------
Step 1:
Make sure you are on a version of Ubuntu 14.04 or greater (16.04 may or may not work).
Step 2:
Now you need to make a copy of the TencentOS PatchRom. Change to whatever directory you want and Type:
Code:
git clone https://github.com/TOSPlus/TPS
This will make a folder called TPS in whatever directory you were in before. The TPS folder will contain all of the code required to build TencentOS for your device.
Step 3:
Change the directory to TPS and type:
Code:
source build/envsetup.sh
This will initiate the build process.
Step 4:
Next, you build the directory for your device. Type:
Code:
make create brand=put-manufacturer-name device=device-model
Replace "put-manufacturer-name" with your manufacturer and replace "device-model" with your device model.
Step 5:
Next you need to copy a zip file of a ROM you want to use as your base into your device model folder. Name the zip file to ota.zip. Make sure the base ROM is android 4.3 or above.
Step 6:
Now, you configure the build. Type:
Code:
make config device=device-model
Replace device-model with your device's model.
Step 7:
Once you have that done, you need to edit a few files. Those files are misc_info.txt, remove_files.list, tos_system_files.ignore, and build.prop. You can find all of the files underneath the config folder within your device-model folder.
In misc_info.txt, you need to change blocksize, boot_size, recovery_size, system_size, userdata_size, and cache_size to match your device. You can find these in the BoardConfig.mk of your device.
In remove_files.list, you add the files that need to be removed so that TencentOS can function fully. This usually takes quite a bit of trial and error to get correct.
In tos_system_files.ignore, you designate which files should not get edited when you are patching the different services.
In the build.prop, you need to add the TencentOS properties.
example (for the gt-i9500):
ro.qrom.beaconkey=0M000V5PH01B6QQD
ro.qrom.product.device=ja3g
ro.qrom.product.device.brand=samsung
ro.qrom.build.brand=tos
ro.qrom.build.os=android4.4.2
ro.qrom.otapath=/data/media/0
qrom_disposeIcon_enable=1
qrom_permission_enable=1
# ro.qrom.build.version.snflag=ADRQRTOS
ro.qrom.build.version.snver=01
#need edit ro.qrom.build.version.day=151028
ro.qrom.build.version.name=ADRQRTOS01_M
ro.qrom.build.version.number=01151028
ro.qrom.build.version.type=M
#need edit ro.qrom.build.number=3
ro.qrom.build.lc=A1B2C3000D4E5F6
ro.qrom.build.lcid=99
#need edit ro.qrom.build.date=Wed OCT 28 21:01:25 CST 2015
ro.qrom.build.date.utc=1446014851
ro.qrom.build.type=mod
Everything that says need edit, you need to edit for your device specifically.
Step 8:
Copy file_contexts from the boot.img and put in the config folder.
Step 9:
Copy recovery.fstab from the recovery.img of your device to the config folder
Step 10:
Next, you need to extract all of the files from the ota.zip and put them in the correct place. To do that, type:
Code:
make prepare
Step 11:
Now, you can patch your ota.zip. type:
Code:
make patch
If there are any failed patches, you have to patch those smali files manually.
Step 12:
After patching has been done, type:
Code:
make repack
It repacks the jars and frameworks required that TencentOS has edited.
Step 13:
You made it this is the final step. Type:
Code:
make package
It will create a zip file of TencentOS for your device model.
Then you can flash it in a custom recovery and enjoy your new ROM
Here is a video of how to do it: http://forum.xda-developers.com/showpost.php?p=67495578&postcount=75
===========================================================================================
Apps you should manually remove after building (not all may be in your ROM) :
SystemUI.apk
Trebuchet.apk
Dialer.apk
Mms.apk
Contacts.apk
Email.apk
DSPManager.apk
qotaupdater.apk (let's face it, our devices will never get an official update )
Apollo.apk
Launcher3.apk
SetupWizard.apk
VideoEditor.apk
Calculator.apk
Calendar.apk
CalendarProvider.apk
CMFileManager.apk
CMHome.apk
CMWallpapers.apk
DocumentsUI.apk
Gallery2.apk
DownloadProviderUI.apk
HoloSpiralWallpaper.apk
InCallUI.apk
LatinIME.apk (or qime.apk)
LiveWallpapers.apk
LiveWallpapersPicker.apk
LockClock.apk
MagicSmokeWallpapers.apk
PackageInstaller.apk
SoundRecorder.apk
Term.apk
VideoEditor.apk
CMAccount.apk
CMUpdater.apk
Contactsprovider.apk
VoiceDialer.apk
qtheme.apk
ThemeChooser.apk
ThemeProvider.apk

if you dont mind can you please share your device tree
!

manojkumar8552 said:
if you dont mind can you please share your device tree
!
Click to expand...
Click to collapse
You don't actually need a device tree or kernel tree for this, as long as you have a deodexed zip of the ROM you will use as your base, you can build TencentOS.
Here is my github anyways: https://github.com/Qiangong2

Can we port this rom for any device with above mentioned steps
Sent from my XT1022 using XDA-Developers mobile app

surajsj said:
Can we port this rom for any device with above mentioned steps
Sent from my XT1022 using XDA-Developers mobile app
Click to expand...
Click to collapse
Yes. It even works on Spreadtrum devices
Sent from my Q5 using XDA Free mobile app

Qiangong2 said:
Yes. It even works on Spreadtrum devices
Sent from my Q5 using XDA Free mobile app
Click to expand...
Click to collapse
What are spreadtrum devices. Won't u continue the rom for star pro
Sent from my XT1022 using XDA-Developers mobile app

surajsj said:
What are spreadtrum devices. Won't u continue the rom for star pro
Sent from my XT1022 using XDA-Developers mobile app
Click to expand...
Click to collapse
Spreadtrum devices refers to the processor. Spreadtrum devices use spreadtrum processors, Mediatek devices use Mediatek processors, and Qualcomm devices use Qualcomm processors. Spreadtrum devices are notorious for being hard to develop for as there is not as much information on them as on Qualcomm and Mediatek devices.
Sent from my Q5 using XDA Free mobile app

Ok
Sent from my XT1022 using XDA-Developers mobile app

Qiangong2 said:
Step 6:
Now, you configure the build. Type:
Code:
make config=device-model
Click to expand...
Click to collapse
make config device=device-model

manojkumar8552 said:
make config device=device-model
Click to expand...
Click to collapse
Yup you're right. Added it to original post.

Hello.
I want to ask about something.
Can we enable the navigation bar in build.prop,and is the system fully compatible with it?
Also,has it been tested on Lollipop?

The Marionette said:
Hello.
I want to ask about something.
Can we enable the navigation bar in build.prop,and is the system fully compatible with it?
Also,has it been tested on Lollipop?
Click to expand...
Click to collapse
The notification bar is built into qsystemui.apk. You need to remove the original systemui.apk that you had in the ota.zip after the packaging.
Sent from my Q5 using XDA Free mobile app

Hmmm, I got around 40 errors. Where are the "reject" files put after the command ends?
The errors look like this:
Code:
[ERROR]patching /home/the/roms/tencent/TPS/devices/tos/smali/framework2.jar/smali/com/android/internal/app/ChooserActivity.smali ... fail.
[ERROR] cannot find corresponding target smali file of com/android/internal/app/ChooserActivity.smali

The Marionette said:
Hmmm, I got around 40 errors. Where are the "reject" files put after the command ends?
The errors look like this:
Code:
[ERROR]patching /home/the/roms/tencent/TPS/devices/tos/smali/framework2.jar/smali/com/android/internal/app/ChooserActivity.smali ... fail.
[ERROR] cannot find corresponding target smali file of com/android/internal/app/ChooserActivity.smali
Click to expand...
Click to collapse
There is no reject file as far as I can find. I didn't honestly look too hard though. If you are on Lollipop, I haven't tried it on 5.0 or above. You have to go into the smali file that has an error and manually patch it. Also, I used CM11 as my base. You may need an aosp or cm based rom to be used as your base.
Sent from my Q5 using XDA Free mobile app

is this working for MTK device? tnx

Qiangong2 said:
There is no reject file as far as I can find. I didn't honestly look too hard though. If you are on Lollipop, I haven't tried it on 5.0 or above. You have to go into the smali file that has an error and manually patch it. Also, I used CM11 as my base. You may need an aosp or cm based rom to be used as your base.
Sent from my Q5 using XDA Free mobile app
Click to expand...
Click to collapse
I am using Cm12.1 as a base. And we have nothing older than CM12.1...
When I was using the FlymeOS Patchtool,if it had errors,it would distinctively show the conflicts in the troublesome files.
But Tencent Patchtool doesn't make a "reject" folder.
I tried searching for the files,and I would get two files found. I open them both in text editors,but there are no conflict lines in there.
Then I tried to just make the package,but it gave me an error mentioning those files which weren't edited.

UnKnoWn.XD said:
is this working for MTK device? tnx
Click to expand...
Click to collapse
It should
Sent from my Q5 using XDA Free mobile app

The Marionette said:
I am using Cm12.1 as a base. And we have nothing older than CM12.1...
When I was using the FlymeOS Patchtool,if it had errors,it would distinctively show the conflicts in the troublesome files.
But Tencent Patchtool doesn't make a "reject" folder.
I tried searching for the files,and I would get two files found. I open them both in text editors,but there are no conflict lines in there.
Then I tried to just make the package,but it gave me an error mentioning those files which weren't edited.
Click to expand...
Click to collapse
Okay. Were any successful at patching?
Sent from my Q5 using XDA Free mobile app

The Marionette said:
I am using Cm12.1 as a base. And we have nothing older than CM12.1...
When I was using the FlymeOS Patchtool,if it had errors,it would distinctively show the conflicts in the troublesome files.
But Tencent Patchtool doesn't make a "reject" folder.
I tried searching for the files,and I would get two files found. I open them both in text editors,but there are no conflict lines in there.
Then I tried to just make the package,but it gave me an error mentioning those files which weren't edited.
Click to expand...
Click to collapse
I think I figured out why it won't work. It won't work if you have the rom with .dat files. You need it open like on 4.4 and below.
Sent from my Q5 using XDA Free mobile app

Qiangong2 said:
I think I figured out why it won't work. It won't work if you have the rom with .dat files. You need it open like on 4.4 and below.
Click to expand...
Click to collapse
I made the zip open already,I am not THAT bad. xD
But I hope we are on the same page here. I made sure that my zip wasn't block based,but normal like 4.4 was(I could edit all things inside the zip instead of having one system.DAT image in the zip).

Related

[TOOL][AIO] StudioAndroid # Automize everything! [GUI]

{
"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"
}
vlt96 said:
You shouldn't try it out when you have free time, it will give you free time
Click to expand...
Click to collapse
If you like my work, please consider a little donation:
Features
FEATURES LIST​Image
Install Image Tools: Install ImageMagick and/or PIL to use my Image Tools
Convert Image: Convert any image in given directory to given extension
Resize: Batch-resizes files found in given directory with given percent or given DPIs, or resizes an APK with given DPIs
Batch Theme: Applies a theme overlay (caclulated with luminosity values) to all images found in a given directory (e.g. THEME!)
Batch Rename: Batch renames all files found in a directory with a given pattern, and renames them to given out (for porting Themes)
CopyFrom: Copies images present in directory 1 FROM directory 2 (if present in dir 2) - for themers!
OptimizeImage: Optimizes Image, so that size will be smaller
Development
Prepare Building: Installs necessary build tools
Build from Source: Builds one from many sources and even choose a device (if available)
Add Governor: Add a governor to a kernel
Install Android SDK
Install Java JDK
APK
(De)Compile
Extract/Repackage APK
Sign APK with different keys
Zipalign APK
Install APK
Optimize Images INSIDE APK
Advanced
(Bak)Smali: Lets you edit the code inside classes.dex and compile back
ODEX: ODEX a ROM
DE-ODEX: DE-ODEX a ROM
Compile to an Exe: lets you compile Python scripts to an executable for your OS
Android
Configure ADB: Connect to devices over IP, enable/disable Network ADB on connected device
Logcat
Build.Prop: Pulls Build.prop from device and let you edit it
Backup / Restore: full backup of (all optional) apps, system apps, data, shared storage
ADB File Explorer
StudioAndroid options
Clean workspace and go back to before you used this tool the first time!
Debug: Includes printing the used commands before executing and testing the latest changes
Check the log in a scrollable window with selectable text
Report a bug: Opens a reply on this XDA thread with the content of your log in it
Changelog: See what's changed!
Update: Update StudioAndroid and choose between Stable en Nightly
Restart
About: shows information about the developer, contact info, profile image, twitter etc
​
Click to expand...
Click to collapse
SCALED PREVIEW: (Click to see full preview)
​
Click to expand...
Click to collapse
Instructions
Download the latest update OR one of the stable updates
Extract in your home directory
double-click StudioUnix
Click to expand...
Click to collapse
Preparation:
Download one of the stable updates
Extract in a path without spaces (e.g. NOT in "Documents and Settings")
Double-click StudioWindows.exe
Click to expand...
Click to collapse
OR
Download and run Python
Download and run PYGTK - 32-bits
Download the latest update OR one of the stable updates
Extract in a path without spaces (e.g. NOT in "Documents and Settings")
Right-click Studio.py > Open with > Python
Click to expand...
Click to collapse
Preparation:
install python2.7: 64-bit/32-bit x86-64/i386 / 32-bit i386/PPC
Install this (GTK+ and PyGTK)
Download THIS
Run StudioUnix
Click to expand...
Click to collapse
Click to expand...
Click to collapse
​
[TOOL][Linux / Windows] StudioAndroid - GtkUI
vlt96 said:
You shouldn't try it out when you have free time, it will give you free time
Click to expand...
Click to collapse
Translate?
LINUX
First navigate to StudioAndroid directory.
Then
xgettext -k_ -kN_ -o messages.pot Studio.py
msginit
Click to expand...
Click to collapse
A new file will be created (***.po)
Open that file with PoEdit and translate the right-column
When finished, save it and rename ***.po to Studio.po and put it in StudioAndroid/lang/yourlang_YOURLANG/LC_MESSAGES
afterwards, compile it:
msgfmt Studio.po -o yourlang_YOURLANG/LC_MESSAGES/Studio.mo
Click to expand...
Click to collapse
When I update it, merge the changes using:
xgettext -k_ -kN_ -o messages.pot Studio.py
msgmerge -U Studio.po messages.pot
Click to expand...
Click to collapse
and translate the new strings in PoEdit
The file I need is yourlang_YOURLANG/LC_MESSAGES/Studio.mo, but it's handy for you and me if you also include yourlang_YOURLANG/LC_MESSAGES/Studio.po
WINDOWS
Open lang/LanguageFiles/en_US.po in a text editor
msgid indicates the original string
msgstr indicates the string you need to translate.
So translate the msgstr strings.
Afterwards, send me en_US.po renamed to yourlanguage_YOURCOUNTRY.po
Thanks!
If you cant upload files anywhere, then past the content of SA.po in Pastebin and send me the link
THanks in advance
FULL CREDITS WILL BE GIVEN
Click to expand...
Click to collapse
Info
All info is now available at Github:
Git Source
Changelog
Bugs & Feature requests
BitLy Stats
Click to expand...
Click to collapse
Credits
Ablankzin : Contributor to StudioAndroid
Popdog123: He took the MAC side of the project
vlt96: Making a game to play while waiting
KeitlG: Compiled for windows!!!
KeitlG: Helped me testing the long-awaited ReCompile Fix!
Rookie407 : He compiled this tool for windows! AWESOME! You don't have to install Python and GTK anymore!!!
Lithid-CM : He was my messias on Python in general and GTK specific. Go and give him a "THANKS!"
KeitG: Gettext translation
WilliamCharles & Lycan: Windows testers - AWESOME, THANK THE GUYS!!
Click to expand...
Click to collapse
Omega Theme Studio
vlt96 said:
You shouldn't try it out when you have free time, it will give you free time
Click to expand...
Click to collapse
Features
This is a mode of StudioAndroid.
To go to this mode, run StudioAndroid > Options > Toggle Omega.
The purpose of modes is to specialize the GUI for specific actions and functions.
The purpose of the Omega Mode (AKA OmegaThemeStudio) is to create themes for Omega Apps on the fly.
FEATURES LIST
Retrieving styles
Download styles from official TeamSyndicate dropbox (30 and more styles!)
Upload your own style folder to the tool
Import selected styles from a CM-Theme.apk or ThemeUpdate.zip (!!)
Editing styles
Colorize the images, the same way as StudioAndroid does
includes selecting specific styles (clock, battery, signal, notification etc)
Customize on the fly!
This tool supports customizing all available values in XMLs
That means:
Editing clock colors
Editing clock dividers
Editing icon locations (for all notifications seperately)
Padding between icons
Clock size
Text size
AND MORE!
Building
Build with your own theme name and version
Dev name
"HELLO!" text on startup
E-Mail, website and version
Click to expand...
Click to collapse
Instructions
1. Download StudioAndroid as instructed in post #1
2. Run it as instructed in post #1
3. Click Options > Toggle Omega
Done​​
Click to expand...
Click to collapse
edit: out of date
KeitIG said:
Ok, i reserved this post for my translation
Click to expand...
Click to collapse
Good one!
I'll link already to the post xD
Could you add this piece of text to the top of your post?
Looks official
HTML:
[CENTER][IMG]http://www.mupload.nl/img/s81uiuto3.png[/IMG][/CENTER]
I'm getting errors using Cygwinn on Windows to execute your scripts, mainly with variables ><
I'm going to execute it with VirtualBox
KeitIG said:
I'm getting errors using Cygwinn on Windows to execute your scripts, mainly with variables ><
I'm going to execute it with VirtualBox
Click to expand...
Click to collapse
That would be possible indeed.
I think I am going to investigate a bit in Cygwin to make it compatible.
When using VirtualBox, use Ubuntu 10.04 LTS (64-bit preffered!)
Greets!
Add: could you post the errors or PM them to me??
Greets!
HELP​
What does your script do?
Well, look at the screenshot! And then look at the explanation below.
Update
Check ONLINE for updates!
Utils
Install Utilities
You are now able to install ADB, APKTOOL, AAPT, 7z, (bak)smali and a lot more seperately or together. This makes it easier for you to use them!
Resize pictures
Seems clear enough. It resizes pictures for you, theme conversion is easy!
Now also includes a small manual..
Batch Theme
This places a color layer over an image.
You can theme 1000 images in 4.31 seconds (I timed it).
Please note that if the current color is red and you want purple, you are not gonna add purple to it, but blue!
CopieFrom
It copies images that are in Directory A FROM Directory B.
Example: A contains 1 2 3 4 5, B contains 2 3 5 6 7 9 8
2 3 and 5 get copied over. Handy for theme porting!
Optimize Images
After selecting Extract APK, you can optimize images so they look better.
Click to expand...
Click to collapse
Develop
Install SDK
Installs the Android Software Development Kit.
You can run Virtual Machines with Android with it, and create APPS.
Install JDK
Installs the Java Development Kit.
You can develop in java and for Android with it.
Prepare Building
A lot of things should be installed before you can build your ROM from source.
This option does that for you, you don't have to do anything yourself again
Build from Source!
You can build a ROM from online sources with it! ALl you need is in it, but for any help you can always PM me!
Build Kernel
BETA!
You can sync the kernel sources with it. THAT'S IT FOR NOW!
Switch BUILD-Mode
Unfortunately, every device has its own sources to build a ROM or Kernel with.
I made this tool to be able to switch from devices
If your device is not (yet) included, then use option "Include".
Click to expand...
Click to collapse
APK​
Compile APK
The way Android reads the files inside an APK is not the way we do.
Compiling transforms our files into Android files. That's the only way I can explain...
Decompile APK
Undo compile, so we can edit code.
Extract APK
Leave everything intact, but extract. You will not be able to edit anything other then images!
Sign
Every APK needs a signature to verify the Permissions and files in the APK.
This tool does that for you
You can now also choose the Key
Install APK
Install it on your device via USB without a popup.
Zipalign
Aligns the APK. That makes it faster
Click to expand...
Click to collapse
Advanced
Baksmali
This allows you to "decompile" the classes.dex file in the APK so you can edit the code of your APK!
Smali
After you edited code, you need to "compile" again. Using this!
De-Odex
WIth system APKs, the smali files are not inside the APK, but outside. Inside an ODEX file.
De-odex includes the files inside the APK, so that it it needs less space
Warning: ODEX apps can be imported in dalvik straight.
DE-ODEXED apps don't. So De-Odexed is a bit slower...
Click to expand...
Click to collapse
Aroma​
I am working on this.
Many features will be added, but for now it's just a few options.
Click to expand...
Click to collapse
So, I dont need to download the sources when building from source?
dhruv.always said:
So, I dont need to download the sources when building from source?
Click to expand...
Click to collapse
The script does it for you.
Further explanation: building from source option actually just syncs the source. I think I even forgot to sync the device and vendor too, I'll check on it.
complete .zip file uploaded with AC and ACI translated. There should be some mistakes but i'll correct them when there will be a new release
(cf my post)
KeitIG said:
complete .zip file uploaded with AC and ACI translated. There should be some mistakes but i'll correct them when there will be a new release
(cf my post)
Click to expand...
Click to collapse
Thanks for that
I had an idea: could you add an option in the menu to add manualy a source location ?
When sources are downloaded, where can we found them to edit them ?
And will this script be only for optimus one or for other devices ?
KeitIG said:
I had an idea: could you add an option in the menu to add manualy a source location ?
When sources are downloaded, where can we found them to edit them ?
And will this script be only for optimus one or for other devices ?
Click to expand...
Click to collapse
1 there is, use option 1 in the Build menu (Other)
EDIT: whoops, there isn't... I think I'll change to the home directory.
2 you can find them in your Android Central folder /WORKING_DIR_x
x is the number of the option you chose to fetch it.
3 It already is for other devices, use the Other option
Greets!
Updated
###v0.12
[^] Implemented BuildKernel
[^] French translation by KeitG - THANKS!
[^] Some small code improvements. Visual changes to the MAIN MENU
[^] Added switches and commands. example: "./AC [menu option]" to go to that option DIRECTLY. "./AC -h" to go to the HELP page
[^] SubDirs now supported in Resize (example: drawable-hdpi gets copied over)
[^] BetaInstaller inside ACI script
[^] Every output will now be visible inside LOG!
[^] Implemented CASE options, more clean. Implemented InvalidOption.
[^] Utils.zip is now less then HALF the previous size
Click to expand...
Click to collapse
any suggestions are REALLY appreciated!
Thanks @kssood for suggesting awesome things!
thanks @ta for the idea of kernel building (although is still much work to do!)
I Figured out people like previews...
Do you?
BuildKernel mean it will download kernel source? and then we can build kernel or it's diff? Sorry for bad english
cips gokhle said:
BuildKernel mean it will download kernel source? and then we can build kernel or it's diff? Sorry for bad english
Click to expand...
Click to collapse
Build kernel is exactly as it says. You can build a kernel from a source.
I included Arjen, Arjen 3.0, thunderVN, Cyanogenmod and stock Android.
But t's still beta!
Greets!
mDroidd said:
Build kernel is exactly as it says. You can build a kernel from a source.
I included Arjen, Arjen 3.0, thunderVN, Cyanogenmod and stock Android.
But t's still beta!
Greets!
Click to expand...
Click to collapse
got it thanks and can you add franco source

[Collection] Stock firmwares for Xperia L C2104/5

Code:
Your Xperia L does NOT have to be rooted.
Your Xperia L does NOT have to be bootloader unlocked.
This does NOT re-lock a SIM unlocked phone (unlocking is ONCE and PERMANENT).
This does NOT unlock your bootloader.
{
"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"
}
C2104_15.0.A.2.17 R10A_Generic IN : https://drive.google.com/file/d/0B155c3sEjlyjeDBBRXczNkxEcG8/edit?usp=sharing
C2104_15.3.A.0.26-R10A_Generic IN : https://drive.google.com/open?id=0B155c3sEjlyjR3VnVnYwNWs2Qjg&authuser=0
C2104_15.3.A.1.14_R10A_Generic IN : https://drive.google.com/open?id=0B155c3sEjlyjU3dVSFhUb3Z1eVk&authuser=0
• .36 FW Stock Kernel by @jayaura : Link
My Blog Link : Click Me !!
Other threads related to Firmwares : here
If this thread helped and want to thank me !! Press that yellow thank button.
Navneet Suresh said:
Hey guys as i told you i came up with stock ROM of Xperia L :laugh::good::highfive: [C2105]
- Why do you need Stock Rom ?
Most of the time its is needed for restoring bricked devices/Restore device again to working states.
So First head here to learn to use Flashtool [Use full to people like me having there first Xperia Device]
After learnin' just flash it up and get back stock rom running :good: :highfive:
Code:
[Mirror] https://docs.google.com/file/d/0B155c3sEjlyjNEFtVHFwQkJlakU/edit?usp=sharing
Code:
Original https://docs.google.com/file/d/0B_d8uWGbkaetZjlGTVJPcmVRTzg/edit?usp=sharing
Other Stock Rom Link [Different Version] XDA LINK Credits : allenwalker1998 & xperiafirmware.com & Google
If this thread helped you just press thanks: It encourages me
Click to expand...
Click to collapse
How will you flash rom without CWM?
Sent from my Xperia L C2104 using xda-premium
Raj joshi said:
How will you flash rom without CWM?
Sent from my Xperia L C2104 using xda-premium
Click to expand...
Click to collapse
Flashtool
Just like Samsung has Odin and LG has KDZ Updater, Sony has Flashtool
use Flash tool
Raj joshi said:
How will you flash rom without CWM?
Sent from my Xperia L C2104 using xda-premium
Click to expand...
Click to collapse
See my guide here for using flashtool.
nolinuxnoparty said:
Flashtool
Just like Samsung has Odin and LG has KDZ Updater, Sony has Flashtool
Click to expand...
Click to collapse
yeah you are right nolinuxnoparty
Navneet Suresh said:
Hey guys as i told you i came up with stock ROM of Xperia L :laugh::good::highfive: [C2105]
Click to expand...
Click to collapse
THX for stock :good:
wich region is this stock Rom? C2105_15.0.A.1.31_CE.ftf --> CE=CentralEuropa?
heross said:
THX for stock :good:
which region is this stock Rom? C2105_15.0.A.1.31_CE.ftf --> CE=CentralEuropa?
Click to expand...
Click to collapse
Its Central Europe 1 Generic CE1 1272-2161 15.0.A.1.31 R3A
boot.img
Can you provide boot.img please?
jayaura said:
Can you provide boot.img please?
Click to expand...
Click to collapse
Boot.img cannot be provided from stock rom because it has boot.sin flash whole stock rom
Navneet Suresh said:
Boot.img cannot be provided from stock rom because it has boot.sin flash whole stock rom
Click to expand...
Click to collapse
Thats fine. But we can do it, right? We can extract the sin file using Flashtool, extract kernel and ramdisk out of it, and then repack them again using mkbootimg?
I just came to know about it lately
oh !!
jayaura said:
Thats fine. But we can do it, right? We can extract the sin file using Flashtool, extract kernel and ramdisk out of it, and then repack them again using mkbootimg?
I just came to know about it lately
Click to expand...
Click to collapse
Hmm then have you made stock kernel ?? If yes PM me the stock boot.img link make sure it is working, i will add it to my thread and credit you
Navneet Suresh said:
Hmm then have you made stock kernel ?? If yes PM me the stock boot.img link make sure it is working, i will add it to my thread and credit you
Click to expand...
Click to collapse
I'm working on it, but try one failed, I want to compile those tools (unmkbootimg) from scratch, for which I need to download GBs of android source. Right now its my net is slow, and expensive too. So waiting for a good connection. I'll send you the stuff once I'm done.
Hmm
jayaura said:
I'm working on it, but try one failed, I want to compile those tools (unmkbootimg) from scratch, for which I need to download GBs of android source. Right now its my net is slow, and expensive too. So waiting for a good connection. I'll send you the stuff once I'm done.
Click to expand...
Click to collapse
Send me when you can there's no urge take your time and if u r successful teach me the trick to do it :highfive:
Navneet Suresh said:
Send me when you can there's no urge take your time and if u r successful teach me the trick to do it :highfive:
Click to expand...
Click to collapse
Infact, I just did! Hail Rachit Rawat. Those tools I needed where put up in his git repo! So he saved my GBs of downlaod. I'll now PM you the boot.img. That would be from the .36 firmware. Put it where you like
Its damn easy to create it though.
1) Extract stock FTF file using some archiver. Its a just a zip archive. You'll now get a lot of sin files, in which kernel.sin is what we need
2) Open Flashtool, go to Tools --> Sin Editor
3) Extract it, you'll get one file kernel.elf.
4) In Flashtool again, go to Tool--> Extractors --> Elf. Select the kernel.elf that was created (in the same folder where you placed kernel.sin, see the info in Flashtool
5) Now you have two files, one is the ramdisk, and other the kernel. You can identify it from its name.
6) Download mkbootimg from Rachit's git repo https://github.com/rachit-rc96/boot-tools
6) Place all your files ( ramdisk, kernel and mkbootimg) in one directory. Open up a terminal ( I hope you are on linux, else get cygwin )
7) type
Code:
./mkbootimg --kernel kernel.elf.Image --ramdisk kernel.elf.ramdisk.gz -o boot.img --base 0x80200000 --ramdisk_offset 0x02000000 --cmdline "console=ttyHSL0,115200,n8 androidboot.hardware=qcom user_debug=31 msm_rtb.filter=0x3F ehci-hcd.park=3" --pagesize 4096
8) now you have boot.img in the same folder!
The one I created did run on my xperia L. However, there was some lag. I believe this is because I have some tweaks done with remaining part of the existing stock .36 firmware, which the stock kernel dont like
Anyways the extended stock kernel must be better than this one!
Error
jayaura said:
Infact, I just did! Hail Rachit Rawat. Those tools I needed where put up in his git repo! So he saved my GBs of downlaod. I'll now PM you the boot.img. That would be from the .36 firmware. Put it where you like
Its damn easy to create it though.
1) Extract stock FTF file using some archiver. Its a just a zip archive. You'll now get a lot of sin files, in which kernel.sin is what we need
2) Open Flashtool, go to Tools --> Sin Editor
7) type
Code:
./mkbootimg --kernel kernel.elf.Image --ramdisk kernel.elf.ramdisk.gz -o boot.img --base 0x80200000 --ramdisk_offset 0x02000000 --cmdline "console=ttyHSL0,115200,n8 androidboot.hardware=qcom user_debug=31 msm_rtb.filter=0x3F ehci-hcd.park=3" --pagesize 4096
8) now you have boot.img in the same folder!
Anyways the extended stock kernel must be better than this one!
Click to expand...
Click to collapse
I was tryin to compile a .31 FW stock kernel and error came "Cannot execute binary file" Using Cygwin on Win 7
Navneet Suresh said:
I was tryin to compile a .31 FW stock kernel and error came "Cannot execute binary file" Using Cygwin on Win 7
Click to expand...
Click to collapse
Thats why I dont recommend Cygwin. Get out of your comfort zone and explore the wild world of linux. That will only help you become more cool I think the error is because your file system doesnt support linux permissions.
Navigate to the directory where you have the executables and try this:
Code:
chmod +x ./mkbootimg
Now try executing them again.
I havent used cygwin, and you might find help regarding that elsewhere in the forum or, well, google
i Love LinuX
jayaura said:
Thats why I dont recommend Cygwin. Get out of your comfort zone and explore the wild world of linux. That will only help you become more cool I think the error is because your file system doesnt support linux permissions.
Navigate to the directory where you have the executables and try this:
Code:
chmod +x ./mkbootimg
Now try executing them again.
I havent used cygwin, and you might find help regarding that elsewhere in the forum or, well, google
Click to expand...
Click to collapse
I love linux but the problem is only i will be using it i had tried to partition the linux and win but my HDD failed,
Edit it didnt work
Dont cygwin!
Navneet Suresh said:
I love linux but the problem is only i will be using it i had tried to partition the linux and win but my HDD failed,
Edit it didnt work
Click to expand...
Click to collapse
I just realized cygwin is not designed to "emulate" native linux applications. You need to compile them for windows. So if you want mkbootimg to run in windows in cygwin, download AOSP source, and build the tools for yourself.
So you're better off using linux itself...
oh !! I see
jayaura said:
I just realized cygwin is not designed to "emulate" native linux applications. You need to compile them for windows. So if you want mkbootimg to run in windows in cygwin, download AOSP source, and build the tools for yourself.
So you're better off using linux itself...
Click to expand...
Click to collapse
i got another method using Android Kitchen i am now tryin to make a stock kernel with CWM
Can I install it on my C2014?

(Newbies) Cooking a Rom with a Kitchen

The purpose of this guide is to show users here in our Forum how to use the DSIXDA kitchen so that they may become familiar with cooking their own Roms and possibly becoming a valuable asset to our community down the road. So I hope to see this become useful for some of you willing to learn and well, to also not be lazy and expecting others to do the work for you - no pun intended lol.
Let's understand what a basic Rom contains:
- First and foremost, a Rom.zip will always have at minimum:
-- A boot.img at the root of the Rom.zip
-- A /system folder
-- A /META-INF folder
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
--- Now, I assume you already have done me the favor of installing the kitchen and so by therefore, saving me the trouble of having to explain the process of installation. It's simple. Moving along now.
--- Go ahead and get the kitchen up and running in your CMD Window. I will be using Ubuntu in reference to this guide but the same should also apply to those who prefer Windows/Cygwin.
As you see in your CMD Window there are some options with basic information as to what those options will do for you.
The first thing we need to do is set up our working folder which will be option number 1, but before we can do that we need a Rom to work with. There are many ways to getting your hands on a Rom. However, for the sake of this tutorial I will use a Nandroid Backup created by TWRP (Custom Recovery).
-- Please note that a TWRP system backup will require additional steps.
-- This is because the kitchen does not support its backup format.
--- Go ahead and make a copy of your boot and system backup and paste them in the original_update folder which can be found in the kitchen directory. From a 'TWRP backup' the boot.img will be originally named boot.emmc.win and the system.img will originally be named system.ext4.win. Go ahead and change them respectively to boot.img and system.img (It is that easy).
--- Now, create a folder and name it whatever you like, BUT the name MUST include WORKING_ at the beginning of its name.
-- An example: WORKING_k2cl_412_deodexed
--- Move the boot.img in to the created folder. Open up the working folder and create another sudirectory folder named system.
--- Go ahead and move the system.img in to the subdirectory folder named system located inside of your working folder.
--- Open up a new CMD Window and change directories to where the system.img is currently located at.
--- Go ahead and enter:
Code:
tar -xvf system.img
-- This will unpack the system backup made by TWRP
-- DSIXDA Kitchen does not currently support this format so YOU must do it.
--- As you can see, the system folder is now complete with all that you will need to start on your Rom. Go ahead, and remove the actual system.img file as it will not be needed now.
--- Go back to the CMD Window which has the kitchen up and running. Select option 1 to set up your working folder for the kitchen. It will give options to show supported formats or to abort. Go ahead and just press enter.
--- It will bring up a list of working materials to use for establishing your working folder for the kitchen. In my case, the working folder I will be using is option number 2, WORKING_k2cl_412_deodexed. Go ahead and select your option now.
--- It will ask you if you want to change the name of the new working folder. The option is yours. Choose yes or no (this part really doesn't matter).
--- Once you press enter it will create the new working folder which can be found at the root of the kitchen directory. It will be copying the contents over to the new working folder.
--- It will detect whether or not your rom has an updater script, symlinks, root, busybox, etc. If any of these are detected it will let you know it found them and it will adjust accordingly to them. Which saves you lots of time.
--- Now it will ask you if you would like to view the Rom's information. This is optional for you. If you want to see it then select yes, if not, then select no.
--- Congratulations! You have a Rom set up to be worked on! At this point you can choose to deodex your Rom, unpack and edit your boot.img, root your device both, /system and boot.img. Add additional tweaks, apply init.d support, etc.
--- Once you have finished playing with your Rom as a first timer, go ahead and back out to the main menu of the kitchen. Select number 99 to build your Rom from the working folder.
--- You will be asked to select a build option. Go ahead and select option number 1.
--- Select yes to zipalign your apk files
--- Next it will build your updater-script for your Rom based on an android device. It will ask you to review the updater-script before proceeding forward. You MUST insure the updater-script is ready for your device or it will not flash!
--- Go to the working folder of that rom and scroll the the subdirectories found in the META-INF folder until you see the updater-file. Open it up with notepad++ for Windows users or Gedit for linux users. You are going to look at the top and add the following (PLEASE INSURE YOU USE THE PROPER SYSTEM PARTITION FOR YOUR DEVICE - THIS EXAMPLE IS BASED ON MY K2_CL DEVICE!:
Code:
mount("ext4", "EMMC", "/dev/block/mmcblk0p35", "/system");
delete_recursive("/system");
package_extract_dir("system", "/system");
--- Now scroll to the bottom of the updater-script. You may see some crazy stuff about raw writing the boot.img. Go ahead and remove that mess and replace it with the following (PLEASE INSURE YOU USE THE PROPER BOOT PARTITION FOR YOUR DEVICE - THIS EXAMPLE IS BASED ON MY K2_CL DEVICE!:
Code:
package_extract_file("boot.img", "/dev/block/mmcblk0p20");
--- Once done, go ahead and save the updater-script file. Go back to the CMD window running the kitchen and select yes to keep the updater-script for the Rom.
--- It will create the update.zip, it will ask you to sign the Rom (say yes), then it will ask you if you wish to change its name or leave it as is (your choice).
--- Congratulations, now go ahead and flash your Rom to test it out. Be sure to Factory reset your device from within the custom recovery, and insure that the system partition is wiped also. After it is done flashing the rom, wipe the dalvik and cache before rebooting, and remember... Any problems without a logcat is trivial!!!
--- Happy Hunting!!
That's my pet lizard, Saucy. He keeps me company, haha.
Sent from my C525c using Tapatalk
Thanks man. This is exactly what I wanted to get me going. It's late for me but I'll definitely be checking this guide out tomorrow.
Good luck. I used a TWRP backup as an example because it requires extra steps. Any other time, like a system dump for example, the kitchen will detect it and be able to unpack the system.img for you automatically, but because of how TWRP formats the ext4 backups it must be done manually since the kitchen doesn't support it yet. Just some insight so you know that you don't always have to manually unpack the system.img.
Sent from my C525c using Tapatalk
If a normal system img aside from TWRP then all is required is naming them boot.img and system.img then placing both inside of the 'original_' folder then running the kitchen. Select option 1 and it should detect both. It will build the working folder, the subdirectory system folder, meta-inf folder, place the boot.img, and unpack the system.img automatically. For future reference.
Sent from my C525c using Tapatalk
also, for the "newbies" including me,
http://forum.xda-developers.com/showthread.php?t=2597220
[KITCHEN][FORK] Android Kitchen Continuation (WIP) [Linux / Mac / Windows]
here's a link to a more up to date kitchen, I haven't used it but it seems legit.
Haha, just took a look at it. Most of the added features I have already done for my personal use. Guess I can hit this guy up with some ideas. Thanks for that link @russellvone
Sent from my C525c using Tapatalk
Top priority is adding support for TWRP backups, and looking into implementing the ability to re-odex the Rom. It can be done, despite that the founder says otherwise.
Sent from my C525c using Tapatalk
Oh, and don't no one take offense to my title, "Newbies". Meant nothing insulting by it. Just used it regarding that maybe you are new to it. We all got to start somewhere.
Sent from my C525c using Tapatalk
If you ran through and deodexed, did you by chance get an error when it attempts to deodex HTCNotes?
Here's what I'm getting:
Code:
NOW AT FILE 1 OF 1 IN system/app: HtcNotes.odex
Disassembling HtcNotes.odex ...
java -Xmx512m -jar baksmali.jar -a 17 -d ../framework -x HtcNotes.odex
Error while disassembling method Lcom/htc/notes/detail/NotesDetailActivity$13;->handleMessage(Landroid/os/Message;)V. Continuing.
org.jf.dexlib.Code.Analysis.ValidationException: Could not resolve the method in class Lcom/htc/widget/HtcSeekBarPopupWindowListener; at index 75
at org.jf.dexlib.Code.Analysis.MethodAnalyzer.analyzeInvokeVirtualQuick(MethodAnalyzer.java:3655)
at org.jf.dexlib.Code.Analysis.MethodAnalyzer.analyzeInstruction(MethodAnalyzer.java:1110)
at org.jf.dexlib.Code.Analysis.MethodAnalyzer.analyze(MethodAnalyzer.java:213)
at org.jf.baksmali.Adaptors.MethodDefinition.addAnalyzedInstructionMethodItems(MethodDefinition.java:389)
at org.jf.baksmali.Adaptors.MethodDefinition.getMethodItems(MethodDefinition.java:311)
at org.jf.baksmali.Adaptors.MethodDefinition.writeTo(MethodDefinition.java:132)
at org.jf.baksmali.Adaptors.ClassDefinition.writeMethods(ClassDefinition.java:338)
at org.jf.baksmali.Adaptors.ClassDefinition.writeVirtualMethods(ClassDefinition.java:310)
at org.jf.baksmali.Adaptors.ClassDefinition.writeTo(ClassDefinition.java:117)
at org.jf.baksmali.baksmali.disassembleDexFile(baksmali.java:186)
at org.jf.baksmali.main.main(main.java:308)
opcode: invoke-virtual-quick/range
CodeAddress: 1478
Method: Lcom/htc/notes/detail/NotesDetailActivity$13;->handleMessage(Landroid/os/Message;)V
ERROR: Aborting HtcNotes.odex
Finished system/app
WARNING: Could not deodex the following (you can try to deodex these files again):
HtcNotes.odex
I've already tried again too
@palmtree5
Is your Rom 4.1.2 or 4.2.2?
Sent from my C525c using Tapatalk
Modding.MyMind said:
@palmtree5
Is your Rom 4.1.2 or 4.2.2?
Sent from my C525c using Tapatalk
Click to expand...
Click to collapse
4.1.2
@palmtree5
Thought so lol.
You are getting that error because you are using API 17 setting for a 4.1.2 Rom. 4.1.2 is built on 16. Change it to 16 and try it again.
Sent from my C525c using Tapatalk
Modding.MyMind said:
@palmtree5
Thought so lol.
You are getting that error because you are using API 17 setting for a 4.1.2 Rom. 4.1.2 is built on 16. Change it to 16 and try it again.
Sent from my C525c using Tapatalk
Click to expand...
Click to collapse
Now why didn't I think of that!
---------- Post added at 01:54 PM ---------- Previous post was at 01:33 PM ----------
palmtree5 said:
Now why didn't I think of that!
Click to expand...
Click to collapse
Ok, the deodexing worked out fine after that
@palmtree5
Just a heads up...
When you go to flash your deodex Rom, it will take forever to boot up for its first intial boot. Afterwards, it will boot up at normal timing. So when you flash it and it goes through the bootanimation then hangs on the HTC logo, be patient. Don't pull the battery lol.
Sent from my C525c using Tapatalk
Should take no more than 5 to 10 minutes at most given my personal experience.
Sent from my C525c using Tapatalk
Modding.MyMind said:
@palmtree5
Just a heads up...
When you go to flash your deodex Rom, it will take forever to boot up for its first intial boot. Afterwards, it will boot up at normal timing. So when you flash it and it goes through the bootanimation then hangs on the HTC logo, be patient. Don't pull the battery lol.
Sent from my C525c using Tapatalk
Click to expand...
Click to collapse
Yeah, fairly certain I've used deodexed roms before on other devices, just never deodexed one myself
palmtree5 said:
Yeah, fairly certain I've used deodexed roms before on other devices, just never deodexed one myself
Click to expand...
Click to collapse
Nice
Just making sure bro lol. Didn't want you coming back panicking under the assumption you may had not been aware.
Sent from my C525c using Tapatalk
Modding.MyMind said:
Nice
Just making sure bro lol. Didn't want you coming back panicking under the assumption you may had not been aware.
Sent from my C525c using Tapatalk
Click to expand...
Click to collapse
Right. Better to err on the side of caution
I'm bumping this thread because I am seeing A LOT OF PEOPLE ON HERE having troubles fixing their devices and for whatever the reason may be it seems to be with a LOT of these twrp backups people are grabbing from others because they either lost theirs or never made one from the get go (horrible decision).
So, if you are having troubles restoring with a backup then this guide should help you make up a quick Rom and get your device back.
You aren't looking to do anything fancy with the "kitchen" but to just build a quick odex or deodex Rom to flash and be up and running again.
Please take advantage of this if all else is failing for you.
IT IS NOT THAT HARD TO DO
--- Happy Hunting!!!
Sent from my C525c using Tapatalk

How to Port Samsung Rom to other Samsung devices (Small Update as of 10/13/2018)

{
"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"
}
(Success Stories)
jonathanmohamed said:
I have successfully ported s7 and n7 firmware using this guide.
Awesome guide!. 9/10
Click to expand...
Click to collapse
corsicanu said:
@malbert16442 this is pure GOLD. Gave you all my thanks for today. I'll try it myself today. Also waiting patiently for updates [emoji28] . Cheers!
Click to expand...
Click to collapse
armaowl said:
is the reason i was allowed me to port my own Rom!
Click to expand...
Click to collapse
1. Kernel is second most important because it determines if rom boots or whether
we could access a log.
2. Since we are trying to boot a rom not meant to be on our device, it could be alittle hard getting this thing to run.
3 Contact a kernel dev and ask them for adb insecure kernel or a kernel with usb debugging enabled at boot. This will help us obtain those logs at boot.
4. In some rare cases Logs might show that specific kernel services are not accessible.
In this case we only change the init.environ.rc. Which has the frameworks needed to boot.
5. If you can't get kernel logging at boot use this in recovery after 2 mins of booting.
Code:
adb pull /data/tombstones
6.Update
DaKillaz98 said:
Hello All! I am posting this fix because on my Note Edge, I wasn't able to get logcat or adb access at boot, no matter what property I set, it didn't work. I finally figured out a way to get true logcat right as the boot animation comes up.
First off, you NEED Notepad++ if you don't want garbage clumped up editing.
1. In Android Image Kitchen, depack the Boot image.
2. Then, go to split image and modify boot.img-cmdline and add
Code:
buildvariant=userdebug
.
3. Save that file, then go to the ramdisk folder and edit your default.prop. change these values.
Code:
ro.secure=1 > ro.secure=0
ro.adb.secure=1 > ro.adb.secure=0
ro.debuggable=0 > ro.debuggable=1
4. Save that file, then go to init.rc, and use find to search for adbd to jump to this.
Code:
# adbd is controlled via property triggers in init.<platform>.usb.rc
5. Change the original code from
Code:
service adbd /sbin/adbd --root_seclabel=u:r:su:s0
class core
socket adbd stream 660 system system
disabled
seclabel u:r:adbd:s0
TO:
service adbd /sbin/adbd --root_seclabel=u:r:su:s0
disabled
socket adbd stream 660 system system
seclabel u:r:adbd:s0
6. Change this to new code.
Code:
# adbd on at boot in emulator
on property:ro.kernel.qemu=1
start adbd
TO:
# allows adbd at boot with property trigger below
on property:ro.debuggable=1
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idVendor 04E8
write /sys/class/android_usb/android0/idProduct 6860
write /sys/class/android_usb/android0/functions adb
write /sys/class/android_usb/android0/enable 1
start adbd
7. Rebuild the kernel and install in TWRP or however you install kernels, ADB will be accessible right at boot so nothing is lost during logging. If your kernel doesn't need this, don't bother, but if like me, you couldn't get anything, this will fix your issues.
In some cases, you will still need to push adb_keys to /data/misc/adb/, however.
@malbert16442 Please consider putting this in OP for those who have issues getting logcat at boot.
Click to expand...
Click to collapse
Part 2
Adb is key in any port. Adb is the secret. It gives us the ability to access logs be able to debug issues in our ROM.
1. Download adb drivers
http://forum.xda-developers.com/showthread.php?p=48915118#post48915118
Thanks Member @Snoop05
2. Test adb by using 'adb devices" in cmd
You should see online
3. If offline try using adb kill-server and repeat step 2.
4. When making a loging for these ports we use the phrase adb logcat *:E > filename
this ensures that we filter the logs by errors and remove the long set of lines like thermal updates ...etc
Part 3
In order to port firmware
1. Download Stock firmware extract it with tool
Websites to get stock firmware are
http://updato.com/firmware-archive-select-model
or https://forum.xda-developers.com/galaxy-tab-s/general/tool-samfirm-samsung-firmware-t2988647
2.We will deodex our rom using Fulmics or similar deodexer
Either a kitchen like "http://forum.xda-developers.com/chef-central/android/kitchen-superrs-kitchen-t3202296/page26" or similar.
Thanks @SuperR
https://forum.xda-developers.com/android/software-hacking/tooll-03-12-fulmics-deodexer-1-0-t3512081
Thanks @xpirt
3. Learn how to use APK DECOMPILE TOOLS SUCH AS TICKLEMEANDRIOD
http://forum.xda-developers.com/showthread.php?t=1633333
Thanks @Ticklefish
4. Remove Apps Priv-app and Framework of base. In a new folder use Fulmics to deodex this. Store somewhere safe.
5. Deodex Port and copy the Apps, Framework and Priv-app into the Base of stock rom.
6. In Ticklemeandriod you notice we have 6 work Areas. For our Roms we will only need two. The most common files we will use are services.jar, and framework.jar.
7. Take the services and framework our our Port and decompile in work area 1.
8. Take the services and framework of our Base and decompile in work area 2.
9. We will Perform a quick Step to help if App signatures become corrupt or cannot be read.
Follow this guide by @ikrom
http://forum.xda-developers.com/showpost.php?p=62496153&postcount=2957
10. After this lets move to debugging our apps and frameworks.
Part 4 (Tools and debugging)
My favorite tools to use include WinMerge and FileSeek
1. Winmerge enables us to compare two files. For example a stock jar and one of our port.
2. File seek allows us to search for a specific references.
I use file seek to search for weird terminology I see on my log.
3. Terminology
Part 5 ( Terminology)
1. In a logcat we are looking for three things when debugging. "E JavaBinder:", "E art", "E AndroidRuntime: FATAL EXCEPTION:"
2. The order to debug we search in logcat. When beginning it is not specific but, I usually search for Art errors first.
3. So for example if I get in my logcat
Code:
"01-01 01:26:25.169 5599 7183 E JavaBinder: java.lang.NoSuchMethodError: No virtual method activityPauseTrigger(Landroid/content/Intent;Landroid/content/pm/ActivityInfo;Landroid/content/pm/ApplicationInfo;)V in class Lcom/android/internal/app/ActivityTrigger; or its super classes (declaration of 'com.android.internal.app.ActivityTrigger' appears in /system/framework/framework.jar:classes2.dex)"
I got the location which is framework jar Class2
Code:
activityPauseTrigger(Landroid/content/Intent;Landroid/content/pm/ActivityInfo;Landroid/content/pm/ApplicationInfo;)V is the missing info in the port smalis and
log says it is somewhere in
Code:
Lcom/android/internal/app/ActivityTrigger; or the files with idential names to Activity trigger
4. In this case missing method could be found in stock smali. This is where we use win merge to cleanly copy new method from stock to port.
5. But Mike what if The logcat doesnt tell me location. We will then use fileseek in this instance.
Example: Log tells me
Code:
"01-01 00:24:17.509 7524 7539 E JavaBinder: java.lang.UnsatisfiedLinkError: No implementation found for void com.android.internal.app.ActivityTrigger.native_at_pauseActivity(java.lang.String) (tried Java_com_android_internal_app_ActivityTrigger_native_1at_1pauseActivity and Java_com_android_internal_app_ActivityTrigger_native_1at_1pauseActivity__Ljava_lang_String_2)
"
No implementation means that we must remove this file as it is not found in the libs. What location? We dont know yet ?
Code:
com.android.internal.app.ActivityTrigger.native_at_pauseActivity(java.lang.String
is what we are looking for
According to fileseek I would look for pauseActivity because it is a keyword
According to file seek I may get 100 references but I see one that says
Code:
.method ActivityTrigger.native_at_pauseActivity
I would then use winmerge to cleanly delete/copy the file from my stock smali to the new one. From the location I found in Fileseek.
6. Let me give a example of a Runtime error.
Code:
"07-25 09:17:08.975 16379 16379 E AndroidRuntime: java.lang.NoSuchMethodError: No interface method setDataFromNSFLP(ILandroid/os/Bundle;)V in class Landroid/location/ILocationManager; or its super classes (declaration of 'android.location.ILocationManager' appears in /system/framework/framework.jar)
So log told us to look in framework for a file with
Code:
setDataFromNSFLP(ILandroid/os/Bundle;)V
Boot up file seek and repeat steps above.
Part 6
So we booted now what.
Lets now work on fixing local errors.
Use logcat to possible fcs and reboots.
All firmware edits are different so this guide will help if you are learning the way android works.
What to look out for
Remember the Base folder we deodexed. We will use this to help fix issues in our rom.
1. Take the McRegistry Folder and ffffffff0000000 File move this to our booted rom.
2. Now in the Ported firmware copy the Fonts folder and the files named font in /etc to our booted rom.
3. Delete these folders - " preloadedmdm ", " sipdb " and " tts from booted rom and replace with that from ported firmware.
4. Open " Media " folder in booted rom
Delete Audio folder
Replace with Ported firmware audio folder.
5. In /etc/permission add the missing software permissions not hardware like slocation or camera-flash.
6. In build-prop
Replace these values with that of port.
Code:
ro.build.scafe.size=
ro.build.scafe.shot=
ro.build.scafe.cream=
ro.build.scafe.version=
ro.com.google.gmsversion=
ro.build.version.sdl=
ro.config.ringtone=
ro.config.notification_sound=
ro.config.alarm_alert=
ro.config.media_sound=
ro.config.ringtone_2=
ro.config.notification_sound_2=
7. Add this code to build-prop
Code:
wlan.wfd.hdcp=disable
Let's Fix Messages and Phone FCS on first boot
1. From ported from take the libselinux.so to fix message fcs
2. To fix Phone fcs take the mapconprovider.xml from port
64 bit firmware to 32bit
1. Replace 64 bit libs with 32 bit alternatives.
2. You could find 32 bit libs in 32 bit firmware.
32bit all that could be found will be attached here for all users
Fix location problems in Rom
With our services.jar decompiled take these smalis from base and use Winmerge to copy to Port jar.
Code:
services.jar\smali\com\android\server\location folder to that of port
also take the
Code:
services.jar\smali\com\android\server\LocationManagerService$xxx
Smalis and move from base to port location.
1. Take NFC.apk and Bluetooth.apk from base and move to new Rom folder.
OR A more complex NFC fix would be to look in PackageManagerService.smali
of services.jar
look for the NFC model of the device you are porting from
1. So use FileSeeker
to search for method with "supportNfc"
2. Replace it with your model number.
Example the NFC number of Note 7 is S3FWRN5
I would replace it with the NFC number of S5 which is NXP_PN547C2
Blur
https://forum.xda-developers.com/showpost.php?p=69547250&postcount=10031
AOD FRAMEWORK FIX
Credits :
@Patrick.H (NX Team)
@karkasss (NX Team)
@Develoid ALT and F4 (AOD touch / Bluelight filter fix)
@asc1977, @DaOldMan (AOD brightness control)
(Please copy & paste when you add our credits)
Download this file extract to services.jar
https://mega.nz/#!KgMxwQDR!g0yy7a6Izk8U8szRsggaZAXLaF4pjSMYAc8p6kOjIs4
Compare the PowerManagerService Smails.
then recompile
OR
thanks @oluwaponmile
follow this guide
https://forum.xda-developers.com/showpost.php?p=69594939&postcount=8139
Lets fix ported Cameras
Code:
[SIZE="3"]GUIDE IS IN PROGRESS[/SIZE]
Debug solution not fix:
This will be a hard thing to accomplish. Also make sure that Camera is recompiled using New signatures.
First lets find the native resolutions of your camera. For this we look in native camera apk.
Find the native resolutions in arrays or strings xml.
Save resolutions found in port apk for later reference. These are the values we are going to replace with stock hexadecimal values.
Use a Decimal to Hexadecimal Converter to find the values for the resolutions in smali.
For example 1080 would be 438 and 1920 would be 780.
For this value we will intrepid the hexadecimal value as 0x438 and 0x780 respectively in andriod.
When we are looking for the resolutions in port apk we grep the values based on the hexadecimal.
So in an example if resolution of port camera is 1920x1080 and stock is 1080x1920, then in smali we might get a value of 0x438, 0x780 in assortment. Simply replace 0x438 with 0x780 and 0x780 with 0x438.
Replace these values in port apk with the stock equivalent. Recompile.
Keep this open in one window.
Now open up camera and take log.
Most likely you would get a error saying missing resolution
KNOX STATUS REVERT (Kernel)
@topjohnwu for reset prop
The reset prop source was removed from topjohnwu thread however you could use the prebuilt binary in his magisk release zips.
1. Pick your device arch and remove binary from zip
2. Now download a tool to extract boot images.
3. Navigate to sbin and drop your resetprop binary.
4. Get back to root directory and add this file http://www106.zippyshare.com/v/AzldZO7A/file.html
5. Now in init.rc add this code
Code:
# Call Knox Reset
service knox-daemon /system/bin/sh /init.knox.sh
class main
user root
oneshot
Device Specific Section
(Section will detail device specific edits for particular devices once users post.)
mitko7411 said:
So I haven't really made a new list of smalis for porting roms, but here's the ones just to boot ANY 6.0.1 firmware on J5 2015.
Debug
GpsLocationProvider
KnoxVpnPacProcessor
TADriver
SchedPolicyManager
Click to expand...
Click to collapse
No Pm type message below.
Also I will post below all the logs I used to boot Note 7 firmware on my s5
All the edits used to boot Note 7 firmware on S5 it is different for every device.
https://mega.nz/#!8ZtzWCJR!rqTrvD5K3pUvHOAMq_540L_z7Hx0LFZawSzpobFDF98
Thanks for this guide..
A nice guide. Thanks! :highfive:
Ticklefish said:
A nice guide. Thanks! :highfive:
Click to expand...
Click to collapse
Thanks
Sent from my SM-A810S using Tapatalk
Great Extremely helpful, time for noobs to port now
Thanks mate you finally did it big help
Thanks manYou helped me.
Well ,,
Malbert , im sure 100% , too much things missed in ur guide mate , this way how u do it isn't an how to ported rom from different devices , or high end to previous years device's , sorry to say this but this isn't a full guide & its just a point for drop app/prev/fram to ur stock base then try to booted then with bootloop logcat u will got what's the missing things well ,
Sorry to say it but this isn't a Full guide for HOW TO PORT Roms , ....
Edit ::
Next time try to be more specific & gives more details & which files / jars / smali / apks / libs / xml / config & which we can use & got from ported base to stock base ,
thereassaad said:
Well ,,
Malbert , im sure 100% , too much things missed in ur guide mate , this way how u do it isn't an how to ported rom from different devices , or high end to previous years device's , sorry to say this but this isn't a full guide & its just a point for drop app/prev/fram to ur stock base then try to booted then with bootloop logcat u will got what's the missing things well ,
Sorry to say it but this isn't a Full guide for HOW TO PORT Roms , ....
Edit ::
Next time try to be more specific & gives more details & which files / jars / smali / apks / libs / xml / config & which we can use & got from ported base to stock base ,
Click to expand...
Click to collapse
Thanks assaad will fix when I get time I get what you are saying but this is a intro. I can't explicitly state which jars apks or libs are needed because they are all different for different devices. XML and permissions I could elaborate on but you can't expect me to possibly give a overview of everything right. Hope you understand thanks. I never explicitly stated this was a full guide and you shouldn't treat it as such.
Sent from my SM-A810S using Tapatalk
Well my friend , i never do ,,
For example without editing systemserver.smali the rom will never booted & u know this very well , i just means to be very static for some useful tips for such framework / & well known smali that need to be our eyes on them .. that's all my point means ..
Good luck my friend
thereassaad said:
Well my friend , i never do ,,
For example without editing systemserver.smali the rom will never booted & u know this very well , i just means to be very static for some useful tips for such framework / & well known smali that need to be our eyes on them .. that's all my point means ..
Good luck my friend
Click to expand...
Click to collapse
Ohh I understand what you are saying. I will expand on this guide when I get time hopefully you also could help support and add to this guide as XDA is a community. ? Over time we could help many users thanks for your advice.
Sent from my SM-A810S using Tapatalk
@malbert16442 Can you help me with my S5 which is G9008V China Mobile variant?
I can't boot on Thunderbolt A8 rom...
What should I Fix?
I have successfully ported s7 and n7 firmware using this guide.
Awesome guide!. 9/10
I have one small issue, in your log n79 you have "E SQLiteDatabase: " How did you fix this error? I am having the same issue, with one of my builds.
Solved:
FileSeek ftw!
jonathanmohamed said:
I have successfully ported s7 and n7 firmware using this guide.
Awesome guide!. 9/10
I have one small issue, in your log n79 you have "E SQLiteDatabase: " How did you fix this error? I am having the same issue, with one of my builds.
Solved:
FileSeek ftw!
Click to expand...
Click to collapse
Thanks happy for you. How would you rate your level of expertise so I could set a difficulty level for this
Sent from my Pixel XL using Tapatalk
Learned new debug problems in Sammy Roms updating guide soon, making it more appealing too. Happy that one person actually made a port from this guide.
thnx alot @malbert16442 .... but i have 2 bugs i didnt manage to fix
1-wifi work and i can see available network but when i try to connect i get 'failed to connect' .. I tried to use my stock wifi-service.jar but the device not boot)
2-Camera work (back and front) and i can take photos...but when i try to record video i get 'Recording faield' fixed
Allooosh98 said:
thnx alot @malbert16442 ...using this guide i ported S7e, G532F to j7.....but i have 2 bugs i didnt manage to fix
1-wifi work and i can see available network but when i try to connect i get 'failed to connect' .. I tried to use my stock wifi-service.jar but the device not boot)
2-Camera work (back and front) and i can take photos...but when i try to record video i get 'Recording faield' fixed
Click to expand...
Click to collapse
When you add wifi serivce jar you have edits to make in framework you will see in your log
But don't work I have a fix for stock files too. I work on this guide this weekend make it look better
Okay so alot of people are pming me about fixing camera will post solution or debug solutions here soon
hey @malbert16442 bro can u help me to fix the problem?? there is a E art error in logcat that i cant fix it :
E art : No implementation found for int android.os.storage.sensitive.SecureStorageLSM.lsmInitialize() (tried Java_android_os_storage_sensitive_SecureStorageLSM_lsmInitialize and Java_android_os_storage_sensitive_SecureStorageLSM_lsmInitialize__)
i checked smali files but its as same as stock,i attached the log,if its ok look at it and tell me what should i do

[APK,IMG,DAT,BR] One click decompile/compile - Windows Shell Integration

This tool is a part of ADK software, thread can be found here (For summary read Introduction part below). Read Instructions at the end on how to install this.
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"
}
Snapshot
Click to expand...
Click to collapse
Introduction
This Utility adds option to right click decompile, compile options for some extensions (like apk, img, dat, br, file_context.bin, payload.bin) so that you don't have to open any kind of kitchen again and again move files there and select options to unpack. See screenshots above you will get an idea about what is it..
Also it's not a separate tool it is a part of ADK. Read Installation and download instructions from below and check 2nd post for usage instructions.
And yes the main part since ADK kitchen is not completely free it works for only 7 days as a trial after that you will have to use demo version which has certain feature disabled. Not to worry this utility will work fine but there will be a pop-up notifying to buy license.
What is ADK?
Well if I've to say, ADK (Android Development Kit) is a complete Windows based GUI application which allows you to edit Android apk files, ROM zips, boot or recovery images, Android Firmware and also to create TWRP/CWM flashable recovery zips easily. It's like a complete Android Kitchen with lots of mods, patches, scripts, templates, rich text editor, etc. like an IDE. For more info visit official thread here.
Click to expand...
Click to collapse
Features
Well here you go,,,
Unpack/Repack APK (including smali), IMG, DAT, BR files.
Generate Java Source for APK.
View APK Info like App name, Package, permissions, icon, etc.
Import App as dependency for system apk.
Support Android 9.0 ROM.
Supported lists are: System, Vendor img, dat, br and Recovery or Boot images)
Suggest me what to add more.. :laugh:
Click to expand...
Click to collapse
Changelog and Known Issues
Changelog as per release 1.1.0.0 (17th January 2019)
*Added: Option to unpack Payload.bin
*Added: Option to convert file_contexts.bin to file_context
*Added: Support for Android 9.0 images.
*Updated: APK decompiling so as to create project for ADK.
Known Bugs
* Unpack option is not showing for .IMG file (on Win8.1 and lower).
Current Fix:- Open CMD and type "contexts d path-to-img" (without quotes).
Click to expand...
Click to collapse
Downloads & Instructions
To use these feature you must have ADK to be installed. So read steps below (noob friendly) in order to get it. If you want to know what is ADK read Introduction Part above.
Step 1: Install ADK
Grab a latest release of the software from above link.
Step 2: Extract the ZIP and install setup.exe as we normally do.
Do not install the software in C:\Program Files or Program Files (x86) folder.
Step 3: Launch ADK from desktop shortcut and go to Help > Plugins & Patches.
Keep your internet connection ON to do this steps.
Step 4: Search for ADK Context [Script] and install it.
First click on Download option then after click on Install it. Installation will be like normal setup file.
Step 5: Once installed you can close ADK and use the plugin.
Click to expand...
Click to collapse
Reserved
Nice tool keep up the good work!
Sent from my Redmi 4X using Tapatalk
can we then recompile say a vendor img after using this tool to unpack?
Xdevillived666 said:
can we then recompile say a vendor img after using this tool to unpack?
Click to expand...
Click to collapse
Yes why not! Just right click on the unpack folder created by the tool and select Encode APK,IMG,DAT,BR option from there
Tool has been updated. To download it open ADK it will notify you which plug-in needs to be updated!
[email protected] said:
Yes why not! Just right click on the unpack folder created by the tool and select Encode APK,IMG,DAT,BR option from there
Click to expand...
Click to collapse
Can't repack vendor either with ADK or shell.
ADK says cant find context for system/apps probabby its cant find selinux perms in file_contexts as its vendors its should not need that
And with Shell method can't say log are not getting create
Please looks and thanks for your work
Luffy.d said:
Can't repack vendor either with ADK or shell.
ADK says cant find context for system/apps probabby its cant find selinux perms in file_contexts as its vendors its should not need that
And with Shell method can't say log are not getting create
Please looks and thanks for your work
Click to expand...
Click to collapse
Vendor needs file_context especially plat_file_context it maybe missing something. I will look into it soon as currently I'm working on new project. So this might take a little while, but for sure I'll fix this.
[email protected] said:
Vendor needs file_context especially plat_file_context it maybe missing something. I will look into it soon as currently I'm working on new project. So this might take a little while, but for sure I'll fix this.
Click to expand...
Click to collapse
Thank you and no hurry
and here the exact error
error: build_directory_structure: cannot lookup security context for /system/app
Wow nice.
This can decompile framework-res.apk ans systemui.apk without errors anf uknown folders? Means java problem?
Good work, thank you.
Wysłane z mojego SM-G930F przy użyciu Tapatalka
Luffy.d said:
Thank you and no hurry
and here the exact error
error: build_directory_structure: cannot lookup security context for /system/app
Click to expand...
Click to collapse
I'll contact you once I will look up in this issue and fix it.
nalas said:
Wow nice.
This can decompile framework-res.apk ans systemui.apk without errors anf uknown folders? Means java problem?
Good work, thank you.
Wysłane z mojego SM-G930F przy użyciu Tapatalka
Click to expand...
Click to collapse
Yes it will unpack framework-res.apk and system ui. Just make sure when you want to decompile these system apps make sure to check the option 'import as dependencies' to not get any decompiling and compiling error further.
For Java problem I still get no response to issue with the latest Java problem. I think we still have to use lower Java version.
Android pie repacked system_ext.img can't boot.
Werewolf 99 said:
Android pie repacked system_ext.img can't boot.
Click to expand...
Click to collapse
Well I need some more info on this issue a logcat or something else. From your info I deduct following things like!
1. Your ROM might but using sparse image not ext if that's the case convert the image and then flash.(since sparse image omits some empty blocks)
2. I need to know the original image size and new compiled image size (if you have not made any changes then how much difference is present in their size).
Also let me know if you are flashing the new image using sp tool (for mtk devices).
futuretricks
thanks for this
Thanks for Your Share
EnerJon said:
Nice tool keep up the good work!
Sent from my Redmi 4X using Tapatalk
Click to expand...
Click to collapse
Thanks
cant use without a license, script download function is locked.. This must be under "paid software"not here.
guap said:
cant use without a license, script download function is locked.. This must be under "paid software"not here.
Click to expand...
Click to collapse
As discussed with the moderator this is part of ADK which is free to use even after trail period https://www.google.com/amp/s/forum....adk-android-reverse-engineering-t3803044/amp/
So if this is not working try original ADK which works after expiry date
I keep trying to download the script but the file is 0 kb and wont install. Any help?
Arden said:
I keep trying to download the script but the file is 0 kb and wont install. Any help?
Click to expand...
Click to collapse
Check your PM

Categories

Resources