Enable ZRam Compile Error - Galaxy Note II, Galaxy S III Developer Discussion

Sorry for bugging everyone again, but I'm in the process of trying to make my kernel and I enabled zram (since it worked for my GTab 10.1). Haven't modified any of the zram code. However, I got this compile error
Code:
drivers/gud/built-in.o: In function `.LANCHOR0':
mcDrvModule.c:(.data+0x0): multiple definition of `devices'
drivers/staging/built-in.o:xvmalloc.c:(.bss+0x3c0b50): first defined here
/home/Daniel/GTab10.1Dev/arm-2012.03/bin/arm-none-linux-gnueabi-ld: Warning: size of symbol `devices' changed from 4 in drivers/staging/built-in.o to 8 in drivers/gud/built-in.o
make[1]: *** [drivers/built-in.o] Error 1
make: *** [drivers] Error 2
Not exactly sure why this happens considering i haven't touched any of the gud drivers of staging/zram drivers at all.

Which device? Based on your sig (and which section you are posting in) I'd guess the i9300, but based on the error message (in particular "/home/Daniel/GTab10.1Dev/"), I'd guess your working on the gtab 10.1 kernel.
Perhaps a full set of steps to repeat? How did you go about enabling zram, stock kernel source or something else? Which toolchain?
Finally, do you understand the error? I won't criticize you if you don't, but it's pretty obvious (at least to me) what the error message is saying and how you should go about digging into it a bit deeper.
Take care
Gary

garyd9 said:
Which device? Based on your sig (and which section you are posting in) I'd guess the i9300, but based on the error message (in particular "/home/Daniel/GTab10.1Dev/"), I'd guess your working on the gtab 10.1 kernel.
Perhaps a full set of steps to repeat? How did you go about enabling zram, stock kernel source or something else? Which toolchain?
Finally, do you understand the error? I won't criticize you if you don't, but it's pretty obvious (at least to me) what the error message is saying and how you should go about digging into it a bit deeper.
Take care
Gary
Click to expand...
Click to collapse
No, I'm not working on the galaxy tab 10.1 kernel. It's just that all the stuff needed (tool chain, where I keep my modifications) are in that folder so I'm just sticking with it. The way I enabled zram was just to enable it in .config "CONFIG_ZRAM=1" which then asked me if I wanted to enable the "zram for android" feature which I said yes. The kernel souce I'm using is the CM10.1 smdk4412 source since I use cyanogenmod. I am using the code sourcey march 2012 tool chain.
I did attempt to find a fix to the problem based on what little bit I know. In both the zram driver or the "gud" driver I'm guessing the same variable or structure is defined twice but differently each time. I think this is analogous to being 2 people at once? I did a grep in file text search to see where either a variable or structure named "devices" would have been defined. In neither of those folders did I find "devices". Yes, admittedly I'm no top dog developer and make modifications I can for personal enjoyment and maybe publication if it seems worthy.
But yeah, I didn't find anywhere in the gud or zram drivers where "devices" is being named/defined as a variable or structure. If I did find it, wouldn't it be easier to make the one with the smaller definition size bigger since going the other way would cut off data while a bit of extra storage never hurt? That's when I was planning to go with.
I'm sorry if the fix is so obvious.

Sorry if my reply seemed confrontational... it wasn't intended that way...
I don't have the cm10 code handy on my phone (and won't be able to pull it and test compile for another day or so.)
However, can you try to rebuild the kernel after a "make clean" (or maybe a make target of mrproper even)? Also turn off ccache if you're using it. If that doesn't work, can you please post the kernel config so that someone else can drop it in and see if they get a similar result?
Sent from my SAMSUNG-SGH-I317 using Tapatalk 2

garyd9 said:
Sorry if my reply seemed confrontational... it wasn't intended that way...
I don't have the cm10 code handy on my phone (and won't be able to pull it and test compile for another day or so.)
However, can you try to rebuild the kernel after a "make clean" (or maybe a make target of mrproper even)? Also turn off ccache if you're using it. If that doesn't work, can you please post the kernel config so that someone else can drop it in and see if they get a similar result?
Sent from my SAMSUNG-SGH-I317 using Tapatalk 2
Click to expand...
Click to collapse
I didn't take it as confrontational. I like to say it's better to admit your short comings than to fake what you're not. I did do a make clean before starting. I'll paste in the relevant .config changes tomorrow.

Search inside the code of zram_dev.c (drivers/staging/zram/zram_drv.c), now search the word: "num_devices";
It should appear something like;
Code:
if (!num_devices) {
pr_info("num_devices not specified. Using default: 1\n");
[B] num_devices = 1;[/B]
}
there should appear value of 4 or 8; If the value there is 8, change it to 4, and if its value is 4, change it to 8
I don't know sure, but maybe you could fix it like this, or searching with grep -r "devices" /kernel/drivers/gud (and staging), and changing it with those values mentioned above

Related

[HOW-TO] Edit your user.conf

With all these new "hero" builds coming out/updates for them, it is important to have optimal settings. Many people are not sure how to do this so I thought I would take my time to write a quick how to.
I have also attached a user.conf that is setup with comp cache and backing swap, swappiness of 80. I set the cpu scaling from 384 to 528 Mhz. You may edit this with notepad++ if you would like swap instead. Just open the user.conf with notepad++ and make the changes you want (the file is pretty self explanatory) Just be sure to set compcache to 0 along with backing swap
Place the "user.conf" on your sd root, and use the commands mentioned below
P.S. I apologize in advance to the moderators if you feel this is not in the appropriate place or not necessary, just trying to make things a little bit easier
In Terminal type:
Code:
$su
#sh /system/bin/rwsystem
#cp -f sdcard/user.conf /system/bin/user.conf
*If your ROM does not support "rwsystem"* use:
Code:
mount -o remount,rw /dev/mtd/mtdblock3 /system
Once again, I have attached a user.conf along with the JAC kernel that includes the script which allows you to use "rwsystem" (If your ROM supports the kernel)
Here is the link to the JACSki kernel with ttc_smokee's gps fix and Soul Life's script which will allow you to use "rwsystem"
http://www.4shared.com/file/133261717/84fd2884/JACHEROSki_Kernal-_Update.html
*Just like anything else on this site, I am not responsible for you bricking or damaging your device*
CHeErs
Post here if you would like any kind of walkthrough for "dummies" reguarding user.conf's or user.init's or
kingklick said:
*If your ROM does not have a kernel that supports "rwsystem" use
Code:
mount -oremount,rw /dev/mtd/mtdblock3 /system
Click to expand...
Click to collapse
You missed the space between -o and remount...
cx92001 said:
You missed the space between -o and remount...
Click to expand...
Click to collapse
works as-is
some progs accept arguments like that
some don't
mount happens to be one that does
alapapa said:
works as-is
some progs accept arguments like that
some don't
mount happens to be one that does
Click to expand...
Click to collapse
Good to know. Thanks
alapapa said:
works as-is
some progs accept arguments like that
some don't
mount happens to be one that does
Click to expand...
Click to collapse
yah it does work without the space, thanks, but i edited the space in anyway to prevent more posts like that
Are these edits needed/beneficial for those not interested/using hero ROMs?
I recall MikeTaylor had a file, but i know so little on what these can do. Thanks for doing this man.
s15274n said:
Are these edits needed/beneficial for those not interested/using hero ROMs?
I recall MikeTaylor had a file, but i know so little on what these can do. Thanks for doing this man.
Click to expand...
Click to collapse
Not needed, however I'd say most would argue they are beneficial changes for most ROMS... ie) cyanogen uses comp cache on his builds.
and no problem man my pleasure. My way of giving back to this great site
If you do not know how to edit these files post here and ill make you a user.conf to your liking
kingklick said:
With all these new "hero" builds coming out/updates for them, it is important to have optimal settings. Many people are not sure how to do this so I thought I would take my time to write a quick how to.
I have also attached a user.conf that is setup with comp cache and backing swap, swappiness of 80. I set the cpu scaling from 383 to 528 Mhz. You may edit this with notepad++ if you would like swap instead. Just be sure to set compcache to 0 along with backing swap
P.S. I apologize in advance to the moderators if you feel this is not in the appropriate place or not necessary, just trying to make things a little bit easier
In Terminal type:
Code:
$su
#rwsystem
#cp -f sdcard/user.conf /system/bin/user.conf
*If your ROM does not have a kernel that supports "rwsystem" use
Code:
mount -o remount,rw /dev/mtd/mtdblock3 /system
Once again, I have attached a user.conf along with the JAC kernel that will allow you to use "rwsystem" (If your ROM supports the kernel)
Here is the link to the JACSki kernel which will allow you to use "rwsystem"
http://www.megaupload.com/?d=K39IKK7A
*Just like anything else on this site, I am not responsible for you bricking or damaging your device*
CHeErs
Click to expand...
Click to collapse
Rwsystem is not kernel dependent, its a script I wrote that made its way into a few other builds. Just a script which resides in bin or xbin directory, nothing more or less.
soulife said:
Rwsystem is not kernel dependent, its a script I wrote that made its way into a few other builds. Just a script which resides in bin or xbin directory, nothing more or less.
Click to expand...
Click to collapse
o ok kool. I was mislead by a few others saying it was in the new JAC kernel silly people.... Anyway thanks for the fix soul life
you did a great thing by adding that script
Just changed the "kernel file" to the kernel with gps fix.
cheers!
More Detailed HOW-TO
Thanks for the post. I am in middle of (will take about a year, LOL) writing a HOW-TO on user.conf settings so that it will be easier to understand what needs editing and what settings are best. Currently, I am using a 64MB linux-swap with compcache and have been playing around with tweaking the settings to make my phones run "perfectly." This is much more difficult than it sounds when you take into account the various options such as backing swap, linux swap, swap files, compcache and swappiness settings. This all, of course, is system and user dependent. I use my G1 and my myTouch differently and have different apps installed on each so therefore, my settings are different for both. I still haven't come up with the perfect strategy but I am pretty close.
How about expanding this out (I don't mind actually posting it) to include more details on what each setting means and what the possible benefits/problems are with each. I use this (http://forum.xda-developers.com/showthread.php?t=542899) userinit.sh file along with the user.conf. I wrote one script to pull the user.conf from system/sd to my SD card and one that pushes it back to system/sd when I'm done with it. I use "Text Edit" to edit the user.conf right on my phone so I do not need to use ADB and Notepad++. This takes the PC out of the picture so I can tweak the settings wherever I happen to be.
I don't think there is ONE user.conf file that is good for everyone. It all depends on what the user's intentions are with his or her phone. Your default swappiness is set to 80 but that can vary. I am up in the air on that one testing between 30 and 100. But like I said, user dependent.
AndroidAppCritic said:
Thanks for the post. I am in middle of (will take about a year, LOL) writing a HOW-TO on user.conf settings so that it will be easier to understand what needs editing and what settings are best. Currently, I am using a 64MB linux-swap with compcache and have been playing around with tweaking the settings to make my phones run "perfectly." This is much more difficult than it sounds when you take into account the various options such as backing swap, linux swap, swap files, compcache and swappiness settings. This all, of course, is system and user dependent. I use my G1 and my myTouch differently and have different apps installed on each so therefore, my settings are different for both. I still haven't come up with the perfect strategy but I am pretty close.
How about expanding this out (I don't mind actually posting it) to include more details on what each setting means and what the possible benefits/problems are with each. I use this (http://forum.xda-developers.com/showthread.php?t=542899) userinit.sh file along with the user.conf. I wrote one script to pull the user.conf from system/sd to my SD card and one that pushes it back to system/sd when I'm done with it. I use "Text Edit" to edit the user.conf right on my phone so I do not need to use ADB and Notepad++. This takes the PC out of the picture so I can tweak the settings wherever I happen to be.
I don't think there is ONE user.conf file that is good for everyone. It all depends on what the user's intentions are with his or her phone. You default swappiness is set to 80 but that can vary. I am up in the air on that one testing between 30 and 100. But like I said, user dependent.
Click to expand...
Click to collapse
o ok very kool. Although, I did mention in my OP the HEro ROMs and what not, so I figured most people interested would be in the HEro scene. These settings seem to work best for me on 75% of the hero ROMs Ive flashed. DOesnt mean its "right" just whats worked for me. Just wanted to give back to this great site, and help the new comers because we have all been there at some point
P.S. PM me what you think I shoulld change/add to this thread to make it offical. Thank you in advance
ChEerS
Yeah, I just noticed the Hero thing. I suppose that I would like to see (somewhere on XDA either here or a new post) a very detailed explanation of all the possible settings, what they do and how they may or may not affect each other. When I was first trying all of this out I had to search very long to find explanations. If a noob wanted to know what swappiness was, for example, they would have a difficult time finding a good explanation. Even the experts can't agree so how is a novice supposed to understand it.
Perhaps this would be a good place for people who know to informally contribute and it can eventually be moved to its own thread, a sort of compache, linux-swap, backing swap, swappiness manual. A one-stop shop for all things memory related with links to the various XDA threads that can help them accomplish what they want to do.
My G1 and myTouch fly right now with next to no lag but it took me quite some time to get all the settings the way I like it (sort of, still perfecting them). I want the same for everyone.
AndroidAppCritic said:
Yeah, I just noticed the Hero thing. I suppose that I would like to see (somewhere on XDA either here or a new post) a very detailed explanation of all the possible settings, what they do and how they may or may not affect each other. When I was first trying all of this out I had to search very long to find explanations. If a noob wanted to know what swappiness was, for example, they would have a difficult time finding a good explanation. Even the experts can't agree so how is a novice supposed to understand it.
Perhaps this would be a good place for people who know to informally contribute and it can eventually be moved to its own thread, a sort of compache, linux-swap, backing swap, swappiness manual. A one-stop shop for all things memory related with links to the various XDA threads that can help them accomplish what they want to do.
My G1 and myTouch fly right now with next to no lag but it took me quite some time to get all the settings the way I like it (sort of, still perfecting them). I want the same for everyone.
Click to expand...
Click to collapse
Yeah I agree cuz when I was trying to root my phone and stuff around fiveish months ago... and I had to do the whole runaround because there was not any good organized information like now it is pretty close. But we definitely have a ways to go to get some good stuff for n00bs... lets get it done.'
AndroidAppCritic said:
Yeah, I just noticed the Hero thing. I suppose that I would like to see (somewhere on XDA either here or a new post) a very detailed explanation of all the possible settings, what they do and how they may or may not affect each other. When I was first trying all of this out I had to search very long to find explanations. If a noob wanted to know what swappiness was, for example, they would have a difficult time finding a good explanation. Even the experts can't agree so how is a novice supposed to understand it.
Perhaps this would be a good place for people who know to informally contribute and it can eventually be moved to its own thread, a sort of compache, linux-swap, backing swap, swappiness manual. A one-stop shop for all things memory related with links to the various XDA threads that can help them accomplish what they want to do.
My G1 and myTouch fly right now with next to no lag but it took me quite some time to get all the settings the way I like it (sort of, still perfecting them). I want the same for everyone.
Click to expand...
Click to collapse
yah for sure bro. Maybe you and me should put a detalied one together... This was intended to be a crude easy guide for pure n00bs who just want a "faster" phone. Most n00bs are not too concerned with what "swappiness" is and the technical difference between CC or linux-swap. Thats just my opionion though brother
Sorry if this is a stupid question but what exactly do I do with the two files? Do I rename the kernal update as update.zip and run that after I'm done installing the Hero ROM of my choice (I was looking at doing drizzy's)? Then what do I do with the user.conf file?
markdt098 said:
Sorry if this is a stupid question but what exactly do I do with the two files? Do I rename the kernal update as update.zip and run that after I'm done installing the Hero ROM of my choice (I was looking at doing drizzy's)? Then what do I do with the user.conf file?
Click to expand...
Click to collapse
Ima change the OP thanks anyway, if you have recovery 1.4 you can actually flash "any" zip meaning it does not need to be renamed. MOst ROMS now have this kernel built in, however MOdaco 2.2 DOES NOT, so if you plan on using modaco 2.2, flash this kernel. FLash MOdaco (or whatever ROM is missing this kernel) THEN flash the kernel right after without rebooting.
as far as the user.conf goes, put it on your root and use the commands i provided in the OP.
ChEeRS

[BATT Fix][GB SENSE Kernel] Calibration under Sense and solution for 15% shutdowns!

Hi everyone!
As a desire user myself, some of us are already familiar of what I'm talking about: the famous problem of Desire shutting itself down while it was showing a percentage of 15 (or sometimes even higher) percentages!
This problem is a troublemaker, because it's causing the battery to deplete deeply - which is a bad thing for a Li-Ion battery - and also causing you unguarded: you think that you have enough battery to make it home, but hey; your device is dead!
The reason?
The cause of the problem is battery aging. Even though Li-Ion batteries don't have memory effect problems, they are batteries after all and like every battery they get older and lose their capacity.
Ideally (old or new) the battery shows 3200 mV when empty and 4180 (sometimes 4200) mV when it's full. This never changes unlike NiMH batteries - it's why Li-Ion batteries are told "never to suffer from memory effect". The thing is, cells get older in time and even though they always yield the same voltages, they might not last the same (mAh value gets lower). This is called "aging" in batteries.
In HTC Desire device, there is a Battery Controller chip (it's Maxim DS2784 Chip) that is responsible with the battery capacity, percentage estimation; as well as aging compensation. However, during my examinations (since I did have this 15% shut down problem myself) I've noticed something major in the HTC Desire Sense Kernel sources:
A small code piece in ds2784 battery driver which is written with a false assumption is causing your Desire to think it has full "brand new" capacity, which is not the case if you're owner of an aged one! Due to this, your device thinks it has more capacity, when it's actually empty (which occurs at 15-20% depending on the battery) and shutting down at weird percentages.
Solution?
Well, it's something called "Battery Calibration" which more info can be found on this thread (especially check post #3 for the instructions) : http://forum.xda-developers.com/showthread.php?t=765609
(It's Nexus One dev. forum, but don't mind it - the process is exactly the same for us)
The thing about this calibration is; you have to do it under CM or Oxygen ROM's, because it requires a modified AOSP kernel. During my checks, I've seen that this is actually simply because the Sense kernel lacks some sysfs entries - other than that, Sense driver is also capable of doing this calibration - with the help of Jon Richard's "Battery Calibrator" (available at the Play Store (Market) ).
Also, the calibration data normally (I don't really know why) gets erased when you charge your device while off - the way to fix this is available in here: http://forum.xda-developers.com/showpost.php?p=23317695&postcount=2112
OK.. Is this all?
No. Actually this part is more important.
While I'm including this piece to the Sense Kernel, I've seen the following buggy code piece, which is resetting your battery capacity to 1392 mA - which is wrong (too much) if your battery is aged one:
Code:
if ((htc_batt_info.rep.level != 100) &&
(htc_batt_info.rep.guage_status_reg & 0x80) &&
(htc_batt_info.rep.batt_current <= 80) &&
(htc_batt_info.rep.full_acr == 0)) {
acr[0] = 0x0d;
acr[1] = 0x87;
w1_ds2784_write(di->w1_dev, acr, DS2784_REG_ACCUMULATE_CURR_MSB, 2);
htc_batt_info.rep.full_acr = 1;
pr_info("[HTC_BATT] Current Full ACR = %x %x\n", acr[0], acr[1]);
pr_info("[HTC_BATT] Recharging should set ACR to 100 percent\n");
}
Noticed the "acr" part? That's the part where the driver wrongly assigning 1393 mAh to the DS2784 chip.
If you're to read DS2784 battery specification, under "ACR Housekeeping" part, the following is written ;(ACR - Accumulated Capacity register - the register which shows your current capacity of battery as mAh):
ACR Housekeeping
The ACR value is adjusted occasionally to maintain the coulomb count within the model curve boundaries. When
the battery is charged to full (CHGTF set), the ACR is set equal to the age scaled full lookup value at the present
temperature.
Click to expand...
Click to collapse
It clearly states that the ACR value, by chip itself, is already updated to the Full value available in ROM chip! The driver doesn't need to do that (and doesn't need to do that WRONG AT ALL!).
This is the problem, because we calibrate our batteries, and then simply because of a buggy assignment of the driver, we lose all the calibration we made!
Cut the story.. Can you fix this?
Well, already did. Attached to the end of this post, there is a "ds2784_battery.c" file which all the stuff I mentioned in this post is applied to. In the kernel source, change in the kernel source dir drivers/power/ds2784_battery.c file with the one I provided and recompile the kernel - voila, you can now calibrate your battery and it no longer will screw your calibration.
Diff patch?
Available below.
Do I have to compile kernel myself? I'm not a geek like you, man!
Flashable recovery zip for kernel is added to the post (named ahmet-exp4_*.zip)!
And here is what completes the circle: The Battery Calibrator App, modified to work with our kernel!
Can be downloaded here
------------
EDIT: I've added the patch file, and also changed the source file itself - I mistakenly forgot to uncomment the parts which include the sysfs interface, sorry
-----
ADDENDUM (11.03.12): CFS Version is included to the post. Soon, I shall include the Droidzone's battfix into it for high capacity batteries as well, but I kinda think that Droidzone's fix is "not complete" so I'll rewrite it from scratch and thus it does take some time. I guess I can put it next weekend.
-----
ADDENDUM (13.03.12): An improved (?) version of Droidzone's Extended Battery fix has been enabled into the battery driver. Also, HAVS and SVS versions are added for those who prefer (version string does keep these info too, if you forget in the future ). Diff patch is updated with the changes.
About extended batt-fix: Please note that I couldn't test the driver with an Extended battery, but I changed the register parts, so it should run with any battery now since it reads all the data from the Chip's EEPROM instead of using "hardcoded" values.
I also lowered the RSSI values in iw_wl.h file -> now your wifi should not drop so easily as it was in the past (it was -91; I made it -110 ). Diff and edited file are added.
NOTE: My kernels do include nearly all I/O schedulers inside, so that you can change them as you like. If you think your device doesn't perform well with the read/write operations to sd-card or MTD partitions, you can change your I/O scheduler following way:
first, query the modes. You can google-search them to learn what they mean :
--> cat /sys/block/mmcblk0/queue/scheduler (for mmc card)
--> cat /sys/block/mtdblockX/queue/scheduler (for internal memory. X becomes partition number: you can query it with "cat /proc/mtd")
After this, you can pick one and apply that - for instance, say, you picked BFQ (I like it ):
--> echo "bfq" > /sys/block/mmcblk0/queue/scheduler (for mmc card - same applies to MTD too, if you need)
WHY BFQ? Because since SD-cards are Solid State Disks, so they don't have a mechanical head thus V(R) or such schedulers which are optimised for access times are not so optimised for us I think. Instead, we should aim towards the schedulers which takes "load" into consideration. BFQ is one of such schedulers.
I just checked it with my device, I tell you: the results are really amazing How much a scheduler matters is exemplified really
-----
ADDENDUM (15 March 2012): CFS_SVS Version is updated to EXP5; because of some freeze up problems. This version doesn't add anything else, so the old files still stay at EXP4 version
NOTE: I don't have 2Way Call recording sources, so my kernels don't have that feature (I cannot do everything, can I )
---------------
Thank you very much for the donations of Sally Mack
I really appreciate it You really save my life with your donations
F A Q
1- I open the app, but all the values look empty!
It's because you are not using a compatible kernel. As far as I know, only mine and Droidzone's latest kernels do have the necessary patches, so switch to one of them.
2-I cannot drop to 3201 mV!
Some batteries cannot drop into that level, it's true. If your device turns off at higher voltages - like 3400 mV - you can use this value for your registers instead. Please read the following pages or DS2784 chip spec.to use your own value here (key registers are 62 and 63)
3- I drop to 3201 mV, it says "plug the charger" and I plugged. Still device turns off!
This is due to Sense kernels using a different power supply drivers than AOSP kernels; and due to Sense kernels being "less sensitive" to the changes in battery status, thus not sensing the charger plugged it. In order to overcome this, you must decrease your battery usage to a minimum so that your battery can last a little more - just enough for Power Supply driver to sense it. To achive this:
1- At about 3350 mV values, turn on the Airplane mode; decrease the screen brightness to a very low value.
2- Once the program tells you to plug in, plug in right away and then turn your screen off with the power button.
If your device is not turned off within 2 minutes, your learning phase should have begun.
4- Still the phone turns off at 3201 mV!
It's very much likely those solutions above will work; but in case they don't and you want an "easier" calibration - try calibration at some AOSP ROM like Cyanogen Mode ROM or Oxygen ROM (i.e. you have to change your ROM at least temporarily) . AOSP kernels are more "open" to calibration.
5- Do I need "ahmet" kernels for AOSP?
No. All current AOSP Roms come with a modified kernel that's already supporting the calibration - and they are also free of the Sense kernel bug mentioned above since they're completely written from scratch!
6- Can I change ROMs or Kernels after the calibration?
Changing ROMs are OK as long as you use ahmet or Droidzone's latest kernels (i.e. kernels that support calibration) with your new ROM. You should flash the ROM prior to booting your device for the first time.
NOTE HERE: If you're to flash AOSP ROM, don't use ahmet-exp kernels with them since ahmet-exp kernels are Sense kernels. All AOSP ROMs are calibration friendly anyway.
Changing kernels is a tad more tricky: you can change into the kernels that support calibration only: that is either into ahmet-exp or Droidzone kernels.
Good work, I'm glad that somebody found a solution for this problem.
I'm waiting for the fix, can't wait to test it and see how it goes after that, if it'll help my batt and increases it's life.
What else to say, thumbs up and keep up the good work.
So is needed one battery calibration after change the kernel?
Tapatalking
ironjon said:
So is needed one battery calibration after change the kernel?
Tapatalking
Click to expand...
Click to collapse
After every flash/ROM change it is advised to wipe battery stats and calibrate it if you flashed while your phone was plugged in to USB or charger.
This is logic, new ROM, new stats.a battery stats wipe is advised as I said but calibration...I don't think so, you need to do that just once (as I saw on other threads).
What I do after flashing a new ROM/kernel is just to let the phone discharge untill it shuts down, charge till it's full and wipe battery stats.
nomatterbv said:
After every flash/ROM change it is advised to wipe battery stats and calibrate it if you flashed while your phone was plugged in to USB or charger.
This is logic, new ROM, new stats.a battery stats wipe is advised as I said but calibration...I don't think so, you need to do that just once (as I saw on other threads).
What I do after flashing a new ROM/kernel is just to let the phone discharge untill it shuts down, charge till it's full and wipe battery stats.
Click to expand...
Click to collapse
I' ve done that many times and my phone still shutdown at 15% aprox
Tapatalking
ironjon said:
I' ve done that many times and my phone still shutdown at 15% aprox
Tapatalking
Click to expand...
Click to collapse
I flashed the ROM which is in my signature, optimised it and I don't have that problem any more (it shuts down at 2-3%, when it reaches that % it drops down to 0 instantly).
Try to flash other ROM and change kernel, also use the latest RIL and Radio, it might help you. for me it worked.
Just wait untill theGanymedes posts the fix, flash it and see if it'll help you out, it'll need some tests but anyway, I think it will help.
nomatterbv said:
I flashed the ROM which is in my signature, optimised it and I don't have that problem any more (it shuts down at 2-3%, when it reaches that % it drops down to 0 instantly).
Try to flash other ROM and change kernel, also use the latest RIL and Radio, it might help you. for me it worked.
Just wait untill theGanymedes posts the fix, flash it and see if it'll help you out, it'll need some tests but anyway, I think it will help.
Click to expand...
Click to collapse
Thx
I'm trying to fix it with the latest bananacakes' sources but I got some errors:
[email protected]:~/android/kernel/bananacakes-bravo_2.6.35_gb-mr-f42e76d$ make ARCH=arm CROSS_COMPILE=arm-linux-androideabi- -j10
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
GEN .version
CHK include/generated/compile.h
UPD include/generated/compile.h
CC init/version.o
LD init/built-in.o
LD .tmp_vmlinux1
mm/built-in.o: In function `frontswap_curr_pages':
/home/jon/android/kernel/bananacakes-bravo_2.6.35_gb-mr-f42e76d/mm/frontswap.c:235: undefined reference to `swap_list'
/home/jon/android/kernel/bananacakes-bravo_2.6.35_gb-mr-f42e76d/mm/frontswap.c:235: undefined reference to `swap_info'
mm/built-in.o: In function `frontswap_shrink':
/home/jon/android/kernel/bananacakes-bravo_2.6.35_gb-mr-f42e76d/mm/frontswap.c:207: undefined reference to `try_to_unuse'
/home/jon/android/kernel/bananacakes-bravo_2.6.35_gb-mr-f42e76d/mm/frontswap.c:214: undefined reference to `swap_info'
/home/jon/android/kernel/bananacakes-bravo_2.6.35_gb-mr-f42e76d/mm/frontswap.c:214: undefined reference to `swap_list'
mm/built-in.o: In function `__frontswap_flush_area':
/home/jon/android/kernel/bananacakes-bravo_2.6.35_gb-mr-f42e76d/mm/frontswap.c:153: undefined reference to `swap_info'
mm/built-in.o: In function `__frontswap_flush_page':
/home/jon/android/kernel/bananacakes-bravo_2.6.35_gb-mr-f42e76d/mm/frontswap.c:139: undefined reference to `swap_info'
mm/built-in.o: In function `__frontswap_get_page':
/home/jon/android/kernel/bananacakes-bravo_2.6.35_gb-mr-f42e76d/mm/frontswap.c:125: undefined reference to `swap_info'
mm/built-in.o: In function `__frontswap_put_page':
/home/jon/android/kernel/bananacakes-bravo_2.6.35_gb-mr-f42e76d/mm/frontswap.c:104: undefined reference to `swap_info'
make: *** [.tmp_vmlinux1] Error 1
Better to wait the patch
great work this is something I'm really glad to see as I get caught out by this bug a lot, the question is now are there any pro compiled kernel flashes available that use this.
Im using Runnymede AIO v6.0.7 SE so would need a sense based kernel that works well with that.
Drefsab said:
great work this is something I'm really glad to see as I get caught out by this bug a lot, the question is now are there any pro compiled kernel flashes available that use this.
Im using Runnymede AIO v6.0.7 SE so would need a sense based kernel that works well with that.
Click to expand...
Click to collapse
You'll find here everything you need, including sense kernels
nice work, thank you for sharing with us.
i will wait for kernal
Sent from my HTC Desire using Tapatalk
wow...nice thing...good work... thx for this...
but i hope we can get a diff patch...as i think if i use your file the batt charge fix is gone or...did you use droidzone patch also..?
with kind regards
Alex-V said:
wow...nice thing...good work... thx for this...
but i hope we can get a diff patch...as i think if i use your file the batt charge fix is gone or...did you use droidzone patch also..?
with kind regards
Click to expand...
Click to collapse
You can use this.
Thanks, theGanymedes. This was on my todo list for a long time.
Droidzone said:
You can use this.
Thanks, theGanymedes. This was on my todo list for a long time.
Click to expand...
Click to collapse
and i thank you...as always...lol
with kind regards
So can it be also implemented to snq kernel ?
pavel54 said:
So can it be also implemented to snq kernel ?
Click to expand...
Click to collapse
No...as snq never released his source
Sent from my HTC Desire using XDA Premium App
dont want to sound noob but is there any chance of implementing this fix in ICS kernels like: Tiamat 2.6.28 ICS?
as my ICS rom also shuts down at above than 15%.
thank you
or implement it in manus kernel
Yeah, SNQ didn't release his sources, alas.
And thank you Droidzone! I don't know what would we do without you However, your patch is faulty - for some reason, it messes all the file. I've included the patch that'll do it correctly to the first post
About the battery fix - I didn't touch that part but know that bananacakes's sources do have them.
Compiled kernel is delaying a little bit - because my toolchain is faulty, for some reason producing unbootable kernels - going to upload it to the first post when it's ready.
Also another thing: since the sysfs interface placement is different than AOSP kernels, the battery calibrator app on the Market doesn't work with our patch - the files necessary for the program to work is in somewhere else in our system. So, I'll try to find a way to "create symbolical links" or if I can't, I'll rewrite the app - apparently Jon Richards didn't publish his sources for the app :/

acidify questions

alright maybe im going at this the wrong way i want to be a dev... well i try and get acidify well im getting all kinda errors when i do the command acidify infi cm9
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
warning: https unexpectedly said: '0000'
error: '/home/lee/.repo/projects/external/bluetooth/bluez.git/clone.bundle' does not look like a v2 bundle file
fatal: Could not read bundle '/home/lee/.repo/projects/external/bluetooth/bluez.git/clone.bundle'.
what does this mean i wanna learn about this stuff but keep getting these errors
Likely a server timeout or other glitch. "repo sync" until you don't have any more errors. The first time sync is painful.
Posted from my AOKP-ified SGS4G
It went on for about three hours and kept on doing the same thing anything I can do
Sent from my superchager SGH-T959V using xda app-developers app
Delete the damaged file and restart the sync. Hopefully it will finish. Expect a full sync to take 5-20 tries, and if you ever abort due to being bored or just having a lousy network connection... your fun may increase exponentially.
Question of my own... on both Windows with Cygwin as well as on Ubuntu with all the 'standard' requested packages, I get this error when trying to run Acidify 0.4.0:
# ./acidify
./acidify: line 8: color: command not found
Click to expand...
Click to collapse
Am I just missing some incredibly obvious package? I've compiled kernels manually, but Acidify sounds like it should make things a ton easier. Thanks.
Color should be a built in function of the script. I hope max sees this post since I can't look into it right now
Ahh... the function color is included, lines 196-222... but it's first used on line 8, as well as 61. THEN it gets defined.
Unless it gets put into bashrc like in this AskUbuntu example, I think it needs to be defined before it gets used.
Theraze said:
Ahh... the function color is included, lines 196-222... but it's first used on line 8, as well as 61. THEN it gets defined.
Unless it gets put into bashrc like in this AskUbuntu example, I think it needs to be defined before it gets used.
Click to expand...
Click to collapse
Maybe post a bug report on github? m4xm4n has been busy with school. This will insure he sees it.
Moved the color() function from 196-222 to line 5. Acidify now runs... well, it gives me a new error. With yellow text!
# ./acidify
Warning: Could not load configuration file. Using environmental or program defaults.
./acidify: line 170: conditional binary operator expected
Click to expand...
Click to collapse
which happens to be the same error I got when manually stripping out the color calls before. That line is:
Code:
[[ -v DISTRIB_ID ]] || DISTRIB_ID="Your system"
I'll try to make a bug report with a note that moving color function fixes my initial glitch.
I'd checkout (as in "git checkout") the previous version if you are continuing to have problems.
Sounds good. Though turning that line into
Code:
DISTRIB_ID="Your system"
made it run on my Cygwin box. Looks like that line is supposed to tell you which specific *nix version isn't supported if it fails, and for some reason on both my Cygwin system and Ubuntu systems, the fail-check fails. However, that appears to have been in the prior versions of Acidify as well, so they appear less likely to be a logical fail-point. Will try it with the checkout though on the Ubuntu.
Edit: And... Cygwin is 32-bit only. Awesome. So it's not going to be running Acidify for me. Ubuntu box is currently processing something else, so I'll check it whenever it decides to move along.
But git checkout left me with the same color error, if that's what was supposed to fix it.
Edit2: Ubuntu box didn't fail on the same spot, so it looks like I'm good... Well, unless it doesn't actually run, but it gets me to the info screen at least. I'll update if it has problems, but it looks like the only other 'issue' I found was Cygwin-only which doesn't really matter for us since it can't run Acidify anyways (being 32-bit). Should I still note it as an issue on Github, or do we not care since it's only an error where it can't possibly work anyways?
Edit3: Okay... One sudo mkdir /.acidify and a sudo mkdir /.repo later and it's actually pulling files down...
reclamer said:
error: '/home/lee/.repo/projects/external/bluetooth/bluez.git/clone.bundle' does not look like a v2 bundle file
fatal: Could not read bundle '/home/lee/.repo/projects/external/bluetooth/bluez.git/clone.bundle'.
Click to expand...
Click to collapse
Poking around in repo to resolve a problem that I have with AOKP right now, I found, from repo help sync
Code:
The --no-clone-bundle option disables any attempt to use
$URL/clone.bundle to bootstrap a new Git repository from a resumeable
bundle file on a content delivery network. This may be necessary if
there are problems with the local Python HTTP client or proxy
configuration, but the Git binary works.
A little note... apparently the error I mentioned comes up anytime you're using a distrib that doesn't show up in the search. Since in addition to Cygwin, that error also comes up when trying to use Acidify with Ubuntu 10.10. Guessing that means that the || bit isn't functioning properly... maybe it needs to be inside the [[]] or something? Guess I should report that as another issue on the tracker.

[TOOL] ApkSpy v1.8 - Resurrected (APK: view manifest on PC and/or Install APK via PC)

APKSPY - RESURRECTED​
First:
I want to thank @ido for the original application -- It was his idea (and his code I've hacked :cyclops and modified.
Second:
Since Ido seems not to be active anymore I'll re-publish the application here.
Unless for some reason Ido will specifically ask me to remove it.
The original post
ido said:
ApkSpy is a simple tool I hacked up tonight which allows you to easily view the manifest of an APK (screenshots attached - not up to date though) just by double clicking it. (It can even associate with the .apk filetype, yay!)
ApkSpy relies on the aapt.exe tool from the android SDK, so you must have that installed (or just copy aapt.exe from somewhere, that's the only file needed to run ApkSpy).
Click to expand...
Click to collapse
Third:
Requires Microsoft©® .Net Framework v4
(Kind of since I've done it some time ago and waited for Ido [the orignal developer] to respond and allow or disallow me to re-publish... So, I don't remember all the changes I've already done...)
v1.8.19 CHANGELOG:
Fixed some Date parsing function (zipped file with no time stamp) in ZipStorer (by @Jaime Olivares) maybe causing some of the error reported here...
v1.8 CHANGELOG:
Changed Icon - CONTRIBUTED BY @Jarmezrocks
Removed unneeded tabs (System, Batch Rename, Log)
Minimize / Maximized restored back
v1.7 CHANGELOG:
(Actually 4.1.7.870, but the first and the last parts are internally used :fingers-crossed:)
Try to automatically find adb.exe and aapt.exe in ApkSPY directory or in PATH variable: If failed finding any of the executables, the user is asked to manually locate them
(★ Currently the location is not saved... ★).
Check if the ADB server is running and Start or ask if to Restart ADB server
Tidy up the code
Refining the original libraries written by Ido related to ADB and AAPT
Some more minor code updates
Revised most of the "General" tab (other tabs ware not touched) of the UI:
Grouped and ordered controls on form
Added DropDown of devices attached (★ Not automatically updating upon plugging... ★)
Added some control over ADB actions
Added status bar that some other details are shown, e.g. device type (Nexus, I9100...), OS version (4.1.2, 4.4.2...) and OS build (KOT49H, KVT49L...)
Added (nice looking) information panel with clickable links (for actions on the form) and coloring
Other changes (I can't recall right now, since I've done it some time ago and waited for a response from Ido for permission to republish)
(★ Maybe I'll add an option for this later, depending on my -- not to much -- free time and requested by users .... ★)
Known bugs:
Sometimes ADB fails to return build.prop property for the status bar (however it has not caused any critical problem, so (I think) it can be safely ignored) -- haven't been able (yet) to find the exact state it is happening
Please take the time to look at the application ABOUT tab
Any Other ideas are welcome!
If you like it, Don't forget to Thank me
If you enjoy using this application as much as I have enjoyed re-writing it
please donate to show your appreciation​
RESERVED
Nice
Sent from my SM-N900T using Tapatalk
Good news
Bug report, every time I open this program, this dialog pops up, after click OK, this program works well.
PS, aapt.exe is in the same dir with ApkSpy
I got this errors:
1:
2:
Error in property: [email protected]@usrdata
cmlx said:
Good news
Bug report, every time I open this program, this dialog pops up, after click OK, this program works well.
PS, aapt.exe is in the same dir with ApkSpy
Click to expand...
Click to collapse
Hey dude,
I am not sure what you are doing wrong on your PC but it's certainly not the app as it works perfectly fine on my computer? Out of interest and for the sake or helping the new dev I thought I would raise a few points just to eliminate any finger pointing. There's a wishy-washy area when it comes to building/hacking things that were originally someone elses work...so yeah one can easily make great improvements yet open the door to bugs at the same time too. Anyway...thought I'd ask this:
Does aapt sit on your path? I know you said it is in the same directory, however just like a batch script in Windows it needs to "CD" or change directories to the %~dp0 if it is to understand what an executable is that happens to be sitting in the same directory as it's self. So this is is kinda directed at the new dev now. What I think is happening is that aapt is assumed to be in the system path when quite often it is not (i.e. those on XDA who have not yet played with the Android SDK properly). Put simply unless the application knows it is in the same directory as your executable it won't at all understand what aapt is. Does that make sense?
@dmagician , I would make sure that the apkspy app can do a check (even if it is a string search for the first few lines returned from aapt.exe), a simple if statement before throwing that error ....actually it would likely be an 'if not' statement. I don't have any of the code in front of me atm but I can help you out if you like? I was hacking this app myself sometime ago when ido first released it just using reshacker.
Note: If you are stuck and don't have source code you technically could write a full AutoIT wrapper for this app that could do all the checks and more and then bundle everything up into the one exe still. Check out the newer WinAPI stuff for AutoIT and in particular "Run binary" (yes that's correct you can just about run anything repackaged now and not need to deploy the original exe's or even libraries....they can all be stream fed to AutoIT @Compile time and need not be typically "installed" like you used to have to do. Anyway...I am waffling on shoot me a PM man.
@cmlx, to overcome your ApkSpy woes, and until dmagician can put his finger on what the cause is or what ido did when building it ages ago.....then you will firstly need to be patient (props to dmagician to figuring sh!t out so far) but till then where ever you have dumped the ApkSpy and aapt.exe on your system; just copy the address and put it on your system path. To do this 1) right click on My Computer or Computer if you are on Win 7 or 8. 2) Choose properties. 3) Advanced System settings and then at the bottom of tab you will see 'Environment Variables', click it and you will see some "User" and "System" options. Depending on your User access rights on the system you are running on (hopefully you are running as Admin surely?) then you can choose to edit your main system path or create a new variable in your user settings called 'path' Note User variables are always postfix to system variables but should always work anyhow.
Disclaimer: cmlx, if however you have already got an aapt.exe already existing on your system path but it is dodgy then you have to ensure that the good aapt.exe in your app directory is placed on path BEFORE the dodgy one....just sayin. Cause your system searches till it finds what it wants and then doesn't search anymore. Simple but can stuff people up quite often....and likely your case. Nowdays we tend to work from the known application location and not from a "Global environment path" when we know that there are going to be conflicts...and I can assure you that aapt is possibly the worst and most modified binary out there LOL. Hence this is also a note to the dev to ensure that ApkSpy reads from the current directory.....or like I am suggesting, wrap aapt up in the main application as well and that way there is no confusion EVER.
And I am done.....
Oh wait no I am not....sorry bug reports LOL :good: you thought I was all praise eh? Got another thing coming man
OK....so um the red boxes should explain everything. A picture says a thousand words (and yeah I needed at least 1 picture for this god damned long arsed post - sry). Um why in gods name would you remove the minimise and expand buttons? WTF? Anyway...it works but errrm yeah it doesn't wrap the text anymore? and it cuts the words off lol.
Other than that....I only really have one suggestion and it isn't even really a suggestion as I have kind of already made it so I can just give it to you if you want it? And that is that most people (well I can't say most as I am not speaking for everyone) tend not to like how apps take over their system. This isn't your fault at all in anyway as the first dev thought it was a good idea back then.....and back then hardly anything in Windows knew what a freakin apk was so it was a GOOD thing.....However now, every man and his dog wants to steel .apk extension for himself. I myself tend to be all over the shop with apks so I tend not to want to have any particular Windows app take it away from my control. I use WinZip as the main app for simple double click open as I want to see the contents of apks without needing to decompile them (great for theming) however I have apk shell extensions displaying the apks main icon to explorer, so if I set WinZip as default I get a nice lumping hunk of gold turd/box running rampet all over my Windoze bro ......so if you like I can show you my code that allows me to have default apps for specific tasks without interfering with anyones existing sh!t It looks neat too as you can right click any apk and just choose from a dropdown list what particular app you want at the time. If one has the need to use more apps then they need only put those apps in a list. There is nothing worse than double clicking an apk to find that Bluestacks or some other rubbish Windoze crApp has taken offf with your apk.
Lastly I thought I'd ask, Why no config file? Why store everything in memory? I know it's only small....but seeking for things everytime it is executed is a pain in the arse and not good practice. At the very least if you have no idea how to make an exe totally portable then you could reference a config file in the same directory....Or do as most do and write entries to the registry all neat and tucked away. If we get paranoid about "portable-ness" then we write to temporary space in the registry and make sure we clean up upon closing and/or inspect at runtime. simple!
I have plenty of AutoIT scripts that do exactly that too, so if you are stuck for ideas let me know. Anyway I have rambled enough, good luck and I will keep reporting bugs haha
Edit: That's waaaay too many emoticons. Oooops someone is a little high aren't they?
PS: I have attached my PNG of the icon I used for this bugger waaaaaay back....it's less generic and feel free to take it and abuse it and do as you please.
cmlx said:
Good news
Bug report, every time I open this program, this dialog pops up, after click OK, this program works well.
PS, aapt.exe is in the same dir with ApkSpy
Click to expand...
Click to collapse
Yes, I know of this one (and I've specifically wrote about it in the OP), it is NOT related to AAPT executable but to the way ADB is acting (sorry, out of my hands... :angel:
Explanation
The error comes from the application when trying to query the "ro.build.id" property via adb ('ADB shell getprop "ro.build.id" ') command.
I've came across this one but cannot determine the exact situation it is happening (as it can occur when first launching of the app, but after the app is loaded, clicking on refresh does not show this error)...
[ I've tried it on with the (only) two devices I own (1st dev. is stock (only the kernel is changed) 4.4.2 Nexus 4, 2nd dev. is S2-i9100 with customized RR ROM)and it seems to happen ONLY on the S2...]
It looks that in times, the getprop is being executed before the whole "build.prop" is being processed by ADB (This one I cannot control since it is happening on the ADB shell side [running on the device] -- unless MAYBE doing some [UGLY] delay after first initialization of ADB, which is, by far NOT best practice of process handling according to the literature)...
CyberianIce said:
I got this errors:
1:
2:
Error in property: [email protected]@usrdata
Click to expand...
Click to collapse
Which came first, the "SpkSpy spy stopped working" or the "Error in property" (if anyways related)?
Was it on the same run or two different runs?
As of the 1st one:
I do not have enough information from your post to check it up...
I'll post a new version which shows the exception details
As of the 2nd one:
Can you send me a copy of your /system/build.prop (so i'll be able to dig trough it and check it)?
It looks like my name-value splitter character exist as part of a given value in your build.prop .
Wooow, Long one! But it is nice to know people are using (trying) it!
Jarmezrocks said:
Hey dude,
I am not sure what you are doing wrong on your PC but it's certainly not the app as it works perfectly fine on my computer? Out of interest and for the sake or helping the new dev I thought I would raise a few points just to eliminate any finger pointing. There's a wishy-washy area when it comes to building/hacking things that were originally someone elses work...so yeah one can easily make great improvements yet open the door to bugs at the same time too. Anyway...thought I'd ask this:
Does aapt sit on your path? I know you said it is in the same directory, however just like a batch script in Windows it needs to "CD" or change directories to the %~dp0 if it is to understand what an executable is that happens to be sitting in the same directory as it's self. So this is is kinda directed at the new dev now. What I think is happening is that aapt is assumed to be in the system path when quite often it is not (i.e. those on XDA who have not yet played with the Android SDK properly). Put simply unless the application knows it is in the same directory as your executable it won't at all understand what aapt is. Does that make sense?
Click to expand...
Click to collapse
Hi
As I've replied to @clmx, This error is not related to AAPT (either executable [location or whatever] or results), but to the ADB command being used...
Jarmezrocks said:
@dmagician , I would make sure that the apkspy app can do a check (even if it is a string search for the first few lines returned from aapt.exe), a simple if statement before throwing that error ....actually it would likely be an 'if not' statement. I don't have any of the code in front of me atm but I can help you out if you like? I was hacking this app myself sometime ago when ido first released it just using reshacker.
Click to expand...
Click to collapse
Sorry I did not understand... Check for what?
Jarmezrocks said:
Note: If you are stuck and don't have source code you technically could write a full AutoIT wrapper for this app that could do all the checks and more and then bundle everything up into the one exe still. Check out the newer WinAPI stuff for AutoIT and in particular "Run binary" (yes that's correct you can just about run anything repackaged now and not need to deploy the original exe's or even libraries....they can all be stream fed to AutoIT @Compile time and need not be typically "installed" like you used to have to do. Anyway...I am waffling on shoot me a PM man.
Click to expand...
Click to collapse
I do not need the Auto-IT to wrap these files (although I am using it for other automation in windows), as I can do it right in the C# code (on one of my early versions these files was embedded...)
BTW, I know there are some antiviruses out in the wild that do not like the embedded executables -- but it can be done -- and probably will save some time to anyone using this app...
If it will be required / asked, I'll embed the 4 binaries (AAPT.EXE, ADB.EXE, and two DLL's AdbWinApi.dll and AdbWinUsbApi.dll [I'm not sure both are required]) needed by the application.
Jarmezrocks said:
@cmlx, to overcome your ApkSpy woes, and until dmagician can put his finger on what the cause is or what ido did when building it ages ago.....then you will firstly need to be patient (props to dmagician to figuring sh!t out so far) but till then where ever you have dumped the ApkSpy and aapt.exe on your system; just copy the address and put it on your system path. To do this 1) right click on My Computer or Computer if you are on Win 7 or 8. 2) Choose properties. 3) Advanced System settings and then at the bottom of tab you will see 'Environment Variables', click it and you will see some "User" and "System" options. Depending on your User access rights on the system you are running on (hopefully you are running as Admin surely?) then you can choose to edit your main system path or create a new variable in your user settings called 'path' Note User variables are always postfix to system variables but should always work anyhow.
Disclaimer: cmlx, if however you have already got an aapt.exe already existing on your system path but it is dodgy then you have to ensure that the good aapt.exe in your app directory is placed on path BEFORE the dodgy one....just sayin. Cause your system searches till it finds what it wants and then doesn't search anymore. Simple but can stuff people up quite often....and likely your case. Nowdays we tend to work from the known application location and not from a "Global environment path" when we know that there are going to be conflicts...and I can assure you that aapt is possibly the worst and most modified binary out there LOL. Hence this is also a note to the dev to ensure that ApkSpy reads from the current directory.....or like I am suggesting, wrap aapt up in the main application as well and that way there is no confusion EVER.
Click to expand...
Click to collapse
The application IS searching for AAPT and ADB executables; The order is
Application directory (where ApkSpy.exe resides)
PATH environment variable
Jarmezrocks said:
OK....so um the red boxes should explain everything. A picture says a thousand words (and yeah I needed at least 1 picture for this god damned long arsed post - sry). Um why in gods name would you remove the minimise and expand buttons? WTF?
Click to expand...
Click to collapse
Mostly I like it this way, otherwise - No specific reason...
It will be back in the next version...
Jarmezrocks said:
Anyway... it works but errrm yeah it doesn't wrap the text anymore? and it cuts the words off lol.
Click to expand...
Click to collapse
This Tab was NOT changed by me in any way... To be honest, I've thought of removing it completely -- But -- out of respect to Ido's work -- I've left it in.
I assume it is not wrapping due to Font size changed by me globally...
I'm seriously giving it second thoughts -- if it should stay at all (It was originally meant for batch rename of multiple APK's... I haven't used it even once...)...
I'm Really, REALLY, think of removing it completely (unless someone is / will be using it -- then I'll fix it all)...
Jarmezrocks said:
Other than that....I only really have one suggestion and it isn't even really a suggestion as I have kind of already made it so I can just give it to you if you want it? And that is that most people (well I can't say most as I am not speaking for everyone) tend not to like how apps take over their system. This isn't your fault at all in anyway as the first dev thought it was a good idea back then.....and back then hardly anything in Windows knew what a freakin apk was so it was a GOOD thing.....However now, every man and his dog wants to steel .apk extension for himself. I myself tend to be all over the shop with apks so I tend not to want to have any particular Windows app take it away from my control. I use WinZip as the main app for simple double click open as I want to see the contents of apks without needing to decompile them (great for theming) however I have apk shell extensions displaying the apks main icon to explorer, so if I set WinZip as default I get a nice lumping hunk of gold turd/box running rampet all over my Windoze bro ......so if you like I can show you my code that allows me to have default apps for specific tasks without interfering with anyones existing sh!t It looks neat too as you can right click any apk and just choose from a dropdown list what particular app you want at the time. If one has the need to use more apps then they need only put those apps in a list. There is nothing worse than double clicking an apk to find that Bluestacks or some other rubbish Windoze crApp has taken offf with your apk.
Click to expand...
Click to collapse
The application is NOT taking over anything, Unless you've clicked the asterisk ("*") button on the System Tab...
Was it registered for you without clicking this button?
If so, I'll recheck the code (may be it's some residue from the original code).
BTW
As the previous part of the answer I've wrote -- this one was left in as of respect to @ido's work...
2nd BTW
I'd like to see that explorer extension (and [preferable] the code of it - if you are willing to share it) you ware writing about...
Jarmezrocks said:
Lastly I thought I'd ask, Why no config file? Why store everything in memory? I know it's only small....but seeking for things everytime it is executed is a pain in the arse and not good practice. At the very least if you have no idea how to make an exe totally portable then you could reference a config file in the same directory....Or do as most do and write entries to the registry all neat and tucked away. If we get paranoid about "portable-ness" then we write to temporary space in the registry and make sure we clean up upon closing and/or inspect at runtime. simple!
Click to expand...
Click to collapse
Yep, I've thought of it... But... I was thinking, that (at least) everyone is as geeky as me dauuh , and the most are setting the path correctly...
It'll be added in next version (I hope... TIME, TIME!!!! :cyclops...
Jarmezrocks said:
I have plenty of AutoIT scripts that do exactly that too, so if you are stuck for ideas let me know. Anyway I have rambled enough, good luck and I will keep reporting bugs haha
Click to expand...
Click to collapse
I prefer writing my own code (sorry, I'm a developer in heart and soul...) then using automation like Auto-IT...
Jarmezrocks said:
Edit: That's waaaay too many emoticons. Oooops someone is a little high aren't they?
Click to expand...
Click to collapse
Jarmezrocks said:
PS: I have attached my PNG of the icon I used for this bugger waaaaaay back....it's less generic and feel free to take it and abuse it and do as you please.
Click to expand...
Click to collapse
(@Jarmezrocks please see my PM to you.)
PHEW...
Long Answer, BUT HEY, I'm not the only one writing longies... :angel: (and i like referencing each and every part separately)...
dmagician said:
PHEW...
Long Answer, BUT HEY, I'm not the only one writing longies... :angel: (and i like referencing each and every part separately)...
Click to expand...
Click to collapse
Ahh yes. I write long messages sometimes when my medication has kicked in and I am high....not my fault I kinda need to get all the info out of my head in one go while I am awake.....or else there would just be zeds on the response zzzzzzzzzzzzzzzzzzzzzz lol :laugh: (ref narcolepsy).
I commend you on your efforts at responding to such gibberish and making good sense of it! :highfive:
I have responded to your PM accordingly, and hopefully covered all you need? I have attached all info and sources etc.....well most of it...actually a fair bit of it you will have to workout your self but that is part the fun. Shoot me any questions if you need to...although I have a feeling that you will have mostly all of it covered as you are streets ahead of my knowledge already. I may have misjudged a little in my previous post (although hopefully not to make you feel any less than you actually are? please excuse me if I had said anything that may offended - being naive or what ever....you ARE definitely on the right track). As for the middle menu....I think you could easily remove it and not offend the original dev. It wasn't being used as you mention...and I think it could make way for more/better functionality don't you think? (discuss). However I would ensure all the things I mentioned in my PM first before going too deep and releasing on here.
Good move on bringing the buttons back. They were functional. But I DO like the single button close GUI myself on just about everything else....It looks clean. We have similar taste in that regard. It just isn't functional for me to pressing the task notification desktop link everytime I want to minimise the app LOL.
The rest I we can discuss via PM, this is pretty much only posted here as an open area for other forum members to provide input and opinion (or complaint....like how often it usually is, eh?).
CyberianIce said:
I got this errors:
1:
2:
Error in property: [email protected]@usrdata
Click to expand...
Click to collapse
I'd got the same error!
For me it helped to copy two files to the install dir
"adb.exe" and "AdbWinApi.dll"
Both are installed with the well known MyPhoneExplorer into "Program Files\MyPhoneExplorer\DLL"
Hope it helps!
Feature Request
I use this tool for testing new APK builds on a project I am working on it. It allows me to quickly verify the version number and push to the device. However, since I am usually installing another version of an existing installed APK, I must manually uninstall before using APKSPY. Would it be possible to add a check box that would uninstall any previous versions? It would be really helpful.
Nevermind - I didn't fully read the message presented when it fail. It say uninstall/update and it allows the installation. HOWEVER, that brings up a question... Does it uninstall or does it update? There is a difference as you know.
Thanks,
Jonathan
Hi, I try to run this on Mac via Wineskin Winery, but no luck. Do I need something like .Net, or something else to run ApkSpy?
Thank you.
Ja_som said:
Hi, I try to run this on Mac via Wineskin Winery, but no luck. Do I need something like .Net, or something else to run ApkSpy?
Thank you.
Click to expand...
Click to collapse
The only requirement is the Microsoft .Net 4.
(I'll add this to OP)
jmo said:
I use this tool for testing new APK builds on a project I am working on it. It allows me to quickly verify the version number and push to the device. However, since I am usually installing another version of an existing installed APK, I must manually uninstall before using APKSPY. Would it be possible to add a check box that would uninstall any previous versions? It would be really helpful.
Nevermind - I didn't fully read the message presented when it fail. It say uninstall/update and it allows the installation. HOWEVER, that brings up a question... Does it uninstall or does it update? There is a difference as you know.
Thanks,
Jonathan
Click to expand...
Click to collapse
Yes I know there is difference between the two (update vs uninstall and install again).
It is updating the application (like using "adb install -r apk_file_name.apk"), not doing remove and install
Removed unneeded tabs (System, Batch Rename, Log)
Click to expand...
Click to collapse
The unneeded Batch Rename tab was the only tab I needed really. :laugh: Luckily I found Ido's original version. It's ideal for renaming all those apk's I downloaded and still have the package name when I back them up to my PC.
I have an Asus Memo Pad 10 and an Asus Memo Pad 7 and neither are recognised by APKSpy. Not that it's a problem as I have no problem copying to and from them with Windows Exploder or Total Commander.
Other than that, it's been a handy little app for this tablet/smartphone virgin newbie.
Martin.
wolrik said:
The unneeded Batch Rename tab was the only tab I needed really. :laugh: Luckily I found Ido's original version. It's ideal for renaming all those apk's I downloaded and still have the package name when I back them up to my PC.
I have an Asus Memo Pad 10 and an Asus Memo Pad 7 and neither are recognised by APKSpy. Not that it's a problem as I have no problem copying to and from them with Windows Exploder or Total Commander.
Other than that, it's been a handy little app for this tablet/smartphone virgin newbie.
Martin.
Click to expand...
Click to collapse
Hello.
1st:
I can -- if requested - re-add the Batch rename.
2nd:
I don't know why these two devices are not being recognized -- unless not being recognized by ADB itself -- since I'm spawning devices by parsing the resulting text of "ADB devices" command, So unless being unrecognized by ADB, there should be NO PROBLEM detecting ANY android device with ADB on...
if you have any exception messages thrown by the application, please post them here.
dmagician said:
Hello.
1st:
I can -- if requested - re-add the Batch rename.
2nd:
I don't know why these two devices are not being recognized -- unless not being recognized by ADB itself -- since I'm spawning devices by parsing the resulting text of "ADB devices" command, So unless being unrecognized by ADB, there should be NO PROBLEM detecting ANY android device with ADB on...
if you have any exception messages thrown by the application, please post them here.
Click to expand...
Click to collapse
No need to re-add the tab just for me, but thanks for the offer. As I get to know my way around Android I'll probably need such things less and less.
Sorry, but I know nothing about ADB other than APKSpy needing it. As you can see from the attached pic, the Asus is recognised by Total Commander
Martin.
Hi dmagician,
Nice work, and a shout-out to Ido who originally created it.
I have a feature request:
Could you add the option to remove certain permission(s) and save the modified APK file?
There are many apps which I feel allow themselves way too much permissions, and this option could be very useful to tame them apps.
One more thing:
I noticed that APKSpy v1.8.2 doesn't work with the latest version of AAPT.exe (1432KB), from the Android SDK r24.
So I had to use a previous version of AAPT.exe (833KB), which worked.
Thanks,
Eric
Hey does anybody know where the name of the apk is in the XML files inside the apk?

Linux4Tegra R23.1/R24.1 beta for the Shield Tablet

Stuff that doesn't work: 3G/LTE, accelerometer, GPS, camera, and maybe some other stuff that I'm not remembering
Stuff that does work: GPU (full OpenGL 4.5 and Vulkan), sound, USB device and host, WiFi, Bluetooth, touchscreen (including stylus), SD/USB install
Downloads:
Linux4Tegra R24.1 beta (mirror) (updated on February 18th 2016)
Linux4Tegra R23.1 (mirror) (updated on November 21st 2015)
Linux4Tegra R21.4 (mirror) (updated on July 21st 2015)
Linux4Tegra R21.3 (mirror) (updated on March 9th 2015)
Installation instructions:
Install MultiROM (+ TWRP + touch support + patched kernel)
Download Linux4Tegra and install it through TWRP (Advanced -> MultiROM -> Add ROM)
Tips/notes:
To enable the on-screen keyboard during setup or login, press the blue icon in the corner and select on-screen keyboard from the menu that appears.
To enable the on-screen keyboard on desktop, run Onboard.
If your touch input becomes misaligned, install and run xinput-calibrator.
I am *very* interested in knowing which kernel you have used for this. Upstream, L4T, Android? This looks very promising in any case.
Gnurou said:
I am *very* interested in knowing which kernel you have used for this. Upstream, L4T, Android? This looks very promising in any case.
Click to expand...
Click to collapse
I've tried L4T 21.2, 19.3 and Lollipop. All of them need a small kernel patch (which might break HDMI, I have no idea) for the graphics to work, but apart from that they should all work fine for the most part.
Code:
In drivers/video/tegra/dc/dc.c, in tegra_dc_probe, after "int i;" add:
static int num_probed = 0;
if (++num_probed > 1) return -ENOENT;
Edit: this actually isn't needed, I was just using the wrong cmdline
Getting Started
THESE INSTRUCTIONS ARE OUTDATED. CONSIDER USING THE PREBUILT INSTALLER FROM THE MAIN POST INSTEAD!
You need a computer with Linux installed and some free space (I don't have the exact numbers, but 5GB would probably be enough). On the tablet, you need 2-3GB of free space (on the internal memory), an unlocked bootloader , root and you need Busybox installed too.
On the computer, you'll need to compile your kernel first (this guide includes the compiler, and there's a prebuilt boot.img in the attachments if you want to skip this part). I recommend using https://github.com/Bogdacutu/STLinux-Kernel, with st8_linux_defconfig.
The initramfs is pretty simple, it just mounts the relevant system partitions and loads Linux from them: https://github.com/Bogdacutu/STLinux-Initramfs. You'll need to edit KERNEL_PATH in build.sh and make the kernel beforehand, then running build.sh will result in a boot.img which you can boot with fastboot:
Code:
fastboot boot new_boot.img -c "console=tty1 fbcon=map:10 fbcon=rotate:2 fbfix"
For the rootfs, Linux4Tegra is the easiest place to start from. All the Tegra K1 versions should work fine. For example, with R21.2: (the sudo is necessary there)
Code:
$ wget http://developer.download.nvidia.com/mobile/tegra/l4t/r21.2.0/pm375_release_armhf/Tegra124_Linux_R21.2.0_armhf.tbz2
$ tar xfvj Tegra124_Linux_R21.2.0_armhf.tbz2
$ cd Linux_for_Tegra
/Linux_for_Tegra$ wget http://developer.download.nvidia.com/mobile/tegra/l4t/r21.2.0/pm375_release_armhf/Tegra_Linux_Sample-Root-Filesystem_R21.2.0_armhf.tbz2
/Linux_for_Tegra$ cd rootfs
/Linux_for_Tegra/rootfs$ sudo tar xfvj ../Tegra_Linux_Sample-Root-Filesystem_R21.2.0_armhf.tbz2
/Linux_for_Tegra/rootfs$ cd ..
/Linux_for_Tegra$ sudo ./apply_binaries.sh
/Linux_for_Tegra$ cd rootfs
/Linux_for_Tegra/rootfs$ sudo tar cfvj ../rootfs.tar.bz2 .
The resulting rootfs.tar.bz2 you'll need to somehow get on the device. For the next part, I'll assume it's in /sdcard/rootfs.tar.bz2. You'll need to do this on the device (through ADB or through Terminal Emulator)
Code:
$ su
# cd data
/data# mkdir linux
/data# cd linux
/data/linux# tar xfvj ../media/0/rootfs.tar.bz2
Enabling Bluetooth with brcm_patchram_plus:
Code:
$ sudo brcm_patchram_plus -d --patchram /system/etc/firmware/bcm43241.hcd --baudrate 3000000 --enable_lpm --enable_hci --use_baudrate_for_download --no2bytes --tosleep 1000 /dev/ttyTHS2
Prebuilt boot images:
new_boot(80).img - working WiFi and sound
new_boot(90).img - added pointer emulation to touchscreen driver
new_boot(94).img - fixed Bluetooth stability
new_boot(114).img - fixed HDMI, added support for non-LTE partition table, my tegra driver patch is now optional (without it fbcon doesn't work properly, enable by adding fbfix to cmdline)
new_boot(123).img (newest at the moment) - fbfix isn't needed anymore, added support for tmpfs ACLs, enabled XZ compression (because after reaching a certain size, the kernel wouldn't find the initramfs anymore), enabled KVM
Bogdacutu said:
Code:
In drivers/video/tegra/dc/dc.c, in tegra_dc_probe, after "int i;" add:
static int num_probed = 0;
if (++num_probed > 1) return -ENOENT;
Click to expand...
Click to collapse
Won't this code always return - ENOENT?
Sent from my Xperia Z1 Compact using Tapatalk
_TB_TB_ said:
Won't this code always return - ENOENT?
Sent from my Xperia Z1 Compact using Tapatalk
Click to expand...
Click to collapse
It will always return -ENOENT except for the first time the function gets called (which is enough for the screen to get initialized).
Unless you are looking to completely break the Ubuntu install, do not perform a release upgrade to 14.10.
Everyone here probably already knows this but I wanted to see what would happen, which was rendering the x-server unusable. These results did not surprise me but hopefully this will save someone else who has the same idea as I did some time.
joshtheitguy said:
Unless you are looking to completely break the Ubuntu install, do not perform a release upgrade to 14.10.
Everyone here probably already knows this but I wanted to see what would happen, which was rendering the x-server unusable. These results did not surprise me but hopefully this will save someone else who has the same idea as I did some time.
Click to expand...
Click to collapse
Try doing
Code:
sudo apt-mark hold xserver-xorg-core
before doing the upgrade, to prevent the driver from being overwritten.
Bogdacutu said:
Try doing
Code:
sudo apt-mark hold xserver-xorg-core
before doing the upgrade, to prevent the driver from being overwritten.
Click to expand...
Click to collapse
Thanks, that was the command I couldn't remember. Let me do a backup of it first then I will try again to see if the outcome is any different, I'll let you know how it goes once I have a chance.
Great i need a dual boot Android/Linux
Bogdacutu said:
What works:
Audio
WiFi
Click to expand...
Click to collapse
Bogdacutu said:
Got it working thanks to /u/GenuineAster, will post a full guide in a day or two.
Click to expand...
Click to collapse
Bogdacutu said:
Photos:
https://s3.amazonaws.com/pushbullet...OAfew/Screenshot from 2014-12-28 12:51:51.png
Click to expand...
Click to collapse
I got my tablet 2 days ago, and I'm already trying to mess up with it... I decided to try to install Ubuntu on my Shield Tablet (WiFi only, EU model).
So basically, I managed to boot it up thanks to you tutorial. It seems to be working well, but there are some things that does not work, and I see you apparently solved those issues already...
The issues I have are the following, ordered by priority:
- No WiFi (I see that you apparently solved this issue, can you please explain how you managed to do that?)
- While I was writing this message, I went to keyboard layout options, and the OS crashed, it went back to login screen twice (I was on the same window each time, it showed nvidia black screen, then the login screen)
- No audio (I only have a device named "Dummy audio input/output", you seem to have audio, can you confirm that?)
- Graphics flickering on some textures, for example, on the main sidebar menu, when my mouse pointer is over an icon, there is a background on that icon, but the background is flickering, that's weird...
- No touchscreen (But you don't neither)
For the moment, I think the most important thing is WiFi, since I can't do anything without network connexion. Can you help me with that? Thank you!
etienne51 said:
I got my tablet 2 days ago, and I'm already trying to mess up with it... I decided to try to install Ubuntu on my Shield Tablet (WiFi only, EU model).
So basically, I managed to boot it up thanks to you tutorial. It seems to be working well, but there are some things that does not work, and I see you apparently solved those issues already...
The issues I have are the following, ordered by priority:
- No WiFi (I see that you apparently solved this issue, can you please explain how you managed to do that?)
- While I was writing this message, I went to keyboard layout options, and the OS crashed, it went back to login screen twice (I was on the same window each time, it showed nvidia black screen, then the login screen)
- No audio (I only have a device named "Dummy audio input/output", you seem to have audio, can you confirm that?)
- Graphics flickering on some textures, for example, on the main sidebar menu, when my mouse pointer is over an icon, there is a background on that icon, but the background is flickering, that's weird...
- No touchscreen (But you don't neither)
For the moment, I think the most important thing is WiFi, since I can't do anything without network connexion. Can you help me with that? Thank you!
Click to expand...
Click to collapse
I just updated the boot.img from post #4, WiFi and sound work now, Bluetooth works if you load firmware but it's pretty unstable at the moment.
Ok, I just tested it, and I confirm it works! I haven't tried bluetooth for the moment, but I have WiFi and audio now with v80. Thank you for the update!
I have another question, I saw your previous screenshot showing glxgears running at around 900-1000fps. Since I have some small lags sometimes, I decided to try glxgears and I'm running at around 450fps, that's less that half the framerate you have on your Shield Tablet. Did you do something special with the drivers after the tutorial you wrote?
etienne51 said:
Ok, I just tested it, and I confirm it works! I haven't tried bluetooth for the moment, but I have WiFi and audio now with v80. Thank you for the update!
I have another question, I saw your previous screenshot showing glxgears running at around 900-1000fps. Since I have some small lags sometimes, I decided to try glxgears and I'm running at around 450fps, that's less that half the framerate you have on your Shield Tablet. Did you do something special with the drivers after the tutorial you wrote?
Click to expand...
Click to collapse
Not really, you can try messing with the governors and max frequency, iirc there's a script in the driver package that automatically sets the CPU frequency lower on boot.
Update: I got the touchscreen to work with the Android drivers! I will upload the changes to my kernel repo soon (as soon as I figure out which of all the changes I did are actually required).
How is HDMI out? I find it mildly function on Android, can I expect the same from Ubuntu? Also, I didn't see if LTE is supported.
adampdx said:
How is HDMI out? I find it mildly function on Android, can I expect the same from Ubuntu? Also, I didn't see if LTE is supported.
Click to expand...
Click to collapse
No idea if HDMI works, I don't have a cable (my patch might break it though, in which case we'll probably need to change it). And it works on LTE tablets, but mobile data doesn't work (at least for now).
adampdx said:
How is HDMI out? I find it mildly function on Android, can I expect the same from Ubuntu? Also, I didn't see if LTE is supported.
Click to expand...
Click to collapse
I just ordered a Mini HDMI to HDMI cable, it will arrive in less than a week. As soon as I get it, I'll tell you guys how it works!
/u/GenuineAster confirmed that HDMI isn't working. I'm going to get an Ethernet adapter for netconsole soon, so that I can find out why it doesn't work with my patch to the tegra driver (which I'm sure is the reason HDMI isn't working). I'm also working on a way to get libGL.so to work in an i386 chroot (so that we can try to play desktop games that aren't compiled for ARM yet).
I'm impressed that this actually works so well. Makes what I have on my Shield Portable look pitiful. No sound, no video acceleration, etc. Now the question is, what changes have to be made to a mainline kernel to get similar results? Well, minus the video acceleration that's likely hard-coded to a specific kernel version. Bogdacutu, do you have a patch of your changes? Your github repo isn't a forked copy of the kernel, so it's hard to see the initial changes. I'd like to get a copy of Fedora running. Also looking forward to your touchscreen fix. My usb-otg cable is flakey to the point it causes Ubuntu to reboot if I bump it too much...
Question to the larger community: Anyone know how to get the wireless controller to work with this? I poked at wpa_cli and a couple of the p2p_ commands, but so far haven't picked up anything from the controller when it's searching.
Edit: Seems the otg charging thing doesn't work either. Makes long-term use impracticle when an input device has to be plugged in. Any of the kernel hackers know the bits that changed in nvidia's lollipop kernel to allow this?

Categories

Resources