[Q] Some System related questions about Android 4.0 smart TV BOX - General Questions and Answers

hello everyone,
please pardon my english.
i have a android tv box device. It s rooted and running quite good but i want to do some modifications on that device like removing any picture during boot, hiding status bar etc. ive achieved some of those but i have still some unanswered questions about the device and main concepts of android system.
first of all
i want to make permenant changes on init.rc file. When I edit that file on rooted device, it gets overwritten to default values when system reboots. The system also overwrites some files like initlogo.1080i.rle on / (root) directory.
Is it possible to prevent this behavior of the rom from android operating system / or from any other domain?
Is it possible to create a rom zip file with mine init.rc and *.rle files , and install it from recovery?
Also I want to start my own application coded by me to run on boot before the SystemUI OR I want to the SystemUI starts hidden and then my own application will run. But in all situations I don't want to be showed up android's UI.
Is it possible to hide navigation layout (bar) by adding a start-up parameter to the SystemUI's launch command which is placed in the init.rc file?
Thanks for your help.

Related

Apk Manager 4.9 - Makes Modifying Ur Apk A Breeze (Windows/Linux)

So i have written a simple script to ease the process of editing apks. Got a lot of downloads so thought its in demand
Whether you're doing basic image editing or editing the smali or xml files, on average u have to use (Brut.all or JF's smali/baksmali) awesome tool to extract the apk, edit it, then sign the apk and then adb push/install it. This process is quite tiresome if you are testing a method that needs fine tweaking.
This script should make the process a LOT smoother.
Theres an option of compiling/signing/installing all in one step
Thanks:
Goes to Brut.all for his awesome tool.
Goes to JF for ofcourse, smali/baksmali
Goes to farmatito for porting this script to linux
Features:
- Extract, Zip apk's.
- Optimize pngs (ignores .9.pngs)
- Zipalign apks
- Sign apks
- Push to specific location on phone
- Incorporates brut.all's apktool
- Pull apk from phone into modding environment.
- Batch optimize apk (Zipalign,optipng,or both)
- Quick sign an apk (Batch mode supported)
- Batch Ogg optimization
- Compression level selector (monitor status above menu)
- Batch install apk from script (option 16)
- Logging on/off has been removed. Instead a log.txt is created which logs the activities of the script organized using time/date headers
- User can change the max java heap size (only use if certain large apks get stuck when decompiling/compiling apks) (Option 19)
- Improved syntax of questions/answers
- Error detection. Checks if error occured anytime u perform a task, and reports it
- Read log (Option 20)
- U can now set this script as ur default application for apks. When u do, if u double click any apk it will install it for u.
- Supports batch installation, so if u drag multiple apks into the script (not while its running) it will install them all for u. U can ofcourse drag a single apk as well
- Added framework dependent decompiling (For non propietary rom apks). (Option 10). Checks whether the dependee apk u selected is correct.
- Allows multiple projects to be modified, switch to and from.
- Allows to modify system apk's using apktool but ensures maximum compatibility in terms of signature / manifest.xml
- Stuff i forgot i guess
Instructions (Windows):
- Place apk in appropriate folder (Any filename will work, if running for first time folders will not be there, you must run and then the folders will be created)
- Run script
- Minimize the script
- Edit files inside the project folder
- Maximize the script
Instructions (Linux):
- Place apk in appropriate folder (Any filename will work, if running for first time folders will not be there, you must run and then the folders will be created)
- Open terminal and change-directory to apkmanager (Easiest way is to type "cd ")
- Chmod 755 Script.sh
- Chmod 755 all files apps inside other folder (thanks for the tip bkmo )
- Run script by typing ./Script.sh
- Minimize the script
- Edit files inside the out folder
- Maximize the script
Requirements:
Java
Adb
Future Improvements:
- Manage multiple simultaneous apk edits (choose which apk to extract/build)
- Option to optimize the apks
- Option to adb push to user defined location
- Other stuff i dont know yet
Got problems ?
1. Make sure your path has no spaces
2. Your filename has no wierd characters
3. Java/adb are in your path
4. It's not a proprietary rom's apk (aka Sense,Motorola,Samsung) (If u are, then use option 11 and drag the required framework, eg com.htc.resources, twframework-res...etc)
5. It's not a themed apk (if it is, expect .9 png errors, use as close to stock as possible)
6. Look at the log to know whats happening
7. If all else fails, post as much info as possible and we will try to assist you.
MOD EDIT:
New DL link from this post
http://apkmultitool.com
Nice
As you probably know, I want to add signing and installing functionality to apktool. But I don't plan to make any kind of GUI for it, so such wrapper is a very good thing for many users, thanks
What is "Option to optimize the apks"?
I was thinking of incorporating the script "apkopt" it was basically using optipng to optimize the png's and then used zip align on the apks. Thanks btw, this tool wudnt exist without ur awesome script
I just did this so ppl would stop asking questions like "How do i change this/that in an app"
Here this is wht im talking about Link
Very nice
Thanks dude...
once again you manage to make modding easier with your scripts!
Does your apkopt avoid .9.png files? Because those have been a pain in the behind.
Re: Apk Manager 1.0 - Makes Modifying Ur Apk A Breeze
my script currently does not optimize apks. it will be in the upcoming updates and yea prolly when ill implement itll avoid .9.pngs lol
I have already incorporated "adb push" into the script.
Aside from adding an option to optimize the apks, is there anything else you guys think would make this script easier to use ?
Im really targetting those ppl who overcomplicate the simple process of editing apks. Any tips would be appreciated.
I posted a video attached to the main post.
New version out, features added are
Zipalign apks
Optimize pngs, ignores .9.pngs
allows to adb push to phone through script.
Great script man, it works flawlessly. You may just wanna edit your post #1 rather than continuously bumping with new posts for every update. I'm sure a mod won't be too pleased with that
I'm getting the
'java' is not recognized as an internal or external command, operable program or batch file​message when I attempt to sign an apk. I tried switching the PATH in Environment Variables so that it's pointing to my Java bin folder, but then I just end up with
java.io.FileNotFoundException: ..\place-apk-here\repackaged-unsigned.apk <The system cannot find the file specified>
at java.util.zip.ZipFile.open<Native Method>
at java.util.zip.ZipFile.<init><Unknown Source>
at java.util.zip.ZipFile.<init><Unknown Source>
at java.util.zip.ZipFile.<init><Unknown Source>
at com.android.signapk.SignApk.main<SignApk.java:320>
Could Not Find C:\ApkManager2.0\place-apk-here\../place-apk-here/repackaged-unsigned.apk​Help? :]
What app are you trying to edit ? also are you editing pngs only or code editing ?
Hop on Here im helping someone out so ill help u 2
There's a lot of things in /system that benefit from the optimized .pngs. Vending.apk, for instance, shrunk to half the size and runs a bit quicker and smoother now. Even framework-res.apk enjoyed the optimization. Paid apps, on the other hand, don't seem to fare so well; perhaps they check the md5sum of the app or something.
Yea png optimization works for almost all apks, zipalign on the other hand as i recall doesnt work on certain system apks such as settings.apk. Im prolly gonna incorporate apkopt's script into this which would allow to optimize a folder full of apks. As for paid apps not being optimized, a lot of dev already do their part on making the apk as small as possible, so perhaps thats the case.
hmm, after trying a couple of unpaid apps, it seems that perhaps the testkeys aren't compatible with my build. For any signed app, I get an error "Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE]"
Yes when u modify a non system apk, they need to be resigned, and you cannot resign it with same key as dev cuz u dont know it hence anytime u modify an app, u must uninstall it, install the modded version, and from then on any change u make u dont have to uninstall as the keys will match
ahhh thanks. My mistake was just removing the package rather than uninstalling it.
Getting this on a zipalign. The file is there but it is repackaged-unsigned.apk and throws this error:
Please make your decision: 5
Unable to open 'E:\ApkManager\place-apk-here\repackaged-signed.apk' as zip archi
ve
Could Not Find E:\ApkManager\place-apk-here\repackaged-signed.apk
The system cannot find the file specified.
Nevermind....looks like it is by design that it tries both signed and unsigned and throws the error on the file that does not exist. It's just I did not see any zipalign output
having an issue that when I go to resign an apk the file deletes after running the script.. am I missing something here?

