Off-Topic Discussion for kitchen users

Search This thread

bkores

Senior Member
Aug 12, 2016
813
615
Staten Island, NY
Yep, that's how I do it. Except you dont have to rename your apk files, they'll open up in archive just like a zip. With jar files I just push without having to drag anything to the original and they'll work.

If you ever decide to modify the framework-res or certain system apps like secsettings, camera, contacts, and probably some others, I have to do those with Windows and winrar because they dont seem to work with the normal compression mode. Winrar lets you change the compression mode from normal to store. Thats the only I can get those working.

But for SystemUI and Settings the regular compression mode will work, correct?
 

SuperR.

Recognized Developer
Mar 23, 2014
2,577
8,536
Invisible
So would it be like this:

1) Install frameworks
2) Decompile apk
3) Make modifications
4) Rename APK file to .zip to allow for pasting res and resources.arsc
5) Paste modified res and resources.arsc into the zip archive.
6) Rename the zip archive back to an apk file.
7) Push apk to /system/priv-app/SystemUI/SystemUI.apk.
8) Perform chmod 0644 on the apk.

I'm a complete noob at this so I want to make sure I'm doing everything right.
Moved this conversation to the off-topic thread.

The apktools plugin does all this work for you :)
 
  • Like
Reactions: kevintm78

Loakidog

Senior Member
Oct 30, 2016
77
8
I really need help porting a rom. I have been trying for months with absolutely not an ounce of success. I feel like I have reviewed every rom porting guide on xda a hundred times and I have not a single clue what I am doing wrong. If I upload all the information I have in regards to exactly the rom can you please help me. Anyone?
 

Kaiyum

Senior Member
Sep 22, 2012
91
13
Does anyone have any idea how one could partition mmcblk0 to shrink /SYSTEM and give that space to /DATA...? Parted doesn't work for some reason...
 

cmdmoto

Senior Member
Nov 15, 2013
320
204
Texas
I am sure I'm going to get flamed for this, and I honestly don't like asking for help because you can find any answer online nowadays, but i have searched all over for the answer and I am coming up short with too many different answers and not any solutions. I am having issues trying to get apk's to install with the ROM(ie. Nova launcher, adding fonts, etc). I am attempting to have the apk's to be flashed along with the ROM but to no avail. I have placed them in /system/app and system/piv-app, I have left them zipped, unzipped, taken out META_INF... I don't know if I am suppose to modify update script; decompile, modify it, recompile, sign, and move it back; or just sign the apk, set permissions properly, I'm at a lose here. I have successfully taken a stock Note 4 ROM, doedexed, removed some bloat manually, zip aligned, added magisk, removed knox/Itson, updated build props. I just want to add some apk's, fonts, and 5 way reboot. Any help or link would be greatly appreciated.
 

Kaiyum

Senior Member
Sep 22, 2012
91
13
I am sure I'm going to get flamed for this, and I honestly don't like asking for help because you can find any answer online nowadays, but i have searched all over for the answer and I am coming up short with too many different answers and not any solutions. I am having issues trying to get apk's to install with the ROM(ie. Nova launcher, adding fonts, etc). I am attempting to have the apk's to be flashed along with the ROM but to no avail. I have placed them in /system/app and system/piv-app, I have left them zipped, unzipped, taken out META_INF... I don't know if I am suppose to modify update script; decompile, modify it, recompile, sign, and move it back; or just sign the apk, set permissions properly, I'm at a lose here. I have successfully taken a stock Note 4 ROM, doedexed, removed some bloat manually, zip aligned, added magisk, removed knox/Itson, updated build props. I just want to add some apk's, fonts, and 5 way reboot. Any help or link would be greatly appreciated.
Depends really on the nature of the apk you are preinstalling in the rom..Nova launcher for instance needs to be the only launcher in the rom to be the default (or at least that is what i do) Remove touchwiz and emergency launcher (im unfamiliar with the apk structure of Note but im on Samsung so..)
Before creating the zip always zip align if you enter new apk files...
Apks should be in /system/app/ApkNameDir/Apk.apk.

Nova launcher does not require any special moves to be preset in roms,just to be the ONLY launcher.

Im not sure the /ApkNAMEDIR/Apk.apk structure is needed but it works for me.

It seems you are expecting too much of an answer,that is the reason they seem insufficient when you read them...

