Insert folder on Sdcard/Android/Obb - Android Q&A, Help & Troubleshooting

Hi, i'm editing my first custom rom for my device ( http://www.plunk.it/tvbox/pro ). I wnat to build my custom rom and i need to insert some folders in Sdcard/Android/Obb. When i unpack the firmware i have not this folder. I need to insert this when I edit the firmware.
How can i do?

itachar said:
Hi, i'm editing my first custom rom for my device ( http://www.plunk.it/tvbox/pro ). I wnat to build my custom rom and i need to insert some folders in Sdcard/Android/Obb. When i unpack the firmware i have not this folder. I need to insert this when I edit the firmware.
How can i do?
Click to expand...
Click to collapse
Edit your device.mk in the device tree for your phone. Copy the format used in that file with the files you want to copy

Haze028 said:
Edit your device.mk in the device tree for your phone. Copy the format used in that file with the files you want to copy
Click to expand...
Click to collapse
Sorry, where i find device.mk? Sorry but this is my first custom rom. Can you give me more informations?

itachar said:
Sorry, where i find device.mk? Sorry but this is my first custom rom. Can you give me more informations?
Click to expand...
Click to collapse
In the device tree repo for your device. you'll need the vendor kernel and device source for your device in order to build a custom rom.
The device source will contain a device.mk file, this is where you would add files that need to be copied to the device during the build, along with alot of other things.
I put together a guide on how to build here. I know there are alot of guides out there for building roms, and this isn't much different. Though i've tried to make it as noob friendly as possible.

Related

[Q] aspiring developer

So i've compiled my first build from source (NS4G) and have a few questions.
1. after its completed compilation what is the directory/path that i can find the files i need. Ive uploaded a screenshot of the path i think it is however it doesnt contain a system.img file why is that and do i need it?
2.Once i have the correct files how to i place them for use in the emulator?
thank you for any help.

[HELP] Modifying ROM doubts

Good evening,
I've written a module for my smartphone and I need to compose a rom to install on my device...
I followed some tutorials, so now I know how to build an android kernel, obtaining a zImage.
Now, a friend told me that I must make a backup with clockworkmod (done!) and download on my pc, than I can recover the boot.img from there and split them in ramdisk and kernel.
Now I can compile my new kernel and merge it (the obtained zImage?) with the ramdisk to have a new rom to flash on my device... is true?
But I don't know how I can split the boot.img (maybe with dsixda kitchen?) and how to create the new rom. I tryied som weeks ago with a .zip rom and the dsixda kitchen and I split and recomposed a rom, but files contained in the .zip files was different from files that I downloaded by my device...
Someone can explain me the correct way to do this process? Thank you!
Paolo.dev said:
Good evening,
I've written a module for my smartphone and I need to compose a rom to install on my device...
I followed some tutorials, so now I know how to build an android kernel, obtaining a zImage.
Now, a friend told me that I must make a backup with clockworkmod (done!) and download on my pc, than I can recover the boot.img from there and split them in ramdisk and kernel.
Now I can compile my new kernel and merge it (the obtained zImage?) with the ramdisk to have a new rom to flash on my device... is true?
But I don't know how I can split the boot.img (maybe with dsixda kitchen?) and how to create the new rom. I tryied som weeks ago with a .zip rom and the dsixda kitchen and I split and recomposed a rom, but files contained in the .zip files was different from files that I downloaded by my device...
Someone can explain me the correct way to do this process? Thank you!
Click to expand...
Click to collapse
So many u can use
1. http://forum.xda-developers.com/showthread.php?t=1619473
2. http://forum.xda-developers.com/showthread.php?t=2036528
3. http://forum.xda-developers.com/showthread.php?t=1877807
and many more if u search

[GUIDE]How to Port Lollipop and Marshmallow Based ROMs

