Running a custom P500 ROM in the Emulator - Optimus One, P500, V General

This probably belongs in the developer section, but I don't have permission to post there yet)
This work is very preliminary. It isn't really anything more than a starting point right now. It DOES NOT yet provide a faithful representation of a custom ROM in the emulator.
Current status:
emulator running 2.6.29 kernel with a combination of frankenstein of the emulator and devoid-franco system image.
I've been working to get a custom ROM working in the Android SDK emulator. There are several reasons for this, but in the end, it makes it a lot easier to test out different tweaks to get the ROM working as I'd like (I need some functions provided on the P509 ROM that aren't provided on any custom ROMS, and reinstalling the APKs isn't sufficient). I spent a lot of time looking for a thread about this, but nothing I could find discusses the specifics of working with a P500 based device
Things I've learned:
a) you need a kernel specifically compiled for the emulator, and the ramdisk image needs to be built to work with an emulator. For the moment i am using the SDK kernel (2.6.29) and ramdisk image to get going
b) the p509 libraries aren't compatible with the emulator, I needed to copy the libraries from the supplied emulator image
Here are some notes I took. I'll try to flush this out more as I make further progress:
Tools you will need:
Android SDK and 2.2 platform files (android-8)
unyaffs
mkfs.yaffs2.x86
a copy of the ROM image to install (devoid.franco.v5 in my case)
before beginning you should build a stock 2.2 emulator env to ensure everything is working (from sdk/tools run):
android list targets
find the id for 2.2 (was '4' for me)
android create avd -n test-froyo -t 4
(I used all defaults, except I set the RAM to 512MB and screen to HVGA)
emulator -avd test-froyo -show-kernel
(this should eventually bring up a running froyo)
you'll need to know where the avd lives. In linux, it should be in ~/.android/avd/test-froyo
I'm working on linux, but this should work in Windows if you can find a compiled version of mkfs.yaffs2 for windows (I've seen a compiled unyaffs version out there)
1) unzip the rom image. it should create a system/ directory.
We should execute the updater-script here, but we'll take a short-cut:
chmod -R 655 system/
2) uncompress the platfrom system image:
in a new dir:
unyaffs <sdk path>/platforms/android-8/images/system.img
3) copy all files from system/ in step-2 to system/ in step-1
we should really need to do this, it is probably sufficient to run the updater-script and then copy the framework/, lib/ and a couple qemu files, but this is just to get things going.
4) make dbus.conf readable:
chmod 644 system/etc/dbus.conf
5) remove system/app/LGSetupWizard.apk
This app relies on custom classes in the firmware that aren't present in the emulator base system. I'm still trying to build a custom firmware.jar that has both.
6) build a new system.img
mkfs.yaffs2.x86 system system.img
7) copy the system image to your avd dir:
cp system.img ~/.android/avd/test-froyo
If everything has gone well, you can now startup the emulator and boot into franco's rom:
emulator -avd test-froyo -show-kernel
Because we copied too much stuff from the default system.img, we've lost his themes and mst of his tweaks, so it isn't really a faithful representation of the ROM at all, but we've cleared the 1st milestone of being able to boot up.
I also booted a stock P509 kernel this way with a few changes:
a) I used nandroid to get the system image, and then unyaffs2 to extract it)
b) I removed all odex files:
find system -name "*.odex" | xargs rm
Again, this isn't really a custom ROM, it is actually the emulator rom with additional apps and customizations. The goal is to get to as close as possible to running a true custom ROM

A few other notes:
the following framework files can be preserved from the custom ROM (no need to overwrite):
Code:
am.jari : ok
android.policy.jar : not ok
android.test.runner.jar : ok
bmgr.jar : ok
core.jar : ok
ext.jar : ok
framework.jar : not ok
framework-res.apk : not ok
framework-tests.jar : ok
ime.jar : ok
input.jar : ok
javax.obex.jar : ok
monkey.jar : ok
pm.jar : ok
services.jar : not ok
svc.jar : ok
framework.jar is the most important of the 'not-ok' ones as far as I can tell, and is missing several classes. I am currently working to build a services.jar that is a merge of the P500 and emulator classes.
Installing the p500 framework,.jar requires many files from system/lib, but once all dependencies are solved, you eventually end up with a segfault. I've been unable to debug that, and am not sure I want to. The goal is to get a running dalvik VM with all classes needed to run P500 apps.

First blood!!!

Related