[GUIDE][INFO] How to Unbrick your Softbricked device without any CWM/TWRP restores

Sick of taking huge sized nandroid backups before applying any tiny tweak/MOD and then undergo the long painful procedure of restoring ??
Through this guide , I will tell you about some really simple yet effective ways to unbrick your soft-bricked phone/get out of boot loops.
Our Unbricking Weapon
Android Commander - http://forum.xda-developers.com/showthread.php?t=628138
About Android Commander - Android Commander is windows application to keep control on your android apps and files from PC.
It detects your device even when it is in a bootloop!
Click to expand...
Click to collapse
TIP : You need a kernel/ROM with root enabled for ADB otherwise the AndroidCommander program will give NO root access ( since it is operated via ADB)
Ok so below are some of the most common reasons of bootloops :
1. Incorrect/Incompatible Build.prop Tweaks - SomeBuild.prop tweaks which you add to your Build.prop file located in /system folder might not be compatible with your device's hardware or firmware and this causes bootloops .
For eg - Over Sized heap limit , changing rendering methods to those which are not supported etc.
Solution - Have a backup of your Build.prop file before adding/removing/changing any build.prop tweak (its doesnt even take 2 minutes ) and if you face a bootloop, simply replace your current build.prop file with your backed up one.
2. A corrupt/incompatible System application / jar file (for eg - a wrong framework-res.apk) - Most of the time when theming or modifying, we might replace a system app with a modified app which might not be made for our device/hardware. This can lead to both bootlooping and/or crashing of the app
Solution - Have a backup of the original apk or download it from anywhere and simply replace( delete the apk and push your downloaded apk ) it via AndroidCommander.
3-An incompatible bootanimation - a bootanimation which either has a wrong desc.txt file with wrong resolution or wrongly sized images can lead to bootlooping
Solution - simply replace the bootanimation.zip file located in /system/media folder with any compatible bootanimation.
4An incorrect/corrupt Dalvik Cache - This can be simply solved by wiping the dalvik cache in recovery. Btw, clearing cache and dalvik cache can solve most of the bootloops which are not caused by incompatible mods/tweaks.
5.An incorrect init.d script and/or a system file like a lib/configuration/property/firmware etc( like efg.cfg file missing )
Solution Delete if its an addition , correct it or simply replace it with an original one
Click to expand...
Click to collapse
Note
There are many other ways to get out of a boot loop like flashing a CWM zip to replace your corrupt file / mounting as USB storage via Recovery but personally i feel that this is the easiest and fastest way to recover from a soft-brick.
These are only a few which i remember, i will post more in the future. As you can see that i didnt go into details of each and every category since there are endless problems and solutions which are obviously very specific. My main motive was to spread this idea since it has really saved me the hassles of restoring a backup for every small tweak i apply. All of the above problems have occurred to my device for once at least. This method has saved me a lot of times , Hope this guide helped you :angel: No more getting scaredof Soft-Bricks :laugh:
Press Thanks:good: if this helped you
But i tried it got some data corruption errors. could not find proper guidance / help on that , after few days sold the device.