Some Basic things u need to Know before Porting
The rom which you want to port for your device is named here as PORT
The rom which is already working for your device is called here as BASE
First unpack system.new.dat in both port and base rom
For Ubuntu
Now we need to decompress .dat to ext4 img
Open terminal and
Now enter this command
./sdat2img.py system.transfer.list system.new.dat system.img
By running this command u can see a system.img
decompress ext4 img to output folder
Now we will mount system.img
Enter this command
sudo mount -t ext4 -o loop system.img output/
Now go to output folder and now u can see all folder and apk like a KitKat rom
Now do the same with port rom
Click to expand...
Click to collapse
For windows use System Extractor for unpacking
1. Delete app,font,framework,media and priv-apps in base rom
2. Copy app,font, framework,media and priv-apps from port to base
3. Copy handheld_core_hardware.xml and platform.xml in system/etc/permissions from port to base
4. Copy 00banner in system/etc/init.d from port to base
5. Now open build.prop in both base and port for editing rom version and other things.It is different in different roms. For CM edit
ro.cm.version=
ro.cm.releasetype=
ro.modversion=
ro.cmlegal.url=
ro.cm.display.version=
ro.config.notification_sound=
ro.config.alarm_alert=
ro.config.ringtone=
Note: You have copy the above lines from port to base. Don't forget to add your device name in place of port rom's device name
6. Copy these files in system/lib from port to base I repeat from port to base
libandroid_runtime.so
libandroid_servers.so
libmedia_jni.so
For AOSP based ROMs other library files are also needed for boot up. For example Dirty Unicorn needs
libgui.so
libsurfaceflinger.so
libsurfaceflinger_ddmconnection.so
libwifi-service.so
If you are porting a 64 bit ROM copy these files in system/lib64 too from port to base
7. Unpack boot.img of both base and port rom and open init.environ.rc in ramdisk. Copy and replace all the lines starting from "bootclasspath" from port rom's environ.rc to base rom's environ.rc and repack boot.img . Use Android Image Kitchen for unpacking and repacking boot.img
8.Now we need to compress the base rom
For Ubuntu
Now enter this command
./make_ext4fs -T 0 -S file_contexts -l 1073741824 -a system system_new.img output/
Now u can see ur system_new.img
now we need to compress it back to .dat
Now enter command
./rimg2sdat my_new_system.img
Now u can see system.new.dat
Click to expand...
Click to collapse
For Windows, System Extractor has an option to repack but it causes bootloop for me. Ignore step 8 if it causes bootloop
NOTE: You'll need a different updater script for unpacked system
9. Zip it back and Flash
Downloads
sdat2img.py
make_ext4fs
rimg2sdat
Now Download all these tools and paste it to ur base and port rom directory then follow instructions to port lollipop roms
Click to expand...
Click to collapse
CREDITS
VigneshS007
xpirt
matrixex
How to fix bootloop
Some Roms may not boot even after doing everything correctly. This method should be only used when nothing works
1. Copy all the files in system/lib, and system/lib64 if it's a 64 bit ROM, from port to base except the these files and folders
drm
hw
modules
soundfx
libGLES_trace.so
libGLESv1_CM.so
libGLESv2.so
libGLESv3.so
I repeat you have to leave the above files and folders and copy all the other files in system/lib from port to base.
If it still doesn't boot follow the second method
2. Unpack boot.img of both base and port, enter ramdisk and copy these files from port rom's ramdisk to base rom's ramdisk
seapp_contexts
sepolicy
service_contexts
Repack boot.img and flash it
IMPORTANT: This method should only be used when nothing works and if it boots after copying all the lib files, you will have to figure out which lib files are causing bootloop because port rom libraries will create many bugs.
Reserved
From who smartphones we can ported roms ?
Sparco21 said:
From who smartphones we can ported roms ?
Click to expand...
Click to collapse
https://en.wikipedia.org/wiki/List_of_Qualcomm_Snapdragon_devices
6.2 Snapdragon 410 and 412
Missing in this list:
Ark Benefit
Elephone Trunk
thanks for releasing the guide
Thanks for the tutorial!
Tried porting slim6 from redmi 2 but got stuck on bootanimation forever.What Im I supposed to do with the build.prop?
I already tried
-not touching it
-replacing it
-replacing some things
all ended in just bootanimation :/ I use the nexus 6.0 rom for base
BTW should I replace kernel(zimage) in boot.img(havent done it)?
Whenv i try to repack the system folder to system.new.dat with the Extractor for Windows i always get the following error: "It seems like the extractor not worked with your provided system folder please contact me for help".
I have read that specially the CM roms give this error but i cannoy understand how to fix it even after search the solution.
The rom i was trying to port is a CM12.1 rom. Anyone knows how to solve this?
mustang_ssc said:
Whenv i try to repack the system folder to system.new.dat with the Extractor for Windows i always get the following error: "It seems like the extractor not worked with your provided system folder please contact me for help".
I have read that specially the CM roms give this error but i cannoy understand how to fix it even after search the solution.
The rom i was trying to port is a CM12.1 rom. Anyone knows how to solve this?
Click to expand...
Click to collapse
Do you have python installed ?
mshoaib7 said:
Do you have python installed ?
Click to expand...
Click to collapse
Should i had to install Python in Windows? I didn't know Python exists in windows.
mustang_ssc said:
Should i had to install Python in Windows? I didn't know Python exists in windows.
Click to expand...
Click to collapse
Yes it does exist for windows. And if it still doesn't work ask this in system extractor thread
mshoaib7 said:
Yes it does exist for windows. And if it still doesn't work ask this in system extractor thread
Click to expand...
Click to collapse
I have just tried it but still the same issue.
I saw that the dev of the system extractor tried to explain how to solve the issue but honestly i don't undestand nothing of the process he's talking about, i was completely confused. For example, for some reason he was talking about the updater-script but i don't understand what relation are between what i want to do (repack the system folder) and the updater-script (located in the meta-inf folder).
Not booting, porting same vendor ROM but different model similar specs
Followed your tutorial till the last solution but no luck. I am trying to port my own device ROM but of a different model. I have Qiku Q Terra 808, model CP8692_I02 with 360 OS v21 and was trying to port v109 360 OS of model CP8692. The specs and everything is same however I am still unable to boot. There was a very weird thing happened when I flashed the ported ROM and restored the backed up data before booting. The device booted but it reboots on it's own in less than a min of booting and the cycle goes on. And if don't restore the data it goes in bootloop right away. I get the display on, optimizing apps then reboots and cycle goes on. The 360 OS are known for security and the device has fingerprint scanner. Do you think the stored fingerprint is causing issue in flashing new ROM or incorrect update script is the culprit?? Please advise.
@mshoaib7 Awesome tutorial man...??
CM14 theme engine has not been integrated at present, many functions is still in the invalid state, would you be interested in transplantation AOSP 7.1?
Very good ?A great help ?Moto g 2015
mshoaib7 said:
How to fix bootloop
Some Roms may not boot even after doing everything correctly. This method should be only used when nothing works
1. Copy all the files in system/lib, and system/lib64 if it's a 64 bit ROM, from port to base except the these files and folders
drm
hw
modules
soundfx
libGLES_trace.so
libGLESv1_CM.so
libGLESv2.so
libGLESv3.so
I repeat you have to leave the above files and folders and copy all the other files in system/lib from port to base.
If it still doesn't boot follow the second method
2. Unpack boot.img of both base and port, enter ramdisk and copy these files from port rom's ramdisk to base rom's ramdisk
seapp_contexts
sepolicy
service_contexts
Repack boot.img and flash it
IMPORTANT: This method should only be used when nothing works and if it boots after copying all the lib files, you will have to figure out which lib files are causing bootloop because port rom libraries will create many bugs.
Click to expand...
Click to collapse
shoaib bhai is this guide also for nougat roms?
MR.HACKER5476 said:
shoaib bhai is this guide also for nougat roms?
Click to expand...
Click to collapse
No, only some of the nougat Roms boot with this guide
Some one can port VIVO Y21L ROM & kernel for Lenovo A6000....
VIVO Y21L has same SD410 chipset as Lenovo A6000. @With support of VoLTE and OTG....
It not complete Guide
If you port tw roms,You will not get bootup.
Tried to port J5 rom or grand prime rom?

