Will this java code work? - Samsung Galaxy Nexus

I have a new question, so i guess i'l just change the thread title and put my question here instead of making a new thread.
I'm editing the NetworkController.java file in /frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/ of the Jellybean source synced from Google's android repository.
Will this work?
Code:
case TelephonyManager.NETWORK_TYPE_UMTS:
mDataIconList = TelephonyIcons.DATA_3G[mInetCondition];
mDataTypeIconId = R.drawable.stat_sys_data_connected_3g;
mContentDescriptionDataType = mContext.getString(
R.string.accessibility_data_connection_3g);
break;
case TelephonyManager.NETWORK_TYPE_HSDPA:
case TelephonyManager.NETWORK_TYPE_HSUPA:
case TelephonyManager.NETWORK_TYPE_HSPA:
if (mHspaDataDistinguishable) {
mDataIconList = TelephonyIcons.DATA_H[mInetCondition];
mDataTypeIconId = R.drawable.stat_sys_data_connected_h;
mContentDescriptionDataType = mContext.getString(
R.string.accessibility_data_connection_3_5g);
} else {
mDataIconList = TelephonyIcons.DATA_3G[mInetCondition];
mDataTypeIconId = R.drawable.stat_sys_data_connected_3g;
mContentDescriptionDataType = mContext.getString(
R.string.accessibility_data_connection_3g);
}
break;
case TelephonyManager.NETWORK_TYPE_HSPAP:
mDataIconList = TelephonyIcons.DATA_4G[mInetCondition];
mDataTypeIconId = R.drawable.stat_sys_data_connected_4g;
mContentDescriptionDataType = mContext.getString(
R.string.accessibility_data_connection_4g);
break;
The original is here:
Code:
case TelephonyManager.NETWORK_TYPE_UMTS:
mDataIconList = TelephonyIcons.DATA_3G[mInetCondition];
mDataTypeIconId = R.drawable.stat_sys_data_connected_3g;
mContentDescriptionDataType = mContext.getString(
R.string.accessibility_data_connection_3g);
break;
case TelephonyManager.NETWORK_TYPE_HSDPA:
case TelephonyManager.NETWORK_TYPE_HSUPA:
case TelephonyManager.NETWORK_TYPE_HSPA:
case TelephonyManager.NETWORK_TYPE_HSPAP:
if (mHspaDataDistinguishable) {
mDataIconList = TelephonyIcons.DATA_H[mInetCondition];
mDataTypeIconId = R.drawable.stat_sys_data_connected_h;
mContentDescriptionDataType = mContext.getString(
R.string.accessibility_data_connection_3_5g);
} else {
mDataIconList = TelephonyIcons.DATA_3G[mInetCondition];
mDataTypeIconId = R.drawable.stat_sys_data_connected_3g;
mContentDescriptionDataType = mContext.getString(
R.string.accessibility_data_connection_3g);
}
break;
-----------------------------------------------------------------------------Snip---------------------------------------------------------------------------------------
{
"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"
}
(email blanked, but is a working email)
Kept asking me for my name and email, was trying to access the android source repository.
Not sure what keywords to search for, but i did try "repo identity loop" which net me nothing.
Did tried to Google, but did not see anything that may look like a solution to my problem.
I'm completely new to these kind of things, so i'm not sure what keyword to search for.

Up to the first page.

Anyone?
Pressed from my BANNED unified search enabled Maguro

Anyone?
Pressed from my BANNED unified search enabled Maguro

seems to me you haven't introduced yourself to git.
edit: link

bk201doesntexist said:
seems to me you haven't introduced yourself to git.
edit: link
Click to expand...
Click to collapse
Thanks, will try it out now
Thanks again, worked now

Updated OP with a new question and changed the thread title.

Anyone knows?
Pressed from my BANNED unified search enabled Maguro

Its hard to tell cause I can't see the changed code vs original code. But it doesn't really work that way. Even an expert would miss something like an incorrect variable or any random code error. The only way to do this type of change is compile it. Compile the stock code first, then the changes. When you get no errors or warnings is when you flash the apk to the device to test.
This is how I've done it in the past. And yes GitHub diff would be best way to show this. Also, since you're only dealing with one package you just have to compile that one apk to test which is very simple compared to whole ROM or kernel. Just run the make command on your package with the changed code.

RogerPodacter;2869t204 said:
Its hard to tell cause I can't see the changed code vs original code. But it doesn't really work that way. Even an expert would miss something like an incorrect variable or any random code error. The only way to do this type of change is compile it. Compile the stock code first, then the changes. When you get no errors or warnings is when you flash the apk to the device to test.
This is how I've done it in the past. And yes GitHub diff would "e best way to show this. Also, since you're only dealing with one package you just have to compile that one apk to test which is very simple compared to whole ROM or kernel. Just run the make command on your package with the changed code.
Click to expand...
Click to collapse
Both the edited and original code is there, but i do agree with you on compiling the apk. I'm compiling a SystemUI.apk btw.
I tried compiling yesterday night, but I can't seem to figure out this part:
Code:
cd device/samsung/maguro/
./extract-files.sh

Mach3.2 said:
Both the edited and original code is there, but i do agree with you on compiling the apk. I'm compiling a SystemUI.apk btw.
I tried compiling yesterday night, but I can't seem to figure out this part:
Code:
cd device/samsung/maguro/
./extract-files.sh
Click to expand...
Click to collapse
It's hard to know without the context but IIRC, that's to copy proprietary binaries over to your working directory (I know this is relevant for Cyanogenmod, don't think it works in AOSP as the sh file doesn't exist).

Originally Posted by Mach3.2
Both the edited and original code is there, but i do agree with you on compiling the apk. I'm compiling a SystemUI.apk btw.
I tried compiling yesterday night, but I can't seem to figure out this part:
cd device/samsung/maguro/
./extract-files.sh
Click to expand...
Click to collapse
It's hard to know without the context but IIRC, that's to copy proprietary binaries over to your working directory (I know this is relevant for Cyanogenmod, don't think it works in AOSP as the sh file doesn't exist).
Click to expand...
Click to collapse
Are you talking about hardware binaries? I downloaded the hardware binaries from AOSP and extracted them using terminal already.
Sorry if I sound like I'm trolling but I'm really new to these kind of things and just trying things out.
Pressed from my BANNED unified search enabled Maguro

You shouldn't need to run the extract files.sh script unless your compiling a whole kernel or ROM.
I think literally all you have to do is sync to the repo that you got that code from. And run the make command in the root of the repo file structure.
Of course it looks like you might be setting up your build setup following one of the tutorials. So get that finished. Then instead of running make on a kernel, run it on your telephone package app.

RogerPodacter said:
You shouldn't need to run the extract files.sh script unless your compiling a whole kernel or ROM.
I think literally all you have to do is sync to the repo that you got that code from. And run the make command in the root of the repo file structure.
Of course it looks like you might be setting up your build setup following one of the tutorials. So get that finished. Then instead of running make on a kernel, run it on your telephone package app.
Click to expand...
Click to collapse
I'll Google once I get home, thanks.
Pressed from my BANNED unified search enabled Maguro