[HOW-TO][TUTORIAL][WIP]DEODEX, BUILD KERNEL, BUILD CUSTOM ROM and MORE

Hi all,
In this thread, I will try to share the knowledge I have on deodexing, making custom ROMs, modifying initramfs, building kernel and much more.
Please check the below posts for each of these tutorials.
Hope this opens doors to many new ROM and Kernel developers.
NOTE: THESE TUTORIALS ARE WRITTEN FOR GT-I9100. WILL NOT WORK ON OTHER DEVICES. I DON'T TAKE ANY RESPONSIBILITY IF YOU MESS UP AND BRICK YOUR DEVICE OR ANYTHING ELSE. USE AT YOUR OWN RISK.
Deodexing Stock Rom
For GINGERBREAD ROMS:
What you need to have:
xUltimate v2.3.3 - you can download it HERE (Thanks and Credits to Xeudoxus for this awesome app)
Rooted kernel with busybox
JDK installed on your Windows system
If adb is not available in your windows PC, in xUltimate folder open "jar" folder. You'll find adb there.
Extract stock app & framework folders and Deodex:
Connect your device to computer.
Start xUltimate (double-click on Main.exe)
Select option 1. (Pull /system/app)
Once option is done, select option 2. (Pull /system/framework)
In the same folder, now you'll see two new folders (origi_app, origi_frame)
Select option 3 in Main menu (Deodex /system/app)
Once its done, select option 4 in Main menu (Deodex /system/framework)
DONE!!
NOTE: If any apk/odex gives issues while deodexing, remove that corresponding apk and odex from origi_app folder and deodex again. (Mostly the apps which can be downloaded from play store might give errors.. ex: Maps, Voice search etc.)
Now you'll see two new folders done_app and done_frame.
Push deodexed app and framework to device:
Connect your device to PC in USB debugging mode.
Copy done_app and done_frame folders to root of sdcard (/sdcard).
Open Windows command prompt and type the below commands.
Code:
[LIST]
[*]adb shell
[*]su
[*]stop
[*]mount -o remount,rw /dev/block/mmcblk0p9 /system
[*]rm /system/app/*.odex
[*]rm /system/framework/*.odex
[*]busybox cp /sdcard/done_app/* /system/app/
[*]busybox cp /sdcard/done_frame/* /system/framework/
[*]chmod 644 /system/app/*
[*]chmod 644 /system/framework/*
[*]mount -o remount,ro /dev/block/mmcblk0p9 /system
[*]sync
[*]reboot recovery
[/LIST]
In Recovery, Wipe Cache and Wipe Data/Factory reset.
Reboot.
Now you've deodexed app and framework.
For ICS ROMS:
For ICS Roms, the process is quite easy. (Thanks and Credits to jaydvn.)
Download the attached zip file.
Extract it on your windows PC.
Copy your /system/app to _app folder
Copy your /system/framework to _framework folder.
Run AutoDEOToolMain.bat
Follow the instructions.
deodexed jars and apks will be found in deodexed_APK and deodexed_JAR.
Push deodexed app and framework to device:
Connect your device to PC in USB debugging mode.
Copy deodexed_APK and deodexed_JAR folders to root of sdcard (/sdcard).
Open Windows command prompt and type the below commands.
Code:
[LIST]
[*]adb shell
[*]su
[*]stop
[*]mount -o remount,rw /dev/block/mmcblk0p9 /system
[*]rm /system/app/*.odex
[*]rm /system/framework/*.odex
[*]busybox cp /sdcard/deodexed_APK/* /system/app/
[*]busybox cp /sdcard/deodexed_JAR/* /system/framework/
[*]chmod 644 /system/app/*
[*]chmod 644 /system/framework/*
[*]mount -o remount,ro /dev/block/mmcblk0p9 /system
[*]sync
[*]reboot recovery
[/LIST]
In Recovery, Wipe Cache and Wipe Data/Factory reset.
Reboot.
Done.
Enjoy.
Building kernel
Okay. Let's learn how to build kernel for GT-I9100. There are many ways to build. I am just presenting here the way I build and make kernel.
NOTE 1: Follow the instructions exactly.
NOTE 2: Kernel is opensource. If you make any changes to it, you're expected to share your source. (Usually people share it over github )
NOTE 3: FLASHING KERNEL IS RISKY AND DANGEROUS. BE CAREFUL. BUILD AND FLASH ON YOUR OWN RISK.
What you need to have:
Ubuntu 10.04 and above (I use 10.04 )
ARM tool chain (Download HERE. Click on IA32 GNU/Linux TAR under Advanced Packages)
Samsung's opensource kernel for GT-I9100 (Download HERE. Go to Mobile->Mobile Phone-> Select I9100 (update 3 for Gingerbread and update 4 for ICS) and download the zip)
Setting up toolchain:
Extract the tar you downloaded(Suggestion: Extract to one folder where you can have everything. In my case /home/superatmos/build_kernel).
After extracting, you'll see a folder named arm-2010q1. Inside there will be many folders (ex. bin, lib and so on.)
Folder structure will be: /home/<your_name>/build_kernel/arm-2010q1
Setting up kernel:
Extract the zip you've downloaded from samsung's opensource.
You'll find two zips.
Extract GT-I9100_Kernel.tar.gz to /home/<your_name>/build_kernel/
Folder structure: /home/<your_name>/build_kernel/GT-I9100_Kernel
Setting up initramfs:
Samsung's zImage is divided into two parts: Opensource kernel (which you downloaded from samsung's website) and initramfs (which is root file system to boot up the device).
You can extract initramfs from your zImage using the below mentioned links (Credits and Thanks to Chenglu) Original Thread: HERE
To extract initramfs from Gingerbread zImage: HERE
To extract initramfs from ICS zImage: HERE
Folder structure: /home/<your_name>/build_kernel/initramfs
Now the entire setup is ready. Let's start modifying kernel configuration.
Setting up kernel config:
For Gingerbread:
Go to /home/<your_name>/build_kernel/GT-I9100_Kernel/arch/arm/configs folder.
Copy c1_rev02_defconfig file and paste it in kernel root folder (/home/<your_name>/build_kernel/GT-I9100_Kernel/).
Rename c1_rev02_defconfig to .config in kernel root folder.
Now open Makefile which is in your kernel root folder(/home/<your_name>/build_kernel/GT-I9100_Kernel/).
Modify the below lines (I guess line 195 and 196).
For ICS:
Go to /home/<your_name>/build_kernel/GT-I9100_Kernel/arch/arm/configs folder.
Copy u1_defconfig file and paste it in kernel root folder (/home/<your_name>/build_kernel/GT-I9100_Kernel/).
Rename u1_defconfig to .config in kernel root folder.
Now open Makefile which is in your kernel root folder(/home/<your_name>/build_kernel/GT-I9100_Kernel/).
Modify the below lines (I guess line 195 and 196).
Code:
ARCH ?= arm
CROSS_COMPILE ?= /home/<your_name>/build_kernel/arm-2010q1/bin/arm-none-linux-gnueabi-
Save and close.
Modifying kernel configuration:
Now open .config file(which you renamed). If its not seen, it might be hidden. Go to View->Show hidden files and there you go.
Do the below things:
Adding local version:
Change CONFIG_LOCALVERSION=" " to anything you like. I add this way:
CONFIG_LOCALVERSION="-I9100-superatmos"
Adding initramfs path:
You need to let kernel know the path from which it needs to take initramfs.
Change CONFIG_INITRAMFS_SOURCE=" " to ../initramfs (In this tutorial it's the path. If you had copied anywhere else, give the path properly).
Enough for now. Once you get experience, you can modify many configurations as per your liking and save. This configuration can be changed by GUI too with the command make menuconfig.
The Important part: Building the kernel:
For Gingerbread:
Open terminal.
Go to path /home/<your_name>/build_kernel/GT-I9100_Kernel/
Type make.
For ICS:
Open terminal.
Go to path /home/<your_name>/build_kernel/GT-I9100_Kernel/
Type export USE_SEC_FIPS_MODE=true
Type make.
THAT'S ALL. YOUR zImage is ready and is available in /home/<your_name>/build_kernel/GT-I9100_Kernel/arch/arm/boot/zImage.
Install the zImage on the device:
Go to the path where zImage is present and type the below line in command line.
Code:
tar cvf I9100_kernel.tar zImage
Flash the tar using odin.
DONE. CONGRATULATIONS. NOW YOU'VE YOUR OWN KERNEL.
Give me your feedback so that I can improve this tutorial. And post here about how your build went. All the best.
Making custom ROM
Let's move on to make a custom ROM.
Inputs/Feedback/Suggestions are more than welcome. Lets improve this tutorial together for the betterment of the android community.
Steps involved in making a custom ROM:
Getting the system dump from the device.
Deodexing app and framework folders.
Creating various mods by modifying framework and system files.
Modifying build.prop and adding tweaks.
Making META-INF folder and writing an updater-script (edify scripting).
Signing the ROM and making a flashable zip.
Folder Structure:
Before going forward, let's follow the below structure folder to make the tutorial more understandable.
Let our ROM name be CustomROM. The folder structure will be C:\Users\<your name>\CustomROM.
Let's move step by step. Are you ready??
Getting the system dump from the device
Click to expand...
Click to collapse
Make sure USB debugging is ON and connect your device to the PC.
Open command prompt on your windows PC and go to CustomROM folder path.
Type adb devices. You should be able to see the device detected. (If not check environmental variables whether adb is in system path or not. If not present, add the adb path.)
Type the below command to get the dump of system folder.
Code:
adb pull /system system/
Now inside the folder CustomROM, you should be able to see system folder with many folders like app, etc, framework etc inside.
Done with first step.
Deodexing app and framework folders
Click to expand...
Click to collapse
Look HERE how to deodex app and framework folders. Copy the app and framework folders to xUltimate folder, rename them to origi_app and origi_frame and follow the given link to deodex.
NOTE: After deodexing, merge origi_app folder with app folder under C:\Users\<your name>\CustomROM\system\app and origi_frame with framework folder under C:\Users\<your name>\CustomROM\system\framework.
Creating various mods by modifying framework and system files
Click to expand...
Click to collapse
Okay. This the section where your hardwork, innovation and talent comes in. You can use the mods available already, create your own mods, port various mods from other devices and so on.
Below is a list of various mods which can be ported on to GT-I9100. All the credits go these respective thread owners. Thanks to them.
Lidroid 14 toggle mod
Extended power menu with/without header
CRT Off Animation & SIP Over LTE/HSPA
Swipe to remove notifications
NOTE: Let me know more mods with links so that I can add here.
Modifying build.prop and adding tweaks
Click to expand...
Click to collapse
Okay. This is one of those files where you name your ROM(to be visible in settings. ) and add many tweaks.
To name your ROM (to be visible in settings), change the below code.
Code:
ro.build.display.id=CustomROM v1.0
Check the below links for many other tweaks. All credits go to respective thread owners. Thanks to them.
build.prop tweaks by TheFrankenstain
build.prop tweaks by dhlalit11
Making META-INF folder and writing an updater-script (edify scripting)
Click to expand...
Click to collapse
Once you're done with all the modifications, mods and additions, its time to create META-INF folder and make the updater script. Once the user flashes the ROM zip, this is the script that runs and does everything written inside the script. PLEASE BE CAREFUL WITH THIS. TAKE REFERENCE FROM OTHER (SAME DEVICE) ROMS' UPDATER-SCRIPT. (In this case, take reference from other GT-I9100 roms.)
Check the below links for tutorial and how-to on writing edify script and making updater script. All credits go to respective owners of the threads. Thanks to them.
Edify Scripting, Making Flashable ZIPs, ZIP Signing & Key Creation
Edify Scripting Notes
How to Write an Updater-Script with Edify Code
Edify Installation Script Syntax's
NOTE: system folders path, boot/kernel partition path, modem partition path and so on are COMPLETELY DIFFERENT for DIFFERENT DEVICES. Check the partitions for your device properly, carefully and then work on updater-script. TAKE HELP OR REFERENCE FROM OTHER ROM DEVELOPERS FOR YOUR DEVICE.
Lets move on to last step. Making a signing and making a flashable zip.
Signing the ROM and making a flashable zip
Click to expand...
Click to collapse
Make sure, now you should be able to find two folders (META-INF and system) inside C:\Users\<your name>\CustomROM.
Check in THIS thread for test signing your ROM. It WORKS with GT-I9100.
or Check THIS thread to create your own signing key and certificate.
Now you're done with making a custom ROM. Hope to see more custom ROMs from many users.
Give me your feedback so that I can improve this tutorial. And post here about how your custom ROM making went. All the best.
last one
i don't see any tutorials just links to a diff thread and a rom that won't work on i9100
buster041284 said:
i don't see any tutorials just links to a diff thread and a rom that won't work on i9100
Click to expand...
Click to collapse
You're quite fast Updated Deodexing and Building kernel section..
Great thread Superatmos. I'll definately have a go at this.
Quick question ? Am i right in assuming that although your tutorial says to connect your device this line from xUltimate seperceeds that ?
"Alright xUltimate has been updated to v2 What this means is that you do not need your phone connect to your computer to deodex. So you can just manually place the .odex files in (\origi_frame\) and (\origi_app\) and it will deodex. You can also transfer the .odex files from your phone like the last version."
where do I get the zImage to extract the initramfs from? I can't seem to find the zImage on my phone or in the source anywhere.
Great
Very useful.. Added to my favorite.
Thank's man, i'll read that
puccini said:
Great thread Superatmos. I'll definately have a go at this.
Quick question ? Am i right in assuming that although your tutorial says to connect your device this line from xUltimate seperceeds that ?
"Alright xUltimate has been updated to v2 What this means is that you do not need your phone connect to your computer to deodex. So you can just manually place the .odex files in (\origi_frame\) and (\origi_app\) and it will deodex. You can also transfer the .odex files from your phone like the last version."
Click to expand...
Click to collapse
Connect your device to the PC and double click Main.exe inside xUltimate folder. Follow the instructions you see from then. Its quite self explanatory.
If you already have origi_app and origi_frame folders, then just double click on Main Skip.bat.
dmp450 said:
where do I get the zImage to extract the initramfs from? I can't seem to find the zImage on my phone or in the source anywhere.
Click to expand...
Click to collapse
Use ktool (available on market.. compatible with I9100) and click on Dump current kernel. You'll find it on sdcard.
One more way is when you download firmware from sammobile.com, just extract the file and you'll find zImage inside it.
Nice thread,
I m waiting from long time.
Thanks for your work.
Sent from my GT-I9100 using XDA
Making custom ROM section updated
Hi all,
Please find updated custom rom section HERE.
Feedback and suggestions welcome.
Thanks for the kernel part, will come in handy
Enviado desde mi GT-I9100 usando Tapatalk 2
Good tutorial, thanks.
How do you guys sign the rom if you are on Linux (ubuntu for me)
hi superatmos
thanks for this handy thread...may i ask your for a help here?why in my every deodexing always gives error result?
I attach the screenshots.
Many thanks in advance
tks mate will try to pack my own kernel following this method
Sent from my GT-I9100 using Tapatalk 2

[GUIDE] [LINUX/UBUNTU] Extract/Modify/Rebuild Lollipop ROMs !

Extracting:
1. Download this package: https://tusfiles.net/oaiw9ze20tbl
2. Extract to a folder and chmod 777 -r /path/to/the/folder
3. cd (change directory) to that folder
4. Run prereq.sh
5. Place system.transfer.list and system.new.dat into the folder
6. Open extractor.sh using a text edit program
7. Find the line containing chown command, replace yash:yash with yourusername:yourusername
8. Run extractor.sh
9. Modify contents found in output folder​
Rebuilding:
1. Do above first and then run compress.sh
2. Find the rebuilt system.new.dat and system.transfer.list in sdat folder​
Making it into a ROM:
1. Do above first
2. Find a zip ROM for OnePlus 2 that contains system.transfer.list and system.new.dat
3. Replace it with your rebuilt ones from above mentioned steps
4. Voila! ROM ready!​
NOTE:
The package contains OxygenOS SELinux file contexts in progs subfolder...
So, to modify CM ROMs you need to get file_contexts file from the zip of the ROM and replace the one found in progs subfolder
Credits:
@xpirt
Please mention​
Two questions; Is this a rom kitchen like tool for OxygenOS? Are there any libs or binaries or other dependencies?
I'm a bit busy, but I'll take it for a spin when I can.
Oh one last thing, is there a repo for this?
Ta,
ALQI
Sent from me mobile.
Nice guide
alquimista said:
Two questions; Is this a rom kitchen like tool for OxygenOS? Are there any libs or binaries or other dependencies?
I'm a bit busy, but I'll take it for a spin when I can.
Oh one last thing, is there a repo for this?
Ta,
ALQI
Sent from me mobile.
Click to expand...
Click to collapse
The dsixda kitchen had much more functions then this but you may cknsidet it as a temporary lollipop kitchen with not much extra functionality..
This was like a automation script for me and was a quick one so repo wasn't needed
I have used this script on Ubuntu 64bit and the only extra dependency apart from those included in package are installed by prereq.sh
Btw this is not just for oxygen os it can also be used for any cm or cm based rom here but.do read the note then
Yash98 said:
Extracting:
1. Download this package: https://tusfiles.net/oaiw9ze20tbl
2. Extract to a folder and chmod 777 -r /path/to/the/folder
3. cd (change directory) to that folder
4. Run prereq.sh
5. Place system.transfer.list and system.new.dat into the folder
6. Open extractor.sh using a text edit program
7. Find the line containing chown command, replace yash:yash with yourusername:yourusername
8. Run extractor.sh
9. Modify contents found in output folder​
Rebuilding:
1. Do above first and then run compress.sh
2. Find the rebuilt system.new.dat and system.transfer.list in sdat folder​
Making it into a ROM:
1. Do above first
2. Find a zip ROM for OnePlus 2 that contains system.transfer.list and system.new.dat
3. Replace it with your rebuilt ones from above mentioned steps
4. Voila! ROM ready!​
Click to expand...
Click to collapse
So does this allow you to make ROM's for the OP2 from ROM's based on other devices, or what? Sorry if I'm sort of a noob, I just don't understand what is being done.
Thanks!
Me1256 said:
So does this allow you to make ROM's for the OP2 from ROM's based on other devices, or what? Sorry if I'm sort of a noob, I just don't understand what is being done.
Thanks!
Click to expand...
Click to collapse
You can make ROMs from prebuilt ROMs like OxygenOS or any other built ROM like Exodus, CM12, etc.
Basically modify ROMs without rebuilding from source (which takes a lot of time!)
Sir I downloaded your tool and followed ur guide....But after I run extract.sh there is no files/folders in output folder.Plz reply thankz in advancw
Thank you. I really wanted to extract .dat file..
Sent from my ONE A2003 using Tapatalk
This is a great tool but I wanted to know how to edit the system folder in ubuntu. Like using chmod and chown to pre-root and uninstall some other apps. Can somebody please direct me in that direction.
I go test...

Remix OS Hacked Graphics Upgrade!

Hello once again my name is Cat Stevens and I have done it again you should check out my previous posts. But let's stick with the task at hand. I have been trying to upgrade the graphics for a while now and thanks to Android Kitchen I have been able to unpack and repack ramdisks and initrd.images as well. First you need libGLESv3.so you need to unpack system image of Android x86_64 7.1 with Remix Tools and you will find it in the lib64 folder. Then you need to get Android Kitchen and cygwin for Windows 32 bit is OK. Then copy the contents of the android win tools folder and paste them into the cygwin bin folder. Read the commands when you download the Android Image Kitchen. Unpack the ramdisk.img and you have access to the root of RemixOS. In notepad open init.x86.rc and go to line 11 and will see # export EGL_DRIVERS egl_dri2. Then add to the end of the line drm libGL /system/Lib/egl/libGLES_mesa.so /system/egl/libGLESv3.so eglIs&Lt:Resource&gt:Linked EGL_RENDER_BUFFER EGLDisplay . It's a long line and remember the path in the line because that is where you will need to install your libs. Then alter what ever else you want to the default.prop and repack your ramdisk. When you repack your left with a cpio.gz file you need to use mv command. This is the command mv ramdisk.cpio.gz ramdisk.img. Then you are done. Take care my friends if someone has a ADB binary for 6.0.1 let me know I want to get the VNC going.
Well somebody shut down my ramdisk hack it doesn't work anymore. Next I would like to thank the folks at Bliss ROMS for their hard work Electric Juses creative name. This is a MOD for RemixOS Hacked. I recommend installing Mount Image File and EXT4 driver for Windows. It gives you true ROOT! First download and extract Bliss ROMS x86_64 iso then mount your system image. Copy media_codecs and ffmpeg xmls. You will find them in the etc folder and paste them to your etc folder in Remix OS. Then go back to Bliss and open the vendor folder and copy bin, lib and lib64 folders and paste them to your usr folder in Remix. Then to tie it all together open notepad++ and create a text file you will save as userinit.txt. Then rename it to userinit no extension. This is the script.
#!/system/bin/sh
/system/usr/bin/rtk_attach
Their is the script now paste it to etc/init.d folder in Remix OS system image. Then go to the build.prop file and change persist.sys.disp_density=240 then change ro.sf.lcd_density=240. Unmount the image and boot Remix OS it will take a little bit longer than usual to boot but you will notice the difference with the display and audio. KILLZ! I recommend you should check out SET TV it's a APK file and for$20.00 US a month you get 500 channels and here is the kicker you can install it on three devices anyways I figured it out thanks again to Bliss ROMS and this will truly make your Android x86 system image The Green Machine!

How to edit android emlator kernel and ramdisk?

Hi
I need help with modifying android emulator kernel and ramdisk, or far better a custom rom for the emulator, I wanna know ho can I edit emulators kernels and ramdisks? like nox, memu or etc
As I wanted to do that, I decompressed my emulator's system.vmdk with 7zip, there was 2 img files and a non extension file :
Code:
0.img
1.img
2
I've extracted both img files, but the non extension file name "2" coudnl't be extracted and NotePad++ can't read it and I don't know what's that yet
the first img ( 0.img ) include 3 files without extension :
Code:
cmdline
kernel
ramdisk
that's what I got from cmdline file with NotePad++ :
Code:
root=/dev/ram0 init=/init androidboot.hardware=android_x86 quiet console=tty0 console=ttyS0 androidboot.console=tty0 ignore_loglevel cpuidle.off=1 oprofile.timer=1 oprofile.cpu_type=timer
but of course NotePad++ was unable to open kernel and ramdisk, is it any way to modify them?
and I've got these from extracting 1.img ( Headers Error show after extracting with 7zip ) :
Code:
[SYS]
[UNKNOWN]
app
bin
etc
fonts
framework
lib
lost+found
media
priv-app
usr
vendor
xbin
build.prop
I tried these ways but I couldn't succeed yet
1. I tried Oracle VM Virtual Box and VMware Workstation, installed an android os and tried to modify parameters there, but there was no luck and os couldn't start with emulator system.vmdk
2.I used [KITCHEN]Android Kernel Kitchen 0.3.1 to unpack the ramdisk and kernel file I explained above but there was not luck, also the kitchen coudln't extract those two img files, the I used 7zip
I know it's possible, because some one else did it months ago but I have no clue what he did and he don't tell any body what he did
I'm not a developer and yes I'm a noob at what I'm trying to learn and do, and that's why I'm here, so please help me to learn and do this
New question, is there any way to connect emulator to py usb debugging? I wanna use terminal emulator but is say device is offline
nobody helping, and I have a new question. I search a lot but I couldn't find any way, is it possible to flash a custom rom on emulators like nox ? or other emulator, there are tutorials but they use vmware, I want t flash a custom rom on emulators like nox, not virtual box or vmware, if some one knows please give me tut or help
there are threads with creating kernel, rom and etc for mobile, but I wanna do that on emulator, if some one knows, please help

How to Recompile the HP Touchpad Android Kernel

How to Recompile The HP TOUCHPAD Android Kernel for DirtyUnicorns 8.1 and Shumash SKZ DirtyUnicorns 8.1 and Evervol 7.1
This is done on a Linux OS (Ubuntu 18.04 x64). If you are using other OS, then install Linux as a virtual machine.
The process is the same for all Kernel, but I have only done it with the last two version of Android and can verify that it works.
You can get the kernel source code from other version and try to compile it.
You many need to install the following packages on your Linux OS:
sudo apt-get update
sudo apt install python-pip
sudo apt-get install libncurses5-dev libncursesw5-dev
To recompile the Kernel you need to download an arm cross compiler, there are two options, google android or Linaro.
Get the Android arm cross compiler here:
https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8/+archive/26e93f6af47f7bd3a9beb5c102a5f45e19bfa38a.tar.gz
You can also use Linaro:
https://releases.linaro.org/components/toolchain/binaries/4.9-2017.01/armeb-eabi/gcc-linaro-4.9.4-2017.01-x86_64_armeb-eabi.tar.xz
Get the Kernel source for:
DirtyUnicorns:
https://github.com/DirtyUnicorns/android_kernel_htc_msm8960/archive/o8x-caf.zip
Shumash SKZ overclock Kernel for DirtyUnicorns 8.1
https://github.com/shumashv1/android_kernel-3.4_hp_tenderloin/archive/o-8.1.zip
Shumash SKZ overclock Kernel for Evervolv 7.1
https://github.com/shumashv1/android_kernel-3.4_hp_tenderloin/archive/ng-7.1.zip
1. Create a folder on your home directory
Code:
arm-eabi
2. Extract (unzip) the Android cross compiler file arm-eabi-4.8-26e93f6af47f7bd3a9beb5c102a5f45e19bfa38a.tar.gz into the arm-eabi direcory:
You should have the following directory structure
(Your ID will be different than ubuntu) but all the directories needs to have the following structure.
Code:
/home/ubuntu/arm-eabi/share
/home/ubuntu/arm-eabi/libexec
/home/ubuntu/arm-eabi/lib64
/home/ubuntu/arm-eabi/lib32
/home/ubuntu/arm-eabi/lib
/home/ubuntu/arm-eabi/include
/home/ubuntu/arm-eabi/bin
/home/ubuntu/arm-eabi/arm-eabi
3. Extract (unzip) one of the Kernel file that you will like to recompile into your home directory:
4. Rename the extracted folder ( example : android_kernel_tenderloin_DU_msm8960-o8x-caf )
to: kernel
It should have all folders under kernel directory
(Your ID will be different than ubuntu)
Code:
/home/ubuntu/kernel/crypto
/home/ubuntu/kernel/block
/home/ubuntu/kernel/arch
( and many more)
That is all that is need it to recompile, but the folder location and structure is very important for the scripts to work.
The configuration file to make the Kernel for the two versions of the touchpad is located in:
Wifi standard version
/kernel/arch/arm/configs/tenderloin_android_defconfig
4g version
/kernel/arch/arm/configs/tenderloin4g_android_defconfig
5. Open a terminal window in the kernel directory and paste the following commands:
Code:
export CROSS_COMPILE=~/arm-eabi/bin/arm-eabi-
## You can make changes directly to the tenderloin_android_defconfig using a text editor if you know what you are doing or use the on screen menu.
## replace the configuration file for your model at the end.
Code:
./make_defconfig.sh tenderloin_android_defconfig
Now you have the Linux/arm 3.4.113 Kernel Configuration screen to make all your choices.
If the menu does not comes up is due to packages you need to install on your OS for ncurses to work, first mentioned.
There is too much information to go over and explain, you will have to learn as you go, not all settings apply to the device. There are options and modules for many kernels not only just the TP.
When you are done, or feel that you have done anything after looking at the DNA of an Android kernel for the TP then press:
the esc key twice to exit and save the new changes to the configuration file.
6. Ready to make the configuration active to recompile:
Code:
make ARCH=arm tenderloin_android_defconfig
7. Start the recompile process:
Code:
make ARCH=arm -j4 CROSS_COMPILE=~/arm-eabi/bin/arm-eabi- kernel.uImage
Once is finish your new kernel uImage will be at:
kernel/arch/arm/boot/kernel.uImage
8. Copy the kernel.uImage file to your desktop or any other place out of the Kernel folder.
9. This command will reset ad clean all your settings from making the Kernel, so that you can start the process again.
Code:
make mrproper
Now you have a modified kernel and need to combine it with the ramdisk from the same ROM kernel (boot.img) that is in the ROM zip file.
Extract the boot.img from the ROM and follow the steps on how to unpack the boot.img using this link:
Now that you have access to the ramdisk, you can make system read and write and many more options on every file!
With the Kernel settings and Ramdisk you have completely total control, is the DNA settings of the device.
https://forum.xda-developers.com/hp-touchpad/development/make-root-permanet-read-write-to-t3846567
Once unpack rename kernel.uImage to kernel.uImage_original (or delete it)
Copy the new kernel.uImage to the folder and repack.
You now have your own modified kernel and can place it in the boot directory of your tablet.
If it finished booting to Android, all is good! if not start again.
Your HP Touchpad will not get bricked by any modification you will make to the kernel. It can freeze and you can do a hard reset and boot from the original kernel.
Now if you encounter a problem with your ROM, feel is slow or any other issues you know how to fix it yourself and learn how time consuming and fun is to get this working. Be part of the community and at least try to improve on the great work that others have done.
Many thanks to everyone that made all this work possible all credits go to:
Milaq, Jcsullins, Invisiblek, Flintman, Shumash and the many others! the list is longer than all the settings of the kernel!
All that explanation to run the following commands:
Code:
export CROSS_COMPILE=~/arm-eabi/bin/arm-eabi-
./make_defconfig.sh tenderloin_android_defconfig
make ARCH=arm tenderloin_android_defconfig
make ARCH=arm -j4 CROSS_COMPILE=~/arm-eabi/bin/arm-eabi- kernel.uImage
make mrproper

Categories

Resources