Incomplete SystemUI.apk?

UPDATE:
I was able to get apktool running on my Windows partition. After decompiling SystemUI.apk, I was able to find the strings.xml under res/values. But there's now a new problem, which is the fact that all of the quick settings labels here are in the correct cases whereas on the device they display in allcaps. What could be causing this?
Original post:
Currently I'm using an HDC G900F phone (Galaxy S5 clone) running rooted Android 4.2.2, and trying to change some text in the notifications panel quick settings. In the attached image, you can see that all of the toggle labels are in ALLCAPS and some of them have English spelling mistakes. What I want to do is change the text to correct upper/lower cases and correct the spelling errors (also rearrange them, if possible).
As I understand it, I need to modify some files under res/values in SystemUI.apk but the problem is that when I extract SystemUI.apk and decompress it (with Stuffit or any online APK decompiler), there is no "values" folder under res/ and none of the files from any of the SystemUI.apk modding guides I read seem to exist in my apk. What I want to ask is why these files don't seem to exist and what I can do to achieve the above objectives of correcting the toggle labels?
PS. Installing and using apktools on my Mac is not an option. When I run the installer from the Home Directory, it behaves as if apktools is already installed and takes me directly to the main menu but whenever I select any of the menu options, it says that the relevant command is not found, indicating that apktools is not installed. Clearly something has gone horribly wrong somehow here.
UPDATE:
Never mind. I give up.
So far something has gone wrong every step of the way and it's just too much of a hassle. Mac installation failed and won't let me reinstall, Windows installation failed to detect Java, Java reinstallation failed to be recognised by the system, apktool failed to install the framework, apktool failed to decompile the apt, apktool then fails to build the modded apt. Every step I've had to manually fix things and it's simply too much trouble for just changing a few strings of text on my device.
With a track record for having problems absolutely everywhere, I just uninstalled and deleted everything in case the next step blew up my computer or something.
I know the feeling....
Them feels...tho!