Mach3.2 said:
Are you talking about hardware binaries? I downloaded the hardware binaries from AOSP and extracted them using terminal already.
Sorry if I sound like I'm trolling but I'm really new to these kind of things and just trying things out.
Pressed from my BANNED unified search enabled Maguro
Click to expand...
Click to collapse
Yep those, however I think the sh file pulls some other ones as well e.g. NFC, GPS etc. as Google does not provide them at this point in time.
RogerPodacter said:
You shouldn't need to run the extract files.sh script unless your compiling a whole kernel or ROM.
I think literally all you have to do is sync to the repo that you got that code from. And run the make command in the root of the repo file structure.
Of course it looks like you might be setting up your build setup following one of the tutorials. So get that finished. Then instead of running make on a kernel, run it on your telephone package app.
Click to expand...
Click to collapse
EDIT: Don't worry, it was only relevant for ROM/kernel development.

Unlawful said:
Yep those, however I think the sh file pulls some other ones as well e.g. NFC, GPS etc. as Google does not provide them at this point in time.
You missed one very important step: attaining proprietary binaries which is what the .sh file does. AOSP is full open source meaning it doesn't include any of the prorietary stuff e.g. Google apps, binaries for hardware etc. Also you might want to setup ccache so that it can rebuild a lot faster as well as other environment settings.
Click to expand...
Click to collapse
But I thought he doesn't need the proprietary binaries since he's just trying to build a package apk. I thought you only need the extract files sh script if you want to build and flash your own kernel/ROM.

Unlawful said:
It's hard to know without the context but IIRC, that's to copy proprietary binaries over to your working directory (I know this is relevant for Cyanogenmod, don't think it works in AOSP as the sh file doesn't exist).
Click to expand...
Click to collapse
It's also relevant for AOSP: extract-files.sh is a bash script written by JBQ (Google Software Engineer), designed to pull binaries from a stock rom running on the device. We don't have permission to use this script.
CM also has a extract-files.sh based of it, although theirs has been changed, to fit every other device that is supported by CM team, that needs binaries to work.
RogerPodacter said:
But I thought he doesn't need the proprietary binaries since he's just trying to build a package apk. I thought you only need the extract files sh script if you want to build and flash your own kernel/ROM.
Click to expand...
Click to collapse
This.
:good:

Ok thanks guys, will try it out once I have some free time.

RogerPodacter said:
But I thought he doesn't need the proprietary binaries since he's just trying to build a package apk. I thought you only need the extract files sh script if you want to build and flash your own kernel/ROM.
Click to expand...
Click to collapse
Oops, you're right. I neglected the whole OP and just focused on the sh script

Erm, is it accurate to say that my code did not work since the SystemUI.apk crashed?
I replaced the SystemUI.apk in stock 4.1.1 OTA from takju.

Related

[Guide] How to customize the CM10 i9000 kernel

This is a complementary guide to [Guide] How to compile and install CM10 for Samsung i9000
Want to add support for another filesystem to the CM10 kernel?
Add a module?
Maybe slim things a bit by removing some stuff?
All fine, but where to start?
Since CM9, the kernel source code should be integrated with CM's source code.
So, if you are building CM10, you should already have a kernel folder in the source code.
So, where's the config file used to build the i9000 kernel?
Well, it's here: ~/android/system/kernel/samsung/aries/arch/arm/configs/cyanogenmod_galaxysmtd_defconfig
You can edit the file directly in a text editor (if you know what you're doing) and it looks something like this:
Code:
CONFIG_EXPERIMENTAL=y
CONFIG_KERNEL_LZMA=y
# CONFIG_SWAP is not set
CONFIG_SYSVIPC=y
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_CGROUPS=y
CONFIG_CGROUP_DEBUG=y
CONFIG_CGROUP_FREEZER=y
CONFIG_CGROUP_CPUACCT=y
CONFIG_RESOURCE_COUNTERS=y
CONFIG_CGROUP_SCHED=y
CONFIG_RT_GROUP_SCHED=y
CONFIG_INITRAMFS_SOURCE="source/usr/galaxysmtd_initramfs.list"
...
You can just edit the text file, but sometimes it's not that easy to find/do what you want because the labels aren't very user-friendly.
It's easy to make several types of mistakes.
... but there is a better way to do it, using the menuconfig tool.
To use menuconfig, just do:
Code:
cd ~/android/system/kernel/samsung/aries
make menuconfig
You should now have a text GUI to access all the options that is much easier and safer to use:
{
"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 you need to load the i9000 configuration file.
Select "Load an Alternate Configuration File" at the bottom of the menu
Point to the i9000 default kernel config file: arch/arm/configs/cyanogenmod_galaxysmtd_defconfig
After you hit OK, you'll open the i9000 config file. Make the changes you want and exit. You'll be asked if you want to save the changes.
NOTE: I've had some issues with make menuconfig producing "strange" files.
Do:
Code:
grep CONFIG_USB_G_ANDROID kernel/samsung/aries/arch/arm/configs/cyanogenmod_galaxysmtd_defconfig
and confirm the result is:
Code:
CONFIG_USB_G_ANDROID=y
If it's not, menuconfig "missbehaved".
(There's a backup of the original config in kernel/samsung/aries/arch/arm/configs/cyanogenmod_galaxysmtd_defconfig.old)​
Final step: Tidy things up:
Code:
cd ~/android/system/kernel/samsung/aries
make mrproper
That's it.
Build away.
(Don't forget to do a "make installclean" and cleaning things up before building)
For more information on CM's kernel building, see this: http://wiki.cyanogenmod.com/wiki/Integrated_kernel_building
another great summary! thank you!
USB
EDIT: This comment is now obsolete.
--------------
NOTE: While everything builds nicely and is functional, somehow the USB support seems to be gone in the builds produced. Charging still works but ADB and Storage don't.
There's something missing.
If you know what it is, drop a line.
pmos69 said:
NOTE: While everything builds nicely and is functional, somehow the USB support seems to be gone in the builds produced. Charging still works but ADB and Storage don't.
There's something missing.
If you know what it is, drop a line.
Click to expand...
Click to collapse
Did you enable/disable things in the config file? It is not as easy to change things by just changing the config file, often the underlying source code also needs to be changed if you want to enable certain features...
Did you somehow add fast charge support?
kasper_h said:
Did you enable/disable things in the config file? It is not as easy to change things by just changing the config file, often the underlying source code also needs to be changed if you want to enable certain features...
Did you somehow add fast charge support?
Click to expand...
Click to collapse
Just made simple tests enabling simple features, like enabling btrfs filesystem support.
At first I was enabling stuff like swap and zRam, but then thought about what you are saying and went for simple tests.
Just enabling btrfs filesystem support, triggers the behaviour.
I think any change may do it.
Maybe just saving the config file in menuconfig does it.
Sent from my GT-I9000 using xda premium
pmos69 said:
Just made simple tests enabling simple features, like enabling btrfs filesystem support.
At first I was enabling stuff like swap and zRam, but then thought about what you are saying and went for simple tests.
Just enabling btrfs filesystem support, triggers the behaviour.
I think any change may do it.
Maybe just saving the config file in menuconfig does it.
Sent from my GT-I9000 using xda premium
Click to expand...
Click to collapse
I often change stuff in defconfig, but I always do it for code I added to the source. Never had a problem with USB after that. So in principle, it should work...
kasper_h said:
I often change stuff in defconfig, but I always do it for code I added to the source. Never had a problem with USB after that. So in principle, it should work...
Click to expand...
Click to collapse
Make menuconfig + make mrproper are making a mess.
Code:
diff -d <(sort kernel/samsung/aries/arch/arm/configs/cyanogenmod_galaxysmtd_defconfig.old) <(sort kernel/samsung/aries/arch/arm/configs/cyanogenmod_galaxysmtd_defconfig)|grep CONFIG_USB_G_ANDROID
< CONFIG_USB_G_ANDROID=y
> # CONFIG_USB_G_ANDROID is not set
WTF?
Back to hand-editing the config file, I guess...
Edit: Just tried it again, starting from the original config, and it's not happening this time... Building now.
Maybe I did something dumb before? (happens a lot)
pmos69 said:
Make menuconfig + make mrproper are making a mess.
Code:
diff -d <(sort kernel/samsung/aries/arch/arm/configs/cyanogenmod_galaxysmtd_defconfig.old) <(sort kernel/samsung/aries/arch/arm/configs/cyanogenmod_galaxysmtd_defconfig)|grep CONFIG_USB_G_ANDROID
< CONFIG_USB_G_ANDROID=y
> # CONFIG_USB_G_ANDROID is not set
WTF?
Back to hand-editing the config file, I guess...
Edit: Just tried it again, starting from the original config, and it's not happening this time... Building now.
Maybe I did something dumb before? (happens a lot)
Click to expand...
Click to collapse
That is the way you learn quickest: by making mistake. I tell this to my students everyday when the ruin experiments
kasper_h said:
That is the way you learn quickest: by making mistake. I tell this to my students everyday when the ruin experiments
Click to expand...
Click to collapse
Well, don't know what happened (but it happened quite a few times).
Working fine now...
Nice howto, thanks. Have one question. I want to build kernel for ypg1, really similar device to i9000. So what to do next when I have zImage and modules. I mean have only kernel source and toolchain without whole Android sources. I need to make installable pkg but don't know how.
I'm looking for step by step how to build kernel, build recovery etc.
Sent from my GT-I9001 using xda app-developers app
oisis said:
Nice howto, thanks. Have one question. I want to build kernel for ypg1, really similar device to i9000. So what to do next when I have zImage and modules. I mean have only kernel source and toolchain without whole Android sources. I need to make installable pkg but don't know how.
I'm looking for step by step how to build kernel, build recovery etc.
Sent from my GT-I9001 using xda app-developers app
Click to expand...
Click to collapse
I think there are a few how-to's on that in the cm wiki.
I've not looked much into it, sorry.
Guess you'll only have to sync the kernel sources + device specific trees and only build the kernel.
oisis said:
Nice howto, thanks. Have one question. I want to build kernel for ypg1, really similar device to i9000. So what to do next when I have zImage and modules. I mean have only kernel source and toolchain without whole Android sources. I need to make installable pkg but don't know how.
I'm looking for step by step how to build kernel, build recovery etc.
Sent from my GT-I9001 using xda app-developers app
Click to expand...
Click to collapse
You could take a look at my github (github.com/kasperhettinga). I use a kernel building script (developed by stratosk) that does not require the whole source code of cm10 but will build a flashable zip using a separate ramdisk (also originating from the work of stratosk).
Verstuurd van mijn GT-I9000
Could you describe how to, after make when i have zImage and modules, pack everything to img to have CWM installable zip? I don't have this device but would like to learn it. Thanks a lot.
oisis said:
Could you describe how to, after make when i have zImage and modules, pack everything to img to have CWM installable zip? I don't have this device but would like to learn it. Thanks a lot.
Click to expand...
Click to collapse
I adapted the teamhacksung buildscript so it automatically creates a CWM-zip:
https://github.com/kasperhettinga/buildscript
I have a zImage built from CM10 kernel sources in Cygwin and I want to inject it into the CM10 boot.img.
Anyone has any idea how I can do that?
I tried to extract the boot.img from one of the nightlies using the dsxida's android kitchen, but it seems that it does not have ramdisk and the extracted zImage file is 0 bytes.
hey man i ve been trying to compile the kernel for my galaxy s2 and downloaded all the things recomended from the cyanogenmod github
these are the steps that i follow:
1. cd into my kernel root directory.
2. make cyanogenmod_i9100g_defconfig
3. make menuconfig
4. make -j5
after a few seconds i get this error
Code:
CHK include/linux/version.h
CHK include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
CALL scripts/checksyscalls.sh
CHK include/generated/compile.h
/home/incarnation95/cm10kernel/t1/scripts/gen_initramfs_list.sh: Cannot open '/home/incarnation95/home/incarnation95/cm10kernel/t1/usr/i9100g_initramfs.list'
make[1]: *** [usr/initramfs_data.cpio] Error 1
make: *** [usr] Error 2
[email protected]:~/cm10kernel/t1$
do you know how to tackle this problem?
please help i am really in a mess due to this.
previously i compiled a stock kernel, in stock kernel the compillation process went very good but it didnt boot
i really want to make this aosp kernel, and this is the only guide which indicates compilling an aosp kernel
hope you could sort out my problem.
thanks in advance
incarnation95 said:
hey man i ve been trying to compile the kernel for my galaxy s2 and downloaded all the things recomended from the cyanogenmod github
these are the steps that i follow:
1. cd into my kernel root directory.
2. make cyanogenmod_i9100g_defconfig
3. make menuconfig
4. make -j5
after a few seconds i get this error
Code:
CHK include/linux/version.h
CHK include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
CALL scripts/checksyscalls.sh
CHK include/generated/compile.h
/home/incarnation95/cm10kernel/t1/scripts/gen_initramfs_list.sh: Cannot open '/home/incarnation95/home/incarnation95/cm10kernel/t1/usr/i9100g_initramfs.list'
make[1]: *** [usr/initramfs_data.cpio] Error 1
make: *** [usr] Error 2
[email protected]:~/cm10kernel/t1$
do you know how to tackle this problem?
please help i am really in a mess due to this.
previously i compiled a stock kernel, in stock kernel the compillation process went very good but it didnt boot
i really want to make this aosp kernel, and this is the only guide which indicates compilling an aosp kernel
hope you could sort out my problem.
thanks in advance
Click to expand...
Click to collapse
These steps should resolve it
1. open the .config file that is created after you do make cyanogenmod_i9100g_defconfig
2. check the path of the file i9100g_initramfs.list and gen_initramfs_list.sh
3. edit the .config file to make sure the actual path matches to that in the .config file.
4. make -j5
5. Enjoy the new kernel !!
msri3here said:
These steps should resolve it
1. open the .config file that is created after you do make cyanogenmod_i9100g_defconfig
2. check the path of the file i9100g_initramfs.list and gen_initramfs_list.sh
3. edit the .config file to make sure the actual path matches to that in the .config file.
4. make -j5
5. Enjoy the new kernel !!
Click to expand...
Click to collapse
2. CONFIG_INITRAMFS_SOURCE="source/usr/i9100g_initramfs.list" (THIS WAS THERE BY DEFAULT)
I MADE IT CONFIG_INITRAMFS_SOURCE="~/home/incarnation95/cm10kernel/t1/usr/i9100g_initramfs.list"
as the location was.
i dont think we really have to define the path of gen_initramfs_list.sh or do we? and if yes then where?
There you have the problem...remove the "source/" from the path in the .config file
This path is defined by default and just needs customization for our device...
Sent from my GT-I9000 using xda premium
msri3here said:
There you have the problem...remove the "source/" from the path in the .config file
This path is defined by default and just needs customization for our device...
Sent from my GT-I9000 using xda premium
Click to expand...
Click to collapse
O thanks mate it really worked
Thanks a ton. Was tryna find sol. Since 3 days
Sent from my GT-I9100G using Tapatalk 2
---------- Post added at 11:32 PM ---------- Previous post was at 10:42 PM ----------
now after getting over those errors i am getting this error now :/
Code:
//home/incarnation95/Downloads/arm-2011.03/bin/arm-none-eabi-ld: cannot open linker script file /arch/arm/mach-omap2/sec_omap.lds: No such file or directory
make[1]: *** [arch/arm/mach-omap2/mailbox_mach.o] Error 1
make: *** [arch/arm/mach-omap2] Error 2
and weird thing is the files exists :/

[PC-APP] GalaxyS3 Mod Tool

I made this tool originally for SonyEricsson Xperia X10, but have now modified it to work for our Samsung Galaxy S3. I hope it will make life a little easier when modifying files on the device. It uses ADB to pull and push files, change file permissions and much more - so users don't need to remember long command prompt/terminal emulator commands! It also has a nifty little application manager, which allows for quick installation, backup, and removal of both pre and self -installed software. It has a LogCat function to read and save logs on the go when investigating errors, as well as functionality to decompile/recompile APK, JAR and ODEX files, sign and zipalign APKs, and decompile System images. ADB Shell will be released in v0.6.2.
{
"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"
}
Instructions:
1. Extract archive.
2. Install LinuxReader to GalaxyS3ModTool\tools\LinuxReader.*
3. Run GalaxyS3ModTool.jar
*This step is only needed for the Decompile System function in the ROM Manager.
Note: Make sure your phone is connected in debug mode, you have root privileges, and unsecured your device's shell. The application will try to unsecure your shell if you haven't already, but worst case scenario you might have to do this manually.
Also, the manage ROMs functionality is still experimental, and the Recompile System function is disabled. If you know how these processes can be automated, let me know and I will incorporate the functionality.
If you have problems, let me know and I will try to sort them out with you. Keep in mind that often when a modification goes wrong, you can simply push back the original files and reboot. So keep backups handy!
Reserved in case of future expansions.
Reserved in case of future expansions.
Thank you!
I'll finally be able to modify the ODEX files :victory:
Is it possible to recompile an ODEX file to .odex (not .jar)?
Great tool
Thanks!!!
Great tool. Looks very promising
Sent from my GT-I9300 using Tapatalk 2
Saleen NS said:
Thank you!
I'll finally be able to modify the ODEX files :victory:
Is it possible to recompile an ODEX file to .odex (not .jar)?
Click to expand...
Click to collapse
Yes modifying ODEX:ed filesystems has become a breeze Just remember to remove the original *.ODEX file from your system if you incorporate it into its associated APK or JAR.
As ODEX is a device-specific format, compiled to be most effective on specific hardware, recompiling with baksmali to *.DEX and renaming to *.ODEX is not enough. I don't know of any way to recompile to proper *.ODEX, but I mean it has to be possible, and if anyone knows how - please drop a line here or PM me. However the rule of thumb is to not decompile and incorporate the *.ODEX unless smali-code is being edited. This will allow you to keep the efficiency of the original *.ODEX file, and just replace the APK or JAR - i.e. having no negative effect on performance.
EDIT: Realized there is a way to recompile to *.ODEX on the device via the dexopt binary. Working on implementing the functionality.
Thanks for your work!
Warren87 said:
Thanks for your work!
Click to expand...
Click to collapse
shahed26 said:
Great tool. Looks very promising
Sent from my GT-I9300 using Tapatalk 2
Click to expand...
Click to collapse
SETdown said:
Great tool
Thanks!!!
Click to expand...
Click to collapse
Great to hear you guys like it!
I've got version 0.6.1 in testing now, with proper ODEX recompilation functionality incorporated. Will upload it soon.
Unable to run d App!
I downloaded d files & followed above instructions...but clicking on GalaxyS3ModTool.jar opens the archive! What am i doing wrong?
Very promising tool! I will test in weekend and give a feedback!:good:
Mr.Mefisto said:
Very promising tool! I will test in weekend and give a feedback!:good:
Click to expand...
Click to collapse
Good stuff! Looking forward to that.
harryS2 said:
I downloaded d files & followed above instructions...but clicking on GalaxyS3ModTool.jar opens the archive! What am i doing wrong?
Click to expand...
Click to collapse
Do you have Java installed?
harryS2 said:
I downloaded d files & followed above instructions...but clicking on GalaxyS3ModTool.jar opens the archive! What am i doing wrong?
Click to expand...
Click to collapse
Java must be installed on your PC and .jar files associated with java.
Sent from my GT-I9300 using xda premium
Thnx this is what i need.
Works great.
Version 0.6.1 is now uploaded in first post!
Updates:
I have implemented proper ODEX recompilation functionality. However, it requires the device to be connected as the operation has to be performed from within the system and then pulled back out. The tool will let you know when to connect your phone. For the process to be possible, a wrapper for the binary dexopt needs to be pushed to /system/bin - so this is also done programatically.
Some user prompts have been added to make human mistakes less likely. For example if you say you want to decompile an associated ODEX file, you must also specify the framework directory - or nothing will happen.
A fancy automagic script has been added for JAR-decompilation. It turns out since the dex-optimizing of ROMs, some JAR-files don't include a classes.dex file anymore, which makes baksmali.jar cough up errors. But recompiling the ODEX file as classes.dex and inserting it into the JAR makes it decompile properly - so this is what the script has automated when it recognizes the situation.
I have actually rewritten most of the decompilation/recompilation code to execute more efficiently. When time flies and inspiration runs amok, this sadly results in djungle-code. So I had to clear everything up into reusable functions so that nothing is repeated or unnecessary slow.
Happy modding folks!
ADB Shell has been implemented in the coming version. Screenshots updated in first post.
Wow, what a quite bunch
Version 0.6.2 is uploaded in first post.
Changelog:
ADB Shell functionality implemented
Some bug fixes
Fantastic work!
If anyone notices this tool working on another device - please post the device name here with any related problems. I'm looking into extending the device support for this tool.
This tool is very convenient .. I used it for the nexus 7 with firmware 4.1.2
too bad that does not work with 4.2, we look forward to updates
still great

[Guide] Porting Features Example

I've had several people asking me to "make a tutorial" on this. You're in for a bad time if you can't be semi-intuitive about it. I literally figured all of this out myself. Should this save you some time? Yes. But it won't make you a "1337 coding hax0r" (which I'm not, either. I don't even know java). Every day you'll learn something new. "Ah! So that prevents it from turning on by default!" "Oh, that makes the actual checkbox appear!" Expect some hickups. Expect to do some reading. Expect staring at your PC for an hour and realizing you're lost. These things happen. This guide is just an example of me forwarding a 4.1 feature of AOKP to 4.2. You can use it as an outline for porting features from one Rom to the other (please ask permission from the author) or doing exactly the sort of work I'm doing here.
So you've been playing around in Gerrit; cherry-picking experimental features, using a mergetool to resolve conflicts, learning to fix your own mistakes...
What's the next step? Where should you go from here to start helping the community and developers along?
How about moving features or fixes forward from old versions of AOKP?
Now, I'm going to be showing you an extremely simple example. Your challenges WILL be harder.
But that's part of the "fun" (or so they keep telling me).
Getting Started:
Familiarize yourself with the basics of Gerrit through Roman's Tutorial.
You're going to want to set up and account on Gerrit, and follow the commands listed to get your Keys set up and authenticated with Gerrit.
Now, find yourself a commit (and it's dependencies) you'd like to port upwards. The easiest way to do this is using Gerrit's search function.
Code:
message:SEARCHTERM
To express myself easily with this tutorial, I'll be using examples. Please don't upload these exact commits 200 times <_<.
I'll be using THIS and THIS.
You'll notice that these commit's have titles that end in (?/2).
This is an indication that they require pieces in more than one location to work.
Any feature in RomControl or Settings will have two commits (usually within /frameworks/base/).
Make sure you find all of the required pieces before moving forward.
You're going to want to "cd" to the projects now and start a repo.
This is explained in Roman's Tutorial.
For example:
Code:
cd ~/aokp_jb/frameworks/base/
repo start portlocktime .
The repo name does NOT matter. Name it whatever is going to be easy to remember.
Now, we want to look at what this commit changed.
{
"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"
}
Under the latest patchset to the commit you'll see a list of files. You're going to want to click each one and open their respective files on your PC. For example, I see "security_settings_chooser.xml" is the only file listed for this commit. So I'll click on it in Gerrit, and see if the file exists on my PC.
It does! So that's a good thing. It means we're probably going to be able to move this forward without finding a new file location and how to merge it into the file.
Now we want to look and see if the changes are going to merge into the file without giving us a hassle.
Will it give us a hassle?
FULL SIZE IMAGE
Nah, that looks about like the file I'm looking at so the changes should be easy.
Now, the green blocks in Gerrit means something completely new was added.
So we have a block of code here that we need to copy into the file.
Oh god! What have we done...it looks like I just gave this file a disease...
Wait a second. Before you go and put this disgusting creature out of it's misery, let's try and fix it.
See how the first "<ListPreference" is indented?
And all of those nasty little red numbers?
Delete all of that and make sure your change lines up where it should (in comparison to Gerrit and the other blocks in this file).
You'll also want to make a run-through with your cursor. I use the arrow keys on my keyboard and roll my cursor all over the lines to make sure it doesn't make any huge jumps (indicating an indent) or any extra spaces after a line is finished. You don't want spaces after a line at all.
And you don't want indents at all.
So I wrapped up my changes...now I'll save the file.
Now in the Terminal:
Code:
git status
You'll see a list of untracked files. These are backup files of the files you just changed and saved.
Code:
/res/xml/security_settings_chooser.xml~
This is the only file I'm seeing.
We want to remove it!
How? Add "rm ." before the location that the Terminal spat out.
Code:
rm ./res/xml/security_settings_chooser.xml~
And the file disappears.
Now we're ready to add these files and prepare them for upload.
Code:
git add -A
Then type:
Code:
git commit -a
Now. We're going to want to be careful here.
The simplest way to be polite and give proper credit is to copy the commit message from the old commit.
Let's look at this commit.
Code:
Lockscreen: Add timeout and instant lock option to slide lock (1/2)
This adds AOSP's new timeout and instant lock options to the
slide (aka chooser) style lockscreen.
To Do: Add the vibrate option as well.
Change-Id: I5d48282e484b325a3c15f2966077222dc753026f
Signed-off-by: KhasMek <[email protected]>
I'm going to cut off the "Signed-off-by" and "Change-Id" lines.
What if we screwed something up? We don't want the owner of this commit to be responsible!
And the Change-Id? This is a different commit. Not a patch of the old one.
Code:
Lockscreen: Add timeout and instant lock option to slide lock (1/2)
This adds AOSP's new timeout and instant lock options to the
slide (aka chooser) style lockscreen.
To Do: Add the vibrate option as well.
Now you want to paste your commit message into the Terminal and hit ctrl+x afterwards.
Save Modified Buffer? (type "y" to answer yes).
Messsage to write? (just hit enter).
Yay! We're ready to upload!
Did you author this commit?
No, you didn't.
So we're going to make the original author the author of this commit as well.
See the author line there?
Copy it from your commit.
Now in your Terminal, type:
Code:
git commit --amend --author="USERNAME <[email protected]>"
For me, I'll use:
Code:
git commit --amend --author="KhasMek <[email protected]>"
Yay! We're ready to upload!
No. Make a build and see if it works.
Did it?
Sure. Why not.
Code:
repo upload .
Remember. We have another commit to add!
Ok so what were the changes in the /frameworks/base/ package?
FULL SIZE IMAGE
Red lines means something was changed. So we can see here that this:
Code:
|| !mLockPatternUtils.isSecure()
Was removed.
Save and reupload...and you're ready to rock!
Me: That's it.
You: You are a horrible person.
Me: What?!
You: You just uploaded the easiest commit ever. I could have used that to start off!
Me: If you're going to learn anything, you need to work at it. JK this would have been perfect. My bad.
READ THIS:
-Don't make the team hate me for writing this by uploading things that don't work or have author, whitespace, or other annoying errors.
-There are other ways (cherry-picking and rebasing which I find confusing) to do this.
-Use Roman's Tutorial for uploading new patchsets to your commit (if you make little errors like missing a tab/space/etc you can fix it here).
-Learning to read the code a little bit? Cool. Maybe you should move on to repo syncing the old 4.1 code and checking to see of the commit had fixes uploaded to it after the commit you're moving up. You can then easily copy from the old code into the new and include all fixes!
-You smell like roses <3

I successfully built a CWM with english for P6(But i have some problem)

I can move up and down with the volume keys,But I can not use the power button controls the Enter key。So it just can move up and down but can't Confirm each command. I think the key values of this CWM is wrong.Everyone who can help me to build a CWM for P6 with correct key values and I will be very thank you.
Pictures:
{
"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"
}
You need to modify recovery_ui.c before compiling CWM to alter KEY Mapping. Don't forget to define the below in your BoardConfig.mk beforehand.
Just swap out "KEY_MENU" for "KEY_POWER" within "recovery_ui.c"...
BoardConfig.mk:
Code:
BOARD_CUSTOM_RECOVERY_KEYMAPPING := ../../device/[B]*INSERT-MANUFACTURE-NAME[/B]/[B]*INSERT-DEVICE-NAME/recovery_ui.c[/B]
The only issue then you'll have is binding a back key map since as you know we're short a few keys, failing that build a Touch CWM recovery since this issue is addressed.
Bravo on getting a successful and bootable CWM build. Hats off to you sir.
can you help me to build a recovery Binaries.
zhenaguo said:
can you help me to build a recovery Binaries.
Click to expand...
Click to collapse
Another case is this, in BoardConfig.mk
Code:
BOARD_HAS_NO_SELECT_BUTTON := true
If you builded the cwm with their web builder, probably this is the error
can you help me to build a recovery binary.
zhenaguo said:
can you help me to build a recovery binary.
Click to expand...
Click to collapse
I can, but stickman89 know a lot more than me
Post here or pm, i'll try to help you
many thanks . i will pm to you and give you the files
zhenaguo said:
many thanks . i will pm to you and give you the files
Click to expand...
Click to collapse
I still need to complete the repo sync (i'm aroun 90%), pm it to stickman too, he already got all the enviroment set up
Either modify the existing "default_recovery_ui.c" located at [SOURCE FOLDER]/bootable/recovery/ and add the below: (Replace any existing entries if defined, do not remove unrelated entries otherwise)
Code:
int device_handle_key(int key_code, int visible) {
if (visible) {
switch (key_code) {
case KEY_DOWN:
case KEY_VOLUMEDOWN:
return HIGHLIGHT_DOWN;
case KEY_UP:
case KEY_VOLUMEUP:
return HIGHLIGHT_UP;
case KEY_ENTER:
case KEY_POWER:
return SELECT_ITEM;
}
}
return NO_ACTION;
}
for device reset after power button being pressed 5 times add the following to the same file on a new line and below the above entry:
Code:
int device_reboot_now(volatile char* key_pressed, int key_code) {
// Reboot if the power key is pressed five times in a row, with
// no other keys in between.
static int presses = 0;
if (key_code == KEY_POWER) { // power button
++presses;
return presses == 5;
} else {
presses = 0;
return 0;
}
}
or define your own recovery_ui.c via BoardConfig.mk and setup your own. Obviously were missing a return/back key so perhaps building against Touch Recovery is a better idea.
...For now the above should suffice.
Stickman89 said:
Either modify the existing "default_recovery_ui.c" located at [SOURCE FOLDER]/bootable/recovery/ and add the below: (Replace any existing entries if defined, do not remove unrelated entries otherwise)
Code:
int device_handle_key(int key_code, int visible) {
if (visible) {
switch (key_code) {
case KEY_DOWN:
case KEY_VOLUMEDOWN:
return HIGHLIGHT_DOWN;
case KEY_UP:
case KEY_VOLUMEUP:
return HIGHLIGHT_UP;
case KEY_ENTER:
case KEY_POWER:
return SELECT_ITEM;
}
}
return NO_ACTION;
}
for device reset after power button being pressed 5 times add the following to the same file on a new line and below the above entry:
Code:
int device_reboot_now(volatile char* key_pressed, int key_code) {
// Reboot if the power key is pressed five times in a row, with
// no other keys in between.
static int presses = 0;
if (key_code == KEY_POWER) { // power button
++presses;
return presses == 5;
} else {
presses = 0;
return 0;
}
}
or define your own recovery_ui.c via BoardConfig.mk and setup your own. Obviously were missing a return/back key so perhaps building against Touch Recovery is a better idea.
...For now the above should suffice.
Click to expand...
Click to collapse
I have upload the kernel and recovery.fstab to mediafire disk.There are two versions.one i named Kernel1_international_version.The others i named kernel2_Chinese_version.I am sure that each recovery.fstab of them is correct written.So,please help to to build a recovery binary for them.or you can post to someone who can do this work.I will be very thank you.Here is the link:
1.http://www.mediafire.com/download/r3zpk2cq5efv8dx/Kernel1_international_version.zip
2.http://www.mediafire.com/?eydeecerp7dzy7d
Your .fstab looks fine for international version
This **** repo still syncing
zhenaguo said:
I have upload the kernel and recovery.fstab to mediafire disk.There are two versions.one i named Kernel1_international_version.The others i named kernel2_Chinese_version.I am sure that each recovery.fstab of them is correct written.So,please help to to build a recovery binary for them.or you can post to someone who can do this work.I will be very thank you.Here is the link:
1.http://www.mediafire.com/download/r3zpk2cq5efv8dx/Kernel1_international_version.zip
2.http://www.mediafire.com/?eydeecerp7dzy7d
Click to expand...
Click to collapse
How on earth did you flash CWM Recovery without Huawei signing it?
We need to know the procedure you used and any other modifications to CWM source you specifically made in order to get this booting on our device.
Your environment is clearly working, would make more sense if you made these changes. The method
S34Qu4K3 gave in terms of a simple one line fix to BoardConfig.mk will allow CWM selection or alternatively use my method which required a bit more interaction.
I bet that's the Honor 2 CWM (or a huawei dev ;D)
What about CWM builder? Touch recovery should work right? I know, that the power button issue is in the non touch recovery provided by the builder
Zhenaguo add this line to your BoardConfig.mk: (as suggested by S34Qu4K3)
Code:
BOARD_HAS_NO_SELECT_BUTTON := true
It's that simple. If that doesn't work provide me with the following file: /bootable/recovery/default_recovery_ui.c and I'll make the required modifications for our button mapping.
Without knowing how you bypassed encryption to flash said recovery our efforts won't be at all effective.
Since your able to successfully build a bootable CWM you may as well make the above simple modification.
zhenaguo, Hello previously encountered the same problem as you, but was able to resolve it on U9510E, the machine with the same architecture. if you can help it, you would appreciate your help on my phone
Sorry for the off topic but do you think that we 'll be able to use it or as a base for the ascend mate?
ollden said:
Sorry for the off topic but do you think that we 'll be able to use it or as a base for the ascend mate?
Click to expand...
Click to collapse
i guess so. in my U9510 this apk working.

[Guide] Build Your Own [UNOFFICIAL][9] LineageOS4Microg 16.0 (by Bernie_nix)

In the spirit of open-source, if there's one ROM that deserves to be "home-brewed" in addition to AOSP and Lineage, it's LineageOS4Microg. This guide will explain how to do so using Docker. LineageOS and Microg are explained below followed by the guide.
{
"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"
}
Code:
/*
* I'm not responsible for bricked devices, damage, loss of Google services, you getting fired because the alarm app failed, etc. Do this at your own risk.
* Please do some research if you have any concerns about features included in the products you find here before flashing it!
* YOU are choosing to make these modifications.
* Your warranty may/will be void if you tamper with any part of your device / software.
* Same statement for XDA.
*/
About LineageOS4MicroG & LineageOS
LineageOS unofficial fork with built-in microG gapps implementation.
Full Play Services compatibility [Well-almost...YMMV]
Our ROM has built-in microG free-as-in-freedom re-implementation of Google's proprietary Android user space apps and libraries. This enables you to use every Google service you need without keeping another closed-source binary blob in your Android system.
Native F-Droid support
LineageOS for microG comes with F-Droid already installed. You can use it to access plenty of FOSS applications or even a Play Store bridge repository like Playmaker or GPlayWeb.
About LineageOS
LineageOS is a free, community built, aftermarket firmware distribution of Android 9 (Pie), which is designed to increase performance and reliability over stock Android for your device.
LineageOS is based on the Android Open Source Project with extra contributions from many people within the Android community. It can be used without any need to have any Google application installed. Linked below is a package that has come from another Android project that restore the Google parts. LineageOS does still include various hardware-specific code, which is also slowly being open-sourced anyway.
All the source code for LineageOS is available in the LineageOS Github repo. And if you would like to contribute to LineageOS, please visit out Gerrit Code Review.
Learn more at:
LineageOS: https://lineageos.org/
LineageOS4MicroG: https://lineage.microg.org/​
Click to expand...
Click to collapse
Rom Built by Bernie_nix​Known issues:
USB-C headphones work for music, watching videos, etc. They don't work in the phone app...yet. (working on this)
Some users report VOIP calls don't work properly. YMMV. Skype, Whatsapp, Nextcloud Talk, working great for me.
Automatic updates not yet implemented but will be in a future build.
You tell me.
Building Requirements
1. A fast PC or VPS account such as Google Compute Engine. Minimum PC recommended requirements are Intel i5 or equivalent, 4 cores 8 threads minimum (more cores and better CPU recommended), 16GB ram, SSD and 300GB free drive space minimum, fast internet connection (you will download over 30GB of sources).
2. Ubuntu 18.04 is supported here. If you use Windows or another version of Linux, let others know of your tweaks and workarounds.
3. Patience and time. Downloading sources, setting up and building a rom will take hours if not days (depending on your PC hardware and internet speed).
Environment Setup & Build​1. Install Docker on Ubuntu (run each command once in terminal)
Code:
sudo apt-get update
sudo apt install docker.io
sudo systemctl start docker
sudo systemctl enable docker
2. Test that docker is running (run command in terminal)
Code:
docker run hello-world
You should see something like this, "docker run hello-world Unable to find image 'hello-world:latest' locally latest: Pulling from library/hello-world ca4f61b1923c: Pull complete Digest: sha256:ca0eeb6fb05351dfc8759c20733c91def84cb8007aa89a5bf606bc8b315b9fc7 Status: Downloaded newer image for hello-world:latest Hello from Docker! This message shows that your installation appears to be working correctly. ..."
3. Pull lineageos4microg docker onto your pc (run command in terminal)
Code:
docker pull lineageos4microg/docker-lineage-cicd
4. After pull is complete, create the following directories in your home/YOURUSERNAME directory
lineageos4microg
lineageos4microg/src
lineageos4microg/ccache
lineageos4microg/local_manifests
lineageos4microg/keys
lineageos4microg/logs
lineageos4microg/zips
So it might look something like this: home/JoeAndroid/lineageos4microg
5. Copy the 4 attached xml files (bottom of this post) to your local_manifests folder
These are: ocean.xml, include_proprietary.xml, proprietary.xml, and custom_packages.xml
6. In terminal, cd into the lineage4microg folder, and copy and paste the following commands all at once after changing YOURUSERNAME to your username in ubuntu. For an explanation of options, see the link at bottom of post. This code will download sources, sync your repos with newest updates and start your build. This step could take hours. It is downloading sources, syncing repos and building your rom!
Code:
sudo docker run \
-e "BRANCH_NAME=lineage-16.0" \
-e "DEVICE_LIST=ocean" \
-e "SIGN_BUILDS=true" \
-e "SIGNATURE_SPOOFING=restricted" \
-e "WITH_SU=true" \
-e "CUSTOM_PACKAGES=GmsCore GsfProxy FakeStore MozillaNlpBackend NominatimNlpBackend com.google.android.maps.jar FDroid FDroidPrivilegedExtension " \
-e "INCLUDE_PROPRIETARY=false" \
-v "/home/YOURUSERNAME/lineageos4microg/lineage:/srv/src" \
-v "/home/YOURUSERNAME/lineageos4microg/zips:/srv/zips" \
-v "/home/YOURUSERNAME/lineageos4microg/logs:/srv/logs" \
-v "/home/YOURUSERNAME/lineageos4microg/cache:/srv/ccache" \
-v "/home/YOURUSERNAME/lineageos4microg/keys:/srv/keys" \
-v "/home/YOURUSERNAME/lineageos4microg/manifests:/srv/local_manifests" \
lineageos4microg/docker-lineage-cicd
7. Your build should be in the zips folder when complete! Flash in twrp/ofox.
8. If your build fails, check the log in lineageos4microg/logs/ocean folder. If you receive the following error, "Can not locate config makefile for product "lineage_ocean"" you will need to copy the 4 xmls from lineageos4microg/local_manifests to lineageos4microg/manifests.​
References and links:
https://phoenixnap.com/kb/how-to-install-docker-on-ubuntu-18-04
https://github.com/lineageos4microg/docker-lineage-cicd
Telegram group for additional ROMS, files and support: https://t.me/mG7Power
Thanks to Dark98, Electimon, Barry and many others for initial help and repos when building this rom.
Reserved #1
Reserved #2
Thanks, been wanting to try to build this.
I tried am running this on ubuntu 18.04 vm, followed all the instructions.
after I type in the docker commands get this after a few minutes:
sed:can't read build/core/version_defaults.mk:no such file or directory
can't detect the android version.
Any suggestions?
skalnas said:
Thanks, been wanting to try to build this.
I tried am running this on ubuntu 18.04 vm, followed all the instructions.
after I type in the docker commands get this after a few minutes:
sed:can't read build/core/version_defaults.mk:no such file or directory
can't detect the android version.
Any suggestions?
Click to expand...
Click to collapse
Can you take a picture of the screenshot including how you typed in the commands? Need a bit more info
I just pasted the code changing username screenshot attached
skalnas said:
I just pasted the code changing username screenshot attached
Click to expand...
Click to collapse
I wonder if it's related to "steve" in your build commands but your username is Steven on the VM?
Bernie_nix said:
I wonder if it's related to "steve" in your build commands but your username is Steven on the VM?
Click to expand...
Click to collapse
I did rerun the script with the username steven and it appeared to be working.
went to bed and when i woke up I was excited to see it said build completed. however i could not
find the zip file in the zips folder. looking at the logs error: Can not locate config makefile for product "lineage_ocean".
I saw in the op to move the 4 xml files to manifests dir, however I had gotten permission denied when trying to
copy to the manifests dir. i deleted the dir, recreated the dir and moved the files.
I am going to try building again.
skalnas said:
I did rerun the script with the username steven and it appeared to be working.
went to bed and when i woke up I was excited to see it said build completed. however i could not
find the zip file in the zips folder. looking at the logs error: Can not locate config makefile for product "lineage_ocean".
I saw in the op to move the 4 xml files to manifests dir, however I had gotten permission denied when trying to
copy to the manifests dir. i deleted the dir, recreated the dir and moved the files.
I am going to try building again.
Click to expand...
Click to collapse
You need to sudo cp -R (drag 4 files to terminal here) /YOURUSERNAME/lineageos4microg/manifests. Then re run script
Bernie_nix said:
You need to sudo cp -R (drag 4 files to terminal here) /YOURUSERNAME/lineageos4microg/manifests. Then re run script
Click to expand...
Click to collapse
Thanks for the assistance, I am new to linux, hence the vm. My PC is amd fx8350 chip 8 core, 16 gb ram on win10 pro 64 bit on
PNY 480 gb ssd drive.
Just a few questions: The vm i set up to build this I set at 150gb. Prior to syncing the repos and running
the build script again i had about 135 gb free. It's been on starting build for ocean lineage-16.0 branch
for about 5 hours.
Should it have completed or thrown an error by now?
Also, lineageos4microg folder states it's using 57gb, I now have 32 gb free space 5 hours into build.
Not sure if I should keep waiting to see if build completes?
I have attached the log which i think is for the build in progress.
Thanks again
skalnas said:
Thanks for the assistance, I am new to linux, hence the vm. My PC is amd fx8350 chip 8 core, 16 gb ram on win10 pro 64 bit on
PNY 480 gb ssd drive.
Just a few questions: The vm i set up to build this I set at 150gb. Prior to syncing the repos and running
the build script again i had about 135 gb free. It's been on starting build for ocean lineage-16.0 branch
for about 5 hours.
Should it have completed or thrown an error by now?
Also, lineageos4microg folder states it's using 57gb, I now have 32 gb free space 5 hours into build.
Not sure if I should keep waiting to see if build completes?
I have attached the log which i think is for the build in progress.
Thanks again
Click to expand...
Click to collapse
Not recommended to run in a VM as it will take considerably longer to build but if you have the time (hours, days). As far as hard drive space, 150gb is cutting it very close. Better to have 250gb minimum. Don't know if you'll have enough. As far as your log and actual build, it's building! Congrats. If you scroll down to the bottom of your log, you'll see it's at 23%.
Bernie_nix said:
Not recommended to run in a VM as it will take considerably longer to build but if you have the time (hours, days). As far as hard drive space, 150gb is cutting it very close. Better to have 250gb minimum. Don't know if you'll have enough. As far as your log and actual build, it's building! Congrats. If you scroll down to the bottom of your log, you'll see it's at 23%.
Click to expand...
Click to collapse
Yes, as I feared i did run out space, but at least I know it was building. I may try to install ubuntu in a dual boot.
Thanks
skalnas said:
Yes, as I feared i did run out space, but at least I know it was building. I may try to install ubuntu in a dual boot.
Thanks
Click to expand...
Click to collapse
Awww... Well I had that happen before. Even if you have an old platter hdd (not ssd) as long as it's got the GBs of space it will take a little longer to build but for these purposes will do just fine. I use both SSD and hdds to build.
Got my dual boot set up. First tried Ubuntu but it kept locking up, went with Linux mint. Got a 250 GB partition, going to give it another go tommorow.
View attachment 4980819well, after switching from VM to dual boot, I gave it another go, and i got a msg in linux mint that i ran out of space about 3 1/2 hrs into build. I had set up 250gb partition as you suggested. I did 30gb root, 220 GB home,4 GB swap.
Can you take a look at the logs, i'm not clear looking at logs how much of build completed.
There was the zip file about 604 mb in the zips folder, which I could open(along with an sha and md5 files, which i dont know anything about.) I'm thinking possibly the build completed despite the warning in linux about running of free space.
I shrank the /root partition in gparted to 20gb and tried to extend the extra 10gb to home, but i couldn't.
Is it possible to specify 25gb ccache in the docker script somehow so that instead of the 50 it seems to allocate, maybe that will solve the space issue?
Thanks again, looks like progress.
Freed up some more space for build, now when trying to sync repos i get this msg Missing "vendor/lineage", aborting.
suggestions?
skalnas said:
Freed up some more space for build, now when trying to sync repos i get this msg Missing "vendor/lineage", aborting.
suggestions?
Click to expand...
Click to collapse
I looked at the last lines in your log... it looks like it built. Did you check your zips folder?
boot.img already exists, no need to overwrite...
dtbo.img already exists, no need to overwrite...
system.img already exists, no need to overwrite...
vendor.img already exists, no need to overwrite...
Total of 704512 4096-byte output blocks in 23 input chunks.
Total of 147456 4096-byte output blocks in 13 input chunks.
done.
Click to expand...
Click to collapse
Where is "Missing "vendor/lineage", aborting." appearing?
Bernie_nix said:
I looked at the last lines in your log... it looks like it built. Did you check your zips folder?
Where is "Missing "vendor/lineage", aborting." appearing?
Click to expand...
Click to collapse
Thanks, yes there was a zip there, wasnt sure if it was safe to flash, with the error space ran out ,but figured build did complete, as the zip wasnt corrupted.
As far as repo error:
"OSError: [Errno 17] File exists: '/srv/src/LINEAGE_16_0/device/generic/mini-emulator-arm64/.git.tmp'
error: Cannot checkout bernie-nix/android_device_motorola_sdm632-common-1: ManifestInvalidRevisionError: revision lineage-16.0 in bernie-nix/android_device_motorola_sdm632-common-1 not found
error: in `sync -c --force-sync`: revision lineage-16.0 in bernie-nix/android_device_motorola_sdm632-common-1 not found.
I did switch to the ocean.xml listed in your other thread posted by dark98 and the repo did sync., but I didn't proceed with the build.
Thanks again for all your help, think i will try to dirty flash my succesful build over yours, unless i should clean flash.
skalnas said:
Thanks, yes there was a zip there, wasnt sure if it was safe to flash, with the error space ran out ,but figured build did complete, as the zip wasnt corrupted.
As far as repo error:
"OSError: [Errno 17] File exists: '/srv/src/LINEAGE_16_0/device/generic/mini-emulator-arm64/.git.tmp'
error: Cannot checkout bernie-nix/android_device_motorola_sdm632-common-1: ManifestInvalidRevisionError: revision lineage-16.0 in bernie-nix/android_device_motorola_sdm632-common-1 not found
error: in `sync -c --force-sync`: revision lineage-16.0 in bernie-nix/android_device_motorola_sdm632-common-1 not found.
I did switch to the ocean.xml listed in your other thread posted by dark98 and the repo did sync., but I didn't proceed with the build.
Thanks again for all your help, think i will try to dirty flash my succesful build over yours, unless i should clean flash.
Click to expand...
Click to collapse
Yes, use the other xml if you want. They should both be about the same...you might even get updated sources, you might not...but it should build. I looked at the error above. The only suggestion I would make in your current xml if you want to continue using it is to remove revision="lineage-16.0" on the bernie-nix/android_device_motorola_sdm632-common-1 entry. As far as the zip that completed, how big is it?
Bernie_nix said:
Yes, use the other xml if you want. They should both be about the same...you might even get updated sources, you might not...but it should build. I looked at the error above. The only suggestion I would make in your current xml if you want to continue using it is to remove revision="lineage-16.0" on the bernie-nix/android_device_motorola_sdm632-common-1 entry. As far as the zip that completed, how big is it?
Click to expand...
Click to collapse
The zip was 604mb, i did successfully flash it, thanks again for your help and guide building my first rom!
so the xml file should be edited to:
<project name="bernie-nix/android_device_motorola_sdm632-common-1" path="device/motorola/sdm632-common" remote="github"/>
?
btw, i don't see your repos on github anymore.

Categories

Resources