Also keep in mind that some apps will NOT work as system or priv-app apps,you should place those apps in the data/app dir by selecting 8 and then 5 (add data directory).

Sometimes you need to do a separate search for each "feature" you wish to add if you encounter any problems..Rpm specific,android specific or even mood specific bugs can turn up many times...

Sent from the depths of outer space using highly potent telepathically altering mushrooms.
 
  • Like
Reactions: cmdmoto

zombie_ryushu

Senior Member
Oct 18, 2016
130
3
I'm trying to use Super R Kitchen to port the Lineage OS Rom from a MicroMax A102 to that of a BLU Studio 5.0C, both of which are MediaTek 6572 Devices. I would like help understanding this application to achieve this Goal. I'm really struggling.
 

bcrichster

Senior Member
Jun 6, 2013
1,218
833
I'm trying to use Super R Kitchen to port the Lineage OS Rom from a MicroMax A102 to that of a BLU Studio 5.0C, both of which are MediaTek 6572 Devices. I would like help understanding this application to achieve this Goal. I'm really struggling.
If it's not from the same carrier, then you'll need to flash an APN fix as well since Vendor files will be a bit different

Sent from my N9515 using Tapatalk
 
  • Like
Reactions: SuperR.

bcrichster

Senior Member
Jun 6, 2013
1,218
833
They are Carrier Free Unlocked MediaTek devices.
Not sure on that as I haven't messed with those kind yet, but you WILL need to learn the device (that you're working on)'s codename and make appropriate changes in updater script so that it'll pass the assert checks. If that device doesn't even have a custom recovery yet, stop right there and make the recovery 1st or you'll not even have a way to flash the ROM ya made

Sent from my N9515 using Tapatalk
 
  • Like
Reactions: SuperR.

zombie_ryushu

Senior Member
Oct 18, 2016
130
3
Not sure on that as I haven't messed with those kind yet, but you WILL need to learn the device (that you're working on)'s codename and make appropriate changes in updater script so that it'll pass the assert checks. If that device doesn't even have a custom recovery yet, stop right there and make the recovery 1st or you'll not even have a way to flash the ROM ya made

Sent from my N9515 using Tapatalk
They have TWRP recovery and Root.
 

zombie_ryushu

Senior Member
Oct 18, 2016
130
3
Okay,. let me give you a better idea what I have in my inventory.