[Completed] How to customize blackview lollipop rom

Hi Guys,
Need some assistance here.
I want to customize the pre-install apps on my device (Meaning adding another)
I noticed there is already a DIR (/vendor/operator/app ) where facebook, twitter and all other .apk files is.
If I add another .apk file there, where is the script where I should state that it must also install the new .apk's?
Also selinux... if I change the bootanimation.zip in /system/media it default back to the standard Android bootscreen.
How do I further check my permissions? I did a getfacl on the original bootanimation.zip and a setfacl on new bootanimation.zip (permissions is the same)
What am I missing?
Is there some sort of basic guide for customizing the basics in Android 5.1?
Thanks
ryno.jacobs17 said:
Hi Guys,
Need some assistance here.
I want to customize the pre-install apps on my device (Meaning adding another)
I noticed there is already a DIR (/vendor/operator/app ) where facebook, twitter and all other .apk files is.
If I add another .apk file there, where is the script where I should state that it must also install the new .apk's?
Also selinux... if I change the bootanimation.zip in /system/media it default back to the standard Android bootscreen.
How do I further check my permissions? I did a getfacl on the original bootanimation.zip and a setfacl on new bootanimation.zip (permissions is the same)
What am I missing?
Is there some sort of basic guide for customizing the basics in Android 5.1?
Thanks
Click to expand...
Click to collapse
Hello,
What device do you have?
___
v7
XDA Assist

how to install flashable zip without recovery

I have root access, but i can't get into recovery if you want to know why .
So, only thing i want from my recovery, is to flash fde ai optimizer as i have perferct experience with mod (it's best)
I tried to unzip it (check it out) , and see it's update-script for twrp, and because there is only few executables, that needs to be placed into /system/etc , according to script, and according to file hierarchy in zip
I placed them, and i setted permissions for those 3 executables to 755 (rwxr-xr-x)
But that's as far my knowledge goes, i don't understand what other parts script does in order to bring it online for usage. So i don't know will it run if i just place them in that corresponding folder as i did?
Making that mod , is all i need to set up.
I run CM11 (kitkat , android 4.4 )on samsung galaxy J100H
@FeraVolt if you're available , to help me install your best mod
Edit: I don't want to use fde ai app, because i hate anything working in background, zip file fde ai works best, as there's no background (or at least minimal so i can't see it). and app is suceptible to android killing it after some time , i just don't like having app

Categories

Resources