Can't turn WiFi on after flashing.

Hey,
Today I used a ROM to flash my mobile (Samsung J5 2016 edition, model: J510FN) and I just used the perfect ROM, and it fits perfectly. But when I try to turn on WiFi it goes back swipe to off automatically when I swipe it to on.
I used this rom (version v1.1 because v2 and v3 were gone and bad): https://forum.xda-developers.com/galaxy-j5/development/rom-light-stock-rom-v1-t3467865
Someone knows what to do? I'm a beginner, so please explain it good. I have everything btw like Odin, TWRP, latest SuperSU, etc.
Please help.
Thanks
From your stock rom Copy the folder named Permissions from /system/etc and paste it at the same location in your new downloaded rom.
DONOT delete the existing folder , just replace the files.
Good Luck Cheers
akash14darshan said:
From your stock rom Copy the folder named Permissions from /system/etc and paste it at the same location in your new downloaded rom.
DONOT delete the existing folder , just replace the files.
Good Luck Cheers
Click to expand...
Click to collapse
But its a md5 file (my stock rom), how do I do it then?
Zarlen said:
But its a md5 file (my stock rom), how do I do it then?
Click to expand...
Click to collapse
You mean an img file , right?
If you have twrp or cwm backup of your stock rom , you can extract it from that file(ext4.system.tar.a) , if you dont have a twrp/cwm backup , you can try to flash stock rom from that img file and then copy necessary files into sdcard and then re flash your new rom and paste the existing files.
Good luck/
akash14darshan said:
You mean an img file , right?
If you have twrp or cwm backup of your stock rom , you can extract it from that file(ext4.system.tar.a) , if you dont have a twrp/cwm backup , you can try to flash stock rom from that img file and then copy necessary files into sdcard and then re flash your new rom and paste the existing files.
Good luck/
Click to expand...
Click to collapse
No, its an md5 file. Inside the md5 file (when I open it with winrar) it only shows hidedcache files etc and also boot.img
I need to have go to the patch (system/etc/permissions
Zarlen said:
No, its an md5 file. Inside the md5 file (when I open it with winrar) it only shows hidedcache files etc and also boot.img
I need to have go to the patch (system/etc/permissions
Click to expand...
Click to collapse
Then you might need to flash your stock rom first and then copy the necessary files.
I have an Mediatek device , steps to troubleshoot are same , but I have a zip of my stock rom created to access stock files when ever i need them.
I would advise you to do the same for future troubleshooting..
Good Luck mate
akash14darshan said:
Then you might need to flash your stock rom first and then copy the necessary files.
I have an Mediatek device , steps to troubleshoot are same , but I have a zip of my stock rom created to access stock files when ever i need them.
I would advise you to do the same for future troubleshooting..
Good Luck mate
Click to expand...
Click to collapse
And what are the nessecary files? Only the permissions folder or more?
Zarlen said:
And what are the nessecary files? Only the permissions folder or more?
Click to expand...
Click to collapse
Permission folder worked for me , but i would insist you to copy the entire /system partition as backup once you have flashed the stock rom just in case.
If permission folder doesnt work , then try replacing files starting with wlan from /system/lib/modules from stock to port
Do only when permissions folder doesnt work.

Pixel/XL Issues and Development

@superr
I'm having some trouble with ROM builds for the pixel XL. I made a bone stock ROM. It boots but has Bluetooth share force close. I think it's due to not being able to use sparse for perms. Currently trying with may build. I'm on Linux mint 18.1
toknitup420 said:
@superr
I'm having some trouble with ROM builds for the pixel XL. I made a bone stock ROM. It boots but has Bluetooth share force close. I think it's due to not being able to use sparse for perms. Currently trying with may build. I'm on Linux mint 18.1
Click to expand...
Click to collapse
It could be missing metadata. Are you starting with this fimware? I can unpack it and locate the files with unique permissions. It may help figure out what is missing. Not using sparse dat is not your issue. set_metadata will work once we track down the problem.
SuperR. said:
It could be missing metadata. Which firmware are you starting with? I can unpack it and locate the files with unique permissions. It may help figure out what is missing. Not using sparse dat is not your issue. set_metadata will work once we track down the problem.
Click to expand...
Click to collapse
Do you want a copy of the current project I have in kitchen. I can upload it to my drive. I just used the zip from the may factory image.
Edit
Wow I just realized that was a link lol. I totally misread lol. Yes I'm using that firmware.
toknitup420 said:
Do you want a copy of the current project I have in kitchen. I can upload it to my drive. I just used the zip from the may factory image.
Edit
Wow I just realized that was a link lol. I totally misread lol. Yes I'm using that firmware.
Click to expand...
Click to collapse
You did not misread, i changed it I will check it out when I get a chance. No need to upload your project.
toknitup420 said:
@superr
I'm having some trouble with ROM builds for the pixel XL. I made a bone stock ROM. It boots but has Bluetooth share force close. I think it's due to not being able to use sparse for perms. Currently trying with may build. I'm on Linux mint 18.1
Click to expand...
Click to collapse
Can you try this updater-script to see if it fixes the issue? There are actually 2 attached, with_vendor and no_vendor in case you extracted vendor too. If you replace it in the kitchen, make sure you zip the ROM manually because the kitchen will change it before zipping based on the files you have.
SuperR. said:
Can you try this updater-script to see if it fixes the issue? There are actually 2 attached, with_vendor and no_vendor in case you extracted vendor too. If you replace it in the kitchen, make sure you zip the ROM manually because the kitchen will change it before zipping based on the files you have.
Click to expand...
Click to collapse
so i cant zip manually because i dont have perms for one file in system. heres a pic. ill just add the script into an existing zip i built from kitchen.was
update
so i was able to move the script into the correct location and zip up the file. however when it flashes the updater script is somehow becoming merged with the original instead of just the new script. it still shows the original script text when flashing.
toknitup420 said:
so i cant zip manually because i dont have perms for one file in system. heres a pic. ill just add the script into an existing zip i built from kitchen.was
update
so i was able to move the script into the correct location and zip up the file. however when it flashes the updater script is somehow becoming merged with the original instead of just the new script. it still shows the original script text when flashing.
Click to expand...
Click to collapse
I will build a rom and upload for you to try. Are you building with vendor included or without?
SuperR. said:
I will build a rom and upload for you to try. Are you building with vendor included or without?
Click to expand...
Click to collapse
I built it without. Do you recommend to build it with vendor. Should that file be root like that. The one that's in that pic I sent.
toknitup420 said:
I built it without. Do you recommend to build it with vendor. Should that file be root like that. The one that's in that pic I sent.
Click to expand...
Click to collapse
Here is the marlin n2g47o test rom:
https://www.androidfilehost.com/?fid=817550096634774971
It is up to you about vendor. You must have matching vendor and system or the rom will not boot. If you inform users they must flash the corresponding vendor.img along with the rom you don't need to include it. The test rom does not include vendor so make sure you have the correct vendor flashed.
The root file you refer to is actually a directory symlink and should not be there at all. I have fixed this behavior locally and in this test rom. If all works, I will push the update.
SuperR. said:
Here is the marlin n2g47o test rom:
https://www.androidfilehost.com/?fid=817550096634774971
It is up to you about vendor. You must have matching vendor and system or the rom will not boot. If you inform users they must flash the corresponding vendor.img along with the rom you don't need to include it. The test rom does not include vendor so make sure you have the correct vendor flashed.
The root file you refer to is actually a directory symlink and should not be there at all. I have fixed this behavior locally and in this test rom. If all works, I will push the update.
Click to expand...
Click to collapse
OK I'll try it now. Good looks.
SuperR. said:
Here is the marlin n2g47o test rom:
https://www.androidfilehost.com/?fid=817550096634774971
It is up to you about vendor. You must have matching vendor and system or the rom will not boot. If you inform users they must flash the corresponding vendor.img along with the rom you don't need to include it. The test rom does not include vendor so make sure you have the correct vendor flashed.
The root file you refer to is actually a directory symlink and should not be there at all. I have fixed this behavior locally and in this test rom. If all works, I will push the update.
Click to expand...
Click to collapse
it flashes with no errors but it wont boot past splash screen.
toknitup420 said:
it flashes with no errors but it wont boot past splash screen.
Click to expand...
Click to collapse
Please try marlin n2g47o test rom 2:
https://www.androidfilehost.com/?fid=745425885120737663
SuperR. said:
Please try marlin n2g47o test rom 2:
https://www.androidfilehost.com/?fid=745425885120737663
Click to expand...
Click to collapse
flash went through without error but still boot looping at splash screen.
toknitup420 said:
flash went through without error but still boot looping at splash screen.
Click to expand...
Click to collapse
Moved to a dedicated thread as this issue is only about Pixel.
I will do more thinking on what could be causing it. I was pretty sure the last rom would fix it but clearly I was wrong lol
SuperR. said:
Moved to a dedicated thread as this issue is only about Pixel.
I will do more thinking on what could be causing it. I was pretty sure the last rom would fix it but clearly I was wrong lol
Click to expand...
Click to collapse
Lol good stuff. Keep me posted. I'll test whatever you throw at me.
toknitup420 said:
Lol good stuff. Keep me posted. I'll test whatever you throw at me.
Click to expand...
Click to collapse
Here is a new approach so I don't have to keep uploading full roms. Use the kitchen to extract the last rom I sent into a new project. In your file manager, navigate to your project directory and delete the 00_project_files directory. Extract the attached file into your project directory. Build rom with kitchen. Test rom.
Next time, you won't need to extract the rom zip again, just replace the 00_project_files directory.
edit: forgot to mention, after replacing the 00_project_files directory with the one in the zip, change perm types to something else, then back to set_metadata. Then build your rom
SuperR. said:
Here is a new approach so I don't have to keep uploading full roms. Use the kitchen to extract the last rom I sent into a new project. In your file manager, navigate to your project directory and delete the 00_project_files directory. Extract the attached file into your project directory. Build rom with kitchen. Test rom.
Next time, you won't need to extract the rom zip again, just replace the 00_project_files directory.
edit: forgot to mention, after replacing the 00_project_files directory with the one in the zip, change perm types to something else, then back to set_metadata. Then build your rom
Click to expand...
Click to collapse
flashing seemed to hang at setting perms. but it eventually went through. still looping at splash screen though.
toknitup420 said:
flashing seemed to hang at setting perms. but it eventually went through. still looping at splash screen though.
Click to expand...
Click to collapse
Can you send the original updater script that booted but did not have bluetooth?
SuperR. said:
Can you send the original updater script that booted but did not have bluetooth?
Click to expand...
Click to collapse
https://drive.google.com/file/d/0B4VEhClrJEWpNnJNVUJTRFV4ODQ/view?usp=sharing
https://drive.google.com/file/d/0B4VEhClrJEWpTmlYWC1CQ0s3LVE/view?usp=sharing
thats the binary and the script. i converted script to binary when i was building rom. this rom boots and runs ok other than bluetooth. its not completely stock though. i have my modded framework settings and system ui apks in there. but they are all signed so i dont think they would mess with anything.
toknitup420 said:
https://drive.google.com/file/d/0B4VEhClrJEWpNnJNVUJTRFV4ODQ/view?usp=sharing
https://drive.google.com/file/d/0B4VEhClrJEWpTmlYWC1CQ0s3LVE/view?usp=sharing
thats the binary and the script. i converted script to binary when i was building rom. this rom boots and runs ok other than bluetooth. its not completely stock though. i have my modded framework settings and system ui apks in there. but they are all signed so i dont think they would mess with anything.
Click to expand...
Click to collapse
Did you convert the new one you just tried after swapping 00_project_files to update-binary? If not, try it please. If so, try without please

Categories

Resources