I have two BLU Studio 5.0C D536U. Both have TWRP installed, but they are running the stock Rom. One is Pink, one is Blue. They both run Android 4.4.2 KitKat.
I have a full Rom Dump of one of them. (They have a few OTA Updates, but I really don't think that matters.)
I have a system.img of the second one fully extracted. This was dumped using SP Flash Tools.
I have a TWRP extracted boot.emmc.win of the second one.
I have a copy of boot.img from the version of TWRP I downloaded for the BLU Studio 5.0C D536U.

I have a LineageOS Rom for a MicroMax A102. Its an Andoid Nougat Rom using Kernel 3.4.67. The two devices are very similar as they both have MTK 6572 CPUs and Mali 400 GPUs. The limitation on them is in the arena of free space, and RAM.
I have the latest Android Super R Kitchen.

---------- Post added at 02:04 AM ---------- Previous post was at 02:03 AM ----------

Okay,. let me give you a better idea what I have in my inventory.

I have two BLU Studio 5.0C D536U. Both have TWRP installed, but they are running the stock Rom. One is Pink, one is Blue. They both run Android 4.4.2 KitKat.
I have a full Rom Dump of one of them. (They have a few OTA Updates, but I really don't think that matters.)
I have a system.img of the second one fully extracted. This was dumped using SP Flash Tools.
I have a TWRP extracted boot.emmc.win of the second one.
I have a copy of boot.img from the version of TWRP I downloaded for the BLU Studio 5.0C D536U.

I have a LineageOS Rom for a MicroMax A102. Its an Andoid Nougat Rom using Kernel 3.4.67. The two devices are very similar as they both have MTK 6572 CPUs and Mali 400 GPUs. The limitation on them is in the arena of free space, and RAM.
I have the latest Android Super R Kitchen.

If you have an IRC or any other chat channel, please say so.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    Not a silly question. I believe I have the answer, but I am not completely sure.

    In the case of setting a file as immutable, I believe this is a file capability called CAP_LINUX_IMMUTABLE. According to capabilities.h, it has a value of 9.

    Thanks to this post by @Captain_Throwback, we can turn that "9" into a value recognized by fs_config-system.

    Code:
    2^9=512

    Now that we have the correct value (512), we can add it to the file in fs_config-system

    Code:
    system/file/to/change 0 0 0644 capabilities=512

    Save the file and build system.img.

    Reminder, I am not absolutely sure this will do what you want, but I think it will. Good luck :)

    EDIT: Now I think I am completely wrong lol. The above should give a file permissions to modify immutable files. I have no idea how to set immutable files in e2fsdroid. I did some testing, set a file immutable, looked at the file permissions, and they did not change.
  • 6
    This thread should serve as a much needed place for kitchen users to discuss anything not exactly kitchen related :)
    3
    @Kaiyum @cmdmoto @jazzespresso

    Moved this conversation over here. Talk as much as you like :)
    2
    @Mr Hassan, @The Exploiter
    Moved your posts into this thread as they are off topic for the kitchen. Feel free to continue here if you would like :)
    2
    @shoey63 and @kevintm78 I run Linux, why does everyone assume we are all running Windows LOL... ;)

    Anyhow I like to do things by hand, I thought the Kitchen Master would have some tricks up his sleeve.

    Looks like @bcrichster gets the prize! Signing it seems to of done the trick, the signed apk boots... :)

    So after a bit of Googling I came up with this;

    I ran the cmds in /etc/ssl/localcerts

    openssl genrsa -out key.pem 1024
    openssl req -new -key key.pem -out request.pem
    openssl x509 -req -days 9999 -in request.pem -signkey key.pem -out certificate.pem
    openssl pkcs8 -topk8 -outform DER -in key.pem -inform PEM -out key.pk8 -nocrypt

    For now I'm using/testing this signapk.jar; https://github.com/appium/sign not sure if it matters to use this signapk.jar or I really need it from Google?

    I also found this uber-apk-signer;

    https://github.com/patrickfav/uber-apk-signer

    I also found the Google version;

    https://android.googlesource.com/platform/prebuilts/sdk/+/master/tools/lib?autodive=0//

    You can download the entire /lib directory on the tgz link which has the Google signapk.jar in it. All I know is there's a lot going on between appium's version and Google, not really sure I need the Google one? hmm

    I tried to sign with the Google version it doesn't work it wants other libraries I don't have; (so much for this version)

    Caused by: java.lang.IllegalArgumentException: Failed to load any of the given libraries: [conscrypt_openjdk_jni-linux-x86_64, conscrypt_openjdk_jni-linux-x86_64-fedora, conscrypt_openjdk_jni]

    Then I signed the apk with the appium version;

    java -jar signapk.jar /etc/ssl/localcerts/certificate.pem /etc/ssl/localcerts/key.pk8 framework-res.apk test.apk


    By the way if anyone knows, when I compile the apk, I get back at the terminal, "could not find sources" and a lot of output about "has no default translation"

    I read that a framework-res.apk is itself the source of other apks and the message "could not find sources" is normal... hmm


    ./apktool b -c framework-res
    I: Using Apktool 2.3.4
    W: Could not find sources
    I: Checking whether resources has changed...
    I: Building resources...
    W: warning: string 'BIND_OEMEX_SERVICE' has no default translation.
    W: warning: string 'adb_active_generic_notification_message' has no default translation.
    W: warning: string 'adb_both_active_notification_title' has no default translation.
    I: Copy original files...
    I: Copy AndroidManifest.xml...
    I: Copy META-INF...
    I: Building apk file...
    I: Copying unknown files/dir...
    I: Built apk...

    Thanks

    P.S. @SuperR. sorry for Off Topic... :(
    2
    Hey @SuperR. I have a general apktool question.

    I want to make some SystemUI mods for my ROM.

    When recompiling SystemUI does it need to be signed, zipaligned, or both?

    Your tool is awesome btw.

    For system apps, I use winrar, or if using linux the default archive manager, to move the modified files into the original. I try to keep the meta-inf, sec-inf, and androidmanifest.xml intact on the original app and just drag the res, classes.dex (if modifying smali), and resources.arsc into the original. Then just zipalign.

    Thats worked for me on 6.0.1, I think some things may have changed with 7.0.1 and I'm by no means an expert but thats how I do it.
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone