Tools needed :
My KIT for SMALI files (using options for each step )
Notepad++( Hexadecimal editor for *.xml )
_______________ Power Menu modded ______________
{
"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"
}
Open my zip kit ( recomended in a Theming Folder for example with apkmanager and all files you would like to mod )
What you get :
Baksmali
Baksmali ( executable Jar File )
Command.exe ( Shell file )
Notepad text with the two commands for decompile and compile already made for you ( just copy and paste into command.exe )
Smali
Smali ( executable Jar File )
1.Pull out android.policy.jar ( located in /framework from the rom you are running.
2.Place it in the file where you unzip my Smali kit.
Example : C:\SMALI\android.policy.jar
3. You need to decompile android.policy.jar :
Open the cmd ready for you in the kit and paste
Code:
java -jar baksmali.jar -x android.policy.jar -o classout
(classout folder can be renamed to whatever you want, doesnt matter until you dont forget to change the name too in the second command)
4. Make the modifications you want for smali files, in this case : Open Global.Actions.smali with Notepad++
located in \\classout\com\android\internal\policy\impl\
5. CTRL+F to search the line "settitle"
Just over it, you should see a line looking like
Code:
const v2, 0x1040120
change to :
Code:
const v2, 0x1040017
6. Compile again android.policy.jar :
Open the cmd ready for you in the kit and paste
Code:
java -Xmx512M -jar smali.jar classout -o classes.dex
7. Copy and paste the file classes.dex into android.policy.jar _ you will overwrite the old "classes.dex"
8. Replace your modded android.policy.jar and flash it _ Enjoy your new Power Menu
Thanks to Rafalense
thanks a lot ..was looking for this one too ... you my friend are truly awesome
Thread closed at OP request.
Related
I have currently developed 90% of my app, and i need help at the last part.
I want to thange the default database path to another user spezified path.
i get an error when i try this:
Code:
String myPath = "/data/data/com.android.providers.settings/databases/settings";
SQLiteDatabase myDB = SQLiteDatabase.openDatabase(myPath, null,SQLiteDatabase.OPEN_READWRITE);
The Debug monitor shows:
Code:
FATAL EXCEPTION: main
android.database.sqlite.SQLiteException: unable to open database file
i hope someone here can help me
It can't open it because it's not there.
You need to create the DB in that "settings" subdirectory. Or you can just use adb shell and copy the DB to .../settings.
the database exists, found with root explorer
when i want to acces the database with:
SQLiteDatabase myDB = set.this.openOrCreateDatabase("/data/data/com.android.providers.settings/databases/settings.db", MODE_PRIVATE, null);
it says, unable to open file, that means that the database not exists, but there is one, please, thats the last part, i need help
ilendemli said:
Code:
String myPath = "/data/data/com.android.providers.settings/databases/settings";
SQLiteDatabase myDB = SQLiteDatabase.openDatabase(myPath, null,SQLiteDatabase.OPEN_READWRITE);
Click to expand...
Click to collapse
Didn't you forget the ".db" at the end of /data/data/com.android.providers.settings/databases/settings ?
tryed with db and without db, the same problem:
Code:
SQLiteDatabase myDB = set.this.openOrCreateDatabase("/data/data/com.android.providers.settings/databases/settings.db", MODE_PRIVATE, null);
What does the Debug monitor shows when you do openOrCreateDatabase ? (can't be "unable to open database", if it were it would create it)
I am catching the Exception and showing the error as toast message,
at the debugger there is this error:
Database: sqlite3_open_v2("/data/data/com.android.providers.settings/settings.db", &handle, 6, NULL) failed
According to this link :http://www.sqlite.org/c3ref/open.html, you should be able to execute sqlite3_errmsg to have a description of the error.
But I have to admit that I don't know if you can do that easily with the SDK :/ I don't really know how it handles errors in this case (cause "failed" isn't really speaking to me ^^)
Edit : Hey, I just spotted something ! You missed your shot in writing the path to settings.db !
You wrote : /data/data/com.android.providers.settings/settings.db
It is : /data/data/com.android.providers.settings/databases/settings.db
I tryed it.. annd.... the same error..
if i try:
Code:
SQLiteDatabase myDB = set.this.openOrCreateDatabase("/data/data/com.android.providers.settings/databases/settings.db", MODE_PRIVATE, null);
it should normally create a new database at the dir.
when i type /data/data/.file/settings.db
there will be created the database, but at com.android.providers.settings/databases/ or all other com.* folders, it haves no permission.. :/
Try to add WRITE_SECURE_SETTINGS permission to your manifest then. Perhaps it will unlock it
Code:
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
<uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS"/>
alot of permissions xD i will try it
€: nope, no permission.
Well, I think I've reached my limit ^^
I'll go with the "If you don't have and can't have the permission to touch it, then don't" and try to find an API that do the things you want.
BTW, can you explain what you want to do with this DB ?
i want to change "wifi_http_proxy" and "wifi_http_port"
Are you sure that these fields even exist ?
I can find http_proxy, but no wifi_http_proxy nor wifi_http_port :/
which android do you have? 2.1? or 2.2?
2.2, but I'm using the official SDK website as a reference (and Google, obviously ^^)
can you change proxy settings manually?
Virtual Device:
{
"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"
}
My Phone:
Yes, I have the same screen as yours (2nd one).
hmm.. have you ever tryed to change the settings? try it to change, and then open the database /data/data/com.android.providers.settings/databases/settings.db -> system and then look for "wifi_http_proxy" and "wifi_http_port"
I'll try it once I get home. I'm at work now, and they locked the possibility to connect something with USB :/
I'll tell you what I'll see.
Hello XDA :victory:
I just finished making a simple yet useful backup app for Android 4.0.3+ (Root needed)
It can:
Make a Nandroid backup of the following partitions: /data, /cache, /android-secure, /sd-ext, /system
Copy all user installed APK's into the sdcard
Simple, yes, but somewhat useful
Screenshot:
{
"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"
}
Change log:
7/26
-Option to make a full Nandroid backup
-Changed some GUI
To install:
1. Install this APK.
2. copy this file AND this file to system/bin and set permissions as 655, or run this in adb:
1. "adb push xdevilium_onandroid_data_backup system/bin"
2. "adb push xdevilium_onandroid_backup system/bin"
3. "adb shell chmod 655 system/bin/xdevilium_onandroid_data_backup"
4. "adb shell chmod 655 system/bin/xdevilium_onandroid_backup"
Credits: The creator of "onandroid" script (sorry, i forgot the username )
I see that you are using an old version of Online Nandroid. I would really appreciate if you could keep it upto date.
Btw, great attempt at an app.
ameer1234567890 said:
I see that you are using an old version of Online Nandroid. I would really appreciate if you could keep it upto date.
Btw, great attempt at an app.
Click to expand...
Click to collapse
I can't, sorry, I lost the source code and I'm working on Newgen and XDA ROM HUB now
Is it similar to the "App2zip"?
Two issue, i can download apk file but i can't download other 2 files, i receive a text web page.
Eg:-
echo "##########################################"
echo "XRH Nadroid Data Backup"
echo "* This tool backups /data partition."
echo "* It is fully compatible with nandroid."
echo "* Based on 'onandroid' By Ameer Dawood"
echo "##########################################"
echo ""
# Define constants
path="/sdcard/clockworkmod/backup"
safety=7
name="none"
tz="u"
req_power=10
sdcard_temp_mount="/mnt/sdcard4nandroid"
logfile=/data/local/tmp/onandroid.log
# Logging function
mkdir -p /data/local/tmp
[ -f $logfile ] && busybox rm $logfile
logmsg(){
message="$*"
dtime=`busybox date +%T`
echo -e "$dtime $message"
echo "$dtime $message" >>$logfile
if [ "`busybox which log`" != "" ]; then
log -p i -t onandroid "$message"
fi
}
# Process arguments
if [ $# -gt 0 ]; then
if [ $1 == "--help" ]; then
# Display usage instructions
clear
echo ""
echo "Usage: xrh_backup_script [OPTIONS] [NAME]"
echo ""
Click to expand...
Click to collapse
android addicts said:
Is it similar to the "App2zip"?
Two issue, i can download apk file but i can't download other 2 files, i receive a text web page.
Eg:-
Click to expand...
Click to collapse
Right click, save page as
I'm having trouble getting this to work. Is there anyway you can all the install steps into the app for me
Sent from my SCH-I800 using Tapatalk 2
hello guys,yesterday i flashed smoothrom 4.1 and everything was fine. Today i noticed that some root apps are telling me to allow root access through supersu. In supersu i found that all my root apps were granted.Then i downloaded Root checker from google play and it is telling me i have no root. I have already tried flashing supersu.zip from TWRP....after booting backup it is still not rooted. Any solution for this.i am willing to reflash everything except wiping my device.
{
"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"
}
more details from root cheker pro : Root Access is not properly configured or was not granted.
Super User Applications Status:
Superuser application - is NOT installed!
SuperSU application - version 1.25 - is installed!
System File Properties for Root Access:
Alternative Location
Check Command: ls -l /sbin/su:
Result: /sbin/su: Permission denied
Analysis: File system permissions restricted and denied access.
Standard Location
Check Command: ls -l /system/xbin/su:
Result: -rwsr-sr-x root root 96260 2013-03-21 15:36 su
Analysis: Setuid attribute present and root user ownership present. Root access is correctly configured for this file! Executing this file can grant root access!
Standard Location
Check Command: ls -l /system/bin/su:
Result: /system/bin/su: No such file or directory
Analysis: File /system/bin/su does not exist.
Alternative Location
Check Command: ls -l /system/xbin/sudo:
Result: /system/xbin/sudo: No such file or directory
Analysis: File /system/xbin/sudo does not exist.
Root User ID and Group ID Status:
SU binary not found or not operating properly
System Environment PATH: /sbin /vendor/bin /system/sbin /system/bin /system/xbin
ADB Shell Default User:
ADB shell setting for standard access, stored in default.prop, is configured as: shell (non root) user - ro.secure=1
Results provided on your Nexus 7 device by Root Checker Pro version 1.3.1 from joeykrim in the Android Market - http://goo.gl/NcnHn
problem solved
i myself don't know what i did...but i have root access again
i have install " BOCHS APP" on my device and i make Image for windows xp using virtual machine
after i copy file " XP " and run BOCHS win xp not working i make all change on file bochsrc.txt
and still not working
Code:
###############################################################
# bochsrc.txt file for DLX Linux disk image.
###############################################################
# how much memory the emulated machine will have
megs: 384
cpu: count=2, ips=6000000, reset_on_triple_fault=1, ignore_bad_msrs=1
# filename of ROM images
romimage: file=BIOS-bochs-latest
vgaromimage: file=VGABIOS-lgpl-latest
vga: extension=cirrus, update_freq=50
pci: enabled=1, chipset=i440fx, slot1=cirrus
# what disk images will be used
#floppya: 1_44=W98RUS.img, status=inserted
#floppyb: 1_44=floppyb.img, status=inserted
# hard disk
ata0: enabled=1, ioaddr1=0x1f0, ioaddr2=0x3f0, irq=14
ata1: enabled=1, ioaddr1=0x170, ioaddr2=0x370, irq=15
ata0-master: type=disk, path="xp"
#ata0-slave: type=disk, path="d.img"
ata1-master: type=disk, mode=vvfat, path=/sdcard/hdd, journal=vvfat.redolog
#type=cdrom, path="RUSW95B_USB.ISO", status=inserted
# choose the boot disk.
boot: c
# default config interface is textconfig.
config_interface: textconfig
#config_interface: wx
#display_library: x
# other choices: win32 sdl wx carbon amigaos beos macintosh nogui rfb term svga
# where do we send log messages?
log: bochsout.txt
sb16: enabled=1
# disable the mouse, since DLX is text only
mouse: enabled=1
# enable key mapping, using US layout as default.
#
# NOTE: In Bochs 1.4, keyboard mapping is only 100% implemented on X windows.
# However, the key mapping tables are used in the paste function, so
# in the DLX Linux example I'm enabling keyboard_mapping so that paste
# will work. Cut&Paste is currently implemented on win32 and X windows only.
#keyboard_mapping: enabled=1, map=$BXSHARE/keymaps/x11-pc-us.map
#keyboard_mapping: enabled=1, map=$BXSHARE/keymaps/x11-pc-fr.map
#keyboard_mapping: enabled=1, map=$BXSHARE/keymaps/x11-pc-de.map
#keyboard_mapping: enabled=1, map=$BXSHARE/keymaps/x11-pc-es.map
there any help how i can make config for note 3
sorry for my bad english
you renamed c.img to xp here
ata0-master: type=disk, path="xp"
#ata0-slave: type=disk, path="d.img"
ata1-master: type=disk, mode=vvfat, path=/sdcard/hdd, journal=vvfat.redolog
#type=cdrom, path="RUSW95B_USB.ISO", status=inserted
# choose the boot disk.
boot: c
Click to expand...
Click to collapse
... why ?
U should rename it back to c.img
ata0-master: type=disk, path="c.img"
#ata0-slave: type=disk, path="d.img"
ata1-master: type=disk, mode=vvfat, path=/sdcard/hdd, journal=vvfat.redolog
#type=cdrom, path="RUSW95B_USB.ISO", status=inserted
# choose the boot disk.
boot: c
Click to expand...
Click to collapse
and rename xp img you made to c.img and put it on SDcard/SDL/ (device storage not external) like this :
{
"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"
}
and you should be able to run it
tips :
Change ram to 512 or 1024 or even 1536
# how much memory the emulated machine will have
megs: 512
Click to expand...
Click to collapse
U can add files and folders to drive d:/ on win xp by copying them to sdcard/HDD
Reply if it worked or not
....
If its possible , can you uploud xp img cuz i tried w98 and it worked but it's very old
Simple Guide To make Pin Lockscreen from:
{
"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"
}
To
Requirements:
1. Knowledge of compiling/recompiling apk
2. Framework-res.apk of your phone
Steps:
1. De-compile framework-res.apk
2. After decompiling go to framework-res.apk\res\values folder and open arrays.xml
3. In arrays.xml find
Code:
<string-array name="lockscreen_num_pad_klondike">
It must be like this
Code:
<string-array name="lockscreen_num_pad_klondike">
<item></item>
<item></item>
<item>ABC</item>
<item>DEF</item>
<item>GHI</item>
<item>JKL</item>
<item>MNO</item>
<item>PQRS</item>
<item>TUV</item>
<item>WXYZ</item>
</string-array>
Simply remove all alphabets from it abc,def, so on
So that it look like this
View attachment 3098201
Save and close it.
4. In same folder open styles.xml and find
Code:
<style name="Widget.Button.NumPadKey" parent="@style/Widget.Button">
It must be something like this
Code:
<style name="Widget.Button.NumPadKey" parent="@style/Widget.Button">
<item name="textSize">34.0dip</item>
<item name="textStyle">normal</item>
<item name="textColor">#ffffffff</item>
[COLOR="Red"]<item name="gravity">left|center</item>[/COLOR]
<item name="background">?selectableItemBackground</item>
[COLOR="Red"]<item name="paddingLeft">20.0dip</item>[/COLOR]
<item name="paddingBottom">10.0dip</item>
<item name="singleLine">true</item>
<item name="fontFamily">sans-serif</item>
</style>
Simply change the red line with this
Code:
<item name="gravity">center</item>
Code:
<item name="paddingLeft">0.0dip</item>
Remeber 20.0dip we changed to 0.0dip will use it later. [maybe it is different in your case whatever it is just remember it]
So that the whole code looks like this
View attachment 3098219
We just made the keys 1,2,3 etc in center
5. Now go to framework-res.apk\res\layout folder and open keyguard_pin_view.xml
Find this line
Code:
<[COLOR="Red"]ImageButton androidprv:id="@id/key_enter"[/COLOR] androidprv:paddingRight="30.0dip" androidprv:layout_width="0.0px" androidprv:layout_height="fill_parent" androidprv:src="@drawable/sym_keyboard_return_holo" androidprv:layout_weight="1.0" androidprv:contentDescription="@string/keyboardview_keycode_enter"
style="@style/[COLOR="Red"]Widget.Button.NumPadKey[/COLOR]" />
Since we changed the style of Widget.Button.NumPadKey to fix it for enter key we will add this in the above line.
Remember the 20.0dip we changed its placed here if something else in your case put that
Code:
androidprv:paddingLeft="20.0dip"
Now new line will look like this
Code:
<ImageButton androidprv:id="@id/key_enter" [COLOR="Red"]androidprv:paddingLeft="20.0dip"[/COLOR] androidprv:paddingRight="30.0dip" androidprv:layout_width="0.0px" androidprv:layout_height="fill_parent" androidprv:src="@drawable/sym_keyboard_return_holo" androidprv:layout_weight="1.0" androidprv:contentDescription="@string/keyboardview_keycode_enter" style="@style/Widget.Button.NumPadKey" />
Since we made the keys in center then pin we enter is not above the 2 key so to make the pin in center find
Code:
<TextView androidprv:textAppearance="@style/TextAppearance.NumPadKey" androidprv:gravity="center" [COLOR="Red"]androidprv:id="@id/pinEntry"[/COLOR] androidprv:background="@null" androidprv:paddingLeft="40.0dip" androidprv:layout_width="0.0dip" androidprv:layout_height="fill_parent" androidprv:cursorVisible="false" androidprv:singleLine="true" androidprv:editable="true" androidprv:layout_weight="1.0" androidprv:imeOptions="actionDone|flagForceAscii" androidprv:layout_marginStart="@dimen/keyguard_lockscreen_pin_margin_left" />
Add this in the above line
Code:
androidprv:paddingLeft="40.0dip"
Just double of 20.0dip
Now changed line will look like this
Code:
<TextView androidprv:textAppearance="@style/TextAppearance.NumPadKey" androidprv:gravity="center" androidprv:id="@id/pinEntry" androidprv:background="@null" [COLOR="Red"]androidprv:paddingLeft="40.0dip"[/COLOR] androidprv:layout_width="0.0dip" androidprv:layout_height="fill_parent" androidprv:cursorVisible="false" androidprv:singleLine="true" androidprv:editable="true" androidprv:layout_weight="1.0" androidprv:imeOptions="actionDone|flagForceAscii" androidprv:layout_marginStart="@dimen/keyguard_lockscreen_pin_margin_left" />
6. Save and Recompile and replace framework-res.apk and enjoy clean beautiful lockscreen.
If you like It Hit Thanks Button